Class: AWSCDK::EKSv2::Selector
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::EKSv2::Selector
- Defined in:
- ek_sv2/selector.rb
Overview
Fargate profile selector.
Instance Attribute Summary collapse
-
#labels ⇒ Hash{String => String}?
readonly
The Kubernetes labels that the selector should match.
-
#namespace ⇒ String
readonly
The Kubernetes namespace that the selector should match.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(namespace:, labels: nil) ⇒ Selector
constructor
A new instance of Selector.
- #to_jsii ⇒ Object
Constructor Details
#initialize(namespace:, labels: nil) ⇒ Selector
Returns a new instance of Selector.
9 10 11 12 13 14 |
# File 'ek_sv2/selector.rb', line 9 def initialize(namespace:, labels: nil) @namespace = namespace Jsii::Type.check_type(@namespace, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "namespace") @labels = labels Jsii::Type.check_type(@labels, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoibWFwIn19")), "labels") unless @labels.nil? end |
Instance Attribute Details
#labels ⇒ Hash{String => String}? (readonly)
Note:
Default: - all pods within the namespace will be selected.
The Kubernetes labels that the selector should match.
A pod must contain all of the labels that are specified in the selector for it to be considered a match.
32 33 34 |
# File 'ek_sv2/selector.rb', line 32 def labels @labels end |
#namespace ⇒ String (readonly)
The Kubernetes namespace that the selector should match.
You must specify a namespace for a selector. The selector only matches pods that are created in this namespace, but you can create multiple selectors to target multiple namespaces.
23 24 25 |
# File 'ek_sv2/selector.rb', line 23 def namespace @namespace end |
Class Method Details
.jsii_properties ⇒ Object
34 35 36 37 38 39 |
# File 'ek_sv2/selector.rb', line 34 def self.jsii_properties { :namespace => "namespace", :labels => "labels", } end |
Instance Method Details
#to_jsii ⇒ Object
41 42 43 44 45 46 47 48 |
# File 'ek_sv2/selector.rb', line 41 def to_jsii result = {} result.merge!({ "namespace" => @namespace, "labels" => @labels, }) result.compact end |