mirror of
https://github.com/rancher/types.git
synced 2025-09-01 13:18:20 +00:00
Introduce APIService resource to Rancher
This commit is contained in:
committed by
Alena Prokharchyk
parent
62d70fb549
commit
35112c6ee7
@@ -10,6 +10,7 @@ import (
|
||||
"github.com/rancher/types/factory"
|
||||
v1 "k8s.io/api/core/v1"
|
||||
storagev1 "k8s.io/api/storage/v1"
|
||||
apiregistrationv1 "k8s.io/kube-aggregator/pkg/apis/apiregistration/v1"
|
||||
)
|
||||
|
||||
var (
|
||||
@@ -25,7 +26,8 @@ var (
|
||||
Init(namespaceTypes).
|
||||
Init(persistentVolumeTypes).
|
||||
Init(storageClassTypes).
|
||||
Init(tokens)
|
||||
Init(tokens).
|
||||
Init(apiServiceTypes)
|
||||
)
|
||||
|
||||
func namespaceTypes(schemas *types.Schemas) *types.Schemas {
|
||||
@@ -130,3 +132,11 @@ func tokens(schemas *types.Schemas) *types.Schemas {
|
||||
schema.ResourceMethods = []string{}
|
||||
})
|
||||
}
|
||||
|
||||
func apiServiceTypes(Schemas *types.Schemas) *types.Schemas {
|
||||
return Schemas.
|
||||
AddMapperForType(&Version, apiregistrationv1.APIService{},
|
||||
&m.Embed{Field: "status"},
|
||||
).
|
||||
MustImport(&Version, apiregistrationv1.APIService{})
|
||||
}
|
||||
|
Reference in New Issue
Block a user