56 lines
1.7 KiB
YAML
56 lines
1.7 KiB
YAML
|
apiVersion: apps/v1
|
||
|
kind: Deployment
|
||
|
metadata:
|
||
|
name: {{ include "rspamd.fullname" . }}
|
||
|
labels:
|
||
|
{{- include "rspamd.labels" . | nindent 4 }}
|
||
|
spec:
|
||
|
replicas: {{ .Values.replicaCount }}
|
||
|
selector:
|
||
|
matchLabels:
|
||
|
{{- include "rspamd.selectorLabels" . | nindent 6 }}
|
||
|
template:
|
||
|
metadata:
|
||
|
labels:
|
||
|
{{- include "rspamd.selectorLabels" . | nindent 8 }}
|
||
|
annotations:
|
||
|
checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }}
|
||
|
spec:
|
||
|
{{- with .Values.imagePullSecrets }}
|
||
|
imagePullSecrets:
|
||
|
{{- toYaml . | nindent 8 }}
|
||
|
{{- end }}
|
||
|
serviceAccountName: {{ include "rspamd.serviceAccountName" . }}
|
||
|
securityContext:
|
||
|
{{- toYaml .Values.podSecurityContext | nindent 8 }}
|
||
|
containers:
|
||
|
- name: rspamd
|
||
|
securityContext:
|
||
|
{{- toYaml .Values.securityContext | nindent 12 }}
|
||
|
image: "{{ .Values.rspamd.image.repository }}:{{ .Values.rspamd.image.tag }}"
|
||
|
imagePullPolicy: {{ .Values.rspamd.image.pullPolicy }}
|
||
|
ports:
|
||
|
- name: rspamd-proxy
|
||
|
containerPort: 11332
|
||
|
protocol: TCP
|
||
|
volumes:
|
||
|
- name: data
|
||
|
{{- if .Values.persistence.enabled }}
|
||
|
persistentVolumeClaim:
|
||
|
claimName: {{ if .Values.persistence.existingClaim }}{{ .Values.persistence.existingClaim }}{{- end }}
|
||
|
{{- else }}
|
||
|
emptyDir: {}
|
||
|
{{- end }}
|
||
|
{{- with .Values.nodeSelector }}
|
||
|
nodeSelector:
|
||
|
{{- toYaml . | nindent 8 }}
|
||
|
{{- end }}
|
||
|
{{- with .Values.affinity }}
|
||
|
affinity:
|
||
|
{{- toYaml . | nindent 8 }}
|
||
|
{{- end }}
|
||
|
{{- with .Values.tolerations }}
|
||
|
tolerations:
|
||
|
{{- toYaml . | nindent 8 }}
|
||
|
{{- end }}
|