|
1 | | -apiVersion: apps/v1 |
2 | | -kind: Deployment |
3 | | -metadata: |
4 | | - name: {{ include "oidc-guard.fullname" . }} |
5 | | - labels: |
6 | | - {{- include "oidc-guard.labels" . | nindent 4 }} |
7 | | -spec: |
8 | | - {{- if not .Values.autoscaling.enabled }} |
9 | | - replicas: {{ .Values.replicaCount }} |
10 | | - {{- end }} |
11 | | - selector: |
12 | | - matchLabels: |
13 | | - {{- include "oidc-guard.selectorLabels" . | nindent 6 }} |
14 | | - template: |
15 | | - metadata: |
16 | | - annotations: |
17 | | - checksum/config: {{ include (print $.Template.BasePath "/secret.yaml") . | sha256sum }} |
18 | | - {{- with .Values.podAnnotations }} |
19 | | - {{- toYaml . | nindent 8 }} |
20 | | - {{- end }} |
21 | | - labels: |
22 | | - {{- include "oidc-guard.selectorLabels" . | nindent 8 }} |
23 | | - spec: |
24 | | - {{- with .Values.imagePullSecrets }} |
25 | | - imagePullSecrets: |
26 | | - {{- toYaml . | nindent 8 }} |
27 | | - {{- end }} |
28 | | - serviceAccountName: {{ include "oidc-guard.serviceAccountName" . }} |
29 | | - securityContext: |
30 | | - {{- toYaml .Values.podSecurityContext | nindent 8 }} |
31 | | - containers: |
32 | | - - name: {{ .Chart.Name }} |
33 | | - env: |
34 | | - - name: ASPNETCORE_ENVIRONMENT |
35 | | - value: Production |
36 | | - {{- if .Values.settings.sslCertSecretName }} |
37 | | - - name: Certificates__Default__Path |
38 | | - value: /app/ssl/tls.crt |
39 | | - - name: Certificates__Default__KeyPath |
40 | | - value: /app/ssl/tls.key |
41 | | - {{- end }} |
42 | | - {{- if .Values.settings.cookie.clientSecretName }} |
43 | | - - name: settings__cookie__clientSecret |
44 | | - valueFrom: |
45 | | - secretKeyRef: |
46 | | - name: {{ .Values.settings.cookie.clientSecretName }} |
47 | | - key: {{ .Values.settings.cookie.clientSecretKey }} |
48 | | - {{- end }} |
49 | | - - name: settings__name |
50 | | - value: {{ include "oidc-guard.fullname" . }} |
51 | | - - name: settings__namespace |
52 | | - value: {{ .Release.Namespace }} |
53 | | - securityContext: |
54 | | - {{- toYaml .Values.securityContext | nindent 12 }} |
55 | | - image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" |
56 | | - imagePullPolicy: {{ .Values.image.pullPolicy }} |
57 | | - ports: |
58 | | - - name: http |
59 | | - containerPort: 8080 |
60 | | - protocol: TCP |
61 | | - - name: https |
62 | | - containerPort: 8443 |
63 | | - protocol: TCP |
64 | | - livenessProbe: |
65 | | - httpGet: |
66 | | - path: /health |
67 | | - port: http |
68 | | - readinessProbe: |
69 | | - httpGet: |
70 | | - path: /health |
71 | | - port: http |
72 | | - resources: |
73 | | - {{- toYaml .Values.resources | nindent 12 }} |
74 | | - volumeMounts: |
75 | | - - mountPath: /tmp |
76 | | - name: tmp-volume |
77 | | - - name: appsettings-volume |
78 | | - mountPath: /app/appsettings.Production.json |
79 | | - subPath: appsettings.Production.json |
80 | | - readOnly: true |
81 | | - {{- if .Values.settings.sslCertSecretName }} |
82 | | - - name: appsettings-ssl |
83 | | - mountPath: /app/ssl/ |
84 | | - readOnly: true |
85 | | - {{- end }} |
86 | | - volumes: |
87 | | - - name: tmp-volume |
88 | | - emptyDir: {} |
89 | | - - name: appsettings-volume |
90 | | - secret: |
91 | | - secretName: {{ include "oidc-guard.fullname" . }} |
92 | | - {{- if .Values.settings.sslCertSecretName }} |
93 | | - - name: appsettings-ssl |
94 | | - secret: |
95 | | - secretName: "{{ .Values.settings.sslCertSecretName }}" |
96 | | - {{- end }} |
97 | | - {{- with .Values.nodeSelector }} |
98 | | - nodeSelector: |
99 | | - {{- toYaml . | nindent 8 }} |
100 | | - {{- end }} |
101 | | - {{- with .Values.affinity }} |
102 | | - affinity: |
103 | | - {{- toYaml . | nindent 8 }} |
104 | | - {{- end }} |
105 | | - {{- with .Values.tolerations }} |
106 | | - tolerations: |
107 | | - {{- toYaml . | nindent 8 }} |
108 | | - {{- end }} |
| 1 | +apiVersion: apps/v1 |
| 2 | +kind: Deployment |
| 3 | +metadata: |
| 4 | + name: {{ include "oidc-guard.fullname" . }} |
| 5 | + labels: |
| 6 | + {{- include "oidc-guard.labels" . | nindent 4 }} |
| 7 | +spec: |
| 8 | + {{- if not .Values.autoscaling.enabled }} |
| 9 | + replicas: {{ .Values.replicaCount }} |
| 10 | + {{- end }} |
| 11 | + selector: |
| 12 | + matchLabels: |
| 13 | + {{- include "oidc-guard.selectorLabels" . | nindent 6 }} |
| 14 | + template: |
| 15 | + metadata: |
| 16 | + annotations: |
| 17 | + checksum/config: {{ include (print $.Template.BasePath "/secret.yaml") . | sha256sum }} |
| 18 | + {{- with .Values.podAnnotations }} |
| 19 | + {{- toYaml . | nindent 8 }} |
| 20 | + {{- end }} |
| 21 | + labels: |
| 22 | + {{- include "oidc-guard.selectorLabels" . | nindent 8 }} |
| 23 | + spec: |
| 24 | + {{- with .Values.imagePullSecrets }} |
| 25 | + imagePullSecrets: |
| 26 | + {{- toYaml . | nindent 8 }} |
| 27 | + {{- end }} |
| 28 | + serviceAccountName: {{ include "oidc-guard.serviceAccountName" . }} |
| 29 | + securityContext: |
| 30 | + {{- toYaml .Values.podSecurityContext | nindent 8 }} |
| 31 | + containers: |
| 32 | + - name: {{ .Chart.Name }} |
| 33 | + env: |
| 34 | + - name: ASPNETCORE_ENVIRONMENT |
| 35 | + value: Production |
| 36 | + {{- if .Values.settings.sslCertSecretName }} |
| 37 | + - name: Certificates__Default__Path |
| 38 | + value: /app/ssl/tls.crt |
| 39 | + - name: Certificates__Default__KeyPath |
| 40 | + value: /app/ssl/tls.key |
| 41 | + {{- end }} |
| 42 | + {{- if .Values.settings.cookie.clientSecretName }} |
| 43 | + - name: settings__cookie__clientSecret |
| 44 | + valueFrom: |
| 45 | + secretKeyRef: |
| 46 | + name: {{ .Values.settings.cookie.clientSecretName }} |
| 47 | + key: {{ .Values.settings.cookie.clientSecretKey }} |
| 48 | + {{- end }} |
| 49 | + - name: settings__name |
| 50 | + value: {{ include "oidc-guard.fullname" . }} |
| 51 | + - name: settings__namespace |
| 52 | + value: {{ .Release.Namespace }} |
| 53 | + securityContext: |
| 54 | + {{- toYaml .Values.securityContext | nindent 12 }} |
| 55 | + image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" |
| 56 | + imagePullPolicy: {{ .Values.image.pullPolicy }} |
| 57 | + ports: |
| 58 | + - name: http |
| 59 | + containerPort: 8080 |
| 60 | + protocol: TCP |
| 61 | + - name: https |
| 62 | + containerPort: 8443 |
| 63 | + protocol: TCP |
| 64 | + livenessProbe: |
| 65 | + httpGet: |
| 66 | + path: /health |
| 67 | + port: http |
| 68 | + readinessProbe: |
| 69 | + httpGet: |
| 70 | + path: /health |
| 71 | + port: http |
| 72 | + resources: |
| 73 | + {{- toYaml .Values.resources | nindent 12 }} |
| 74 | + volumeMounts: |
| 75 | + - mountPath: /tmp |
| 76 | + name: tmp-volume |
| 77 | + - name: appsettings-volume |
| 78 | + mountPath: /app/appsettings.Production.json |
| 79 | + subPath: appsettings.Production.json |
| 80 | + readOnly: true |
| 81 | + {{- if .Values.settings.sslCertSecretName }} |
| 82 | + - name: appsettings-ssl |
| 83 | + mountPath: /app/ssl/ |
| 84 | + readOnly: true |
| 85 | + {{- end }} |
| 86 | + volumes: |
| 87 | + - name: tmp-volume |
| 88 | + emptyDir: {} |
| 89 | + - name: appsettings-volume |
| 90 | + secret: |
| 91 | + secretName: {{ include "oidc-guard.fullname" . }} |
| 92 | + {{- if .Values.settings.sslCertSecretName }} |
| 93 | + - name: appsettings-ssl |
| 94 | + secret: |
| 95 | + secretName: "{{ .Values.settings.sslCertSecretName }}" |
| 96 | + {{- end }} |
| 97 | + {{- with .Values.nodeSelector }} |
| 98 | + nodeSelector: |
| 99 | + {{- toYaml . | nindent 8 }} |
| 100 | + {{- end }} |
| 101 | + {{- with .Values.affinity }} |
| 102 | + affinity: |
| 103 | + {{- toYaml . | nindent 8 }} |
| 104 | + {{- end }} |
| 105 | + {{- with .Values.tolerations }} |
| 106 | + tolerations: |
| 107 | + {{- toYaml . | nindent 8 }} |
| 108 | + {{- end }} |
0 commit comments