chore(build): set up deployment and service kubernetes configs

Signed-off-by: SphericalKat <amolele@gmail.com>
This commit is contained in:
Amogh Lele 2021-06-29 18:36:27 -07:00
parent d4d26e2882
commit 99efed41e0
No known key found for this signature in database
GPG Key ID: 1A44596652153B27
2 changed files with 56 additions and 0 deletions

46
deployment/deployment.yml Normal file
View File

@ -0,0 +1,46 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: katbin-service
spec:
replicas: 1
selector:
matchLabels:
app: katbin-service
template:
metadata:
labels:
app: katbin-service
spec:
nodeSelector:
"beta.kubernetes.io/os": linux
containers:
- name: katbin-service
image: atechnohazard/katbin
env:
- name: KATBIN_POOL_SIZE
value: '5'
- name: JIRACHI_POOL_SIZE
value: '5'
- name: ROCKET_PORT
value: '5000'
- name: DATABASE_URL
valueFrom:
secretKeyRef:
name: katbin-secrets
key: DATABASE_URL
- name: JIRACHI_DB_URL
valueFrom:
secretKeyRef:
name: katbin-secrets
key: DATABASE_URL
- name: ROCKET_SECRET_KEY
valueFrom:
secretKeyRef:
name: katbin-secrets
key: ROCKET_SECRET_KEY
ports:
- containerPort: 5000
name: katbin-service
imagePullPolicy: Always

10
deployment/service.yml Normal file
View File

@ -0,0 +1,10 @@
apiVersion: v1
kind: Service
metadata:
name: katbin-service
spec:
ports:
- port: 80
targetPort: 5000
selector:
app: katbin-service