mirror of
https://github.com/helm/charts.git
synced 2026-08-23 22:37:45 +00:00
Fix MongoDB chart non-root volumes (#6809)
* Fix MongoDB chart non-root volumes * Update README
This commit is contained in:
committed by
k8s-ci-robot
parent
432c4b9e4b
commit
84fcbc5e6b
@@ -1,5 +1,5 @@
|
||||
name: mongodb
|
||||
version: 3.0.4
|
||||
version: 4.0.0
|
||||
appVersion: 3.6.6
|
||||
description: NoSQL document-oriented database that stores JSON-like documents with dynamic schemas, simplifying the integration of data in content-driven applications.
|
||||
keywords:
|
||||
|
||||
@@ -73,7 +73,9 @@ The following table lists the configurable parameters of the MongoDB chart and t
|
||||
| `nodeSelector` | Node labels for pod assignment | {} |
|
||||
| `affinity` | Affinity for pod assignment | {} |
|
||||
| `tolerations` | Toleration labels for pod assignment | {} |
|
||||
| `persistence.enabled` | Use a PVC to persist data | `true` |
|
||||
| `securityContext.enabled` | Enable security context | `true` |
|
||||
| `securityContext.fsGroup` | Group ID for the container | `1001` |
|
||||
| `securityContext.runAsUser` | User ID for the container | `1001` | `persistence.enabled` | Use a PVC to persist data | `true` |
|
||||
| `persistence.storageClass` | Storage class of backing PVC | `nil` (uses alpha storage class annotation) |
|
||||
| `persistence.accessMode` | Use volume as ReadOnly or ReadWrite | `ReadWriteOnce` |
|
||||
| `persistence.size` | Size of data volume | `8Gi` |
|
||||
|
||||
@@ -15,6 +15,11 @@ spec:
|
||||
app: {{ template "mongodb.name" . }}
|
||||
release: "{{ .Release.Name }}"
|
||||
spec:
|
||||
{{- if .Values.securityContext.enabled }}
|
||||
securityContext:
|
||||
fsGroup: {{ .Values.securityContext.fsGroup }}
|
||||
runAsUser: {{ .Values.securityContext.runAsUser }}
|
||||
{{- end }}
|
||||
{{- if .Values.nodeSelector }}
|
||||
nodeSelector:
|
||||
{{ toYaml .Values.nodeSelector | indent 8 }}
|
||||
|
||||
@@ -23,6 +23,11 @@ spec:
|
||||
release: {{ .Release.Name }}
|
||||
component: arbiter
|
||||
spec:
|
||||
{{- if .Values.securityContext.enabled }}
|
||||
securityContext:
|
||||
fsGroup: {{ .Values.securityContext.fsGroup }}
|
||||
runAsUser: {{ .Values.securityContext.runAsUser }}
|
||||
{{- end }}
|
||||
{{- if .Values.image.pullSecrets }}
|
||||
imagePullSecrets:
|
||||
{{- range .Values.image.pullSecrets }}
|
||||
@@ -95,4 +100,4 @@ spec:
|
||||
configMap:
|
||||
name: {{ template "mongodb.fullname" . }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
@@ -23,6 +23,11 @@ spec:
|
||||
release: {{ .Release.Name }}
|
||||
component: primary
|
||||
spec:
|
||||
{{- if .Values.securityContext.enabled }}
|
||||
securityContext:
|
||||
fsGroup: {{ .Values.securityContext.fsGroup }}
|
||||
runAsUser: {{ .Values.securityContext.runAsUser }}
|
||||
{{- end }}
|
||||
{{- if .Values.image.pullSecrets }}
|
||||
imagePullSecrets:
|
||||
{{- range .Values.image.pullSecrets }}
|
||||
|
||||
@@ -47,6 +47,14 @@ usePassword: true
|
||||
## - "--wiredTigerCacheSizeGB=2"
|
||||
mongodbExtraFlags: []
|
||||
|
||||
## Pod Security Context
|
||||
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/
|
||||
##
|
||||
securityContext:
|
||||
enabled: true
|
||||
fsGroup: 1001
|
||||
runAsUser: 1001
|
||||
|
||||
## Kubernetes service type
|
||||
service:
|
||||
type: ClusterIP
|
||||
@@ -182,4 +190,4 @@ configmap:
|
||||
# # security options
|
||||
# security:
|
||||
# authorization: enabled
|
||||
# keyFile: /opt/bitnami/mongodb/conf/keyfile
|
||||
# keyFile: /opt/bitnami/mongodb/conf/keyfile
|
||||
|
||||
@@ -47,6 +47,14 @@ usePassword: true
|
||||
## - "--wiredTigerCacheSizeGB=2"
|
||||
mongodbExtraFlags: []
|
||||
|
||||
## Pod Security Context
|
||||
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/
|
||||
##
|
||||
securityContext:
|
||||
enabled: true
|
||||
fsGroup: 1001
|
||||
runAsUser: 1001
|
||||
|
||||
## Kubernetes service type
|
||||
service:
|
||||
type: ClusterIP
|
||||
|
||||
Reference in New Issue
Block a user