demo-chart/templates/deployment.yaml

54 lines
1.7 KiB
YAML
Raw Normal View History

2023-03-29 01:29:07 +00:00
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "demo-chart.fullname" . }}
labels:
{{- include "demo-chart.labels" . | nindent 4 }}
spec:
replicas: {{ .Values.replicaCount }}
selector:
matchLabels:
{{- include "demo-chart.selectorLabels" . | nindent 6 }}
template:
metadata:
{{- with .Values.podAnnotations }}
annotations:
{{- toYaml . | nindent 8 }}
{{- end }}
labels:
{{- include "demo-chart.selectorLabels" . | nindent 8 }}
spec:
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
serviceAccountName: {{ include "demo-chart.serviceAccountName" . }}
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 }}
ports:
- name: http
containerPort: {{ .Values.service.port }}
protocol: TCP
livenessProbe:
2023-04-19 02:23:15 +00:00
{{- toYaml .Values.livenessProbe | nindent 12 }}
2023-03-29 01:29:07 +00:00
readinessProbe:
2023-04-19 02:23:15 +00:00
{{- toYaml .Values.readinessProbe | nindent 12 }}
2023-03-29 01:29:07 +00:00
resources:
{{- toYaml .Values.resources | nindent 12 }}
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
affinity:
2023-04-12 02:09:30 +00:00
{{- include "demo-chart.GPUNodeAffinity" . | nindent 8 }}
2023-03-29 01:29:07 +00:00
{{- with .Values.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}