blob: 61bfc7894524e2f20bf90ba295ce7fdfcd48fd2d [file] [log] [blame]
tringuyeneb9eb592020-04-01 17:51:06 +00001apiVersion: apps/v1
2kind: Deployment
3metadata: {{- include "common.resourceMetadata" (dict "suffix" "upgrade-deployment" "dot" .) | nindent 4 }}
4spec:
5 replicas: 1
6 selector:
7 matchLabels:
8 app: {{ include "common.fullname" . }}
9 template:
10 metadata:
11 labels:
12 app: {{ include "common.fullname" . }}
13 spec:
14 containers:
15 - name: {{ include "common.name" . }}
16 image: "{{ include "common.repository" . }}/{{ .Values.image }}"
17 ports:
18 - containerPort: {{ .Values.service.internalPort }}
19 name: {{ .Values.service.portName }}
20 - containerPort: {{ .Values.service.sstPort }}
21 name: {{ .Values.service.sstPortName }}
22 - containerPort: {{ .Values.service.replicationPort }}
23 name: {{ .Values.service.replicationName }}
24 - containerPort: {{ .Values.service.istPort }}
25 name: {{ .Values.service.istPortName }}
26 env:
27 - name: POD_NAMESPACE
28 valueFrom:
29 fieldRef:
30 apiVersion: v1
31 fieldPath: metadata.namespace
32 - name: MYSQL_USER
33 valueFrom:
34 secretKeyRef:
35 key: login
36 name: {{ include "common.fullname" . }}-temp-upgrade-usercred
37 - name: MYSQL_PASSWORD
38 valueFrom:
39 secretKeyRef:
40 key: password
41 name: {{ include "common.fullname" . }}-temp-upgrade-usercred
42 - name: MYSQL_DATABASE
43 value: {{ default "" .Values.config.mysqlDatabase | quote }}
44 - name: MYSQL_ROOT_PASSWORD
45 valueFrom:
46 secretKeyRef:
47 key: password
48 name: {{ include "common.fullname" . }}-temp-upgrade-root
49 subdomain: {{ .Values.service.name }}
50 hostname: {{ .Values.nameOverride }}-upgrade-deployment