fix(meshfaultinjection): deprecate spec.from field#16102
Merged
Automaat merged 2 commits intokumahq:masterfrom Apr 3, 2026
Merged
fix(meshfaultinjection): deprecate spec.from field#16102Automaat merged 2 commits intokumahq:masterfrom
Automaat merged 2 commits intokumahq:masterfrom
Conversation
Signed-off-by: Marcin Skalski <skalskimarcin33@gmail.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Deprecates the spec.from field in the MeshFaultInjection policy API by emitting a deprecation warning when the field is used, steering users toward the newer spec.rules API (per issue #12380).
Changes:
- Add a deprecation warning when
spec.fromis non-empty:"'from' field is deprecated, use 'rules' instead". - Preserve the existing deprecation warning for
MeshServiceinfrom[].targetRef.kind, now emitted only whenspec.fromis present. - Keep
TopLevelTargetRefDeprecations(spec.targetRef)included in the returned warnings.
lahabana
reviewed
Apr 2, 2026
pkg/plugins/policies/meshfaultinjection/api/v1alpha1/deprecated.go
Outdated
Show resolved
Hide resolved
lahabana
reviewed
Apr 2, 2026
pkg/plugins/policies/meshfaultinjection/api/v1alpha1/deprecated.go
Outdated
Show resolved
Hide resolved
Contributor
Reviewer Checklist🔍 Each of these sections need to be checked by the reviewer of the PR 🔍:
|
- mention SPIFFE-based matches in from deprecation msg - remove misleading MeshService→MeshSubset deprecation Signed-off-by: Marcin Skalski <skalskimarcin33@gmail.com>
lahabana
approved these changes
Apr 3, 2026
bartsmykla
pushed a commit
to bartsmykla/kuma
that referenced
this pull request
Apr 7, 2026
## Motivation `spec.from` in MeshFaultInjection is superseded by `spec.rules` which provides equivalent functionality. Deprecating `spec.from` steers users toward the preferred API. ## Implementation information Added `'from' field is deprecated, use 'rules' instead` deprecation warning when `spec.from` is non-empty, consistent with the pattern used in MeshTimeout, MeshRateLimit, and other policies. Existing MeshService-kind deprecation warning is preserved and nested inside the `from` check. ## Supporting documentation Fix kumahq#12380 > Changelog: fix(meshfaultinjection): deprecate spec.from field --------- Signed-off-by: Marcin Skalski <skalskimarcin33@gmail.com>
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.
Motivation
spec.fromin MeshFaultInjection is superseded byspec.ruleswhich provides equivalent functionality. Deprecatingspec.fromsteers users toward the preferred API.Implementation information
Added
'from' field is deprecated, use 'rules' insteaddeprecation warning whenspec.fromis non-empty, consistent with the pattern used in MeshTimeout, MeshRateLimit, and other policies. Existing MeshService-kind deprecation warning is preserved and nested inside thefromcheck.Supporting documentation
Fix #12380