Repository navigation
fix(helm): validate external Grove before operator installation - #16546
Merged
Merged
Conversation
Signed-off-by: Dr. Stefan Schimanski <[email protected]>
Contributor
Signed-off-by: Dr. Stefan Schimanski <[email protected]>
Signed-off-by: Dr. Stefan Schimanski <[email protected]>
Signed-off-by: Dr. Stefan Schimanski <[email protected]>
Contributor
✅ Dynamo PR CI passed — run 38889367241 (attempt 1) on
|
tmonty12
approved these changes
Oct 15, 2026
tmonty12
left a comment
Contributor
There was a problem hiding this comment.
LGTM, outside addressing Julien's comments and handling the Flux controller issue
Signed-off-by: Dr. Stefan Schimanski <[email protected]>
Signed-off-by: Dr. Stefan Schimanski <[email protected]>
1 task done
julienmancuso
approved these changes
Oct 16, 2026
This was referenced Oct 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Important
Flux requirement: use a helm-controller build/release containing fluxcd/helm-controller#1604. The tested helm-controller v1.6.5 (Flux v2.9.6, Helm SDK v4.2.4) panics on
helm.sh/hook-output-log-policy. The upstream fix initializes the missing callback; it does not forward hook logs into Flux status/events. As of this update, #1604 is open and no containing release version is available, so a numeric minimum cannot yet be specified. The annotation remains enabled; the concrete incompatibility diagnosis is available in retained Job logs for Flux and Argo CD.Summary
External Grove can expose the expected APIs while its controller is too old to inject
GROVE_PCSG_POD_INDEX, causing new Dynamo multinode workers to fail at startup.Add a read-only Helm
pre-install,pre-upgradeJob that blocks before applying the operator Deployment. It checks the Grove controller image version, completed rollout, and presence of established Grove CRDs. No live operator changes and no mutation/adoption of external Grove resources.Failure UX: The Job name ends in
check-grove-compatibility, making the failed check identifiable in generic hook errors from Helm/Flux/Argo CD. Helm 3.18+ prints the failed Job logs automatically, including the detected incompatible Grove version and the required upgrade, before the final hook error. Older Helm versions require reading the retained Job logs manually.Configuration and compatibility
The gate defaults on for external Grove only:
Discovery requires exactly one Deployment containing a
grove-operatorcontainer. Select a controller explicitly when necessary:deploymentNamewithoutnamespaceis invalid. The current minimum is Grovev0.1.0-alpha.15; alpha.N and stable release tags are supported, including tags paired with digests. Custom/RC tags, digest-only images, missing/ambiguous controllers, incomplete rollouts, missing/unestablished CRDs, and API errors fail the gate.This checks CRD availability, not exact schema/version compatibility. Upgrade external Grove and matching CRDs before Dynamo. Tags must accurately identify controller contents.
The Job runs Python's standard library with read-only RBAC, a non-root user, a read-only filesystem, a 120-second deadline, and two retries. Override
image/imagePullSecretsfor an internal registry. Hook dependencies run before the Job; successful Jobs are removed and failed logs retained.helm.sh/hook-output-log-policy: hook-failedmakes Helm 3.18+ print failed Job logs directly, using the installer's Pod/log read permissions. Supporting RBAC/ServiceAccount hooks persist and need manual removal when retiring the release.Helm and Flux execute the hooks; Argo CD maps them to PreSync. Raw
kubectl apply, selective sync, or disabled hooks do not enforce the gate. Order separately managed Grove upgrades first. For installations with a separate compatibility gate, explicitly opt out:Preflight scheduling and OpenShift
grovePreflight.affinitydefaults to{}and is independent ofcontrollerManager.affinity, so a pre-install Job cannot inherit controller-specific pod affinity and wait for the Deployment it gates. Tolerations continue to follow the controller configuration.grovePreflight.podSecurityContext: nullpreserves the previous secure defaults (runAsNonRoot: true,runAsUser: 65532,seccompProfile.type: RuntimeDefault). An explicit map fully replaces that pod context;{}omits it. For OpenShift, omitrunAsUserand let SCC admission assign the namespace UID:These settings apply only to the hook Pod and take effect on the next install/upgrade. Container hardening remains enabled. OpenShift admission itself has not been tested; chart regression tests verify UID omission through the umbrella chart, custom UIDs, unchanged defaults, and independent affinity.
What the user sees
For a chart archive built from this PR, an external-Grove install/upgrade looks like:
Helm creates the preflight as a Kubernetes Job in
dynamo-systemand waits for it before applying the operator Deployment. On success, Helm continues its normal installation/upgrade output; it does not stream the checker's success message.Illustrative Helm 3.18+ terminal output for an incompatible controller after the Job exhausts its retries (excerpts, not a captured live run). The Job annotation
helm.sh/hook-output-log-policy: hook-failedprints the diagnosis before the final hook failure:For a first installation, the equivalent prefix is
Error: INSTALLATION FAILED: failed pre-install:. A Job exceeding its 120-second deadline can reportDeadlineExceededinstead. Exact formatting depends on the Helm version and failure cause.Fallback for Helm before 3.18, or when automatic log output cannot read Pod logs: the Job is still retained, so inspect its logs manually with an identity permitted to read Pod logs. The annotation does not guarantee automatic log display in Argo CD or every Helm SDK consumer.
Example log excerpt for Grove alpha.11:
The new operator Deployment is not applied; an already running operator keeps running. Upgrade external Grove and its matching CRDs, then rerun Helm. The failed Job is retained for diagnosis and replaced on the next attempt.
Validation
make test: 77 Helm cases and four Python tests covering multiple success/failure scenarios passed.apiVersion. Fixed ince5f0b9dc5with a regression assertion.Ready=False/InstallFailed, retained logs contain the diagnosis, and no operator Deployment is applied.Ready=Truewith workload waiting disabled for this gate-only recovery check.Init:ErrImagePull).Related Issues
Closes DYN-4953