Skip to content

feat(kuma-cp): update default policies to use new rules api instead of deprecated from #13203

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Automaat
Copy link
Contributor

Motivation

We should update our default policies to use new api

@Automaat Automaat requested a review from a team as a code owner March 25, 2025 14:12
@Automaat Automaat requested review from bartsmykla and lukidzi March 25, 2025 14:12
"mesh-timeout-all": defaultMeshTimeoutResource,
"mesh-circuit-breaker-all": defaultMeshCircuitBreakerResource,
"mesh-retry-all": defaultMeshRetryResource,
"mesh-gateways-timeout-all-outbounds": defaultOutboundMeshGatewaysTimeoutResource,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Looking at this code, I am afraid that this is not enough as we will have duplicate timeouts, if old defaults are present.

Also, simply removing old defaults feels shady, what if someone updated defaults but left the default name?

Copy link
Contributor

Choose a reason for hiding this comment

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

I think we create these resources only during mesh creation. They shouldn't be created when upgrading to the new version.

Copy link
Contributor

Choose a reason for hiding this comment

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

One more issue. What about zones running older versions? These policies won't work on zones

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@lukidzi can we protect ourselves from this? some flag on kds or something like this?

Copy link
Contributor

Choose a reason for hiding this comment

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

It might be possible using a KDS flag, but we would need to translate it to a compatible format at the KDS sync level. That’s a bit tricky, and the global control plane would still display the new version. Since policies are created on the global control plane and it doesn't have awareness of the zone version, it's not possible to determine how to generate the default policy correctly.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

so should we then wait until we remove support for from entirely?

Copy link
Contributor

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)

Signed-off-by: Marcin Skalski <[email protected]>
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.

2 participants