Skip to content

Commit 45185dd

Browse files
RoyLinRoyLin
authored andcommitted
ci: GHCR image release workflow (canonical) + README registry model
Add .github/workflows/image.yml: on a version tag, build the collector from source (deploy/Dockerfile, clean-room) and push to ghcr.io/a3s-lab/observer:<ver>. GHCR is the canonical/reproducible release; the internal A3S registry (what the egress-constrained cluster pulls) is fed by promoting/mirroring it. README documents the model.
1 parent bd90479 commit 45185dd

2 files changed

Lines changed: 45 additions & 4 deletions

File tree

.github/workflows/image.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: image
2+
3+
# Canonical release: on a version tag, build the collector image from source (clean-room,
4+
# reproducible — unlike a manual host build) and push to GHCR. The internal A3S registry
5+
# (what the cluster pulls from) is then fed by promoting/mirroring this image.
6+
on:
7+
push:
8+
tags: ['v*']
9+
workflow_dispatch: {}
10+
11+
permissions:
12+
contents: read
13+
packages: write
14+
15+
jobs:
16+
image:
17+
runs-on: ubuntu-latest
18+
steps:
19+
- uses: actions/checkout@v4
20+
- uses: docker/setup-buildx-action@v3
21+
- uses: docker/login-action@v3
22+
with:
23+
registry: ghcr.io
24+
username: ${{ github.actor }}
25+
password: ${{ secrets.GITHUB_TOKEN }}
26+
- id: meta
27+
uses: docker/metadata-action@v5
28+
with:
29+
images: ghcr.io/${{ github.repository }} # -> ghcr.io/a3s-lab/observer (lowercased)
30+
tags: |
31+
type=semver,pattern={{version}}
32+
type=ref,event=tag
33+
- uses: docker/build-push-action@v6
34+
with:
35+
context: .
36+
file: deploy/Dockerfile # multi-stage: builds the eBPF + collector from source
37+
push: true
38+
tags: ${{ steps.meta.outputs.tags }}
39+
labels: ${{ steps.meta.outputs.labels }}

README.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -136,10 +136,12 @@ OTEL_EXPORTER_OTLP_ENDPOINT=http://otlp-backend:4317 \
136136
Every event is one valid-JSON line (verified: the `filelog` receiver's `json_parser`
137137
ingests them directly), so a3s-observer also drops straight into vector / Loki / `jq`.
138138

139-
**Kubernetes:** build the image with [`deploy/Dockerfile`](deploy/Dockerfile) and deploy
140-
[`deploy/daemonset.yaml`](deploy/daemonset.yaml) (writes NDJSON to stdout); a node-level
141-
OTel Collector DaemonSet tails the container log. No k8s API/RBAC needed — pod identity
142-
comes from `/proc/<pid>/cgroup`. This keeps the always-on probe binary minimal and
139+
**Kubernetes:** CI publishes the image to **`ghcr.io/a3s-lab/observer:<ver>`** on each tag
140+
([`.github/workflows/image.yml`](.github/workflows/image.yml), built from
141+
[`deploy/Dockerfile`](deploy/Dockerfile)); mirror/promote it to a cluster-local registry for
142+
nodes that can't reach `ghcr.io`. Then deploy [`deploy/daemonset.yaml`](deploy/daemonset.yaml)
143+
(NDJSON to stdout); a node-level OTel Collector DaemonSet tails the container log. No k8s
144+
API/RBAC needed — pod identity comes from `/proc/<pid>/cgroup`. This keeps the always-on probe binary minimal and
143145
decoupled from backend availability; in-process OTLP push is intentionally **not** built —
144146
that's the Collector's job.
145147

0 commit comments

Comments
 (0)