Skip to content

Commit

Permalink
Merge pull request #1149 from damdo/machine-azure-data-disks-deletion…
Browse files Browse the repository at this point in the history
…-policy

machine: azureprovider: data disk: add deletion policy
  • Loading branch information
openshift-merge-robot authored Mar 24, 2022
2 parents c20887a + 554f2f7 commit 3d6a78a
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 6 deletions.
18 changes: 18 additions & 0 deletions machine/v1beta1/types_azureprovider.go
Original file line number Diff line number Diff line change
Expand Up @@ -282,8 +282,26 @@ type DataDisk struct {
// +optional
// +kubebuilder:validation:Enum=None;ReadOnly;ReadWrite
CachingType CachingTypeOption `json:"cachingType,omitempty"`
// 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.
// +kubebuilder:validation:Enum=Delete;Detach
// +kubebuilder:validation:Required
DeletionPolicy DiskDeletionPolicyType `json:"deletionPolicy"`
}

// DiskDeletionPolicyType defines the possible values for DeletionPolicy.
type DiskDeletionPolicyType string

// These are the valid DiskDeletionPolicyType values.
const (
// DiskDeletionPolicyTypeDelete means the DiskDeletionPolicyType is "Delete".
DiskDeletionPolicyTypeDelete DiskDeletionPolicyType = "Delete"
// DiskDeletionPolicyTypeDetach means the DiskDeletionPolicyType is "Detach".
DiskDeletionPolicyTypeDetach DiskDeletionPolicyType = "Detach"
)

// CachingTypeOption defines the different values for a CachingType.
type CachingTypeOption string

Expand Down
13 changes: 7 additions & 6 deletions machine/v1beta1/zz_generated.swagger_doc_generated.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 3d6a78a

Please sign in to comment.