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

Helm chart: setting integrations.podOptions.namespaceSelector results in webhook selector being erased #1903

Closed
rhaps0dy opened this issue Mar 25, 2024 · 2 comments
Labels
kind/bug Categorizes issue or PR as related to a bug.

Comments

@rhaps0dy
Copy link
Contributor

rhaps0dy commented Mar 25, 2024

What happened:

I added the following to managerConfig.controllerManagerConfigYaml in my Helm chart configuration:

integrations:
  frameworks:
  - ...
  - "pod"
  podOptions:
    namespaceSelector:
      matchExpressions:
      - key: kubernetes.io/metadata.name
        operator: NotIn
        values: ["kube-system", "kueue-system"]

What you expected to happen:

The pod MutatingWebhook stays correct.

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

  • modify the managerConfig.controllerManagerConfigYaml in charts/kueue/values.yaml to the value above. Make sure that podOptions is a child of integrations, this has bitten me in the past.

  • Run:

helm template -n kueue-system my-release . less

and search for mpod.kb.io and vpod.kb.io. It looks like this:

    name: mpod.kb.io
    namespaceSelector:    # <- NOTE: WRONG INDENTATION
    matchExpressions:
    - key: kubernetes.io/metadata.name
      operator: NotIn
      values:
      - kube-system
      - kueue-system
    name: vpod.kb.io
    namespaceSelector:
    matchExpressions:
    - key: kubernetes.io/metadata.name
      operator: NotIn
      values:
      - kube-system
      - kueue-system

Anything else we need to know?:

To solve this, just change nindent 4 to nindent 6 in add_webhook_pod_mutate and add_webhook_pod_validate of hack/update-helm.sh, and in the corresponding part of the helm chart.

@rhaps0dy rhaps0dy added the kind/bug Categorizes issue or PR as related to a bug. label Mar 25, 2024
rhaps0dy added a commit to AlignmentResearch/kueue that referenced this issue Mar 30, 2024
@alculquicondor
Copy link
Contributor

@rhaps0dy if you fixed this, could you open a PR?

rhaps0dy added a commit to AlignmentResearch/kueue that referenced this issue Apr 17, 2024
@rhaps0dy
Copy link
Contributor Author

Looks like #2086 fixed this.

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

Successfully merging a pull request may close this issue.

2 participants