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

Missing nodeSelector or affinity options in chart #154

Open
jensjohansen opened this issue Oct 26, 2022 · 2 comments
Open

Missing nodeSelector or affinity options in chart #154

jensjohansen opened this issue Oct 26, 2022 · 2 comments

Comments

@jensjohansen
Copy link

Description

We have both Graviton (ARM) and AMD (x866) nodes in our k8s clusters. The Zookeeper charts allow us to use nodeSelector to make sure Zookeeper pods only deploy to x86 nodes. This capability is missing in the Pravega Bookkeeper-Operator chart.

Importance

Blocker

Location

default values.yaml is missing the nodeSelector: {} and affinity: {} options, and the chart templates are missing the sections to add these options to the deployment.

Suggestions for an improvement

At a minimum, add the nodeSelector: {} option to the chart so it works just like the Pravega Zookeeper-Operator chart.

Reusing the values.yaml and chart template sections from the corresponding Pravega Zookeeper-Operator and Zookeeper charts should make the change simple.

@jensjohansen
Copy link
Author

jensjohansen commented Oct 26, 2022

In the Pravega Zookeeper-Operator, the default valuess.yaml includes a section for scheduling constraints:

# Scheduling constraints
nodeSelector: {}
affinity: {}
tolerations: []

Which are processed in the template by templates/operator.yaml:

      {{- if .Values.nodeSelector }}
      nodeSelector:
{{ toYaml .Values.nodeSelector | indent 8 }}
      {{- end }}
      {{- if .Values.affinity }}
      affinity:
{{ toYaml .Values.affinity | indent 8 }}
      {{- end }}
      {{- if .Values.tolerations }}
      tolerations:
{{ toYaml .Values.tolerations | indent 8 }}
      {{- end }}

@jensjohansen
Copy link
Author

jensjohansen commented Oct 26, 2022

My work around:

Cloned the operator

Added this at line 20 in templates/operator.yaml:

      {{- if .Values.nodeSelector }}
      nodeSelector:
{{ toYaml .Values.nodeSelector | indent 8 }}
      {{- end }}
      {{- if .Values.affinity }}
      affinity:
{{ toYaml .Values.affinity | indent 8 }}
      {{- end }}
      {{- if .Values.tolerations }}
      tolerations:
{{ toYaml .Values.tolerations | indent 8 }}
      {{- end }}

Then added this to the end of values.yaml when installing

nodeSelector:
  x86: "true"

This schedules bookkeeper-operator to deploy only to nodes that have the Kubernetes label "x86" set to "true".

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