Skip to content

Commit

Permalink
Merge pull request #64 from kubevirt-bot/cherry-pick-63-to-release-v1.1
Browse files Browse the repository at this point in the history
[release-v1.1] BUGFIX: Do not release pods in terminating namespaces.
  • Loading branch information
kubevirt-bot authored May 7, 2024
2 parents dc154e2 + be49b42 commit e5ada00
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 e5ada00

Please sign in to comment.