Merge branch 'add-volumeMounts' into 'master'

Add volumeMounts feature

See merge request burke-software/django-helm-chart!12
This commit is contained in:
Alexander Klimenko 2024-07-15 18:56:21 +00:00
commit 09222c605d
6 changed files with 124 additions and 2 deletions

View file

@ -62,7 +62,17 @@ spec:
{{- end }}
- configMapRef:
name: {{ include "django.fullname" . }}
{{- with .Values.beat.nodeSelector }}
{{- if .Values.volumeMounts }}
volumeMounts:
{{- range .Values.volumeMounts }}
- name: {{ .name }}
mountPath: {{ .mountPath }}
{{- if .subPath }}
subPath: {{ .subPath }}
{{- end }}
{{- end }}
{{- end }}
{{- with .Values.web.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
@ -74,5 +84,19 @@ spec:
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- if .Values.volumeMounts }}
volumes:
{{- range .Values.volumeMounts }}
- name: {{ .name }}
{{- if .source.configMap }}
configMap:
name: {{ .source.configMap.name }}
{{- end }}
{{- if .source.secret }}
secret:
secretName: {{ .source.secret.secretName }}
{{- end }}
{{- end }}
{{- end }}
{{- end }}
{{- end }}

View file

@ -57,6 +57,16 @@ spec:
{{- end }}
- configMapRef:
name: {{ include "django.fullname" . }}
{{- if .Values.volumeMounts }}
volumeMounts:
{{- range .Values.volumeMounts }}
- name: {{ .name }}
mountPath: {{ .mountPath }}
{{- if .subPath }}
subPath: {{ .subPath }}
{{- end }}
{{- end }}
{{- end }}
{{- with .Values.flower.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
@ -69,4 +79,18 @@ spec:
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- if .Values.volumeMounts }}
volumes:
{{- range .Values.volumeMounts }}
- name: {{ .name }}
{{- if .source.configMap }}
configMap:
name: {{ .source.configMap.name }}
{{- end }}
{{- if .source.secret }}
secret:
secretName: {{ .source.secret.secretName }}
{{- end }}
{{- end }}
{{- end }}
{{- end }}

View file

@ -57,4 +57,28 @@ spec:
envFrom:
- configMapRef:
name: {{ include "django.fullname" . }}
{{- if .Values.volumeMounts }}
volumeMounts:
{{- range .Values.volumeMounts }}
- name: {{ .name }}
mountPath: {{ .mountPath }}
{{- if .subPath }}
subPath: {{ .subPath }}
{{- end }}
{{- end }}
{{- end }}
{{- if .Values.volumeMounts }}
volumes:
{{- range .Values.volumeMounts }}
- name: {{ .name }}
{{- if .source.configMap }}
configMap:
name: {{ .source.configMap.name }}
{{- end }}
{{- if .source.secret }}
secret:
secretName: {{ .source.secret.secretName }}
{{- end }}
{{- end }}
{{- end }}
{{- end }}

View file

@ -83,6 +83,16 @@ spec:
{{- end }}
- configMapRef:
name: {{ include "django.fullname" . }}
{{- if .Values.volumeMounts }}
volumeMounts:
{{- range .Values.volumeMounts }}
- name: {{ .name }}
mountPath: {{ .mountPath }}
{{- if .subPath }}
subPath: {{ .subPath }}
{{- end }}
{{- end }}
{{- end }}
{{- with .Values.web.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
@ -95,3 +105,17 @@ spec:
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- if .Values.volumeMounts }}
volumes:
{{- range .Values.volumeMounts }}
- name: {{ .name }}
{{- if .source.configMap }}
configMap:
name: {{ .source.configMap.name }}
{{- end }}
{{- if .source.secret }}
secret:
secretName: {{ .source.secret.secretName }}
{{- end }}
{{- end }}
{{- end }}

View file

@ -66,6 +66,16 @@ spec:
{{- end }}
- configMapRef:
name: {{ include "django.fullname" . }}
{{- if .Values.volumeMounts }}
volumeMounts:
{{- range .Values.volumeMounts }}
- name: {{ .name }}
mountPath: {{ .mountPath }}
{{- if .subPath }}
subPath: {{ .subPath }}
{{- end }}
{{- end }}
{{- end }}
{{- with .Values.worker.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
@ -78,4 +88,18 @@ spec:
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- if .Values.volumeMounts }}
volumes:
{{- range .Values.volumeMounts }}
- name: {{ .name }}
{{- if .source.configMap }}
configMap:
name: {{ .source.configMap.name }}
{{- end }}
{{- if .source.secret }}
secret:
secretName: {{ .source.secret.secretName }}
{{- end }}
{{- end }}
{{- end }}
{{- end }}

View file

@ -28,6 +28,8 @@ env:
existingSecret: ""
volumeMounts: []
web:
replicaCount: 2
port: 8080