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

podAntiAffinityLabelSelector and podAntiAffinityLabelSelector a bit broken. #13892

Open
kramvan1 opened this issue May 7, 2019 · 4 comments

Comments

4 participants
@kramvan1
Copy link

commented May 7, 2019

Bug description

I think this pull request only did half the job: https://github.com/istio/istio/pull/12798/files
The gatewaypodAntiAffinityRequiredDuringScheduling and podAntiAffinityLabelSelector are still broken.

AND I think the wrong default are being used
podAntiAffinityLabelSelector: {} but should be podAntiAffinityLabelSelector: [] as this is used as a list. This works for the empty case since the list/map are empty.
But this warning shows up with helm trying to use it:

`Warning: Merging destination map for chart 'istio'. Cannot overwrite table item 'podAntiAffinityTermLabelSelector', with non table value: map[]`  

Expected behavior

Steps to reproduce the bug

values.yaml

pilot:
  podAntiAffinityTermLabelSelector:
    - key: app
      operator: in
      values: pilot
      topologyKey: "kubernetes.io/hostname"

Version (include the output of istioctl version --remote and kubectl version)
1.1.5 . and Master

How was Istio installed?

Environment where bug was observed (cloud vendor, OS, etc)

Affected product area (please put an X in all that apply)

[x] Configuration Infrastructure
[ ] Docs
[ ] Installation
[ ] Networking
[ ] Performance and Scalability
[ ] Policies and Telemetry
[ ] Security
[ ] Test and Release
[ ] User Experience

Additionally, please consider attaching a cluster state archive by attaching
the dump file to this issue.

@kramvan1

This comment has been minimized.

Copy link
Author

commented May 7, 2019

cc @linsun

@linsun

This comment has been minimized.

Copy link
Member

commented May 7, 2019

good feedback thank you @kramvan1 !

@morvencao could you try fix this in 1.1, assuming it is small fix?

@morvencao

This comment has been minimized.

Copy link
Member

commented May 8, 2019

@kramvan1 Thanks for the feedback!

Please check #13905 for details fix.

Local test with values for pilot:

podAntiAffinityLabelSelector:
  - key: pilot
    operator: In
    values: S1,S2
    topologyKey: "kubernetes.io/hostname"
podAntiAffinityTermLabelSelector:
  - key: app
    operator: In
    values: pilot
    topologyKey: "kubernetes.io/hostname"

helm template... gets the following result:

        podAntiAffinity:
          requiredDuringSchedulingIgnoredDuringExecution:
          - labelSelector:
              matchExpressions:
              - key: pilot
                operator: In
                values:
                - S1
                - S2
            topologyKey: kubernetes.io/hostname
          preferredDuringSchedulingIgnoredDuringExecution:
          - podAffinityTerm:
              labelSelector:
                matchExpressions:
                - key: app
                  operator: In
                  values:
                  - pilot
              topologyKey: kubernetes.io/hostname
@rvennam

This comment has been minimized.

Copy link
Contributor

commented May 13, 2019

@kramvan1 Can you please verify the fix?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.