helm-charts/conduit/templates/wellknowncustom/deployment.yaml
2024-10-05 19:35:53 +00:00

79 lines
2.7 KiB
YAML

{{- if .Values.wellknowncustom.enabled }}
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "conduit.fullname" . }}-wellknowncustom
labels:
{{- include "conduit.labels" . | nindent 4 }}
app.kubernetes.io/component: wellknowncustom
spec:
replicas: {{ .Values.wellknowncustom.replicaCount }}
selector:
matchLabels:
{{- include "conduit.selectorLabels" . | nindent 6 }}
app.kubernetes.io/component: wellknowncustom
template:
metadata:
{{- with .Values.wellknowncustom.podAnnotations }}
annotations:
{{- toYaml . | nindent 8 }}
{{- end }}
labels:
{{- include "conduit.selectorLabels" . | nindent 8 }}
app.kubernetes.io/component: wellknowncustom
{{- with .Values.wellknowncustom.podLabels }}
{{- toYaml . | nindent 8 }}
{{- end }}
type: wellknowncustom
spec:
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
serviceAccountName: {{ include "conduit.serviceAccountName" . }}
securityContext:
{{- toYaml .Values.wellknowncustom.podSecurityContext | nindent 8 }}
containers:
- name: wellknowncustom
securityContext:
{{- toYaml .Values.wellknowncustom.securityContext | nindent 12 }}
{{- with .Values.wellknowncustom.image }}
image: "{{ .registry }}/{{ .repository }}:{{ .tag }}"
{{- end }}
imagePullPolicy: {{ .Values.wellknowncustom.image.pullPolicy }}
ports:
- name: http
containerPort: {{ .Values.wellknowncustom.containerPort }}
protocol: TCP
livenessProbe:
httpGet:
path: /nginx_health
port: http
readinessProbe:
httpGet:
path: /nginx_health
port: http
resources:
{{- toYaml .Values.wellknowncustom.resources | nindent 12 }}
volumeMounts:
- name: "wellknowncustom-nginx-conf"
mountPath: "/etc/nginx/nginx.conf"
subPath: nginx.conf
readOnly: true
{{- with .Values.wellknowncustom.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.wellknowncustom.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.wellknowncustom.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
volumes:
- name: "wellknowncustom-nginx-conf"
configMap:
name: {{ include "conduit.fullname" . }}-nginx-wellknowncustom
{{- end }}