mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-03 10:17:46 +00:00
allow evictions subresource to accept policy/v1 and policy/v1beta1
This commit is contained in:
@@ -26,7 +26,7 @@ import (
|
||||
|
||||
coordination "k8s.io/api/coordination/v1"
|
||||
corev1 "k8s.io/api/core/v1"
|
||||
policy "k8s.io/api/policy/v1beta1"
|
||||
policy "k8s.io/api/policy/v1"
|
||||
storagev1 "k8s.io/api/storage/v1"
|
||||
apierrors "k8s.io/apimachinery/pkg/api/errors"
|
||||
"k8s.io/apimachinery/pkg/api/resource"
|
||||
@@ -305,9 +305,9 @@ func TestNodeAuthorizer(t *testing.T) {
|
||||
createNode2NormalPodEviction := func(client clientset.Interface) func() error {
|
||||
return func() error {
|
||||
zero := int64(0)
|
||||
return client.PolicyV1beta1().Evictions("ns").Evict(context.TODO(), &policy.Eviction{
|
||||
return client.PolicyV1().Evictions("ns").Evict(context.TODO(), &policy.Eviction{
|
||||
TypeMeta: metav1.TypeMeta{
|
||||
APIVersion: "policy/v1beta1",
|
||||
APIVersion: "policy/v1",
|
||||
Kind: "Eviction",
|
||||
},
|
||||
ObjectMeta: metav1.ObjectMeta{
|
||||
@@ -321,9 +321,9 @@ func TestNodeAuthorizer(t *testing.T) {
|
||||
createNode2MirrorPodEviction := func(client clientset.Interface) func() error {
|
||||
return func() error {
|
||||
zero := int64(0)
|
||||
return client.PolicyV1beta1().Evictions("ns").Evict(context.TODO(), &policy.Eviction{
|
||||
return client.PolicyV1().Evictions("ns").Evict(context.TODO(), &policy.Eviction{
|
||||
TypeMeta: metav1.TypeMeta{
|
||||
APIVersion: "policy/v1beta1",
|
||||
APIVersion: "policy/v1",
|
||||
Kind: "Eviction",
|
||||
},
|
||||
ObjectMeta: metav1.ObjectMeta{
|
||||
|
Reference in New Issue
Block a user