pdbmux: deploy the merging PuppetDB proxy in-cluster #275
Reference in New Issue
Block a user
Delete Branch "benvin/pdbmux-deploy"
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
During the VM -> k8s Puppet migration, two PuppetDBs coexist and nodes move
between them as they migrate.
node-lookup(andpblastreport) need a single,consistent PuppetDB v4 view spanning both.
pdbmuxis a small merging proxythat provides exactly that. Per the all-in-kubernetes estate direction it runs
as an in-cluster service, not a per-VM systemd unit.
pdbmux now lives in its own repository (https://git.unkin.net/unkin/pdbmux) —
split out of the earlier node-lookup prototype — and is released as a container
image on its own
v*tags.Changes
apps/base/pdbmux/(namespace, configmap, deployment, service, gateway,httproute), modeled directly on the encapi app.
git.unkin.net/unkin/pdbmux:v0.1.0, port 8080,/healthzliveness + readiness, config viaPDBMUX_*env from a ConfigMap.old=http://puppetdbapi.service.consul:8080,new=http://puppetdb.puppet.svc.cluster.local:8080(in-cluster, verifiedagainst
apps/base/puppet/service_puppetdb.yamlportpdb-http/8080 — thein-cluster address is preferred over the external gateway).
newisprimary/prefer, merge = freshness.
pdbmux.k8s.syd1.au.unkin.netvia atraefik-internalGateway (cert-manager
vault-issuer, external-dns), plain-HTTP backend on aport-80 Service — same shape as the puppetdb/encapi gateways — so
VM/workstation
node-lookupcan reach it.apps/overlays/au-syd1/pdbmux/and wire pdbmux into the platformApplicationSet (
apps/overlays/*/pdbmux) and the platform AppProject(
pdbmuxnamespace destination), exactly as encapi is wired.No new woodpecker ServiceAccount is required: the pdbmux image push uses the
docker-buildxplugin against the Gitea registry with thedefaultSA (same asencapi), not artifactapi.
Verification
kubectl kustomize apps/overlays/au-syd1/pdbmuxbuilds clean (image resolvesto
git.unkin.net/unkin/pdbmux:v0.1.0).Merge gates
(unkin/pdbmux#1) must merge first.
v0.1.0must then be tagged on the pdbmux repo so the imagegit.unkin.net/unkin/pdbmux:v0.1.0is built and pushed by that repos.woodpecker/docker.yaml`.v0.1.0, updatethe image tag in
apps/base/pdbmux/deployment.yamlto match before merging.)