-
Notifications
You must be signed in to change notification settings - Fork 579
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
🌱 Tag S3 bucket as owned by cluster #4518
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One question, rest LGTM
ClusterName: s.scope.Name(), | ||
Lifecycle: infrav1.ResourceLifecycleOwned, | ||
Name: nil, | ||
Role: aws.String("node"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this a common role?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe I misunderstand the question. Do you mean to rather use "common"
(CommonRoleTagValue
) as we do for VPC, gateways and such? I used "node"
because the bucket seems only used for bootstrapping purposes and therefore relates to nodes, similar to how ASGs are tagged, for example.
/retitle 🌱 Tag S3 bucket as owned by cluster |
/retest |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: vincepri The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
What type of PR is this?
/kind feature
What this PR does / why we need it:
I noticed that the S3 bucket isn't tagged. Some companies use AWS tags for grouping resources, calculating costs, or to clean up accidental remainders of clusters that CAPI/CAPA couldn't delete after a misconfiguration. With this change, the bucket is tagged as belonging to the cluster.
I'm not entirely sure if there's a use case where people provide a shared S3 bucket. In the S3 service code, there's such a hint in a
TODO
. For that case, we would need to introduceAWSCluster.spec.s3Bucket.additionalTags
where users can setsigs.k8s.io/cluster-api-provider-aws/cluster/...=shared
. And the implementation should be changed to only upsert tags instead of overwriting them, given that multipleAWSCluster
objects could reconcile the same bucket. Let me know if that's a supported use case.Which issue(s) this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close the issue(s) when PR gets merged):n/a
Checklist:
Release note: