Repository navigation
fix(governance): mirror the engine's KEDA-aware replicaCount rule - #8
Merged
Merged
Conversation
dfe-engine #710 replaced validate_change's outright replicaCount refusal with keda_owns_replicas, which only refuses a write where KEDA actually owns the count. This validator still refused every replicaCount, which no longer matches the engine it claims to mirror. Refuse replicaCount only on a helmvars-class change that does not also set keda.enabled: false in the same action - the one case an action definition can decide for itself. Whether a non-helmvars chart runs KEDA, or an unplaceable overlay's manifest marks it scale_deployed, is a runtime fact only the engine's app catalogue and stored document carry, so those stay the engine's call.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
dfe-engine #710 replaced the outright replicaCount refusal with
keda_owns_replicas, which only refuses a write where KEDA actually owns
the count (gitcrud/commit_policy.py + appmgmt/scaling.py keda_by_default).
This validator still refused every replicaCount unconditionally, no
longer matching the engine it claims to mirror.
Refuse replicaCount only where the change targets a helmvars-class
resource and the same action does not also set keda.enabled: false -
the one case an action definition can decide for itself with no access
to the app manifest or chart defaults. Whether a non-helmvars chart runs
KEDA, or an unplaceable overlay's manifest marks it scale_deployed, is a
runtime fact the validator cannot see, so those cases are left to the
engine's own refusal at write time (noted in the comment at the check).
Verified locally:
tools/validate_governance.pystill passes clean onthe repo's own governance/ tree, refuses a helmvars replicaCount with no
keda.enabled override, and passes one that sets keda.enabled: false in
the same action.