|
| 1 | +apiVersion: apps/v1 |
| 2 | +kind: Deployment |
| 3 | +metadata: |
| 4 | + name: {{ include "..fullname" . }} |
| 5 | + labels: |
| 6 | + {{- include "..labels" . | nindent 4 }} |
| 7 | +spec: |
| 8 | + {{- if not .Values.autoscaling.enabled }} |
| 9 | + replicas: {{ .Values.replicaCount }} |
| 10 | + {{- end }} |
| 11 | + selector: |
| 12 | + matchLabels: |
| 13 | + {{- include "..selectorLabels" . | nindent 6 }} |
| 14 | + template: |
| 15 | + metadata: |
| 16 | + {{- with .Values.podAnnotations }} |
| 17 | + annotations: |
| 18 | + {{- toYaml . | nindent 8 }} |
| 19 | + {{- end }} |
| 20 | + labels: |
| 21 | + {{- include "..selectorLabels" . | nindent 8 }} |
| 22 | + spec: |
| 23 | + {{- with .Values.imagePullSecrets }} |
| 24 | + imagePullSecrets: |
| 25 | + {{- toYaml . | nindent 8 }} |
| 26 | + {{- end }} |
| 27 | + serviceAccountName: {{ include "..serviceAccountName" . }} |
| 28 | + securityContext: |
| 29 | + {{- toYaml .Values.podSecurityContext | nindent 8 }} |
| 30 | + initContainers: |
| 31 | + - name: {{ .Chart.Name }}-init |
| 32 | + securityContext: |
| 33 | + {{- toYaml .Values.securityContext | nindent 12 }} |
| 34 | + image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" |
| 35 | + imagePullPolicy: {{ .Values.image.pullPolicy }} |
| 36 | + command: [ "/var/www/bin/migrate", "up" ] |
| 37 | + env: |
| 38 | + - name: MYSQL_HOST |
| 39 | + value: engelsystem-mariadb |
| 40 | + - name: MYSQL_USER |
| 41 | + value: engelsystem |
| 42 | + - name: MYSQL_PASSWORD |
| 43 | + value: engelsystem |
| 44 | + - name: MYSQL_DATABASE |
| 45 | + value: engelsystem |
| 46 | + containers: |
| 47 | + - name: {{ .Chart.Name }} |
| 48 | + securityContext: |
| 49 | + {{- toYaml .Values.securityContext | nindent 12 }} |
| 50 | + image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" |
| 51 | + imagePullPolicy: {{ .Values.image.pullPolicy }} |
| 52 | + ports: |
| 53 | + - name: http |
| 54 | + containerPort: {{ .Values.service.port }} |
| 55 | + protocol: TCP |
| 56 | + livenessProbe: |
| 57 | + httpGet: |
| 58 | + path: / |
| 59 | + port: http |
| 60 | + readinessProbe: |
| 61 | + httpGet: |
| 62 | + path: / |
| 63 | + port: http |
| 64 | + resources: |
| 65 | + {{- toYaml .Values.resources | nindent 12 }} |
| 66 | + env: |
| 67 | + - name: MYSQL_HOST |
| 68 | + value: engelsystem-mariadb |
| 69 | + - name: MYSQL_USER |
| 70 | + value: engelsystem |
| 71 | + - name: MYSQL_PASSWORD |
| 72 | + value: engelsystem |
| 73 | + - name: MYSQL_DATABASE |
| 74 | + value: engelsystem |
| 75 | + - name: APP_URL |
| 76 | + value: https://engelsystem.chaosdorf.space |
| 77 | + |
| 78 | + {{- with .Values.nodeSelector }} |
| 79 | + nodeSelector: |
| 80 | + {{- toYaml . | nindent 8 }} |
| 81 | + {{- end }} |
| 82 | + {{- with .Values.affinity }} |
| 83 | + affinity: |
| 84 | + {{- toYaml . | nindent 8 }} |
| 85 | + {{- end }} |
| 86 | + {{- with .Values.tolerations }} |
| 87 | + tolerations: |
| 88 | + {{- toYaml . | nindent 8 }} |
| 89 | + {{- end }} |
0 commit comments