Repository navigation
Management agent: create the product's Flux objects, so its chart installs with helm --wait on Helm 4 - #1893
Open
davidmckayv wants to merge 1 commit into
Open
davidmckayv wants to merge 1 commit into
davidmckayv wants to merge 1 commit into
Conversation
davidmckayv
requested review from
MikeRyanDev,
dustywusty,
guidovizoso,
mxmzb,
samjulien and
tylerslaton
as code owners
November 19, 2026 20:15
davidmckayv
force-pushed
the
mgmt-agent-owns-flux-objects
branch
from
November 19, 2026 20:59
9ff1c37 to
e12cde9
Compare
… chart's settings
davidmckayv
force-pushed
the
mgmt-agent-owns-flux-objects
branch
from
November 19, 2026 21:45
e12cde9 to
c0fbcd8
Compare
This branch has not been deployed
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.
Why
helm install --waitof the openbot-agent chart never finished on Helm 4, and neither didhelm upgrade --wait. Helm 4's--waituses kstatus and waits for every object in the release to be current. The chart rendered the product's OCIRepository and HelmRelease itself, so the agent chart's readiness was really the product's:observedGeneration: -1its CRD defaults to. kstatus reads that as InProgress forever.helm upgrade --waitof the agent chart failed at once. That includes the pause (--set paused=true): Helm marked the upgrade failed and never ran the post-upgrade hook that suspends the HelmRelease, so the product could not be paused at the moment it most needed to be. Reproduced on kind with Helm 4.3.2.Helm 3's
--waitignores custom resources, so only Helm 4 showed it. Helm 4 is what customers and Microsoft's Flux extension run.What changed
The agent now creates and keeps the product's two Flux objects. The chart no longer renders them, so
helm --waitonly waits for the agent and its controllers.config.ts: the chart hands the agent the objects' settings:product.source(URL, first pin or none, insecure, pull secret, signature check) andproduct.release(deployer service account, timeout,valuesFromin the chart's order).flux.ts:productObjects()builds both objects from that config.ensure()runs at the start of every heartbeat. It creates a missing object (suspended on the placeholder until a version is named, unless the chart gave a first pin) and merge-patches an existing one to the chart's settings. It never touches an existing object'sspec.ref.digestorspec.suspend, which only move by a pin, a pause or a person. It also removes Helm's release annotations that an older chart left behind.agent.ts: a failure here is logged, and the heartbeat still goes out.The chart change that goes with this (configuration, RBAC to create the objects, a pre-upgrade handover that keeps objects an older chart rendered instead of letting Helm delete them, and the regression test) follows in CopilotKit's management chart once this is merged.
Tests
helm install --wait --timeout 10mandhelm upgrade --waitof the agent chart on kind, with Helm 4.3.2 and Helm 3.22.1 and this agent image. It covers: the agent creating both objects suspended on the placeholder; an upgrade while they wait; a pin to a product build that fails (HelmRelease Stalled); a pause with--waitthat succeeds and suspends; a resume with a changed product timeout that the agent applies without moving the pin; and an uninstall through the disconnect hook. It fails on the current chart and agent and passes with this change.productObjects()against the rendered config. The existing agent upgrade and off-path tests run on kind against this change.