From 847c8ae741a693837555f980572288a281e11b1c Mon Sep 17 00:00:00 2001 From: Aylei Date: Tue, 19 Nov 2019 18:03:17 +0800 Subject: [PATCH] Set podSecuriyContext to nil by default in favor of backward compatiability (#1184) Signed-off-by: Aylei --- charts/tidb-cluster/templates/tidb-cluster.yaml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/charts/tidb-cluster/templates/tidb-cluster.yaml b/charts/tidb-cluster/templates/tidb-cluster.yaml index afa4a38931..3d3aaf493f 100644 --- a/charts/tidb-cluster/templates/tidb-cluster.yaml +++ b/charts/tidb-cluster/templates/tidb-cluster.yaml @@ -45,8 +45,10 @@ spec: annotations: {{ toYaml .Values.pd.annotations | indent 6 }} {{- end }} + {{- if .Values.pd.podSecurityContext }} podSecurityContext: {{ toYaml .Values.pd.podSecurityContext | indent 6}} + {{- end }} tikv: replicas: {{ .Values.tikv.replicas }} image: {{ .Values.tikv.image }} @@ -69,9 +71,11 @@ spec: annotations: {{ toYaml .Values.tikv.annotations | indent 6 }} {{- end }} - maxFailoverCount: {{ .Values.tikv.maxFailoverCount | default 3 }} + {{- if .Values.tikv.podSecurityContext }} podSecurityContext: {{ toYaml .Values.tikv.podSecurityContext | indent 6}} + {{- end }} + maxFailoverCount: {{ .Values.tikv.maxFailoverCount | default 3 }} tidb: replicas: {{ .Values.tidb.replicas }} image: {{ .Values.tidb.image }} @@ -91,8 +95,10 @@ spec: annotations: {{ toYaml .Values.tidb.annotations | indent 6 }} {{- end }} + {{- if .Values.tidb.podSecurityContext }} podSecurityContext: {{ toYaml .Values.tidb.podSecurityContext | indent 6}} + {{- end }} binlogEnabled: {{ .Values.binlog.pump.create | default false }} maxFailoverCount: {{ .Values.tidb.maxFailoverCount | default 3 }} separateSlowLog: {{ .Values.tidb.separateSlowLog | default false }}