mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-09-20 13:30:46 +02:00
helm: reject a networkPolicy.components key that names no component
The component names are not guessable - objectstorage-provisioner, seaweedfs-all-in-one, volume-<name> - and a typo silently dropped the rules it was carrying. Check against every component the chart can produce, not the enabled ones, so a values file shared across releases can still hold overrides for a component this one leaves off.
This commit is contained in:
@@ -1109,6 +1109,12 @@ jobs:
|
||||
else:
|
||||
print("volume-resize-hook policy tracks its Job rather than rendering always")
|
||||
|
||||
# A components key that names nothing reads as "these rules are applied"
|
||||
# and silently does not apply them.
|
||||
expect_failure(dict(on, **{"networkPolicy.components.filerr.extraIngress[0].ports[0].port": "1"}),
|
||||
'"filerr" is not a component of this chart',
|
||||
"a misspelled networkPolicy.components key fails the render")
|
||||
|
||||
# The bucket hook is post-install, so the release manifest is already applied;
|
||||
# its policy must be a plain resource that uninstall cleans up.
|
||||
if "helm.sh/hook" in (pols["bucket-hook"]["metadata"].get("annotations") or {}):
|
||||
|
||||
Reference in New Issue
Block a user