mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-24 12:15:52 +00:00
apiserver: enable v1beta3 for apf
This commit is contained in:
parent
dfcd9d905f
commit
e1a764d635
@ -278,6 +278,7 @@ var apiVersionPriorities = map[schema.GroupVersion]priority{
|
||||
{Group: "node.k8s.io", Version: "v1beta1"}: {group: 16300, version: 9},
|
||||
{Group: "discovery.k8s.io", Version: "v1"}: {group: 16200, version: 15},
|
||||
{Group: "discovery.k8s.io", Version: "v1beta1"}: {group: 16200, version: 12},
|
||||
{Group: "flowcontrol.apiserver.k8s.io", Version: "v1beta3"}: {group: 16100, version: 18},
|
||||
{Group: "flowcontrol.apiserver.k8s.io", Version: "v1beta2"}: {group: 16100, version: 15},
|
||||
{Group: "flowcontrol.apiserver.k8s.io", Version: "v1beta1"}: {group: 16100, version: 12},
|
||||
{Group: "flowcontrol.apiserver.k8s.io", Version: "v1alpha1"}: {group: 16100, version: 9},
|
||||
|
@ -112,6 +112,7 @@ storage.k8s.io/v1alpha1 \
|
||||
flowcontrol.apiserver.k8s.io/v1alpha1 \
|
||||
flowcontrol.apiserver.k8s.io/v1beta1 \
|
||||
flowcontrol.apiserver.k8s.io/v1beta2 \
|
||||
flowcontrol.apiserver.k8s.io/v1beta3 \
|
||||
internal.apiserver.k8s.io/v1alpha1 \
|
||||
}"
|
||||
|
||||
|
@ -26,6 +26,7 @@ import (
|
||||
flowcontrolv1alpha1 "k8s.io/kubernetes/pkg/apis/flowcontrol/v1alpha1"
|
||||
flowcontrolv1beta1 "k8s.io/kubernetes/pkg/apis/flowcontrol/v1beta1"
|
||||
flowcontrolv1beta2 "k8s.io/kubernetes/pkg/apis/flowcontrol/v1beta2"
|
||||
flowcontrolv1beta3 "k8s.io/kubernetes/pkg/apis/flowcontrol/v1beta3"
|
||||
)
|
||||
|
||||
func init() {
|
||||
@ -38,5 +39,10 @@ func Install(scheme *runtime.Scheme) {
|
||||
utilruntime.Must(flowcontrolv1alpha1.AddToScheme(scheme))
|
||||
utilruntime.Must(flowcontrolv1beta1.AddToScheme(scheme))
|
||||
utilruntime.Must(flowcontrolv1beta2.AddToScheme(scheme))
|
||||
utilruntime.Must(scheme.SetVersionPriority(flowcontrolv1beta1.SchemeGroupVersion, flowcontrolv1beta2.SchemeGroupVersion, flowcontrolv1alpha1.SchemeGroupVersion))
|
||||
utilruntime.Must(flowcontrolv1beta3.AddToScheme(scheme))
|
||||
// TODO(#112512): This controls serialization order, for 1.26, we can
|
||||
// set the serialization version to v1beta2 because vN-1 understands that
|
||||
// level. In 1.27, we should set the serialization version to v1beta3.
|
||||
utilruntime.Must(scheme.SetVersionPriority(flowcontrolv1beta2.SchemeGroupVersion, flowcontrolv1beta3.SchemeGroupVersion,
|
||||
flowcontrolv1beta1.SchemeGroupVersion, flowcontrolv1alpha1.SchemeGroupVersion))
|
||||
}
|
||||
|
@ -76,6 +76,7 @@ import (
|
||||
api "k8s.io/kubernetes/pkg/apis/core"
|
||||
flowcontrolv1beta1 "k8s.io/kubernetes/pkg/apis/flowcontrol/v1beta1"
|
||||
flowcontrolv1beta2 "k8s.io/kubernetes/pkg/apis/flowcontrol/v1beta2"
|
||||
flowcontrolv1beta3 "k8s.io/kubernetes/pkg/apis/flowcontrol/v1beta3"
|
||||
"k8s.io/kubernetes/pkg/controlplane/controller/apiserverleasegc"
|
||||
"k8s.io/kubernetes/pkg/controlplane/controller/clusterauthenticationtrust"
|
||||
"k8s.io/kubernetes/pkg/controlplane/reconcilers"
|
||||
@ -637,6 +638,8 @@ var (
|
||||
flowcontrolv1beta1.SchemeGroupVersion.WithResource("prioritylevelconfigurations"), // remove in 1.26
|
||||
flowcontrolv1beta2.SchemeGroupVersion.WithResource("flowschemas"), // remove in 1.29
|
||||
flowcontrolv1beta2.SchemeGroupVersion.WithResource("prioritylevelconfigurations"), // remove in 1.29
|
||||
flowcontrolv1beta3.SchemeGroupVersion.WithResource("flowschemas"), // deprecate in 1.29, remove in 1.32
|
||||
flowcontrolv1beta3.SchemeGroupVersion.WithResource("prioritylevelconfigurations"), // deprecate in 1.29, remove in 1.32
|
||||
}
|
||||
// betaAPIGroupVersionsDisabledByDefault is for all future beta groupVersions.
|
||||
betaAPIGroupVersionsDisabledByDefault = []schema.GroupVersion{
|
||||
@ -650,6 +653,7 @@ var (
|
||||
storageapiv1beta1.SchemeGroupVersion,
|
||||
flowcontrolv1beta1.SchemeGroupVersion,
|
||||
flowcontrolv1beta2.SchemeGroupVersion,
|
||||
flowcontrolv1beta3.SchemeGroupVersion,
|
||||
}
|
||||
|
||||
// alphaAPIGroupVersionsDisabledByDefault holds the alpha APIs we have. They are always disabled by default.
|
||||
|
@ -83,8 +83,10 @@ var GVRToStorageVersionHash = map[string]string{
|
||||
"admissionregistration.k8s.io/v1/mutatingwebhookconfigurations": "Sqi0GUgDaX0=",
|
||||
"admissionregistration.k8s.io/v1/validatingwebhookconfigurations": "B0wHjQmsGNk=",
|
||||
"events.k8s.io/v1/events": "r2yiGXH7wu8=",
|
||||
"flowcontrol.apiserver.k8s.io/v1beta2/flowschemas": "9bSnTLYweJ0=",
|
||||
"flowcontrol.apiserver.k8s.io/v1beta2/prioritylevelconfigurations": "BFVwf8eYnsw=",
|
||||
"flowcontrol.apiserver.k8s.io/v1beta1/flowschemas": "9bSnTLYweJ0=",
|
||||
"flowcontrol.apiserver.k8s.io/v1beta1/prioritylevelconfigurations": "BFVwf8eYnsw=",
|
||||
"flowcontrol.apiserver.k8s.io/v1beta3/flowschemas": "G+8IkrqFuJw=",
|
||||
"flowcontrol.apiserver.k8s.io/v1beta3/prioritylevelconfigurations": "wltM4WMeeXs=",
|
||||
"flowcontrol.apiserver.k8s.io/v1beta2/flowschemas": "G+8IkrqFuJw=",
|
||||
"flowcontrol.apiserver.k8s.io/v1beta2/prioritylevelconfigurations": "wltM4WMeeXs=",
|
||||
"flowcontrol.apiserver.k8s.io/v1beta1/flowschemas": "G+8IkrqFuJw=",
|
||||
"flowcontrol.apiserver.k8s.io/v1beta1/prioritylevelconfigurations": "wltM4WMeeXs=",
|
||||
}
|
||||
|
@ -36,7 +36,7 @@ import (
|
||||
apiv1 "k8s.io/api/core/v1"
|
||||
discoveryv1beta1 "k8s.io/api/discovery/v1beta1"
|
||||
extensionsv1beta1 "k8s.io/api/extensions/v1beta1"
|
||||
flowcontrolv1beta2 "k8s.io/api/flowcontrol/v1beta2"
|
||||
flowcontrolv1beta3 "k8s.io/api/flowcontrol/v1beta3"
|
||||
networkingv1alpha1 "k8s.io/api/networking/v1alpha1"
|
||||
policyv1beta1 "k8s.io/api/policy/v1beta1"
|
||||
rbacv1beta1 "k8s.io/api/rbac/v1beta1"
|
||||
@ -555,9 +555,9 @@ func AddHandlers(h printers.PrintHandler) {
|
||||
|
||||
flowSchemaColumnDefinitions := []metav1.TableColumnDefinition{
|
||||
{Name: "Name", Type: "string", Format: "name", Description: metav1.ObjectMeta{}.SwaggerDoc()["name"]},
|
||||
{Name: "PriorityLevel", Type: "string", Description: flowcontrolv1beta2.PriorityLevelConfigurationReference{}.SwaggerDoc()["name"]},
|
||||
{Name: "MatchingPrecedence", Type: "string", Description: flowcontrolv1beta2.FlowSchemaSpec{}.SwaggerDoc()["matchingPrecedence"]},
|
||||
{Name: "DistinguisherMethod", Type: "string", Description: flowcontrolv1beta2.FlowSchemaSpec{}.SwaggerDoc()["distinguisherMethod"]},
|
||||
{Name: "PriorityLevel", Type: "string", Description: flowcontrolv1beta3.PriorityLevelConfigurationReference{}.SwaggerDoc()["name"]},
|
||||
{Name: "MatchingPrecedence", Type: "string", Description: flowcontrolv1beta3.FlowSchemaSpec{}.SwaggerDoc()["matchingPrecedence"]},
|
||||
{Name: "DistinguisherMethod", Type: "string", Description: flowcontrolv1beta3.FlowSchemaSpec{}.SwaggerDoc()["distinguisherMethod"]},
|
||||
{Name: "Age", Type: "string", Description: metav1.ObjectMeta{}.SwaggerDoc()["creationTimestamp"]},
|
||||
{Name: "MissingPL", Type: "string", Description: "references a broken or non-existent PriorityLevelConfiguration"},
|
||||
}
|
||||
@ -566,11 +566,11 @@ func AddHandlers(h printers.PrintHandler) {
|
||||
|
||||
priorityLevelColumnDefinitions := []metav1.TableColumnDefinition{
|
||||
{Name: "Name", Type: "string", Format: "name", Description: metav1.ObjectMeta{}.SwaggerDoc()["name"]},
|
||||
{Name: "Type", Type: "string", Description: flowcontrolv1beta2.PriorityLevelConfigurationSpec{}.SwaggerDoc()["type"]},
|
||||
{Name: "AssuredConcurrencyShares", Type: "string", Description: flowcontrolv1beta2.LimitedPriorityLevelConfiguration{}.SwaggerDoc()["assuredConcurrencyShares"]},
|
||||
{Name: "Queues", Type: "string", Description: flowcontrolv1beta2.QueuingConfiguration{}.SwaggerDoc()["queues"]},
|
||||
{Name: "HandSize", Type: "string", Description: flowcontrolv1beta2.QueuingConfiguration{}.SwaggerDoc()["handSize"]},
|
||||
{Name: "QueueLengthLimit", Type: "string", Description: flowcontrolv1beta2.QueuingConfiguration{}.SwaggerDoc()["queueLengthLimit"]},
|
||||
{Name: "Type", Type: "string", Description: flowcontrolv1beta3.PriorityLevelConfigurationSpec{}.SwaggerDoc()["type"]},
|
||||
{Name: "AssuredConcurrencyShares", Type: "string", Description: flowcontrolv1beta3.LimitedPriorityLevelConfiguration{}.SwaggerDoc()["assuredConcurrencyShares"]},
|
||||
{Name: "Queues", Type: "string", Description: flowcontrolv1beta3.QueuingConfiguration{}.SwaggerDoc()["queues"]},
|
||||
{Name: "HandSize", Type: "string", Description: flowcontrolv1beta3.QueuingConfiguration{}.SwaggerDoc()["handSize"]},
|
||||
{Name: "QueueLengthLimit", Type: "string", Description: flowcontrolv1beta3.QueuingConfiguration{}.SwaggerDoc()["queueLengthLimit"]},
|
||||
{Name: "Age", Type: "string", Description: metav1.ObjectMeta{}.SwaggerDoc()["creationTimestamp"]},
|
||||
}
|
||||
h.TableHandler(priorityLevelColumnDefinitions, printPriorityLevelConfiguration)
|
||||
|
@ -56,6 +56,9 @@ func (flowSchemaStrategy) GetResetFields() map[fieldpath.APIVersion]*fieldpath.S
|
||||
"flowcontrol.apiserver.k8s.io/v1beta2": fieldpath.NewSet(
|
||||
fieldpath.MakePathOrDie("status"),
|
||||
),
|
||||
"flowcontrol.apiserver.k8s.io/v1beta3": fieldpath.NewSet(
|
||||
fieldpath.MakePathOrDie("status"),
|
||||
),
|
||||
}
|
||||
|
||||
return fields
|
||||
@ -136,6 +139,10 @@ func (flowSchemaStatusStrategy) GetResetFields() map[fieldpath.APIVersion]*field
|
||||
fieldpath.MakePathOrDie("metadata"),
|
||||
fieldpath.MakePathOrDie("spec"),
|
||||
),
|
||||
"flowcontrol.apiserver.k8s.io/v1beta3": fieldpath.NewSet(
|
||||
fieldpath.MakePathOrDie("metadata"),
|
||||
fieldpath.MakePathOrDie("spec"),
|
||||
),
|
||||
}
|
||||
|
||||
return fields
|
||||
|
@ -56,6 +56,9 @@ func (priorityLevelConfigurationStrategy) GetResetFields() map[fieldpath.APIVers
|
||||
"flowcontrol.apiserver.k8s.io/v1beta2": fieldpath.NewSet(
|
||||
fieldpath.MakePathOrDie("status"),
|
||||
),
|
||||
"flowcontrol.apiserver.k8s.io/v1beta3": fieldpath.NewSet(
|
||||
fieldpath.MakePathOrDie("status"),
|
||||
),
|
||||
}
|
||||
|
||||
return fields
|
||||
@ -136,6 +139,10 @@ func (priorityLevelConfigurationStatusStrategy) GetResetFields() map[fieldpath.A
|
||||
fieldpath.MakePathOrDie("spec"),
|
||||
fieldpath.MakePathOrDie("metadata"),
|
||||
),
|
||||
"flowcontrol.apiserver.k8s.io/v1beta3": fieldpath.NewSet(
|
||||
fieldpath.MakePathOrDie("spec"),
|
||||
fieldpath.MakePathOrDie("metadata"),
|
||||
),
|
||||
}
|
||||
|
||||
return fields
|
||||
|
@ -38,6 +38,7 @@ import (
|
||||
flowcontrolapisv1alpha1 "k8s.io/kubernetes/pkg/apis/flowcontrol/v1alpha1"
|
||||
flowcontrolapisv1beta1 "k8s.io/kubernetes/pkg/apis/flowcontrol/v1beta1"
|
||||
flowcontrolapisv1beta2 "k8s.io/kubernetes/pkg/apis/flowcontrol/v1beta2"
|
||||
flowcontrolapisv1beta3 "k8s.io/kubernetes/pkg/apis/flowcontrol/v1beta3"
|
||||
"k8s.io/kubernetes/pkg/registry/flowcontrol/ensurer"
|
||||
flowschemastore "k8s.io/kubernetes/pkg/registry/flowcontrol/flowschema/storage"
|
||||
prioritylevelconfigurationstore "k8s.io/kubernetes/pkg/registry/flowcontrol/prioritylevelconfiguration/storage"
|
||||
@ -75,6 +76,12 @@ func (p RESTStorageProvider) NewRESTStorage(apiResourceConfigSource serverstorag
|
||||
apiGroupInfo.VersionedResourcesStorageMap[flowcontrolapisv1beta2.SchemeGroupVersion.Version] = storageMap
|
||||
}
|
||||
|
||||
if storageMap, err := p.storage(apiResourceConfigSource, restOptionsGetter, flowcontrolapisv1beta3.SchemeGroupVersion); err != nil {
|
||||
return genericapiserver.APIGroupInfo{}, err
|
||||
} else if len(storageMap) > 0 {
|
||||
apiGroupInfo.VersionedResourcesStorageMap[flowcontrolapisv1beta3.SchemeGroupVersion.Version] = storageMap
|
||||
}
|
||||
|
||||
return apiGroupInfo, nil
|
||||
}
|
||||
|
||||
|
@ -104,7 +104,7 @@ const (
|
||||
// +genclient
|
||||
// +genclient:nonNamespaced
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
// +k8s:prerelease-lifecycle-gen:introduced=1.23
|
||||
// +k8s:prerelease-lifecycle-gen:introduced=1.26
|
||||
|
||||
// FlowSchema defines the schema of a group of flows. Note that a flow is made up of a set of inbound API requests with
|
||||
// similar attributes and is identified by a pair of strings: the name of the FlowSchema and a "flow distinguisher".
|
||||
@ -125,7 +125,7 @@ type FlowSchema struct {
|
||||
}
|
||||
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
// +k8s:prerelease-lifecycle-gen:introduced=1.23
|
||||
// +k8s:prerelease-lifecycle-gen:introduced=1.26
|
||||
|
||||
// FlowSchemaList is a list of FlowSchema objects.
|
||||
type FlowSchemaList struct {
|
||||
@ -379,7 +379,7 @@ type FlowSchemaConditionType string
|
||||
// +genclient
|
||||
// +genclient:nonNamespaced
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
// +k8s:prerelease-lifecycle-gen:introduced=1.23
|
||||
// +k8s:prerelease-lifecycle-gen:introduced=1.26
|
||||
|
||||
// PriorityLevelConfiguration represents the configuration of a priority level.
|
||||
type PriorityLevelConfiguration struct {
|
||||
@ -399,7 +399,7 @@ type PriorityLevelConfiguration struct {
|
||||
}
|
||||
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
// +k8s:prerelease-lifecycle-gen:introduced=1.23
|
||||
// +k8s:prerelease-lifecycle-gen:introduced=1.26
|
||||
|
||||
// PriorityLevelConfigurationList is a list of PriorityLevelConfiguration objects.
|
||||
type PriorityLevelConfigurationList struct {
|
||||
|
@ -126,9 +126,11 @@ var resetFieldsSpecData = map[schema.GroupVersionResource]string{
|
||||
gvr("flowcontrol.apiserver.k8s.io", "v1alpha1", "flowschemas"): `{"metadata": {"labels":{"a":"c"}}, "spec": {"priorityLevelConfiguration": {"name": "name2"}}}`,
|
||||
gvr("flowcontrol.apiserver.k8s.io", "v1beta1", "flowschemas"): `{"metadata": {"labels":{"a":"c"}}, "spec": {"priorityLevelConfiguration": {"name": "name2"}}}`,
|
||||
gvr("flowcontrol.apiserver.k8s.io", "v1beta2", "flowschemas"): `{"metadata": {"labels":{"a":"c"}}, "spec": {"priorityLevelConfiguration": {"name": "name2"}}}`,
|
||||
gvr("flowcontrol.apiserver.k8s.io", "v1beta3", "flowschemas"): `{"metadata": {"labels":{"a":"c"}}, "spec": {"priorityLevelConfiguration": {"name": "name2"}}}`,
|
||||
gvr("flowcontrol.apiserver.k8s.io", "v1alpha1", "prioritylevelconfigurations"): `{"metadata": {"labels":{"a":"c"}}, "spec": {"limited": {"assuredConcurrencyShares": 23}}}`,
|
||||
gvr("flowcontrol.apiserver.k8s.io", "v1beta1", "prioritylevelconfigurations"): `{"metadata": {"labels":{"a":"c"}}, "spec": {"limited": {"assuredConcurrencyShares": 23}}}`,
|
||||
gvr("flowcontrol.apiserver.k8s.io", "v1beta2", "prioritylevelconfigurations"): `{"metadata": {"labels":{"a":"c"}}, "spec": {"limited": {"assuredConcurrencyShares": 23}}}`,
|
||||
gvr("flowcontrol.apiserver.k8s.io", "v1beta3", "prioritylevelconfigurations"): `{"metadata": {"labels":{"a":"c"}}, "spec": {"limited": {"assuredConcurrencyShares": 23}}}`,
|
||||
gvr("extensions", "v1beta1", "ingresses"): `{"spec": {"backend": {"serviceName": "service2"}}}`,
|
||||
gvr("networking.k8s.io", "v1beta1", "ingresses"): `{"spec": {"backend": {"serviceName": "service2"}}}`,
|
||||
gvr("networking.k8s.io", "v1", "ingresses"): `{"spec": {"defaultBackend": {"service": {"name": "service2"}}}}`,
|
||||
|
@ -136,6 +136,7 @@ func TestServerSidePrint(t *testing.T) {
|
||||
{Group: "flowcontrol.apiserver.k8s.io", Version: "v1alpha1"},
|
||||
{Group: "flowcontrol.apiserver.k8s.io", Version: "v1beta1"},
|
||||
{Group: "flowcontrol.apiserver.k8s.io", Version: "v1beta2"},
|
||||
{Group: "flowcontrol.apiserver.k8s.io", Version: "v1beta3"},
|
||||
{Group: "internal.apiserver.k8s.io", Version: "v1alpha1"},
|
||||
},
|
||||
[]schema.GroupVersionResource{},
|
||||
|
@ -272,7 +272,7 @@ 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"),
|
||||
ExpectedGVK: gvkP("flowcontrol.apiserver.k8s.io", "v1beta2", "FlowSchema"),
|
||||
},
|
||||
// --
|
||||
|
||||
@ -280,7 +280,7 @@ func GetEtcdStorageDataForNamespace(namespace string) map[schema.GroupVersionRes
|
||||
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"),
|
||||
ExpectedGVK: gvkP("flowcontrol.apiserver.k8s.io", "v1beta2", "PriorityLevelConfiguration"),
|
||||
},
|
||||
// --
|
||||
|
||||
@ -288,6 +288,7 @@ func GetEtcdStorageDataForNamespace(namespace string) map[schema.GroupVersionRes
|
||||
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", "v1beta2", "FlowSchema"),
|
||||
},
|
||||
// --
|
||||
|
||||
@ -295,6 +296,7 @@ func GetEtcdStorageDataForNamespace(namespace string) map[schema.GroupVersionRes
|
||||
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", "v1beta2", "PriorityLevelConfiguration"),
|
||||
},
|
||||
// --
|
||||
|
||||
@ -302,7 +304,6 @@ func GetEtcdStorageDataForNamespace(namespace string) map[schema.GroupVersionRes
|
||||
gvr("flowcontrol.apiserver.k8s.io", "v1beta2", "flowschemas"): {
|
||||
Stub: `{"metadata": {"name": "fs-1"}, "spec": {"priorityLevelConfiguration": {"name": "name1"}}}`,
|
||||
ExpectedEtcdPath: "/registry/flowschemas/fs-1",
|
||||
ExpectedGVK: gvkP("flowcontrol.apiserver.k8s.io", "v1beta1", "FlowSchema"),
|
||||
},
|
||||
// --
|
||||
|
||||
@ -310,7 +311,22 @@ func GetEtcdStorageDataForNamespace(namespace string) map[schema.GroupVersionRes
|
||||
gvr("flowcontrol.apiserver.k8s.io", "v1beta2", "prioritylevelconfigurations"): {
|
||||
Stub: `{"metadata": {"name": "conf3"}, "spec": {"type": "Limited", "limited": {"assuredConcurrencyShares":3, "limitResponse": {"type": "Reject"}}}}`,
|
||||
ExpectedEtcdPath: "/registry/prioritylevelconfigurations/conf3",
|
||||
ExpectedGVK: gvkP("flowcontrol.apiserver.k8s.io", "v1beta1", "PriorityLevelConfiguration"),
|
||||
},
|
||||
// --
|
||||
|
||||
// k8s.io/kubernetes/pkg/apis/flowcontrol/v1beta3
|
||||
gvr("flowcontrol.apiserver.k8s.io", "v1beta3", "flowschemas"): {
|
||||
Stub: `{"metadata": {"name": "fs-2"}, "spec": {"priorityLevelConfiguration": {"name": "name1"}}}`,
|
||||
ExpectedEtcdPath: "/registry/flowschemas/fs-2",
|
||||
ExpectedGVK: gvkP("flowcontrol.apiserver.k8s.io", "v1beta2", "FlowSchema"),
|
||||
},
|
||||
// --
|
||||
|
||||
// k8s.io/kubernetes/pkg/apis/flowcontrol/v1beta3
|
||||
gvr("flowcontrol.apiserver.k8s.io", "v1beta3", "prioritylevelconfigurations"): {
|
||||
Stub: `{"metadata": {"name": "conf4"}, "spec": {"type": "Limited", "limited": {"assuredConcurrencyShares":3, "limitResponse": {"type": "Reject"}}}}`,
|
||||
ExpectedEtcdPath: "/registry/prioritylevelconfigurations/conf4",
|
||||
ExpectedGVK: gvkP("flowcontrol.apiserver.k8s.io", "v1beta2", "PriorityLevelConfiguration"),
|
||||
},
|
||||
// --
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user