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

feat: add envFrom support #111

Merged
merged 1 commit into from
Nov 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions charts/dgraph/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ The following table lists the configurable parameters of the `dgraph` chart and
| `zero.antiAffinity` | Zero anti-affinity policy | `soft` |
| `zero.podAntiAffinitytopologyKey` | Anti affinity topology key for zero nodes | `kubernetes.io/hostname` |
| `zero.nodeAffinity` | Zero node affinity policy | `{}` |
| `zero.envFrom` | Extra environment variables loaded from configmap(s) and/or secret(s) | `[]` |
| `zero.extraEnvs` | extra env vars | `[]` |
| `zero.extraFlags` | Zero extra flags for command line | `""` |
| `zero.configFile` | Zero config file | `{}` |
Expand Down Expand Up @@ -126,6 +127,7 @@ The following table lists the configurable parameters of the `dgraph` chart and
| `alpha.antiAffinity` | Alpha anti-affinity policy | `soft` |
| `alpha.podAntiAffinitytopologyKey` | Anti affinity topology key for zero nodes | `kubernetes.io/hostname` |
| `alpha.nodeAffinity` | Alpha node affinity policy | `{}` |
| `alpha.envFrom` | Extra environment variables loaded from configmap(s) and/or secret(s) | `[]` |
| `alpha.extraEnvs` | extra env vars | `[]` |
| `alpha.extraFlags` | Alpha extra flags for command | `""` |
| `alpha.configFile` | Alpha config file | `{}` |
Expand Down Expand Up @@ -176,6 +178,7 @@ The following table lists the configurable parameters of the `dgraph` chart and
| `alpha.initContainers.init.image.tag` | Alpha initContainer image tag | `v21.03.0` |
| `alpha.initContainers.init.image.pullPolicy` | Alpha initContainer pull policy | `IfNotPresent` |
| `alpha.initContainers.init.env` | Adds environment variables for the alpha init container | `[]` |
| `alpha.initContainers.init.envFrom` | Extra environment variables loaded from configmap(s) and/or secret(s) | `[]` |
| `alpha.initContainers.init.command` | Alpha initContainer command line to execute | See `values.yaml` for defaults |
| `ratel.name` | Ratel component name | `ratel` |
| `ratel.enabled` | Ratel service enabled or disabled | `false` |
Expand All @@ -187,6 +190,7 @@ The following table lists the configurable parameters of the `dgraph` chart and
| `ratel.image.pullPolicy` | Container pull policy | `IfNotPresent` |
| `ratel.schedulerName` | Configure an explicit scheduler | `nil` |
| `ratel.replicaCount` | Number of ratel nodes | `1` |
| `ratel.envFrom` | Extra environment variables loaded from configmap(s) and/or secret(s) | `[]` |
| `ratel.extraEnvs` | Extra env vars | `[]` |
| `ratel.args` | Ratel command line arguments | `[]` |
| `ratel.automountServiceAccountToken` | automatially mount a ServiceAccount API credentials | `true` |
Expand Down
8 changes: 8 additions & 0 deletions charts/dgraph/templates/alpha/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,10 @@ spec:
{{- with .Values.alpha.initContainers.init.env }}
{{- toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.alpha.initContainers.init.envFrom }}
envFrom:
{{- toYaml . | nindent 10 }}
{{- end }}
command:
{{- range .Values.alpha.initContainers.init.command }}
- {{ . | quote }}
Expand Down Expand Up @@ -199,6 +203,10 @@ spec:
{{- with .Values.alpha.extraEnvs }}
{{- toYaml . | nindent 10 }}
{{- end }}
{{- with .Values.alpha.envFrom }}
envFrom:
{{- toYaml . | nindent 10 }}
{{- end }}
{{/* NOTE: awk '{gsub(/\.$/,"") needed to trim */}}
command:
- bash
Expand Down
4 changes: 4 additions & 0 deletions charts/dgraph/templates/ratel/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,10 @@ spec:
{{- toYaml . | nindent 10 }}
{{- end }}
{{- end }}
{{- with .Values.ratel.envFrom }}
envFrom:
{{- toYaml . | nindent 10 }}
{{- end }}
args: {{ .Values.ratel.args | toYaml | nindent 10 }}
command:
- dgraph-ratel
Expand Down
4 changes: 4 additions & 0 deletions charts/dgraph/templates/zero/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,10 @@ spec:
{{- with .Values.zero.extraEnvs }}
{{- toYaml . | nindent 10 }}
{{- end }}
{{- with .Values.zero.envFrom }}
envFrom:
{{- toYaml . | nindent 10 }}
{{- end }}
command:
- bash
- "-c"
Expand Down
10 changes: 10 additions & 0 deletions charts/dgraph/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,9 @@ zero:
## https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#node-affinity-beta-feature
nodeAffinity: {}

## Extra environment variables loaded from configmap(s) and/or secret(s)
envFrom: []

## Extra environment variables which will be appended to the env: definition for the container.
extraEnvs: []

Expand Down Expand Up @@ -276,6 +279,9 @@ alpha:
## https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#node-affinity-beta-feature
nodeAffinity: {}

## Extra environment variables loaded from configmap(s) and/or secret(s)
envFrom: []

## Extra environment variables which will be appended to the env: definition for the container.
extraEnvs: []
# - name: AWS_ACCESS_KEY_ID
Expand Down Expand Up @@ -462,6 +468,7 @@ alpha:
enabled: false
# Adds environment variables for the alpha init container
env: []
envFrom: []
image:
<< : *image
command:
Expand Down Expand Up @@ -499,6 +506,9 @@ ratel:
##
replicaCount: 1

## Extra environment variables loaded from configmap(s) and/or secret(s)
envFrom: []

# Extra environment variables which will be appended to the env: definition for the container.
extraEnvs: []

Expand Down