1
0
mirror of https://github.com/rancher/types.git synced 2025-09-01 21:32:10 +00:00

Add istio VirtualService and DestinationRule types

This commit is contained in:
gitlawr
2019-06-17 10:50:12 +08:00
parent 22e321a584
commit bd5a9e3e53
3 changed files with 41 additions and 1 deletions

View File

@@ -4,6 +4,7 @@ import (
"net/http"
monitoringv1 "github.com/coreos/prometheus-operator/pkg/client/monitoring/v1"
istiov1alpha3 "github.com/knative/pkg/apis/istio/v1alpha3"
"github.com/rancher/norman/types"
m "github.com/rancher/norman/types/mapper"
v3 "github.com/rancher/types/apis/project.cattle.io/v3"
@@ -46,7 +47,8 @@ var (
Init(appTypes).
Init(pipelineTypes).
Init(monitoringTypes).
Init(autoscalingTypes)
Init(autoscalingTypes).
Init(istioTypes)
)
func configMapTypes(schemas *types.Schemas) *types.Schemas {
@@ -1088,3 +1090,19 @@ func autoscalingTypes(schemas *types.Schemas) *types.Schemas {
Description string `json:"description,omitempty"`
}{})
}
func istioTypes(schemas *types.Schemas) *types.Schemas {
return schemas.
MustImport(&Version, istiov1alpha3.HTTPMatchRequest{}, struct {
Port *uint32 `json:"port,omitempty"`
}{}).
MustImport(&Version, istiov1alpha3.HTTPRoute{}, struct {
WebsocketUpgrade *bool `json:"websocketUpgrade,omitempty"`
}{}).
MustImport(&Version, istiov1alpha3.VirtualService{}, projectOverride{}, struct {
Status interface{}
}{}).
MustImport(&Version, istiov1alpha3.DestinationRule{}, projectOverride{}, struct {
Status interface{}
}{})
}