...
1
16
17 package v1beta1
18
19 import (
20 metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
21 "k8s.io/apimachinery/pkg/runtime"
22 "k8s.io/apimachinery/pkg/runtime/schema"
23 )
24
25
26 const GroupName = "extensions"
27
28
29 var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1beta1"}
30
31
32 func Resource(resource string) schema.GroupResource {
33 return SchemeGroupVersion.WithResource(resource).GroupResource()
34 }
35
36 var (
37
38
39 SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)
40 localSchemeBuilder = &SchemeBuilder
41 AddToScheme = localSchemeBuilder.AddToScheme
42 )
43
44
45 func addKnownTypes(scheme *runtime.Scheme) error {
46 scheme.AddKnownTypes(SchemeGroupVersion,
47 &Deployment{},
48 &DeploymentList{},
49 &DeploymentRollback{},
50 &Scale{},
51 &DaemonSetList{},
52 &DaemonSet{},
53 &Ingress{},
54 &IngressList{},
55 &ReplicaSet{},
56 &ReplicaSetList{},
57 &NetworkPolicy{},
58 &NetworkPolicyList{},
59 )
60
61 metav1.AddToGroupVersion(scheme, SchemeGroupVersion)
62 return nil
63 }
64
View as plain text