[stable/mongodb-replicaset] feature: add support for extra containers and volumes (#20875)

* add support for extra containers and volumes

Signed-off-by: Oluwaseun Obajobi <oba@obajobi.com>

* fix: updated the pull request with recommended changes

Signed-off-by: Oluwaseun Obajobi <oba@obajobi.com>

* update the chart version to `3.12.0`

Signed-off-by: Oluwaseun Obajobi <oba@obajobi.com>
This commit is contained in:
Oluwaseun Obajobi
2020-03-04 07:35:47 -08:00
committed by GitHub
parent 24dc8c9881
commit 97cb5790cd
4 changed files with 29 additions and 1 deletions
+1 -1
View File
@@ -1,7 +1,7 @@
apiVersion: v1
name: mongodb-replicaset
home: https://github.com/mongodb/mongo
version: 3.11.6
version: 3.12.0
appVersion: 3.6
description: NoSQL document-oriented database that stores JSON-like documents with
dynamic schemas, simplifying the integration of data in content-driven applications.
+2
View File
@@ -107,8 +107,10 @@ The following table lists the configurable parameters of the mongodb chart and t
| `readinessProbe.periodSeconds` | Readiness probe period seconds | `10` |
| `readinessProbe.successThreshold` | Readiness probe success threshold | `1` |
| `readinessProbe.timeoutSeconds` | Readiness probe timeout seconds | `1` |
| `extraContainers` | Additional containers to add to the StatefulSet | `[]` |
| `extraVars` | Set environment variables for the main container | `{}` |
| `extraLabels` | Additional labels to add to resources | `{}` |
| `extraVolumes` | Additional volumes to add to the resources | `[]` |
*MongoDB config file*
@@ -293,6 +293,9 @@ spec:
initialDelaySeconds: 30
periodSeconds: 10
{{ end }}
{{- if .Values.extraContainers }}
{{- tpl (toYaml .Values.extraContainers) . | nindent 8 }}
{{- end }}
{{- with .Values.nodeSelector }}
nodeSelector:
{{ toYaml . | indent 8 }}
@@ -329,6 +332,9 @@ spec:
emptyDir: {}
- name: configdir
emptyDir: {}
{{- if .Values.extraVolumes }}
{{- tpl (toYaml .Values.extraVolumes) . | nindent 8 }}
{{- end }}
{{- if .Values.persistentVolume.enabled }}
volumeClaimTemplates:
- metadata:
+20
View File
@@ -101,8 +101,28 @@ affinity: {}
tolerations: []
# Additional containers to add to the StatefulSet
extraContainers: []
# - name: mongo-sidecar
# image: stefanprodan/mgob:latest
# ports:
# - name: sidecar-http
# containerPort: 8090
# volumeMounts:
# - mountPath: /config/test1.yml
# name: mgob-config
# subPath: test1.yml
# - name: mgob-storage
# mountPath: /storage
extraLabels: {}
## Additional volumes which can be used by sidecar containers
extraVolumes: []
# - name: mgob-config
# configMap:
# name: mgob-config
priorityClassName: ""
persistentVolume: