@@ -14,7 +14,6 @@ import (
1414 "github.com/scylladb/scylla-operator/pkg/resourceapply"
1515 appsv1 "k8s.io/api/apps/v1"
1616 corev1 "k8s.io/api/core/v1"
17- policyv1beta1 "k8s.io/api/policy/v1beta1"
1817 apierrors "k8s.io/apimachinery/pkg/api/errors"
1918 metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
2019 utilerrors "k8s.io/apimachinery/pkg/util/errors"
@@ -244,18 +243,15 @@ func (scc *Controller) syncServices(
244243 Name : svc .Name ,
245244 },
246245 }
247- klog .V (2 ).InfoS ("Evicting the Pod to replace member" ,
246+ klog .V (2 ).InfoS ("Deleting the Pod to replace member" ,
248247 "ScyllaCluster" , klog .KObj (sc ),
249248 "Service" , klog .KObj (svc ),
250249 "Pod" , klog .KObj (podMeta ),
251250 )
252- err = scc .kubeClient .CoreV1 ().Pods (podMeta .Namespace ).Evict (ctx , & policyv1beta1.Eviction {
253- ObjectMeta : metav1.ObjectMeta {
254- Name : podMeta .Name ,
255- },
256- DeleteOptions : & metav1.DeleteOptions {
257- PropagationPolicy : & backgroundPropagationPolicy ,
258- },
251+ // TODO: Revert back to eviction when it's fixed in kubernetes 1.19.z (#732)
252+ // (https://github.com/kubernetes/kubernetes/issues/103970)
253+ err = scc .kubeClient .CoreV1 ().Pods (podMeta .Namespace ).Delete (ctx , podMeta .Name , metav1.DeleteOptions {
254+ PropagationPolicy : & backgroundPropagationPolicy ,
259255 })
260256 if err != nil {
261257 if apierrors .IsNotFound (err ) {
0 commit comments