Skip to content

Commit

Permalink
MESH-1709 support bluegreen rollout preview (istio-ecosystem#103)
Browse files Browse the repository at this point in the history
* Fix meshPort nil for canary rollout without weights

Signed-off-by: nbn01 <nandan_bn@intuit.com>
  • Loading branch information
nbn01 authored and GitHub Enterprise committed Apr 7, 2022
1 parent acca3f7 commit 7d6991e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion admiral/pkg/clusters/serviceentry.go
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,8 @@ func modifyServiceEntryForNewServiceOrPod(event admiral.EventType, env string, s

if len(sourceDeployments) > 0 {
meshPorts = GetMeshPorts(sourceCluster, serviceInstance, sourceDeployments[sourceCluster])
} else {
meshPorts = GetMeshPortsForRollout(sourceCluster, serviceInstance, sourceRollouts[sourceCluster])
}

for key, serviceEntry := range serviceEntries {
Expand All @@ -173,7 +175,6 @@ func modifyServiceEntryForNewServiceOrPod(event admiral.EventType, env string, s
// see if we have weighted services (rollouts with canary strategy)
} else if len(weightedServices) > 1 {
//add one endpoint per each service, may be modify
meshPorts = GetMeshPortsForRollout(sourceCluster, serviceInstance, sourceRollouts[sourceCluster])
var se = copyServiceEntry(serviceEntry)
updateEndpointsForWeightedServices(se, weightedServices, clusterIngress, meshPorts)
AddServiceEntriesWithDr(remoteRegistry.AdmiralCache, map[string]string{sourceCluster: sourceCluster}, remoteRegistry.RemoteControllers,
Expand Down

0 comments on commit 7d6991e

Please sign in to comment.