Class: CDK8sPlus25::K8S::FlexVolumeSource
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- CDK8sPlus25::K8S::FlexVolumeSource
- Defined in:
- k8_s/flex_volume_source.rb
Overview
FlexVolume represents a generic volume resource that is provisioned/attached using an exec based plugin.
Instance Attribute Summary collapse
-
#driver ⇒ String
readonly
driver is the name of the driver to use for this volume.
-
#fs_type ⇒ String?
readonly
fsType is the filesystem type to mount.
-
#options ⇒ Hash{String => String}?
readonly
options is Optional: this field holds extra command options if any.
-
#read_only ⇒ Boolean?
readonly
readOnly is Optional: defaults to false (read/write).
-
#secret_ref ⇒ CDK8sPlus25::K8S::LocalObjectReference?
readonly
secretRef is Optional: secretRef is reference to the secret object containing sensitive information to pass to the plugin scripts.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(driver:, fs_type: nil, options: nil, read_only: nil, secret_ref: nil) ⇒ FlexVolumeSource
constructor
A new instance of FlexVolumeSource.
- #to_jsii ⇒ Object
Constructor Details
#initialize(driver:, fs_type: nil, options: nil, read_only: nil, secret_ref: nil) ⇒ FlexVolumeSource
Returns a new instance of FlexVolumeSource.
12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'k8_s/flex_volume_source.rb', line 12 def initialize(driver:, fs_type: nil, options: nil, read_only: nil, secret_ref: nil) @driver = driver Jsii::Type.check_type(@driver, "eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==", "driver") @fs_type = fs_type Jsii::Type.check_type(@fs_type, "eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==", "fsType") unless @fs_type.nil? @options = Jsii::Type.check_type(@options, "eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoibWFwIn19", "options") unless @options.nil? @read_only = read_only Jsii::Type.check_type(@read_only, "eyJwcmltaXRpdmUiOiJib29sZWFuIn0=", "readOnly") unless @read_only.nil? @secret_ref = secret_ref.is_a?(Hash) ? ::CDK8sPlus25::K8S::LocalObjectReference.new(**secret_ref.transform_keys(&:to_sym)) : secret_ref Jsii::Type.check_type(@secret_ref, "eyJmcW4iOiJjZGs4cy1wbHVzLTI1Lms4cy5Mb2NhbE9iamVjdFJlZmVyZW5jZSJ9", "secretRef") unless @secret_ref.nil? end |
Instance Attribute Details
#driver ⇒ String (readonly)
driver is the name of the driver to use for this volume.
28 29 30 |
# File 'k8_s/flex_volume_source.rb', line 28 def driver @driver end |
#fs_type ⇒ String? (readonly)
fsType is the filesystem type to mount.
Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". The default filesystem depends on FlexVolume script.
34 35 36 |
# File 'k8_s/flex_volume_source.rb', line 34 def fs_type @fs_type end |
#options ⇒ Hash{String => String}? (readonly)
options is Optional: this field holds extra command options if any.
38 39 40 |
# File 'k8_s/flex_volume_source.rb', line 38 def @options end |
#read_only ⇒ Boolean? (readonly)
readOnly is Optional: defaults to false (read/write).
ReadOnly here will force the ReadOnly setting in VolumeMounts.
44 45 46 |
# File 'k8_s/flex_volume_source.rb', line 44 def read_only @read_only end |
#secret_ref ⇒ CDK8sPlus25::K8S::LocalObjectReference? (readonly)
secretRef is Optional: secretRef is reference to the secret object containing sensitive information to pass to the plugin scripts.
This may be empty if no secret object is specified. If the secret object contains more than one secret, all secrets are passed to the plugin scripts.
50 51 52 |
# File 'k8_s/flex_volume_source.rb', line 50 def secret_ref @secret_ref end |
Class Method Details
.jsii_properties ⇒ Object
52 53 54 55 56 57 58 59 60 |
# File 'k8_s/flex_volume_source.rb', line 52 def self.jsii_properties { :driver => "driver", :fs_type => "fsType", :options => "options", :read_only => "readOnly", :secret_ref => "secretRef", } end |
Instance Method Details
#to_jsii ⇒ Object
62 63 64 65 66 67 68 69 70 71 72 |
# File 'k8_s/flex_volume_source.rb', line 62 def to_jsii result = {} result.merge!({ "driver" => @driver, "fsType" => @fs_type, "options" => @options, "readOnly" => @read_only, "secretRef" => @secret_ref, }) result.compact end |