volcano.sh/apis@v1.8.2/pkg/apis/scheduling/register.go (about)

     1  /*
     2  Copyright 2019 The Volcano Authors.
     3  Licensed under the Apache License, Version 2.0 (the "License");
     4  you may not use this file except in compliance with the License.
     5  You may obtain a copy of the License at
     6      http://www.apache.org/licenses/LICENSE-2.0
     7  Unless required by applicable law or agreed to in writing, software
     8  distributed under the License is distributed on an "AS IS" BASIS,
     9  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    10  See the License for the specific language governing permissions and
    11  limitations under the License.
    12  */
    13  
    14  package scheduling
    15  
    16  import (
    17  	"k8s.io/apimachinery/pkg/runtime"
    18  	"k8s.io/apimachinery/pkg/runtime/schema"
    19  )
    20  
    21  var (
    22  	SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)
    23  	AddToScheme   = SchemeBuilder.AddToScheme
    24  )
    25  
    26  // GroupName is the group name used in this package.
    27  const GroupName = "scheduling.volcano.sh"
    28  
    29  // SchemeGroupVersion is the group version used to register these objects.
    30  var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: runtime.APIVersionInternal}
    31  
    32  // addKnownTypes adds the set of types defined in this package to the supplied scheme.
    33  func addKnownTypes(scheme *runtime.Scheme) error {
    34  	scheme.AddKnownTypes(SchemeGroupVersion,
    35  		&PodGroup{},
    36  		&PodGroupList{},
    37  		&Queue{},
    38  		&QueueList{},
    39  	)
    40  
    41  	return nil
    42  }