Skip to content

Commit

Permalink
Merge pull request #65 from kubevirt-bot/cherry-pick-63-to-release-v1.2
Browse files Browse the repository at this point in the history
[release-v1.2] BUGFIX: Do not release pods in terminating namespaces.
  • Loading branch information
kubevirt-bot authored May 7, 2024
2 parents 2391e1b + 839ef01 commit ed6497d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pkg/aaq-controller/aaq-gate-controller/aaq-gate-controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -260,10 +260,11 @@ func (ctrl *AaqGateController) Execute() bool {
}

func (ctrl *AaqGateController) execute(ns string) (error, enqueueState) {
_, err := ctrl.namespaceLister.Get(ns)
if kapierrors.IsNotFound(err) {
namespace, err := ctrl.namespaceLister.Get(ns)
if kapierrors.IsNotFound(err) || namespace.Status.Phase == v1.NamespaceTerminating {
return nil, Forget
}

aaqjqc, err := ctrl.createAndGetAaqjqc(ns)
if err != nil {
return err, Immediate
Expand Down

0 comments on commit ed6497d

Please sign in to comment.