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

chore(kuma-cp) refactor MatchedPolicies structure #3461

Merged
merged 6 commits into from
Dec 15, 2021

Conversation

lobkovilya
Copy link
Contributor

Summary

Refactor MatchedPolicies type to consist of fields of a similar format. Allowed format:

FIELD is <VALUE> or map[<KEY>]<VALUE> 
KEY is InboundInterface | OutboundInterface | ServiceName 
VALUE is  Resource | []Resource

Tooling is going to rely on that, that's why there is a runtime type validation inside init method.

Full changelog

  • validate MatchedPolicies type at runtime
  • refactor type to the format

Issues resolved

N/A

Documentation

  • internal change, no need for docs

Testing

  • Unit tests
  • E2E tests
  • Manual testing on Universal
  • Manual testing on Kubernetes

Backwards compatibility

  • Update UPGRADE.md with any steps users will need to take
    when upgrading.
  • Add backport-to-stable label if the code is backwards compatible. Otherwise, list breaking changes.

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>
@lahabana lahabana linked an issue Dec 13, 2021 that may be closed by this pull request
Copy link
Contributor

@lahabana lahabana left a comment

Choose a reason for hiding this comment

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

LGTM it's bringing some coherency! :)

pkg/core/resources/apis/mesh/mesh_helpers.go Show resolved Hide resolved
pkg/core/logs/matcher.go Show resolved Hide resolved
Signed-off-by: Ilya Lobkov <ilya.lobkov@konghq.com>
@lobkovilya lobkovilya merged commit abc8a69 into master Dec 15, 2021
@lobkovilya lobkovilya deleted the chore/refactor-matched-policies branch December 15, 2021 14:59
mergify bot pushed a commit that referenced this pull request Dec 15, 2021
(cherry picked from commit abc8a69)

# Conflicts:
#	pkg/plugins/runtime/gateway/filter_chain_generator.go
michaelbeaumont added a commit that referenced this pull request Dec 15, 2021
#3547)

#3461 was out of date and didn't have #3484

Signed-off-by: Mike Beaumont <mjboamail@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.

Tools for visibility: See all policies that impact a dp
3 participants