actions / actions-runner-controller

Kubernetes controller for GitHub Actions self-hosted runners
Apache License 2.0
4.42k stars 1.04k forks source link

Error: could not download chart: failed to authorize: failed to fetch anonymous token: unexpected status from GET request to https://ghcr.io/token?scope=repository%3Aactions%2Factions-runner-controller-charts%2Fgha-runner-scale-set-controller%2Fgha-runner-scale-set-controller%3Apull&service=ghcr.io: 403 Forbidden<Please write what didn't work for you here> #3381

Closed bhat39a closed 3 months ago

bhat39a commented 3 months ago

Checks

Controller Version

0.8.3

Deployment Method

Helm

Checks

To Reproduce

1. Terraform helm_release not able to download the charts.
2. Bash command is working fine.

Describe the bug

Bash Command Working fine -

NAMESPACE="arc-systems" helm install arc \ --namespace "${NAMESPACE}" \ --create-namespace \ oci://ghcr.io/actions/actions-runner-controller-charts/gha-runner-scale-set-controller

But same thing using terraform is throwing error

resource "helm_release" "arc" { repository = "oci://ghcr.io/actions/actions-runner-controller-charts/gha-runner-scale-set-controller" chart = "gha-runner-scale-set-controller" version = "0.8.3" name = "arc" namespace = "arc-systems" create_namespace = false }

Error Message - │ Error: could not download chart: failed to authorize: failed to fetch anonymous token: unexpected status from GET request to https://ghcr.io/token?scope=repository%3Aactions%2Factions-runner-controller-charts%2Fgha-runner-scale-set-controller%2Fgha-runner-scale-set-controller%3Apull&service=ghcr.io: 403 Forbidden

Describe the expected behavior

Installed the relevant helm charts

Additional Context

NA

Controller Logs

NA

Runner Pod Logs

NA
github-actions[bot] commented 3 months ago

Hello! Thank you for filing an issue.

The maintainers will triage your issue shortly.

In the meantime, please take a look at the troubleshooting guide for bug reports.

If this is a feature request, please review our contribution guidelines.

nikola-jokic commented 3 months ago

Hey @bhat39a,

When you do helm pull, it correctly pulls the chart, so it must not be an issue with the chart. I will close this issue since it is not related to ARC. Please redirect the issue to either Terraform or packages, wherever you feel is appropriate.

alexkuretz commented 3 months ago

The problem is with the formation of the repository URL, this works for me:

resource "helm_release" "arc_system" {
  name       = "gha-runner-scale-set-controller"
  repository = "oci://ghcr.io/actions/actions-runner-controller-charts"
  chart      = "gha-runner-scale-set-controller"
  version    = "0.9.0"

  namespace        = local.system_namespace
  create_namespace = true
}