uptime-industries/compute-blade-gobootme

gobootme ghcr image has SHA embedded in the package name

Closed this issue · 2 comments

Description

Attempting to deploy gobootme via K3S in a test cluster, the instructions note that one can use image: ghcr.io/xvzf/gobootme:latest as the container image. These instructions don't work for a first-time user.

What happened?

During image pull, containerd complains about not finding the image:

kubectl describe po

...

Events:
  Type     Reason   Age   From     Message
  ----     ------   ----  ----     -------
  Normal   Pulling  1s    kubelet  Pulling image "ghcr.io/xvzf/gobootme:latest"
  Warning  Failed   1s    kubelet  Failed to pull image "ghcr.io/xvzf/gobootme:latest": failed to pull and unpack image "ghcr.io/xvzf/gobootme:latest": failed to resolve reference "ghcr.io/xvzf/gobootme:latest": failed to authorize: failed to fetch anonymous token: unexpected status from GET request to https://ghcr.io/token?scope=repository%3Axvzf%2Fgobootme%3Apull&service=ghcr.io: 403 Forbidden
  Warning  Failed   1s    kubelet  Error: ErrImagePull
  Normal   BackOff  1s    kubelet  Back-off pulling image "ghcr.io/xvzf/gobootme:latest"
  Warning  Failed   1s    kubelet  Error: ImagePullBackOff

Expected Behaviour

The GitHub package is able to be fetched with the name ghcr.io/xvzf/gobootme:latest

Workarounds

Switching the container image name to ghcr.io/xvzf/gobootme/gobootme-922ea806fab8428d0fc37bcc62a604f4:v1.0.1 allows the image to be pulled successfully.

I haven't used goreleaser before, but I believe this may be because the SHA is being embedded into the image name by it.

Just to add here, I've had good experiences with multi-arch docker builds by using Docker's build-push-action

Fixed in #6