cluster-api-provider-azure icon indicating copy to clipboard operation
cluster-api-provider-azure copied to clipboard

Set cluster name label for pre-existing kubeconfig

Open willie-yao opened this issue 9 months ago • 2 comments

What type of PR is this? /kind bug

What this PR does / why we need it: This PR adds a fix for clusters upgrading from before CAPI v1.5 to a newer version. v1.5 introduced a new requirement for the ClusterNameLabel to be added to kubeconfig secrets: https://cluster-api.sigs.k8s.io/developer/providers/migrations/v1.4-to-v1.5#other

CAPZ handles this for newly created kubeconfigs, but not pre-existing ones. This PR handles that 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): Fixes #4738

Special notes for your reviewer:

  • [x] cherry-pick candidate

TODOs:

  • [ ] squashed commits
  • [ ] includes documentation
  • [ ] adds unit tests

Release note:

Set cluster name label for pre-existing kubeconfig

willie-yao avatar May 10 '24 23:05 willie-yao

Codecov Report

Attention: Patch coverage is 0% with 4 lines in your changes are missing coverage. Please review.

Project coverage is 62.00%. Comparing base (abba169) to head (d4fda95). Report is 81 commits behind head on main.

Files Patch % Lines
controllers/azuremanagedcontrolplane_reconciler.go 0.00% 3 Missing and 1 partial :warning:
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4833      +/-   ##
==========================================
- Coverage   62.62%   62.00%   -0.62%     
==========================================
  Files         198      201       +3     
  Lines       16285    16862     +577     
==========================================
+ Hits        10198    10455     +257     
- Misses       5341     5624     +283     
- Partials      746      783      +37     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar May 10 '24 23:05 codecov[bot]

LGTM label has been added.

Git tree hash: f4336d27f3e9b7e28ed8afe42711456917398031

k8s-ci-robot avatar May 14 '24 14:05 k8s-ci-robot

/assign @nojnhuh

mboersma avatar May 14 '24 14:05 mboersma

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: nojnhuh

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 /approve in a comment Approvers can cancel approval by writing /approve cancel in a comment

k8s-ci-robot avatar May 14 '24 17:05 k8s-ci-robot

/cherry-pick release-1.14

willie-yao avatar May 14 '24 20:05 willie-yao

/cherry-pick release-1.13

willie-yao avatar May 14 '24 20:05 willie-yao

@willie-yao: new pull request created: #4846

In response to this:

/cherry-pick release-1.14

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.

@willie-yao: new pull request created: #4847

In response to this:

/cherry-pick release-1.13

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.

/cherry-pick release-1.15

willie-yao avatar May 14 '24 20:05 willie-yao

@willie-yao: new pull request created: #4848

In response to this:

/cherry-pick release-1.15

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.