Skip to content
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

fix(MeshTimeout): remove if-condition that prevents plugin from running when there are no policies #12769

Merged
merged 6 commits into from
Feb 14, 2025

Conversation

lobkovilya
Copy link
Contributor

@lobkovilya lobkovilya commented Feb 6, 2025

Motivation

This if-condition at the beginning of the plugin

if len(policies.ToRules.Rules) == 0 && len(policies.FromRules.Rules) == 0 && len(policies.GatewayRules.ToRules.ByListener) == 0 && len(policies.ToRules.ResourceRules) == 0 {
    return nil
}

causes inconsistent default values. For example, the default outbound timeouts should be the same regardless of the presence of MeshTimeout policies with from.

Implementation information

Depends on #12766

Supporting documentation

Fix #12649

Changelog: feat(MeshTimeout): add possibility to configure inbound using rules api

…ng when there are no policies

Signed-off-by: Ilya Lobkov <ilya.lobkov@konghq.com>
Signed-off-by: Ilya Lobkov <ilya.lobkov@konghq.com>
Signed-off-by: Ilya Lobkov <ilya.lobkov@konghq.com>
Signed-off-by: Ilya Lobkov <ilya.lobkov@konghq.com>
Signed-off-by: Ilya Lobkov <ilya.lobkov@konghq.com>
@lobkovilya lobkovilya force-pushed the fix/mt-remove-if-cond branch from 345217b to 0155b5a Compare February 12, 2025 11:17
@lobkovilya lobkovilya marked this pull request as ready for review February 12, 2025 11:18
@lobkovilya lobkovilya requested a review from a team as a code owner February 12, 2025 11:18
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: Ilya Lobkov <ilya.lobkov@konghq.com>
@Automaat
Copy link
Contributor

Looking at this pr, it looks like we were missing default timeouts?

@lobkovilya
Copy link
Contributor Author

Looking at this pr, it looks like we were missing default timeouts?

Most of the time they're the same as Envoy's defaults. But sometimes they're not and bad case is explained in the issue #12649

@lobkovilya lobkovilya merged commit d3a493d into kumahq:master Feb 14, 2025
13 checks passed
@lobkovilya lobkovilya deleted the fix/mt-remove-if-cond branch February 14, 2025 08:54
@lukidzi lukidzi changed the title fix(meshtimeout): remove if-condition that prevents plugin from running when there are no policies fix(MeshTimeout): remove if-condition that prevents plugin from running when there are no policies Mar 6, 2025
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.

MeshTimeout inconsistent default values for spec.to depending on the presence of the inbound policy
2 participants