Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ProbeMetadataStore ¶
func ProbeMetadataStore(ctx context.Context, endpoint, user, password, database, sslMode string) error
ProbeMetadataStore does a real end-to-end connect to the metadata Postgres and runs SELECT 1 to confirm the path is reachable from a CP pod.
Purpose: AWS Aurora reports a cluster as Available before the cluster's DNS record has propagated to in-cluster CoreDNS, and even further before pgbouncer's resolver picks it up. If the provisioner flips the warehouse to state=ready on AWS-Available alone, worker activations during the next 3-5 minutes hit "DuckLake migration check failed → connect to metadata store: DNS lookup failed". This probe closes that window — we only flip to ready when the actual path the workers will use actually works.
`endpoint` is "<host>[:<port>]"; missing port defaults to 5432. `sslMode` should be:
- "disable" when probing through the duckling's pgbouncer (the CR's pgbouncer pod is configured for plaintext between worker and pooler and brings TLS to RDS itself)
- "require" when probing the metadata RDS endpoint directly (Aurora requires TLS; AWS issues the cert from the AWS-RDS-Root CA chain)
The caller (provisioner controller) decides which path to probe based on the warehouse's pgbouncer.enabled toggle — ducklings can run with or without the pgbouncer pooler and the chosen path must match.
Types ¶
type Controller ¶
type Controller struct{}
Controller is a stub for non-Kubernetes builds.
func NewController ¶
func NewController(_ *configstore.ConfigStore, _ time.Duration) (*Controller, error)
NewController returns an error on non-Kubernetes builds since it requires K8s API access.