Skip to content

Commit 264d4ea

Browse files
ixxeL2097Frederic Spiersgithub-actions[bot]
authored
feat(minio): add serviceAccount to MinIO deployment (#14)
* feat(minio): add serviceAccount to MinIO deployment * Update CHANGELOG.md Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> --------- Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Frederic Spiers <[email protected]> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
1 parent a05cfce commit 264d4ea

File tree

6 files changed

+47
-8
lines changed

6 files changed

+47
-8
lines changed

charts/minio/CHANGELOG.md

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# Changelog
22

3-
## 0.4.0 (2025-10-06)
3+
## 0.5.0 (2025-10-08)
44

5-
* [minio] add post job to auto create default buckets ([#9](https://github.com/GitGuardian/gitguardian-helm-charts/pull/9))
5+
* feat(minio): add serviceAccount to MinIO deployment ([#14](https://github.com/GitGuardian/gitguardian-helm-charts/pull/14))
66

77
## <small>0.2.4 (2025-09-30)</small>
88

@@ -61,7 +61,3 @@
6161
* remove serviceaccounts from all charts ([be8f43a](https://github.com/GitGuardian/gitguardian-helm-charts/commit/be8f43a))
6262
* update readme, chart.yaml texts and descriptions ([0179046](https://github.com/GitGuardian/gitguardian-helm-charts/commit/0179046))
6363
* Use lookup function for password where applicable ([dfb9a0e](https://github.com/GitGuardian/gitguardian-helm-charts/commit/dfb9a0e))
64-
=======
65-
## 0.3.0 (2025-10-05)
66-
67-
* [mariadb] use tpl to return existingConfigMap ([#217](https://github.com/CloudPirates-io/helm-charts/pull/217))

charts/minio/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ apiVersion: v2
22
name: minio
33
description: High Performance Object Storage compatible with Amazon S3 APIs
44
type: application
5-
version: 0.4.0
5+
version: 0.5.0
66
appVersion: "2025.09.07"
77
keywords:
88
- minio

charts/minio/templates/_helpers.tpl

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,4 +116,15 @@ Return MinIO server URL args
116116
{{- else -}}
117117
{{- printf "--console-address :%d --address :%d" (int .Values.service.consolePort) (int .Values.service.port) -}}
118118
{{- end -}}
119-
{{- end }}
119+
{{- end }}
120+
121+
{{/*
122+
Returns MinIO serviceAccount name
123+
*/}}
124+
{{- define "minio.serviceAccountName" -}}
125+
{{- if .Values.serviceAccount.create -}}
126+
{{ default (include "minio.fullname" .) .Values.serviceAccount.name }}
127+
{{- else -}}
128+
{{ default "default" .Values.serviceAccount.name }}
129+
{{- end -}}
130+
{{- end -}}

charts/minio/templates/deployment.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ spec:
3232
{{- with (include "minio.imagePullSecrets" .) }}
3333
{{ . | nindent 6 }}
3434
{{- end }}
35+
serviceAccountName: {{ template "minio.serviceAccountName" . }}
3536
securityContext: {{ include "common.renderPodSecurityContext" . | nindent 8 }}
3637
containers:
3738
- name: {{ .Chart.Name }}
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{{- if .Values.serviceAccount.create }}
2+
apiVersion: v1
3+
kind: ServiceAccount
4+
metadata:
5+
name: {{ include "minio.fullname" . }}
6+
namespace: {{ .Release.Namespace }}
7+
labels:
8+
{{- include "minio.labels" . | nindent 4 }}
9+
{{- $annotations := merge .Values.serviceAccount.annotations .Values.commonAnnotations }}
10+
{{- with $annotations }}
11+
annotations:
12+
{{- toYaml . | nindent 4 }}
13+
{{- end }}
14+
automountServiceAccountToken: {{ .Values.serviceAccount.automountServiceAccountToken }}
15+
secrets:
16+
- name: {{ include "minio.fullname" . }}
17+
{{- end }}

charts/minio/values.yaml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,20 @@ persistence:
195195
## @param mountPath The path where to mount the data volume
196196
mountPath: /mnt/data
197197

198+
serviceAccount:
199+
## @param serviceAccount.create Enable the creation of a ServiceAccount for MinIO
200+
create: true
201+
## @param serviceAccount.name Name of the created ServiceAccount
202+
## If not set and create is true, a name is generated using the common.names.fullname template
203+
##
204+
name: ""
205+
## @param serviceAccount.automountServiceAccountToken Enable/disable auto mounting of the service account token
206+
##
207+
automountServiceAccountToken: false
208+
## @param serviceAccount.annotations Custom annotations for MinIO serviceAccount
209+
##
210+
annotations: {}
211+
198212
## @section Liveness and readiness probes
199213
livenessProbe:
200214
## @param livenessProbe.enabled Enable livenessProbe on MinIO containers

0 commit comments

Comments
 (0)