forked from apk8s/book-source
-
Notifications
You must be signed in to change notification settings - Fork 0
/
30-deployment.yml
65 lines (65 loc) · 1.75 KB
/
30-deployment.yml
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
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: web-keycloak
namespace: data
spec:
serviceName: web-keycloak
replicas: 1
revisionHistoryLimit: 1
selector:
matchLabels:
app: web-keycloak
template:
metadata:
labels:
app: web-keycloak
spec:
initContainers:
- name: keycloak-init-chown
image: alpine:3.10.1
imagePullPolicy: IfNotPresent
volumeMounts:
- name: keycloak-db
mountPath: /data
command: ["chown"]
args: ["-R","1000:1000","/data"]
containers:
- name: web-keycloak
image: jboss/keycloak:6.0.1
imagePullPolicy: IfNotPresent
env:
- name: PROXY_ADDRESS_FORWARDING
value: "true"
- name: KEYCLOAK_HOSTNAME
value: "auth.data.dev4.apk8s.dev"
- name: KEYCLOAK_USER
valueFrom:
secretKeyRef:
name: keycloak
key: keycloak_user
- name: KEYCLOAK_PASSWORD
valueFrom:
secretKeyRef:
name: keycloak
key: keycloak_password
- name: KEYSTORE_PASSWORD
valueFrom:
secretKeyRef:
name: keycloak
key: keystore_password
ports:
- name: http-web
containerPort: 8080
volumeMounts:
- name: keycloak-db
mountPath: /opt/jboss/keycloak/standalone/data
volumeClaimTemplates:
- metadata:
name: keycloak-db
spec:
storageClassName: rook-ceph-block
accessModes: [ ReadWriteOnce ]
resources:
requests:
storage: 5Gi