helm-charts/conduit/templates/wellknown/deployment.yaml

79 lines
2.6 KiB
YAML

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