register.go 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. // Copyright 2021 the Kilo authors
  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. // Code generated by client-gen. DO NOT EDIT.
  15. package scheme
  16. import (
  17. kilov1alpha1 "github.com/kilo-io/kilo/pkg/k8s/apis/kilo/v1alpha1"
  18. v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
  19. runtime "k8s.io/apimachinery/pkg/runtime"
  20. schema "k8s.io/apimachinery/pkg/runtime/schema"
  21. serializer "k8s.io/apimachinery/pkg/runtime/serializer"
  22. utilruntime "k8s.io/apimachinery/pkg/util/runtime"
  23. )
  24. var Scheme = runtime.NewScheme()
  25. var Codecs = serializer.NewCodecFactory(Scheme)
  26. var ParameterCodec = runtime.NewParameterCodec(Scheme)
  27. var localSchemeBuilder = runtime.SchemeBuilder{
  28. kilov1alpha1.AddToScheme,
  29. }
  30. // AddToScheme adds all types of this clientset into the given scheme. This allows composition
  31. // of clientsets, like in:
  32. //
  33. // import (
  34. // "k8s.io/client-go/kubernetes"
  35. // clientsetscheme "k8s.io/client-go/kubernetes/scheme"
  36. // aggregatorclientsetscheme "k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/scheme"
  37. // )
  38. //
  39. // kclientset, _ := kubernetes.NewForConfig(c)
  40. // _ = aggregatorclientsetscheme.AddToScheme(clientsetscheme.Scheme)
  41. //
  42. // After this, RawExtensions in Kubernetes types will serialize kube-aggregator types
  43. // correctly.
  44. var AddToScheme = localSchemeBuilder.AddToScheme
  45. func init() {
  46. v1.AddToGroupVersion(Scheme, schema.GroupVersion{Version: "v1"})
  47. utilruntime.Must(AddToScheme(Scheme))
  48. }