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: Helm Objekt merging of values.yaml causes invalid Kubernetes Resources #13733

Open
3deep5me opened this issue Aug 1, 2024 · 0 comments · May be fixed by #13734
Open

Helm: Helm Objekt merging of values.yaml causes invalid Kubernetes Resources #13733

3deep5me opened this issue Aug 1, 2024 · 0 comments · May be fixed by #13734

Comments

@3deep5me
Copy link
Contributor

3deep5me commented Aug 1, 2024

Describe the bug
Right now if you try for example set singleBinary.affinity in your values to something else than requiredDuringSchedulingIgnoredDuringExecution for example to preferredDuringSchedulingIgnoredDuringExecution it come to a disadvantageous merge.
The result is something like this:

affinity:
        podAntiAffinity:
          preferredDuringSchedulingIgnoredDuringExecution:
            - labelSelector:
                matchLabels:
                  app.kubernetes.io/component: single-binary
              topologyKey: topology.kubernetes.io/zone
          requiredDuringSchedulingIgnoredDuringExecution:
            - labelSelector:
                matchLabels:
                  app.kubernetes.io/component: single-binary
              topologyKey: kubernetes.io/hostname

Which is rejected by Kubernetes.

We would like to use preferredDuringSchedulingIgnoredDuringExecution to be more flexible.
With requiredDuringSchedulingIgnoredDuringExecution our clusterautoscaler would provision nodes in zones which are not needed, But if there are Nodes in zones available we would like to spread loki across. That's where preferredDuringSchedulingIgnoredDuringExecution comes handy.

To Reproduce
Steps to reproduce the behavior:

  1. Do a helm template with this value
  singleBinary:
    affinity:
      podAntiAffinity:
        preferredDuringSchedulingIgnoredDuringExecution:
          - labelSelector:
              matchLabels:
                app.kubernetes.io/component: single-binary
            topologyKey: topology.kubernetes.io/zone
  1. See/Try to apply the manifest

Expected behavior
The result should be something like this

        podAntiAffinity:
          preferredDuringSchedulingIgnoredDuringExecution:
            - labelSelector:
                matchLabels:
                  app.kubernetes.io/component: single-binary
              topologyKey: topology.kubernetes.io/zone

Environment:

  • Kubernetes
  • Helm

Screenshots, Promtail config, or terminal output
If applicable, add any output to help explain your problem.

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

Successfully merging a pull request may close this issue.

2 participants