Class: CDK8sPlus25::K8S::KubeConfigMapProps

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
k8_s/kube_config_map_props.rb

Overview

ConfigMap holds configuration data for pods to consume.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(binary_data: nil, data: nil, immutable: nil, metadata: nil) ⇒ KubeConfigMapProps

Returns a new instance of KubeConfigMapProps.

Parameters:

  • binary_data (Hash{String => String}, nil) (defaults to: nil)

    BinaryData contains the binary data.

  • data (Hash{String => String}, nil) (defaults to: nil)

    Data contains the configuration data.

  • immutable (Boolean, nil) (defaults to: nil)

    Immutable, if set to true, ensures that data stored in the ConfigMap cannot be updated (only object metadata can be modified).

  • metadata (CDK8sPlus25::K8S::ObjectMeta, nil) (defaults to: nil)

    Standard object's metadata.



11
12
13
14
15
16
17
18
19
20
# File 'k8_s/kube_config_map_props.rb', line 11

def initialize(binary_data: nil, data: nil, immutable: nil, metadata: nil)
  @binary_data = binary_data
  Jsii::Type.check_type(@binary_data, "eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoibWFwIn19", "binaryData") unless @binary_data.nil?
  @data = data
  Jsii::Type.check_type(@data, "eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoibWFwIn19", "data") unless @data.nil?
  @immutable = immutable
  Jsii::Type.check_type(@immutable, "eyJwcmltaXRpdmUiOiJib29sZWFuIn0=", "immutable") unless @immutable.nil?
  @metadata = .is_a?(Hash) ? ::CDK8sPlus25::K8S::ObjectMeta.new(**.transform_keys(&:to_sym)) : 
  Jsii::Type.check_type(@metadata, "eyJmcW4iOiJjZGs4cy1wbHVzLTI1Lms4cy5PYmplY3RNZXRhIn0=", "metadata") unless @metadata.nil?
end

Instance Attribute Details

#binary_dataHash{String => String}? (readonly)

BinaryData contains the binary data.

Each key must consist of alphanumeric characters, '-', '_' or '.'. BinaryData can contain byte sequences that are not in the UTF-8 range. The keys stored in BinaryData must not overlap with the ones in the Data field, this is enforced during validation process. Using this field will require 1.10+ apiserver and kubelet.

Returns:

  • (Hash{String => String}, nil)


27
28
29
# File 'k8_s/kube_config_map_props.rb', line 27

def binary_data
  @binary_data
end

#dataHash{String => String}? (readonly)

Data contains the configuration data.

Each key must consist of alphanumeric characters, '-', '_' or '.'. Values with non-UTF-8 byte sequences must use the BinaryData field. The keys stored in Data must not overlap with the keys in the BinaryData field, this is enforced during validation process.

Returns:

  • (Hash{String => String}, nil)


33
34
35
# File 'k8_s/kube_config_map_props.rb', line 33

def data
  @data
end

#immutableBoolean? (readonly)

Immutable, if set to true, ensures that data stored in the ConfigMap cannot be updated (only object metadata can be modified).

If not set to true, the field can be modified at any time. Defaulted to nil.

Returns:

  • (Boolean, nil)


39
40
41
# File 'k8_s/kube_config_map_props.rb', line 39

def immutable
  @immutable
end

#metadataCDK8sPlus25::K8S::ObjectMeta? (readonly)



45
46
47
# File 'k8_s/kube_config_map_props.rb', line 45

def 
  @metadata
end

Class Method Details

.jsii_propertiesObject



47
48
49
50
51
52
53
54
# File 'k8_s/kube_config_map_props.rb', line 47

def self.jsii_properties
  {
    :binary_data => "binaryData",
    :data => "data",
    :immutable => "immutable",
    :metadata => "metadata",
  }
end

Instance Method Details

#to_jsiiObject



56
57
58
59
60
61
62
63
64
65
# File 'k8_s/kube_config_map_props.rb', line 56

def to_jsii
  result = {}
  result.merge!({
    "binaryData" => @binary_data,
    "data" => @data,
    "immutable" => @immutable,
    "metadata" => @metadata,
  })
  result.compact
end