Skip to content

Commit e94e63c

Browse files
authored
Merge pull request #3950 from consideRatio/pr/basehub-stuff
basehub: support creation of admin-sa k8s ServiceAccount via `adminServiceAccount`
2 parents 5ee3771 + 45fa678 commit e94e63c

File tree

4 files changed

+36
-1
lines changed

4 files changed

+36
-1
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{{ if .Values.adminServiceAccount.enabled -}}
2+
apiVersion: v1
3+
kind: ServiceAccount
4+
metadata:
5+
name: admin-sa
6+
annotations: {{ .Values.adminServiceAccount.annotations | toJson }}
7+
{{- end }}

helm-charts/basehub/templates/user-sa.yaml helm-charts/basehub/templates/serviceaccount-user.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22
apiVersion: v1
33
kind: ServiceAccount
44
metadata:
5-
annotations: {{ .Values.userServiceAccount.annotations | toJson}}
65
name: user-sa
6+
annotations: {{ .Values.userServiceAccount.annotations | toJson }}
77
{{- end }}

helm-charts/basehub/values.schema.yaml

+24
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ required:
1616
- global
1717
- jupyterhub
1818
- userServiceAccount
19+
- adminServiceAccount
1920
- dex
2021
- staticWebsite
2122
- ingressBasicAuth
@@ -149,6 +150,27 @@ properties:
149150
description: |
150151
Dictionary of annotations that can be applied to the service account.
151152
153+
When used with GKE and Workload Identity, you need to set
154+
the annotation with key "iam.gke.io/gcp-service-account" to the
155+
email address of the Google Service Account whose credentials it
156+
should have.
157+
adminServiceAccount:
158+
type: object
159+
additionalProperties: false
160+
required:
161+
- enabled
162+
properties:
163+
enabled:
164+
type: boolean
165+
description: |
166+
Enables creation of a Service Account named admin-sa for opt-in use
167+
via jupyterhub.custom.singleuserAdmin.serviceAccountName.
168+
annotations:
169+
type: object
170+
additionalProperties: true
171+
description: |
172+
Dictionary of annotations that can be applied to the service account.
173+
152174
When used with GKE and Workload Identity, you need to set
153175
the annotation with key "iam.gke.io/gcp-service-account" to the
154176
email address of the Google Service Account whose credentials it
@@ -450,6 +472,8 @@ properties:
450472
additionalProperties: true
451473
extraEnv:
452474
type: object
475+
serviceAccountName:
476+
type: string
453477
2i2c:
454478
type: object
455479
additionalProperties: false

helm-charts/basehub/values.yaml

+4
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ userServiceAccount:
55
enabled: true
66
annotations: {}
77

8+
adminServiceAccount:
9+
enabled: false
10+
annotations: {}
11+
812
binderhub-service:
913
enabled: false
1014
nodeSelector:

0 commit comments

Comments
 (0)