github.com/imran-kn/cilium-fork@v1.6.9/pkg/k8s/client/clientset/versioned/fake/register.go (about) 1 // Copyright 2017-2019 Authors of Cilium 2 // 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 // 7 // http://www.apache.org/licenses/LICENSE-2.0 8 // 9 // Unless required by applicable law or agreed to in writing, software 10 // distributed under the License is distributed on an "AS IS" BASIS, 11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 // See the License for the specific language governing permissions and 13 // limitations under the License. 14 15 // Code generated by client-gen. DO NOT EDIT. 16 17 package fake 18 19 import ( 20 ciliumv2 "github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2" 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 ) 27 28 var scheme = runtime.NewScheme() 29 var codecs = serializer.NewCodecFactory(scheme) 30 var parameterCodec = runtime.NewParameterCodec(scheme) 31 var localSchemeBuilder = runtime.SchemeBuilder{ 32 ciliumv2.AddToScheme, 33 } 34 35 // AddToScheme adds all types of this clientset into the given scheme. This allows composition 36 // of clientsets, like in: 37 // 38 // import ( 39 // "k8s.io/client-go/kubernetes" 40 // clientsetscheme "k8s.io/client-go/kubernetes/scheme" 41 // aggregatorclientsetscheme "k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/scheme" 42 // ) 43 // 44 // kclientset, _ := kubernetes.NewForConfig(c) 45 // _ = aggregatorclientsetscheme.AddToScheme(clientsetscheme.Scheme) 46 // 47 // After this, RawExtensions in Kubernetes types will serialize kube-aggregator types 48 // correctly. 49 var AddToScheme = localSchemeBuilder.AddToScheme 50 51 func init() { 52 v1.AddToGroupVersion(scheme, schema.GroupVersion{Version: "v1"}) 53 utilruntime.Must(AddToScheme(scheme)) 54 }