Skip to content

Commit

Permalink
test(MeshHTTPRoute): add endpoint with different kuma.io/service
Browse files Browse the repository at this point in the history
Signed-off-by: Mike Beaumont <mjboamail@gmail.com>
  • Loading branch information
michaelbeaumont committed Jun 6, 2024
1 parent b6bceb0 commit 2270814
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,12 @@ var _ = Describe("MeshHTTPRoute", func() {
WithTarget("192.168.0.4").
WithPort(8084).
WithWeight(1).
WithTags(mesh_proto.ServiceTag, "backend", mesh_proto.ProtocolTag, core_mesh.ProtocolHTTP, "region", "us"))
WithTags(mesh_proto.ServiceTag, "backend", mesh_proto.ProtocolTag, core_mesh.ProtocolHTTP, "app", "backend")).
AddEndpoint("backend_svc_80", xds_builders.Endpoint().
WithTarget("192.168.0.5").
WithPort(8084).
WithWeight(1).
WithTags(mesh_proto.ServiceTag, "other-backend", mesh_proto.ProtocolTag, core_mesh.ProtocolHTTP, "app", "backend"))
meshSvc := meshservice_api.MeshServiceResource{
Meta: &test_model.ResourceMeta{Name: "backend", Mesh: "default"},
Spec: &meshservice_api.MeshService{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ resources:
- matcher:
exact: spiffe://default/backend
sanType: URI
- matcher:
exact: spiffe://default/other-backend
sanType: URI
validationContextSdsSecretConfig:
name: mesh_ca:secret:default
sdsConfig:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,22 @@ resources:
metadata:
filterMetadata:
envoy.lb:
app: backend
kuma.io/protocol: http
region: us
envoy.transport_socket_match:
app: backend
kuma.io/protocol: http
- endpoint:
address:
socketAddress:
address: 192.168.0.5
portValue: 8084
loadBalancingWeight: 1
metadata:
filterMetadata:
envoy.lb:
app: backend
kuma.io/protocol: http
envoy.transport_socket_match:
app: backend
kuma.io/protocol: http
region: us

0 comments on commit 2270814

Please sign in to comment.