helm-chart

git clone git://archive.git.mtrnord.blog/erooster-mail/helm-chart.git
Log | Files | Refs | README

deployment.yaml (1964B)


      1 apiVersion: apps/v1
      2 kind: Deployment
      3 metadata:
      4   name: {{ include "erooster.fullname" . }}
      5   labels:
      6     {{- include "erooster.labels" . | nindent 4 }}
      7 spec:
      8   replicas: {{ .Values.replicaCount }}
      9   selector:
     10     matchLabels:
     11       {{- include "erooster.selectorLabels" . | nindent 6 }}
     12   template:
     13     metadata:
     14       {{- with .Values.podAnnotations }}
     15       annotations:
     16         {{- toYaml . | nindent 8 }}
     17       {{- end }}
     18       labels:
     19         {{- include "erooster.selectorLabels" . | nindent 8 }}
     20     spec:
     21       {{- with .Values.image.pullSecrets }}
     22       imagePullSecrets:
     23         {{- toYaml . | nindent 8 }}
     24       {{- end }}
     25       securityContext:
     26         {{- toYaml .Values.podSecurityContext | nindent 8 }}
     27       containers:
     28         - name: {{ .Chart.Name }}
     29           securityContext:
     30             {{- toYaml .Values.securityContext | nindent 12 }}
     31           image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
     32           imagePullPolicy: {{ .Values.image.pullPolicy }}
     33           ports:
     34             - name: imap
     35               containerPort: 143
     36             - name: imap-encrypted
     37               containerPort: 993
     38             - name: smtp
     39               containerPort: 25
     40             - name: smtp-encrypted
     41               containerPort: 465
     42             - name: http
     43               containerPort: 80
     44               protocol: TCP
     45           livenessProbe:
     46             httpGet:
     47               path: /
     48               port: http
     49           readinessProbe:
     50             httpGet:
     51               path: /
     52               port: http
     53           resources:
     54             {{- toYaml .Values.resources | nindent 12 }}
     55       {{- with .Values.nodeSelector }}
     56       nodeSelector:
     57         {{- toYaml . | nindent 8 }}
     58       {{- end }}
     59       {{- with .Values.affinity }}
     60       affinity:
     61         {{- toYaml . | nindent 8 }}
     62       {{- end }}
     63       {{- with .Values.tolerations }}
     64       tolerations:
     65         {{- toYaml . | nindent 8 }}
     66       {{- end }}