cloud-provider-openstack icon indicating copy to clipboard operation
cloud-provider-openstack copied to clipboard

[occm] Allow changing cluster-name on existing deployments

Open dulek opened this issue 1 year ago • 4 comments

What this PR does / why we need it: It's a common issue that clusters are deployed with the default --cluster-name=kubernetes and later on it's discovered that next deployments on the same cloud will have conflicts when trying to manage LBs of the same namespace and name.

This commit aims at allowing to change the cluster-name on a running environment and handling all the renames of the LB resources and their tags.

Which issue this PR fixes(if applicable): fixes #

Special notes for reviewers:

Release note:

It's now allowed to change the `--cluster-name` on existing deployments and OCCM will handle all the LB renames.

dulek avatar Feb 16 '24 12:02 dulek

This is a WiP, definitely needs unit tests and some more manual testing from me.

dulek avatar Feb 16 '24 12:02 dulek

It's a common issue that clusters are deployed with the default --cluster-name=kubernetes and later on it's discovered that next deployments on the same cloud will have conflicts when trying to manage LBs of the same namespace and name.

I remember it's been discussed multiple times before (with --cluster-name=kubernetes) at that time seems the conclusion is related to cloud provider itself or I might remember wrong thing but I think it's worthy to open an issue to have some discussion there to get agreement on the goal and fix proposal..

jichenjc avatar Mar 04 '24 07:03 jichenjc

@jichenjc: I dug out #2241 and added it to this PR. Citing @zetaab from there:

the problem is that quite many cluster still uses default clusterName which is kubernetes. It is also difficult to migrate away from it.

This is what the PR proposes - to make it easier to migrate away from a wrong clusterName.

dulek avatar Mar 05 '24 18:03 dulek

PR needs rebase.

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.

k8s-ci-robot avatar Mar 19 '24 17:03 k8s-ci-robot

Hey, @stephenfin, could you take a preliminary look?

dulek avatar Apr 03 '24 15:04 dulek

And you @gryf.

dulek avatar Apr 03 '24 15:04 dulek

Alright, I tested this through and through, it's safe.

dulek avatar Apr 05 '24 12:04 dulek

Nice work. The logic looks good as does the structure. No complaints from my end.

/approve

stephenfin avatar Apr 05 '24 16:04 stephenfin

Looks good from my side as well. Good job, @dulek!

gryf avatar Apr 05 '24 18:04 gryf

/lgtm

...is what I meant :sweat_smile:

stephenfin avatar Apr 08 '24 14:04 stephenfin

/approve

I think @zetaab you approved this :) will read this later and input if I have more time

jichenjc avatar Apr 08 '24 14:04 jichenjc

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jichenjc, stephenfin

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 Apr 08 '24 14:04 k8s-ci-robot

/cherry-pick release-1.29

We'd like this to be backported to 1.29 as a bugfix. I'd like to hear opinions if that's feasible.

dulek avatar Apr 08 '24 14:04 dulek

@dulek: new pull request created: #2568

In response to this:

/cherry-pick release-1.29

We'd like this to be backported to 1.29 as a bugfix. I'd like to hear opinions if that's feasible.

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.