Repository navigation
Chart: say the upgrade order where helm users will see it - #24
Conversation
From zoboth's review of the chart copy in helm-charts#124. Two notes, both about autoconfig rather than the copy. **The CRDs-before-restart step only existed in a PR description.** Anyone installing the chart from a repo never sees that, and getting it wrong is not a degraded feature: nothing writes key-auth's defaultConfig.consumers, and with the gateway chart that no longer renders that field, every route on that gateway refuses every caller. It is in NOTES.txt now, beside the uninstall-order warning that exists for the same reason, with the commands and with what the watchdog does and does not save you from. The quieter half is there too: an un-upgraded ModelFleet CRD prunes spec.gateway.streamGuard, so disabled: true is accepted and ignored. **status.members[].phase listed three of its four values.** The enum has carried Disabled since members[].disabled landed; the description had not, so `kubectl explain` was a value short, and Disabled is the one a console must not show like Degraded - it is a member the fleet turned off, not one that is failing. The third note in that review - a possible confused deputy through gateway.upstreamAuthSecretRef, given the controller's cluster-wide `secrets: get` - needs no change: readSecretKey refuses a ref whose namespace is not the fleet's own, and TestFleetUpstreamSecretRefCannotCrossNamespaces covers it with "kube-system/stolen:token". It is not visible from the chart copy, which is why it came up. Claude-Session: https://claude.ai/code/session_01GVorddJkUMjYffPHXSDxop
zoboth
left a comment
There was a problem hiding this comment.
Read the whole diff (Go type comment, both CRD copies, NOTES.txt). No blockers.
Checked
- The
MemberStatus.Phasecomment and the two CRD YAMLs (config/crd/basesanddeploy/helm/autoconfig/crds) say the same thing. The new description finally matches the enum, which already includesDisabled. NOTES.txtstill renders: the only template actions are{{ .Release.Name }}/{{ .Release.Namespace }}, and the new block comes after the uninstall warning, outside any conditional.- The order is right:
helm pull --untarcreates./autoconfig/crds/, then the CRDs get applied, thenhelm upgraderestarts the controller, so it starts up already seeingAPIConsumerbeing served.
Non-blocking notes
kubectl apply --server-side -f autoconfig/crds/will probably hit field-manager conflicts on a release whose CRDs were first installed by Helm. Helm creates them under its own manager, and this upgrade changes fields that manager owns (thephasedescription, for one). That is why other charts' upgrade docs usekubectl apply --server-side --force-conflicts -f .... If someone sees a conflict error and goes on to step 3 anyway, they end up in exactly the window this note is meant to prevent. I'd add--force-conflicts, or at least say that a conflict error means step 2 did not happen.- The watchdog paragraph (exits when the CRD shows up later, then self-heals after a restart) describes controller behaviour that this diff doesn't touch, so I couldn't check it here. If it ever stops being true, this note becomes misleading, so it might be worth naming the code or test that guarantees it, the way the PR description does for
readSecretKey. - You could mention
kubectl explain modelfleet.status.members.phase(or thekubectl get crdfields to check) so operators can confirm the CRD actually upgraded before step 3. That would also catch the quieterstreamGuard-pruning case.
…rked Helm installs the CRDs from crds/ under its own field manager, which owns .spec.versions. A plain `kubectl apply --server-side` on them therefore fails with `conflict with "helm"` - measured on a test cluster with a throwaway CRD installed the same way, where it is a hard error and the CRD stays at the old version. An operator who then moves on to `helm upgrade` lands in exactly the window this note exists to prevent, so the flag is not optional. Also add a step that confirms the CRD really upgraded (`kubectl explain` on a field only the new CRD has, which exits 1 with `field ... does not exist` otherwise), and say where the watchdog lives and which log line to look for, so the self-healing claim is checkable rather than taken on faith.
|
Note 1 was right, and it is worse than a warning: I reproduced it on a test cluster. A throwaway CRD installed the same way the chart installs its own (a chart's It is a hard error, the CRD keeps the old schema, and Why none of the release validation caught it: the autoconfig CRD on the test cluster is owned by Fixed in the latest commit:
|
From zoboth's review of the chart copy in helm-charts#124.
The CRDs-before-restart step only lived in a PR description. Someone installing from a chart repo never sees that, and getting it wrong is not a degraded feature — nothing writes key-auth's
defaultConfig.consumers, and with the gateway chart that no longer renders that field, every route on that gateway refuses every caller. It is inNOTES.txtnow, next to the uninstall-order warning that exists for the same reason, with the commands and with what the watchdog does and does not save you from. The quieter half is there too: an un-upgraded ModelFleet CRD prunesspec.gateway.streamGuard, sodisabled: trueis accepted and ignored.status.members[].phaselisted three of its four values. The enum has carriedDisabledsincemembers[].disabledlanded; the description had not, sokubectl explainwas a value short — andDisabledis the one a console must not render likeDegraded, since it is a member the fleet turned off rather than one that is failing.The third note needs no change. The possible confused deputy through
gateway.upstreamAuthSecretRef, given the controller's cluster-widesecrets: get:readSecretKeyrefuses a ref whose namespace is not the fleet's own, andTestFleetUpstreamSecretRefCannotCrossNamespacescovers it withkube-system/stolen:token. Not visible from the chart copy, which is why it came up.