-
Notifications
You must be signed in to change notification settings - Fork 48
/
Copy pathdeployment.yaml
49 lines (47 loc) · 1.37 KB
/
deployment.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ template "roar-db.name" . }}
labels:
app: {{ template "roar-db.name" . }}
chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
release: {{ .Release.Name }}
namespace: {{ .Values.namespace }}
spec:
replicas: {{ .Values.replicaCount }}
selector:
matchLabels:
app: {{ template "roar-db.name" . }}
template:
metadata:
labels:
app: {{ template "roar-db.name" . }}
spec:
containers:
- name: {{ .Chart.Name }}
image: quay.io/techupskills/roar-db:v2
imagePullPolicy: Always
ports:
- name: {{ .Values.deployment.ports.name }}
containerPort: {{ .Values.deployment.ports.containerPort }}
env:
- name: MYSQL_DATABASE
valueFrom:
configMapKeyRef:
name: mysql-configmap
key: mysql.database
- name: MYSQL_PASSWORD
valueFrom:
secretKeyRef:
name: mysqlsecret
key: mysqlpassword
- name: MYSQL_ROOT_PASSWORD
valueFrom:
secretKeyRef:
name: mysqlsecret
key: mysqlrootpassword
- name: MYSQL_USER
valueFrom:
configMapKeyRef:
name: mysql-configmap
key: mysql.user