Make environment of migrate job identical to the regular web container deployment, as it should be.
This commit is contained in:
		
							parent
							
								
									74288199f6
								
							
						
					
					
						commit
						4c7256e5c9
					
				
					 1 changed files with 6 additions and 12 deletions
				
			
		| 
						 | 
					@ -39,12 +39,6 @@ spec:
 | 
				
			||||||
        {{- end }}
 | 
					        {{- end }}
 | 
				
			||||||
        command: {{ .Values.migrationJob.command | default (list "./manage.py" "migrate") | toJson }}
 | 
					        command: {{ .Values.migrationJob.command | default (list "./manage.py" "migrate") | toJson }}
 | 
				
			||||||
        env:
 | 
					        env:
 | 
				
			||||||
          - name: DEBUG
 | 
					 | 
				
			||||||
            value: "False"
 | 
					 | 
				
			||||||
{{- if .Values.env.secret.DATABASE_URL }}
 | 
					 | 
				
			||||||
          - name: DATABASE_URL
 | 
					 | 
				
			||||||
            value: {{ .Values.env.secret.DATABASE_URL }}
 | 
					 | 
				
			||||||
{{- end }}
 | 
					 | 
				
			||||||
{{- if .Values.postgresql.enabled }}
 | 
					{{- if .Values.postgresql.enabled }}
 | 
				
			||||||
          - name: DATABASE_PASSWORD
 | 
					          - name: DATABASE_PASSWORD
 | 
				
			||||||
            valueFrom:
 | 
					            valueFrom:
 | 
				
			||||||
| 
						 | 
					@ -52,13 +46,13 @@ spec:
 | 
				
			||||||
                name: {{ default (include "django.postgresql.fullname" .) .Values.postgresql.auth.existingSecret }}
 | 
					                name: {{ default (include "django.postgresql.fullname" .) .Values.postgresql.auth.existingSecret }}
 | 
				
			||||||
                key: postgres-password
 | 
					                key: postgres-password
 | 
				
			||||||
{{- end }}
 | 
					{{- end }}
 | 
				
			||||||
          - name: SECRET_KEY
 | 
					 | 
				
			||||||
            value: {{ required "env.secret.SECRET_KEY is a required value." .Values.env.secret.SECRET_KEY }}
 | 
					 | 
				
			||||||
        {{- range $k, $v := .Values.env.normal }}
 | 
					 | 
				
			||||||
          - name: {{ $k }}
 | 
					 | 
				
			||||||
            value: {{ $v | quote }}
 | 
					 | 
				
			||||||
        {{- end }}
 | 
					 | 
				
			||||||
        envFrom:
 | 
					        envFrom:
 | 
				
			||||||
 | 
					          - secretRef:
 | 
				
			||||||
 | 
					              name: {{ include "django.fullname" . }}
 | 
				
			||||||
 | 
					          {{- if .Values.existingSecret }}
 | 
				
			||||||
 | 
					          - secretRef:
 | 
				
			||||||
 | 
					              name: {{ .Values.existingSecret }}
 | 
				
			||||||
 | 
					          {{- end }}
 | 
				
			||||||
          - configMapRef:
 | 
					          - configMapRef:
 | 
				
			||||||
              name: {{ include "django.fullname" . }}
 | 
					              name: {{ include "django.fullname" . }}
 | 
				
			||||||
        {{- with .Values.extraVolumeMounts }}
 | 
					        {{- with .Values.extraVolumeMounts }}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Reference in a new issue