From 0683a9beb6cbee12e638b83d30bb7989a4e4923a Mon Sep 17 00:00:00 2001 From: Yuxing Date: Wed, 28 Mar 2018 14:17:43 -0700 Subject: [PATCH] Add fields Hostname and Path to PublicEndpoint Related issue https://github.com/rancher/rancher/issues/12174 Because we want to populate endpoint for ingress, we will need `Hostname` and `Path` in endpoint represent ingress rule. --- apis/project.cattle.io/v3/types.go | 3 +++ client/project/v3/zz_generated_public_endpoint.go | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/apis/project.cattle.io/v3/types.go b/apis/project.cattle.io/v3/types.go index 54ef54fa..fa28ed25 100644 --- a/apis/project.cattle.io/v3/types.go +++ b/apis/project.cattle.io/v3/types.go @@ -94,6 +94,9 @@ type PublicEndpoint struct { // for host port PodName string `json:"podName,omitempty" norman:"type=reference[pod],nocreate,noupdate"` //serviceName and podName are mutually exclusive + Hostname string `json:"hostname,omitempty" norman:"nocreate,noupdate"` + Path string `json:"path,omitempty" norman:"nocreate,noupdate"` + // hostname and part is for global load balancer } type Workload struct { diff --git a/client/project/v3/zz_generated_public_endpoint.go b/client/project/v3/zz_generated_public_endpoint.go index 989cd2b1..9b7781ab 100644 --- a/client/project/v3/zz_generated_public_endpoint.go +++ b/client/project/v3/zz_generated_public_endpoint.go @@ -3,7 +3,9 @@ package client const ( PublicEndpointType = "publicEndpoint" PublicEndpointFieldAddress = "address" + PublicEndpointFieldHostname = "hostname" PublicEndpointFieldNodeId = "nodeId" + PublicEndpointFieldPath = "path" PublicEndpointFieldPodId = "podId" PublicEndpointFieldPort = "port" PublicEndpointFieldProtocol = "protocol" @@ -12,7 +14,9 @@ const ( type PublicEndpoint struct { Address string `json:"address,omitempty" yaml:"address,omitempty"` + Hostname string `json:"hostname,omitempty" yaml:"hostname,omitempty"` NodeId string `json:"nodeId,omitempty" yaml:"nodeId,omitempty"` + Path string `json:"path,omitempty" yaml:"path,omitempty"` PodId string `json:"podId,omitempty" yaml:"podId,omitempty"` Port int64 `json:"port,omitempty" yaml:"port,omitempty"` Protocol string `json:"protocol,omitempty" yaml:"protocol,omitempty"`