-
Notifications
You must be signed in to change notification settings - Fork 1.4k
OCPBUGS-60162: reject byo vpc/subnets with CAPI owned cluster tag #9913
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
base: main
Are you sure you want to change the base?
Conversation
This commit adds an additional check for CAPI owned cluster tag sigs.k8s.io/cluster-api-provider-aws/cluster/<id>:owned. Since the destroy code is also searching for this tag to clean up cluster resources[1], it is reasonable to safe-guard against this case. The tag search order is: 1. kubernetes.io/cluster/<id>:owned 2. sigs.k8s.io/cluster-api-provider-aws/cluster/<id>:owned References: - https://github.com/openshift/installer/blob/d0aabcc2a97cc8d383d6dd957169ca6713be94af/pkg/asset/cluster/aws/aws.go#L30-L32
@tthvo: This pull request references Jira Issue OCPBUGS-60162, which is valid. The bug has been moved to the POST state. 3 validation(s) were run on this bug
No GitHub users were found matching the public email listed for the QA contact in Jira ([email protected]), skipping review request. The bug has been updated to refer to the pull request using the external bug tracker. 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 openshift-eng/jira-lifecycle-plugin repository. |
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/cc @yunjiang29 |
@tthvo: This pull request references Jira Issue OCPBUGS-60162, which is valid. 3 validation(s) were run on this bug
No GitHub users were found matching the public email listed for the QA contact in Jira ([email protected]), skipping review request. 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 openshift-eng/jira-lifecycle-plugin repository. |
@tthvo: The following tests failed, say
Full PR test history. Your PR dashboard. 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-sigs/prow repository. I understand the commands that are listed here. |
This adds an additional check for CAPI owned cluster tag
sigs.k8s.io/cluster-api-provider-aws/cluster/<id>:owned
.Since the destroy code is also searching for this tag to clean up cluster resources, it is reasonable to safe-guard against this case.
References (
metadata.json
)installer/pkg/asset/cluster/aws/aws.go
Lines 30 to 32 in d0aabcc
Notes
It seems unlikely that a vpc/subnet has a tag
sigs.k8s.io/cluster-api-provider-aws/cluster/<id>:owned
but doesn't have the correspondingkubernetes.io/cluster/<id>:owned
tag... 💭But "unlikely" does not mean it won't happen and the destroy code is also searching that CAPA tag. So, I thought we could just add this additional check.
The tag search order is:
kubernetes.io/cluster/<id>:owned
sigs.k8s.io/cluster-api-provider-aws/cluster/<id>:owned
if none is found in 1.