Skip to content

fix(meshfaultinjection): deprecate spec.from field#16102

Merged
Automaat merged 2 commits intokumahq:masterfrom
Automaat:worktree-meshfaultinjection-deprecate-from
Apr 3, 2026
Merged

fix(meshfaultinjection): deprecate spec.from field#16102
Automaat merged 2 commits intokumahq:masterfrom
Automaat:worktree-meshfaultinjection-deprecate-from

Conversation

@Automaat
Copy link
Copy Markdown
Contributor

@Automaat Automaat commented Apr 2, 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 #12380

Changelog: fix(meshfaultinjection): deprecate spec.from field

Signed-off-by: Marcin Skalski <skalskimarcin33@gmail.com>
@Automaat Automaat marked this pull request as ready for review April 2, 2026 13:08
@Automaat Automaat requested a review from a team as a code owner April 2, 2026 13:08
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.from is non-empty: "'from' field is deprecated, use 'rules' instead".
  • Preserve the existing deprecation warning for MeshService in from[].targetRef.kind, now emitted only when spec.from is present.
  • Keep TopLevelTargetRefDeprecations(spec.targetRef) included in the returned warnings.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 2, 2026

Reviewer Checklist

🔍 Each of these sections need to be checked by the reviewer of the PR 🔍:
If something doesn't apply please check the box and add a justification if the reason is non obvious.

  • Is the PR title satisfactory? Is this part of a larger feature and should be grouped using > Changelog?
  • PR description is clear and complete. It Links to relevant issue as well as docs and UI issues
  • This will not break child repos: it doesn't hardcode values (.e.g "kumahq" as an image registry)
  • IPv6 is taken into account (.e.g: no string concatenation of host port)
  • Tests (Unit test, E2E tests, manual test on universal and k8s)
    • Don't forget ci/ labels to run additional/fewer tests
  • Does this contain a change that needs to be notified to users? In this case, UPGRADE.md should be updated.
  • Does it need to be backported according to the backporting policy? (this GH action will add "backport" label based on these file globs, if you want to prevent it from adding the "backport" label use no-backport-autolabel label)

- mention SPIFFE-based matches in from deprecation msg
- remove misleading MeshService→MeshSubset deprecation

Signed-off-by: Marcin Skalski <skalskimarcin33@gmail.com>
@Automaat Automaat merged commit f74b92c into kumahq:master Apr 3, 2026
15 checks passed
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

MeshFaultInjection deprecate spec.from

3 participants