Skip to content

Commit 388476e

Browse files
authored
Merge pull request #77 from dhruv0000/manifestUpdate
Build Fix
2 parents 06b4f88 + d11b0fa commit 388476e

File tree

18 files changed

+158
-127
lines changed

18 files changed

+158
-127
lines changed

smi-conformance/grpc/handlers.go

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,12 @@ func (s *Service) RunTest(ctx context.Context, req *conformance.Request) (*confo
4242

4343
config = linkerdConfig
4444
switch req.Mesh.Type {
45-
case smp.ServiceMesh_APP_MESH:
45+
case smp.ServiceMesh_LINKERD:
4646
config = linkerdConfig
4747
req.Mesh.Annotations["linkerd.io/inject"] = "enabled"
48+
case smp.ServiceMesh_APP_MESH:
49+
config = linkerdConfig
50+
req.Mesh.Labels["appmesh.k8s.aws/sidecarInjectorWebhook"] = "enabled"
4851
case smp.ServiceMesh_MAESH:
4952
config = maeshConfig
5053
case smp.ServiceMesh_ISTIO:
@@ -53,6 +56,10 @@ func (s *Service) RunTest(ctx context.Context, req *conformance.Request) (*confo
5356
case smp.ServiceMesh_OPEN_SERVICE_MESH:
5457
config = osmConfig
5558
req.Mesh.Labels["openservicemesh.io/monitored-by"] = "osm"
59+
case smp.ServiceMesh_KUMA:
60+
req.Mesh.Annotations["kuma.io/sidecar-injection"] = "enabled"
61+
case smp.ServiceMesh_NGINX_SERVICE_MESH:
62+
req.Mesh.Annotations["njector.nsm.nginx.com/auto-inject"] = "true"
5663

5764
}
5865

@@ -64,12 +71,17 @@ func (s *Service) RunTest(ctx context.Context, req *conformance.Request) (*confo
6471
"traffic-split": 11,
6572
"traffic-spec": 6,
6673
}
74+
specVersion := map[string]string{
75+
"traffic-access": "v0.6.0/v1alpha3",
76+
"traffic-split": "v0.6.0/v1alpha4",
77+
"traffic-spec": "v0.6.0/v1alpha4",
78+
}
6779

6880
details := make([]*conformance.Detail, 0)
6981
for _, res := range result.Testsuite[0].Testcase {
7082
d := &conformance.Detail{
7183
Smispec: res.Name,
72-
Specversion: "v1alpha1",
84+
Specversion: specVersion[res.Name],
7385
Assertion: strconv.Itoa(stepsCount[res.Name]),
7486
Duration: res.Time,
7587
Capability: conformance.Capability_FULL,
@@ -98,7 +110,7 @@ func (s *Service) RunTest(ctx context.Context, req *conformance.Request) (*confo
98110

99111
// A hacky way to see the testStep Failed, since KUDO only provides it in Failure.Message
100112
re := regexp.MustCompile(`[0-9]+`)
101-
if res.Failure != nil {
113+
if res.Failure.Message != "" {
102114
stepFailed := re.FindAllString(res.Failure.Message, 1)
103115
if len(stepFailed) != 0 {
104116
passed, _ := strconv.Atoi(stepFailed[0])
Lines changed: 18 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,27 @@
1-
apiVersion: specs.smi-spec.io/v1alpha1
1+
---
2+
apiVersion: specs.smi-spec.io/v1alpha4
23
kind: TCPRoute
34
metadata:
45
name: service-tcp-route
56
namespace: <NAMESPACE>
7+
spec:
8+
matches:
9+
ports: []
610
---
7-
apiVersion: access.smi-spec.io/v1alpha1
11+
apiVersion: access.smi-spec.io/v1alpha3
812
kind: TrafficTarget
913
metadata:
1014
name: service-targets
1115
namespace: <NAMESPACE>
12-
destination:
13-
kind: ServiceAccount
14-
name: service-b
15-
namespace: <NAMESPACE>
16-
sources:
17-
- kind: ServiceAccount
18-
name: service-a
19-
namespace: <NAMESPACE>
20-
specs:
21-
- kind: TCPRoute
22-
name: service-tcp-route
16+
spec:
17+
destination:
18+
kind: ServiceAccount
19+
name: service-b
20+
namespace: <NAMESPACE>
21+
sources:
22+
- kind: ServiceAccount
23+
name: service-a
24+
namespace: <NAMESPACE>
25+
rules:
26+
- kind: TCPRoute
27+
name: service-tcp-route
Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,27 @@
11
---
2-
apiVersion: specs.smi-spec.io/v1alpha1
2+
apiVersion: specs.smi-spec.io/v1alpha4
33
kind: TCPRoute
44
metadata:
55
name: service-tcp-route
66
namespace: <NAMESPACE>
7+
spec:
8+
matches:
9+
ports: []
710
---
8-
apiVersion: access.smi-spec.io/v1alpha1
11+
apiVersion: access.smi-spec.io/v1alpha3
912
kind: TrafficTarget
1013
metadata:
1114
name: service-targets
1215
namespace: <NAMESPACE>
13-
destination:
14-
kind: ServiceAccount
15-
name: service-b
16-
namespace: <NAMESPACE>
17-
sources:
18-
- kind: ServiceAccount
19-
name: service-a
20-
namespace: <NAMESPACE>
21-
specs:
22-
- kind: TCPRoute
23-
name: service-tcp-route
16+
spec:
17+
destination:
18+
kind: ServiceAccount
19+
name: service-b
20+
namespace: <NAMESPACE>
21+
sources:
22+
- kind: ServiceAccount
23+
name: service-a
24+
namespace: <NAMESPACE>
25+
rules:
26+
- kind: TCPRoute
27+
name: service-tcp-route
Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,27 @@
11
---
2-
apiVersion: specs.smi-spec.io/v1alpha1
2+
apiVersion: specs.smi-spec.io/v1alpha4
33
kind: TCPRoute
44
metadata:
55
name: service-tcp-route
66
namespace: <NAMESPACE>
7+
spec:
8+
matches:
9+
ports: []
710
---
8-
apiVersion: access.smi-spec.io/v1alpha1
11+
apiVersion: access.smi-spec.io/v1alpha3
912
kind: TrafficTarget
1013
metadata:
1114
name: service-targets
1215
namespace: <NAMESPACE>
13-
destination:
14-
kind: ServiceAccount
15-
name: service-b
16-
namespace: <NAMESPACE>
17-
sources:
18-
- kind: ServiceAccount
19-
name: service-a
20-
namespace: <NAMESPACE>
21-
specs:
22-
- kind: TCPRoute
23-
name: service-tcp-route
16+
spec:
17+
destination:
18+
kind: ServiceAccount
19+
name: service-b
20+
namespace: <NAMESPACE>
21+
sources:
22+
- kind: ServiceAccount
23+
name: service-a
24+
namespace: <NAMESPACE>
25+
rules:
26+
- kind: TCPRoute
27+
name: service-tcp-route
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
apiVersion: kudo.dev/v1alpha1
22
kind: TestStep
33
delete:
4-
- apiVersion: specs.smi-spec.io/v1alpha1
4+
- apiVersion: specs.smi-spec.io/v1alpha4
55
kind: TCPRoute
66
namespace: <NAMESPACE>
77
name: service-tcp-route
8-
- apiVersion: access.smi-spec.io/v1alpha1
8+
- apiVersion: access.smi-spec.io/v1alpha3
99
kind: TrafficTarget
1010
namespace: <NAMESPACE>
1111
name: service-targets
Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
apiVersion: specs.smi-spec.io/v1alpha1
1+
apiVersion: specs.smi-spec.io/v1alpha4
22
kind: HTTPRouteGroup
33
metadata:
44
name: http-rg
@@ -8,22 +8,23 @@ matches:
88
pathRegex: /metrics
99
methods: ["*"]
1010
---
11-
apiVersion: access.smi-spec.io/v1alpha1
11+
apiVersion: access.smi-spec.io/v1alpha3
1212
kind: TrafficTarget
1313
metadata:
1414
name: service-targets
1515
namespace: <NAMESPACE>
16-
destination:
17-
kind: ServiceAccount
18-
name: service-b
19-
namespace: <NAMESPACE>
20-
port: "9091"
21-
sources:
22-
- kind: ServiceAccount
23-
name: service-a
24-
namespace: <NAMESPACE>
25-
specs:
26-
- kind: HTTPRouteGroup
27-
name: http-rg
28-
matches:
29-
- testMatch
16+
spec:
17+
destination:
18+
kind: ServiceAccount
19+
name: service-b
20+
namespace: <NAMESPACE>
21+
port: "9091"
22+
sources:
23+
- kind: ServiceAccount
24+
name: service-a
25+
namespace: <NAMESPACE>
26+
rules:
27+
- kind: HTTPRouteGroup
28+
name: http-rg
29+
matches:
30+
- testMatch
Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
apiVersion: specs.smi-spec.io/v1alpha1
1+
apiVersion: specs.smi-spec.io/v1alpha4
22
kind: HTTPRouteGroup
33
metadata:
44
name: http-rg
@@ -8,22 +8,23 @@ matches:
88
pathRegex: /metrics
99
methods: ["*"]
1010
---
11-
apiVersion: access.smi-spec.io/v1alpha1
11+
apiVersion: access.smi-spec.io/v1alpha3
1212
kind: TrafficTarget
1313
metadata:
1414
name: service-targets
1515
namespace: <NAMESPACE>
16-
destination:
17-
kind: ServiceAccount
18-
name: service-b
19-
namespace: <NAMESPACE>
20-
port: "9091"
21-
sources:
22-
- kind: ServiceAccount
23-
name: service-a
24-
namespace: <NAMESPACE>
25-
specs:
26-
- kind: HTTPRouteGroup
27-
name: http-rg
28-
matches:
29-
- testMatch
16+
spec:
17+
destination:
18+
kind: ServiceAccount
19+
name: service-b
20+
namespace: <NAMESPACE>
21+
port: "9091"
22+
sources:
23+
- kind: ServiceAccount
24+
name: service-a
25+
namespace: <NAMESPACE>
26+
rules:
27+
- kind: HTTPRouteGroup
28+
name: http-rg
29+
matches:
30+
- testMatch
Lines changed: 23 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,32 @@
1-
apiVersion: specs.smi-spec.io/v1alpha1
1+
apiVersion: specs.smi-spec.io/v1alpha4
22
kind: HTTPRouteGroup
33
metadata:
44
name: http-rg
55
namespace: <NAMESPACE>
6-
matches:
7-
- name: testMatch
8-
pathRegex: ".*"
9-
methods:
10-
- GET
6+
spec:
7+
matches:
8+
- name: testMatch
9+
pathRegex: ".*"
10+
methods:
11+
- GET
1112
---
12-
apiVersion: access.smi-spec.io/v1alpha1
13+
apiVersion: access.smi-spec.io/v1alpha3
1314
kind: TrafficTarget
1415
metadata:
1516
name: service-targets
1617
namespace: <NAMESPACE>
17-
destination:
18-
kind: ServiceAccount
19-
name: service-b
20-
namespace: <NAMESPACE>
21-
port: "9091"
22-
sources:
23-
- kind: ServiceAccount
24-
name: service-a
25-
namespace: <NAMESPACE>
26-
specs:
27-
- kind: HTTPRouteGroup
28-
name: http-rg
29-
matches:
30-
- testMatch
18+
spec:
19+
destination:
20+
kind: ServiceAccount
21+
name: service-b
22+
namespace: <NAMESPACE>
23+
port: "9091"
24+
sources:
25+
- kind: ServiceAccount
26+
name: service-a
27+
namespace: <NAMESPACE>
28+
rules:
29+
- kind: HTTPRouteGroup
30+
name: http-rg
31+
matches:
32+
- testMatch
Lines changed: 23 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,32 @@
1-
apiVersion: specs.smi-spec.io/v1alpha1
1+
apiVersion: specs.smi-spec.io/v1alpha4
22
kind: HTTPRouteGroup
33
metadata:
44
name: http-rg
55
namespace: <NAMESPACE>
6-
matches:
7-
- name: testMatch
8-
pathRegex: ".*"
9-
methods:
10-
- GET
6+
spec:
7+
matches:
8+
- name: testMatch
9+
pathRegex: ".*"
10+
methods:
11+
- GET
1112
---
12-
apiVersion: access.smi-spec.io/v1alpha1
13+
apiVersion: access.smi-spec.io/v1alpha3
1314
kind: TrafficTarget
1415
metadata:
1516
name: service-targets
1617
namespace: <NAMESPACE>
17-
destination:
18-
kind: ServiceAccount
19-
name: service-b
20-
namespace: <NAMESPACE>
21-
port: "9091"
22-
sources:
23-
- kind: ServiceAccount
24-
name: service-a
25-
namespace: <NAMESPACE>
26-
specs:
27-
- kind: HTTPRouteGroup
28-
name: http-rg
29-
matches:
30-
- testMatch
18+
spec:
19+
destination:
20+
kind: ServiceAccount
21+
name: service-b
22+
namespace: <NAMESPACE>
23+
port: "9091"
24+
sources:
25+
- kind: ServiceAccount
26+
name: service-a
27+
namespace: <NAMESPACE>
28+
rules:
29+
- kind: HTTPRouteGroup
30+
name: http-rg
31+
matches:
32+
- testMatch

0 commit comments

Comments
 (0)