Class: CDK8sPlus25::K8S::AzureDiskVolumeSource

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

Overview

AzureDisk represents an Azure Data Disk 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(disk_name:, disk_uri:, caching_mode: nil, fs_type: nil, kind: nil, read_only: nil) ⇒ AzureDiskVolumeSource

Returns a new instance of AzureDiskVolumeSource.

Parameters:

  • disk_name (String)

    diskName is the Name of the data disk in the blob storage.

  • disk_uri (String)

    diskURI is the URI of data disk in the blob storage.

  • caching_mode (String, nil) (defaults to: nil)

    cachingMode is the Host Caching mode: None, Read Only, Read Write.

  • fs_type (String, nil) (defaults to: nil)

    fsType is Filesystem type to mount.

  • kind (String, nil) (defaults to: nil)

    kind expected values are Shared: multiple blob disks per storage account Dedicated: single blob disk per storage account Managed: azure managed data disk (only in managed availability set).

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

    readOnly Defaults to false (read/write).



13
14
15
16
17
18
19
20
21
22
23
24
25
26
# File 'k8_s/azure_disk_volume_source.rb', line 13

def initialize(disk_name:, disk_uri:, caching_mode: nil, fs_type: nil, kind: nil, read_only: nil)
  @disk_name = disk_name
  Jsii::Type.check_type(@disk_name, "eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==", "diskName")
  @disk_uri = disk_uri
  Jsii::Type.check_type(@disk_uri, "eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==", "diskUri")
  @caching_mode = caching_mode
  Jsii::Type.check_type(@caching_mode, "eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==", "cachingMode") unless @caching_mode.nil?
  @fs_type = fs_type
  Jsii::Type.check_type(@fs_type, "eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==", "fsType") unless @fs_type.nil?
  @kind = kind
  Jsii::Type.check_type(@kind, "eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==", "kind") unless @kind.nil?
  @read_only = read_only
  Jsii::Type.check_type(@read_only, "eyJwcmltaXRpdmUiOiJib29sZWFuIn0=", "readOnly") unless @read_only.nil?
end

Instance Attribute Details

#caching_modeString? (readonly)

cachingMode is the Host Caching mode: None, Read Only, Read Write.

Returns:

  • (String, nil)


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

def caching_mode
  @caching_mode
end

#disk_nameString (readonly)

diskName is the Name of the data disk in the blob storage.

Returns:

  • (String)


31
32
33
# File 'k8_s/azure_disk_volume_source.rb', line 31

def disk_name
  @disk_name
end

#disk_uriString (readonly)

diskURI is the URI of data disk in the blob storage.

Returns:

  • (String)


35
36
37
# File 'k8_s/azure_disk_volume_source.rb', line 35

def disk_uri
  @disk_uri
end

#fs_typeString? (readonly)

fsType is Filesystem type to mount.

Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified.

Returns:

  • (String, nil)


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

def fs_type
  @fs_type
end

#kindString? (readonly)

kind expected values are Shared: multiple blob disks per storage account Dedicated: single blob disk per storage account Managed: azure managed data disk (only in managed availability set).

defaults to shared

Returns:

  • (String, nil)


51
52
53
# File 'k8_s/azure_disk_volume_source.rb', line 51

def kind
  @kind
end

#read_onlyBoolean? (readonly)

Note:

Default: false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.

readOnly Defaults to false (read/write).

ReadOnly here will force the ReadOnly setting in VolumeMounts.

Returns:

  • (Boolean, nil)


58
59
60
# File 'k8_s/azure_disk_volume_source.rb', line 58

def read_only
  @read_only
end

Class Method Details

.jsii_propertiesObject



60
61
62
63
64
65
66
67
68
69
# File 'k8_s/azure_disk_volume_source.rb', line 60

def self.jsii_properties
  {
    :disk_name => "diskName",
    :disk_uri => "diskUri",
    :caching_mode => "cachingMode",
    :fs_type => "fsType",
    :kind => "kind",
    :read_only => "readOnly",
  }
end

Instance Method Details

#to_jsiiObject



71
72
73
74
75
76
77
78
79
80
81
82
# File 'k8_s/azure_disk_volume_source.rb', line 71

def to_jsii
  result = {}
  result.merge!({
    "diskName" => @disk_name,
    "diskUri" => @disk_uri,
    "cachingMode" => @caching_mode,
    "fsType" => @fs_type,
    "kind" => @kind,
    "readOnly" => @read_only,
  })
  result.compact
end