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 chart support for tolerations and nodeSelector - easy #58

Open
joncrlsn opened this issue Oct 13, 2022 · 0 comments
Open

Helm chart support for tolerations and nodeSelector - easy #58

joncrlsn opened this issue Oct 13, 2022 · 0 comments

Comments

@joncrlsn
Copy link

joncrlsn commented Oct 13, 2022

Hi! Thanks for a great tool! Most 3rd party helm charts we've used support tolerations: and nodeSelector: at the top level of the values.yaml file to help control which nodepool it will run on. It is pretty easy to implement. If you'd like a merge request, let me know.

default values.yaml:

...
tolerations: []
nodeSelector: {}
...

Overridden values.yaml example:

...
tolerations:
  - key: my-pool
    effect: NoSchedule
    operator: Exists
nodeSelector:
  cloud.google.com/gke-nodepool: my-pool

They are placed under spec.template.spec in the deployment template.

...
spec:
  ...
  template:
    ...
    spec:
    {{- if .Values.tolerations }}
      tolerations:
        {{- .Values.tolerations | toYaml | nindent 8 }}
    {{- end }}
    {{- if .Values.nodeSelector }}
      nodeSelector:
        {{- .Values.nodeSelector | toYaml | nindent 8 }}
    {{- end }}

Thanks!

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

No branches or pull requests

1 participant