From 3d28b85212f96f32e39b83fce4cee8abce4aa0f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?vlc=E5=88=98=E8=AF=9A?= Date: Mon, 19 Sep 2022 15:59:09 +0800 Subject: [PATCH] remove unused file: validation_pluginargs.go --- .../validation/validation_pluginargs.go | 36 ------------------- 1 file changed, 36 deletions(-) delete mode 100644 pkg/apis/componentconfig/validation/validation_pluginargs.go diff --git a/pkg/apis/componentconfig/validation/validation_pluginargs.go b/pkg/apis/componentconfig/validation/validation_pluginargs.go deleted file mode 100644 index e8ee8d2ff..000000000 --- a/pkg/apis/componentconfig/validation/validation_pluginargs.go +++ /dev/null @@ -1,36 +0,0 @@ -/* -Copyright 2022 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package validation - -import ( - "fmt" - - utilerrors "k8s.io/apimachinery/pkg/util/errors" -) - -// errorsAggregate converts all arg validation errors to a single error interface. -// if no errors, it will return nil. -func errorsAggregate(errors ...error) error { - return utilerrors.NewAggregate(errors) -} - -func validatePodRestartThreshold(podRestartThreshold int32) error { - if podRestartThreshold < 1 { - return fmt.Errorf("PodsHavingTooManyRestarts threshold not set") - } - return nil -}