Skip to content

Commit

Permalink
Feat: Adding support to pass GHCR credentials to pod (#126)
Browse files Browse the repository at this point in the history
  • Loading branch information
davidcollom authored Nov 2, 2023
1 parent ecff881 commit 9e6e235
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 0 deletions.
9 changes: 9 additions & 0 deletions deploy/charts/version-checker/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,15 @@ spec:
key: gcr.token
{{- end }}

# GHCR
{{- if .Values.ghcr.token }}
- name: VERSION_CHECKER_GHCR_TOKEN
valueFrom:
secretKeyRef:
name: {{ $chartname }}
key: ghcr.token
{{- end }}

# Quay
{{- if .Values.quay.token }}
- name: VERSION_CHECKER_QUAY_TOKEN
Expand Down
15 changes: 15 additions & 0 deletions deploy/charts/version-checker/tests/deployment_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,21 @@ tests:
key: gcr.token
name: version-checker

# GHCR
- it: GHCR should work
set:
ghcr.token: ajbhvsagsagsdsbjvh
asserts:
- contains:
path: spec.template.spec.containers[0].env
count: 1
content:
name: VERSION_CHECKER_GHCR_TOKEN
valueFrom:
secretKeyRef:
key: ghcr.token
name: version-checker

# Quay
- it: Quay should work
set:
Expand Down
3 changes: 3 additions & 0 deletions deploy/charts/version-checker/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ ecr:
gcr:
token:

ghcr:
token:

quay:
token:

Expand Down

0 comments on commit 9e6e235

Please sign in to comment.