Skip to content

Commit

Permalink
Ignore the error if test route already exists (#383)
Browse files Browse the repository at this point in the history
Signed-off-by: Anatolii Bazko <[email protected]>
  • Loading branch information
tolusha authored Aug 4, 2020
1 parent 9575530 commit 08c51a4
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions pkg/deploy/tls.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 08c51a4

Please sign in to comment.