This repository has been archived by the owner on Apr 12, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
/
smi.go
94 lines (81 loc) · 2.74 KB
/
smi.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
package version
import (
"github.com/openservicemesh/osm-health/pkg/smi"
)
// SupportedTrafficTarget is a map of OSM Controller Version to supported
var SupportedTrafficTarget = map[ControllerVersion]TrafficTargetVersion{
// Source: https://github.com/openservicemesh/osm/blob/release-v0.5/pkg/smi/client.go#L8
"v0.5": "v1alpha2",
// Source: https://github.com/openservicemesh/osm/blob/release-v0.6/pkg/smi/client.go#L8
"v0.6": "v1alpha2",
// Source: https://github.com/openservicemesh/osm/blob/release-v0.7/pkg/smi/client.go#L8
"v0.7": "v1alpha3",
// Source: https://github.com/openservicemesh/osm/blob/release-v0.8/pkg/smi/client.go#L8
"v0.8": "v1alpha3",
// Source: https://github.com/openservicemesh/osm/blob/release-v0.9/pkg/smi/client.go#L10
"v0.9": "v1alpha3",
}
// SupportedTrafficTargetRouteKinds is a map of OSM Controller Version to supported SMI TrafficTarget Route Kinds.
var SupportedTrafficTargetRouteKinds = map[ControllerVersion][]TrafficTargetRouteKind{
// Source:
// https://github.com/openservicemesh/osm/blob/release-v0.5/pkg/smi/client.go#L67
// https://github.com/openservicemesh/osm/blob/release-v0.5/pkg/smi/client.go#L68
"v0.5": {
smi.HTTPRouteGroupKind,
smi.TCPRouteKind,
},
// Sources:
// https://github.com/openservicemesh/osm/blob/release-v0.6/pkg/smi/client.go#L68
// https://github.com/openservicemesh/osm/blob/release-v0.6/pkg/smi/client.go#L69
"v0.6": {
smi.HTTPRouteGroupKind,
smi.TCPRouteKind,
},
// Sources:
// https://github.com/openservicemesh/osm/blob/release-v0.7/pkg/smi/client.go#L68
// https://github.com/openservicemesh/osm/blob/release-v0.7/pkg/smi/client.go#L69
"v0.7": {
smi.HTTPRouteGroupKind,
smi.TCPRouteKind,
},
// Sources:
// https://github.com/openservicemesh/osm/blob/release-v0.8/pkg/smi/client.go#L58
// https://github.com/openservicemesh/osm/blob/release-v0.8/pkg/smi/client.go#L59
"v0.8": {
smi.HTTPRouteGroupKind,
smi.TCPRouteKind,
},
// Sources:
// https://github.com/openservicemesh/osm/blob/release-v0.9/pkg/smi/client.go#L60
// https://github.com/openservicemesh/osm/blob/release-v0.9/pkg/smi/client.go#L61
"v0.9": {
smi.HTTPRouteGroupKind,
smi.TCPRouteKind,
},
}
// SupportedTrafficSplit is the mapping of OSM Controller version to supported SMI TrafficSplit version.
var SupportedTrafficSplit = map[ControllerVersion]TrafficSplitVersion{
"v0.5": "v1alpha2",
"v0.6": "v1alpha2",
"v0.7": "v1alpha2",
"v0.8": "v1alpha2",
"v0.9": "v1alpha2",
}
// SupportedHTTPRouteVersion is a mapping of OSM Controller version to supported HTTP Route Group version.
var SupportedHTTPRouteVersion = map[ControllerVersion][]HTTPRouteVersion{
"v0.5": {
"v1alpha3",
},
"v0.6": {
"v1alpha3",
},
"v0.7": {
"v1alpha4",
},
"v0.8": {
"v1alpha4",
},
"v0.9": {
"v1alpha4",
},
}