swift-spring-8620
06/28/2024, 5:13 AMproviders:
- name: local-kubernetes
setupIngressController: false
imagePullSecrets:
- name: github-ocr-secret
namespace: default
When I go to deploy my helm chart that I have pushed to my private registry (GitHub container registry), I receive the following error message:
Error: INSTALLATION FAILED: GET "https://ghcr.io/v2/<my-org>/charts/rust/tags/list": GET "https://ghcr.io/token?scope=repository%3A<my-org>%2Fcharts%2Frust%3Apull&service=ghcr.io": unexpected status code 401: unauthorized: authentication required
I have tried refreshing the provider status and reinstalling Garden, but so far none of these efforts have made any effect. I've provided the helm deployment and the output of the kubernetes secret with the registry configuration as reference as well below:
Kubernetes secret:
Name: github-ocr-secret
Namespace: default
Labels: <none>
Annotations: <none>
Type: kubernetes.io/dockerconfigjson
Data
====
.dockerconfigjson: {"auths":{"https://ghcr.io":{"username":"<MY_GITHUB_USERNAME>","password":"<MY_GITHUB_PAT>","email":"<MY_EMAIL>","auth":"<MY_AUTH>"}}}
And I generated this secret using the following kubectl command: kubectl create secret docker-registry mysecretname --docker-server=https://ghcr.io --docker-username=mygithubusername --docker-password=mygithubreadtoken --docker-email=mygithubemail
And here is the format of the helm deploy:
kind: Deploy
type: helm
name: test-deploy
spec:
chart:
url: oci://ghcr.io/<my-org>/charts/rust # Private chart
values:
containers:
replicas: 1
image:
repository: ghcr.io/<my-org>/rust # Private Image
tag: main
name: rust
Any help on this would be greatly appreciated, and thanks in advance for taking the time to read this over.
Regards,
Pricefreezing-pharmacist-34446
07/02/2024, 12:26 PMimagePullSecret
is used in the Kubernetes cluster to push container images if used with in-cluster building or to pull images when deploying pods.
A helm chart is pulled on your local machine by garden and then applied with helm. This means you need to be authenticated to the private OCI registry from your local machine e.g. via helm registry login
. Does that help?swift-spring-8620
07/04/2024, 3:53 AM