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
HOSTEDCP-1232: Add clusterName label to CAPI kubeconfig secret #3087
Conversation
@muraee: This pull request references HOSTEDCP-1232 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the task to target the "4.15.0" version, but no target version was set. 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. |
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
Thanks
/test e2e-aws |
control-plane-operator/controllers/hostedcontrolplane/kas/kubeconfig.go
Outdated
Show resolved
Hide resolved
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: enxebre, muraee 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 |
@muraee: all tests passed! 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/test-infra repository. I understand the commands that are listed here. |
What this PR does / why we need it:
Starting from v1.5, CAPI uses a cached client to retrieve the kubeconfig secret. However, only secrets with the clusterName label
cluster.x-k8s.io/cluster-name
are cached, see:https://github.com/kubernetes-sigs/cluster-api/pull/8940/files#diff-8bdee7925f4d1adc50383754391472636156a2a857a7c76290f6073c8d83f5cdR216
This PR ensures we can consume CAPI v1.5+, by adding the required label to the kubeconfig secret generated for CAPI.
Which issue(s) this PR fixes (optional, use
fixes #<issue_number>(, fixes #<issue_number>, ...)
format, where issue_number might be a GitHub issue, or a Jira story:Fixes #HOSTEDCP-1232
Checklist