6d7cdd59e3
## Why During the VM -> k8s Puppet migration, two PuppetDBs coexist and nodes move between them as they migrate. `node-lookup` (and `pblastreport`) need a single, consistent PuppetDB v4 view spanning both. `pdbmux` is a small merging proxy that 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 - Add `apps/base/pdbmux/` (namespace, configmap, deployment, service, gateway, httproute), modeled directly on the encapi app. - Deployment: 2 replicas, image `git.unkin.net/unkin/pdbmux:v0.1.0`, port 8080, `/healthz` liveness + readiness, config via `PDBMUX_*` env from a ConfigMap. - Backends: `old=http://puppetdbapi.service.consul:8080`, `new=http://puppetdb.puppet.svc.cluster.local:8080` (in-cluster, verified against `apps/base/puppet/service_puppetdb.yaml` port `pdb-http`/8080 — the in-cluster address is preferred over the external gateway). `new` is primary/prefer, merge = freshness. - Expose over HTTPS at `pdbmux.k8s.syd1.au.unkin.net` via a `traefik-internal` Gateway (cert-manager `vault-issuer`, external-dns), plain-HTTP backend on a port-80 Service — same shape as the puppetdb/encapi gateways — so VM/workstation `node-lookup` can reach it. - Add `apps/overlays/au-syd1/pdbmux/` and wire pdbmux into the platform ApplicationSet (`apps/overlays/*/pdbmux`) and the platform AppProject (`pdbmux` namespace destination), exactly as encapi is wired. No new woodpecker ServiceAccount is required: the pdbmux image push uses the `docker-buildx` plugin against the Gitea registry with the `default` SA (same as encapi), not artifactapi. ## Verification - `kubectl kustomize apps/overlays/au-syd1/pdbmux` builds clean (image resolves to `git.unkin.net/unkin/pdbmux:v0.1.0`). - ApplicationSet + AppProject YAML validated. ## Merge gates 1. The pdbmux repo initial-content PR (unkin/pdbmux#1) must merge first. 2. `v0.1.0` must then be tagged on the pdbmux repo so the image `git.unkin.net/unkin/pdbmux:v0.1.0` is built and pushed by that repo`s `.woodpecker/docker.yaml`. 3. Then merge this PR. (If the first release tag differs from `v0.1.0`, update the image tag in `apps/base/pdbmux/deployment.yaml` to match before merging.) --------- Co-authored-by: benvin <neotheo@gmail.com> Reviewed-on: #275 Co-authored-by: Ben Vincent <ben@unkin.net> Co-committed-by: Ben Vincent <ben@unkin.net>
88 lines
2.8 KiB
YAML
88 lines
2.8 KiB
YAML
---
|
|
apiVersion: argoproj.io/v1alpha1
|
|
kind: AppProject
|
|
metadata:
|
|
name: platform
|
|
namespace: argocd
|
|
spec:
|
|
description: Platform infrastructure and core services
|
|
sourceRepos:
|
|
- https://git.unkin.net/unkin/argocd-apps
|
|
- https://artifactapi.k8s.syd1.au.unkin.net/api/v1/virtual/helm
|
|
- https://purelb.github.io/purelb/charts
|
|
- oci://gcr.io/k8s-staging-nfd/charts
|
|
- oci://ghcr.io/woodpecker-ci/helm/woodpecker
|
|
destinations:
|
|
- namespace: '*-system'
|
|
server: https://kubernetes.default.svc
|
|
- namespace: 'artifactapi'
|
|
server: https://kubernetes.default.svc
|
|
- namespace: 'age-api'
|
|
server: https://kubernetes.default.svc
|
|
- namespace: 'authentik'
|
|
server: https://kubernetes.default.svc
|
|
- namespace: 'bind-internal'
|
|
server: https://kubernetes.default.svc
|
|
- namespace: 'cert-manager'
|
|
server: https://kubernetes.default.svc
|
|
- namespace: 'certificates'
|
|
server: https://kubernetes.default.svc
|
|
- namespace: 'consul'
|
|
server: https://kubernetes.default.svc
|
|
- namespace: 'encapi'
|
|
server: https://kubernetes.default.svc
|
|
- namespace: 'externaldns'
|
|
server: https://kubernetes.default.svc
|
|
- namespace: 'jfrog'
|
|
server: https://kubernetes.default.svc
|
|
- namespace: 'kanidm'
|
|
server: https://kubernetes.default.svc
|
|
- namespace: 'node-feature-discovery'
|
|
server: https://kubernetes.default.svc
|
|
- namespace: 'pdbmux'
|
|
server: https://kubernetes.default.svc
|
|
- namespace: 'priority-classes'
|
|
server: https://kubernetes.default.svc
|
|
- namespace: 'purelb'
|
|
server: https://kubernetes.default.svc
|
|
- namespace: 'puppet'
|
|
server: https://kubernetes.default.svc
|
|
- namespace: 'reposync'
|
|
server: https://kubernetes.default.svc
|
|
- namespace: 'vault'
|
|
server: https://kubernetes.default.svc
|
|
- namespace: 'woodpecker'
|
|
server: https://kubernetes.default.svc
|
|
clusterResourceWhitelist:
|
|
- group: ''
|
|
kind: Namespace
|
|
- group: 'rbac.authorization.k8s.io'
|
|
kind: ClusterRole
|
|
- group: 'rbac.authorization.k8s.io'
|
|
kind: ClusterRoleBinding
|
|
- group: 'apiextensions.k8s.io'
|
|
kind: CustomResourceDefinition
|
|
- group: 'admissionregistration.k8s.io'
|
|
kind: MutatingWebhookConfiguration
|
|
- group: 'admissionregistration.k8s.io'
|
|
kind: ValidatingWebhookConfiguration
|
|
- group: 'scheduling.k8s.io'
|
|
kind: PriorityClass
|
|
- group: 'purelb.io'
|
|
kind: '*'
|
|
- group: 'nfd.k8s-sigs.io'
|
|
kind: NodeFeatureRule
|
|
- group: 'deviceplugin.intel.com'
|
|
kind: '*'
|
|
- group: 'cert-manager.io'
|
|
kind: Certificate
|
|
- group: 'cert-manager.io'
|
|
kind: Issuer
|
|
- group: 'gateway.networking.k8s.io'
|
|
kind: GatewayClass
|
|
- group: 'networking.k8s.io'
|
|
kind: IngressClass
|
|
namespaceResourceWhitelist:
|
|
- group: '*'
|
|
kind: '*'
|