From 08920445e9dcf03105816ae659992551c42ce661 Mon Sep 17 00:00:00 2001 From: Aylei Date: Wed, 30 Oct 2019 16:36:33 +0800 Subject: [PATCH] Set podSecuriyContext to nil by default in favor of backward compatiability Signed-off-by: Aylei --- charts/tidb-cluster/templates/tidb-cluster.yaml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/charts/tidb-cluster/templates/tidb-cluster.yaml b/charts/tidb-cluster/templates/tidb-cluster.yaml index b8cb679761..e5734a59a1 100644 --- a/charts/tidb-cluster/templates/tidb-cluster.yaml +++ b/charts/tidb-cluster/templates/tidb-cluster.yaml @@ -48,8 +48,11 @@ spec: {{ toYaml .Values.pd.annotations | indent 6 }} {{- end }} hostNetwork: {{ .Values.pd.hostNetwork }} + + {{- if .Values.pd.podSecurityContext }} podSecurityContext: {{ toYaml .Values.pd.podSecurityContext | indent 6}} + {{- end }} {{- if .Values.pd.priorityClassName }} priorityClassName: {{ .Values.pd.priorityClassName }} {{- end }} @@ -76,8 +79,10 @@ spec: {{ toYaml .Values.tikv.annotations | indent 6 }} {{- end }} hostNetwork: {{ .Values.tikv.hostNetwork }} + {{- if .Values.tikv.podSecurityContext }} podSecurityContext: {{ toYaml .Values.tikv.podSecurityContext | indent 6}} + {{- end }} {{- if .Values.tikv.priorityClassName }} priorityClassName: {{ .Values.tikv.priorityClassName }} {{- end }} @@ -102,8 +107,10 @@ spec: {{ toYaml .Values.tidb.annotations | indent 6 }} {{- end }} hostNetwork: {{ .Values.tidb.hostNetwork }} + {{- if .Values.tidb.podSecurityContext }} podSecurityContext: {{ toYaml .Values.tidb.podSecurityContext | indent 6}} + {{- end }} {{- if .Values.tidb.priorityClassName }} priorityClassName: {{ .Values.tidb.priorityClassName }} {{- end }}