diff --git a/templates/core-statefulset.yaml b/templates/core-statefulset.yaml index 306db322..768ca950 100644 --- a/templates/core-statefulset.yaml +++ b/templates/core-statefulset.yaml @@ -182,6 +182,9 @@ spec: {{- end }} securityContext: {{ toYaml .Values.securityContext | indent 8 }} +{{- if .Values.priorityClassName }} + priorityClassName: "{{ .Values.priorityClassName }}" +{{- end }} volumes: - name: init-script configMap: diff --git a/templates/readreplicas-statefulset.yaml b/templates/readreplicas-statefulset.yaml index ba3bb80e..957beea1 100644 --- a/templates/readreplicas-statefulset.yaml +++ b/templates/readreplicas-statefulset.yaml @@ -186,6 +186,9 @@ spec: {{- end }} securityContext: {{ toYaml .Values.securityContext | indent 8 }} +{{- if .Values.priorityClassName }} + priorityClassName: "{{ .Values.priorityClassName }}" +{{- end }} volumes: - name: init-script configMap: diff --git a/values.yaml b/values.yaml index 6692d400..2e44687a 100644 --- a/values.yaml +++ b/values.yaml @@ -342,6 +342,10 @@ securityContext: {} # runAsNonRoot: true # runAsUser: 7474 +## Priority for pod scheduling +## ref: https://kubernetes.io/docs/concepts/scheduling-eviction/pod-priority-preemption/ +priorityClassName: "" + containerSecurityContext: {} # Sets securityContext at the container level. # We recommend to only use this if (pod) securityContext cannot be used. For example certain security options can only be set at this level.