fix(ci): bastia-secret discovers Vault gateway at runtime for per-job containers #3
No reviewers
Labels
No labels
bug
duplicate
enhancement
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
Toilville/toilville-static-sites!3
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/bastia-secret-dynamic-gateway-fallback"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Scope
Updates
.forgejo/actions/bastia-secret/action.yml's Vault-address probe chain to discover the Docker network gateway at runtime instead of relying on a hardcoded fallback IP. Adds a_discover_gateway()shell function (prefersip route, falls back to parsing/proc/net/route) and wires its output into_vault_candidatesin place of the statichttp://172.17.0.1:8200entry.Why
act_runner v12 does not honor
container.options/--add-hostfor per-jobcontainer:jobs, sohttp://vault.forge:8200never resolves inside those jobs. The previous fallback, a hardcodedhttp://172.17.0.1:8200, is also stale: each ephemeral per-job network gets its gateway dynamically allocated from a10.128.0.0/9pool, never that fixed address, so the fallback times out rather than reaching Vault._discover_gateway()resolves the real gateway at runtime instead of trusting an address that inevitably drifts.This is the same fix already applied to
Toilville/forge-ci-workflows(PR #6), the canonical copy this repo vendorsbastia-secretfrom. This repo doesn't currently callbastia-secretfrom any workflow —build-deploy.ymlusesssh-deploy-setupfor its secret needs instead — so this change is purely preventative, applied for consistency in casebastia-secretgets wired up to a containerized job here later.Testing
Validated YAML structure (
python3 -c "import yaml; yaml.safe_load(...)") and bash syntax (bash -n) of the modifiedrun:block. Validated the array-construction logic underset -uwith both empty and populated_gateway_iplocally before propagating this identical patch from forge-ci-workflows. This repo doesn't currently exercisebastia-secretin any workflow, so there is nothing live here to re-verify against a running job.Impact Statement
No behavior change for this repo today — no workflow here currently calls
bastia-secret. This is a preventative consistency fix that keeps the vendored copy aligned with the canonicalforge-ci-workflowsaction ahead of any future use. Touches only.forgejo/actions/bastia-secret/action.yml.