mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-06-14 02:43:36 +00:00
vendor update for CSI 0.3.0
This commit is contained in:
1
vendor/k8s.io/kubernetes/pkg/registry/scheduling/priorityclass/BUILD
generated
vendored
1
vendor/k8s.io/kubernetes/pkg/registry/scheduling/priorityclass/BUILD
generated
vendored
@ -34,7 +34,6 @@ go_library(
|
||||
"//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/util/validation/field:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/watch:go_default_library",
|
||||
"//vendor/k8s.io/apiserver/pkg/endpoints/request:go_default_library",
|
||||
"//vendor/k8s.io/apiserver/pkg/registry/rest:go_default_library",
|
||||
"//vendor/k8s.io/apiserver/pkg/storage/names:go_default_library",
|
||||
],
|
||||
|
27
vendor/k8s.io/kubernetes/pkg/registry/scheduling/priorityclass/registry.go
generated
vendored
27
vendor/k8s.io/kubernetes/pkg/registry/scheduling/priorityclass/registry.go
generated
vendored
@ -17,22 +17,23 @@ limitations under the License.
|
||||
package priorityclass
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
metainternalversion "k8s.io/apimachinery/pkg/apis/meta/internalversion"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"k8s.io/apimachinery/pkg/watch"
|
||||
genericapirequest "k8s.io/apiserver/pkg/endpoints/request"
|
||||
"k8s.io/apiserver/pkg/registry/rest"
|
||||
"k8s.io/kubernetes/pkg/apis/scheduling"
|
||||
)
|
||||
|
||||
// Registry is an interface for things that know how to store PriorityClass.
|
||||
type Registry interface {
|
||||
ListPriorityClasses(ctx genericapirequest.Context, options *metainternalversion.ListOptions) (*scheduling.PriorityClassList, error)
|
||||
CreatePriorityClass(ctx genericapirequest.Context, pc *scheduling.PriorityClass, createValidation rest.ValidateObjectFunc) error
|
||||
UpdatePriorityClass(ctx genericapirequest.Context, pc *scheduling.PriorityClass, createValidation rest.ValidateObjectFunc, updateValidation rest.ValidateObjectUpdateFunc) error
|
||||
GetPriorityClass(ctx genericapirequest.Context, name string, options *metav1.GetOptions) (*scheduling.PriorityClass, error)
|
||||
DeletePriorityClass(ctx genericapirequest.Context, name string) error
|
||||
WatchPriorityClasses(ctx genericapirequest.Context, options *metainternalversion.ListOptions) (watch.Interface, error)
|
||||
ListPriorityClasses(ctx context.Context, options *metainternalversion.ListOptions) (*scheduling.PriorityClassList, error)
|
||||
CreatePriorityClass(ctx context.Context, pc *scheduling.PriorityClass, createValidation rest.ValidateObjectFunc) error
|
||||
UpdatePriorityClass(ctx context.Context, pc *scheduling.PriorityClass, createValidation rest.ValidateObjectFunc, updateValidation rest.ValidateObjectUpdateFunc) error
|
||||
GetPriorityClass(ctx context.Context, name string, options *metav1.GetOptions) (*scheduling.PriorityClass, error)
|
||||
DeletePriorityClass(ctx context.Context, name string) error
|
||||
WatchPriorityClasses(ctx context.Context, options *metainternalversion.ListOptions) (watch.Interface, error)
|
||||
}
|
||||
|
||||
// storage puts strong typing around storage calls
|
||||
@ -46,7 +47,7 @@ func NewRegistry(s rest.StandardStorage) Registry {
|
||||
return &storage{s}
|
||||
}
|
||||
|
||||
func (s *storage) ListPriorityClasses(ctx genericapirequest.Context, options *metainternalversion.ListOptions) (*scheduling.PriorityClassList, error) {
|
||||
func (s *storage) ListPriorityClasses(ctx context.Context, options *metainternalversion.ListOptions) (*scheduling.PriorityClassList, error) {
|
||||
obj, err := s.List(ctx, options)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@ -55,21 +56,21 @@ func (s *storage) ListPriorityClasses(ctx genericapirequest.Context, options *me
|
||||
return obj.(*scheduling.PriorityClassList), nil
|
||||
}
|
||||
|
||||
func (s *storage) CreatePriorityClass(ctx genericapirequest.Context, pc *scheduling.PriorityClass, createValidation rest.ValidateObjectFunc) error {
|
||||
func (s *storage) CreatePriorityClass(ctx context.Context, pc *scheduling.PriorityClass, createValidation rest.ValidateObjectFunc) error {
|
||||
_, err := s.Create(ctx, pc, createValidation, false)
|
||||
return err
|
||||
}
|
||||
|
||||
func (s *storage) UpdatePriorityClass(ctx genericapirequest.Context, pc *scheduling.PriorityClass, createValidation rest.ValidateObjectFunc, updateValidation rest.ValidateObjectUpdateFunc) error {
|
||||
func (s *storage) UpdatePriorityClass(ctx context.Context, pc *scheduling.PriorityClass, createValidation rest.ValidateObjectFunc, updateValidation rest.ValidateObjectUpdateFunc) error {
|
||||
_, _, err := s.Update(ctx, pc.Name, rest.DefaultUpdatedObjectInfo(pc), createValidation, updateValidation)
|
||||
return err
|
||||
}
|
||||
|
||||
func (s *storage) WatchPriorityClasses(ctx genericapirequest.Context, options *metainternalversion.ListOptions) (watch.Interface, error) {
|
||||
func (s *storage) WatchPriorityClasses(ctx context.Context, options *metainternalversion.ListOptions) (watch.Interface, error) {
|
||||
return s.Watch(ctx, options)
|
||||
}
|
||||
|
||||
func (s *storage) GetPriorityClass(ctx genericapirequest.Context, name string, options *metav1.GetOptions) (*scheduling.PriorityClass, error) {
|
||||
func (s *storage) GetPriorityClass(ctx context.Context, name string, options *metav1.GetOptions) (*scheduling.PriorityClass, error) {
|
||||
obj, err := s.Get(ctx, name, options)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@ -77,7 +78,7 @@ func (s *storage) GetPriorityClass(ctx genericapirequest.Context, name string, o
|
||||
return obj.(*scheduling.PriorityClass), nil
|
||||
}
|
||||
|
||||
func (s *storage) DeletePriorityClass(ctx genericapirequest.Context, name string) error {
|
||||
func (s *storage) DeletePriorityClass(ctx context.Context, name string) error {
|
||||
_, _, err := s.Delete(ctx, name, nil)
|
||||
return err
|
||||
}
|
||||
|
3
vendor/k8s.io/kubernetes/pkg/registry/scheduling/priorityclass/storage/BUILD
generated
vendored
3
vendor/k8s.io/kubernetes/pkg/registry/scheduling/priorityclass/storage/BUILD
generated
vendored
@ -17,6 +17,7 @@ go_test(
|
||||
"//vendor/k8s.io/apimachinery/pkg/fields:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/labels:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library",
|
||||
"//vendor/k8s.io/apiserver/pkg/endpoints/request:go_default_library",
|
||||
"//vendor/k8s.io/apiserver/pkg/registry/generic:go_default_library",
|
||||
"//vendor/k8s.io/apiserver/pkg/registry/generic/testing:go_default_library",
|
||||
"//vendor/k8s.io/apiserver/pkg/storage/etcd/testing:go_default_library",
|
||||
@ -30,6 +31,8 @@ go_library(
|
||||
deps = [
|
||||
"//pkg/apis/scheduling:go_default_library",
|
||||
"//pkg/registry/scheduling/priorityclass:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/api/errors:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library",
|
||||
"//vendor/k8s.io/apiserver/pkg/registry/generic:go_default_library",
|
||||
"//vendor/k8s.io/apiserver/pkg/registry/generic/registry:go_default_library",
|
||||
|
24
vendor/k8s.io/kubernetes/pkg/registry/scheduling/priorityclass/storage/storage.go
generated
vendored
24
vendor/k8s.io/kubernetes/pkg/registry/scheduling/priorityclass/storage/storage.go
generated
vendored
@ -17,11 +17,16 @@ limitations under the License.
|
||||
package storage
|
||||
|
||||
import (
|
||||
"context"
|
||||
"errors"
|
||||
|
||||
apierrors "k8s.io/apimachinery/pkg/api/errors"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"k8s.io/apimachinery/pkg/runtime"
|
||||
"k8s.io/apiserver/pkg/registry/generic"
|
||||
genericregistry "k8s.io/apiserver/pkg/registry/generic/registry"
|
||||
"k8s.io/apiserver/pkg/registry/rest"
|
||||
schedulingapi "k8s.io/kubernetes/pkg/apis/scheduling"
|
||||
"k8s.io/kubernetes/pkg/apis/scheduling"
|
||||
"k8s.io/kubernetes/pkg/registry/scheduling/priorityclass"
|
||||
)
|
||||
|
||||
@ -33,9 +38,9 @@ type REST struct {
|
||||
// NewREST returns a RESTStorage object that will work against priority classes.
|
||||
func NewREST(optsGetter generic.RESTOptionsGetter) *REST {
|
||||
store := &genericregistry.Store{
|
||||
NewFunc: func() runtime.Object { return &schedulingapi.PriorityClass{} },
|
||||
NewListFunc: func() runtime.Object { return &schedulingapi.PriorityClassList{} },
|
||||
DefaultQualifiedResource: schedulingapi.Resource("priorityclasses"),
|
||||
NewFunc: func() runtime.Object { return &scheduling.PriorityClass{} },
|
||||
NewListFunc: func() runtime.Object { return &scheduling.PriorityClassList{} },
|
||||
DefaultQualifiedResource: scheduling.Resource("priorityclasses"),
|
||||
|
||||
CreateStrategy: priorityclass.Strategy,
|
||||
UpdateStrategy: priorityclass.Strategy,
|
||||
@ -56,3 +61,14 @@ var _ rest.ShortNamesProvider = &REST{}
|
||||
func (r *REST) ShortNames() []string {
|
||||
return []string{"pc"}
|
||||
}
|
||||
|
||||
// Delete ensures that system priority classes are not deleted.
|
||||
func (r *REST) Delete(ctx context.Context, name string, options *metav1.DeleteOptions) (runtime.Object, bool, error) {
|
||||
for _, spc := range scheduling.SystemPriorityClasses() {
|
||||
if name == spc.Name {
|
||||
return nil, false, apierrors.NewForbidden(scheduling.Resource("priorityclasses"), spc.Name, errors.New("this is a system priority class and cannot be deleted"))
|
||||
}
|
||||
}
|
||||
|
||||
return r.Store.Delete(ctx, name, options)
|
||||
}
|
||||
|
17
vendor/k8s.io/kubernetes/pkg/registry/scheduling/priorityclass/storage/storage_test.go
generated
vendored
17
vendor/k8s.io/kubernetes/pkg/registry/scheduling/priorityclass/storage/storage_test.go
generated
vendored
@ -23,6 +23,7 @@ import (
|
||||
"k8s.io/apimachinery/pkg/fields"
|
||||
"k8s.io/apimachinery/pkg/labels"
|
||||
"k8s.io/apimachinery/pkg/runtime"
|
||||
genericapirequest "k8s.io/apiserver/pkg/endpoints/request"
|
||||
"k8s.io/apiserver/pkg/registry/generic"
|
||||
genericregistrytest "k8s.io/apiserver/pkg/registry/generic/testing"
|
||||
etcdtesting "k8s.io/apiserver/pkg/storage/etcd/testing"
|
||||
@ -105,6 +106,22 @@ func TestDelete(t *testing.T) {
|
||||
test.TestDelete(validNewPriorityClass())
|
||||
}
|
||||
|
||||
// TestDeleteSystemPriorityClass checks that system priority classes cannot be deleted.
|
||||
func TestDeleteSystemPriorityClass(t *testing.T) {
|
||||
storage, server := newStorage(t)
|
||||
defer server.Terminate(t)
|
||||
defer storage.Store.DestroyFunc()
|
||||
key := "test/system-node-critical"
|
||||
ctx := genericapirequest.NewContext()
|
||||
pc := scheduling.SystemPriorityClasses()[0]
|
||||
if err := storage.Store.Storage.Create(ctx, key, pc, nil, 0); err != nil {
|
||||
t.Fatalf("unexpected error: %v", err)
|
||||
}
|
||||
if _, _, err := storage.Delete(ctx, pc.Name, nil); err == nil {
|
||||
t.Error("expected to receive an error")
|
||||
}
|
||||
}
|
||||
|
||||
func TestGet(t *testing.T) {
|
||||
storage, server := newStorage(t)
|
||||
defer server.Terminate(t)
|
||||
|
15
vendor/k8s.io/kubernetes/pkg/registry/scheduling/priorityclass/strategy.go
generated
vendored
15
vendor/k8s.io/kubernetes/pkg/registry/scheduling/priorityclass/strategy.go
generated
vendored
@ -17,9 +17,10 @@ limitations under the License.
|
||||
package priorityclass
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"k8s.io/apimachinery/pkg/runtime"
|
||||
"k8s.io/apimachinery/pkg/util/validation/field"
|
||||
genericapirequest "k8s.io/apiserver/pkg/endpoints/request"
|
||||
"k8s.io/apiserver/pkg/storage/names"
|
||||
"k8s.io/kubernetes/pkg/api/legacyscheme"
|
||||
"k8s.io/kubernetes/pkg/apis/scheduling"
|
||||
@ -41,19 +42,19 @@ func (priorityClassStrategy) NamespaceScoped() bool {
|
||||
}
|
||||
|
||||
// PrepareForCreate clears the status of a PriorityClass before creation.
|
||||
func (priorityClassStrategy) PrepareForCreate(ctx genericapirequest.Context, obj runtime.Object) {
|
||||
func (priorityClassStrategy) PrepareForCreate(ctx context.Context, obj runtime.Object) {
|
||||
pc := obj.(*scheduling.PriorityClass)
|
||||
pc.Generation = 1
|
||||
}
|
||||
|
||||
// PrepareForUpdate clears fields that are not allowed to be set by end users on update.
|
||||
func (priorityClassStrategy) PrepareForUpdate(ctx genericapirequest.Context, obj, old runtime.Object) {
|
||||
func (priorityClassStrategy) PrepareForUpdate(ctx context.Context, obj, old runtime.Object) {
|
||||
_ = obj.(*scheduling.PriorityClass)
|
||||
_ = old.(*scheduling.PriorityClass)
|
||||
}
|
||||
|
||||
// Validate validates a new PriorityClass.
|
||||
func (priorityClassStrategy) Validate(ctx genericapirequest.Context, obj runtime.Object) field.ErrorList {
|
||||
func (priorityClassStrategy) Validate(ctx context.Context, obj runtime.Object) field.ErrorList {
|
||||
pc := obj.(*scheduling.PriorityClass)
|
||||
return validation.ValidatePriorityClass(pc)
|
||||
}
|
||||
@ -67,10 +68,8 @@ func (priorityClassStrategy) AllowCreateOnUpdate() bool {
|
||||
}
|
||||
|
||||
// ValidateUpdate is the default update validation for an end user.
|
||||
func (priorityClassStrategy) ValidateUpdate(ctx genericapirequest.Context, obj, old runtime.Object) field.ErrorList {
|
||||
validationErrorList := validation.ValidatePriorityClass(obj.(*scheduling.PriorityClass))
|
||||
updateErrorList := validation.ValidatePriorityClassUpdate(obj.(*scheduling.PriorityClass), old.(*scheduling.PriorityClass))
|
||||
return append(validationErrorList, updateErrorList...)
|
||||
func (priorityClassStrategy) ValidateUpdate(ctx context.Context, obj, old runtime.Object) field.ErrorList {
|
||||
return validation.ValidatePriorityClassUpdate(obj.(*scheduling.PriorityClass), old.(*scheduling.PriorityClass))
|
||||
}
|
||||
|
||||
// AllowUnconditionalUpdate is the default update policy for PriorityClass objects.
|
||||
|
7
vendor/k8s.io/kubernetes/pkg/registry/scheduling/rest/BUILD
generated
vendored
7
vendor/k8s.io/kubernetes/pkg/registry/scheduling/rest/BUILD
generated
vendored
@ -13,7 +13,14 @@ go_library(
|
||||
"//pkg/api/legacyscheme:go_default_library",
|
||||
"//pkg/apis/scheduling:go_default_library",
|
||||
"//pkg/apis/scheduling/v1alpha1:go_default_library",
|
||||
"//pkg/apis/scheduling/v1beta1:go_default_library",
|
||||
"//pkg/client/clientset_generated/internalclientset/typed/scheduling/internalversion:go_default_library",
|
||||
"//pkg/registry/scheduling/priorityclass/storage:go_default_library",
|
||||
"//vendor/github.com/golang/glog:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/api/errors:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/util/runtime:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/util/wait:go_default_library",
|
||||
"//vendor/k8s.io/apiserver/pkg/registry/generic:go_default_library",
|
||||
"//vendor/k8s.io/apiserver/pkg/registry/rest:go_default_library",
|
||||
"//vendor/k8s.io/apiserver/pkg/server:go_default_library",
|
||||
|
69
vendor/k8s.io/kubernetes/pkg/registry/scheduling/rest/storage_scheduling.go
generated
vendored
69
vendor/k8s.io/kubernetes/pkg/registry/scheduling/rest/storage_scheduling.go
generated
vendored
@ -17,6 +17,15 @@ limitations under the License.
|
||||
package rest
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"time"
|
||||
|
||||
"github.com/golang/glog"
|
||||
|
||||
apierrors "k8s.io/apimachinery/pkg/api/errors"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
utilruntime "k8s.io/apimachinery/pkg/util/runtime"
|
||||
"k8s.io/apimachinery/pkg/util/wait"
|
||||
"k8s.io/apiserver/pkg/registry/generic"
|
||||
"k8s.io/apiserver/pkg/registry/rest"
|
||||
genericapiserver "k8s.io/apiserver/pkg/server"
|
||||
@ -24,23 +33,30 @@ import (
|
||||
"k8s.io/kubernetes/pkg/api/legacyscheme"
|
||||
"k8s.io/kubernetes/pkg/apis/scheduling"
|
||||
schedulingapiv1alpha1 "k8s.io/kubernetes/pkg/apis/scheduling/v1alpha1"
|
||||
schedulingapiv1beta1 "k8s.io/kubernetes/pkg/apis/scheduling/v1beta1"
|
||||
schedulingclient "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/scheduling/internalversion"
|
||||
priorityclassstore "k8s.io/kubernetes/pkg/registry/scheduling/priorityclass/storage"
|
||||
)
|
||||
|
||||
const PostStartHookName = "scheduling/bootstrap-system-priority-classes"
|
||||
|
||||
type RESTStorageProvider struct{}
|
||||
|
||||
var _ genericapiserver.PostStartHookProvider = RESTStorageProvider{}
|
||||
|
||||
func (p RESTStorageProvider) NewRESTStorage(apiResourceConfigSource serverstorage.APIResourceConfigSource, restOptionsGetter generic.RESTOptionsGetter) (genericapiserver.APIGroupInfo, bool) {
|
||||
apiGroupInfo := genericapiserver.NewDefaultAPIGroupInfo(scheduling.GroupName, legacyscheme.Registry, legacyscheme.Scheme, legacyscheme.ParameterCodec, legacyscheme.Codecs)
|
||||
apiGroupInfo := genericapiserver.NewDefaultAPIGroupInfo(scheduling.GroupName, legacyscheme.Scheme, legacyscheme.ParameterCodec, legacyscheme.Codecs)
|
||||
|
||||
if apiResourceConfigSource.VersionEnabled(schedulingapiv1alpha1.SchemeGroupVersion) {
|
||||
apiGroupInfo.VersionedResourcesStorageMap[schedulingapiv1alpha1.SchemeGroupVersion.Version] = p.v1alpha1Storage(apiResourceConfigSource, restOptionsGetter)
|
||||
apiGroupInfo.GroupMeta.GroupVersion = schedulingapiv1alpha1.SchemeGroupVersion
|
||||
apiGroupInfo.VersionedResourcesStorageMap[schedulingapiv1alpha1.SchemeGroupVersion.Version] = p.storage(apiResourceConfigSource, restOptionsGetter)
|
||||
}
|
||||
if apiResourceConfigSource.VersionEnabled(schedulingapiv1beta1.SchemeGroupVersion) {
|
||||
apiGroupInfo.VersionedResourcesStorageMap[schedulingapiv1beta1.SchemeGroupVersion.Version] = p.storage(apiResourceConfigSource, restOptionsGetter)
|
||||
}
|
||||
|
||||
return apiGroupInfo, true
|
||||
}
|
||||
|
||||
func (p RESTStorageProvider) v1alpha1Storage(apiResourceConfigSource serverstorage.APIResourceConfigSource, restOptionsGetter generic.RESTOptionsGetter) map[string]rest.Storage {
|
||||
func (p RESTStorageProvider) storage(apiResourceConfigSource serverstorage.APIResourceConfigSource, restOptionsGetter generic.RESTOptionsGetter) map[string]rest.Storage {
|
||||
storage := map[string]rest.Storage{}
|
||||
// priorityclasses
|
||||
priorityClassStorage := priorityclassstore.NewREST(restOptionsGetter)
|
||||
@ -49,6 +65,49 @@ func (p RESTStorageProvider) v1alpha1Storage(apiResourceConfigSource serverstora
|
||||
return storage
|
||||
}
|
||||
|
||||
func (p RESTStorageProvider) PostStartHook() (string, genericapiserver.PostStartHookFunc, error) {
|
||||
return PostStartHookName, AddSystemPriorityClasses(), nil
|
||||
}
|
||||
|
||||
func AddSystemPriorityClasses() genericapiserver.PostStartHookFunc {
|
||||
return func(hookContext genericapiserver.PostStartHookContext) error {
|
||||
// Adding system priority classes is important. If they fail to add, many critical system
|
||||
// components may fail and cluster may break.
|
||||
err := wait.Poll(1*time.Second, 30*time.Second, func() (done bool, err error) {
|
||||
schedClientSet, err := schedulingclient.NewForConfig(hookContext.LoopbackClientConfig)
|
||||
if err != nil {
|
||||
utilruntime.HandleError(fmt.Errorf("unable to initialize client: %v", err))
|
||||
return false, nil
|
||||
}
|
||||
|
||||
for _, pc := range scheduling.SystemPriorityClasses() {
|
||||
_, err := schedClientSet.PriorityClasses().Get(pc.Name, metav1.GetOptions{})
|
||||
if err != nil {
|
||||
if apierrors.IsNotFound(err) {
|
||||
_, err := schedClientSet.PriorityClasses().Create(pc)
|
||||
if err != nil {
|
||||
return false, err
|
||||
} else {
|
||||
glog.Infof("created PriorityClass %s with value %v", pc.Name, pc.Value)
|
||||
}
|
||||
} else {
|
||||
// Unable to get the priority class for reasons other than "not found".
|
||||
glog.Warningf("unable to get PriorityClass %v: %v. Retrying...", pc.Name, err)
|
||||
return false, err
|
||||
}
|
||||
}
|
||||
}
|
||||
glog.Infof("all system priority classes are created successfully or already exist.")
|
||||
return true, nil
|
||||
})
|
||||
// if we're never able to make it through initialization, kill the API server.
|
||||
if err != nil {
|
||||
return fmt.Errorf("unable to add default system priority classes: %v", err)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
func (p RESTStorageProvider) GroupName() string {
|
||||
return scheduling.GroupName
|
||||
}
|
||||
|
Reference in New Issue
Block a user