This repository has been archived by the owner on Jul 9, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 8
/
main.go
103 lines (101 loc) · 3.11 KB
/
main.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
package main
import (
controllergen "github.com/rancher/wrangler/pkg/controller-gen"
"github.com/rancher/wrangler/pkg/controller-gen/args"
appsv1 "k8s.io/api/apps/v1"
batchv1 "k8s.io/api/batch/v1"
v1 "k8s.io/api/core/v1"
extensionsv1beta1 "k8s.io/api/extensions/v1beta1"
rbacv1 "k8s.io/api/rbac/v1"
storagev1 "k8s.io/api/storage/v1"
"k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1"
apiv1 "k8s.io/kube-aggregator/pkg/apis/apiregistration/v1"
)
func main() {
controllergen.Run(args.Options{
OutputPackage: "github.com/rancher/wrangler-api/pkg/generated",
Boilerplate: "scripts/boilerplate.go.txt",
Groups: map[string]args.Group{
"": {
Types: []interface{}{
v1.Event{},
v1.Node{},
v1.Namespace{},
v1.Secret{},
v1.Service{},
v1.ServiceAccount{},
v1.Endpoints{},
v1.ConfigMap{},
v1.PersistentVolumeClaim{},
v1.Pod{},
},
InformersPackage: "k8s.io/client-go/informers",
ClientSetPackage: "k8s.io/client-go/kubernetes",
ListersPackage: "k8s.io/client-go/listers",
},
"extensions": {
Types: []interface{}{
extensionsv1beta1.Ingress{},
},
InformersPackage: "k8s.io/client-go/informers",
ClientSetPackage: "k8s.io/client-go/kubernetes",
ListersPackage: "k8s.io/client-go/listers",
},
"rbac": {
Types: []interface{}{
rbacv1.Role{},
rbacv1.RoleBinding{},
rbacv1.ClusterRole{},
rbacv1.ClusterRoleBinding{},
},
InformersPackage: "k8s.io/client-go/informers",
ClientSetPackage: "k8s.io/client-go/kubernetes",
ListersPackage: "k8s.io/client-go/listers",
},
"apps": {
Types: []interface{}{
appsv1.Deployment{},
appsv1.DaemonSet{},
appsv1.StatefulSet{},
},
InformersPackage: "k8s.io/client-go/informers",
ClientSetPackage: "k8s.io/client-go/kubernetes",
ListersPackage: "k8s.io/client-go/listers",
},
"storage": {
Types: []interface{}{
storagev1.StorageClass{},
},
InformersPackage: "k8s.io/client-go/informers",
ClientSetPackage: "k8s.io/client-go/kubernetes",
ListersPackage: "k8s.io/client-go/listers",
},
"apiextensions.k8s.io": {
Types: []interface{}{
v1beta1.CustomResourceDefinition{},
},
PackageName: "apiextensions",
ClientSetPackage: "k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset",
InformersPackage: "k8s.io/apiextensions-apiserver/pkg/client/informers/externalversions",
ListersPackage: "k8s.io/apiextensions-apiserver/pkg/client/listers",
},
"apiregistration.k8s.io": {
Types: []interface{}{
apiv1.APIService{},
},
PackageName: "apiregistration",
ClientSetPackage: "k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset",
InformersPackage: "k8s.io/kube-aggregator/pkg/client/informers/externalversions",
ListersPackage: "k8s.io/kube-aggregator/pkg/client/listers",
},
"batch": {
Types: []interface{}{
batchv1.Job{},
},
InformersPackage: "k8s.io/client-go/informers",
ClientSetPackage: "k8s.io/client-go/kubernetes",
ListersPackage: "k8s.io/client-go/listers",
},
},
})
}