mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-06-13 10:33:35 +00:00
vendor updates
This commit is contained in:
8
vendor/k8s.io/kubernetes/pkg/apis/scheduling/types.go
generated
vendored
8
vendor/k8s.io/kubernetes/pkg/apis/scheduling/types.go
generated
vendored
@ -23,6 +23,9 @@ const (
|
||||
// that do not specify any priority class and there is no priority class
|
||||
// marked as default.
|
||||
DefaultPriorityWhenNoDefaultClassExists = 0
|
||||
// SystemPriorityClassPrefix is the prefix reserved for system priority class names. Other priority
|
||||
// classes are not allowed to start with this prefix.
|
||||
SystemPriorityClassPrefix = "system-"
|
||||
)
|
||||
|
||||
// +genclient
|
||||
@ -41,8 +44,11 @@ type PriorityClass struct {
|
||||
// receive when they have the name of this class in their pod spec.
|
||||
Value int32
|
||||
|
||||
// GlobalDefault specifies whether this PriorityClass should be considered as
|
||||
// globalDefault specifies whether this PriorityClass should be considered as
|
||||
// the default priority for pods that do not have any priority class.
|
||||
// Only one PriorityClass can be marked as `globalDefault`. However, if more than
|
||||
// one PriorityClasses exists with their `globalDefault` field set to true,
|
||||
// the smallest value of such global default PriorityClasses will be used as the default priority.
|
||||
// +optional
|
||||
GlobalDefault bool
|
||||
|
||||
|
5
vendor/k8s.io/kubernetes/pkg/apis/scheduling/v1alpha1/zz_generated.conversion.go
generated
vendored
5
vendor/k8s.io/kubernetes/pkg/apis/scheduling/v1alpha1/zz_generated.conversion.go
generated
vendored
@ -16,16 +16,17 @@ See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// This file was autogenerated by conversion-gen. Do not edit it manually!
|
||||
// Code generated by conversion-gen. DO NOT EDIT.
|
||||
|
||||
package v1alpha1
|
||||
|
||||
import (
|
||||
unsafe "unsafe"
|
||||
|
||||
v1alpha1 "k8s.io/api/scheduling/v1alpha1"
|
||||
conversion "k8s.io/apimachinery/pkg/conversion"
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
scheduling "k8s.io/kubernetes/pkg/apis/scheduling"
|
||||
unsafe "unsafe"
|
||||
)
|
||||
|
||||
func init() {
|
||||
|
2
vendor/k8s.io/kubernetes/pkg/apis/scheduling/v1alpha1/zz_generated.defaults.go
generated
vendored
2
vendor/k8s.io/kubernetes/pkg/apis/scheduling/v1alpha1/zz_generated.defaults.go
generated
vendored
@ -16,7 +16,7 @@ See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// This file was autogenerated by defaulter-gen. Do not edit it manually!
|
||||
// Code generated by defaulter-gen. DO NOT EDIT.
|
||||
|
||||
package v1alpha1
|
||||
|
||||
|
3
vendor/k8s.io/kubernetes/pkg/apis/scheduling/validation/BUILD
generated
vendored
3
vendor/k8s.io/kubernetes/pkg/apis/scheduling/validation/BUILD
generated
vendored
@ -9,8 +9,7 @@ load(
|
||||
go_test(
|
||||
name = "go_default_test",
|
||||
srcs = ["validation_test.go"],
|
||||
importpath = "k8s.io/kubernetes/pkg/apis/scheduling/validation",
|
||||
library = ":go_default_library",
|
||||
embed = [":go_default_library"],
|
||||
deps = [
|
||||
"//pkg/apis/scheduling:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library",
|
||||
|
14
vendor/k8s.io/kubernetes/pkg/apis/scheduling/validation/validation.go
generated
vendored
14
vendor/k8s.io/kubernetes/pkg/apis/scheduling/validation/validation.go
generated
vendored
@ -17,14 +17,22 @@ limitations under the License.
|
||||
package validation
|
||||
|
||||
import (
|
||||
"strings"
|
||||
|
||||
"k8s.io/apimachinery/pkg/util/validation/field"
|
||||
apivalidation "k8s.io/kubernetes/pkg/apis/core/validation"
|
||||
"k8s.io/kubernetes/pkg/apis/scheduling"
|
||||
)
|
||||
|
||||
// ValidatePriorityClassName can be used to check whether the given priority
|
||||
// class name is valid.
|
||||
var ValidatePriorityClassName = apivalidation.NameIsDNSSubdomain
|
||||
// ValidatePriorityClassName checks whether the given priority class name is valid.
|
||||
func ValidatePriorityClassName(name string, prefix bool) []string {
|
||||
var allErrs []string
|
||||
if strings.HasPrefix(name, scheduling.SystemPriorityClassPrefix) {
|
||||
allErrs = append(allErrs, "priority class names with '"+scheduling.SystemPriorityClassPrefix+"' prefix are reserved for system use only")
|
||||
}
|
||||
allErrs = append(allErrs, apivalidation.NameIsDNSSubdomain(name, prefix)...)
|
||||
return allErrs
|
||||
}
|
||||
|
||||
// ValidatePriorityClass tests whether required fields in the PriorityClass are
|
||||
// set correctly.
|
||||
|
4
vendor/k8s.io/kubernetes/pkg/apis/scheduling/validation/validation_test.go
generated
vendored
4
vendor/k8s.io/kubernetes/pkg/apis/scheduling/validation/validation_test.go
generated
vendored
@ -53,6 +53,10 @@ func TestValidatePriorityClass(t *testing.T) {
|
||||
ObjectMeta: metav1.ObjectMeta{Name: "tier&1", Namespace: ""},
|
||||
Value: 100,
|
||||
},
|
||||
"invalid system name": {
|
||||
ObjectMeta: metav1.ObjectMeta{Name: scheduling.SystemPriorityClassPrefix + "test"},
|
||||
Value: 100,
|
||||
},
|
||||
}
|
||||
|
||||
for k, v := range errorCases {
|
||||
|
8
vendor/k8s.io/kubernetes/pkg/apis/scheduling/zz_generated.deepcopy.go
generated
vendored
8
vendor/k8s.io/kubernetes/pkg/apis/scheduling/zz_generated.deepcopy.go
generated
vendored
@ -16,7 +16,7 @@ See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// This file was autogenerated by deepcopy-gen. Do not edit it manually!
|
||||
// Code generated by deepcopy-gen. DO NOT EDIT.
|
||||
|
||||
package scheduling
|
||||
|
||||
@ -46,9 +46,8 @@ func (in *PriorityClass) DeepCopy() *PriorityClass {
|
||||
func (in *PriorityClass) DeepCopyObject() runtime.Object {
|
||||
if c := in.DeepCopy(); c != nil {
|
||||
return c
|
||||
} else {
|
||||
return nil
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
@ -80,7 +79,6 @@ func (in *PriorityClassList) DeepCopy() *PriorityClassList {
|
||||
func (in *PriorityClassList) DeepCopyObject() runtime.Object {
|
||||
if c := in.DeepCopy(); c != nil {
|
||||
return c
|
||||
} else {
|
||||
return nil
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
Reference in New Issue
Block a user