Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 17 additions & 1 deletion api/storage/v1alpha1/volume_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,16 @@ type VolumeAccess struct {
VolumeAttributes map[string]string `json:"volumeAttributes,omitempty"`
}

// ReclaimPolicy for a Volume tells what to do with the volume after its managing resource has been deleted
type ReclaimPolicy string

const (
// The Volume resource is not deleted after the managing resource has been deleted
Retain ReclaimPolicy = "Retain"
// The Volume resource is garbage-collected when the managing resource has been deleted
Delete ReclaimPolicy = "Delete"
)

// VolumeStatus defines the observed state of Volume
type VolumeStatus struct {
// State represents the infrastructure state of a Volume.
Expand Down Expand Up @@ -123,8 +133,14 @@ type VolumeList struct {
Items []Volume `json:"items"`
}

type EphemeralVolumeSpec struct {
VolumeSpec `json:",inline"`
// ReclaimPolicy defines the strategy for the corresponding volume resource after its managing resource has been deleted
ReclaimPolicy ReclaimPolicy `json:"reclaimpolicy,omitempty"`
}

// VolumeTemplateSpec is the specification of a Volume template.
type VolumeTemplateSpec struct {
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec VolumeSpec `json:"spec,omitempty"`
Spec EphemeralVolumeSpec `json:"spec,omitempty"`
}
17 changes: 17 additions & 0 deletions api/storage/v1alpha1/zz_generated.deepcopy.go

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

45 changes: 44 additions & 1 deletion client-go/applyconfigurations/internal/internal.go

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

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

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

2 changes: 2 additions & 0 deletions client-go/applyconfigurations/utils.go

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

1 change: 1 addition & 0 deletions client-go/openapi/api_violations.report
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ API rule violation: names_match,github.com/ironcore-dev/ironcore/api/networking/
API rule violation: names_match,github.com/ironcore-dev/ironcore/api/networking/v1alpha1,NetworkInterfaceSpec,IPs
API rule violation: names_match,github.com/ironcore-dev/ironcore/api/networking/v1alpha1,NetworkInterfaceStatus,IPs
API rule violation: names_match,github.com/ironcore-dev/ironcore/api/networking/v1alpha1,NetworkSpec,PeeringClaimRefs
API rule violation: names_match,github.com/ironcore-dev/ironcore/api/storage/v1alpha1,EphemeralVolumeSpec,ReclaimPolicy
API rule violation: names_match,k8s.io/api/core/v1,AzureDiskVolumeSource,DataDiskURI
API rule violation: names_match,k8s.io/api/core/v1,ContainerStatus,LastTerminationState
API rule violation: names_match,k8s.io/api/core/v1,DaemonEndpoint,Port
Expand Down
Loading
Loading