Class: CDK8sPlus25::AzureDiskPersistentVolumeProps

Inherits:
PersistentVolumeProps
  • Object
show all
Defined in:
azure_disk_persistent_volume_props.rb

Overview

Properties for AzureDiskPersistentVolume.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(metadata: nil, access_modes: nil, claim: nil, mount_options: nil, reclaim_policy: nil, storage: nil, storage_class_name: nil, volume_mode: nil, disk_name:, disk_uri:, caching_mode: nil, fs_type: nil, kind: nil, read_only: nil) ⇒ AzureDiskPersistentVolumeProps

Returns a new instance of AzureDiskPersistentVolumeProps.

Parameters:

  • metadata (CDK8s::APIObjectMetadata, nil) (defaults to: nil)

    Metadata that all persisted resources must have, which includes all objects users must create.

  • access_modes (Array<CDK8sPlus25::PersistentVolumeAccessMode>, nil) (defaults to: nil)

    Contains all ways the volume can be mounted.

  • claim (CDK8sPlus25::IPersistentVolumeClaim, nil) (defaults to: nil)

    Part of a bi-directional binding between PersistentVolume and PersistentVolumeClaim.

  • mount_options (Array<String>, nil) (defaults to: nil)

    A list of mount options, e.g. ["ro", "soft"]. Not validated - mount will simply fail if one is invalid.

  • reclaim_policy (CDK8sPlus25::PersistentVolumeReclaimPolicy, nil) (defaults to: nil)

    When a user is done with their volume, they can delete the PVC objects from the API that allows reclamation of the resource.

  • storage (CDK8s::Size, nil) (defaults to: nil)

    What is the storage capacity of this volume.

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

    Name of StorageClass to which this persistent volume belongs.

  • volume_mode (CDK8sPlus25::PersistentVolumeMode, nil) (defaults to: nil)

    Defines what type of volume is required by the claim.

  • disk_name (String)

    The Name of the data disk in the blob storage.

  • disk_uri (String)

    The URI the data disk in the blob storage.

  • caching_mode (CDK8sPlus25::AzureDiskPersistentVolumeCachingMode, nil) (defaults to: nil)

    Host Caching mode.

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

    Filesystem type to mount.

  • kind (CDK8sPlus25::AzureDiskPersistentVolumeKind, nil) (defaults to: nil)

    Kind of disk.

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

    Force the ReadOnly setting in VolumeMounts.



21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
# File 'azure_disk_persistent_volume_props.rb', line 21

def initialize(metadata: nil, access_modes: nil, claim: nil, mount_options: nil, reclaim_policy: nil, storage: nil, storage_class_name: nil, volume_mode: nil, disk_name:, disk_uri:, caching_mode: nil, fs_type: nil, kind: nil, read_only: nil)
  @metadata = .is_a?(Hash) ? ::CDK8s::APIObjectMetadata.new(**.transform_keys(&:to_sym)) : 
  Jsii::Type.check_type(@metadata, "eyJmcW4iOiJjZGs4cy5BcGlPYmplY3RNZXRhZGF0YSJ9", "metadata") unless @metadata.nil?
  @access_modes = access_modes
  Jsii::Type.check_type(@access_modes, "eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImNkazhzLXBsdXMtMjUuUGVyc2lzdGVudFZvbHVtZUFjY2Vzc01vZGUifSwia2luZCI6ImFycmF5In19", "accessModes") unless @access_modes.nil?
  @claim = claim
  Jsii::Type.check_type(@claim, "eyJmcW4iOiJjZGs4cy1wbHVzLTI1LklQZXJzaXN0ZW50Vm9sdW1lQ2xhaW0ifQ==", "claim") unless @claim.nil?
  @mount_options = mount_options
  Jsii::Type.check_type(@mount_options, "eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=", "mountOptions") unless @mount_options.nil?
  @reclaim_policy = reclaim_policy
  Jsii::Type.check_type(@reclaim_policy, "eyJmcW4iOiJjZGs4cy1wbHVzLTI1LlBlcnNpc3RlbnRWb2x1bWVSZWNsYWltUG9saWN5In0=", "reclaimPolicy") unless @reclaim_policy.nil?
  @storage = storage
  Jsii::Type.check_type(@storage, "eyJmcW4iOiJjZGs4cy5TaXplIn0=", "storage") unless @storage.nil?
  @storage_class_name = storage_class_name
  Jsii::Type.check_type(@storage_class_name, "eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==", "storageClassName") unless @storage_class_name.nil?
  @volume_mode = volume_mode
  Jsii::Type.check_type(@volume_mode, "eyJmcW4iOiJjZGs4cy1wbHVzLTI1LlBlcnNpc3RlbnRWb2x1bWVNb2RlIn0=", "volumeMode") unless @volume_mode.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, "eyJmcW4iOiJjZGs4cy1wbHVzLTI1LkF6dXJlRGlza1BlcnNpc3RlbnRWb2x1bWVDYWNoaW5nTW9kZSJ9", "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, "eyJmcW4iOiJjZGs4cy1wbHVzLTI1LkF6dXJlRGlza1BlcnNpc3RlbnRWb2x1bWVLaW5kIn0=", "kind") unless @kind.nil?
  @read_only = read_only
  Jsii::Type.check_type(@read_only, "eyJwcmltaXRpdmUiOiJib29sZWFuIn0=", "readOnly") unless @read_only.nil?
end

Instance Attribute Details

#access_modesArray<CDK8sPlus25::PersistentVolumeAccessMode>? (readonly)

Note:

Default: - No access modes.

Contains all ways the volume can be mounted.



61
62
63
# File 'azure_disk_persistent_volume_props.rb', line 61

def access_modes
  @access_modes
end

#caching_modeCDK8sPlus25::AzureDiskPersistentVolumeCachingMode? (readonly)

Note:

Default: - AzureDiskPersistentVolumeCachingMode.NONE.

Host Caching mode.



113
114
115
# File 'azure_disk_persistent_volume_props.rb', line 113

def caching_mode
  @caching_mode
end

#claimCDK8sPlus25::IPersistentVolumeClaim? (readonly)

Note:

Default: - Not bound to a specific claim.

Part of a bi-directional binding between PersistentVolume and PersistentVolumeClaim.

Expected to be non-nil when bound.



69
70
71
# File 'azure_disk_persistent_volume_props.rb', line 69

def claim
  @claim
end

#disk_nameString (readonly)

The Name of the data disk in the blob storage.

Returns:

  • (String)


104
105
106
# File 'azure_disk_persistent_volume_props.rb', line 104

def disk_name
  @disk_name
end

#disk_uriString (readonly)

The URI the data disk in the blob storage.

Returns:

  • (String)


108
109
110
# File 'azure_disk_persistent_volume_props.rb', line 108

def disk_uri
  @disk_uri
end

#fs_typeString? (readonly)

Note:

Default: 'ext4'

Filesystem type to mount.

Must be a filesystem type supported by the host operating system.

Returns:

  • (String, nil)


120
121
122
# File 'azure_disk_persistent_volume_props.rb', line 120

def fs_type
  @fs_type
end

#kindCDK8sPlus25::AzureDiskPersistentVolumeKind? (readonly)

Note:

Default: AzureDiskPersistentVolumeKind.SHARED

Kind of disk.



125
126
127
# File 'azure_disk_persistent_volume_props.rb', line 125

def kind
  @kind
end

#metadataCDK8s::APIObjectMetadata? (readonly)

Metadata that all persisted resources must have, which includes all objects users must create.

Returns:



55
56
57
# File 'azure_disk_persistent_volume_props.rb', line 55

def 
  @metadata
end

#mount_optionsArray<String>? (readonly)

Note:

Default: - No options.

A list of mount options, e.g. ["ro", "soft"]. Not validated - mount will simply fail if one is invalid.



75
76
77
# File 'azure_disk_persistent_volume_props.rb', line 75

def mount_options
  @mount_options
end

#read_onlyBoolean? (readonly)

Note:

Default: false

Force the ReadOnly setting in VolumeMounts.

Returns:

  • (Boolean, nil)


130
131
132
# File 'azure_disk_persistent_volume_props.rb', line 130

def read_only
  @read_only
end

#reclaim_policyCDK8sPlus25::PersistentVolumeReclaimPolicy? (readonly)

Note:

Default: PersistentVolumeReclaimPolicy.RETAIN

When a user is done with their volume, they can delete the PVC objects from the API that allows reclamation of the resource.

The reclaim policy tells the cluster what to do with the volume after it has been released of its claim.



84
85
86
# File 'azure_disk_persistent_volume_props.rb', line 84

def reclaim_policy
  @reclaim_policy
end

#storageCDK8s::Size? (readonly)

Note:

Default: - No specified.

What is the storage capacity of this volume.



90
91
92
# File 'azure_disk_persistent_volume_props.rb', line 90

def storage
  @storage
end

#storage_class_nameString? (readonly)

Note:

Default: - Volume does not belong to any storage class.

Name of StorageClass to which this persistent volume belongs.

Returns:

  • (String, nil)


95
96
97
# File 'azure_disk_persistent_volume_props.rb', line 95

def storage_class_name
  @storage_class_name
end

#volume_modeCDK8sPlus25::PersistentVolumeMode? (readonly)

Note:

Default: VolumeMode.FILE_SYSTEM

Defines what type of volume is required by the claim.



100
101
102
# File 'azure_disk_persistent_volume_props.rb', line 100

def volume_mode
  @volume_mode
end

Class Method Details

.jsii_propertiesObject



132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
# File 'azure_disk_persistent_volume_props.rb', line 132

def self.jsii_properties
  {
    :metadata => "metadata",
    :access_modes => "accessModes",
    :claim => "claim",
    :mount_options => "mountOptions",
    :reclaim_policy => "reclaimPolicy",
    :storage => "storage",
    :storage_class_name => "storageClassName",
    :volume_mode => "volumeMode",
    :disk_name => "diskName",
    :disk_uri => "diskUri",
    :caching_mode => "cachingMode",
    :fs_type => "fsType",
    :kind => "kind",
    :read_only => "readOnly",
  }
end

Instance Method Details

#to_jsiiObject



151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
# File 'azure_disk_persistent_volume_props.rb', line 151

def to_jsii
  result = {}
  result.merge!(super)
  result.merge!({
    "metadata" => @metadata,
    "accessModes" => @access_modes,
    "claim" => @claim,
    "mountOptions" => @mount_options,
    "reclaimPolicy" => @reclaim_policy,
    "storage" => @storage,
    "storageClassName" => @storage_class_name,
    "volumeMode" => @volume_mode,
    "diskName" => @disk_name,
    "diskUri" => @disk_uri,
    "cachingMode" => @caching_mode,
    "fsType" => @fs_type,
    "kind" => @kind,
    "readOnly" => @read_only,
  })
  result.compact
end