Commit 994e911
fix(helm): use fullname in selector labels to prevent mismatch on upgrade (#47)
* fix(helm): use fullname in selector labels to prevent mismatch on upgrade
Use kagent.fullname instead of kagent.name in selectorLabels so that
changing nameOverride does not alter the app.kubernetes.io/name selector
label. Deployment spec.selector.matchLabels is immutable in Kubernetes,
so any label change causes a Service/Deployment selector mismatch after
helm upgrade, leaving the Service with zero endpoints.
With this fix, both the old config (fullnameOverride: kagent-tools) and
the new config (nameOverride: tools) resolve to the same fullname
"kagent-tools" for the default release name, keeping selectors stable
across upgrades.
Fixes kagent-dev/kagent#1427
Signed-off-by: Jaison Paul <paul.jaison@gmail.com>
* fix(e2e): update label selectors to match fullname-based selector labels
Update E2E tests to use app.kubernetes.io/instance label selector instead of
app.kubernetes.io/name since the PR changes selectorLabels to use kagent.fullname.
The fullname template returns the release name (kagent-tools-e2e), so the tests
now use app.kubernetes.io/instance=<releaseName> which remains stable and matches
the updated selector labels in the Helm chart.
This fixes the E2E test failures where pods weren't being found because the
label selector no longer matched after the selectorLabels change.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Signed-off-by: Eitan Yarmush <eitan.yarmush@solo.io>
---------
Signed-off-by: Jaison Paul <paul.jaison@gmail.com>
Signed-off-by: Eitan Yarmush <eitan.yarmush@solo.io>
Co-authored-by: Eitan Yarmush <eitan.yarmush@solo.io>
Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>1 parent 4c2b7a5 commit 994e911
4 files changed
Lines changed: 5 additions & 5 deletions
File tree
- helm/kagent-tools
- templates
- tests
- test/e2e
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
46 | | - | |
| 46 | + | |
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
171 | 171 | | |
172 | 172 | | |
173 | 173 | | |
174 | | - | |
| 174 | + | |
175 | 175 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
224 | 224 | | |
225 | 225 | | |
226 | 226 | | |
227 | | - | |
| 227 | + | |
228 | 228 | | |
229 | 229 | | |
230 | 230 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
59 | | - | |
| 59 | + | |
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
| |||
70 | 70 | | |
71 | 71 | | |
72 | 72 | | |
73 | | - | |
| 73 | + | |
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
| |||
0 commit comments