forked from bcgov/zeva
-
Notifications
You must be signed in to change notification settings - Fork 0
/
k8s-django.yaml
83 lines (83 loc) · 2.48 KB
/
k8s-django.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
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
apiVersion: v1
kind: Service
metadata:
name: django-backend
spec:
selector:
app: django-backend
ports:
- port: 10102
targetPort: 10102
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: django-backend
spec:
replicas: 1
minReadySeconds: 20
template:
metadata:
name: django-backend-pod
labels:
app: django-backend
spec:
containers:
- name: django-backend
image: django-backend
ports:
- containerPort: 10102
env:
- name: DATABASE_NAME
value: 'zeva'
- name: DATABASE_USER
value: 'zeva'
- name: DATABASE_PASSWORD
value: 'zevadev'
- name: DATABASE_ENGINE
value: 'postgresql'
- name: DATABASE_SERVICE_NAME
value: 'postgresql'
- name: POSTGRESQL_SERVICE_HOST
value: 'postgres'
- name: POSTGRESQL_SERVICE_PORT
value: '5432'
- name: KEYCLOAK_CERTS_URL
value: 'http://keycloak:8080/auth/realms/zeva/protocol/openid-connect/certs'
- name: KEYCLOAK_REALM
value: 'http://localhost:8888/auth/realms/zeva'
- name: KEYCLOAK_AUTHORITY
value: 'http://localhost:8888/auth/realms/zeva'
- name: KEYCLOAK_ISSUER
value: 'http://localhost:8888/auth/realms/zeva'
- name: KEYCLOAK_AUDIENCE
value: 'zeva-app'
- name: KEYCLOAK_CLIENT_ID
value: 'zeva-app'
- name: KEYCLOAK_SA_BASEURL
value: 'http://keycloak:8080'
- name: KEYCLOAK_SA_REALM
value: 'zeva'
- name: KEYCLOAK_SA_CLIENT_ID
value: 'zeva-app-sa'
- name: KEYCLOAK_SA_CLIENT_SECRET
value: '06dc71d6-1800-4f5d-b7b3-4c4fda226599'
- name: DJANGO_DEBUG
value: 'True'
- name: RABBITMQ_VHOST
value: '/zeva'
- name: RABBITMQ_USER
value: 'rabbitmq'
- name: RABBITMQ_PASSWORD
value: 'rabbitmq'
- name: RABBITMQ_HOST
value: 'rabbit'
- name: RABBITMQ_PORT
value: '5672'
initContainers:
- name: init-psql
image: busybox:1.28
command: ['sh', '-c', 'until nslookup postgres; do echo waiting for postgres; sleep 5; done;']
selector:
matchLabels:
app: django-backend