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

Fix: Update secret template to support GHCR token #132

Merged
merged 2 commits into from
Nov 14, 2023

Conversation

jwitko
Copy link
Contributor

@jwitko jwitko commented Nov 3, 2023

This fixes #124

@wagnst
Copy link

wagnst commented Nov 3, 2023

can confirm having the same issue

Error: couldn't find key ghcr.token in Secret version-checker/version-checker

@jwitko jwitko changed the title Update secret.yaml to support GHCR token Update secret template to support GHCR token Nov 3, 2023
@szpaczyna
Copy link

You might also want to adjust the first line of secret.yaml file using the following:

{{- if or .Values.acr.refreshToken .Values.acr.username .Values.acr.password .Values.docker.token .Values.ecr.accessKeyID .Values.ecr.secretAccessKey .Values.ecr.sessionToken .Values.docker.username .Values.docker.password .Values.gcr.token .Values.quay.token .Values.ghcr.token (not (eq (len .Values.selfhosted) 0)) }}

Copy link
Collaborator

@davidcollom davidcollom left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As @szpaczyna mentioned, there's a little more required... the if statement on line #1 of this file would need updating for the context of only providing a ghcr token and nothing else.

Sorry I missed this during the initial implementation 🤦

@davidcollom davidcollom self-requested a review November 14, 2023 09:52
@@ -1,4 +1,4 @@
{{- if or .Values.acr.refreshToken .Values.acr.username .Values.acr.password .Values.docker.token .Values.ecr.accessKeyID .Values.ecr.secretAccessKey .Values.ecr.sessionToken .Values.docker.username .Values.docker.password .Values.gcr.token .Values.quay.token (not (eq (len .Values.selfhosted) 0)) }}
{{- if or .Values.acr.refreshToken .Values.acr.username .Values.acr.password .Values.docker.token .Values.ecr.accessKeyID .Values.ecr.secretAccessKey .Values.ecr.sessionToken .Values.docker.username .Values.docker.password .Values.gcr.token .Values.ghcr.token .Values.quay.token (not (eq (len .Values.selfhosted) 0)) }}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: This should be reviewed to make some what simpler logic in the chart - maybe move this to a helper instead.

@davidcollom davidcollom merged commit 142c990 into jetstack:main Nov 14, 2023
7 checks passed
@davidcollom davidcollom changed the title Update secret template to support GHCR token Fix: Update secret template to support GHCR token Nov 14, 2023
@jwitko jwitko deleted the patch-1 branch November 14, 2023 20:39
@jwitko
Copy link
Contributor Author

jwitko commented Nov 14, 2023

Sorry @davidcollom , was at a conference last week and didn't see these comments. Thanks for merging and likely taking care of the extra stuff on your own.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Provide GHCR example
4 participants