meal_homework/helmchart/templates/deployment.yaml

65 lines
1.8 KiB
YAML
Raw Normal View History

2022-02-14 00:08:25 +01:00
---
2022-02-13 22:55:18 +01:00
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "helmchart.fullname" . }}
labels:
{{- include "helmchart.labels" . | nindent 4 }}
spec:
{{- if not .Values.autoscaling.enabled }}
replicas: {{ .Values.replicaCount }}
{{- end }}
selector:
matchLabels:
{{- include "helmchart.selectorLabels" . | nindent 6 }}
template:
metadata:
{{- with .Values.podAnnotations }}
annotations:
{{- toYaml . | nindent 8 }}
{{- end }}
labels:
{{- include "helmchart.selectorLabels" . | nindent 8 }}
spec:
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
securityContext:
{{- toYaml .Values.podSecurityContext | nindent 8 }}
containers:
- name: {{ .Chart.Name }}
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
2022-02-14 00:08:25 +01:00
envFrom:
- configMapRef:
name: meal-api-config
2022-02-13 22:55:18 +01:00
ports:
- name: http
2022-02-14 00:08:25 +01:00
containerPort: 8080
2022-02-13 22:55:18 +01:00
protocol: TCP
livenessProbe:
httpGet:
2022-02-14 00:08:25 +01:00
path: /healthz
2022-02-13 22:55:18 +01:00
port: http
readinessProbe:
httpGet:
2022-02-14 00:08:25 +01:00
path: /healthz
2022-02-13 22:55:18 +01:00
port: http
resources:
{{- toYaml .Values.resources | nindent 12 }}
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}