register.go 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. // Copyright 2026 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 fake
  16. import (
  17. kilov1alpha1 "github.com/squat/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 localSchemeBuilder = runtime.SchemeBuilder{
  27. kilov1alpha1.AddToScheme,
  28. }
  29. // AddToScheme adds all types of this clientset into the given scheme. This allows composition
  30. // of clientsets, like in:
  31. //
  32. // import (
  33. // "k8s.io/client-go/kubernetes"
  34. // clientsetscheme "k8s.io/client-go/kubernetes/scheme"
  35. // aggregatorclientsetscheme "k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/scheme"
  36. // )
  37. //
  38. // kclientset, _ := kubernetes.NewForConfig(c)
  39. // _ = aggregatorclientsetscheme.AddToScheme(clientsetscheme.Scheme)
  40. //
  41. // After this, RawExtensions in Kubernetes types will serialize kube-aggregator types
  42. // correctly.
  43. var AddToScheme = localSchemeBuilder.AddToScheme
  44. func init() {
  45. v1.AddToGroupVersion(scheme, schema.GroupVersion{Version: "v1"})
  46. utilruntime.Must(AddToScheme(scheme))
  47. }