cert-manager-webhook-sthome/deploy/sthome-webhook/templates/deployment.yaml
2024-04-02 01:37:21 +02:00

94 lines
2.7 KiB
YAML

apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "sthome-webhook.fullname" . }}
namespace: {{ .Release.Namespace | quote }}
labels:
app: {{ include "sthome-webhook.name" . }}
app.kubernetes.io/component: webhook
app.kubernetes.io/name: webhook
app.kubernetes.io/version: {{ .Chart.AppVersion }}
chart: {{ include "sthome-webhook.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
spec:
replicas: {{ .Values.replicaCount }}
selector:
matchLabels:
app: {{ include "sthome-webhook.name" . }}
release: {{ .Release.Name }}
template:
metadata:
labels:
app: {{ include "sthome-webhook.name" . }}
release: {{ .Release.Name }}
spec:
serviceAccountName: {{ include "sthome-webhook.fullname" . }}
imagePullSecrets:
- name: {{ .Values.imageCredentials.name }}
containers:
- name: {{ .Chart.Name }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
args:
- --tls-cert-file=/tls/tls.crt
- --tls-private-key-file=/tls/tls.key
env:
- name: GROUP_NAME
value: {{ .Values.groupName | quote }}
ports:
- name: https
containerPort: 443
protocol: TCP
livenessProbe:
httpGet:
scheme: HTTPS
path: /healthz
port: https
readinessProbe:
httpGet:
scheme: HTTPS
path: /healthz
port: https
volumeMounts:
- name: certs
mountPath: /tls
readOnly: true
- name: scriptdir
mountPath: /acme
readOnly: false
- name: workdir
mountPath: /workdir
readOnly: false
- name: webroot
mountPath: /webroot
readOnly: false
resources:
{{ toYaml .Values.resources | indent 12 }}
volumes:
- name: certs
secret:
secretName: {{ include "sthome-webhook.servingCertificate" . }}
- name: scriptdir
hostPath:
path: {{ .Values.host.scriptdir }}
- name: workdir
hostPath:
path: {{ .Values.host.workdir }}
- name: webroot
hostPath:
path: {{ .Values.host.webrootdir }}
{{- with .Values.nodeSelector }}
nodeSelector:
{{ toYaml . | indent 8 }}
{{- end }}
{{- with .Values.affinity }}
affinity:
{{ toYaml . | indent 8 }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
{{ toYaml . | indent 8 }}
{{- end }}