-
Notifications
You must be signed in to change notification settings - Fork 578
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
Add validation for GC tasks annotation #4485
Add validation for GC tasks annotation #4485
Conversation
/test ? |
@Ankitasw: The following commands are available to trigger required jobs:
The following commands are available to trigger optional jobs:
Use
In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/test pull-cluster-api-provider-aws-e2e-eks-gc |
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.
Also, I am not aware but does this require any changes in E2E GC tests as well? cc @richardcase
@richardcase since this is API change, shall we include this as part of v1beta3 changes? |
I think we can avoid introducing a breaking change if we move |
2ea9f5b
to
cf90cec
Compare
cf90cec
to
64ee831
Compare
exp/api/v1beta2/types.go
Outdated
@@ -25,11 +25,11 @@ import ( | |||
const ( | |||
// ExternalResourceGCAnnotation is the name of an annotation that indicates if | |||
// external resources should be garbage collected for the cluster. | |||
ExternalResourceGCAnnotation = "aws.cluster.x-k8s.io/external-resource-gc" | |||
ExternalResourceGCAnnotation = infrav1.ExternalResourceGCAnnotation |
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.
I think this would be duplication, either we keep these constants in exp/api/v1beta2, or in api/v1beta2
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.
Now these constants are in api/v1beta2
, but I kept them as duplicates in exp/api/v1beta2
to prevent a breaking change in the API. People who used the constants from exp
can continue to do so, but now the correct location is api/v1beta2
.
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.
We might need more opinions here
cc @richardcase @Skarlso @dlipovetsky
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.
It's OK not to duplicate it. If we remove it, make sure this gets into a minor release, though, because it might be a breaking change. Although, honestly, I doubt too many people call this from anywhere outside of CAPA.
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.
alright! I'll remove it from exp
completely since we don't consider it as a breaking change. for sure, it will make things simpler.
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.
Noice.
This is a follow-up to #4466 |
To prevent a breaking change we keep the constants in exp/api/v1beta2, and they will have the same values as ones in api/v1beta2
64ee831
to
22d1ea4
Compare
22d1ea4
to
fe3457d
Compare
I moved this validation code to a separate function. |
/lgtm @Ankitasw final word :) |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: Ankitasw 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 |
/cherry-pick release-2.2 |
@Ankitasw: #4485 failed to apply on top of branch "release-2.2":
In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
What type of PR is this?
/kind support
What this PR does / why we need it:
This PR adds validation for the GC config annotation.
Which issue(s) this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close the issue(s) when PR gets merged):Fixes #
Special notes for your reviewer:
As a part of this work 2 constants
ExternalResourceGCAnnotation
andExternalResourceGCTasksAnnotation
were moved fromexp/api/v1beta2
toapi/v1beta2
.Checklist:
Release note: