struct Kubernetes::Subject

Overview

Subject contains a reference to the object or user identities a role binding applies to. This can either hold a direct API object reference, or a value for non-objects such as user and group names.

Included Modules

Defined in:

generated/models/io_k8s_api_flowcontrol_v1.cr
generated/models/io_k8s_api_rbac_v1.cr

Constructors

Macro Summary

Instance Method Summary

Constructor Detail

def self.new(ctx : YAML::ParseContext, node : YAML::Nodes::Node) #

def self.new(pull : ::JSON::PullParser) #

def self.new(*, __pull_for_json_serializable pull : ::JSON::PullParser) #

def self.new(*, __context_for_yaml_serializable ctx : YAML::ParseContext, __node_for_yaml_serializable node : YAML::Nodes::Node) #

Macro Detail

macro field(name, type = nil, **options, &block) #

Helper macro for defining fields with automatic camelCase conversion


Instance Method Detail

def api_group : String | Nil #

APIGroup holds the API group of the referenced subject. Defaults to "" for ServiceAccount subjects. Defaults to "rbac.authorization.k8s.io" for User and Group subjects.


def api_group=(api_group : String | Nil) #

APIGroup holds the API group of the referenced subject. Defaults to "" for ServiceAccount subjects. Defaults to "rbac.authorization.k8s.io" for User and Group subjects.


def group : GroupSubject | Nil #

#group matches based on user group name.


def group=(group : GroupSubject | Nil) #

#group matches based on user group name.


def kind : String | Nil #

Kind of object being referenced. Values defined by this API group are "User", "Group", and "ServiceAccount". If the Authorizer does not recognized the kind value, the Authorizer should report an error.


def kind=(kind : String | Nil) #

Kind of object being referenced. Values defined by this API group are "User", "Group", and "ServiceAccount". If the Authorizer does not recognized the kind value, the Authorizer should report an error.


def name : String | Nil #

Name of the object being referenced.


def name=(name : String | Nil) #

Name of the object being referenced.


def namespace : String | Nil #

Namespace of the referenced object. If the object kind is non-namespace, such as "User" or "Group", and this value is not empty the Authorizer should report an error.


def namespace=(namespace : String | Nil) #

Namespace of the referenced object. If the object kind is non-namespace, such as "User" or "Group", and this value is not empty the Authorizer should report an error.


def service_account : ServiceAccountSubject | Nil #

serviceAccount matches ServiceAccounts.


def service_account=(service_account : ServiceAccountSubject | Nil) #

serviceAccount matches ServiceAccounts.


def user : UserSubject | Nil #

#user matches based on username.


def user=(user : UserSubject | Nil) #

#user matches based on username.