Krzysztof Kuzmicki | bae8d83 | 2021-11-24 12:00:45 +0100 | [diff] [blame^] | 1 | apiVersion: apps/v1 |
| 2 | kind: Deployment |
| 3 | metadata: |
| 4 | name: {{ include "pmhttpsserver.fullname" . }} |
| 5 | namespace: {{ include "pmhttpsserver.namespace" . }} |
| 6 | labels: |
| 7 | {{ include "pmhttpsserver.labels" . | nindent 4 }} |
| 8 | spec: |
| 9 | selector: |
| 10 | matchLabels: |
| 11 | {{ include "pmhttpsserver.selectorLabels" . | nindent 6 }} |
| 12 | template: |
| 13 | metadata: |
| 14 | labels: |
| 15 | {{ include "pmhttpsserver.selectorLabels" . | nindent 8 }} |
| 16 | spec: |
| 17 | containers: |
| 18 | - name: {{ .Chart.Name }} |
| 19 | image: '{{ include "repositoryGenerator.repository" . }}/{{ .Values.image.repository }}:{{ .Values.image.tag }}' |
| 20 | imagePullPolicy: {{ .Values.image.pullPolicy }} |
| 21 | ports: |
| 22 | - name: http |
| 23 | containerPort: 80 |
| 24 | protocol: TCP |
| 25 | - name: http2 |
| 26 | containerPort: 8080 |
| 27 | protocol: TCP |
| 28 | - name: https |
| 29 | containerPort: 443 |
| 30 | protocol: TCP |
| 31 | volumeMounts: |
| 32 | - name: certstore |
| 33 | mountPath: {{ .Values.certsDir }} |
| 34 | volumes: |
| 35 | - name: certstore |
| 36 | projected: |
| 37 | sources: |
| 38 | - secret: |
| 39 | name: '{{.Values.certificates.name}}-secret' |
| 40 | items: |
| 41 | - key: tls.key |
| 42 | path: key.pem |
| 43 | - key: tls.crt |
| 44 | path: keystore.pem |
| 45 | - key: ca.crt |
| 46 | path: truststore.pem |