You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
80 lines
2.6 KiB
80 lines
2.6 KiB
3 years ago
|
{{- if .Values.msa.enabled -}}
|
||
|
apiVersion: apps/v1
|
||
|
kind: Deployment
|
||
|
metadata:
|
||
|
name: {{ include "saberes.fullname" . }}-msa
|
||
|
labels:
|
||
|
{{- include "saberes.labels" . | nindent 4 }}
|
||
|
spec:
|
||
|
replicas: {{ .Values.msa.replicas }}
|
||
|
selector:
|
||
|
matchLabels:
|
||
|
{{- include "saberes.msaSelectorLabels" . | nindent 6 }}
|
||
|
template:
|
||
|
metadata:
|
||
|
{{- with .Values.podAnnotations }}
|
||
|
annotations:
|
||
|
{{- toYaml . | nindent 8 }}
|
||
|
{{- end }}
|
||
|
labels:
|
||
|
{{- include "saberes.msaSelectorLabels" . | nindent 8 }}
|
||
|
spec:
|
||
|
{{- with .Values.imagePullSecrets }}
|
||
|
imagePullSecrets:
|
||
|
{{- toYaml . | nindent 8 }}
|
||
|
{{- end }}
|
||
|
securityContext:
|
||
|
{{- toYaml .Values.podSecurityContext | nindent 8 }}
|
||
|
containers:
|
||
|
- name: {{ .Chart.Name }}-msa
|
||
|
securityContext:
|
||
|
{{- toYaml .Values.securityContext | nindent 12 }}
|
||
|
image: "{{ .Values.msa.image.repository }}:{{ .Values.msa.image.tag }}"
|
||
|
imagePullPolicy: {{ .Values.msa.image.pullPolicy }}
|
||
|
env:
|
||
|
- name: DOMAIN
|
||
|
value: "{{ .Release.Namespace }}.{{ .Values.msa.config.domain }}"
|
||
|
- name: HOSTNAME
|
||
|
value: "{{ include "saberes.fullname" . }}-msa.{{ .Release.Namespace }}.{{ .Values.msa.config.domain }}"
|
||
|
- name: MESSAGE_SIZE_LIMIT
|
||
|
value: "{{ .Values.msa.config.msgSizeLimit }}"
|
||
|
- name: RELAYHOST
|
||
|
value: "{{ .Values.msa.config.relayHost }}"
|
||
|
- name: RELAYNETS
|
||
|
value: "{{ .Values.msa.config.relayNets }}"
|
||
|
volumeMounts:
|
||
|
- mountPath: /var/spool/postfix
|
||
|
name: postfixspool
|
||
|
ports:
|
||
|
- name: smtp
|
||
|
containerPort: 25
|
||
|
protocol: TCP
|
||
|
readinessProbe:
|
||
|
tcpSocket:
|
||
|
port: 25
|
||
|
initialDelaySeconds: 5
|
||
|
periodSeconds: 10
|
||
|
livenessProbe:
|
||
|
tcpSocket:
|
||
|
port: 25
|
||
|
initialDelaySeconds: 10
|
||
|
periodSeconds: 20
|
||
|
resources:
|
||
|
{{- toYaml .Values.msa.resources | nindent 12 }}
|
||
|
volumes:
|
||
|
- name: postfixspool
|
||
|
{{- if .Values.persistence.enabled }}
|
||
|
persistentVolumeClaim:
|
||
|
claimName: {{ include "saberes.fullname" . }}-postfixspool
|
||
|
{{- else }}
|
||
|
emptyDir: {}
|
||
|
{{- end }}
|
||
|
{{- with .Values.msa.nodeSelector }}
|
||
|
nodeSelector:
|
||
|
{{- toYaml . | nindent 8 }}
|
||
|
{{- end }}
|
||
|
{{- with .Values.tolerations }}
|
||
|
tolerations:
|
||
|
{{- toYaml . | nindent 8 }}
|
||
|
{{- end }}
|
||
|
{{- end -}}
|