Skip to content

fix(vault): install ca-certificates + fix deploy workflow paths and attribution - #12

Merged
BK1031 merged 3 commits into
mainfrom
bk1031/dockerfile-ca-certificates
Jul 8, 2026
Merged

fix(vault): install ca-certificates + fix deploy workflow paths and attribution#12
BK1031 merged 3 commits into
mainfrom
bk1031/dockerfile-ca-certificates

Conversation

@BK1031

@BK1031 BK1031 commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Bundle of small fixes:

1. Install ca-certificates in the runtime image

The `alpine:3.19` runtime image didn't have the `ca-certificates` package installed, so Go's `crypto/x509` couldn't validate outbound HTTPS handshakes reliably. `POST /integrations/kubernetes/clusters/verify` was returning 502 in ~50ms because `kubernetes.NewVerifier(...).Check(ctx)` couldn't fetch the OIDC discovery doc — TLS handshake failed for lack of a CA bundle Go could find.

The base image ships `/etc/ssl/certs/ca-certificates.crt` (219KB, 146 CAs) copied from something upstream, and busybox wget's TLS library finds it. But Go's SystemCertPool probes a specific list of paths and requires the file to be registered via the ca-certificates package (or picked up by `update-ca-certificates` at install time) — the raw file existing isn't sufficient in every case.

Adding `RUN apk --no-cache add ca-certificates` in the runtime stage resolves this properly.

2. Update deploy workflow to reference the new infra path

After the infra repo reorganized its Kubernetes tree per-cluster (Gaucho-Racing/infrastructure PR #121), vault lives on gr-foundry at:

`kubernetes/gr-foundry/manifests/vault/kustomization.yaml`

The deploy workflow was still pointing at the old `kubernetes/manifests/vault/kustomization.yaml` and would silently do nothing on the next release. Updating.

3. Attribute deploy commits to @gauchoracing

The PAT the deploy workflow uses to open PRs against the infra repo belongs to the @gauchoracing service account, but the commits were being authored as `github-actions[bot]`. Setting git config to `GR Admin team@gauchoracing.com` — that email is verified on the @gauchoracing account, so GitHub links commits + the PR opener both show as @gauchoracing.

Related infra changes

  • Companion workaround PR against gaucho-racing/infrastructure #127 sets `SSL_CERT_FILE` + `SSL_CERT_DIR` env vars on the vault Deployment to force Go's cert loading. Once this PR ships in a new vault-server release and the image tag is bumped in the kustomization, those env vars can be removed as a followup cleanup.

Test plan

  • Build image with the new Dockerfile and deploy to gr-foundry cluster.
  • Remove the SSL_CERT_* env vars from server.yaml.
  • Vault UI: register the gr-foundry cluster → Verify → succeeds without env vars.
  • Cut next vault release → observe the deploy PR:
    • Opens against Gaucho-Racing/infrastructure ✓
    • Modifies `kubernetes/gr-foundry/manifests/vault/kustomization.yaml` ✓
    • Shows @gauchoracing as author on the commit AND opener of the PR ✓

Go's crypto/x509 was failing to validate outbound HTTPS in the
alpine:3.19 runtime image — including OIDC discovery when registering
a Kubernetes cluster whose issuer is served behind a public
Let's Encrypt cert. The builder stage installed ca-certificates but
that layer was discarded when switching to the minimal runtime.

Adding `apk --no-cache add ca-certificates` in the runtime stage
registers the standard CA bundle at
/etc/ssl/certs/ca-certificates.crt in the way Go expects.

Workaround in the meantime (in Gaucho-Racing/infrastructure PR #127):
set SSL_CERT_FILE + SSL_CERT_DIR on the vault Deployment to force Go
to load the bundle. Once this image is released and rolled out, those
env vars can go.
@BK1031 BK1031 changed the title fix(vault): install ca-certificates in the runtime image fix(vault): install ca-certificates + fix deploy workflow paths and attribution Jul 8, 2026
…ute commits to @gauchoracing

Two fixes to the release deploy workflow:

1. Update the kustomization path from
   kubernetes/manifests/vault/kustomization.yaml
   to
   kubernetes/gr-foundry/manifests/vault/kustomization.yaml
   after the infra repo reorganized its Kubernetes tree per-cluster
   under gr-prod/ and gr-foundry/. Vault now lives on gr-foundry, so
   the deploy job needs to bump the tag in that path.

2. Attribute the bump commit to the @gauchoracing service account
   (via the noreply email format 153126024+gauchoracing@users.noreply.github.com)
   instead of github-actions[bot]. The PAT this job uses already belongs
   to @gauchoracing; matching the commit author to that identity makes
   the PRs show as opened AND authored by @gauchoracing in the infra
   repo, so the audit trail is consistent.
@BK1031
BK1031 force-pushed the bk1031/dockerfile-ca-certificates branch from d3bf72a to 5a42211 Compare July 8, 2026 06:24
Adds a "Click here to view all changes" link pointing at GitHub's
compare view for OLD_TAG..NEW_TAG in the vault repo. Renders as the
final content line before the auto-generated footer, so a reviewer
can jump straight to the full unified diff instead of clicking
through individual commits.

Uses the same OLD_TAG / NEW_TAG / VAULT_REPO variables the changelog
generation already resolves.
@BK1031
BK1031 merged commit 81e1edb into main Jul 8, 2026
7 checks passed
@BK1031
BK1031 deleted the bk1031/dockerfile-ca-certificates branch July 8, 2026 06:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant