Reconsider Helm-SDK-based reconciliation for APIGateway #2084
SachithKasthuriarachchi
started this conversation in
Ideas
Replies: 1 comment 3 replies
-
|
Hi, The concerns are valid in the current operator helm SDK based reconciliation design. The current code can be improved(helm-operator-plugins) to address the issues: Pending state recovery and Blocking reconciler but we cannot address Dual state model, Observability, Native GC with the SDK approach.
|
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Context
The gateway-operator provisions gateways by driving the Helm Go SDK directly from the APIGateway reconciler. I'd like to open a discussion on whether embedding Helm in the reconcile loop is the right long-term model, or whether we should reconcile owned Kubernetes objects directly.
Why Helm-in-the-reconciler is harder to operate
Programmed=Falsewhile Helm thinks the release is successfully deployed, or Helm can get wedged in apending-upgradestate while the controller infinitely retries. Operators are forced to reason about two independent, conflicting state models to debug a single gateway.InstallOrUpgradeworkflow routes purely on existence (any existing release →upgrade()). If a prior reconciliation attempt left the release inpending-installorpending-upgrade(due to an operator OOM, eviction, crash mid-run, or a--waittimeout), every subsequent retry will fail with Helm errors like"another operation in progress"or"has no deployed releases". Because automatic rollback/uninstall remediation isn't natively handled here, recovery requires a human to manually runhelm rollbackorhelm uninstallagainst the cluster. This introduces the exact kind of out-of-band, imperative operational step that CRDs are designed to eliminate.kubectl getorkubectl describeon the owned objects tells the whole story. The Helm layer adds an opaque abstraction hop that isn't transparent through standard Kubernetes tooling.OwnerReferences. If a user accidentally deletes a child Deployment, it won't be recreated until the next reconcile loop completely re-renders and re-runs the chart. Additionally, lifecycle management and garbage collection rely on Helm uninstalling cleanly rather than Kubernetes' native cascading deletion.Wait: truewith a highTimeout(e.g., 300s) means a slow rollout completely blocks the reconciler thread and consumes worker capacity. This conflates "deployment is progressing normally" with "deployment failed." A native level-triggered controller would simply apply the changes, return, and naturally observe readiness on subsequent events.Proposed Alternatives / Paths Forward
If we move away from the direct Helm Go SDK approach, we could consider:
OwnerReferences.Beta Was this translation helpful? Give feedback.
All reactions