Skip to content

Commit 260ccf7

Browse files
author
tazhate
committed
fix(release): add OCI labels so GHCR image binds to repo Packages
Root cause of the persistent 403 from `helm install`: 1. The image was being pushed to ghcr.io without `org.opencontainers.image.source` labels. 2. Without that label GHCR creates the package as orphaned — the buildx `--push` step reports success, but the package never appears in the repository's Packages sidebar and inherits no visibility from the repo (so it stays effectively private and anonymous pulls 403). 3. The Helm chart push (`helm push oci://...`) automatically writes the source label, which is why `charts/chainplane` showed up in the UI but the operator container did not. Fix: - Dockerfile: explicit OCI labels on the final stage (source, url, title, description, licenses, documentation). - release.yml: same labels added via docker/build-push-action `labels:`, plus dynamic `version` / `revision` derived from `github.ref_name` / `github.sha`. Disabled `provenance` and `sbom` attestations as they produce extra manifests that confuse the Packages UI auto-binding. Bumped to v0.2.2 since the previous tag's image is unrecoverable (already pushed without labels — has to be republished as a new tag). Context: spent ~30min reproducing — confirmed via /v2 API that the image exists (401 unauthorized, not 404), but the GitHub UI didn't index it because of missing repo association via the `image.source` label. Signed-off-by: tazhate <hate@tazhate.ru>
1 parent 5cee1d6 commit 260ccf7

5 files changed

Lines changed: 39 additions & 6 deletions

File tree

.github/workflows/release.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,20 @@ jobs:
4646
context: .
4747
platforms: linux/amd64,linux/arm64
4848
push: true
49+
provenance: false
50+
sbom: false
4951
tags: |
5052
ghcr.io/tazhate/chainplane:${{ github.ref_name }}
5153
ghcr.io/tazhate/chainplane:latest
54+
labels: |
55+
org.opencontainers.image.source=https://github.com/tazhate/chainplane
56+
org.opencontainers.image.url=https://github.com/tazhate/chainplane
57+
org.opencontainers.image.documentation=https://github.com/tazhate/chainplane
58+
org.opencontainers.image.title=chainplane
59+
org.opencontainers.image.description=Kubernetes operator for blockchain full nodes
60+
org.opencontainers.image.licenses=Apache-2.0
61+
org.opencontainers.image.version=${{ github.ref_name }}
62+
org.opencontainers.image.revision=${{ github.sha }}
5263
5364
- name: Package and push Helm chart to GHCR
5465
run: |

CHANGELOG.md

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,20 @@ release until the API is promoted to `v1beta1`.
1010

1111
## [Unreleased]
1212

13+
## [0.2.2] - 2026-04-29
14+
15+
### Fixed
16+
17+
- Operator container image now carries `org.opencontainers.image.source`
18+
and other OCI labels, so the GHCR package gets correctly associated with
19+
the GitHub repository and becomes visible in the repo Packages sidebar.
20+
Without this label, GHCR creates the package as orphaned/private — even
21+
though `docker buildx --push` reports success — and `helm install` fails
22+
with `403 Forbidden` from the anonymous pull token endpoint.
23+
- `release.yml`: disabled `provenance` and `sbom` attestations (they create
24+
extra manifests unrelated to package association). Added explicit OCI
25+
labels via `docker/build-push-action` `labels:` input as belt-and-braces.
26+
1327
## [0.2.1] - 2026-04-29
1428

1529
### Fixed
@@ -45,7 +59,7 @@ release until the API is promoted to `v1beta1`.
4559
Migration: edit existing manifests to use the new `apiVersion`, `kind` and the
4660
new file/folder paths; the spec and status field shapes are unchanged.
4761

48-
62+
## [0.1.0] - 2026-04-28
4963

5064
Initial OSS release.
5165

Dockerfile

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,14 @@ RUN CGO_ENABLED=0 GOOS=${TARGETOS:-linux} GOARCH=${TARGETARCH} go build -a -ldfl
2626
# Use distroless as minimal base image to package the manager binary
2727
# Refer to https://github.com/GoogleContainerTools/distroless for more details
2828
FROM gcr.io/distroless/static:nonroot
29+
30+
LABEL org.opencontainers.image.source="https://github.com/tazhate/chainplane"
31+
LABEL org.opencontainers.image.url="https://github.com/tazhate/chainplane"
32+
LABEL org.opencontainers.image.documentation="https://github.com/tazhate/chainplane"
33+
LABEL org.opencontainers.image.title="chainplane"
34+
LABEL org.opencontainers.image.description="Kubernetes operator for blockchain full nodes"
35+
LABEL org.opencontainers.image.licenses="Apache-2.0"
36+
2937
WORKDIR /
3038
COPY --from=builder /workspace/manager .
3139
USER 65532:65532

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ spec:
6565

6666
```sh
6767
helm install chainplane oci://ghcr.io/tazhate/charts/chainplane \
68-
--version 0.2.1 \
68+
--version 0.2.2 \
6969
--namespace chainplane-system \
7070
--create-namespace
7171
```
@@ -74,10 +74,10 @@ Or from a specific tag:
7474

7575
```sh
7676
helm install chainplane oci://ghcr.io/tazhate/charts/chainplane \
77-
--version 0.2.1 \
77+
--version 0.2.2 \
7878
--namespace chainplane-system \
7979
--create-namespace \
80-
--set image.tag=v0.2.1
80+
--set image.tag=v0.2.2
8181
```
8282

8383
### Install from source

charts/chainplane/Chart.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ apiVersion: v2
22
name: chainplane
33
description: A Kubernetes operator for managing blockchain node lifecycle
44
type: application
5-
version: 0.2.1
6-
appVersion: "v0.2.1"
5+
version: 0.2.2
6+
appVersion: "v0.2.2"
77
kubeVersion: ">=1.26.0-0"
88
home: https://github.com/tazhate/chainplane
99
sources:

0 commit comments

Comments
 (0)