Skip to content

Commit

Permalink
Use existing docker secret
Browse files Browse the repository at this point in the history
  • Loading branch information
noroutine committed Dec 15, 2023
1 parent 6af741b commit 06fea39
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 0 deletions.
15 changes: 15 additions & 0 deletions helm-chart/binderhub/schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,21 @@ properties:
A list of references to existing Kubernetes Secrets with credentials
to pull the image.
dockerConfig:
type: object
additionalProperties: false
description: |
TODO
properties:
useExistingSecret:
type: boolean
description: |
TODO
secretName:
type: [string, "null"]
description: |
TODO
registry:
type: object
additionalProperties: false
Expand Down
4 changes: 4 additions & 0 deletions helm-chart/binderhub/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,11 @@ spec:
{{- if .Values.config.BinderHub.use_registry }}
- name: docker-secret
secret:
{{- if .Values.dockerConfig.useExistingSecret }}
secretName: {{ .Values.dockerConfig.secretName }}
{{- else }}
secretName: {{ include "binderhub.fullname" . }}-binder-build-docker-config
{{- end }}
{{- else }}
- name: docker-socket
hostPath:
Expand Down
6 changes: 6 additions & 0 deletions helm-chart/binderhub/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,12 @@ image:
pullPolicy: ""
pullSecrets: []

# kubernetes secret name with docker config inside
# use additional input parameter to stay at least partially compatible with source chart
dockerConfig:
useExistingSecret: false
secretName: binder-precreated-docker-config

# registry here is only used to create docker config.json
registry:
# key in 'auths' in docker config.json,
Expand Down

0 comments on commit 06fea39

Please sign in to comment.