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

Feat: Adding support to pass GHCR credentials to pod #126

Merged
merged 1 commit into from
Nov 2, 2023
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
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