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

tolerations not honoured #1998

Closed
sybadm opened this issue Dec 4, 2023 · 4 comments
Closed

tolerations not honoured #1998

sybadm opened this issue Dec 4, 2023 · 4 comments
Labels
kind/bug Categorizes issue or PR as related to a bug.

Comments

@sybadm
Copy link

sybadm commented Dec 4, 2023

tolerations: for spod not setting up and spod not able to schedule on AKS nodepools with taints set

What happened:

1. the ptach/merge statement adds new tolerations but wipes out below existing tolerations, (see below how to reproduce)
    
      - effect: NoSchedule
        key: node-role.kubernetes.io/master
        operator: Exists
      - effect: NoSchedule
        key: node-role.kubernetes.io/control-plane
        operator: Exists
      - effect: NoExecute
        key: node.kubernetes.io/not-ready
        operator: Exists

2. the new tolerations is not honoured and spod does not get schedule on the nodepool.

What you expected to happen:

Expect SPOD to be scheduled on the nodepool with tolerations settings.

How to reproduce it (as minimally and precisely as possible):

az aks nodepool add \
    --resource-group XXXX \
    --cluster-name XXXXX \
    --name developernp \
    --node-vm-size Standard_E16ds_v5\
    --min-count 0 \
    --max-count 5 \
    --zones 1 2 3 \
    --enable-cluster-autoscaler \
    --node-osdisk-type Managed \
    --scale-down-mode Deallocate \
    --node-taints seccomp-role=seccomp:NoSchedule

kubectl -n security-profiles-operator patch spod spod --type merge -p '{"spec":{"tolerations":[{"key":"seccomp-role","operator":"Exists","effect":"NoSchedule"}]}}'

Anything else we need to know?:

Environment:

  • Cloud provider or hardware configuration: AKS 1.27.3
  • OS (e.g: cat /etc/os-release):
  • Kernel (e.g. uname -a):
  • Others:
@sybadm sybadm added the kind/bug Categorizes issue or PR as related to a bug. label Dec 4, 2023
@sybadm
Copy link
Author

sybadm commented Dec 4, 2023

my fault.... didn't realised there was default tolerations

@sybadm sybadm closed this as completed Dec 4, 2023
@saschagrunert
Copy link
Member

@sybadm anyways thank you for the report!

@sybadm
Copy link
Author

sybadm commented Dec 4, 2023

@sybadm anyways thank you for the report!

thank you. However the patch commands with --type merge should overwrite existing tolerations? Not a big deal but it helps in automation

@saschagrunert
Copy link
Member

@sybadm yes that’s correct. 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug.
Projects
None yet
Development

No branches or pull requests

2 participants