未验证 提交 8f40bb2d 编写于 作者: S shaowenchen

fix delete devops failed

上级 9b656196
......@@ -293,7 +293,6 @@ func (c *Controller) syncHandler(key string) error {
} else {
// Finalizers processing logic
if sliceutil.HasString(project.ObjectMeta.Finalizers, devopsv1alpha3.DevOpsProjectFinalizerName) {
_, err := c.devopsClient.GetDevOpsProject(key)
if err := c.deleteDevOpsProjectInDevOps(project); err != nil {
klog.Error(err, fmt.Sprintf("failed to delete resource %s in devops", key))
return err
......@@ -315,7 +314,7 @@ func (c *Controller) syncHandler(key string) error {
func (c *Controller) deleteDevOpsProjectInDevOps(project *devopsv1alpha3.DevOpsProject) error {
err := c.devopsClient.DeleteDevOpsProject(project.Name)
err := c.devopsClient.DeleteDevOpsProject(project.Status.AdminNamespace)
if err != nil {
klog.Errorf("error happened while deleting %s, %v", project.Name, err)
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册