add ghp (GitHub proxy) deployment #357
Reference in New Issue
Block a user
Delete Branch "benvin/ghp"
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?
Why
Deploy
goodtune/ghp(a GitHub proxy) so estate agents have a controlled GitHub access path. Mirrors the artifactapi app structure and the estate's templateddefaultVault convention.How (this PR)
ghp. Runs as the namespace's auto-createddefaultServiceAccount (no custom SA).Cluster(namedpostgres, db/ownerghp) + dedicatedcnpg-ghpCeph RGW backup bucket + nightly ScheduledBackup.command: ["/ghp","serve"];GHP_DATABASE_DSNassembled from the CNPG-generatedpostgres-appSecret via$(VAR)expansion pointing atpostgres-rw.ghp.svc.ghp-migrate(/ghp migrate) at sync-wave 1 so serve replicas never race migrations.defaultrole:VaultAuthrole/SAdefault;VaultStaticSecrets sourcekv/kubernetes/namespace/ghp/default/github-app→ Secretghp-github-appandkv/kubernetes/namespace/ghp/default/app→ Secretghp-app.private_keymounted as a file;encryption_key→GHP_ENCRYPTION_KEY.Certificateghp-tlsoff ClusterIssuervault-issuer, SANs github.com/api.github.com/codeload.github.com/*.githubcopilot.com/ghp.k8s.syd1.au.unkin.net; mounted forGHP_TLS_CERT_FILE/GHP_TLS_KEY_FILE.ghp.k8s.syd1.au.unkin.net./tmpemptyDir on both pods (root FS is read-only).platformApplicationSet + AppProject.kustomize buildclean, kubeconform 17/17 valid (0 skipped), yamllint + pre-commit clean.NOTE — prerequisites before ghp goes Healthy
GHP_ADMINSplaceholder:apps/base/ghp/configmap.yamlhasGHP_ADMINS: "REPLACE_ME_ben_github_username"— set it to Ben's GitHub username.kv/kubernetes/namespace/ghp/default/github-app(app_id/client_id/client_secret/private_key) andkv/kubernetes/namespace/ghp/default/app(encryption_key).ghcrremote pattern for pullingghcr/goodtune/ghp.defaultpolicy already grants read onkv/kubernetes/namespace/<ns>/default/*(the bespoke ghp role PR terraform-vault#120 is closed).Assumptions flagged: metrics env var
GHP_METRICS_LISTEN; two Secrets (ghp-github-app+ghp-app) rather than one merged Secret; DSN assumes the CNPG-generated password is URL-safe.Drop the bespoke ghp SA/role/policy (terraform-vault#120 closed). The default k8s auth role, bound to SA default in every namespace, already has a templated read grant on kv/kubernetes/namespace/<ns>/default/*, so ghp needs zero terraform-vault change. - Remove the custom ServiceAccount; run as the namespace default SA. - Deployment + migrate Job: serviceAccountName default. - VaultAuth: role/serviceAccount default (mirrors artifactapi). - VaultStaticSecrets: source paths move to the templated location kubernetes/namespace/ghp/default/{github-app,app}; Secret names unchanged.