mirror of
https://github.com/kyverno/kyverno.git
synced 2025-03-30 19:35:06 +00:00
fix: detection of kyverno going down (#5055)
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com> Co-authored-by: Vyankatesh Kudtarkar <vyankateshkd@gmail.com>
This commit is contained in:
parent
749c1bab3b
commit
eac23af077
1 changed files with 3 additions and 0 deletions
|
@ -94,6 +94,9 @@ func (c *runtime) IsGoingDown() bool {
|
|||
if err != nil {
|
||||
return apierrors.IsNotFound(err)
|
||||
}
|
||||
if deployment.GetDeletionTimestamp() != nil {
|
||||
return true
|
||||
}
|
||||
if deployment.Spec.Replicas != nil {
|
||||
return *deployment.Spec.Replicas == 0
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue