-
Notifications
You must be signed in to change notification settings - Fork 280
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
Allow deprecated beta topology labels to be applied for those not ready to migrate #3685
Allow deprecated beta topology labels to be applied for those not ready to migrate #3685
Conversation
✅ Deploy Preview for kubernetes-sigs-cloud-provide-azure canceled.
|
/retest |
// DeprecatedApplyBetaTopologyLabels indicates whether the node should apply beta topology labels. | ||
// If true, the node will apply beta topology labels. | ||
// DEPRECATED: This flag will be removed in a future release. | ||
DeprecatedApplyBetaTopologyLabels bool |
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 don't think we should change the behavior for the versions that have already been released, it may break some existing v1.26+ clusters.
Could we change this to something like "EnableDepecatedBetaTopologyLabels" and default it to false?
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 don't think we should change the behavior for the versions that have already been released, it may break some existing v1.26+ clusters.
Agreed. The current behaviour is that the behaviour stays the same as master now, unless you opt in, ie the flag defaults to false and we only apply the labels when the flag is explicitly specified
Could we change this to something like "EnableDepecatedBetaTopologyLabels" and default it to false?
I can go through and rename everything, sure
} | ||
|
||
return nodeModifiers, nil | ||
} | ||
|
||
// addCloudNodeLabel creates a nodeModifier that adds a label to a node. | ||
func addCloudNodeLabel(key, value string) func(*v1.Node) { |
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.
Thanks for the refactoring, it looks much better!
ab4089e
to
5416552
Compare
Renamed as suggested, and as per my comment, this is off by default to persist 1.26 behaviour anyway, so should be good to go if we are happy with the new naming |
/retest @feiskyer Are you happy with the new naming? Any further feedback or can we get this merged? |
Can the user who wants to use these labels continue using the old versions of cloud provider azure, and change their app behavior before upgrading to the newer version? |
The kubernetes has decided to deprecate these labels so I think it would be better if we keep aligned with the kubernetes upstream. By the way, if we want to merge this, don't forget to squash the commits. |
IMO this is undesirable since it blocks users from upgrading. Imagine I am running a platform for my large company, I want to keep Kubernetes up to date so need the latest CCM. I have 1000s of developers running applications on there, it will likely take some time to get all of their applications migrated.
Other providers that use the core logic still sync beta to stable, they have deprecated the label but are far from removing the sync logic from their providers as far as I understand, Azure is way ahead here in this regard. I had kept the commits as separate logical commits but can squash, (or maybe tide can?) if you prefer it that way, LMK |
@nilo19 Would you like me to squash this so we can merge? Or can we use the tide squash method? |
@nilo19 any further comments? Hoping to get this merged soon |
@JoelSpeed sorry for the delay. Could you squash the commits? |
…dy to migrate This reverts commit 67c2407. It then introduces a new flag to allow users to opt-in to syncing older, beta topology labels based on the presence of the GA topolgoy labels.
5416552
to
dba7928
Compare
Sure, just pushed a squashed commit and rebased on the latest master |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: feiskyer, JoelSpeed 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 |
/retest |
/cherrypick release-1.26 |
/cherrypick release-1.27 |
@nilo19: new pull request created: #4040 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. |
@nilo19: new pull request created: #4041 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. |
…e-manager, not cloud-controller-manager gardener#716 added the flag to cloud-controller-manager. This fails with: ``` Error: unknown flag: --deprecated-apply-beta-topology-labels ``` The flag is supported for cloud-node-manager. See kubernetes-sigs/cloud-provider-azure#3685.
…e-manager, not cloud-controller-manager gardener#716 added the flag to cloud-controller-manager. This fails with: ``` Error: unknown flag: --deprecated-apply-beta-topology-labels ``` The flag is supported for cloud-node-manager. See kubernetes-sigs/cloud-provider-azure#3685.
…e-manager, not cloud-controller-manager (#717) #716 added the flag to cloud-controller-manager. This fails with: ``` Error: unknown flag: --deprecated-apply-beta-topology-labels ``` The flag is supported for cloud-node-manager. See kubernetes-sigs/cloud-provider-azure#3685.
…e-manager, not cloud-controller-manager (gardener#717) gardener#716 added the flag to cloud-controller-manager. This fails with: ``` Error: unknown flag: --deprecated-apply-beta-topology-labels ``` The flag is supported for cloud-node-manager. See kubernetes-sigs/cloud-provider-azure#3685.
* Configure CCM to keep setting deprecated labes on the nodes (#716) * Pass the `--enable-deprecated-beta-topology-labels` flag to cloud-node-manager, not cloud-controller-manager (#717) #716 added the flag to cloud-controller-manager. This fails with: ``` Error: unknown flag: --deprecated-apply-beta-topology-labels ``` The flag is supported for cloud-node-manager. See kubernetes-sigs/cloud-provider-azure#3685. --------- Co-authored-by: Vladimir Nachev <vladimir.nachev@sap.com> Co-authored-by: Ismail Alidzhikov <i.alidjikov@gmail.com>
What type of PR is this?
/kind bug
/kind cleanup
What this PR does / why we need it:
#2653 removed the deprecated labels completely, however, other cloud providers have not yet removed these and there are a lot of people out there who are probably not ready to migrate. For example, the Azure Red Hat OpenShift offering has not announced removal of the labels and still supports the labels, even though Microsoft and AKS have removed them.
This PR introduces a softer change, allowing users to maintain the old behaviour should they wish to.
Commit wise, it does:
--deprecated-apply-beta-topology-labels
as a flag, off by default, that allows users to opt-in to the old behaviourI think this should maintain the direction of the Azure provider, while allowing those who aren't yet ready to drop the labels, to continue using them until they have migrated.
My suggestion would be to keep these labels and this flag in-place until the wider cloud-provider community has sunset the labels completely and worked out the migration path for everyone.
Which issue(s) this PR fixes:
Fixes #2453
Special notes for your reviewer:
Does this PR introduce a user-facing change?
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.: