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

deploy: more than one affinity in provisioner deployment when deploy helm chart with value provisioner.affinity #3750

Closed
dashjay opened this issue Apr 17, 2023 · 1 comment · Fixed by #3751
Labels
wontfix This will not be worked on

Comments

@dashjay
Copy link
Contributor

dashjay commented Apr 17, 2023

Describe the bug

When I try to deploy the ceph-csi-rbd chart with value provisioner.affinity, there will be two affinities field in deployment provisioner.

Environment details

  • Helm chart version : devel
  • Kernel version : 5.4.0-1105
  • Kubernetes cluster version : 1.12.22

Steps to reproduce

It's ok, when I deploy with default values.yaml

    spec:
      affinity:
        podAntiAffinity:
          requiredDuringSchedulingIgnoredDuringExecution:
            - labelSelector:
                matchExpressions:
                  - key: app
                    operator: In
                    values:
                      - ceph-csi-rbd
                  - key: component
                    operator: In
                    values:
                      - provisioner
              topologyKey: "kubernetes.io/hostname"

Then I deploy with a custom-values.yaml like this:

provisioner:
  affinity:
    nodeAffinity:
      required:
        nodeSelectorTerms:
        - matchExpressions:
          - key: kubernetes.io/hostname
            operator: In
            values:
            - test-0001.com
            - test-0002.com
            - test-0003.com

There will be two affinity in rendered yaml, if this was applied into kubernetes, the inferior affinity will take effect, superior affinity will be lost, This should not be a correct thing.

Actual results

Yaml renderer out like this:

    spec:
      affinity:
        podAntiAffinity:
          requiredDuringSchedulingIgnoredDuringExecution:
            - labelSelector:
                matchExpressions:
                  - key: app
                    operator: In
                    values:
....
      affinity:
        nodeAffinity:
....

Expected behavior

Yaml should be renderer out like this:

    spec:
      affinity:
        podAntiAffinity:
          requiredDuringSchedulingIgnoredDuringExecution:
            - labelSelector:
                matchExpressions:
                  - key: app
                    operator: In
                    values:
        nodeAffinity:

A clear and concise description of what you expected to happen.

@dashjay dashjay changed the title deploy: more than one affinity in provisioner when deploy helm chart with provisioner.affinity deploy: more than one affinity in provisioner deployment when deploy helm chart with value provisioner.affinity Apr 17, 2023
@github-actions
Copy link

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in a week if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the wontfix This will not be worked on label May 17, 2023
@mergify mergify bot closed this as completed in #3751 May 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wontfix This will not be worked on
Projects
None yet
1 participant