Skip to content

Commit

Permalink
fix: Handle minor version with '+' when determining ingress mode (#1529
Browse files Browse the repository at this point in the history
…) (#1612)

Signed-off-by: Kiran Meduri <[email protected]>
Signed-off-by: Rohit Agrawal <[email protected]>
  • Loading branch information
kiranmeduri authored and agrawroh committed Oct 28, 2021
1 parent fe2c68b commit 1fdcb96
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions rollout/trafficrouting/istio/istio.go
Original file line number Diff line number Diff line change
Expand Up @@ -242,16 +242,22 @@ func (r *Reconciler) reconcileVirtualService(obj *unstructured.Unstructured, vsv
}
}

// Generate Patches
patches := r.generateVirtualServicePatches(vsvcRouteNames, httpRoutes, vsvcTLSRoutes, tlsRoutes, int64(desiredWeight), additionalDestinations...)
err = patches.patchVirtualService(httpRoutesI, tlsRoutesI)
if err != nil {
return nil, false, err
}

err = unstructured.SetNestedSlice(newObj.Object, httpRoutesI, "spec", Http)
if err != nil {
return newObj, len(patches) > 0, err
// Set HTTP Route Slice
if len(httpRoutes) > 0 {
err = unstructured.SetNestedSlice(newObj.Object, httpRoutesI, "spec", Http)
if err != nil {
return newObj, len(patches) > 0, err
}
}

// Set TLS Route Slice
if tlsRoutesI != nil {
err = unstructured.SetNestedSlice(newObj.Object, tlsRoutesI, "spec", Tls)
}
Expand Down

0 comments on commit 1fdcb96

Please sign in to comment.