feat: add the headlamp role #50
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/headlamp-role"
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?
What changes
Adds
roles/headlamp, which installs the official Headlamp Helm chart into thecluster:
headlamp, without a host prefix, inkube-system;headlamp_chart_version(0.46.0);headlamp_node_portand defaulting to32090;externalTrafficPolicyis explicitlyCluster, configured byheadlamp_service_external_traffic_policy, so the NodePort is accepted onevery node interface;
rollout timeout are variables as well.
A NodePort is published on all node interfaces by Kubernetes; a Service has no
separate bind address. The explicit
Clusterpolicy makes that intent part ofthe role instead of relying on the Kubernetes default.
The role is idempotent: it reads the current release and its values and runs
helm upgrade --installonly when the release is missing, notdeployed, usesanother chart version, or does not expose the requested NodePort and external
traffic policy. A converged release is left untouched.
--force-conflictslets Helm take over fields that were previously changedwith
kubectl patch;--rollback-on-failurekeeps a failed upgrade fromleaving the release in the new state. Both are supported by the Helm 4.3.1 the
helmrole installs.The role is wired into
playbooks/dev_delta.yamlafterhelm.Rollout
Applied to
dev_deltawith--tags headlamp. The host already had a manuallypatched Headlamp release; the role upgraded it from NodePort
32091to32090.The release is now revision 5, status
deployed, and its values are:A second run reports
changed=0.Verification
ansible-playbook --syntax-check playbooks/dev_delta.yamlpasses.dprint checkpasses.helm list -n kube-systemshowsheadlampasdeployed,headlamp-0.46.0.k0s kubectl -n kube-system get svc headlampshows typeNodePort,node port
32090,externalTrafficPolicy: Cluster.curl http://127.0.0.1:32090/andcurl http://192.168.70.210:32090/ondev_deltareturn200.dev_deltato192.168.70.210:32090also returns200.--tags headlamprun reportsok=10 changed=0 skipped=1.Note: requests from other inventory hosts did not reach
dev_deltaat all(
tcpdumpsaw no packets), and those hosts cannot ping or SSHdev_deltaeither. That is network segmentation or a firewall outside this role, not a
missing
0.0.0.0bind.