Skip to content

WIP: feat(linuxaid-agents): ArgoCD Helm chart running the OpenVox agent per node - #223

Draft
ashish1099 wants to merge 2 commits into
masterfrom
feat/linuxaid-agents-argocd-chart
Draft

WIP: feat(linuxaid-agents): ArgoCD Helm chart running the OpenVox agent per node#223
ashish1099 wants to merge 2 commits into
masterfrom
feat/linuxaid-agents-argocd-chart

Conversation

@ashish1099

Copy link
Copy Markdown
Member

Summary

WIP — not ready to merge.

Adds argocd-helm-charts/linuxaid-agents, a new chart that runs the LinuxAid OpenVox (Puppet) agent on KubeAid nodes to manage node-OS state (packages, SSH keys, sudo). This targets the day-2 node-OS gap that Cluster API leaves open on bare metal.

How it works

Not a DaemonSet, and no static node list. The chart deploys a single non-privileged launcher CronJob (hourly by default):

  1. The launcher runs linuxaid-agent fanout, discovering nodes through the Kubernetes API.
  2. For each node it creates one ephemeral privileged agent Job, with a deterministic name so runs cannot overlap.
  3. Each agent Job stages linuxaid-cli onto the node under /opt/obmondo and runs puppet apply masterless (no Puppet server required).
  4. Jobs self-clean via ttlSecondsAfterFinished (600s); backoffLimit: 0 means a failed run simply retries on the next schedule.

RBAC

  • ClusterRole: get/list on nodes — discovery only.
  • Namespaced Role: get/list/create/delete on batch/jobs — to spawn the per-node Jobs.

Safety defaults

  • enforce: false — puppet runs in noop, report-only. Flip to true only once runs report clean.
  • certname is marked required, so rendering fails fast rather than deploying a misconfigured agent.

Prerequisites

  • Deploy into the namespace holding the obmondo-clientcert secret (e.g. monitoring); that namespace must permit privileged pods under PSA.
  • Each node needs the openvox agent present at /opt/puppetlabs/bin/puppet.
  • Both images must be pullable by the cluster.

Known WIP items

  • Images are pinned to the spike tag (ghcr.io/obmondo/linuxaid-agent, ghcr.io/obmondo/linuxaid-agents) — these need real released tags before merge.
  • All nodes share one certname (the clientcert CN), so the whole cluster reports under a single puppet identity. Fine for a uniform node role, not for per-node reporting.
  • Not yet wired into kubeaid-cli bootstrap.

Testing

Not yet deployed to a cluster. This branch has been rebased onto current master (be5784b4d); the rebase was content-neutral, adding 6 new files and no modifications to existing ones.

…a per-node Job

KubeAid nodes need a way to run the LinuxAid OpenVox agent (package,
SSH key and sudo management) without SSH access, driven through
ArgoCD like the rest of the cluster's components.

This chart deploys a single Job per node, using the linuxaid-agents
launcher image (built from linuxaid-cli's Dockerfile): the container
stages the linuxaid-cli binary onto the host and runs it inside the
host namespaces via nsenter, since package/user/sudo management must
happen on the host, not inside the container. The Job needs
hostPID + privileged for nsenter, and mounts the node's
obmondo-clientcert secret plus a hostPath at .Values.hostObmondoPath
for binary staging.

nodeName and certname are required per-release values (one node, one
customer cert, per install). enforce defaults to false (report-only
--noop); flip to true once a report-only run comes back clean.

Image tag currently defaults to "spike" — pin by digest once the
image has a stable release tag in ghcr.io/obmondo/linuxaid-agents.

Related: Obmondo/Linuxaid-cli branch worktree-linuxaid-enforce
(commits 1c13a0d, 632c280) — adds the --enforce flag and the
launcher Dockerfile/entrypoint this chart deploys.
Replace the single per-node Job with a non-privileged launcher CronJob that lists the cluster's nodes and creates one ephemeral privileged agent Job per node each run, so no node list is maintained; deterministic Job names give no-concurrency.

Adds RBAC (list nodes cluster-wide, create jobs in the namespace) and runs the linuxaid-agent launcher image, passing the per-node agent image through to the spawned Jobs.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant