MCPcopy Create free account
hub / github.com/PostHog/duckgres / Controller

Struct Controller

controlplane/provisioner/controller.go:64–76  ·  view source on GitHub ↗

Controller polls the config store for actionable warehouses and reconciles their state against Duckling CRs in Kubernetes.

Source from the content-addressed store, hash-verified

62type MetadataProbe func(ctx context.Context, endpoint, user, password, database, sslMode string) error
63
64// Controller polls the config store for actionable warehouses and reconciles
65// their state against Duckling CRs in Kubernetes.
66type Controller struct {
67 store WarehouseStore
68 duckling *DucklingClient
69 pollInterval time.Duration
70 probe MetadataProbe
71
72 // bucketSuffix is the env suffix for CP-owned s3bucket naming
73 // (DUCKGRES_DUCKLING_BUCKET_SUFFIX, e.g. "mw-prod-us"). When set, the
74 // controller backfills spec.dataStore.bucketName onto ready s3bucket
75 // ducklings that predate CP-owned naming. Empty ⇒ backfill is a no-op and
76 // the composition keeps deriving the name.
77 bucketSuffix string
78
79 // Trino-side reconcile dependency. Optional: if nil (the default in

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected