Преглед на файлове

Merge pull request #1767 from porter-dev/belanger/check-for-other-depl-names

Check for other forms of the deployment name for blue-green deployments
abelanger5 преди 4 години
родител
ревизия
4b898689c7
променени са 1 файла, в които са добавени 1 реда и са изтрити 1 реда
  1. 1 1
      cli/cmd/bluegreen.go

+ 1 - 1
cli/cmd/bluegreen.go

@@ -120,7 +120,7 @@ func bluegreenSwitch(_ *types.GetAuthenticatedUserResponse, client *api.Client,
 
 
 		// get the deployment which matches the new image tag
 		// get the deployment which matches the new image tag
 		for _, depl := range depls.Items {
 		for _, depl := range depls.Items {
-			if depl.ObjectMeta.Name == fmt.Sprintf("%s-web-%s", app, tag) {
+			if depl.ObjectMeta.Name == fmt.Sprintf("%s-web-%s", app, tag) || depl.ObjectMeta.Name == fmt.Sprintf("%s-%s", app, tag) {
 				foundDeployment = true
 				foundDeployment = true
 
 
 				// determine if the deployment has an appropriate number of ready replicas
 				// determine if the deployment has an appropriate number of ready replicas