File tree Expand file tree Collapse file tree 2 files changed +60
-0
lines changed Expand file tree Collapse file tree 2 files changed +60
-0
lines changed Original file line number Diff line number Diff line change 1+ #
2+ # This job gets installed only if Grafana, Loki and Promtail are enabled.
3+ #
4+ # It's an ephemeral container running at the start and end of each Helm
5+ # deploy and it's used to log at stdout the Helm revision we are
6+ # installing / we finished installing.
7+ #
8+ # This datapoint is useful and can be very helpful as annotation
9+ # in Grafana dashboard.
10+ #
11+ {{- if and .Values.grafana.enabled (and .Values.loki.enabled .Values.promtail.enabled) -}}
12+ apiVersion : batch/v1
13+ kind : Job
14+ metadata :
15+ name : {{ printf "%s-grafana-annotation-job-post" .Release.Name }}
16+ annotations :
17+ " helm.sh/hook " : " post-install,post-upgrade,post-rollback"
18+ spec :
19+ template :
20+ spec :
21+ containers :
22+ - name : grafana-annotation-job-post
23+ image : {{ .Values.busybox.image }}
24+ imagePullPolicy : {{ .Values.busybox.pullPolicy }}
25+ command :
26+ - /bin/sh
27+ - -c
28+ - |
29+ echo '{"operation_stage": "end", "helm_revision": "{{ .Release.Revision }}"}'
30+ {{- end }}
Original file line number Diff line number Diff line change 1+ #
2+ # This job gets installed only if Grafana, Loki and Promtail are enabled.
3+ #
4+ # It's an ephemeral container running at the start and end of each Helm
5+ # deploy and it's used to log at stdout the Helm revision we are
6+ # installing / we finished installing.
7+ #
8+ # This datapoint is useful and can be very helpful as annotation
9+ # in Grafana dashboard.
10+ #
11+ {{- if and .Values.grafana.enabled (and .Values.loki.enabled .Values.promtail.enabled) -}}
12+ apiVersion : batch/v1
13+ kind : Job
14+ metadata :
15+ name : {{ printf "%s-grafana-annotation-job-pre" .Release.Name }}
16+ annotations :
17+ " helm.sh/hook " : " pre-install,pre-upgrade,pre-rollback"
18+ spec :
19+ template :
20+ spec :
21+ containers :
22+ - name : grafana-annotation-job-pre
23+ image : {{ .Values.busybox.image }}
24+ imagePullPolicy : {{ .Values.busybox.pullPolicy }}
25+ command :
26+ - /bin/sh
27+ - -c
28+ - |
29+ echo '{"operation_stage": "start", "helm_revision": "{{ .Release.Revision }}"}'
30+ {{- end }}
You can’t perform that action at this time.
0 commit comments