Skip to content

Add in-place operator upgrade that reuses cluster Secrets - #6

Merged
sinadarbouy merged 2 commits into
mainfrom
feat/cluster-operator-upgrade
Sep 14, 2026
Merged

sinadarbouy merged 2 commits into
mainfrom
feat/cluster-operator-upgrade

Conversation

@sinadarbouy

Copy link
Copy Markdown
Contributor

Summary

  • Add nr cluster operator upgrade to bump hypervisor CRDs, the operator Helm chart, and Harbor v* images while reusing existing Kubernetes Secrets (no hypervisor token prompt).
  • nr cluster register --resume --reinstall-operator follows the same reuse path unless credentials are passed (that path is for rotating tokens).
  • Handle CRDs already owned by the operator Helm release (apply in place, annotate helm.sh/resource-policy=keep), use --reset-then-reuse-values so new chart keys apply, pin VNC to Harbor, and wait for the Proxmox exporter like VF/SVM.

Test plan

  • go test ./internal/install/ ./internal/config/ ./internal/cli/
  • golangci-lint run --timeout=5m
  • Lab nr cluster operator upgrade --dry-run shows --reset-then-reuse-values, image.tag=v0.1.3, Harbor VNC repo, crds.enabled=false, no tokens
  • Lab live upgrade on the 37-day k3s agent: chart 0.1.3 / image v0.1.3, operator/exporter/alloy/VNC 1/1 Ready, CRDs annotated keep
  • Public CLI release is still v1.0.13; this is unreleased until the next tag

Existing agents can bump CRDs, the operator Helm chart, and Harbor v*
images without re-entering hypervisor tokens.
…ing.

Updated the operator installation phases to utilize a new function, completeOperatorInstallFromReuse, which consolidates the logic for reusing operator secrets. This change improves error handling and state management during the installation process. Added tests to ensure the new function behaves correctly when the reinstall flag is not set.
@sinadarbouy
sinadarbouy merged commit 82172ef into main Sep 14, 2026
0 of 3 checks passed
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