Commit 1e533f2
fix(pruner): ensure enforcedConfigLevel is always defaulted and DeepCopy is correct
The SetDefaults change in commit 774867c guarded GlobalConfig.SetDefaults()
behind a nil check to allow users to set historyLimit to null without it
resetting. However, this meant enforcedConfigLevel was never filled in when
a user provided a partial global-config (e.g. only ttlSecondsAfterFinished).
The pruner controller then defaulted to the "resource" level internally,
which silently ignores all namespace-level selector rules.
Additionally, DeepCopyInto for TektonPrunerConfig copied the *GlobalConfig
pointer instead of the underlying struct. This caused the Knative defaulting
webhook to see no difference between the original and the copy after
SetDefaults ran, so the patch was always null and defaults were never applied.
Signed-off-by: Shubham Bhardwaj <shubbhar@redhat.com>1 parent 49a148f commit 1e533f2
2 files changed
Lines changed: 7 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
38 | 41 | | |
39 | 42 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
111 | 111 | | |
112 | 112 | | |
113 | 113 | | |
114 | | - | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
115 | 118 | | |
0 commit comments