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

Update tasks.sh #3961

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Update tasks.sh #3961

wants to merge 1 commit into from

Conversation

chasehainey
Copy link

Changed from master to control-plane, as master is deprecated per https://kubernetes.io/docs/reference/labels-annotations-taints/#node-role-kubernetes-io-master-taint.

What this PR does / why we need it:

Changes the taints from master to control-plane as that is the new verbiage.

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

Steps to reproduce

Does this PR introduce a user-facing change?


Does this PR require documentation?

@chasehainey chasehainey requested a review from a team as a code owner January 18, 2023 19:37
Copy link
Member

@emosbaugh emosbaugh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

operator: Exists
containers:
- name: rook-ceph-operator
env:
- name: DISCOVER_TOLERATION_KEY
value: node-role.kubernetes.io/master
value: node-role.kubernetes.io/control-plane
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this may need to be updated to DISCOVER_TOLERATIONS for newer rook versions

@@ -490,32 +490,32 @@ spec:
template:
spec:
tolerations:
- key: node-role.kubernetes.io/master
- key: node-role.kubernetes.io/control-plane
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rather than remove the existing node-role.kubernetes.io/master toleration can we append node-role.kubernetes.io/control-plane as an additional toleration?

- name: CSI_PROVISIONER_TOLERATIONS
value: |
- key: node-role.kubernetes.io/master
- key: node-role.kubernetes.io/control-plane
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rather than remove the existing node-role.kubernetes.io/master toleration can we append node-role.kubernetes.io/control-plane as an additional toleration?

operator: Exists
- name: CSI_PLUGIN_TOLERATIONS
value: |
- key: node-role.kubernetes.io/master
- key: node-role.kubernetes.io/control-plane
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rather than remove the existing node-role.kubernetes.io/master toleration can we append node-role.kubernetes.io/control-plane as an additional toleration?

operator: Exists
EOF
fi

# EKCO tolerations
if kubernetes_resource_exists kurl deployment ekc-operator; then
kubectl -n kurl patch deployment ekc-operator --type=merge -p '{"spec":{"template":{"spec":{"tolerations":[{"key":"node-role.kubernetes.io/master","operator":"Exists"}]}}}}'
kubectl -n kurl patch deployment ekc-operator --type=merge -p '{"spec":{"template":{"spec":{"tolerations":[{"key":"node-role.kubernetes.io/control-plane","operator":"Exists"}]}}}}'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rather than remove the existing node-role.kubernetes.io/master toleration can we append node-role.kubernetes.io/control-plane as an additional toleration?

@@ -479,7 +479,7 @@ function taint_primaries() {

# Rook tolerations
if kubectl get namespace rook-ceph &>/dev/null; then
kubectl -n rook-ceph patch cephclusters rook-ceph --type=merge -p '{"spec":{"placement":{"all":{"tolerations":[{"key":"node-role.kubernetes.io/master","operator":"Exists"}]}}}}'
kubectl -n rook-ceph patch cephclusters rook-ceph --type=merge -p '{"spec":{"placement":{"all":{"tolerations":[{"key":"node-role.kubernetes.io/control-plane","operator":"Exists"}]}}}}'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rather than remove the existing node-role.kubernetes.io/master toleration can we append node-role.kubernetes.io/control-plane as an additional toleration?

fi


# Taint all primaries
kubectl taint nodes --overwrite --selector=node-role.kubernetes.io/master node-role.kubernetes.io/master=:NoSchedule
kubectl taint nodes --overwrite --selector=node-role.kubernetes.io/control-plane node-role.kubernetes.io/control-plane=:NoSchedule
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it be possible to detect the kubernetes version and apply the proper taint for that version?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants