Commit 175ddd8
committed
fix: correct critical bugs in DaemonSet templates
This commit fixes 2 critical bugs discovered during functional E2E testing:
**Critical Bug #1: DaemonSet Selector Label Mismatch**
- **Issue**: DaemonSet selector used static labels (`app`, `release`) while pod template used common-library labels (`app.kubernetes.io/name`, `app.kubernetes.io/instance`)
- **Impact**: Kubernetes rejects DaemonSet deployment with error: `selector does not match template labels`
- **Root Cause**: When migrating pod labels to common-library helpers, DaemonSet selector wasn't updated
- **Fix**: Updated both `daemonset.yaml` and `daemonset-windows.yaml` to use `newrelic.common.labels.selectorLabels` helper
**Critical Bug #2: VerboseLog Boolean Evaluation**
- **Issue**: Template compared boolean \$verboseLog variable as string \"true\" instead of boolean
- **Impact**: Setting `global.verboseLog=true` didn't set `LOG_LEVEL=debug` (silent configuration failure)
- **Root Cause**: Common-library `verboseLog` helper returns boolean value, but template used string comparison
- **Fix**: Changed condition from `eq \$verboseLog \"true\"` to `if \$verboseLog` in both Linux and Windows DaemonSets
Both bugs were found by functional E2E tests (helm-unittest doesn't validate Kubernetes API rules or boolean evaluation edge cases).1 parent aca0d06 commit 175ddd8
File tree
2 files changed
+4
-6
lines changed- charts/newrelic-logging/templates
2 files changed
+4
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
21 | | - | |
| 20 | + | |
22 | 21 | | |
23 | 22 | | |
24 | 23 | | |
| |||
86 | 85 | | |
87 | 86 | | |
88 | 87 | | |
89 | | - | |
| 88 | + | |
90 | 89 | | |
91 | 90 | | |
92 | 91 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
19 | | - | |
| 18 | + | |
20 | 19 | | |
21 | 20 | | |
22 | 21 | | |
| |||
97 | 96 | | |
98 | 97 | | |
99 | 98 | | |
100 | | - | |
| 99 | + | |
101 | 100 | | |
102 | 101 | | |
103 | 102 | | |
| |||
0 commit comments