Skip to content

Commit

Permalink
UPSTREAM: <carry>: kube-apiserver: switch flowcontrol storage to alpha
Browse files Browse the repository at this point in the history
  • Loading branch information
sttts authored and soltysh committed Sep 8, 2021
1 parent a3dd306 commit c127831
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions pkg/kubeapiserver/default_storage_factory_builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ import (
api "k8s.io/kubernetes/pkg/apis/core"
"k8s.io/kubernetes/pkg/apis/events"
"k8s.io/kubernetes/pkg/apis/extensions"
"k8s.io/kubernetes/pkg/apis/flowcontrol"
"k8s.io/kubernetes/pkg/apis/networking"
"k8s.io/kubernetes/pkg/apis/policy"
apisstorage "k8s.io/kubernetes/pkg/apis/storage"
Expand Down Expand Up @@ -67,6 +68,8 @@ func NewStorageFactoryConfig() *StorageFactoryConfig {
networking.Resource("ingressclasses").WithVersion("v1beta1"),
apisstorage.Resource("csidrivers").WithVersion("v1beta1"),
apisstorage.Resource("csistoragecapacities").WithVersion("v1alpha1"),
flowcontrol.Resource("flowschemas").WithVersion("v1alpha1"),
flowcontrol.Resource("prioritylevelconfigurations").WithVersion("v1alpha1"),
}

return &StorageFactoryConfig{
Expand Down
4 changes: 2 additions & 2 deletions test/integration/etcd/data.go
Original file line number Diff line number Diff line change
Expand Up @@ -283,29 +283,29 @@ func GetEtcdStorageDataForNamespace(namespace string) map[schema.GroupVersionRes
gvr("flowcontrol.apiserver.k8s.io", "v1alpha1", "flowschemas"): {
Stub: `{"metadata": {"name": "va1"}, "spec": {"priorityLevelConfiguration": {"name": "name1"}}}`,
ExpectedEtcdPath: "/registry/flowschemas/va1",
ExpectedGVK: gvkP("flowcontrol.apiserver.k8s.io", "v1beta1", "FlowSchema"),
},
// --

// k8s.io/kubernetes/pkg/apis/flowcontrol/v1alpha1
gvr("flowcontrol.apiserver.k8s.io", "v1alpha1", "prioritylevelconfigurations"): {
Stub: `{"metadata": {"name": "conf1"}, "spec": {"type": "Limited", "limited": {"assuredConcurrencyShares":3, "limitResponse": {"type": "Reject"}}}}`,
ExpectedEtcdPath: "/registry/prioritylevelconfigurations/conf1",
ExpectedGVK: gvkP("flowcontrol.apiserver.k8s.io", "v1beta1", "PriorityLevelConfiguration"),
},
// --

// k8s.io/kubernetes/pkg/apis/flowcontrol/v1beta1
gvr("flowcontrol.apiserver.k8s.io", "v1beta1", "flowschemas"): {
Stub: `{"metadata": {"name": "va2"}, "spec": {"priorityLevelConfiguration": {"name": "name1"}}}`,
ExpectedEtcdPath: "/registry/flowschemas/va2",
ExpectedGVK: gvkP("flowcontrol.apiserver.k8s.io", "v1alpha1", "FlowSchema"),
},
// --

// k8s.io/kubernetes/pkg/apis/flowcontrol/v1beta1
gvr("flowcontrol.apiserver.k8s.io", "v1beta1", "prioritylevelconfigurations"): {
Stub: `{"metadata": {"name": "conf2"}, "spec": {"type": "Limited", "limited": {"assuredConcurrencyShares":3, "limitResponse": {"type": "Reject"}}}}`,
ExpectedEtcdPath: "/registry/prioritylevelconfigurations/conf2",
ExpectedGVK: gvkP("flowcontrol.apiserver.k8s.io", "v1alpha1", "PriorityLevelConfiguration"),
},
// --

Expand Down

0 comments on commit c127831

Please sign in to comment.