-
Notifications
You must be signed in to change notification settings - Fork 277
smi: update to smi-sdk-go v0.5.0 and traffic-specs v1alpha4 #2331
Conversation
This change upgrades the code to use the latest v0.5.0 SMI SDK to be able to support v1alpha4 of SMI traffic-specs APIs. v1alpha4 is primarily required for TCP routes support. Resolves openservicemesh#2318 Signed-off-by: Shashank Ram <shashr2204@gmail.com>
Codecov Report
@@ Coverage Diff @@
## main #2331 +/- ##
==========================================
- Coverage 57.26% 57.21% -0.05%
==========================================
Files 149 149
Lines 6673 6663 -10
==========================================
- Hits 3821 3812 -9
+ Misses 2847 2846 -1
Partials 5 5
Continue to review full report at Codecov.
|
@@ -34,7 +34,7 @@ require ( | |||
github.com/prometheus/client_golang v1.0.0 | |||
github.com/prometheus/common v0.4.1 | |||
github.com/rs/zerolog v1.18.0 | |||
github.com/servicemeshinterface/smi-sdk-go v0.4.1 | |||
github.com/servicemeshinterface/smi-sdk-go v0.5.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎉
@@ -179,25 +176,8 @@ func (mc *MeshCatalog) getTCPRouteMatchesFromTrafficTarget(trafficTarget smiAcce | |||
return nil, errNoTrafficSpecFoundForTrafficPolicy | |||
} | |||
|
|||
// TODO(#1521): Create an actual TCP route match once v1alpha4 TCPRoute spec is available | |||
// Hack: derive ports from 'ports' label on the TCPRoute resource | |||
portsStr, ok := tcpRoute.Labels["ports"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
✌️
tcpRouteMatch := trafficpolicy.TCPRouteMatch{ | ||
Ports: ports, | ||
Ports: tcpRoute.Spec.Matches.Ports, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@shashankram this is great! Thank you!
I left a tiny comment on checking whether Matches is empty - this we could do in fast-followup PR (if at all needed).
Discussed and resolved concern in #2331 (comment) |
Description:
This change upgrades the code to use the latest v0.5.0 SMI
SDK to be able to support v1alpha4 of SMI traffic-specs APIs.
v1alpha4 is primarily required for TCP routes support.
Resolves #2318
Signed-off-by: Shashank Ram shashr2204@gmail.com
Affected area:
Please answer the following questions with yes/no.
No