Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

basehub: support creation of admin-sa k8s ServiceAccount via adminServiceAccount #3950

Merged
merged 2 commits into from
Apr 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions helm-charts/basehub/templates/serviceaccount-admin.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{{ if .Values.adminServiceAccount.enabled -}}
apiVersion: v1
kind: ServiceAccount
metadata:
name: admin-sa
annotations: {{ .Values.adminServiceAccount.annotations | toJson }}
{{- end }}
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
apiVersion: v1
kind: ServiceAccount
metadata:
annotations: {{ .Values.userServiceAccount.annotations | toJson}}
name: user-sa
annotations: {{ .Values.userServiceAccount.annotations | toJson }}
{{- end }}
24 changes: 24 additions & 0 deletions helm-charts/basehub/values.schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ required:
- global
- jupyterhub
- userServiceAccount
- adminServiceAccount
- dex
- staticWebsite
- ingressBasicAuth
Expand Down Expand Up @@ -149,6 +150,27 @@ properties:
description: |
Dictionary of annotations that can be applied to the service account.

When used with GKE and Workload Identity, you need to set
the annotation with key "iam.gke.io/gcp-service-account" to the
email address of the Google Service Account whose credentials it
should have.
adminServiceAccount:
type: object
additionalProperties: false
required:
- enabled
properties:
enabled:
type: boolean
description: |
Enables creation of a Service Account named admin-sa for opt-in use
via jupyterhub.custom.singleuserAdmin.serviceAccountName.
annotations:
type: object
additionalProperties: true
description: |
Dictionary of annotations that can be applied to the service account.

When used with GKE and Workload Identity, you need to set
the annotation with key "iam.gke.io/gcp-service-account" to the
email address of the Google Service Account whose credentials it
Expand Down Expand Up @@ -450,6 +472,8 @@ properties:
additionalProperties: true
extraEnv:
type: object
serviceAccountName:
type: string
2i2c:
type: object
additionalProperties: false
Expand Down
4 changes: 4 additions & 0 deletions helm-charts/basehub/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ userServiceAccount:
enabled: true
annotations: {}

adminServiceAccount:
enabled: false
annotations: {}

binderhub-service:
enabled: false
nodeSelector:
Expand Down