68 lines
1.6 KiB
YAML
68 lines
1.6 KiB
YAML
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: twhelp-api-v2-deployment
|
|
spec:
|
|
selector:
|
|
matchLabels:
|
|
app: twhelp-api-v2
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: twhelp-api-v2
|
|
spec:
|
|
containers:
|
|
- name: twhelp-api-v2
|
|
image: twhelp
|
|
args: [serve]
|
|
ports:
|
|
- name: container-port
|
|
containerPort: 9234
|
|
env:
|
|
- name: APP_MODE
|
|
value: development
|
|
- name: LOG_LEVEL
|
|
value: debug
|
|
- name: DB_CONNECTION_STRING
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: twhelp-secret
|
|
key: db-connection-string
|
|
- name: RABBITMQ_CONNECTION_STRING
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: twhelp-secret
|
|
key: rabbitmq-connection-string
|
|
resources:
|
|
requests:
|
|
cpu: 100m
|
|
memory: 100Mi
|
|
limits:
|
|
cpu: 200m
|
|
memory: 300Mi
|
|
livenessProbe:
|
|
httpGet:
|
|
path: /_meta/livez
|
|
port: container-port
|
|
initialDelaySeconds: 5
|
|
periodSeconds: 5
|
|
readinessProbe:
|
|
httpGet:
|
|
path: /_meta/readyz
|
|
port: container-port
|
|
initialDelaySeconds: 5
|
|
periodSeconds: 10
|
|
---
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: twhelp-api-v2-service
|
|
spec:
|
|
ports:
|
|
- port: 9234
|
|
targetPort: 9234
|
|
protocol: TCP
|
|
name: http
|
|
selector:
|
|
app: twhelp-api-v2
|