Skip to content

Commit

Permalink
Merge pull request #1632 from cliveseldon/1631_non_istio_vsvc
Browse files Browse the repository at this point in the history
check for virtualservices before running clean up
  • Loading branch information
ukclivecox authored Mar 29, 2020
2 parents a4b1088 + c3c8af1 commit d21f34f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion operator/controllers/seldondeployment_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -949,7 +949,8 @@ func (r *SeldonDeploymentReconciler) createIstioServices(components *components,
}

//Cleanup unused VirtualService. This should usually only happen on Operator upgrades where there is a breaking change to the names of the VirtualServices created
if ready {
//Only run if we have virtualservices to create - implies we are running with istio active
if len(components.virtualServices) > 0 && ready {
cleaner := ResourceCleaner{instance: instance, client: r, virtualServices: components.virtualServices, logger: r.Log}
deleted, err := cleaner.cleanUnusedVirtualServices()
if err != nil {
Expand Down

0 comments on commit d21f34f

Please sign in to comment.