1
0
mirror of https://github.com/rancher/types.git synced 2025-08-31 12:48:45 +00:00
Files
types/main.go

77 lines
2.2 KiB
Go
Raw Normal View History

2017-11-15 16:59:47 -07:00
//go:generate go run generator/cleanup/main.go
2017-11-10 21:58:42 -07:00
//go:generate go run main.go
2017-11-10 13:23:15 -07:00
package main
import (
2017-12-04 16:42:18 -07:00
clusterSchema "github.com/rancher/types/apis/cluster.cattle.io/v3/schema"
managementSchema "github.com/rancher/types/apis/management.cattle.io/v3/schema"
publicSchema "github.com/rancher/types/apis/management.cattle.io/v3public/schema"
2017-12-04 16:42:18 -07:00
projectSchema "github.com/rancher/types/apis/project.cattle.io/v3/schema"
2017-11-11 21:14:05 -07:00
"github.com/rancher/types/generator"
2017-11-28 14:32:17 -07:00
"k8s.io/api/apps/v1beta2"
batchv1 "k8s.io/api/batch/v1"
batchv1beta1 "k8s.io/api/batch/v1beta1"
2017-11-28 14:32:17 -07:00
"k8s.io/api/core/v1"
2017-12-09 09:19:33 -07:00
extv1beta1 "k8s.io/api/extensions/v1beta1"
2018-03-26 15:57:47 -07:00
knetworkingv1 "k8s.io/api/networking/v1"
2017-12-09 09:19:33 -07:00
rbacv1 "k8s.io/api/rbac/v1"
2017-11-10 21:58:42 -07:00
)
2017-11-10 13:23:15 -07:00
func main() {
generator.GenerateComposeType(projectSchema.Schemas, managementSchema.Schemas, clusterSchema.Schemas)
2018-06-19 09:46:45 -07:00
generator.Generate(managementSchema.Schemas, map[string]bool{
"userAttribute": true},
)
generator.Generate(publicSchema.PublicSchemas, nil)
generator.Generate(clusterSchema.Schemas, nil)
generator.Generate(projectSchema.Schemas, nil)
generator.GenerateNativeTypes(v1.SchemeGroupVersion, []interface{}{
2018-01-03 13:43:17 -08:00
v1.Endpoints{},
2018-07-13 13:26:51 -07:00
v1.PersistentVolumeClaim{},
v1.Pod{},
2017-12-29 15:20:21 -07:00
v1.Service{},
2018-01-04 14:05:51 -07:00
v1.Secret{},
2018-02-09 05:17:18 +08:00
v1.ConfigMap{},
2018-02-09 05:18:44 +08:00
v1.ServiceAccount{},
v1.ReplicationController{},
2018-06-26 16:01:42 -07:00
v1.ResourceQuota{},
}, []interface{}{
v1.Node{},
v1.ComponentStatus{},
v1.Namespace{},
v1.Event{},
})
generator.GenerateNativeTypes(v1beta2.SchemeGroupVersion, []interface{}{
v1beta2.Deployment{},
2018-02-08 16:53:18 +08:00
v1beta2.DaemonSet{},
2018-02-11 10:28:18 +08:00
v1beta2.StatefulSet{},
v1beta2.ReplicaSet{},
}, nil)
generator.GenerateNativeTypes(rbacv1.SchemeGroupVersion, []interface{}{
rbacv1.RoleBinding{},
rbacv1.Role{},
}, []interface{}{
rbacv1.ClusterRoleBinding{},
rbacv1.ClusterRole{},
})
2018-03-26 15:57:47 -07:00
generator.GenerateNativeTypes(knetworkingv1.SchemeGroupVersion, []interface{}{
knetworkingv1.NetworkPolicy{},
}, nil)
generator.GenerateNativeTypes(batchv1.SchemeGroupVersion, []interface{}{
batchv1.Job{},
}, nil)
generator.GenerateNativeTypes(batchv1beta1.SchemeGroupVersion, []interface{}{
batchv1beta1.CronJob{},
}, nil)
generator.GenerateNativeTypes(extv1beta1.SchemeGroupVersion,
[]interface{}{
2018-02-15 18:01:38 -08:00
extv1beta1.Ingress{},
},
[]interface{}{
extv1beta1.PodSecurityPolicy{},
},
)
2017-11-10 13:23:15 -07:00
}