Files
argocd-apps/apps/base/ghp/configmap.yaml
T
unkin-agent 0130d538f5 ghp: use direct ghcr.io image + set GHP_ADMINS (#359)
## Why
The `ghp` app is deployed but its pods are stuck 0/1 Ready (and were ImagePullBackOff), for three separate reasons this PR fixes:

- **ImagePullBackOff:** kubelet anonymous pulls fail on the artifactapi ghcr pull-through because ghcr.io's per-scope token auth is not proxied. The direct public image pulls anonymously, so switch to it.
- **Pods never Ready:** ghp serves its metrics endpoint over **HTTPS** (TLS is configured globally), but the liveness/readiness probes used the default HTTP scheme, so the kubelet probe got an HTTPS-server error and the pods never went Ready.
- **Scrape failure:** the VMServiceScrape hits that same HTTPS endpoint and needs a matching scheme/TLS config, or VM scraping of ghp fails.
- The `GHP_ADMINS` value was still a placeholder.

## How
- `deployment.yaml`: image -> `ghcr.io/goodtune/ghp:0.20.0`; liveness + readiness probe `scheme: HTTP` -> `HTTPS` (kubelet does not verify the probe cert).
- `migrate-job.yaml`: image -> `ghcr.io/goodtune/ghp:0.20.0` (shared image).
- `vmservicescrape.yaml`: endpoint `scheme: https` + `tlsConfig.insecureSkipVerify: true` (internal-CA cert; pod-IP target not in SANs).
- `configmap.yaml`: `GHP_ADMINS` -> `neoloc`.

Validated: `kustomize build apps/overlays/au-syd1/ghp` renders clean, kubeconform + pre-commit pass. Not applied.

## Follow-up (not fixed here)
The artifactapi ghcr pull-through does not proxy ghcr.io's per-scope token auth for anonymous kubelet pulls — worth closing that gap so estate images can go back through artifactapi.

Reviewed-on: #359
Co-authored-by: unkin-agent <unkin-agent@unkin.net>
Co-committed-by: unkin-agent <unkin-agent@unkin.net>
2026-08-13 22:08:05 +10:00

23 lines
816 B
YAML

---
apiVersion: v1
kind: ConfigMap
metadata:
name: ghp-env
namespace: ghp
data:
GHP_DATABASE_DRIVER: postgres
# nonroot cannot bind <1024; listen high and remap in the Service.
GHP_SERVER_HTTPS_LISTEN: ":8443"
GHP_SERVER_HTTP_LISTEN: ":8080"
GHP_METRICS_LISTEN: ":9136"
GHP_METRICS_ENABLED: "true"
GHP_SERVER_BASE_URL: https://ghp.k8s.syd1.au.unkin.net
GHP_SERVER_MANAGEMENT_HOST: ghp.k8s.syd1.au.unkin.net
# private_key key from the ghp-github-app Secret, mounted as a file.
GHP_GITHUB_PRIVATE_KEY_FILE: /etc/ghp/github-app/private_key
# cert-manager Certificate ghp-tls, mounted from the ghp-tls Secret.
GHP_TLS_CERT_FILE: /etc/ghp/tls/tls.crt
GHP_TLS_KEY_FILE: /etc/ghp/tls/tls.key
# PLACEHOLDER: set to Ben's GitHub username before ghp will admit an admin.
GHP_ADMINS: "neoloc"