Repository navigation
Upgrade keda pack to 2.20.2 - #319
edwin-villa wants to merge 37 commits into
Conversation
PAC-3765 - Upgrade crossplane pack to 2.2.0
PAC-3779 - Upgrade trivy pack to 0.21.1
PAC-4030 - Upgrade fluentbit pack to 5.0.3
PAC-4131 - Upgrade crossplane pack to 2.3.0
Upgrade kubevious pack to 1.2.2
Upgrade fluentbit pack to 5.0.7
Upgrade stormforge-agent pack to 2.28.2
Pack review —
|
| Check | Result | Meaning |
|---|---|---|
BulwarkGitLeaks / gitleaks-scan |
✅ SUCCESS | clean |
security-scans/gitleaks |
✅ SUCCESS | clean |
security-scans/pax-cve |
✅ SUCCESS | clean |
security-scans/syft-license |
Not a license finding — ignore. The summary reads "Syft license scan failed with conclusion: skipped": bulwark skipped the job and the wrapper renders a skip as red. Not a required check. | |
| CodeQL | — | silently does not run on fork PRs |
The only CI result you need to act on is validator.
Blockers
1. validator fails: certificates.operator type mismatch — real failure, but a cosmetic one. One-character fix.
ERROR: Structural + duplicate check failed for 'charts.keda' (chart from charts/keda-2.20.2.tgz):
ERROR: structural mismatch at 'certificates.operator': pack has a mapping, chart has tag:yaml.org,2002:null
Exact location: packs/keda-2.20.2/values.yaml line 441 — operator: {} (inside the certificates: block that starts at line 425).
Why it fires. Upstream keda-2.20.2/values.yaml line 903 ships operator: as a bare key with every child commented out:
operator:
# apiServicePatching:
# enabled: false
# caDirs:
# - /custom/caSo the chart's certificates.operator parses as YAML null, while the pack supplies an empty mapping {}. The checker compares node types and flags null vs map.
I did not assume the checker was right — I rendered it. Three renders of the vendored chart (helm v3.10.0):
| Render | Result |
|---|---|
| chart defaults, no overlay | 12542 lines, sha 29e7a7a0… |
| with the pack overlay as submitted | 12542 lines, sha 29e7a7a0… |
pack overlay with certificates.operator deleted |
12542 lines, sha 29e7a7a0… |
pack overlay with certificates.operator set to null |
12542 lines, sha 29e7a7a0… |
All four are byte-identical. certificates.operator: {} is provably inert here, because the only two templates that read it are nil-safe:
templates/manager/deployment.yaml:90—{{- if and … .Values.certificates.operator .Values.certificates.operator.apiServicePatching }}. Go'sandshort-circuits, and an empty map is falsy exactly likenil, so the branch is skipped either way.templates/manager/deployment.yaml:114—{{- with (.Values.certificates.operator).caDirs }}uses the parenthesised nil-safe form.
So this is not a live bug — but it does block merge, and the fix is free.
Recommended fix — (a), restructure the overlay. Change line 441 from:
operator: {}to:
operator:I verified this exact edit renders byte-identically (sha 29e7a7a0…) and makes the pack's node type !!null, matching the chart, so the checker goes green. Nothing is lost: the key stays present and visible in the Palette values editor, and it now mirrors the chart verbatim. Deleting line 441 outright is equally safe, but keeping it as null matches upstream exactly.
Do you also need a maintainer fix to validator/check-values-structure.py? Not for this PR, and I would not block on it. Worth raising separately though: flagging null → mapping as a structural mismatch is arguably over-strict, because Helm's coalesce treats a null chart default as "no default" and merges an overlay mapping in cleanly. Any chart that documents a key by shipping it bare with commented-out children — a very common upstream pattern — will trip this forever. That is a maintainer judgement call; the one-character fix above unblocks you today without waiting on it.
For context, I'm aware this checker has produced false positives before (PR #339 / loki, where four of five reported errors were live pass-through keys and deleting them would have caused real damage). That is exactly why I rendered rather than assumed. Here the render proves the key is inert, so the overlay fix is safe — unlike the loki case.
Major
2. PR title and description mislabel a brand-new pack as an upgrade
Title: "Upgrade keda pack to 2.20.2". There is no predecessor on main. Please retitle to something like "Add new keda 2.20.2 pack" so reviewers and generated release notes aren't misled. The same mislabelling affects the newer keda PR #350 (2.21.0).
3. README documents four resource parameters at paths that do not exist
packs/keda-2.20.2/README.md lines 32–35 document:
| README says (does not exist) | Actual path in values.yaml (lines 263–284) |
|---|---|
charts.keda.operator.resources.requests.cpu |
charts.keda.resources.operator.requests.cpu |
charts.keda.operator.resources.requests.memory |
charts.keda.resources.operator.requests.memory |
charts.keda.operator.resources.limits.cpu |
charts.keda.resources.operator.limits.cpu |
charts.keda.operator.resources.limits.memory |
charts.keda.resources.operator.limits.memory |
The chart nests resources above the component (resources.operator.…), not below it (operator.resources.…). A user following the README verbatim would add keys that silently do nothing — and would then also trip the same structural checker as Blocker 1.
I machine-checked all 26 documented parameters against the overlay's 410 key paths: these 4 are the only invalid ones; the other 22 resolve correctly. Note resources.metricServer.* and resources.webhooks.* exist too and are undocumented.
This defect is inherited verbatim by PR #350 (its README is identical to this one apart from the version badge), so fix it in whichever PR you keep.
Minor
4. README references example files the pack does not ship
Lines 138 and 141 instruct kubectl apply -n keda-test -f echo-server.yaml and -f scaledobject.yaml, but neither file exists in the pack (or anywhere in the PR). Either inline the manifests or drop the step.
5. Validation snippet is fenced as powershell in an otherwise-bash README
Lines 113–122 use a ```powershell fence with kubectl get crd | Select-String keda.sh. It is valid PowerShell, but every other fence in the README is `bash`; most operators will copy it into a Linux shell where `Select-String` does not exist. Suggest `bash` + `grep keda.sh`.
Nits / observations
- The overlay is a pure restatement of chart defaults. Rendering with the full
charts.kedaoverlay is byte-identical to rendering the chart with no overlay at all — it overrides nothing. That is the normal Palette pattern (expose the full value surface for UI editing), so it is not a defect, just worth stating explicitly. - No stale or extra overlay keys. I compared the overlay against the chart's own
values.yamlin both directions: 410 paths each, zero keys in the overlay missing from the chart, zero chart keys missing from the overlay. The singlecertificates.operatortype divergence in Blocker 1 is the only difference across all 410 paths. pack.jsonis schema-valid, including the known CI gap.validate-jsondoes not enforcerequiredinside$ref'd definitions, so I hand-checked:constraints.dependencies[0]carriespackName,layer(k8s, in enum) andtype(optional, in enum). Noresources/componentsblocks, so thetype/scheduleTypegaps that let a bad pack through in OpenShell 0.1.8 and Agent Sandbox 1.0.10 #366 don't apply here.layer: addon,addonType: "system app"(the most common value in this repo, 113 packs),cloudTypes: ["all"]all valid.- Chart vs app version: for 2.20.2 these coincide — chart
version: 2.20.2andappVersion: 2.20.2. Directory name,pack.json.version,pack.content.charts[0].versionand the tarball filename all agree. The upstream repo URLhttps://kedacore.github.io/chartsresolves and serves chart 2.20.2. - Unpacked chart matches the tarball.
charts/keda/is byte-identical to the contents ofcharts/keda-2.20.2.tgzacross all 56 files — no hand-edits, no drift. - README is clean of
Docker Hardened Images/DHIbranding, and contains no relative links to sibling pack directories. The version badge correctly reads 2.20.2; the stated prerequisiteKubernetes >= v1.29.0matchespack.json'sminVersion: "1.29"(stricter than the chart's ownkubeVersion: >=v1.23.0-0, which is a deliberate choice, not an error).
Airgap / image completeness — PASS
There is no CI gate comparing rendered images against declared ones (validate_content only checks that declared images resolve, so an omitted image would be invisible). I checked it manually by rendering the chart and extracting every image: field:
| Rendered | Declared in pack.content.images |
|---|---|
ghcr.io/kedacore/keda:2.20.2 |
✅ |
ghcr.io/kedacore/keda-metrics-apiserver:2.20.2 |
✅ |
ghcr.io/kedacore/keda-admission-webhooks:2.20.2 |
✅ |
3 rendered, 3 declared, exact match. I also scanned every template for conditionally-rendered images: chart 2.20.2 ships no CRD-install or cleanup Job image (the image: hits in crds/crd-scaledjobs.yaml are CRD schema properties, not image refs). All three tags resolve via .Values.image.*.tag defaulting to .Chart.AppVersion = 2.20.2, matching the declared tags. The airgap: "true" claim holds.
Supersession: #319 (2.20.2) vs #350 (2.21.0)
Neither has a predecessor on main; both add keda for the first time. I compared them directly.
Recommendation: keep #350, close #319. #350 is a strict improvement:
- Newer upstream release (2.21.0, Oct 21 vs 2.20.2, Sep 4).
- It already fixes Blocker 1 — in Upgrade keda pack to 2.21.0 #350
certificates.operatorisnull, not{}, so the structural check passes. - Its overlay preserves the upstream
# --doc comments, which Upgrade keda pack to 2.20.2 #319 stripped — materially better UX in the Palette values editor. - Its
pack.jsonis identical to Upgrade keda pack to 2.20.2 #319's apart fromversionand the chart filename.
Did #350 drop anything #319 got right? No. I diffed the two overlays key-by-key: #319 has 410 paths, #350 has 430, and zero #319 keys are missing from #350 (the 20 extras are new 2.21.0 surface: watchLabelSelector, watchLabelSelectorForTriggerauth, operator.serviceAccountTokens.*, operator.outboundFilter, …). #350 also ships 3 additional upstream chart files (_service_account_tokens.tpl, _vault.tpl, values.schema.json). So the regression pattern seen in #360/#362 does not repeat here.
Carry forward to #350: Major 3 (the four wrong README resource paths) and Major 2 (same "upgrade" mislabel) are present in #350 too and still need fixing there. Minor 4 and 5 likewise.
If you would rather land #319 first, it needs only the one-character fix in Blocker 1 to go green, plus the README corrections.
Validator output — 7/11 checks passed
- ✅ JSON syntax is valid for
packs/keda-2.20.2/pack.json - ✅ Schema validation passed for
packs/keda-2.20.2/pack.json - ✅ pack.json version has no leading 'v'
- ✅ All chart tarballs present
- ✅ Logo file is present
- ✅ README.md file is present
- ✅ Successfully verified Image content section
- ❌
structural mismatch at 'certificates.operator': pack has a mapping, chart has tag:yaml.org,2002:null - ❌
Structural + duplicate check failed for 'charts.keda' (chart from charts/keda-2.20.2.tgz) - ❌
Chart values structure check failed for packs/keda-2.20.2 - ❌
Packs validation failed...
(the last three are cascading consequences of the first)
Verdict
Changes requested — 1 blocker, and it is a one-character fix.
The pack itself is in good shape: the vendored chart is bit-for-bit upstream, the image list is complete and airgap-safe, pack.json is schema-valid by hand, and the overlay has no stale keys. The single CI failure is a provably inert {}-vs-null type difference at values.yaml:441.
Given #350 supersedes this PR, is newer, keeps everything #319 has, and already carries the fix — my recommendation is to close #319 in favour of #350, and fix the README resource paths (Major 3) there before merging.
Review generated by the pack-reviewer Claude Code subagent.
Upgrade keda pack to 2.20.2