mirror of
https://github.com/helm/charts.git
synced 2026-08-23 22:37:45 +00:00
[stable/mongodb] Fix "Can't initialize iptables table 'nat': Permission denied (you must be root)" error when installed on an Istio-enabled cluster. (#11367)
Only define the `securityContext.runAsUser` 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, https://github.com/helm/charts/pull/10682#issuecomment-455511703, https://github.com/helm/charts/pull/11226#issuecomment-462175101 Signed-off-by: Alexander Awitin <alexanderawitin@gmail.com>
This commit is contained in:
committed by
Kubernetes Prow Robot
parent
fda1c7b21f
commit
e8d9fbe309
@@ -1,5 +1,5 @@
|
||||
name: mongodb
|
||||
version: 5.3.3
|
||||
version: 5.3.4
|
||||
appVersion: 4.0.6
|
||||
description: NoSQL document-oriented database that stores JSON-like documents with dynamic schemas, simplifying the integration of data in content-driven applications.
|
||||
keywords:
|
||||
|
||||
@@ -38,7 +38,6 @@ spec:
|
||||
{{- if .Values.securityContext.enabled }}
|
||||
securityContext:
|
||||
fsGroup: {{ .Values.securityContext.fsGroup }}
|
||||
runAsUser: {{ .Values.securityContext.runAsUser }}
|
||||
{{- end }}
|
||||
{{- if .Values.affinity }}
|
||||
affinity:
|
||||
@@ -62,6 +61,11 @@ spec:
|
||||
- name: {{ template "mongodb.fullname" . }}
|
||||
image: {{ template "mongodb.image" . }}
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy | quote }}
|
||||
{{- if .Values.securityContext.enabled }}
|
||||
securityContext:
|
||||
runAsNonRoot: true
|
||||
runAsUser: {{ .Values.securityContext.runAsUser }}
|
||||
{{- end }}
|
||||
env:
|
||||
{{- if .Values.image.debug}}
|
||||
- name: NAMI_DEBUG
|
||||
|
||||
@@ -37,7 +37,6 @@ spec:
|
||||
{{- if .Values.securityContext.enabled }}
|
||||
securityContext:
|
||||
fsGroup: {{ .Values.securityContext.fsGroup }}
|
||||
runAsUser: {{ .Values.securityContext.runAsUser }}
|
||||
{{- end }}
|
||||
{{- if .Values.affinity }}
|
||||
affinity:
|
||||
@@ -61,6 +60,11 @@ spec:
|
||||
- name: {{ template "mongodb.name" . }}-arbiter
|
||||
image: {{ template "mongodb.image" . }}
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||
{{- if .Values.securityContext.enabled }}
|
||||
securityContext:
|
||||
runAsNonRoot: true
|
||||
runAsUser: {{ .Values.securityContext.runAsUser }}
|
||||
{{- end }}
|
||||
ports:
|
||||
- containerPort: {{ .Values.service.port }}
|
||||
name: mongodb
|
||||
|
||||
@@ -42,7 +42,6 @@ spec:
|
||||
{{- if .Values.securityContext.enabled }}
|
||||
securityContext:
|
||||
fsGroup: {{ .Values.securityContext.fsGroup }}
|
||||
runAsUser: {{ .Values.securityContext.runAsUser }}
|
||||
{{- end }}
|
||||
{{- if .Values.affinity }}
|
||||
affinity:
|
||||
@@ -66,6 +65,11 @@ spec:
|
||||
- name: {{ template "mongodb.name" . }}-primary
|
||||
image: {{ template "mongodb.image" . }}
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||
{{- if .Values.securityContext.enabled }}
|
||||
securityContext:
|
||||
runAsNonRoot: true
|
||||
runAsUser: {{ .Values.securityContext.runAsUser }}
|
||||
{{- end }}
|
||||
ports:
|
||||
- containerPort: {{ .Values.service.port }}
|
||||
name: mongodb
|
||||
|
||||
@@ -43,7 +43,6 @@ spec:
|
||||
{{- if .Values.securityContext.enabled }}
|
||||
securityContext:
|
||||
fsGroup: {{ .Values.securityContext.fsGroup }}
|
||||
runAsUser: {{ .Values.securityContext.runAsUser }}
|
||||
{{- end }}
|
||||
{{- if .Values.affinity }}
|
||||
affinity:
|
||||
@@ -67,6 +66,11 @@ spec:
|
||||
- name: {{ template "mongodb.name" . }}-secondary
|
||||
image: {{ template "mongodb.image" . }}
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||
{{- if .Values.securityContext.enabled }}
|
||||
securityContext:
|
||||
runAsNonRoot: true
|
||||
runAsUser: {{ .Values.securityContext.runAsUser }}
|
||||
{{- end }}
|
||||
ports:
|
||||
- containerPort: {{ .Values.service.port }}
|
||||
name: mongodb
|
||||
|
||||
Reference in New Issue
Block a user