feat: manage Longhorn with an ArgoCD Application #87
Loading…
Reference in a new issue
No description provided.
Delete branch "ivuorinen/feat/longhorn-argocd"
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?
Longhorn was the last component changed by running a script from a
workstation (scripts/07-install-longhorn.sh, helm upgrade --install). It is
now an ArgoCD Application, and the script is deleted.
Merge after "feat(argocd): let Kustomize inflate Helm charts", once
argocd-config is Synced: this Application is rendered with
kustomize.buildOptions --enable-helm, which that PR adds to argocd-cm.
What it does
through helmCharts, with the five values the live release has
(helm get values) plus preUpgradeChecker.jobEnabled: false from Longhorn's
ArgoCD install guide. Kustomize rather than a chart-sourced Application so
its patches can put kube-linter ignore annotations on the longhorn-manager
DaemonSet and the post-upgrade Job — the chart's values reach neither — and
remove the chart's uninstall Job.
pre-delete hook as PreDelete and re-creates it every reconcile while it
fails; with deleting-confirmation-flag false the Application could never
be deleted, and with it true deleting the Application would uninstall
Longhorn. Without it, deleting the Application only stops tracking.
prune, no finalizer.
Adoption is in place. The render, diffed client-side against the live
cluster with hook objects excluded, differs only in the two annotations on
longhorn-manager's own metadata — not its pod template, so nothing restarts.
The same holds when rendered the way ArgoCD v3.5.3 does (Helm 4.2.1,
Kustomize 5.8.1, the cluster's version and API list).
Checks
from a copy (kustomize writes charts/ beside kustomization.yaml), and fails
on a kustomization.yaml it cannot parse instead of skipping it.
tests/render-applications.bats pins that; the helm-render hook pattern now
reaches the Kustomization (tests/hook-coverage.bats).
Application, contradicting its own comment.
Renovate
reads it. Longhorn is never automerged and every major and minor stream is
its own PR, because Longhorn supports one minor step at a time.
scripts/generate-crd-schemas.py now reads YAML with PyYAML as a PEP 723 uv
script, since Renovate can install helm, python and uv but not yq; the
Renovate global config allows that one anchored command.
Docs
docs/01, 02, 04, 05 and 11, README and the manifest comments follow. Rebuilding
with a restore now hands the restore's dependencies to ArgoCD before
bootstrapping (docs/04-storage.md), because Longhorn arrives in the same root
sync as the apps whose volumes it restores. The Longhorn chart's inherited
security posture is recorded there as an explicit acceptance.
The spec and plan are under docs/superpowers/. docs/audit/findings records the
changed-files audit run on this branch; all six findings are resolved here.