1
0
mirror of https://github.com/rancher/types.git synced 2025-08-02 05:11:59 +00:00

Merge pull request #321 from orangedeng/ingress-namespaced-fix

Ingress should be namespaced
This commit is contained in:
Alena Prokharchyk 2018-03-28 15:46:17 -07:00 committed by GitHub
commit 3d58dd8a97
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 16 additions and 5 deletions

View File

@ -24,8 +24,9 @@ var (
IngressResource = metav1.APIResource{
Name: "ingresses",
SingularName: "ingress",
Namespaced: false,
Kind: IngressGroupVersionKind.Kind,
Namespaced: true,
Kind: IngressGroupVersionKind.Kind,
}
)

View File

@ -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 {

View File

@ -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"`

View File

@ -61,9 +61,12 @@ func main() {
generator.GenerateNativeTypes(batchv1beta1.SchemeGroupVersion, []interface{}{
batchv1beta1.CronJob{},
}, nil)
generator.GenerateNativeTypes(extv1beta1.SchemeGroupVersion, nil,
generator.GenerateNativeTypes(extv1beta1.SchemeGroupVersion,
[]interface{}{
extv1beta1.Ingress{},
},
[]interface{}{
extv1beta1.PodSecurityPolicy{},
extv1beta1.Ingress{},
})
},
)
}