-
Notifications
You must be signed in to change notification settings - Fork 29
/
deployment.yml
95 lines (95 loc) · 2.31 KB
/
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
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
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: api
annotations:
description: AntiNex API - Django REST Framework with JWT and Swagger - Celery Producer
runtime: python3
labels:
antinex: api
purpose: rest
layer: rest
auth: jwt
toolchain: swagger
messaging: redis
cache: redis
pubsub: publisher
spec:
replicas: 2
selector:
matchLabels:
app: api
frontend: enabled
template:
metadata:
labels:
app: api
purpose: rest
layer: rest
auth: jwt
toolchain: swagger
messaging: redis
cache: redis
pubsub: publisher
frontend: enabled
spec:
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: frontend
operator: In
values:
- enabled
hostname: api
restartPolicy: Always
containers:
- image: jayjohnson/antinex-api:latest
imagePullPolicy: Always
name: api
ports:
- containerPort: 8010
resources: {}
command:
- /bin/bash
- -c
- cd /opt/antinex/api &&
. /opt/venv/bin/activate &&
source /opt/antinex/api/envs/k8.env &&
/opt/antinex/api/run-django.sh
env:
- name: DJANGO_SECRET_KEY
valueFrom:
secretKeyRef:
name: api.webserver
key: secret_key
- name: POSTGRES_USER
valueFrom:
secretKeyRef:
name: api.db
key: username
- name: POSTGRES_PASSWORD
valueFrom:
secretKeyRef:
name: api.db
key: password
- name: POSTGRES_DB
valueFrom:
secretKeyRef:
name: api.db
key: dbname
- name: S3_ACCESS_KEY
valueFrom:
secretKeyRef:
name: minio-s3-access
key: access_key
- name: S3_SECRET_KEY
valueFrom:
secretKeyRef:
name: minio-s3-access
key: secret_key
- name: S3_ADDRESS
value: minio-service:9000
- name: S3_REGION_NAME
value: us-east-1