Merge pull request #16619 from sp98/mon-canary-deletion

mon: wait for the canary pods to be terminated
This commit is contained in:
Travis Nielsen authored and GitHub committed 2025-10-23 10:38:19 -06:00
commit e8e013d88b
1 file changed
+2 -5
+2 -5
View File
@@ -893,13 +893,10 @@ func (c *Cluster) removeCanaryDeployments(labelSelector string) {
return
}
// Delete the canary mons, but don't wait for them to exit
// Delete the canary mons
for _, canary := range canaryDeployments.Items {
logger.Infof("cleaning up canary monitor deployment %q", canary.Name)
var gracePeriod int64
propagation := metav1.DeletePropagationForeground
options := &metav1.DeleteOptions{GracePeriodSeconds: &gracePeriod, PropagationPolicy: &propagation}
if err := c.context.Clientset.AppsV1().Deployments(c.Namespace).Delete(c.ClusterInfo.Context, canary.Name, *options); err != nil {
if err := k8sutil.DeleteDeployment(c.ClusterInfo.Context, c.context.Clientset, c.Namespace, canary.Name); err != nil {
logger.Warningf("failed to delete canary monitor deployment %q. %v", canary.Name, err)
}
}