Skip to content

Commit

Permalink
fix delete ns if create hnc ns (#368)
Browse files Browse the repository at this point in the history
* fix delete ns if create hnc ns
* update v1.9.2 changelog
  • Loading branch information
weilaaa committed Jan 30, 2024
1 parent a536339 commit bad4bdc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions docs/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
- add final sort for filter chain [#366](https://github.com/kubecube-io/KubeCube/pull/366)
- fix user name as label over length [#365](https://github.com/kubecube-io/KubeCube/pull/365)
- Fix add member [#364](https://github.com/kubecube-io/KubeCube/pull/364)
- fix delete ns if create hnc ns [#368](https://github.com/kubecube-io/KubeCube/pull/368)

## Dependencies

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,8 @@ func (r *ProjectReconciler) deleteProject(projectName string) (ctrl.Result, erro
}

func (r *ProjectReconciler) deleteSubNSOfProject(projectName string) error {
lbSelector, err := labels.Parse(fmt.Sprintf("%v%v.tree.hnc.x-k8s.io/depth=1", constants.ProjectNsPrefix, projectName))
// this label will list sub ns under project both spawned ns of project
lbSelector, err := labels.Parse(fmt.Sprintf("%v=%v", constants.HncProjectLabel, projectName))
if err != nil {
return err
}
Expand Down

0 comments on commit bad4bdc

Please sign in to comment.