42c1794d0e
The migrate Job was a PreSync hook but connects to postgres-rw, whose CNPG Cluster + generated postgres-app secret apply in the Sync phase (after all PreSync hooks). On a fresh install migrate ran before Postgres existed, failed, exhausted backoffLimit, failed PreSync, and blocked the Sync phase that creates the DB. - Move migrate off PreSync to a Sync-phase hook at sync-wave 1. - Put the CNPG Cluster + backup resources, VSO auth/secrets, and Certificate at wave 0 so the DB is Healthy (and creds/cert exist) before migrate runs. - Put the Deployment + Service/Gateway/HTTPRoute/PDB/VMServiceScrape at wave 2 so serve starts after migrate completes. - Add a writable /tmp emptyDir to the serve container and migrate Job (root FS is read-only) so codeload/staging writes cannot crash the process.
40 lines
1.1 KiB
YAML
40 lines
1.1 KiB
YAML
---
|
|
# Management UI ingress for ghp.k8s.syd1.au.unkin.net via the internal Traefik.
|
|
# TLS is terminated with the ghp-tls Secret produced by the cert-manager
|
|
# Certificate (which also carries the GitHub SANs); no cert-manager annotation
|
|
# here so the two never fight over the same Secret.
|
|
apiVersion: gateway.networking.k8s.io/v1
|
|
kind: Gateway
|
|
metadata:
|
|
labels:
|
|
traefik.io/instance: internal
|
|
annotations:
|
|
argocd.argoproj.io/sync-wave: "2"
|
|
external-dns.alpha.kubernetes.io/hostname: ghp.k8s.syd1.au.unkin.net
|
|
external-dns.alpha.kubernetes.io/target: 198.18.200.4
|
|
name: ghp
|
|
namespace: ghp
|
|
spec:
|
|
gatewayClassName: traefik-internal
|
|
listeners:
|
|
- allowedRoutes:
|
|
namespaces:
|
|
from: Same
|
|
hostname: ghp.k8s.syd1.au.unkin.net
|
|
name: http
|
|
port: 80
|
|
protocol: HTTP
|
|
- allowedRoutes:
|
|
namespaces:
|
|
from: Same
|
|
hostname: ghp.k8s.syd1.au.unkin.net
|
|
name: https
|
|
port: 443
|
|
protocol: HTTPS
|
|
tls:
|
|
certificateRefs:
|
|
- group: ""
|
|
kind: Secret
|
|
name: ghp-tls
|
|
mode: Terminate
|