70 lines
1.7 KiB
YAML
70 lines
1.7 KiB
YAML
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
labels:
|
|
app: {{ .Values.app.name }}
|
|
name: {{ .Values.app.name }}
|
|
spec:
|
|
replicas: {{ .Values.app.replicaCount }}
|
|
selector:
|
|
matchLabels:
|
|
app: {{ .Values.app.name }}
|
|
revisionHistoryLimit: 1
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: {{ .Values.app.name }}
|
|
spec:
|
|
{{- with .Values.securityContext }}
|
|
securityContext:
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
containers:
|
|
- name: {{ .Values.app.name }}
|
|
image: {{ .Values.app.image }}
|
|
imagePullPolicy: Never
|
|
|
|
command: ["uvicorn", "app:api", "--host", "0.0.0.0", "--port", "{{ .Values.app.containerPort }}"]
|
|
|
|
ports:
|
|
- name: {{ .Values.app.portName }}
|
|
containerPort: {{ .Values.app.containerPort }}
|
|
protocol: TCP
|
|
|
|
livenessProbe:
|
|
httpGet:
|
|
path: /healthz
|
|
port: {{ .Values.app.portName }}
|
|
readinessProbe:
|
|
httpGet:
|
|
path: /healthz
|
|
port: {{ .Values.app.portName }}
|
|
|
|
resources:
|
|
{{- toYaml .Values.resources | nindent 12 }}
|
|
# command: ["python", "sleep.py"]
|
|
|
|
{{ if (default .Values.useConfigMap false) }}
|
|
env:
|
|
- name: HELLO_NAME
|
|
valueFrom:
|
|
configMapKeyRef:
|
|
name: env-variabelen
|
|
key: naam
|
|
{{ end }}
|
|
|
|
{{- with .Values.nodeSelector }}
|
|
nodeSelector:
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
|
|
{{- with .Values.affinity }}
|
|
affinity:
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
|
|
{{- with .Values.tolerations }}
|
|
tolerations:
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|