From 5b5ea7173ada2280fe493ce820918ad5b66f91c8 Mon Sep 17 00:00:00 2001 From: mrdima Date: Mon, 7 Jun 2021 16:41:16 +0800 Subject: [PATCH] Add value option to define schedulerName (#150) For those who have a need to configure the schedulerName like us, make this an option just as it is for example in the postgres chart Co-authored-by: Dimitri Ars Reviewed-on: https://gitea.com/gitea/helm-chart/pulls/150 Reviewed-by: luhahn Reviewed-by: Lunny Xiao Co-authored-by: mrdima Co-committed-by: mrdima --- README.md | 1 + templates/gitea/statefulset.yaml | 3 +++ values.yaml | 5 +++++ 3 files changed, 9 insertions(+) diff --git a/README.md b/README.md index c453aec..541e343 100644 --- a/README.md +++ b/README.md @@ -376,6 +376,7 @@ Annotations can be added to the Gitea pod. | extraVolumeMounts | Additional volumes mounts for the Gitea containers | {} | | initPreScript | Bash script copied verbatim to start of init container | | | securityContext | Run as a specific securityContext | {} | +| schedulerName | Use an alternate scheduler, e.g. "stork" | | ### Image diff --git a/templates/gitea/statefulset.yaml b/templates/gitea/statefulset.yaml index 9b331fb..e73cc3e 100644 --- a/templates/gitea/statefulset.yaml +++ b/templates/gitea/statefulset.yaml @@ -28,6 +28,9 @@ spec: {{- toYaml .Values.statefulset.labels | nindent 8 }} {{- end }} spec: + {{- if .Values.schedulerName }} + schedulerName: "{{ .Values.schedulerName }}" + {{- end }} {{- with .Values.imagePullSecrets }} imagePullSecrets: {{- toYaml . | nindent 8 }} diff --git a/values.yaml b/values.yaml index bec2288..a04e765 100644 --- a/values.yaml +++ b/values.yaml @@ -68,6 +68,11 @@ resources: {} # cpu: 100m # memory: 128Mi +## Use an alternate scheduler, e.g. "stork". +## ref: https://kubernetes.io/docs/tasks/administer-cluster/configure-multiple-schedulers/ +## +# schedulerName: + nodeSelector: {} tolerations: []