feat: make puppet-initial CA endpoint configurable, default to k8s puppetca #171
Reference in New Issue
Block a user
Delete Branch "benvin/puppet-initial-puppetca"
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
puppet-initialfirstrun bootstrap RPM hardcoded the legacy Consul-discovered CA endpointpuppetca.query.consul:8140. That VM-era CA is being replaced by the in-cluster puppetserver CA servicepuppetca.k8s.syd1.au.unkin.net. Rather than swap one hardcoded host for another, the endpoint is now configurable so kickstart can override it per host.Verified the new service serves the same Puppet CA API on the same port:
https://puppetca.k8s.syd1.au.unkin.net:8140/puppet-ca/v1/certificate/careturns HTTP 200 with a valid Puppet CA cert.Changes
puppetca.k8s.syd1.au.unkin.net(still port8140, same/puppet-ca/v1/certificate/capath).PUPPETCA_HOST/PUPPETCA_PORTfrom the environment, falling back to the defaults, and uses them for both the CA cert fetch and the--serverof the initial noop registration run.EnvironmentFile=-/etc/sysconfig/puppet-initialto the systemd unit so kickstart%postcan drop overrides in there./etc/sysconfig/puppet-initialas%config(noreplace).%postexample.1.0.3->1.0.4so a new RPM is published (dedup skips identical filenames).Note: the run loop still targets
puppet.query.consul(the compile master, a separate host from the CA) — intentionally left unchanged; scope here is the CA endpoint only.Validation
make test— 72 passednfpm pkgbuild: RPM assembles;/etc/sysconfig/puppet-initialcorrectly listed byrpm -qcpas a config file; packaged script carries the new default + env wiring.https://claude.ai/code/session_015ur3i7D2azsMAWTSVABApv