have separate pod priority class es for operator and database pods
This commit is contained in:
parent
47d5f0543c
commit
e36dedcbc4
|
|
@ -9,6 +9,9 @@ metadata:
|
||||||
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
||||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||||
data:
|
data:
|
||||||
|
{{- if .Values.podPriorityClassName }}
|
||||||
|
pod_priority_class_name: {{ .Values.podPriorityClassName }}
|
||||||
|
{{- end }}
|
||||||
pod_service_account_name: {{ include "postgres-pod.serviceAccountName" . }}
|
pod_service_account_name: {{ include "postgres-pod.serviceAccountName" . }}
|
||||||
{{ toYaml .Values.configGeneral | indent 2 }}
|
{{ toYaml .Values.configGeneral | indent 2 }}
|
||||||
{{ toYaml .Values.configUsers | indent 2 }}
|
{{ toYaml .Values.configUsers | indent 2 }}
|
||||||
|
|
|
||||||
|
|
@ -13,6 +13,9 @@ configuration:
|
||||||
users:
|
users:
|
||||||
{{ toYaml .Values.configUsers | indent 4 }}
|
{{ toYaml .Values.configUsers | indent 4 }}
|
||||||
kubernetes:
|
kubernetes:
|
||||||
|
{{- if .Values.podPriorityClassName }}
|
||||||
|
pod_priority_class_name: {{ .Values.podPriorityClassName }}
|
||||||
|
{{- end }}
|
||||||
pod_service_account_name: {{ include "postgres-pod.serviceAccountName" . }}
|
pod_service_account_name: {{ include "postgres-pod.serviceAccountName" . }}
|
||||||
oauth_token_secret_name: {{ template "postgres-operator.fullname" . }}
|
oauth_token_secret_name: {{ template "postgres-operator.fullname" . }}
|
||||||
{{ toYaml .Values.configKubernetes | indent 4 }}
|
{{ toYaml .Values.configKubernetes | indent 4 }}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
{{- if .Values.priorityClassName }}
|
{{- if .Values.podPriorityClassName }}
|
||||||
apiVersion: scheduling.k8s.io/v1
|
apiVersion: scheduling.k8s.io/v1
|
||||||
description: 'Use only for databases controlled by Postgres operator'
|
description: 'Use only for databases controlled by Postgres operator'
|
||||||
kind: PriorityClass
|
kind: PriorityClass
|
||||||
|
|
@ -8,7 +8,7 @@ metadata:
|
||||||
helm.sh/chart: {{ template "postgres-operator.chart" . }}
|
helm.sh/chart: {{ template "postgres-operator.chart" . }}
|
||||||
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
||||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||||
name: {{ .Values.priorityClassName }}
|
name: {{ .Values.podPriorityClassName }}
|
||||||
preemptionPolicy: PreemptLowerPriority
|
preemptionPolicy: PreemptLowerPriority
|
||||||
globalDefault: false
|
globalDefault: false
|
||||||
value: 1000000
|
value: 1000000
|
||||||
|
|
|
||||||
|
|
@ -320,8 +320,12 @@ podServiceAccount:
|
||||||
# If not set a name is generated using the fullname template and "-pod" suffix
|
# If not set a name is generated using the fullname template and "-pod" suffix
|
||||||
name: "postgres-pod"
|
name: "postgres-pod"
|
||||||
|
|
||||||
|
# priority class for operator pod
|
||||||
priorityClassName: ""
|
priorityClassName: ""
|
||||||
|
|
||||||
|
# priority class for database pods
|
||||||
|
podPriorityClassName: ""
|
||||||
|
|
||||||
resources:
|
resources:
|
||||||
limits:
|
limits:
|
||||||
cpu: 500m
|
cpu: 500m
|
||||||
|
|
|
||||||
|
|
@ -312,8 +312,12 @@ podServiceAccount:
|
||||||
# If not set a name is generated using the fullname template and "-pod" suffix
|
# If not set a name is generated using the fullname template and "-pod" suffix
|
||||||
name: "postgres-pod"
|
name: "postgres-pod"
|
||||||
|
|
||||||
|
# priority class for operator pod
|
||||||
priorityClassName: ""
|
priorityClassName: ""
|
||||||
|
|
||||||
|
# priority class for database pods
|
||||||
|
podPriorityClassName: ""
|
||||||
|
|
||||||
resources:
|
resources:
|
||||||
limits:
|
limits:
|
||||||
cpu: 500m
|
cpu: 500m
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue