Class: AWSCDK::EKS::ALBControllerOptions
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::EKS::ALBControllerOptions
- Defined in:
- eks/alb_controller_options.rb
Overview
Options for AlbController.
Direct Known Subclasses
Instance Attribute Summary collapse
-
#additional_helm_chart_values ⇒ AWSCDK::EKS::ALBControllerHelmChartOptions?
readonly
Additional helm chart values for ALB controller.
-
#overwrite_service_account ⇒ Boolean?
readonly
Overwrite any existing ALB controller service account.
-
#policy ⇒ Object?
readonly
The IAM policy to apply to the service account.
-
#removal_policy ⇒ AWSCDK::RemovalPolicy?
readonly
The removal policy applied to the ALB controller resources.
-
#repository ⇒ String?
readonly
The repository to pull the controller image from.
-
#version ⇒ AWSCDK::EKS::ALBControllerVersion
readonly
Version of the controller.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(version:, additional_helm_chart_values: nil, overwrite_service_account: nil, policy: nil, removal_policy: nil, repository: nil) ⇒ ALBControllerOptions
constructor
A new instance of ALBControllerOptions.
- #to_jsii ⇒ Object
Constructor Details
#initialize(version:, additional_helm_chart_values: nil, overwrite_service_account: nil, policy: nil, removal_policy: nil, repository: nil) ⇒ ALBControllerOptions
Returns a new instance of ALBControllerOptions.
13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'eks/alb_controller_options.rb', line 13 def initialize(version:, additional_helm_chart_values: nil, overwrite_service_account: nil, policy: nil, removal_policy: nil, repository: nil) @version = version Jsii::Type.check_type(@version, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWtzLkFsYkNvbnRyb2xsZXJWZXJzaW9uIn0=")), "version") @additional_helm_chart_values = additional_helm_chart_values.is_a?(Hash) ? ::AWSCDK::EKS::ALBControllerHelmChartOptions.new(**additional_helm_chart_values.transform_keys(&:to_sym)) : additional_helm_chart_values Jsii::Type.check_type(@additional_helm_chart_values, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWtzLkFsYkNvbnRyb2xsZXJIZWxtQ2hhcnRPcHRpb25zIn0=")), "additionalHelmChartValues") unless @additional_helm_chart_values.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? @policy = policy Jsii::Type.check_type(@policy, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJhbnkifQ==")), "policy") unless @policy.nil? @removal_policy = removal_policy Jsii::Type.check_type(@removal_policy, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5SZW1vdmFsUG9saWN5In0=")), "removalPolicy") unless @removal_policy.nil? @repository = repository Jsii::Type.check_type(@repository, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "repository") unless @repository.nil? end |
Instance Attribute Details
#additional_helm_chart_values ⇒ AWSCDK::EKS::ALBControllerHelmChartOptions? (readonly)
Default: - no additional helm chart values
Additional helm chart values for ALB controller.
36 37 38 |
# File 'eks/alb_controller_options.rb', line 36 def additional_helm_chart_values @additional_helm_chart_values end |
#overwrite_service_account ⇒ Boolean? (readonly)
Default: false
Overwrite any existing ALB controller service account.
If this is set, we will use kubectl apply instead of kubectl create
when the ALB controller service account is created. Otherwise, if there is already a service account
named 'aws-load-balancer-controller' in the kube-system namespace, the operation will fail.
45 46 47 |
# File 'eks/alb_controller_options.rb', line 45 def overwrite_service_account @overwrite_service_account end |
#policy ⇒ Object? (readonly)
Default: - Corresponds to the predefined version.
The IAM policy to apply to the service account.
If you're using one of the built-in versions, this is not required since CDK ships with the appropriate policies for those versions.
However, if you are using a custom version, this is required (and validated).
55 56 57 |
# File 'eks/alb_controller_options.rb', line 55 def policy @policy end |
#removal_policy ⇒ AWSCDK::RemovalPolicy? (readonly)
Default: RemovalPolicy.DESTROY
The removal policy applied to the ALB controller 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
67 68 69 |
# File 'eks/alb_controller_options.rb', line 67 def removal_policy @removal_policy end |
#repository ⇒ String? (readonly)
Default: '602401143452.dkr.ecr.us-west-2.amazonaws.com/amazon/aws-load-balancer-controller'
The repository to pull the controller image from.
Note that the default repository works for most regions, but not all. If the repository is not applicable to your region, use a custom repository according to the information here: https://github.com/kubernetes-sigs/aws-load-balancer-controller/releases.
76 77 78 |
# File 'eks/alb_controller_options.rb', line 76 def repository @repository end |
#version ⇒ AWSCDK::EKS::ALBControllerVersion (readonly)
Version of the controller.
31 32 33 |
# File 'eks/alb_controller_options.rb', line 31 def version @version end |
Class Method Details
.jsii_properties ⇒ Object
78 79 80 81 82 83 84 85 86 87 |
# File 'eks/alb_controller_options.rb', line 78 def self.jsii_properties { :version => "version", :additional_helm_chart_values => "additionalHelmChartValues", :overwrite_service_account => "overwriteServiceAccount", :policy => "policy", :removal_policy => "removalPolicy", :repository => "repository", } end |
Instance Method Details
#to_jsii ⇒ Object
89 90 91 92 93 94 95 96 97 98 99 100 |
# File 'eks/alb_controller_options.rb', line 89 def to_jsii result = {} result.merge!({ "version" => @version, "additionalHelmChartValues" => @additional_helm_chart_values, "overwriteServiceAccount" => @overwrite_service_account, "policy" => @policy, "removalPolicy" => @removal_policy, "repository" => @repository, }) result.compact end |