mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-03 09:22:44 +00:00
Merge pull request #120172 from DrAuYueng/fix-log-in-deployment-controller
Fix pod deletion log in deployment controller
This commit is contained in:
commit
1cadbd5887
@ -367,8 +367,12 @@ func (dc *DeploymentController) deletePod(logger klog.Logger, obj interface{}) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
d := dc.getDeploymentForPod(logger, pod)
|
||||||
|
if d == nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
logger.V(4).Info("Pod deleted", "pod", klog.KObj(pod))
|
logger.V(4).Info("Pod deleted", "pod", klog.KObj(pod))
|
||||||
if d := dc.getDeploymentForPod(logger, pod); d != nil && d.Spec.Strategy.Type == apps.RecreateDeploymentStrategyType {
|
if d.Spec.Strategy.Type == apps.RecreateDeploymentStrategyType {
|
||||||
// Sync if this Deployment now has no more Pods.
|
// Sync if this Deployment now has no more Pods.
|
||||||
rsList, err := util.ListReplicaSets(d, util.RsListFromClient(dc.client.AppsV1()))
|
rsList, err := util.ListReplicaSets(d, util.RsListFromClient(dc.client.AppsV1()))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user