-
Notifications
You must be signed in to change notification settings - Fork 337
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): enable zone-originated policies (#8801)
Signed-off-by: Ilya Lobkov <[email protected]>
- Loading branch information
1 parent
15a9507
commit fcafb25
Showing
21 changed files
with
178 additions
and
16 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
11 changes: 11 additions & 0 deletions
11
pkg/plugins/policies/core/matchers/testdata/matchedpolicies/torules/04.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,11 @@ | ||
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 |
27 changes: 27 additions & 0 deletions
27
pkg/plugins/policies/core/matchers/testdata/matchedpolicies/torules/04.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,27 @@ | ||
Rules: | ||
- Conf: | ||
http: | ||
requestTimeout: 3s | ||
streamIdleTimeout: 5s | ||
Origin: | ||
- creationTime: "0001-01-01T00:00:00Z" | ||
mesh: mesh-1 | ||
modificationTime: "0001-01-01T00:00:00Z" | ||
name: aaa | ||
type: MeshTimeout | ||
- creationTime: "0001-01-01T00:00:00Z" | ||
labels: | ||
kuma.io/origin: zone | ||
mesh: mesh-1 | ||
modificationTime: "0001-01-01T00:00:00Z" | ||
name: bbb | ||
type: MeshTimeout | ||
- creationTime: "0001-01-01T00:00:00Z" | ||
mesh: mesh-1 | ||
modificationTime: "0001-01-01T00:00:00Z" | ||
name: ccc | ||
type: MeshTimeout | ||
Subset: | ||
- Key: kuma.io/service | ||
Not: false | ||
Value: backend |
51 changes: 51 additions & 0 deletions
51
pkg/plugins/policies/core/matchers/testdata/matchedpolicies/torules/04.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,51 @@ | ||
type: MeshTimeout | ||
mesh: mesh-1 | ||
name: aaa | ||
spec: | ||
targetRef: | ||
kind: Mesh | ||
to: | ||
- targetRef: | ||
kind: MeshService | ||
name: backend | ||
default: | ||
http: | ||
requestTimeout: 1s | ||
streamIdleTimeout: 1s | ||
--- | ||
# 'bbb' has less priority than 'aaa' based on the name, but it should take precedence because it's a zone-originated policy | ||
type: MeshTimeout | ||
mesh: mesh-1 | ||
name: bbb | ||
labels: | ||
kuma.io/origin: zone | ||
spec: | ||
targetRef: | ||
kind: Mesh | ||
to: | ||
- targetRef: | ||
kind: MeshService | ||
name: backend | ||
default: | ||
http: | ||
requestTimeout: 3s | ||
streamIdleTimeout: 3s | ||
--- | ||
# 'ccc' has more priority than other even though it's a global-originated policy | ||
type: MeshTimeout | ||
mesh: mesh-1 | ||
name: ccc | ||
spec: | ||
targetRef: | ||
kind: MeshServiceSubset | ||
name: web | ||
tags: | ||
version: v1 | ||
team: mesh | ||
to: | ||
- targetRef: | ||
kind: MeshService | ||
name: backend | ||
default: | ||
http: | ||
streamIdleTimeout: 5s |
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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