Skip to content

Commit 0243189

Browse files
Pablu23mhoff
andauthored
feat: add service account to chart (#931)
* Add service account to chart, no-verify because yamlfmt doesnt like go templating? * update Changelog * Make serviceAccount disable able * Remove spec: as it is not spec * Update tests, enable service accounts by default * Remove enabled as it is redundant * remove unused chart.yaml.j2 * Update charts/logprep/templates/deployment.yaml Co-authored-by: Michael Hoff <9436725+mhoff@users.noreply.github.com> * Update charts/logprep/templates/service-account.yaml Co-authored-by: Michael Hoff <9436725+mhoff@users.noreply.github.com> * Update CHANGELOG.md Co-authored-by: Michael Hoff <9436725+mhoff@users.noreply.github.com> * Update charts/logprep/values.yaml Co-authored-by: Michael Hoff <9436725+mhoff@users.noreply.github.com> * Update default values and tests * Remove if enabled * Remove chart.lock --------- Co-authored-by: Michael Hoff <9436725+mhoff@users.noreply.github.com>
1 parent 9d6c5ff commit 0243189

File tree

6 files changed

+19
-17
lines changed

6 files changed

+19
-17
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
### Features
55
* add uv as dependency management, including uv.lock
6+
* allow configuration (and auto-creation) of service accounts in helm chart
67

78
### Improvements
89
* simplify Dockerfile and remove docker build support for `LOGPREP_VERSION`

charts/logprep/Chart.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ type: application
66
# This is the chart version. This version number should be incremented each time you make changes
77
# to the chart and its templates, including the app version.
88
# Versions are expected to follow Semantic Versioning (https://semver.org/)
9-
version: "15.0.0"
9+
version: "15.1.0"
1010

1111
# This is the version number of the application being deployed. This version number should be
1212
# incremented each time you make changes to the application. Versions are not expected to
1313
# follow Semantic Versioning. They should reflect the version the application is using.
1414
# It is recommended to use it with quotes.
15-
appVersion: "15.0.0"
15+
appVersion: "15.1.0"

charts/logprep/Chart.yaml.j2

Lines changed: 0 additions & 15 deletions
This file was deleted.

charts/logprep/templates/deployment.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ spec:
2020
annotations:
2121
{{ toYaml .Values.podAnnotations| nindent 8 }}
2222
spec:
23+
serviceAccountName: {{ template "logprep.serviceAccountName" . }}
2324
{{- if .Values.podSecurityContext.enabled }}
2425
securityContext: {{- omit .Values.podSecurityContext "enabled" | toYaml | nindent 8 }}
2526
{{- end }}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{{- if .Values.serviceAccount.create }}
2+
apiVersion: v1
3+
kind: ServiceAccount
4+
metadata:
5+
name: {{ template "logprep.serviceAccountName" . }}
6+
labels:
7+
{{- include "logprep.labels" . | nindent 4}}
8+
automountServiceAccountToken: {{ .Values.serviceAccount.automountServiceAccountToken }}
9+
{{- end }}

charts/logprep/values.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,12 @@ resources:
1515
requests:
1616
memory: "2Gi"
1717
cpu: "250m"
18+
serviceAccount:
19+
create: false
20+
# auto generates if left empty
21+
name: ""
22+
# only used if create true
23+
automountServiceAccountToken: false
1824
# if enabled: the default security context for the pod
1925
podSecurityContext:
2026
enabled: true

0 commit comments

Comments
 (0)