Skip to content

Commit

Permalink
changes for introduce a reclaim policy for ephemerally created Volume…
Browse files Browse the repository at this point in the history
… resources
  • Loading branch information
ushabelgur committed Nov 14, 2024
1 parent 6a612a0 commit 987deb1
Show file tree
Hide file tree
Showing 16 changed files with 500 additions and 28 deletions.
18 changes: 17 additions & 1 deletion api/storage/v1alpha1/volume_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,24 @@ type VolumeList struct {
Items []Volume `json:"items"`
}

// 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"
)

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.

122 changes: 122 additions & 0 deletions client-go/applyconfigurations/storage/v1alpha1/ephemeralvolumespec.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.

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

0 comments on commit 987deb1

Please sign in to comment.