Skip to content

Commit 9c28b1c

Browse files
authored
feat: add support for specifying a service account (#4)
* feat: add support for specifying a service account * docs: fix typo
1 parent 2bc692f commit 9c28b1c

File tree

3 files changed

+9
-0
lines changed

3 files changed

+9
-0
lines changed

README.md

+2
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ This repository contains Redis cluster helm charts that can survive pod restarts
1515
`securityContext` | Pod's security context | `{}`
1616
`minReadySeconds` | minimum number of seconds for which a newly created Pod should be running and ready without any of its containers crashing, for it to be considered available | `10`
1717
`priorityClassName` | Priority indicates the importance of a Pod relative to other Pods | `high-priority`
18+
`serviceAccount.enabled` | Enable or disable service account | `false`
19+
`serviceAccount.name` | Name of the service account | `default`
1820
`redis.image` | Redis docker image | `redis:7.2.4`
1921
`redis.port` | Redis server port | `6379`
2022
`redis.bus` | Redis cluster bus port | `16379`

templates/statefulset.yaml

+3
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ spec:
1616
metadata:
1717
labels: {{ include "redis-cluster.labels" . | nindent 8 }}
1818
spec:
19+
{{- if and .Values.serviceAccount .Values.serviceAccount.enabled }}
20+
serviceAccountName: {{ .Values.serviceAccount.name }}
21+
{{- end }}
1922
{{- if and .Values.securityContext .Values.securityContext.enabled }}
2023
securityContext: {{ omit .Values.securityContext "enabled" | toYaml | nindent 8 }}
2124
{{- end }}

values.yaml

+4
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ fullnameOverride: ""
44
minReadySeconds: 0
55
priorityClassName: ""
66

7+
serviceAccount:
8+
enabled: false
9+
name: ""
10+
711
redis:
812
image: redis:7.2.4
913
port: 6379

0 commit comments

Comments
 (0)