ghp: deploy service-token fork image + wire GHP_AUTH_SERVICE_TOKENS (#372)

Why: P4 step 3. Now that the CA-baked buildx plugin lets `docker-internal/ghp` push succeed, deploy the in-house ghp fork (`v0.20.0-unkin4`) which adds static admin service tokens — the mechanism the forthcoming Vault ghp secrets engine uses to authenticate as admin and mint scoped tokens.

How:
- image: ghcr.io/goodtune/ghp:0.20.0 -> artifactapi.k8s.syd1.au.unkin.net/docker-internal/ghp:v0.20.0-unkin4 (a LOCAL registry image, not the ghcr pull-through that previously ImagePullBackOff-ed).
- add env GHP_AUTH_SERVICE_TOKENS from Secret ghp-app key `service_token`, `optional: true` — ghp runs unchanged until the token is seeded.

Requires (Ben, runbook): seed `service_token` into kv/kubernetes/namespace/ghp/default/app (same pattern as encryption_key/github-app). The default role's templated policy already grants read; no terraform-vault change. The existing ghp-app reloader annotation rolls the Deployment once the key appears. This same token value later becomes the Vault ghp engine admin_token (P4 steps 5-6).

Reviewed-on: #372
Co-authored-by: unkin-agent <unkin-agent@unkin.net>
Co-committed-by: unkin-agent <unkin-agent@unkin.net>
This commit was merged in pull request #372.
This commit is contained in:
2026-08-15 18:18:22 +10:00
committed by BenVincent
parent 7556d08d06
commit a4808f5528
+12 -1
View File
@@ -34,7 +34,7 @@ spec:
type: RuntimeDefault
containers:
- name: ghp
image: ghcr.io/goodtune/ghp:0.20.0
image: artifactapi.k8s.syd1.au.unkin.net/docker-internal/ghp:v0.20.0-unkin4
imagePullPolicy: IfNotPresent
# Drop the image's default --migrate so replicas never race migrations;
# schema is applied by the wave-1 migrate hook Job instead.
@@ -88,6 +88,17 @@ spec:
secretKeyRef:
name: ghp-app
key: encryption_key
# Static admin service token for machine callers (the Vault ghp
# secrets engine authenticates with it to mint scoped tokens).
# optional: ghp runs fine without it until Ben seeds `service_token`
# into kv/kubernetes/namespace/ghp/default/app; the ghp-app reloader
# annotation then rolls this Deployment to pick it up.
- name: GHP_AUTH_SERVICE_TOKENS
valueFrom:
secretKeyRef:
name: ghp-app
key: service_token
optional: true
volumeMounts:
- name: github-app
mountPath: /etc/ghp/github-app