|
1 | 1 | --- |
2 | 2 | apiVersion: apps/v1 |
3 | | -{{- if $.Values.storage }} |
4 | | -kind: StatefulSet |
5 | | -{{- else }} |
6 | 3 | kind: Deployment |
7 | | -{{- end }} |
8 | 4 | metadata: |
9 | 5 | name: {{ include "sourcebot.fullname" $ }} |
10 | 6 | labels: |
11 | 7 | {{- include "sourcebot.labels" $ | nindent 4 }} |
12 | 8 | spec: |
13 | | - {{- if $.Values.storage }} |
14 | | - serviceName: {{ include "sourcebot.fullname" $ }} |
15 | | - {{- end }} |
16 | | - {{- if not $.Values.autoscaling.enabled }} |
17 | 9 | replicas: {{ $.Values.replicaCount }} |
18 | | - {{- end }} |
19 | 10 | selector: |
20 | 11 | matchLabels: |
21 | 12 | {{- include "sourcebot.selectorLabels" $ | nindent 6 }} |
|
40 | 31 | securityContext: |
41 | 32 | {{- toYaml . | nindent 8 }} |
42 | 33 | {{- end }} |
| 34 | + {{- with $.Values.initContainers }} |
| 35 | + initContainers: |
| 36 | + {{- toYaml . | nindent 8 }} |
| 37 | + {{- end }} |
43 | 38 | containers: |
44 | 39 | - name: {{ .Chart.Name }} |
45 | 40 | {{- with $.Values.containerSecurityContext }} |
|
55 | 50 | args: {{ toYaml . | nindent 12 }} |
56 | 51 | {{- end }} |
57 | 52 | env: |
| 53 | + {{- if and $.Values.ingress.enabled (gt len ($.Values.ingress.hosts) 0) }} |
| 54 | + - name: AUTH_URL |
| 55 | + value: {{ (index $.Values.ingress.hosts 0).host | printf "https://%s" }} |
| 56 | + {{- end }} |
58 | 57 | - name: CONFIG_PATH |
59 | 58 | value: /etc/sourcebot/config.json |
60 | 59 | {{- if $.Values.license }} |
@@ -113,10 +112,6 @@ spec: |
113 | 112 | mountPath: /etc/sourcebot/config.json |
114 | 113 | subPath: config.json |
115 | 114 | readOnly: true |
116 | | - {{- if $.Values.storage }} |
117 | | - - name: sourcebot-data |
118 | | - mountPath: /data |
119 | | - {{- end }} |
120 | 115 | {{- with $.Values.volumeMounts }} |
121 | 116 | {{- toYaml . | nindent 12 }} |
122 | 117 | {{- end }} |
@@ -145,15 +140,3 @@ spec: |
145 | 140 | tolerations: |
146 | 141 | {{- toYaml . | nindent 8 }} |
147 | 142 | {{- end }} |
148 | | - {{- if $.Values.storage }} |
149 | | - volumeClaimTemplates: |
150 | | - - metadata: |
151 | | - name: sourcebot-data |
152 | | - spec: |
153 | | - accessModes: |
154 | | - {{- $.Values.storage.accessModes | toYaml | nindent 10 }} |
155 | | - storageClassName: {{ $.Values.storage.className }} |
156 | | - resources: |
157 | | - requests: |
158 | | - storage: {{ $.Values.storage.size }} |
159 | | - {{- end }} |
0 commit comments