Class: CDK8sPlus25::K8S::KubeServiceAccount

Inherits:
CDK8s::APIObject show all
Defined in:
k8_s/kube_service_account.rb

Overview

ServiceAccount binds together: * a name, understood by users, and perhaps by peripheral systems, for an identity * a principal that can be authenticated and authorized * a set of secrets.

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from CDK8s::APIObject

is_api_object, of

Methods inherited from Constructs::Construct

is_construct

Constructor Details

#initialize(scope, id, props = nil, &jsii_block) ⇒ KubeServiceAccount

Defines a "io.k8s.api.core.v1.ServiceAccount" API object.

Parameters:



13
14
15
16
17
18
19
# File 'k8_s/kube_service_account.rb', line 13

def initialize(scope, id, props = nil, &jsii_block)
  props = props.is_a?(Hash) ? ::CDK8sPlus25::K8S::KubeServiceAccountProps.new(**props.transform_keys(&:to_sym)) : props
  Jsii::Type.check_type(scope, "eyJmcW4iOiJjb25zdHJ1Y3RzLkNvbnN0cnVjdCJ9", "scope")
  Jsii::Type.check_type(id, "eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==", "id")
  Jsii::Type.check_type(props, "eyJmcW4iOiJjZGs4cy1wbHVzLTI1Lms4cy5LdWJlU2VydmljZUFjY291bnRQcm9wcyJ9", "props") unless props.nil?
  Jsii::Object.instance_method(:initialize).bind(self).call(scope, id, props, &jsii_block)
end

Class Method Details

::GVKCDK8s::GroupVersionKind

Returns the apiVersion and kind for "io.k8s.api.core.v1.ServiceAccount".



107
108
109
# File 'k8_s/kube_service_account.rb', line 107

def self.GVK()
  Jsii::Kernel.instance.get_static("cdk8s-plus-25.k8s.KubeServiceAccount", "GVK")
end

.jsii_overridable_methodsObject



21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# File 'k8_s/kube_service_account.rb', line 21

def self.jsii_overridable_methods
  {
    :node => { kind: :property, name: "node", is_optional: false },
    :api_group => { kind: :property, name: "apiGroup", is_optional: false },
    :api_version => { kind: :property, name: "apiVersion", is_optional: false },
    :chart => { kind: :property, name: "chart", is_optional: false },
    :kind => { kind: :property, name: "kind", is_optional: false },
    :metadata => { kind: :property, name: "metadata", is_optional: false },
    :name => { kind: :property, name: "name", is_optional: false },
    :to_string => { kind: :method, name: "toString", is_optional: false },
    :with => { kind: :method, name: "with", is_optional: false },
    :add_dependency => { kind: :method, name: "addDependency", is_optional: false },
    :add_json_patch => { kind: :method, name: "addJsonPatch", is_optional: false },
    :to_json => { kind: :method, name: "toJson", is_optional: false },
  }
end

.manifest(props = nil) ⇒ Object

Renders a Kubernetes manifest for "io.k8s.api.core.v1.ServiceAccount".

This can be used to inline resource manifests inside other objects (e.g. as templates).

Parameters:

Returns:

  • (Object)


44
45
46
47
48
# File 'k8_s/kube_service_account.rb', line 44

def self.manifest(props = nil)
  props = props.is_a?(Hash) ? ::CDK8sPlus25::K8S::KubeServiceAccountProps.new(**props.transform_keys(&:to_sym)) : props
  Jsii::Type.check_type(props, "eyJmcW4iOiJjZGs4cy1wbHVzLTI1Lms4cy5LdWJlU2VydmljZUFjY291bnRQcm9wcyJ9", "props") unless props.nil?
  Jsii::Kernel.instance.call_static("cdk8s-plus-25.k8s.KubeServiceAccount", "manifest", [props])
end

Instance Method Details

#add_dependency(*dependencies) ⇒ void

This method returns an undefined value.

Create a dependency between this ApiObject and other constructs.

These can be other ApiObjects, Charts, or custom.

Parameters:



140
141
142
143
144
145
# File 'k8_s/kube_service_account.rb', line 140

def add_dependency(*dependencies)
  dependencies.each_with_index do |item, index|
    Jsii::Type.check_type(item, "eyJmcW4iOiJjb25zdHJ1Y3RzLklDb25zdHJ1Y3QifQ==", "dependencies[#{index}]")
  end
  jsii_call_method("addDependency", [*dependencies])
end

#add_json_patch(*ops) ⇒ void

This method returns an undefined value.

Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object.

Examples:

kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true));

Parameters:



153
154
155
156
157
158
# File 'k8_s/kube_service_account.rb', line 153

def add_json_patch(*ops)
  ops.each_with_index do |item, index|
    Jsii::Type.check_type(item, "eyJmcW4iOiJjZGs4cy5Kc29uUGF0Y2gifQ==", "ops[#{index}]")
  end
  jsii_call_method("addJsonPatch", [*ops])
end

#api_groupString

The group portion of the API version (e.g. authorization.k8s.io).

Returns:

  • (String)


60
61
62
# File 'k8_s/kube_service_account.rb', line 60

def api_group()
  jsii_get_property("apiGroup")
end

#api_versionString

The object's API version (e.g. authorization.k8s.io/v1).

Returns:

  • (String)


67
68
69
# File 'k8_s/kube_service_account.rb', line 67

def api_version()
  jsii_get_property("apiVersion")
end

#chartCDK8s::Chart

The chart in which this object is defined.

Returns:



74
75
76
# File 'k8_s/kube_service_account.rb', line 74

def chart()
  jsii_get_property("chart")
end

#kindString

The object kind.

Returns:

  • (String)


81
82
83
# File 'k8_s/kube_service_account.rb', line 81

def kind()
  jsii_get_property("kind")
end

#metadataCDK8s::APIObjectMetadataDefinition

Metadata associated with this API object.



88
89
90
# File 'k8_s/kube_service_account.rb', line 88

def ()
  jsii_get_property("metadata")
end

#nameString

The name of the API object.

If a name is specified in metadata.name this will be the name returned. Otherwise, a name will be generated by calling Chart.of(this).generatedObjectName(this), which by default uses the construct path to generate a DNS-compatible name for the resource.

Returns:

  • (String)


100
101
102
# File 'k8_s/kube_service_account.rb', line 100

def name()
  jsii_get_property("name")
end

#nodeConstructs::Node

The tree node.

Returns:



53
54
55
# File 'k8_s/kube_service_account.rb', line 53

def node()
  jsii_get_property("node")
end

#to_jsonObject

Renders the object to Kubernetes JSON.

Returns:

  • (Object)


163
164
165
# File 'k8_s/kube_service_account.rb', line 163

def to_json()
  jsii_call_method("toJson", [])
end

#to_stringString

Returns a string representation of this construct.

Returns:

  • (String)


114
115
116
# File 'k8_s/kube_service_account.rb', line 114

def to_string()
  jsii_call_method("toString", [])
end

#with(*mixins) ⇒ Constructs::IConstruct

Applies one or more mixins to this construct.

Mixins are applied in order. The list of constructs is captured at the start of the call, so constructs added by a mixin will not be visited. Use multiple with() calls if subsequent mixins should apply to added constructs.

Parameters:

Returns:



127
128
129
130
131
132
# File 'k8_s/kube_service_account.rb', line 127

def with(*mixins)
  mixins.each_with_index do |item, index|
    Jsii::Type.check_type(item, "eyJmcW4iOiJjb25zdHJ1Y3RzLklNaXhpbiJ9", "mixins[#{index}]")
  end
  jsii_call_method("with", [*mixins])
end