From 08c51a4e11614ca5ed18a34208e4f0208f27fa82 Mon Sep 17 00:00:00 2001 From: Anatolii Bazko Date: Tue, 4 Aug 2020 14:39:43 +0300 Subject: [PATCH] Ignore the error if test route already exists (#383) Signed-off-by: Anatolii Bazko --- pkg/deploy/tls.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pkg/deploy/tls.go b/pkg/deploy/tls.go index 5ef9a5ec8..c3c3d521c 100644 --- a/pkg/deploy/tls.go +++ b/pkg/deploy/tls.go @@ -119,8 +119,10 @@ func GetEndpointTLSCrtChain(instance *orgv1.CheCluster, endpointURL string, prox routeSpec.SetOwnerReferences(nil) // Create route manually if err := clusterAPI.Client.Create(context.TODO(), routeSpec); err != nil { - logrus.Errorf("Failed to create test route 'test': %s", err) - return nil, err + if !errors.IsAlreadyExists(err) { + logrus.Errorf("Failed to create test route 'test': %s", err) + return nil, err + } } // Schedule test route cleanup after the job done.