Skip to content

Commit

Permalink
Merge pull request #98 from ricoberger/allow-usage-of-service-account…
Browse files Browse the repository at this point in the history
…-in-helm-chart

Allow Usage of ServiceAccount in Helm Chart
  • Loading branch information
ricoberger authored Oct 23, 2023
2 parents 47499c1 + 8a64258 commit 5a5b780
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion charts/script-exporter/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ apiVersion: v2
name: script-exporter
description: Prometheus exporter to execute scripts and collect metrics from the output or the exit status.
type: application
version: 0.6.5
version: 0.7.0
appVersion: v2.15.1
5 changes: 4 additions & 1 deletion charts/script-exporter/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ spec:
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- if .Values.serviceAccount.name }}
serviceAccountName: "{{ .Values.serviceAccount.name }}"
{{- end }}
securityContext:
{{- toYaml .Values.podSecurityContext | nindent 8 }}
containers:
Expand Down Expand Up @@ -76,4 +79,4 @@ spec:
defaultMode: 0777
{{- if .Values.volumes }}
{{- toYaml .Values.volumes | nindent 8 }}
{{- end }}
{{- end }}
3 changes: 3 additions & 0 deletions charts/script-exporter/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,9 @@ service:
annotations: {}
labels: {}

serviceAccount:
name: ""

## Create a Service Monitor for the Prometheus Operator.
## See: https://github.com/coreos/prometheus-operator
##
Expand Down

0 comments on commit 5a5b780

Please sign in to comment.