Commit 45ea308 1 parent dbe5e3b commit 45ea308 Copy full SHA for 45ea308
File tree 4 files changed +64
-3
lines changed
4 files changed +64
-3
lines changed Original file line number Diff line number Diff line change 1
1
apiVersion : v2
2
2
name : backend
3
- version : 0.3 .0
3
+ version : 0.4 .0
4
4
description : Backend of the Snoty application suite
5
5
type : application
6
6
home : https://snoty.me
Original file line number Diff line number Diff line change @@ -17,10 +17,26 @@ spec:
17
17
labels : {{- include "common.labels.standard" ( dict "customLabels" $podLabels "context" $ ) | nindent 8 }}
18
18
annotations :
19
19
snoty.me/checksum-config : {{ include "snoty.config" . | sha256sum }}
20
+ snoty.me/checksum-scripts : {{ include (print $.Template.BasePath "/scripts-configmap.yaml") . | sha256sum }}
21
+
20
22
{{- if .Values.podAnnotations }}
21
23
{{- include "common.tplvalues.render" (dict "value" .Values.podAnnotations "context" $) | nindent 8 }}
22
24
{{- end }}
23
25
spec :
26
+ initContainers :
27
+ {{- if .Values.download.integrations }}
28
+ - name : download-integrations
29
+ image : alpine:3.20
30
+ volumeMounts :
31
+ - name : scripts
32
+ mountPath : /scripts
33
+ - name : integrations
34
+ mountPath : /integrations
35
+ command :
36
+ - sh
37
+ - -c
38
+ - " cd /scripts && ./download-integrations.sh"
39
+ {{- end }}
24
40
containers :
25
41
- name : {{ include "common.names.fullname" . }}
26
42
image : {{ template "snoty.image" . }}
48
64
- mountPath : /app/application.yml
49
65
name : app-config
50
66
subPath : application.yml
67
+ - name : integrations
68
+ mountPath : /integrations
51
69
{{- if .Values.customStartupProbe }}
52
70
startupProbe : {{- include "common.tplvalues.render" (dict "value" .Values.customStartupProbe "context" $) | nindent 12 }}
53
71
{{- else if .Values.startupProbe.enabled }}
91
109
- name : app-config
92
110
configMap :
93
111
name : {{ include "common.names.fullname" . }}
94
-
95
-
112
+ - name : scripts
113
+ configMap :
114
+ name : {{ printf "%s-scripts" (include "common.names.fullname" .) }}
115
+ defaultMode : 0755
116
+ - name : integrations
117
+ emptyDir :
Original file line number Diff line number Diff line change
1
+ apiVersion : v1
2
+ kind : ConfigMap
3
+ metadata :
4
+ name : {{ include "common.names.fullname" . }}-scripts
5
+ namespace : {{ .Release.Namespace | quote }}
6
+ labels : {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }}
7
+ {{- if .Values.commonAnnotations }}
8
+ annotations : {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
9
+ {{- end }}
10
+ data :
11
+ integrations.json : {{ toJson .Values.download.integrations | quote }}
12
+ download-integrations.sh : |-
13
+ echo "Installing jq..."
14
+ apk add --no-cache jq
15
+ echo "Finished installing jq!"
16
+ echo "Downloading integrations..."
17
+ echo "Raw input: $(cat integrations.json)"
18
+ # wget every integration
19
+ jq -r '.[]' integrations.json | while read -r integration; do
20
+ echo "Downloading $integration..."
21
+ # integrations are picked up in /integrations by JIB
22
+ if wget "$integration" -P /integrations; then
23
+ echo "Finished downloading $integration!"
24
+ else
25
+ echo "Error downloading $integration!"
26
+ if {{ .Values.download.errorOnDownloadFail }}; then
27
+ echo "[debug] errorOnDownloadFail is set to true, exiting..."
28
+ exit 1
29
+ fi
30
+ fi
31
+ done
Original file line number Diff line number Diff line change @@ -129,6 +129,12 @@ extraAppConfig: {}
129
129
130
130
extraEnvVars : []
131
131
132
+ download :
133
+ # # @param download.errorOnDownloadFail whether to fail when any integration fails to download
134
+ errorOnDownloadFail : true
135
+ # # @param download.integrations a list of integrations (HTTP(s) URLs) to download and start snoty with
136
+ integrations : []
137
+
132
138
# # ref: https://kubernetes.io/docs/concepts/services-networking/ingress/
133
139
# #
134
140
ingress :
@@ -241,6 +247,8 @@ mongodb:
241
247
rootPassword : changeme
242
248
architecture : standalone
243
249
service :
250
+ # you may want to change this to `releasename-mongodb`
251
+ # TODO: figure out what happened here
244
252
nameOverride : snoty-mongodb
245
253
# --- HA ---
246
254
# architecture: replicaset
You can’t perform that action at this time.
0 commit comments