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.
90 lines
2.9 KiB
90 lines
2.9 KiB
3 years ago
|
apiVersion: apps/v1
|
||
3 years ago
|
kind: {{ .Values.postfix.kind }}
|
||
3 years ago
|
metadata:
|
||
|
name: {{ include "postfix.fullname" . }}
|
||
|
labels:
|
||
|
{{- include "postfix.labels" . | nindent 4 }}
|
||
|
spec:
|
||
|
{{- if not .Values.autoscaling.enabled }}
|
||
|
replicas: {{ .Values.replicaCount }}
|
||
|
{{- end }}
|
||
|
selector:
|
||
|
matchLabels:
|
||
|
{{- include "postfix.selectorLabels" . | nindent 6 }}
|
||
|
template:
|
||
|
metadata:
|
||
|
{{- with .Values.podAnnotations }}
|
||
|
annotations:
|
||
|
{{- toYaml . | nindent 8 }}
|
||
|
{{- end }}
|
||
|
labels:
|
||
|
{{- include "postfix.selectorLabels" . | nindent 8 }}
|
||
|
spec:
|
||
|
{{- with .Values.imagePullSecrets }}
|
||
|
imagePullSecrets:
|
||
|
{{- toYaml . | nindent 8 }}
|
||
|
{{- end }}
|
||
|
securityContext:
|
||
|
{{- toYaml .Values.podSecurityContext | nindent 8 }}
|
||
|
containers:
|
||
|
- name: {{ .Chart.Name }}
|
||
|
securityContext:
|
||
|
{{- toYaml .Values.securityContext | nindent 12 }}
|
||
|
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
|
||
|
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||
|
env:
|
||
|
- name: DOMAIN
|
||
|
value: {{ .Values.postfix.domain | quote }}
|
||
3 years ago
|
- name: HOSTNAME
|
||
|
valueFrom:
|
||
|
fieldRef:
|
||
|
fieldPath: spec.nodeName
|
||
3 years ago
|
- name: MESSAGE_SIZE_LIMIT
|
||
|
value: {{ .Values.postfix.messageSizeLimit | quote }}
|
||
|
- name: RELAYHOST
|
||
|
value: {{ .Values.postfix.relayHost | quote }}
|
||
|
- name: RELAYNETS
|
||
|
value: {{ .Values.postfix.relayNets | quote }}
|
||
|
- name: SENDER_BCC
|
||
|
value: {{ .Values.postfix.senderBcc | quote }}
|
||
|
ports:
|
||
|
- name: smtp
|
||
|
containerPort: 25
|
||
|
protocol: TCP
|
||
|
livenessProbe:
|
||
|
tcpSocket:
|
||
|
port: 25
|
||
|
initialDelaySeconds: 10
|
||
|
periodSeconds: 15
|
||
|
readinessProbe:
|
||
|
tcpSocket:
|
||
|
port: 25
|
||
|
initialDelaySeconds: 10
|
||
|
periodSeconds: 15
|
||
|
resources:
|
||
|
{{- toYaml .Values.resources | nindent 12 }}
|
||
|
{{- with .Values.nodeSelector }}
|
||
|
nodeSelector:
|
||
|
{{- toYaml . | nindent 8 }}
|
||
|
{{- end }}
|
||
|
affinity:
|
||
3 years ago
|
podAntiAffinity:
|
||
|
preferredDuringSchedulingIgnoredDuringExecution:
|
||
3 years ago
|
- weight: 100
|
||
|
podAffinityTerm:
|
||
|
labelSelector:
|
||
|
matchExpressions:
|
||
|
- key: app.kubernetes.io/name
|
||
|
operator: In
|
||
|
values:
|
||
|
- {{ include "postfix.name" . }}
|
||
|
- key: app.kubernetes.io/instance
|
||
|
operator: In
|
||
|
values:
|
||
|
- {{ .Release.Name }}
|
||
|
topologyKey: "kubernetes.io/hostname"
|
||
3 years ago
|
{{- with .Values.tolerations }}
|
||
|
tolerations:
|
||
|
{{- toYaml . | nindent 8 }}
|
||
|
{{- end }}
|