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

feat(policy): add possibility to target only gateways/sidecars #8868

Merged
merged 17 commits into from Jan 18, 2024

Conversation

lukidzi
Copy link
Contributor

@lukidzi lukidzi commented Jan 15, 2024

Checklist prior to review

Implementation of: #8829

  • Link 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 a image registry) and it will work on Windows, system specific functions like syscall.Mkfifo have equivalent implementation on the other OS --
  • Tests (Unit test, E2E tests, manual test on universal and k8s) --
    • Don't forget ci/ labels to run additional/fewer tests
  • Do you need to update UPGRADE.md? --
  • 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: Lukasz Dziedziak <lukidzi@gmail.com>
Signed-off-by: Lukasz Dziedziak <lukidzi@gmail.com>
Signed-off-by: Lukasz Dziedziak <lukidzi@gmail.com>
Signed-off-by: Lukasz Dziedziak <lukidzi@gmail.com>
Signed-off-by: Lukasz Dziedziak <lukidzi@gmail.com>
s
Signed-off-by: Lukasz Dziedziak <lukidzi@gmail.com>
Signed-off-by: Lukasz Dziedziak <lukidzi@gmail.com>
Signed-off-by: Lukasz Dziedziak <lukidzi@gmail.com>
@lukidzi lukidzi marked this pull request as ready for review January 16, 2024 20:57
@lukidzi lukidzi requested a review from a team as a code owner January 16, 2024 20:57
@lukidzi lukidzi requested review from jijiechen, michaelbeaumont and jakubdyszkiewicz and removed request for a team January 16, 2024 20:57
@michaelbeaumont michaelbeaumont linked an issue Jan 17, 2024 that may be closed by this pull request
api/common/v1alpha1/ref.go Show resolved Hide resolved
api/common/v1alpha1/ref.go Outdated Show resolved Hide resolved
pkg/core/resources/apis/mesh/validators.go Outdated Show resolved Hide resolved
pkg/core/resources/apis/mesh/validators.go Outdated Show resolved Hide resolved
pkg/core/resources/apis/mesh/validators.go Outdated Show resolved Hide resolved
pkg/plugins/policies/core/matchers/dataplane.go Outdated Show resolved Hide resolved
Signed-off-by: Lukasz Dziedziak <lukidzi@gmail.com>
Signed-off-by: Lukasz Dziedziak <lukidzi@gmail.com>
pkg/core/resources/apis/mesh/validators.go Outdated Show resolved Hide resolved
api/common/v1alpha1/ref.go Show resolved Hide resolved
Signed-off-by: Lukasz Dziedziak <lukidzi@gmail.com>
Copy link
Contributor

@lobkovilya lobkovilya left a comment

Choose a reason for hiding this comment

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

LGTM

pkg/core/resources/apis/mesh/validators_test.go Outdated Show resolved Hide resolved
Signed-off-by: Lukasz Dziedziak <lukidzi@gmail.com>
@lukidzi lukidzi merged commit fdd9b05 into kumahq:master Jan 18, 2024
11 checks passed
@@ -161,6 +168,17 @@ func resolveMeshHTTPRouteRef(refMeta core_model.ResourceMeta, refName string, mh
return nil
}

func resolveDataplaneProxyType(dpp *core_mesh.DataplaneResource) common_api.TargetRefProxyType {
if dpp.Spec.GetNetworking().GetGateway() != nil {
Copy link
Contributor

Choose a reason for hiding this comment

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

This is broken for delegated gateway because it's technically a sidecar.

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.

Figure what happens with top level kind: Mesh and MeshGateway
5 participants