[stable/postgresql] Fix "Can't initialize iptables table 'nat': Permission denied (you must be root)" error when installed on an Istio-enabled cluster. (#11226)

Only define the `securityContext` on the main container instead of defining it on the top level `spec` which results into injected containers by Istio inheriting this definition (i.e. istio-init).

Related topic: https://github.com/istio/old_issues_repo/issues/316

Signed-off-by: Alexander Awitin <alexanderawitin@gmail.com>
This commit is contained in:
Alexander Awitin
2019-02-11 23:48:47 -08:00
committed by Kubernetes Prow Robot
parent 84725d0e79
commit 895ef9b7d0
3 changed files with 11 additions and 11 deletions
+1 -1
View File
@@ -1,5 +1,5 @@
name: postgresql
version: 3.10.1
version: 3.10.2
appVersion: 10.6.0
description: Chart for PostgreSQL, an object-relational database management system (ORDBMS) with an emphasis on extensibility and on standards-compliance.
keywords:
@@ -26,11 +26,6 @@ spec:
heritage: {{ .Release.Service | quote }}
role: slave
spec:
{{- if .Values.securityContext.enabled }}
securityContext:
fsGroup: {{ .Values.securityContext.fsGroup }}
runAsUser: {{ .Values.securityContext.runAsUser }}
{{- end }}
{{- if .Values.image.pullSecrets }}
imagePullSecrets:
{{- range .Values.image.pullSecrets }}
@@ -79,6 +74,11 @@ spec:
imagePullPolicy: "{{ .Values.image.pullPolicy }}"
resources:
{{ toYaml .Values.resources | indent 10 }}
{{- if .Values.securityContext.enabled }}
securityContext:
fsGroup: {{ .Values.securityContext.fsGroup }}
runAsUser: {{ .Values.securityContext.runAsUser }}
{{- end }}
env:
{{- if .Values.image.debug}}
- name: BASH_DEBUG
+5 -5
View File
@@ -27,11 +27,6 @@ spec:
heritage: {{ .Release.Service | quote }}
role: master
spec:
{{- if .Values.securityContext.enabled }}
securityContext:
fsGroup: {{ .Values.securityContext.fsGroup }}
runAsUser: {{ .Values.securityContext.runAsUser }}
{{- end }}
{{- if or .Values.image.pullSecrets .Values.metrics.image.pullSecrets }}
imagePullSecrets:
{{- range .Values.image.pullSecrets }}
@@ -83,6 +78,11 @@ spec:
imagePullPolicy: "{{ .Values.image.pullPolicy }}"
resources:
{{ toYaml .Values.resources | indent 10 }}
{{- if .Values.securityContext.enabled }}
securityContext:
fsGroup: {{ .Values.securityContext.fsGroup }}
runAsUser: {{ .Values.securityContext.runAsUser }}
{{- end }}
env:
{{- if .Values.image.debug}}
- name: BASH_DEBUG