Skip to content

Commit

Permalink
[znapzend] Add serviceaccount support
Browse files Browse the repository at this point in the history
  • Loading branch information
ccremer committed Feb 29, 2020
1 parent 8eb7bc3 commit 47dc10e
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 2 deletions.
6 changes: 4 additions & 2 deletions charts/znapzend/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,14 @@ description: Znapzend Helm Chart for automated ZFS snapshot & replication
# Library charts provide useful utilities or functions for the chart developer. They're included as
# a dependency of application charts to inject those utilities and functions into the rendering
# pipeline. Library charts do not define any templates and therefore cannot be deployed.
type: application
# type: application # Only viable in v2

# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
version: 0.1.2
version: 0.2.0

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application.
appVersion: v0.19.1
# Licensing of https://commons.wikimedia.org/wiki/File:Openzfs.svg applies
icon: https://upload.wikimedia.org/wikipedia/commons/thumb/7/7f/Openzfs.svg/257px-Openzfs.svg.png
12 changes: 12 additions & 0 deletions charts/znapzend/templates/serviceaccount.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{{- if .Values.serviceAccount.create -}}
apiVersion: v1
kind: ServiceAccount
metadata:
name: {{ include "znapzend.serviceAccountName" . }}
labels:
{{- include "znapzend.labels" . | nindent 4 }}
{{- with .Values.serviceAccount.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
{{- end -}}
1 change: 1 addition & 0 deletions charts/znapzend/templates/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ spec:
{{- end }}
securityContext:
{{- toYaml .Values.podSecurityContext | nindent 8 }}
serviceAccountName: {{ include "znapzend.serviceAccountName" . }}
containers:
- name: {{ .Chart.Name }}
securityContext:
Expand Down
9 changes: 9 additions & 0 deletions charts/znapzend/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,15 @@ securityContext:

resources: {}

serviceAccount:
# Specifies whether a service account should be created
create: true
# Annotations to add to the service account
annotations: {}
# The name of the service account to use.
# If not set and create is true, a name is generated using the fullname template
name:

host:
zfsDevice: /dev/zfs

Expand Down

0 comments on commit 47dc10e

Please sign in to comment.