Skip to content

Commit acfd4ef

Browse files
committed
✨api: awscluster: allow best effort delete for s3 objects
This change introduces a new config option for `S3Bucket` to allow best effort delete for S3 objects. This is useful to not fail cluster installs when the user has policies in place that prevent object deletion.
1 parent 6afad25 commit acfd4ef

File tree

5 files changed

+18
-0
lines changed

5 files changed

+18
-0
lines changed

api/v1beta1/zz_generated.conversion.go

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

api/v1beta2/awscluster_types.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -300,6 +300,10 @@ type S3Bucket struct {
300300
// +kubebuilder:validation:MaxLength:=63
301301
// +kubebuilder:validation:Pattern=`^[a-z0-9][a-z0-9.-]{1,61}[a-z0-9]$`
302302
Name string `json:"name"`
303+
304+
// BestEffortDeleteObjects defines whether access/permission errors during object deletion should be ignored.
305+
// +optional
306+
BestEffortDeleteObjects *bool `json:"bestEffortDeleteObjects,omitempty"`
303307
}
304308

305309
// +kubebuilder:object:root=true

api/v1beta2/zz_generated.deepcopy.go

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

config/crd/bases/infrastructure.cluster.x-k8s.io_awsclusters.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1514,6 +1514,10 @@ spec:
15141514
(https://coreos.github.io/ignition/) for bootstrapping (requires
15151515
BootstrapFormatIgnition feature flag to be enabled).
15161516
properties:
1517+
bestEffortDeleteObjects:
1518+
description: BestEffortDeleteObjects defines whether access/permission
1519+
errors during object deletion should be ignored.
1520+
type: boolean
15171521
controlPlaneIAMInstanceProfile:
15181522
description: ControlPlaneIAMInstanceProfile is a name of the IAMInstanceProfile,
15191523
which will be allowed to read control-plane node bootstrap data

config/crd/bases/infrastructure.cluster.x-k8s.io_awsclustertemplates.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1140,6 +1140,10 @@ spec:
11401140
Ignition (https://coreos.github.io/ignition/) for bootstrapping
11411141
(requires BootstrapFormatIgnition feature flag to be enabled).
11421142
properties:
1143+
bestEffortDeleteObjects:
1144+
description: BestEffortDeleteObjects defines whether access/permission
1145+
errors during object deletion should be ignored.
1146+
type: boolean
11431147
controlPlaneIAMInstanceProfile:
11441148
description: ControlPlaneIAMInstanceProfile is a name
11451149
of the IAMInstanceProfile, which will be allowed to

0 commit comments

Comments
 (0)