Skip to content
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

Backport: [node-group] Fix remove taints patch from master NG #2816

Conversation

deckhouse-BOaTswain
Copy link
Collaborator

@deckhouse-BOaTswain deckhouse-BOaTswain commented Oct 24, 2022

Signed-off-by: Yuriy Losev yuriy.losev@flant.com

Description

Remove "master" taint if "control-plane" taint is removed

Why do we need it, and what problem does it solve?

When we are bootstraping a new single master cluster, we use command kubectl patch nodegroup master --type json -p '[{"op": "remove", "path": "/spec/nodeTemplate/taints"}]' for removing node taints.
Meanwhile our NG master only has:

    taints:
    - effect: NoSchedule
      key: node-role.kubernetes.io/control-plane

and if kubernetes version < 1.24 - kubeadm sets both taints for the master node during the bootstrap process:

  taints:
  - effect: NoSchedule
    key: node-role.kubernetes.io/control-plane
  - effect: NoSchedule
    key: node-role.kubernetes.io/master

After patching the master NG only control-plane taint will be removed explicitly. We also have to remove master taint if control-plane taint was removed, otherwise cluster will not be bootstrapped.

What is the expected result?

Checklist

  • The code is covered by unit tests.
  • e2e tests passed.
  • Documentation updated according to the changes.
  • Changes were tested in the Kubernetes cluster manually.

Changelog entries

section: candi
type: fix
summary: Remove `master` taint if `control-plane` taint was removed in a single node installation.

Signed-off-by: Yuriy Losev <yuriy.losev@flant.com>
Co-authored-by: Ivan Mikheykin <ivan.mikheykin@flant.com>
@deckhouse-BOaTswain deckhouse-BOaTswain merged commit f6422ea into release-1.38 Oct 24, 2022
@deckhouse-BOaTswain deckhouse-BOaTswain deleted the cherry-pick-release-1.38-2c8249687347a686f177b13ce32f6abd5beab01f branch October 24, 2022 03:26
@z9r5 z9r5 removed the auto label Oct 24, 2022
@z9r5 z9r5 added this to the v1.38.1 milestone Oct 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants