Class: AWSCDK::EKSv2::ServiceAccountOptions
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::EKSv2::ServiceAccountOptions
- Defined in:
- ek_sv2/service_account_options.rb
Overview
Options for ServiceAccount.
Direct Known Subclasses
Instance Attribute Summary collapse
-
#annotations ⇒ Hash{String => String}?
readonly
Additional annotations of the service account.
-
#identity_type ⇒ AWSCDK::EKSv2::IdentityType?
readonly
The identity type to use for the service account.
-
#labels ⇒ Hash{String => String}?
readonly
Additional labels of the service account.
-
#name ⇒ String?
readonly
The name of the service account.
-
#namespace ⇒ String?
readonly
The namespace of the service account.
-
#overwrite_service_account ⇒ Boolean?
readonly
Overwrite existing service account.
-
#removal_policy ⇒ AWSCDK::RemovalPolicy?
readonly
The removal policy applied to the service account resources.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(annotations: nil, identity_type: nil, labels: nil, name: nil, namespace: nil, overwrite_service_account: nil, removal_policy: nil) ⇒ ServiceAccountOptions
constructor
A new instance of ServiceAccountOptions.
- #to_jsii ⇒ Object
Constructor Details
#initialize(annotations: nil, identity_type: nil, labels: nil, name: nil, namespace: nil, overwrite_service_account: nil, removal_policy: nil) ⇒ ServiceAccountOptions
Returns a new instance of ServiceAccountOptions.
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
# File 'ek_sv2/service_account_options.rb', line 14 def initialize(annotations: nil, identity_type: nil, labels: nil, name: nil, namespace: nil, overwrite_service_account: nil, removal_policy: nil) @annotations = annotations Jsii::Type.check_type(@annotations, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoibWFwIn19")), "annotations") unless @annotations.nil? @identity_type = identity_type Jsii::Type.check_type(@identity_type, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWtzX3YyLklkZW50aXR5VHlwZSJ9")), "identityType") unless @identity_type.nil? @labels = labels Jsii::Type.check_type(@labels, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoibWFwIn19")), "labels") unless @labels.nil? @name = name Jsii::Type.check_type(@name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "name") unless @name.nil? @namespace = namespace Jsii::Type.check_type(@namespace, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "namespace") unless @namespace.nil? @overwrite_service_account = overwrite_service_account Jsii::Type.check_type(@overwrite_service_account, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "overwriteServiceAccount") unless @overwrite_service_account.nil? @removal_policy = removal_policy Jsii::Type.check_type(@removal_policy, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5SZW1vdmFsUG9saWN5In0=")), "removalPolicy") unless @removal_policy.nil? end |
Instance Attribute Details
#annotations ⇒ Hash{String => String}? (readonly)
Default: - no additional annotations
Additional annotations of the service account.
35 36 37 |
# File 'ek_sv2/service_account_options.rb', line 35 def annotations @annotations end |
#identity_type ⇒ AWSCDK::EKSv2::IdentityType? (readonly)
Default: IdentityType.IRSA
The identity type to use for the service account.
40 41 42 |
# File 'ek_sv2/service_account_options.rb', line 40 def identity_type @identity_type end |
#labels ⇒ Hash{String => String}? (readonly)
Default: - no additional labels
Additional labels of the service account.
45 46 47 |
# File 'ek_sv2/service_account_options.rb', line 45 def labels @labels end |
#name ⇒ String? (readonly)
Default: - If no name is given, it will use the id of the resource.
The name of the service account.
The name of a ServiceAccount object must be a valid DNS subdomain name. https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/
53 54 55 |
# File 'ek_sv2/service_account_options.rb', line 53 def name @name end |
#namespace ⇒ String? (readonly)
Default: "default"
The namespace of the service account.
All namespace names must be valid RFC 1123 DNS labels. https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/#namespaces-and-dns
61 62 63 |
# File 'ek_sv2/service_account_options.rb', line 61 def namespace @namespace end |
#overwrite_service_account ⇒ Boolean? (readonly)
Default: false
Overwrite existing service account.
If this is set, we will use kubectl apply instead of kubectl create
when the service account is created. Otherwise, if there is already a service account
in the cluster with the same name, the operation will fail.
70 71 72 |
# File 'ek_sv2/service_account_options.rb', line 70 def overwrite_service_account @overwrite_service_account end |
#removal_policy ⇒ AWSCDK::RemovalPolicy? (readonly)
Default: RemovalPolicy.DESTROY
The removal policy applied to the service account resources.
The removal policy controls what happens to the resources if they stop being managed by CloudFormation. This can happen in one of three situations:
- The resource is removed from the template, so CloudFormation stops managing it
- A change to the resource is made that requires it to be replaced, so CloudFormation stops managing it
- The stack is deleted, so CloudFormation stops managing all resources in it
82 83 84 |
# File 'ek_sv2/service_account_options.rb', line 82 def removal_policy @removal_policy end |
Class Method Details
.jsii_properties ⇒ Object
84 85 86 87 88 89 90 91 92 93 94 |
# File 'ek_sv2/service_account_options.rb', line 84 def self.jsii_properties { :annotations => "annotations", :identity_type => "identityType", :labels => "labels", :name => "name", :namespace => "namespace", :overwrite_service_account => "overwriteServiceAccount", :removal_policy => "removalPolicy", } end |
Instance Method Details
#to_jsii ⇒ Object
96 97 98 99 100 101 102 103 104 105 106 107 108 |
# File 'ek_sv2/service_account_options.rb', line 96 def to_jsii result = {} result.merge!({ "annotations" => @annotations, "identityType" => @identity_type, "labels" => @labels, "name" => @name, "namespace" => @namespace, "overwriteServiceAccount" => @overwrite_service_account, "removalPolicy" => @removal_policy, }) result.compact end |