fix: default to the buildkit in the caller's own namespace
The default was `tcp://buildkit.gitea.svc.cluster.local:1234`, which names aceofbase's namespace explicitly. That was correct while aceofbase was the only cluster running CI, and resolves to nothing from planet-express — so every workflow moved to the new dink-backed runner had to override it, and forgetting produced a DNS error from inside buildx that named neither this action nor the cluster it pointed at. A BARE Service name resolves in the job container's own namespace, which is where its runner's buildkit lives on both clusters: `gitea` on aceofbase, `gitea-runner` on planet-express. One default, correct on both, and correct for a cluster nobody has built yet. Verified before changing rather than assumed: on aceofbase the buildkit Service is in `gitea`, and gitea-act-runner's Role is namespace-scoped to `gitea`, so its job pods land in the same namespace as the Service. Existing consumers therefore see no change. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01C1tzpqzv37DDbtpPTxHsyA
This commit is contained in:
co-authored by
Claude Opus 5
parent
917bedaf7c
commit
17d77ace6a
@@ -1,8 +1,7 @@
|
|||||||
# setup-buildx
|
# setup-buildx
|
||||||
|
|
||||||
Drop-in replacement for `docker/setup-buildx-action@v3` that defaults to the
|
Drop-in replacement for `docker/setup-buildx-action@v3` that defaults to the
|
||||||
in-cluster `buildkit.gitea.svc.cluster.local:1234` service in the aceofbase
|
`buildkit` service in the calling job's own namespace.
|
||||||
cluster.
|
|
||||||
|
|
||||||
Use this whenever a Gitea Actions workflow needs to build images. It removes
|
Use this whenever a Gitea Actions workflow needs to build images. It removes
|
||||||
the boilerplate of declaring a remote driver every time, and ensures every
|
the boilerplate of declaring a remote driver every time, and ensures every
|
||||||
@@ -36,7 +35,7 @@ jobs:
|
|||||||
|
|
||||||
| Name | Default | Description |
|
| Name | Default | Description |
|
||||||
|------|---------|-------------|
|
|------|---------|-------------|
|
||||||
| `endpoint` | `tcp://buildkit.gitea.svc.cluster.local:1234` | BuildKit TCP endpoint. Override only if you run a private buildkit somewhere else. |
|
| `endpoint` | `tcp://buildkit:1234` | BuildKit TCP endpoint. A bare Service name, so it resolves in the job's own namespace. Override only if you run a private buildkit somewhere else. |
|
||||||
| `version` | `latest` | buildx version, passed through to the upstream action. |
|
| `version` | `latest` | buildx version, passed through to the upstream action. |
|
||||||
|
|
||||||
## Why
|
## Why
|
||||||
@@ -54,3 +53,17 @@ Cache / Results API and injects `ACTIONS_CACHE_URL` / `ACTIONS_RUNTIME_TOKEN`
|
|||||||
into the job container. That cache is persisted on the runner's `/data` PVC,
|
into the job container. That cache is persisted on the runner's `/data` PVC,
|
||||||
so it survives pod restarts. There is no separate cache-server deployment to
|
so it survives pod restarts. There is no separate cache-server deployment to
|
||||||
configure.
|
configure.
|
||||||
|
|
||||||
|
## Why the endpoint is a bare Service name
|
||||||
|
|
||||||
|
A job container resolves a bare Service name in its own namespace, which is
|
||||||
|
where its runner's buildkit lives on every cluster here — `gitea` on
|
||||||
|
aceofbase, `gitea-runner` on planet-express. One default is therefore correct
|
||||||
|
on both, and stays correct for a cluster nobody has built yet.
|
||||||
|
|
||||||
|
Until 2026-08-18 it defaulted to `tcp://buildkit.gitea.svc.cluster.local:1234`,
|
||||||
|
naming aceofbase's namespace explicitly. That was fine while aceofbase was the
|
||||||
|
only cluster running CI. It resolved to nothing from planet-express, so every
|
||||||
|
workflow moved there had to pass `endpoint:` by hand, and forgetting produced a
|
||||||
|
DNS error from inside buildx that named neither this action nor the cluster it
|
||||||
|
was pointing at.
|
||||||
|
|||||||
+16
-6
@@ -1,15 +1,25 @@
|
|||||||
name: setup-buildx
|
name: setup-buildx
|
||||||
description: |
|
description: |
|
||||||
Wrapper around docker/setup-buildx-action that defaults to the in-cluster
|
Wrapper around docker/setup-buildx-action that defaults to the buildkit
|
||||||
buildkit service running in the gitea namespace of the aceofbase cluster.
|
service in the caller's own namespace. Lets workflow authors skip the
|
||||||
Lets workflow authors skip the boilerplate of pointing setup-buildx at a
|
boilerplate of pointing setup-buildx at a remote driver.
|
||||||
remote driver.
|
|
||||||
|
|
||||||
inputs:
|
inputs:
|
||||||
endpoint:
|
endpoint:
|
||||||
description: 'BuildKit TCP endpoint. Defaults to the in-cluster service.'
|
# A BARE Service name, deliberately, rather than an FQDN. A job container
|
||||||
|
# resolves it in its own namespace, which is where its runner's buildkit
|
||||||
|
# lives on every cluster here: `gitea` on aceofbase, `gitea-runner` on
|
||||||
|
# planet-express. One default is therefore correct on both, and stays
|
||||||
|
# correct for a cluster nobody has built yet.
|
||||||
|
#
|
||||||
|
# It used to default to `tcp://buildkit.gitea.svc.cluster.local:1234`,
|
||||||
|
# which named aceofbase's namespace explicitly. That resolved to nothing
|
||||||
|
# from planet-express, so every workflow moved there had to override it —
|
||||||
|
# and the failure mode was a DNS error inside buildx rather than anything
|
||||||
|
# naming this action.
|
||||||
|
description: 'BuildKit TCP endpoint. Defaults to the buildkit Service in the calling job''s own namespace.'
|
||||||
required: false
|
required: false
|
||||||
default: 'tcp://buildkit.gitea.svc.cluster.local:1234'
|
default: 'tcp://buildkit:1234'
|
||||||
version:
|
version:
|
||||||
description: 'buildx version to install (passed through).'
|
description: 'buildx version to install (passed through).'
|
||||||
required: false
|
required: false
|
||||||
|
|||||||
Reference in New Issue
Block a user