1
0
mirror of https://github.com/rancher/types.git synced 2025-08-31 21:00:16 +00:00

Add publicEndpoints field for ingress schema

This commit is contained in:
Yuxing
2018-03-28 17:34:02 -07:00
parent 0e7e7a5fd8
commit 3406d36e1f
2 changed files with 5 additions and 1 deletions

View File

@@ -601,6 +601,7 @@ func ingressTypes(schemas *types.Schemas) *types.Schemas {
AddMapperForType(&Version, v1beta1.Ingress{},
&m.AnnotationField{Field: "description"},
&m.Move{From: "backend", To: "defaultBackend"},
&m.AnnotationField{Field: "publicEndpoints", List: true},
).
AddMapperForType(&Version, v1beta1.IngressTLS{},
&m.Move{From: "secretName", To: "certificateName"},
@@ -622,7 +623,8 @@ func ingressTypes(schemas *types.Schemas) *types.Schemas {
SecretName string `norman:"type=reference[certificate]"`
}{}).
MustImport(&Version, v1beta1.Ingress{}, projectOverride{}, struct {
Description string `json:"description"`
Description string `json:"description"`
PublicEndpoints string `json:"publicEndpoints" norman:"type=array[publicEndpoint],nocreate,noupdate"`
}{})
}

View File

@@ -16,6 +16,7 @@ const (
IngressFieldNamespaceId = "namespaceId"
IngressFieldOwnerReferences = "ownerReferences"
IngressFieldProjectID = "projectId"
IngressFieldPublicEndpoints = "publicEndpoints"
IngressFieldRemoved = "removed"
IngressFieldRules = "rules"
IngressFieldState = "state"
@@ -38,6 +39,7 @@ type Ingress struct {
NamespaceId string `json:"namespaceId,omitempty" yaml:"namespaceId,omitempty"`
OwnerReferences []OwnerReference `json:"ownerReferences,omitempty" yaml:"ownerReferences,omitempty"`
ProjectID string `json:"projectId,omitempty" yaml:"projectId,omitempty"`
PublicEndpoints []PublicEndpoint `json:"publicEndpoints,omitempty" yaml:"publicEndpoints,omitempty"`
Removed string `json:"removed,omitempty" yaml:"removed,omitempty"`
Rules []IngressRule `json:"rules,omitempty" yaml:"rules,omitempty"`
State string `json:"state,omitempty" yaml:"state,omitempty"`