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

Set topologySpreadConstraints type to array #747

Merged

Conversation

gjacquet
Copy link
Contributor

Set type to array in order to match type from Kubernetes API specs: https://kubernetes.io/docs/concepts/scheduling-eviction/topology-spread-constraints/#topologyspreadconstraints-field

Addresses #746

@gjacquet gjacquet requested a review from a team April 17, 2023 12:54
@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Apr 17, 2023

CLA Signed

The committers listed above are authorized under a signed CLA.

  • ✅ login: gjacquet / name: Guillaume Jacquet (437a2c8)

@Allex1
Copy link
Contributor

Allex1 commented Apr 17, 2023

@gjacquet pls sign the cla

@gjacquet
Copy link
Contributor Author

@Allex1 done!

Copy link
Member

@TylerHelmuth TylerHelmuth left a comment

Choose a reason for hiding this comment

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

@gjacquet can you provide a render of the new values.yaml in action? I want to make sure the deployment template doesn't need changed.

@gjacquet
Copy link
Contributor Author

In my case it gave something like this:

  topologySpreadConstraints:
  - labelSelector:
      matchLabels:
        app.kubernetes.io/instance: opentelemetry-collector
        app.kubernetes.io/name: opentelemetry-collector
        component: standalone-collector
    maxSkew: 1
    topologyKey: topology.kubernetes.io/zone
    whenUnsatisfiable: ScheduleAnyway
  - labelSelector:
      matchLabels:
        app.kubernetes.io/instance: opentelemetry-collector
        app.kubernetes.io/name: opentelemetry-collector
        component: standalone-collector
    maxSkew: 1
    topologyKey: kubernetes.io/hostname
    whenUnsatisfiable: DoNotSchedule

@gjacquet
Copy link
Contributor Author

I would not expect any change to be required as toYaml is used to render this value and it works on all sort of types, including lists and objects.
https://github.com/open-telemetry/opentelemetry-helm-charts/blob/main/charts/opentelemetry-collector/templates/_pod.tpl#L191

@TylerHelmuth TylerHelmuth merged commit 3a87156 into open-telemetry:main Apr 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants