volcano.sh/apis@v1.8.2/pkg/client/clientset/versioned/scheme/register.go (about)

     1  /*
     2  Copyright 2021 The Volcano Authors.
     3  
     4  Licensed under the Apache License, Version 2.0 (the "License");
     5  you may not use this file except in compliance with the License.
     6  You may obtain a copy of the License at
     7  
     8      http://www.apache.org/licenses/LICENSE-2.0
     9  
    10  Unless required by applicable law or agreed to in writing, software
    11  distributed under the License is distributed on an "AS IS" BASIS,
    12  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    13  See the License for the specific language governing permissions and
    14  limitations under the License.
    15  */
    16  // Code generated by client-gen. DO NOT EDIT.
    17  
    18  package scheme
    19  
    20  import (
    21  	v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
    22  	runtime "k8s.io/apimachinery/pkg/runtime"
    23  	schema "k8s.io/apimachinery/pkg/runtime/schema"
    24  	serializer "k8s.io/apimachinery/pkg/runtime/serializer"
    25  	utilruntime "k8s.io/apimachinery/pkg/util/runtime"
    26  	batchv1alpha1 "volcano.sh/apis/pkg/apis/batch/v1alpha1"
    27  	busv1alpha1 "volcano.sh/apis/pkg/apis/bus/v1alpha1"
    28  	flowv1alpha1 "volcano.sh/apis/pkg/apis/flow/v1alpha1"
    29  	nodeinfov1alpha1 "volcano.sh/apis/pkg/apis/nodeinfo/v1alpha1"
    30  	schedulingv1beta1 "volcano.sh/apis/pkg/apis/scheduling/v1beta1"
    31  )
    32  
    33  var Scheme = runtime.NewScheme()
    34  var Codecs = serializer.NewCodecFactory(Scheme)
    35  var ParameterCodec = runtime.NewParameterCodec(Scheme)
    36  var localSchemeBuilder = runtime.SchemeBuilder{
    37  	batchv1alpha1.AddToScheme,
    38  	busv1alpha1.AddToScheme,
    39  	flowv1alpha1.AddToScheme,
    40  	nodeinfov1alpha1.AddToScheme,
    41  	schedulingv1beta1.AddToScheme,
    42  }
    43  
    44  // AddToScheme adds all types of this clientset into the given scheme. This allows composition
    45  // of clientsets, like in:
    46  //
    47  //     import (
    48  //       "k8s.io/client-go/kubernetes"
    49  //       clientsetscheme "k8s.io/client-go/kubernetes/scheme"
    50  //       aggregatorclientsetscheme "k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/scheme"
    51  //     )
    52  //
    53  //     kclientset, _ := kubernetes.NewForConfig(c)
    54  //     _ = aggregatorclientsetscheme.AddToScheme(clientsetscheme.Scheme)
    55  //
    56  // After this, RawExtensions in Kubernetes types will serialize kube-aggregator types
    57  // correctly.
    58  var AddToScheme = localSchemeBuilder.AddToScheme
    59  
    60  func init() {
    61  	v1.AddToGroupVersion(Scheme, schema.GroupVersion{Version: "v1"})
    62  	utilruntime.Must(AddToScheme(Scheme))
    63  }