Skip to content

Commit

Permalink
[helm] Mimic loki service account with canary account (grafana#7236)
Browse files Browse the repository at this point in the history
**What this PR does / why we need it**:

Bring the Loki Canary service account in line with the Loki service
account, removing the post install hook, and sharing the top level
properties for `automountServiceAccountToken` and `imagePullSecrets`.
I'm open to creating canary specific values for these setting if needed,
but want to start by sharing the top level values to reduce config if
possible.

Also default canary to Appversion to be in sync with default Loki
version

**Which issue(s) this PR fixes**:
Fixes two issues raised in comments from @towolf (thanks!) on this
[PR](grafana#7173 (comment)).

Fixes grafana#7237
  • Loading branch information
trevorwhitney authored and changhyuni committed Nov 8, 2022
1 parent b4a3ec2 commit dc452bd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion production/helm/loki/templates/loki-canary/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ app.kubernetes.io/component: canary
Docker image name for loki-canary
*/}}
{{- define "loki-canary.image" -}}
{{- $dict := dict "service" .Values.monitoring.selfMonitoring.lokiCanary.image "global" .Values.global.image "defaultVersion" "latest" -}}
{{- $dict := dict "service" .Values.monitoring.selfMonitoring.lokiCanary.image "global" .Values.global.image "defaultVersion" .Chart.AppVersion -}}
{{- include "loki.baseImage" $dict -}}
{{- end -}}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,12 @@ metadata:
labels:
{{- include "loki-canary.labels" . | nindent 4 }}
annotations:
"helm.sh/hook": post-install
{{- with .Values.monitoring.selfMonitoring.lokiCanary.annotations }}
{{- toYaml . | nindent 4 }}
{{- end }}
automountServiceAccountToken: {{ .Values.serviceAccount.automountServiceAccountToken }}
{{- with .Values.serviceAccount.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 2 }}
{{- end }}
{{- end }}

0 comments on commit dc452bd

Please sign in to comment.