Interlegis Public Rancher Charts for Kubernetes
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.

100 lines
3.2 KiB

apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "snappymail.fullname" . }}
labels:
{{- include "snappymail.labels" . | nindent 4 }}
spec:
{{- if not .Values.autoscaling.enabled }}
replicas: {{ .Values.replicaCount }}
{{- end }}
selector:
matchLabels:
{{- include "snappymail.selectorLabels" . | nindent 6 }}
strategy:
type: Recreate
template:
metadata:
{{- with .Values.podAnnotations }}
annotations:
{{- toYaml . | nindent 8 }}
{{- end }}
labels:
{{- include "snappymail.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: UPLOAD_MAX_SIZE
value: {{ .Values.snappymail.uploadMaxSize | quote }}
- name: LOG_TO_STDERR
value: {{ .Values.snappymail.logToStderr | quote }}
- name: MEMORY_LIMIT
value: {{ .Values.snappymail.memoryLimit | quote }}
- name: SECURE_COOKIES
value: {{ .Values.snappymail.secureCookies | quote }}
volumeMounts:
- mountPath: /snappymail/data
name: snappymaildata
ports:
- name: http
containerPort: 8888
protocol: TCP
livenessProbe:
httpGet:
path: /
port: http
initialDelaySeconds: 60
periodSeconds: 5
successThreshold: 1
failureThreshold: 3
timeoutSeconds: 2
readinessProbe:
httpGet:
path: /
port: http
initialDelaySeconds: 60
periodSeconds: 5
successThreshold: 2
failureThreshold: 3
timeoutSeconds: 2
resources:
{{- toYaml .Values.resources | nindent 12 }}
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
affinity:
podAntiAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- weight: 100
podAffinityTerm:
labelSelector:
matchExpressions:
- key: app.kubernetes.io/name
operator: In
values:
- {{ include "snappymail.name" . }}
- key: app.kubernetes.io/instance
operator: In
values:
- {{ .Release.Name }}
topologyKey: "kubernetes.io/hostname"
{{- with .Values.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
volumes:
- name: snappymaildata
persistentVolumeClaim:
claimName: {{ include "snappymail.fullname" . }}-data