Add new AzureDisk API, but not implementation.
This commit is contained in:
@@ -239,7 +239,11 @@ func SetDefaults_ISCSIVolumeSource(obj *ISCSIVolumeSource) {
|
||||
func SetDefaults_AzureDiskVolumeSource(obj *AzureDiskVolumeSource) {
|
||||
if obj.CachingMode == nil {
|
||||
obj.CachingMode = new(AzureDataDiskCachingMode)
|
||||
*obj.CachingMode = AzureDataDiskCachingNone
|
||||
*obj.CachingMode = AzureDataDiskCachingReadWrite
|
||||
}
|
||||
if obj.Kind == nil {
|
||||
obj.Kind = new(AzureDataDiskKind)
|
||||
*obj.Kind = AzureSharedBlobDisk
|
||||
}
|
||||
if obj.FSType == nil {
|
||||
obj.FSType = new(string)
|
||||
|
@@ -1124,11 +1124,16 @@ type PhotonPersistentDiskVolumeSource struct {
|
||||
}
|
||||
|
||||
type AzureDataDiskCachingMode string
|
||||
type AzureDataDiskKind string
|
||||
|
||||
const (
|
||||
AzureDataDiskCachingNone AzureDataDiskCachingMode = "None"
|
||||
AzureDataDiskCachingReadOnly AzureDataDiskCachingMode = "ReadOnly"
|
||||
AzureDataDiskCachingReadWrite AzureDataDiskCachingMode = "ReadWrite"
|
||||
|
||||
AzureSharedBlobDisk AzureDataDiskKind = "Shared"
|
||||
AzureDedicatedBlobDisk AzureDataDiskKind = "Dedicated"
|
||||
AzureManagedDisk AzureDataDiskKind = "Managed"
|
||||
)
|
||||
|
||||
// AzureDisk represents an Azure Data Disk mount on the host and bind mount to the pod.
|
||||
@@ -1149,6 +1154,8 @@ type AzureDiskVolumeSource struct {
|
||||
// the ReadOnly setting in VolumeMounts.
|
||||
// +optional
|
||||
ReadOnly *bool `json:"readOnly,omitempty" protobuf:"varint,5,opt,name=readOnly"`
|
||||
// Expected values Shared: mulitple 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
|
||||
Kind *AzureDataDiskKind `json:"kind,omitempty" protobuf:"bytes,6,opt,name=kind,casttype=AzureDataDiskKind"`
|
||||
}
|
||||
|
||||
// PortworxVolumeSource represents a Portworx volume resource.
|
||||
|
Reference in New Issue
Block a user