Skip to content

Commit

Permalink
Add support for k8s service accounts (#27)
Browse files Browse the repository at this point in the history
* Add support for k8s service accounts

* gate

* Bump versions
  • Loading branch information
bpblanken authored Oct 26, 2023
1 parent 759a766 commit 3f0c4b6
Show file tree
Hide file tree
Showing 8 changed files with 44 additions and 2 deletions.
2 changes: 1 addition & 1 deletion charts/hail-search/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ type: application
# 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.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.1.10
version: 0.1.11

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
Expand Down
3 changes: 3 additions & 0 deletions charts/hail-search/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ spec:
imagePullSecrets:
{{- toYaml . | nindent 6 }}
{{- end }}
{{- if .Values.serviceAccount.create -}}
serviceAccountName: {{ include "hail-search.fullname" . }}
{{- end }}
containers:
- name: {{ include "hail-search.fullname" . }}-pod
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
Expand Down
12 changes: 12 additions & 0 deletions charts/hail-search/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 "hail-search.fullname" . }}
labels:
{{- include "hail-search.labels" . | nindent 4 }}
{{- with .Values.serviceAccount.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
{{- end }}
6 changes: 6 additions & 0 deletions charts/hail-search/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,12 @@ imagePullSecrets: []
nameOverride: ""
fullnameOverride: ""

serviceAccount:
# Specifies whether a service account should be created
create: true
# Annotations to add to the service account
annotations: {}

podAnnotations: {}

service:
Expand Down
2 changes: 1 addition & 1 deletion charts/seqr/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ type: application
# 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.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.0.59
version: 0.0.60
# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
Expand Down
3 changes: 3 additions & 0 deletions charts/seqr/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ spec:
imagePullSecrets:
{{- toYaml . | nindent 6 }}
{{- end }}
{{- if .Values.serviceAccount.create -}}
serviceAccountName: {{ include "seqr.fullname" . }}
{{- end }}
containers:
- name: seqr-pod
ports:
Expand Down
12 changes: 12 additions & 0 deletions charts/seqr/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 "seqr.fullname" . }}
labels:
{{- include "seqr.labels" . | nindent 4 }}
{{- with .Values.serviceAccount.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
{{- end }}
6 changes: 6 additions & 0 deletions charts/seqr/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,12 @@ nameOverride: ""
# -- Overrides the fully qualified name of the app, for use in templates
fullnameOverride: ""

serviceAccount:
# Specifies whether a service account should be created
create: true
# Annotations to add to the service account
annotations: {}

# -- A dictionary of annotations to add to the seqr Deployment
podAnnotations: {}

Expand Down

0 comments on commit 3f0c4b6

Please sign in to comment.