-
Notifications
You must be signed in to change notification settings - Fork 9.5k
[bitnami/valkey-cluster] Add support for templating nodes, replicas, resources, and persistent storage values #32520
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
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Mike Brancato <[email protected]>
Signed-off-by: Mike Brancato <[email protected]>
Signed-off-by: Mike Brancato <[email protected]>
Signed-off-by: Bitnami Bot <[email protected]>
Signed-off-by: Mike Brancato <[email protected]>
Signed-off-by: Bitnami Bot <[email protected]>
Signed-off-by: Bitnami Bot <[email protected]>
Signed-off-by: Mike Brancato <[email protected]>
Signed-off-by: Bitnami Bot <[email protected]>
This Pull Request has been automatically marked as "stale" because it has not had recent activity (for 15 days). It will be closed if no further activity occurs. Thank you for your contribution. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @mbrancato,
Thank you very much for your contribution! Could you please take a look at my comment?
@@ -20,7 +20,7 @@ spec: | |||
{{- $podLabels := include "common.tplvalues.merge" ( dict "values" ( list .Values.valkey.podLabels .Values.commonLabels ) "context" . ) }} | |||
selector: | |||
matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 6 }} | |||
replicas: {{ .Values.cluster.nodes }} | |||
replicas: {{ if eq (typeOf .Values.cluster.nodes) "float64" -}}{{ .Values.cluster.nodes }}{{- else -}}{{ tpl .Values.cluster.nodes . | int }}{{- end }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm sorry but I'm not understanding, why the typeOf
is required? Can't this be simplified like this?
replicas: {{ if eq (typeOf .Values.cluster.nodes) "float64" -}}{{ .Values.cluster.nodes }}{{- else -}}{{ tpl .Values.cluster.nodes . | int }}{{- end }} | |
replicas: {{ tpl .Values.cluster.nodes . | int }} |
For those values that need to be quoted, like environment variables values: {{ tpl .Values.cluster.nodes $ | int | quote }}
This Pull Request has been automatically marked as "stale" because it has not had recent activity (for 15 days). It will be closed if no further activity occurs. Thank you for your contribution. |
Description of the change
This PR adds support to template the values input for the nodes, replicas, resources, and persistent storage of a cluster.
Benefits
Currently, this helm chart does not allow configuration by shard. This PR allows for abstraction when used as a subchart, or when the user just wants to configure things differently.
For example, this abstraction becomes possible:
Possible drawbacks
This should be compatible with all existing usage.
Additional information
Checklist
Chart.yaml
according to semver. This is not necessary when the changes only affect README.md files.README.md
using readme-generator-for-helm