-
Notifications
You must be signed in to change notification settings - Fork 3
/
kubernetes.yaml.tpl
125 lines (125 loc) · 3.08 KB
/
kubernetes.yaml.tpl
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
apiVersion: v1
kind: Service
metadata:
name: wordpress
labels:
app: wordpress
spec:
ports:
- port: 80
targetPort: 80
selector:
app: wordpress
tier: frontend
---
apiVersion: autoscaling/v1
kind: HorizontalPodAutoscaler
metadata:
name: wordpress
spec:
scaleTargetRef:
apiVersion: apps/v1
kind: Deployment
name: wordpress
minReplicas: 2
maxReplicas: 20
targetCPUUtilizationPercentage: 70
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: wordpress
labels:
app: wordpress
spec:
replicas: 2
selector:
matchLabels:
app: wordpress
tier: frontend
strategy:
type: RollingUpdate
rollingUpdate:
maxSurge: 1
maxUnavailable: 0
template:
metadata:
labels:
app: wordpress
tier: frontend
spec:
securityContext:
fsGroup: 33
containers:
- image: gcr.io/GOOGLE_CLOUD_PROJECT/sysrant:COMMIT_SHA
name: wordpress
resources:
limits:
memory: "150Mi"
cpu: "100m"
volumeMounts:
- name: config-volume
mountPath: /etc/bucket
env:
- name: DB_NAME
value: name
- name: DB_USER
value: user
- name: DB_HOST
value: 10.0.0.1
- name: DB_CHARSET
value: utf8mb4
- name: DB_COLLATE
value: ''
- name: AUTH_KEY
valueFrom:
secretKeyRef:
name: wordpress-secrets
key: AUTH_KEY
- name: SECURE_AUTH_KEY
valueFrom:
secretKeyRef:
name: wordpress-secrets
key: SECURE_AUTH_KEY
- name: LOGGED_IN_KEY
valueFrom:
secretKeyRef:
name: wordpress-secrets
key: LOGGED_IN_KEY
- name: NONCE_KEY
valueFrom:
secretKeyRef:
name: wordpress-secrets
key: NONCE_KEY
- name: AUTH_SALT
valueFrom:
secretKeyRef:
name: wordpress-secrets
key: AUTH_SALT
- name: SECURE_AUTH_SALT
valueFrom:
secretKeyRef:
name: wordpress-secrets
key: SECURE_AUTH_SALT
- name: LOGGED_IN_SALT
valueFrom:
secretKeyRef:
name: wordpress-secrets
key: LOGGED_IN_SALT
- name: NONCE_SALT
valueFrom:
secretKeyRef:
name: wordpress-secrets
key: NONCE_SALT
- name: DB_PASSWORD
valueFrom:
secretKeyRef:
name: wordpress-secrets
key: DB_PASSWORD
volumes:
- name: config-volume
configMap:
name: bucket
items:
- key: bucket.json
path: keys.json