Class DataDisk
- java.lang.Object
-
- io.fabric8.openshift.api.model.machine.v1beta1.DataDisk
-
- All Implemented Interfaces:
io.fabric8.kubernetes.api.builder.Editable<DataDiskBuilder>,io.fabric8.kubernetes.api.model.KubernetesResource,Serializable
@Generated("io.fabric8.kubernetes.schema.generator.model.ModelGenerator") public class DataDisk extends Object implements io.fabric8.kubernetes.api.builder.Editable<DataDiskBuilder>, io.fabric8.kubernetes.api.model.KubernetesResource
DataDisk specifies the parameters that are used to add one or more data disks to the machine. A Data Disk is a managed disk that's attached to a virtual machine to store application data. It differs from an OS Disk as it doesn't come with a pre-installed OS, and it cannot contain the boot volume. It is registered as SCSI drive and labeled with the chosen `lun`. e.g. for `lun: 0` the raw disk device will be available at `/dev/disk/azure/scsi1/lun0`.As the Data Disk disk device is attached raw to the virtual machine, it will need to be partitioned, formatted with a filesystem and mounted, in order for it to be usable. This can be done by creating a custom userdata Secret with custom Ignition configuration to achieve the desired initialization. At this stage the previously defined `lun` is to be used as the "device" key for referencing the raw disk device to be initialized. Once the custom userdata Secret has been created, it can be referenced in the Machine's `.providerSpec.userDataSecret`. For further guidance and examples, please refer to the official OpenShift docs.
- See Also:
- Serialized Form
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DataDiskBuilderedit()Map<String,Object>getAdditionalProperties()StringgetCachingType()cachingType specifies the caching requirements.StringgetDeletionPolicy()deletionPolicy specifies the data disk deletion policy upon Machine deletion.IntegergetDiskSizeGB()diskSizeGB is the size in GB to assign to the data disk.IntegergetLun()lun Specifies the logical unit number of the data disk.DataDiskManagedDiskParametersgetManagedDisk()DataDisk specifies the parameters that are used to add one or more data disks to the machine.StringgetNameSuffix()nameSuffix is the suffix to be appended to the machine name to generate the disk name.voidsetAdditionalProperties(Map<String,Object> additionalProperties)voidsetAdditionalProperty(String name, Object value)voidsetCachingType(String cachingType)cachingType specifies the caching requirements.voidsetDeletionPolicy(String deletionPolicy)deletionPolicy specifies the data disk deletion policy upon Machine deletion.voidsetDiskSizeGB(Integer diskSizeGB)diskSizeGB is the size in GB to assign to the data disk.voidsetLun(Integer lun)lun Specifies the logical unit number of the data disk.voidsetManagedDisk(DataDiskManagedDiskParameters managedDisk)DataDisk specifies the parameters that are used to add one or more data disks to the machine.voidsetNameSuffix(String nameSuffix)nameSuffix is the suffix to be appended to the machine name to generate the disk name.DataDiskBuildertoBuilder()
-
-
-
Method Detail
-
getCachingType
public String getCachingType()
cachingType specifies the caching requirements. Empty value means no opinion and the platform chooses a default, which is subject to change over time. Currently the default is CachingTypeNone.
-
setCachingType
public void setCachingType(String cachingType)
cachingType specifies the caching requirements. Empty value means no opinion and the platform chooses a default, which is subject to change over time. Currently the default is CachingTypeNone.
-
getDeletionPolicy
public String getDeletionPolicy()
deletionPolicy specifies the data disk deletion policy upon Machine deletion. Possible values are "Delete","Detach". When "Delete" is used the data disk is deleted when the Machine is deleted. When "Detach" is used the data disk is detached from the Machine and retained when the Machine is deleted.
-
setDeletionPolicy
public void setDeletionPolicy(String deletionPolicy)
deletionPolicy specifies the data disk deletion policy upon Machine deletion. Possible values are "Delete","Detach". When "Delete" is used the data disk is deleted when the Machine is deleted. When "Detach" is used the data disk is detached from the Machine and retained when the Machine is deleted.
-
getDiskSizeGB
public Integer getDiskSizeGB()
diskSizeGB is the size in GB to assign to the data disk.
-
setDiskSizeGB
public void setDiskSizeGB(Integer diskSizeGB)
diskSizeGB is the size in GB to assign to the data disk.
-
getLun
public Integer getLun()
lun Specifies the logical unit number of the data disk. This value is used to identify data disks within the VM and therefore must be unique for each data disk attached to a VM. This value is also needed for referencing the data disks devices within userdata to perform disk initialization through Ignition (e.g. partition/format/mount). The value must be between 0 and 63.
-
setLun
public void setLun(Integer lun)
lun Specifies the logical unit number of the data disk. This value is used to identify data disks within the VM and therefore must be unique for each data disk attached to a VM. This value is also needed for referencing the data disks devices within userdata to perform disk initialization through Ignition (e.g. partition/format/mount). The value must be between 0 and 63.
-
getManagedDisk
public DataDiskManagedDiskParameters getManagedDisk()
DataDisk specifies the parameters that are used to add one or more data disks to the machine. A Data Disk is a managed disk that's attached to a virtual machine to store application data. It differs from an OS Disk as it doesn't come with a pre-installed OS, and it cannot contain the boot volume. It is registered as SCSI drive and labeled with the chosen `lun`. e.g. for `lun: 0` the raw disk device will be available at `/dev/disk/azure/scsi1/lun0`.As the Data Disk disk device is attached raw to the virtual machine, it will need to be partitioned, formatted with a filesystem and mounted, in order for it to be usable. This can be done by creating a custom userdata Secret with custom Ignition configuration to achieve the desired initialization. At this stage the previously defined `lun` is to be used as the "device" key for referencing the raw disk device to be initialized. Once the custom userdata Secret has been created, it can be referenced in the Machine's `.providerSpec.userDataSecret`. For further guidance and examples, please refer to the official OpenShift docs.
-
setManagedDisk
public void setManagedDisk(DataDiskManagedDiskParameters managedDisk)
DataDisk specifies the parameters that are used to add one or more data disks to the machine. A Data Disk is a managed disk that's attached to a virtual machine to store application data. It differs from an OS Disk as it doesn't come with a pre-installed OS, and it cannot contain the boot volume. It is registered as SCSI drive and labeled with the chosen `lun`. e.g. for `lun: 0` the raw disk device will be available at `/dev/disk/azure/scsi1/lun0`.As the Data Disk disk device is attached raw to the virtual machine, it will need to be partitioned, formatted with a filesystem and mounted, in order for it to be usable. This can be done by creating a custom userdata Secret with custom Ignition configuration to achieve the desired initialization. At this stage the previously defined `lun` is to be used as the "device" key for referencing the raw disk device to be initialized. Once the custom userdata Secret has been created, it can be referenced in the Machine's `.providerSpec.userDataSecret`. For further guidance and examples, please refer to the official OpenShift docs.
-
getNameSuffix
public String getNameSuffix()
nameSuffix is the suffix to be appended to the machine name to generate the disk name. Each disk name will be in format <machineName>_<nameSuffix>. NameSuffix name must start and finish with an alphanumeric character and can only contain letters, numbers, underscores, periods or hyphens. The overall disk name must not exceed 80 chars in length.
-
setNameSuffix
public void setNameSuffix(String nameSuffix)
nameSuffix is the suffix to be appended to the machine name to generate the disk name. Each disk name will be in format <machineName>_<nameSuffix>. NameSuffix name must start and finish with an alphanumeric character and can only contain letters, numbers, underscores, periods or hyphens. The overall disk name must not exceed 80 chars in length.
-
edit
public DataDiskBuilder edit()
- Specified by:
editin interfaceio.fabric8.kubernetes.api.builder.Editable<DataDiskBuilder>
-
toBuilder
public DataDiskBuilder toBuilder()
-
-