Switch puppet compiler ENC from Cobbler to encapi #272
Reference in New Issue
Block a user
Delete Branch "benvin/puppet-enc-encapi"
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
The k8s puppetserver compilers classify nodes via an exec ENC that today queries legacy Cobbler (
https://cobbler.main.unkin.net) over TLS.encapinow runs in-cluster and exposes a cobbler-wire-compatible endpoint (GET /cblr/svc/op/puppet/hostname/<certname>), a drop-in for the Cobbler URL. This cuts the puppet-on-k8s ENC over from Cobbler to encapi — a prerequisite for migrating VM agents onto puppet-on-k8s.Changes
resources/cobbler-enc->resources/encapi-enc, and its configmappuppet-cobbler-enc->puppet-encapi-enc(kustomization configMapGenerator + deployment volume, initContainer copy path, and volumeMount subPath).external_nodesin the compilerpuppet.confat/opt/bin/encapi-enc.http://encapi.encapi.svc.cluster.local(plain HTTP), overridable via theENCAPI_URLenv var./opt/vault-ca-cert.crtverify for the ENC request (no TLS needed in-cluster).enc_role/enc_envparams set,environmentstripped when it equalstesting.Verified with
kubectl kustomize apps/overlays/au-syd1/puppet(builds clean, exit 0); the generatedpuppet-encapi-encconfigmap contains the new URL and env var.🚨 Merge gate
Do not merge until encapi is seeded (terraform-incus
benvin/encapi-seedPR applied). An empty encapi means every node resolves to a 404. On 404 the ENC script exits non-zero, so puppet fails the compile rather than classifying the node with zero classes — nodes will fail to run until they exist in encapi. Seed encapi first so real nodes classify correctly; only unknown nodes should 404.