Skip to content
This repository was archived by the owner on Sep 27, 2023. It is now read-only.

Commit 5b1fa6b

Browse files
leecalcotel5io
authored andcommitted
[Patterns] Pattern components generated from latest OSM manifests
Signed-off-by: l5io <[email protected]>
1 parent bd30cad commit 5b1fa6b

16 files changed

+959
-0
lines changed
Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
{
2+
"properties": {
3+
"hosts": {
4+
"description": "Hosts that the sources are allowed to direct external traffic to.",
5+
"items": {
6+
"type": "string"
7+
},
8+
"type": "array"
9+
},
10+
"ipAddresses": {
11+
"description": "IP address ranges that the sources are allowed to direct external traffic to.",
12+
"items": {
13+
"pattern": "((?:\\d{1,3}\\.){3}\\d{1,3})\\/(\\d{1,2})$",
14+
"type": "string"
15+
},
16+
"type": "array"
17+
},
18+
"matches": {
19+
"description": "The resource references an Egress policy should match on.",
20+
"items": {
21+
"properties": {
22+
"apiGroup": {
23+
"description": "API group for the resource being referenced.",
24+
"type": "string"
25+
},
26+
"kind": {
27+
"description": "Type of resource being referenced.",
28+
"type": "string"
29+
},
30+
"name": {
31+
"description": "Name of resource being referenced.",
32+
"type": "string"
33+
}
34+
},
35+
"required": [
36+
"apiGroup",
37+
"kind",
38+
"name"
39+
],
40+
"type": "object"
41+
},
42+
"type": "array"
43+
},
44+
"ports": {
45+
"description": "Ports that the sources are allowed to direct external traffic to.",
46+
"items": {
47+
"properties": {
48+
"number": {
49+
"description": "Port number of this port.",
50+
"maximum": 65535,
51+
"minimum": 1,
52+
"type": "integer"
53+
},
54+
"protocol": {
55+
"description": "Protocol served by this port.",
56+
"type": "string"
57+
}
58+
},
59+
"required": [
60+
"number",
61+
"protocol"
62+
],
63+
"type": "object"
64+
},
65+
"type": "array"
66+
},
67+
"sources": {
68+
"description": "Sources the egress policy is applicable to.",
69+
"items": {
70+
"properties": {
71+
"kind": {
72+
"description": "Kind of this source.",
73+
"enum": [
74+
"ServiceAccount"
75+
],
76+
"type": "string"
77+
},
78+
"name": {
79+
"description": "Name of this source.",
80+
"type": "string"
81+
},
82+
"namespace": {
83+
"description": "Namespace of this source.",
84+
"type": "string"
85+
}
86+
},
87+
"required": [
88+
"kind",
89+
"name",
90+
"namespace"
91+
],
92+
"type": "object"
93+
},
94+
"type": "array"
95+
}
96+
},
97+
"required": [
98+
"sources",
99+
"ports"
100+
],
101+
"title": "Egress",
102+
"type": "object"
103+
}
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"kind": "WorkloadDefinition",
3+
"apiVersion": "core.oam.dev/v1alpha1",
4+
"metadata": {
5+
"name": "Egress",
6+
"creationTimestamp": null
7+
},
8+
"spec": {
9+
"definitionRef": {
10+
"name": "egress.meshery.layer5.io"
11+
},
12+
"metadata": {
13+
"@type": "pattern.meshery.io/mesh/workload",
14+
"k8sAPIVersion": "policy.openservicemesh.io/v1alpha1",
15+
"k8sKind": "Egress",
16+
"meshName": "OPEN_SERVICE_MESH",
17+
"meshVersion": "v1.0.0-rc.4"
18+
}
19+
}
20+
}
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
{
2+
"properties": {
3+
"matches": {
4+
"description": "Match conditions of this route group.",
5+
"items": {
6+
"properties": {
7+
"headers": {
8+
"description": "Header match conditions of this route.",
9+
"items": {
10+
"additionalProperties": {
11+
"type": "string"
12+
},
13+
"description": "Header match condition of this route.",
14+
"type": "object"
15+
},
16+
"type": "array"
17+
},
18+
"methods": {
19+
"description": "The HTTP methods of this HTTP route.",
20+
"items": {
21+
"description": "The HTTP method of this HTTP route.",
22+
"enum": [
23+
"*",
24+
"GET",
25+
"HEAD",
26+
"PUT",
27+
"POST",
28+
"DELETE",
29+
"CONNECT",
30+
"OPTIONS",
31+
"TRACE",
32+
"PATCH"
33+
],
34+
"type": "string"
35+
},
36+
"type": "array"
37+
},
38+
"name": {
39+
"description": "Name of the HTTP route.",
40+
"type": "string"
41+
},
42+
"pathRegex": {
43+
"description": "URI path regex of the HTTP route.",
44+
"type": "string"
45+
}
46+
},
47+
"required": [
48+
"name"
49+
],
50+
"type": "object"
51+
},
52+
"type": "array"
53+
}
54+
},
55+
"required": [
56+
"matches"
57+
],
58+
"title": "HTTP Route Group",
59+
"type": "object"
60+
}
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"kind": "WorkloadDefinition",
3+
"apiVersion": "core.oam.dev/v1alpha1",
4+
"metadata": {
5+
"name": "HTTPRouteGroup",
6+
"creationTimestamp": null
7+
},
8+
"spec": {
9+
"definitionRef": {
10+
"name": "httproutegroup.meshery.layer5.io"
11+
},
12+
"metadata": {
13+
"@type": "pattern.meshery.io/mesh/workload",
14+
"k8sAPIVersion": "specs.smi-spec.io/v1alpha4",
15+
"k8sKind": "HTTPRouteGroup",
16+
"meshName": "OPEN_SERVICE_MESH",
17+
"meshVersion": "v1.0.0-rc.4"
18+
}
19+
}
20+
}
Lines changed: 118 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,118 @@
1+
{
2+
"properties": {
3+
"backends": {
4+
"description": "Backends the IngressBackend policy is applicable to.",
5+
"items": {
6+
"properties": {
7+
"name": {
8+
"description": "Name of the backend.",
9+
"type": "string"
10+
},
11+
"port": {
12+
"description": "Port of the backend.",
13+
"properties": {
14+
"number": {
15+
"description": "Port number of this port.",
16+
"maximum": 65535,
17+
"minimum": 1,
18+
"type": "integer"
19+
},
20+
"protocol": {
21+
"description": "Protocol served by this port.",
22+
"type": "string"
23+
}
24+
},
25+
"required": [
26+
"number",
27+
"protocol"
28+
],
29+
"type": "object"
30+
},
31+
"tls": {
32+
"description": "TLS configuration for the backend.",
33+
"properties": {
34+
"skipClientCertValidation": {
35+
"description": "Skip client certificate validation.",
36+
"type": "boolean"
37+
},
38+
"sniHosts": {
39+
"description": "SNI hosts allowed by the backend.",
40+
"items": {
41+
"type": "string"
42+
},
43+
"type": "array"
44+
}
45+
},
46+
"required": [
47+
"skipClientCertValidation"
48+
],
49+
"type": "object"
50+
}
51+
},
52+
"required": [
53+
"name",
54+
"port"
55+
],
56+
"type": "object"
57+
},
58+
"type": "array"
59+
},
60+
"matches": {
61+
"description": "The resource references an IngressBackend policy should match on.",
62+
"items": {
63+
"properties": {
64+
"apiGroup": {
65+
"description": "API group for the resource being referenced.",
66+
"type": "string"
67+
},
68+
"kind": {
69+
"description": "Type of resource being referenced.",
70+
"type": "string"
71+
},
72+
"name": {
73+
"description": "Name of resource being referenced.",
74+
"type": "string"
75+
}
76+
},
77+
"required": [
78+
"apiGroup",
79+
"kind",
80+
"name"
81+
],
82+
"type": "object"
83+
},
84+
"type": "array"
85+
},
86+
"sources": {
87+
"description": "Sources the IngressBackend policy is applicable to.",
88+
"items": {
89+
"properties": {
90+
"kind": {
91+
"description": "Kind of this source.",
92+
"type": "string"
93+
},
94+
"name": {
95+
"description": "Name of this source.",
96+
"type": "string"
97+
},
98+
"namespace": {
99+
"description": "Namespace of this source.",
100+
"type": "string"
101+
}
102+
},
103+
"required": [
104+
"kind",
105+
"name"
106+
],
107+
"type": "object"
108+
},
109+
"type": "array"
110+
}
111+
},
112+
"required": [
113+
"backends",
114+
"sources"
115+
],
116+
"title": "Ingress Backend",
117+
"type": "object"
118+
}
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"kind": "WorkloadDefinition",
3+
"apiVersion": "core.oam.dev/v1alpha1",
4+
"metadata": {
5+
"name": "IngressBackend",
6+
"creationTimestamp": null
7+
},
8+
"spec": {
9+
"definitionRef": {
10+
"name": "ingressbackend.meshery.layer5.io"
11+
},
12+
"metadata": {
13+
"@type": "pattern.meshery.io/mesh/workload",
14+
"k8sAPIVersion": "policy.openservicemesh.io/v1alpha1",
15+
"k8sKind": "IngressBackend",
16+
"meshName": "OPEN_SERVICE_MESH",
17+
"meshVersion": "v1.0.0-rc.4"
18+
}
19+
}
20+
}

0 commit comments

Comments
 (0)