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

change nodeAffinity to And #1637

Merged
merged 2 commits into from
Jun 14, 2023
Merged

Conversation

jiuker
Copy link
Contributor

@jiuker jiuker commented Jun 13, 2023

change nodeAffinity to And
merge nodeAffinity
related #1635

How to test this PR:

  1. Build the image:
make build

As a result get the image:

=> => naming to docker.io/minio/operator:v5.0.5-11-g68ac4605
  1. Upload the image to your testing cluster:
kind load docker-image docker.io/minio/operator:v5.0.5-11-g68ac4605 
  1. Change the image in the Deployment of Operator.

  2. Create tenant:

Screenshot 2023-06-14 at 9 06 18 AM
  1. Expected result is:
 pools:
  - affinity:
      nodeAffinity:
        requiredDuringSchedulingIgnoredDuringExecution:
          nodeSelectorTerms:
          - matchExpressions:
            - key: kubernetes.io/hostname
              operator: In
              values:
              - node2
              - node3
              - node4
              - node5

@jiuker jiuker linked an issue Jun 13, 2023 that may be closed by this pull request
@jiuker jiuker changed the title nodeAffinity use and change nodeAffinity to And Jun 13, 2023
@cniackz cniackz added bug Something isn't working enhancement New feature or request labels Jun 14, 2023
@cniackz cniackz self-requested a review June 14, 2023 13:09
Copy link
Contributor

@cniackz cniackz left a comment

Choose a reason for hiding this comment

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

I might be wrong, but when testing I still see unexpected output in the YAML:

  pools:
  - affinity:
      nodeAffinity:
        requiredDuringSchedulingIgnoredDuringExecution:
          nodeSelectorTerms:
          - matchExpressions:
            - key: kubernetes.io/hostname
              operator: In
              values:
              - kind-worker
            - key: kubernetes.io/hostname
              operator: In
              values:
              - kind-worker2
            - key: kubernetes.io/hostname
              operator: In
              values:
              - kind-worker3
            - key: kubernetes.io/hostname
              operator: In
              values:
              - kind-worker4

@cniackz cniackz self-requested a review June 14, 2023 14:15
@cniackz cniackz dismissed their stale review June 14, 2023 14:15

need to retest

@cniackz
Copy link
Contributor

cniackz commented Jun 14, 2023

Aha, I was missing to change the image in the console deployment, yes this works:

  pools:
  - affinity:
      nodeAffinity:
        requiredDuringSchedulingIgnoredDuringExecution:
          nodeSelectorTerms:
          - matchExpressions:
            - key: kubernetes.io/hostname
              operator: In
              values:
              - kind-worker
              - kind-worker2
              - kind-worker3
              - kind-worker4

Copy link
Contributor

@cniackz cniackz left a comment

Choose a reason for hiding this comment

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

LGTM, it works!

@dvaldivia dvaldivia merged commit 03ad36e into minio:master Jun 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Node Affinity selectors use "AND" instead of "OR" logic
3 participants