aws-controllers-k8s / community

AWS Controllers for Kubernetes (ACK) is a project enabling you to manage AWS services from Kubernetes
https://aws-controllers-k8s.github.io/community/
Apache License 2.0
2.43k stars 256 forks source link

[S3] Configuration of default object lock settings #1573

Open aljoshare opened 1 year ago

aljoshare commented 1 year ago

Is your feature request related to a problem?

Currently, the S3 operator only supports to enable/disable the object lock for new objects but it doesn't allow to customize the object lock configuration (e.g. the default retention or the default retention mode).

image

Describe the solution you'd like

As a user I would like to be able to customize the default object lock configuration (e.g. set the default retention or the default retention mode) similar to the AWS console:

image

The Terraform provider: https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/s3_bucket_object_lock_configuration#default_retention).

The AWS CLI: https://awscli.amazonaws.com/v2/documentation/api/latest/reference/s3api/put-object-lock-configuration.html

I would love to see something similar to this:

objectLock:
  enabled: true 
  default:
   retention: 1d // or e.g. 1y
   mode: governance // or compliance

I discussed the topic in Slack and @A-Hilaly suggested that it could be solved by using https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObjectLockConfiguration.html.

Describe alternatives you've considered None

Thank you very much! :heart:

jaypipes commented 1 year ago

I wonder why there is a "Disable" option in the AWS Console since it's pretty clear that once you enable Object Lock, you cannot disable it....

jaypipes commented 1 year ago

This is doable, but the whole "cannot disable once enabled" thing will need to be custom coded...

ack-bot commented 1 year ago

Issues go stale after 90d of inactivity. Mark the issue as fresh with /remove-lifecycle stale. Stale issues rot after an additional 30d of inactivity and eventually close. If this issue is safe to close now please do so with /close. Provide feedback via https://github.com/aws-controllers-k8s/community. /lifecycle stale

aljoshare commented 1 year ago

/remove-lifecycle stale

ack-bot commented 1 year ago

Issues go stale after 90d of inactivity. Mark the issue as fresh with /remove-lifecycle stale. Stale issues rot after an additional 30d of inactivity and eventually close. If this issue is safe to close now please do so with /close. Provide feedback via https://github.com/aws-controllers-k8s/community. /lifecycle stale

ack-bot commented 1 year ago

Stale issues rot after 30d of inactivity. Mark the issue as fresh with /remove-lifecycle rotten. Rotten issues close after an additional 30d of inactivity. If this issue is safe to close now please do so with /close. Provide feedback via https://github.com/aws-controllers-k8s/community. /lifecycle rotten

ack-bot commented 10 months ago

Issues go stale after 180d of inactivity. Mark the issue as fresh with /remove-lifecycle stale. Stale issues rot after an additional 60d of inactivity and eventually close. If this issue is safe to close now please do so with /close. Provide feedback via https://github.com/aws-controllers-k8s/community. /lifecycle stale

ack-bot commented 8 months ago

Stale issues rot after 60d of inactivity. Mark the issue as fresh with /remove-lifecycle rotten. Rotten issues close after an additional 60d of inactivity. If this issue is safe to close now please do so with /close. Provide feedback via https://github.com/aws-controllers-k8s/community. /lifecycle rotten

gecube commented 8 months ago

/remove-lifecycle rotten

ack-bot commented 2 months ago

Issues go stale after 180d of inactivity. Mark the issue as fresh with /remove-lifecycle stale. Stale issues rot after an additional 60d of inactivity and eventually close. If this issue is safe to close now please do so with /close. Provide feedback via https://github.com/aws-controllers-k8s/community. /lifecycle stale

gecube commented 2 months ago

/remove-lifecycle stale