Skip to content

Commit

Permalink
fix params
Browse files Browse the repository at this point in the history
  • Loading branch information
rajatjindal committed Aug 21, 2022
1 parent f378a31 commit 825da70
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/k8s/evict.go
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
package k8s

import (
"context"
policy "k8s.io/api/policy/v1beta1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/client-go/kubernetes"
)

//Evict try to evicts a pod
func Evict(kubeclient kubernetes.Interface, podname, namespace string) error {
return kubeclient.PolicyV1beta1().Evictions(namespace).Evict(&policy.Eviction{
return kubeclient.PolicyV1beta1().Evictions(namespace).Evict(context.TODO(), &policy.Eviction{
ObjectMeta: metav1.ObjectMeta{
Name: podname,
Namespace: namespace,
Expand Down

0 comments on commit 825da70

Please sign in to comment.