Sync mongodb chart
This patch set polishes and fixes the mongodb chart. * key and naming convention matches mariadb's convention; * fix indentation; * add in the ability to handle chown_on_start. Change-Id: I5804eb730a55a192f3cd1518fbccf2416dddcefa Signed-off-by: Tin Lam <tin@irrational.io>
This commit is contained in:
parent
7554196a22
commit
5486403e04
@ -40,6 +40,22 @@ spec:
|
||||
{{ .Values.labels.server.node_selector_key }}: {{ .Values.labels.server.node_selector_value }}
|
||||
initContainers:
|
||||
{{ tuple $envAll $dependencies list | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }}
|
||||
{{- if $envAll.Values.volume.chown_on_start }}
|
||||
- name: mongodb-perms
|
||||
image: {{ $envAll.Values.images.tags.mongodb }}
|
||||
imagePullPolicy: {{ $envAll.Values.images.pull_policy }}
|
||||
securityContext:
|
||||
runAsUser: 0
|
||||
{{ tuple $envAll $envAll.Values.pod.resources.server | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }}
|
||||
command:
|
||||
- chown
|
||||
- -R
|
||||
- "mongodb:"
|
||||
- {{ $envAll.Values.volume.host.host_path }}
|
||||
volumeMounts:
|
||||
- name: mongodb-data
|
||||
mountPath: {{ $envAll.Values.volume.host.host_path }}
|
||||
{{- end }}
|
||||
containers:
|
||||
- name: mongodb
|
||||
image: {{ .Values.images.tags.mongodb }}
|
||||
@ -92,20 +108,20 @@ spec:
|
||||
configMap:
|
||||
name: mongodb-bin
|
||||
defaultMode: 0555
|
||||
{{- if not .Values.storage.pvc.enabled }}
|
||||
{{- if not .Values.volume.enabled }}
|
||||
- name: mongodb-data
|
||||
hostPath:
|
||||
path: {{ .Values.storage.host.host_path }}
|
||||
path: {{ .Values.volume.host_path }}
|
||||
{{- else }}
|
||||
volumeClaimTemplates:
|
||||
- metadata:
|
||||
name: mongodb-data
|
||||
annotations:
|
||||
{{ .Values.storage.pvc.class_path }}: {{ .Values.storage.pvc.class_name }}
|
||||
{{ .Values.volume.class_path }}: {{ .Values.volume.class_name }}
|
||||
spec:
|
||||
accessModes: [ "ReadWriteOnce" ]
|
||||
resources:
|
||||
requests:
|
||||
storage: {{ .Values.storage.pvc.size }}
|
||||
storage: {{ .Values.volume.size }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
@ -16,6 +16,8 @@
|
||||
# This is a YAML-formatted file.
|
||||
# Declare variables to be passed into your templates.
|
||||
|
||||
release_group: null
|
||||
|
||||
pod:
|
||||
affinity:
|
||||
anti:
|
||||
@ -43,8 +45,8 @@ images:
|
||||
dep_check: quay.io/stackanetes/kubernetes-entrypoint:v0.3.0
|
||||
pull_policy: IfNotPresent
|
||||
|
||||
storage:
|
||||
pvc:
|
||||
volume:
|
||||
chown_on_start: true
|
||||
enabled: false
|
||||
size: 5Gi
|
||||
class_name: general
|
||||
|
Loading…
x
Reference in New Issue
Block a user