forked from LaconicNetwork/kompose
Use BuildConfig reaper to delete BuildConfig with all related pods
This commit is contained in:
parent
792976da1f
commit
bee784faf6
@ -42,6 +42,7 @@ import (
|
||||
|
||||
"github.com/kubernetes-incubator/kompose/pkg/transformer"
|
||||
buildapi "github.com/openshift/origin/pkg/build/api"
|
||||
buildconfigreaper "github.com/openshift/origin/pkg/build/cmd"
|
||||
deployapi "github.com/openshift/origin/pkg/deploy/api"
|
||||
deploymentconfigreaper "github.com/openshift/origin/pkg/deploy/cmd"
|
||||
imageapi "github.com/openshift/origin/pkg/image/api"
|
||||
@ -593,7 +594,8 @@ func (o *OpenShift) Undeploy(komposeObject kobject.KomposeObject, opt kobject.Co
|
||||
}
|
||||
for _, l := range buildConfig.Items {
|
||||
if reflect.DeepEqual(l.Labels, komposeLabel) {
|
||||
err := oclient.BuildConfigs(namespace).Delete(t.Name)
|
||||
bcreaper := buildconfigreaper.NewBuildConfigReaper(oclient)
|
||||
err := bcreaper.Stop(namespace, t.Name, TIMEOUT*time.Second, nil)
|
||||
if err != nil {
|
||||
errorList = append(errorList, err)
|
||||
break
|
||||
|
||||
Loading…
Reference in New Issue
Block a user