Add volumeMounts feature
This commit is contained in:
		
							parent
							
								
									0d5921af5e
								
							
						
					
					
						commit
						fa14ce6771
					
				
					 6 changed files with 124 additions and 2 deletions
				
			
		| 
						 | 
				
			
			@ -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 }}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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 }}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -49,4 +49,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 }}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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 }}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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 }}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -24,6 +24,8 @@ env:
 | 
			
		|||
 | 
			
		||||
existingSecret: ""
 | 
			
		||||
 | 
			
		||||
volumeMounts: []
 | 
			
		||||
 | 
			
		||||
web:
 | 
			
		||||
  replicaCount: 2
 | 
			
		||||
  port: 8080
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Reference in a new issue