Class: CDK8sPlus25::K8S::AzureFileVolumeSource

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

Overview

AzureFile represents an Azure File Service mount on the host and bind mount to the pod.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(secret_name:, share_name:, read_only: nil) ⇒ AzureFileVolumeSource

Returns a new instance of AzureFileVolumeSource.

Parameters:

  • secret_name (String)

    secretName is the name of secret that contains Azure Storage Account Name and Key.

  • share_name (String)

    shareName is the azure share Name.

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

    readOnly defaults to false (read/write).



10
11
12
13
14
15
16
17
# File 'k8_s/azure_file_volume_source.rb', line 10

def initialize(secret_name:, share_name:, read_only: nil)
  @secret_name = secret_name
  Jsii::Type.check_type(@secret_name, "eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==", "secretName")
  @share_name = share_name
  Jsii::Type.check_type(@share_name, "eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==", "shareName")
  @read_only = read_only
  Jsii::Type.check_type(@read_only, "eyJwcmltaXRpdmUiOiJib29sZWFuIn0=", "readOnly") unless @read_only.nil?
end

Instance Attribute Details

#read_onlyBoolean? (readonly)

readOnly defaults to false (read/write).

ReadOnly here will force the ReadOnly setting in VolumeMounts.

Returns:

  • (Boolean, nil)


32
33
34
# File 'k8_s/azure_file_volume_source.rb', line 32

def read_only
  @read_only
end

#secret_nameString (readonly)

secretName is the name of secret that contains Azure Storage Account Name and Key.

Returns:

  • (String)


22
23
24
# File 'k8_s/azure_file_volume_source.rb', line 22

def secret_name
  @secret_name
end

#share_nameString (readonly)

shareName is the azure share Name.

Returns:

  • (String)


26
27
28
# File 'k8_s/azure_file_volume_source.rb', line 26

def share_name
  @share_name
end

Class Method Details

.jsii_propertiesObject



34
35
36
37
38
39
40
# File 'k8_s/azure_file_volume_source.rb', line 34

def self.jsii_properties
  {
    :secret_name => "secretName",
    :share_name => "shareName",
    :read_only => "readOnly",
  }
end

Instance Method Details

#to_jsiiObject



42
43
44
45
46
47
48
49
50
# File 'k8_s/azure_file_volume_source.rb', line 42

def to_jsii
  result = {}
  result.merge!({
    "secretName" => @secret_name,
    "shareName" => @share_name,
    "readOnly" => @read_only,
  })
  result.compact
end