|
| 1 | +apiVersion: apps/v1 |
| 2 | +kind: Deployment |
| 3 | +metadata: |
| 4 | + name: {{ include "huginn.fullname" . }}-web |
| 5 | + labels: |
| 6 | + {{- include "huginn.labels" . | nindent 4 }} |
| 7 | + app.kubernetes.io/component: web |
| 8 | +spec: |
| 9 | + strategy: |
| 10 | + type: {{ .Values.web.updateStrategy }} |
| 11 | + replicas: {{ .Values.web.replicaCount }} |
| 12 | + selector: |
| 13 | + matchLabels: |
| 14 | + {{- include "huginn.selectorLabels" . | nindent 6 }} |
| 15 | + app.kubernetes.io/component: web |
| 16 | + template: |
| 17 | + metadata: |
| 18 | + annotations: |
| 19 | + checksum/configmap: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }} |
| 20 | + checksum/secret: {{ include (print $.Template.BasePath "/secret.yaml") . | sha256sum }} |
| 21 | + {{- with .Values.web.podAnnotations }} |
| 22 | + {{- toYaml . | nindent 8 }} |
| 23 | + {{- end }} |
| 24 | + labels: |
| 25 | + {{- include "huginn.selectorLabels" . | nindent 8 }} |
| 26 | + app.kubernetes.io/component: web |
| 27 | + spec: |
| 28 | + {{- with .Values.imagePullSecrets }} |
| 29 | + imagePullSecrets: |
| 30 | + {{- toYaml . | nindent 8 }} |
| 31 | + {{- end }} |
| 32 | + serviceAccountName: {{ include "huginn.serviceAccountName" . }} |
| 33 | + securityContext: |
| 34 | + {{- toYaml .Values.web.podSecurityContext | nindent 8 }} |
| 35 | + containers: |
| 36 | + - name: {{ .Chart.Name }}-web |
| 37 | + securityContext: |
| 38 | + {{- toYaml .Values.web.securityContext | nindent 12 }} |
| 39 | + image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" |
| 40 | + imagePullPolicy: {{ .Values.image.pullPolicy }} |
| 41 | + envFrom: |
| 42 | + - configMapRef: |
| 43 | + name: {{ include "huginn.fullname" . }} |
| 44 | + - secretRef: |
| 45 | + name: {{ include "huginn.fullname" . }} |
| 46 | + ports: |
| 47 | + - name: http |
| 48 | + containerPort: {{ .Values.web.port }} |
| 49 | + protocol: TCP |
| 50 | + livenessProbe: |
| 51 | + httpGet: |
| 52 | + path: / |
| 53 | + port: http |
| 54 | + readinessProbe: |
| 55 | + httpGet: |
| 56 | + path: / |
| 57 | + port: http |
| 58 | + resources: |
| 59 | + {{- toYaml .Values.web.resources | nindent 12 }} |
| 60 | + {{- with .Values.web.nodeSelector }} |
| 61 | + nodeSelector: |
| 62 | + {{- toYaml . | nindent 8 }} |
| 63 | + {{- end }} |
| 64 | + {{- with .Values.web.affinity }} |
| 65 | + affinity: |
| 66 | + {{- toYaml . | nindent 8 }} |
| 67 | + {{- end }} |
| 68 | + {{- with .Values.web.tolerations }} |
| 69 | + tolerations: |
| 70 | + {{- toYaml . | nindent 8 }} |
| 71 | + {{- end }} |
0 commit comments