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 resources configuration for alpha init container #114

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
1 change: 1 addition & 0 deletions charts/dgraph/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,7 @@ The following table lists the configurable parameters of the `dgraph` chart and
| `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.command` | Alpha initContainer command line to execute | See `values.yaml` for defaults |
| `alpha.initContainers.init.resources` | Alpha initContainer resource requests and/or limits | `{}` |
| `ratel.name` | Ratel component name | `ratel` |
| `ratel.enabled` | Ratel service enabled or disabled | `false` |
| `ratel.extraAnnotations` | Specify annotations for template metadata | `{}` |
Expand Down
4 changes: 4 additions & 0 deletions charts/dgraph/templates/alpha/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,10 @@ spec:
{{- range .Values.alpha.initContainers.init.command }}
- {{ . | quote }}
{{- end }}
{{- with .Values.alpha.initContainers.init.resources }}
resources:
{{- toYaml . | nindent 10 }}
{{- end }}
{{- if .Values.alpha.persistence.enabled }}
volumeMounts:
- name: datadir
Expand Down
12 changes: 11 additions & 1 deletion charts/dgraph/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -470,7 +470,17 @@ alpha:
- |
trap "exit" SIGINT SIGTERM
echo "Write to /dgraph/doneinit when ready."
until [ -f /dgraph/doneinit ]; do sleep 2; done
until [ -f /dgraph/doneinit ]; do sleep 2; done
## Configure resource requests
## ref: http://kubernetes.io/docs/user-guide/compute-resources/
##
## resources:
## requests:
## memory: 256Mi
## cpu: 250m
## limits:
## memory: 1Gi
## cpu: 1

ratel:
name: ratel
Expand Down