diff --git a/upstreamed/mongodb/Chart.yaml b/upstreamed/mongodb/Chart.yaml index 9d9828f9e..2766e7961 100644 --- a/upstreamed/mongodb/Chart.yaml +++ b/upstreamed/mongodb/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v1 name: mongodb -version: 7.6.5 +version: 7.7.0 appVersion: 4.0.14 description: NoSQL document-oriented database that stores JSON-like documents with dynamic schemas, simplifying the integration of data in content-driven applications. keywords: diff --git a/upstreamed/mongodb/README.md b/upstreamed/mongodb/README.md index 564ef95f0..9ff354ce8 100644 --- a/upstreamed/mongodb/README.md +++ b/upstreamed/mongodb/README.md @@ -115,6 +115,12 @@ The following table lists the configurable parameters of the MongoDB chart and t | `securityContext.fsGroup` | Group ID for the container | `1001` | | `securityContext.runAsUser` | User ID for the container | `1001` | | `schedulerName` | Name of the k8s scheduler (other than default) | `nil` | +| `sidecars` | Add additional containers to pod | `[]` | +| `extraVolumes` | Add additional volumes to deployment | `[]` | +| `extraVolumeMounts` | Add additional volumes mounts to pod | `[]` | +| `sidecarsArbiter` | Add additional containers to arbiter pod | `[]` | +| `extraVolumesArbiter` | Add additional volumes to arbiter deployment | `[]` | +| `extraVolumeMountsArbiter` | Add additional volumes mounts to arbiter pod | `[]` | | `persistence.enabled` | Use a PVC to persist data | `true` | | `persistence.mountPath` | Path to mount the volume at | `/bitnami/mongodb` | | `persistence.subPath` | Subdirectory of the volume to mount at | `""` | diff --git a/upstreamed/mongodb/templates/deployment-standalone.yaml b/upstreamed/mongodb/templates/deployment-standalone.yaml index 93e413ed4..06d9375b8 100644 --- a/upstreamed/mongodb/templates/deployment-standalone.yaml +++ b/upstreamed/mongodb/templates/deployment-standalone.yaml @@ -188,6 +188,9 @@ spec: mountPath: /opt/bitnami/mongodb/conf/mongodb.conf subPath: mongodb.conf {{- end }} + {{- if .Values.extraVolumeMounts }} +{{ toYaml .Values.extraVolumeMounts | indent 8}} + {{- end }} resources: {{ toYaml .Values.resources | indent 10 }} {{- if .Values.metrics.enabled }} @@ -237,6 +240,9 @@ spec: {{- end }} resources: {{ toYaml .Values.metrics.resources | indent 10 }} +{{- end }} +{{- if .Values.sidecars }} +{{ toYaml .Values.sidecars | indent 6 }} {{- end }} volumes: {{- if (.Files.Glob "files/docker-entrypoint-initdb.d/*[sh|js|json]") }} @@ -262,4 +268,7 @@ spec: configMap: name: {{ template "mongodb.fullname" . }} {{- end }} - {{- end -}} + {{- if .Values.extraVolumes }} +{{ toYaml .Values.extraVolumes | indent 6}} + {{- end }} +{{- end -}} diff --git a/upstreamed/mongodb/templates/statefulset-arbiter-rs.yaml b/upstreamed/mongodb/templates/statefulset-arbiter-rs.yaml index 71a74f630..9b7169e96 100644 --- a/upstreamed/mongodb/templates/statefulset-arbiter-rs.yaml +++ b/upstreamed/mongodb/templates/statefulset-arbiter-rs.yaml @@ -168,10 +168,20 @@ spec: {{- end }} resources: {{ toYaml .Values.resourcesArbiter | indent 12 }} +{{- if .Values.extraVolumeMountsArbiter }} + volumeMounts: +{{ toYaml .Values.extraVolumeMountsArbiter | indent 12}} +{{- end }} +{{- if .Values.sidecarsArbiter }} +{{ toYaml .Values.sidecarsArbiter | indent 8 }} +{{- end }} volumes: {{- if .Values.configmap }} - name: config configMap: name: {{ template "mongodb.fullname" . }} {{- end }} + {{- if .Values.extraVolumesArbiter }} +{{ toYaml .Values.extraVolumesArbiter | indent 8 }} + {{- end }} {{- end }} diff --git a/upstreamed/mongodb/templates/statefulset-primary-rs.yaml b/upstreamed/mongodb/templates/statefulset-primary-rs.yaml index 854a954b0..a6f585c41 100644 --- a/upstreamed/mongodb/templates/statefulset-primary-rs.yaml +++ b/upstreamed/mongodb/templates/statefulset-primary-rs.yaml @@ -208,6 +208,9 @@ spec: mountPath: /opt/bitnami/mongodb/conf/mongodb.conf subPath: mongodb.conf {{- end }} + {{- if .Values.extraVolumeMounts }} +{{ toYaml .Values.extraVolumeMounts | indent 12}} + {{- end }} resources: {{ toYaml .Values.resources | indent 12 }} {{- if .Values.metrics.enabled }} @@ -257,6 +260,9 @@ spec: {{- end }} resources: {{ toYaml .Values.metrics.resources | indent 12 }} +{{- end }} +{{- if .Values.sidecars }} +{{ toYaml .Values.sidecars | indent 8 }} {{- end }} volumes: {{- if (.Files.Glob "files/docker-entrypoint-initdb.d/*[sh|js|json]") }} @@ -274,6 +280,9 @@ spec: configMap: name: {{ template "mongodb.fullname" . }} {{- end }} + {{- if .Values.extraVolumes }} +{{ toYaml .Values.extraVolumes | indent 8}} + {{- end }} {{- if .Values.persistence.enabled }} volumeClaimTemplates: - metadata: diff --git a/upstreamed/mongodb/templates/statefulset-secondary-rs.yaml b/upstreamed/mongodb/templates/statefulset-secondary-rs.yaml index a936663ce..0b94e90a6 100644 --- a/upstreamed/mongodb/templates/statefulset-secondary-rs.yaml +++ b/upstreamed/mongodb/templates/statefulset-secondary-rs.yaml @@ -192,6 +192,9 @@ spec: mountPath: /opt/bitnami/mongodb/conf/mongodb.conf subPath: mongodb.conf {{- end }} + {{- if .Values.extraVolumeMounts }} +{{ toYaml .Values.extraVolumeMounts | indent 12}} + {{- end }} resources: {{ toYaml .Values.resources | indent 12 }} {{- if .Values.metrics.enabled }} @@ -241,6 +244,9 @@ spec: {{- end }} resources: {{ toYaml .Values.metrics.resources | indent 12 }} +{{- end }} +{{- if .Values.sidecars }} +{{ toYaml .Values.sidecars | indent 8 }} {{- end }} volumes: {{- if .Values.configmap }} @@ -248,6 +254,9 @@ spec: configMap: name: {{ template "mongodb.fullname" . }} {{- end }} + {{- if .Values.extraVolumes }} +{{ toYaml .Values.extraVolumes | indent 8}} + {{- end }} {{- if .Values.persistence.enabled }} volumeClaimTemplates: - metadata: diff --git a/upstreamed/mongodb/values-production.yaml b/upstreamed/mongodb/values-production.yaml index 7b24dc8c2..4472989c1 100644 --- a/upstreamed/mongodb/values-production.yaml +++ b/upstreamed/mongodb/values-production.yaml @@ -229,6 +229,45 @@ affinityArbiter: {} ## ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ tolerations: [] +## Add sidecars to the pod +## +## For example: +## sidecars: +## - name: your-image-name +## image: your-image +## imagePullPolicy: Always +## ports: +## - name: portname +## containerPort: 1234 +sidecars: [] +## Array to add extra volumes +## +extraVolumes: [] +## Array to add extra mounts (normally used with extraVolumes) +## +extraVolumeMounts: [] + +## Add sidecars to the arbiter pod +# used only when replica set is enabled +## +## For example: +## sidecars: +## - name: your-image-name +## image: your-image +## imagePullPolicy: Always +## ports: +## - name: portname +## containerPort: 1234 +sidecarsArbiter: [] +## Array to add extra volumes to the arbiter +# used only when replica set is enabled +## +extraVolumesArbiter: [] +## Array to add extra mounts (normally used with extraVolumes) to the arbiter +# used only when replica set is enabled +## +extraVolumeMountsArbiter: [] + ## updateStrategy for MongoDB Primary, Secondary and Arbitrer statefulsets ## ref: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#update-strategies updateStrategy: diff --git a/upstreamed/mongodb/values.yaml b/upstreamed/mongodb/values.yaml index e6d33649b..4c68c3173 100644 --- a/upstreamed/mongodb/values.yaml +++ b/upstreamed/mongodb/values.yaml @@ -236,6 +236,45 @@ tolerations: [] updateStrategy: type: RollingUpdate +## Add sidecars to the pod +## +## For example: +## sidecars: +## - name: your-image-name +## image: your-image +## imagePullPolicy: Always +## ports: +## - name: portname +## containerPort: 1234 +sidecars: [] +## Array to add extra volumes +## +extraVolumes: [] +## Array to add extra mounts (normally used with extraVolumes) +## +extraVolumeMounts: [] + +## Add sidecars to the arbiter pod +# used only when replica set is enabled +## +## For example: +## sidecars: +## - name: your-image-name +## image: your-image +## imagePullPolicy: Always +## ports: +## - name: portname +## containerPort: 1234 +sidecarsArbiter: [] +## Array to add extra volumes to the arbiter +# used only when replica set is enabled +## +extraVolumesArbiter: [] +## Array to add extra mounts (normally used with extraVolumes) to the arbiter +# used only when replica set is enabled +## +extraVolumeMountsArbiter: [] + ## Enable persistence using Persistent Volume Claims ## ref: http://kubernetes.io/docs/user-guide/persistent-volumes/ ##