-
Notifications
You must be signed in to change notification settings - Fork 335
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(kuma-cp): top-level MeshHTTPRoute targetRef for MeshTimeout (#7016)
Signed-off-by: ilya.lobkov@konghq.com <ilya.lobkov@konghq.com>
- Loading branch information
1 parent
6952bb4
commit 8c1727c
Showing
25 changed files
with
717 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
...ugins/policies/core/matchers/testdata/matchedpolicies/dataplanepolicies/05.dataplane.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
type: Dataplane | ||
mesh: mesh-1 | ||
name: dp-1 | ||
networking: | ||
address: 1.1.1.1 | ||
inbound: | ||
- port: 8080 | ||
tags: | ||
kuma.io/service: web | ||
version: v1 | ||
team: mesh | ||
- port: 8081 | ||
tags: | ||
kuma.io/service: web-api | ||
version: v1 | ||
team: mesh |
18 changes: 18 additions & 0 deletions
18
pkg/plugins/policies/core/matchers/testdata/matchedpolicies/dataplanepolicies/05.golden.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
items: | ||
- creationTime: "0001-01-01T00:00:00Z" | ||
mesh: mesh-1 | ||
modificationTime: "0001-01-01T00:00:00Z" | ||
name: mtp-1 | ||
spec: | ||
targetRef: | ||
kind: MeshHTTPRoute | ||
name: http-route-1 | ||
to: | ||
- default: | ||
http: | ||
requestTimeout: 3s | ||
targetRef: | ||
kind: Mesh | ||
type: MeshTimeout | ||
next: null | ||
total: 0 |
26 changes: 26 additions & 0 deletions
26
...lugins/policies/core/matchers/testdata/matchedpolicies/dataplanepolicies/05.policies.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# mtp-1 should select DPP because it targets MeshHTTPRoute that selects the DPP | ||
type: MeshTimeout | ||
mesh: mesh-1 | ||
name: mtp-1 | ||
spec: | ||
targetRef: | ||
kind: MeshHTTPRoute | ||
name: http-route-1 | ||
to: | ||
- targetRef: | ||
kind: Mesh | ||
default: | ||
http: | ||
requestTimeout: 3s | ||
--- | ||
type: MeshHTTPRoute | ||
mesh: mesh-1 | ||
name: http-route-1 | ||
spec: | ||
targetRef: | ||
kind: MeshService | ||
name: web-api | ||
to: | ||
- targetRef: | ||
kind: MeshService | ||
name: test-server |
16 changes: 16 additions & 0 deletions
16
pkg/plugins/policies/core/matchers/testdata/matchedpolicies/torules/01.dataplane.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
type: Dataplane | ||
mesh: mesh-1 | ||
name: dp-1 | ||
networking: | ||
address: 1.1.1.1 | ||
inbound: | ||
- port: 8080 | ||
tags: | ||
kuma.io/service: web | ||
version: v1 | ||
team: mesh | ||
- port: 8081 | ||
tags: | ||
kuma.io/service: web-api | ||
version: v1 | ||
team: mesh |
33 changes: 33 additions & 0 deletions
33
pkg/plugins/policies/core/matchers/testdata/matchedpolicies/torules/01.golden.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
Rules: | ||
- Conf: | ||
http: | ||
requestTimeout: 3s | ||
Origin: | ||
- creationTime: "0001-01-01T00:00:00Z" | ||
mesh: mesh-1 | ||
modificationTime: "0001-01-01T00:00:00Z" | ||
name: mtp-1 | ||
type: MeshTimeout | ||
Subset: | ||
- Key: __rule-matches-hash__ | ||
Not: false | ||
Value: OTqJZOueoDIMeYnpSETLYoaD2htefPQ7CcHHRBgrODk= | ||
- Key: kuma.io/service | ||
Not: false | ||
Value: another-test-server | ||
- Conf: | ||
http: | ||
requestTimeout: 3s | ||
Origin: | ||
- creationTime: "0001-01-01T00:00:00Z" | ||
mesh: mesh-1 | ||
modificationTime: "0001-01-01T00:00:00Z" | ||
name: mtp-1 | ||
type: MeshTimeout | ||
Subset: | ||
- Key: __rule-matches-hash__ | ||
Not: false | ||
Value: JNNc6//C3P17nUsOJm5f4kqG+U3v8pXhS0od9C3+oss= | ||
- Key: kuma.io/service | ||
Not: false | ||
Value: test-server |
43 changes: 43 additions & 0 deletions
43
pkg/plugins/policies/core/matchers/testdata/matchedpolicies/torules/01.policies.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
type: MeshHTTPRoute | ||
mesh: mesh-1 | ||
name: http-route-1 | ||
spec: | ||
targetRef: | ||
kind: MeshService | ||
name: web-api | ||
to: | ||
- targetRef: | ||
kind: MeshService | ||
name: test-server | ||
rules: | ||
- matches: | ||
- path: | ||
type: Exact | ||
value: / | ||
default: {} | ||
- targetRef: | ||
kind: MeshService | ||
name: another-test-server | ||
rules: | ||
- matches: | ||
- path: | ||
type: PathPrefix | ||
value: /v1 | ||
- method: POST | ||
default: {} | ||
--- | ||
# mtp-1 should select DPP because it targets MeshHTTPRoute that selects the DPP | ||
type: MeshTimeout | ||
mesh: mesh-1 | ||
name: mtp-1 | ||
spec: | ||
targetRef: | ||
kind: MeshHTTPRoute | ||
name: http-route-1 | ||
to: | ||
- targetRef: | ||
kind: Mesh | ||
default: | ||
http: | ||
requestTimeout: 3s | ||
|
16 changes: 16 additions & 0 deletions
16
pkg/plugins/policies/core/matchers/testdata/matchedpolicies/torules/02.dataplane.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
type: Dataplane | ||
mesh: mesh-1 | ||
name: dp-1 | ||
networking: | ||
address: 1.1.1.1 | ||
inbound: | ||
- port: 8080 | ||
tags: | ||
kuma.io/service: web | ||
version: v1 | ||
team: mesh | ||
- port: 8081 | ||
tags: | ||
kuma.io/service: web-api | ||
version: v1 | ||
team: mesh |
38 changes: 38 additions & 0 deletions
38
pkg/plugins/policies/core/matchers/testdata/matchedpolicies/torules/02.golden.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
Rules: | ||
- Conf: | ||
http: | ||
requestTimeout: 1s | ||
Origin: | ||
- creationTime: "0001-01-01T00:00:00Z" | ||
mesh: mesh-1 | ||
modificationTime: "0001-01-01T00:00:00Z" | ||
name: mtp-1 | ||
type: MeshTimeout | ||
Subset: | ||
- Key: __rule-matches-hash__ | ||
Not: false | ||
Value: OTqJZOueoDIMeYnpSETLYoaD2htefPQ7CcHHRBgrODk= | ||
- Key: kuma.io/service | ||
Not: false | ||
Value: another-test-server | ||
- Conf: | ||
http: | ||
requestTimeout: 3s | ||
Origin: | ||
- creationTime: "0001-01-01T00:00:00Z" | ||
mesh: mesh-1 | ||
modificationTime: "0001-01-01T00:00:00Z" | ||
name: mtp-1 | ||
type: MeshTimeout | ||
- creationTime: "0001-01-01T00:00:00Z" | ||
mesh: mesh-1 | ||
modificationTime: "0001-01-01T00:00:00Z" | ||
name: mtp-2 | ||
type: MeshTimeout | ||
Subset: | ||
- Key: __rule-matches-hash__ | ||
Not: false | ||
Value: JNNc6//C3P17nUsOJm5f4kqG+U3v8pXhS0od9C3+oss= | ||
- Key: kuma.io/service | ||
Not: false | ||
Value: test-server |
74 changes: 74 additions & 0 deletions
74
pkg/plugins/policies/core/matchers/testdata/matchedpolicies/torules/02.policies.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
type: MeshHTTPRoute | ||
mesh: mesh-1 | ||
name: http-route-1 | ||
spec: | ||
targetRef: | ||
kind: MeshService | ||
name: web-api | ||
to: | ||
- targetRef: | ||
kind: MeshService | ||
name: test-server | ||
rules: | ||
- matches: | ||
- path: | ||
type: Exact | ||
value: / | ||
default: {} | ||
- targetRef: | ||
kind: MeshService | ||
name: another-test-server | ||
rules: | ||
- matches: | ||
- path: | ||
type: PathPrefix | ||
value: /v1 | ||
- method: POST | ||
default: {} | ||
--- | ||
type: MeshHTTPRoute | ||
mesh: mesh-1 | ||
name: http-route-2 | ||
spec: | ||
targetRef: | ||
kind: MeshService | ||
name: web-api | ||
to: | ||
- targetRef: | ||
kind: MeshService | ||
name: test-server | ||
rules: | ||
- matches: | ||
- path: | ||
type: Exact | ||
value: / | ||
default: {} | ||
--- | ||
# mtp-1 should select DPP because it targets MeshHTTPRoute that selects the DPP | ||
type: MeshTimeout | ||
mesh: mesh-1 | ||
name: mtp-1 | ||
spec: | ||
targetRef: | ||
kind: MeshHTTPRoute | ||
name: http-route-1 | ||
to: | ||
- targetRef: | ||
kind: Mesh | ||
default: | ||
http: | ||
requestTimeout: 1s | ||
--- | ||
type: MeshTimeout | ||
mesh: mesh-1 | ||
name: mtp-2 | ||
spec: | ||
targetRef: | ||
kind: MeshHTTPRoute | ||
name: http-route-2 | ||
to: | ||
- targetRef: | ||
kind: Mesh | ||
default: | ||
http: | ||
requestTimeout: 3s |
16 changes: 16 additions & 0 deletions
16
pkg/plugins/policies/core/matchers/testdata/matchedpolicies/torules/03.dataplane.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
type: Dataplane | ||
mesh: mesh-1 | ||
name: dp-1 | ||
networking: | ||
address: 1.1.1.1 | ||
inbound: | ||
- port: 8080 | ||
tags: | ||
kuma.io/service: web | ||
version: v1 | ||
team: mesh | ||
- port: 8081 | ||
tags: | ||
kuma.io/service: web-api | ||
version: v1 | ||
team: mesh |
Oops, something went wrong.