Commit a2dcd3b7 authored by k8s-merge-robot's avatar k8s-merge-robot

Merge pull request #14175 from alfred-huangjian/l7-ingress-api-type-init-version

Auto commit by PR queue bot
parents 20c01f07 44477b24
......@@ -346,6 +346,26 @@ func deepCopy_api_Lifecycle(in api.Lifecycle, out *api.Lifecycle, c *conversion.
return nil
}
func deepCopy_api_LoadBalancerIngress(in api.LoadBalancerIngress, out *api.LoadBalancerIngress, c *conversion.Cloner) error {
out.IP = in.IP
out.Hostname = in.Hostname
return nil
}
func deepCopy_api_LoadBalancerStatus(in api.LoadBalancerStatus, out *api.LoadBalancerStatus, c *conversion.Cloner) error {
if in.Ingress != nil {
out.Ingress = make([]api.LoadBalancerIngress, len(in.Ingress))
for i := range in.Ingress {
if err := deepCopy_api_LoadBalancerIngress(in.Ingress[i], &out.Ingress[i], c); err != nil {
return err
}
}
} else {
out.Ingress = nil
}
return nil
}
func deepCopy_api_LocalObjectReference(in api.LocalObjectReference, out *api.LocalObjectReference, c *conversion.Cloner) error {
out.Name = in.Name
return nil
......@@ -997,6 +1017,97 @@ func deepCopy_experimental_HorizontalPodAutoscalerStatus(in HorizontalPodAutosca
return nil
}
func deepCopy_experimental_Ingress(in Ingress, out *Ingress, c *conversion.Cloner) error {
if err := deepCopy_unversioned_TypeMeta(in.TypeMeta, &out.TypeMeta, c); err != nil {
return err
}
if err := deepCopy_api_ObjectMeta(in.ObjectMeta, &out.ObjectMeta, c); err != nil {
return err
}
if err := deepCopy_experimental_IngressSpec(in.Spec, &out.Spec, c); err != nil {
return err
}
if err := deepCopy_experimental_IngressStatus(in.Status, &out.Status, c); err != nil {
return err
}
return nil
}
func deepCopy_experimental_IngressBackend(in IngressBackend, out *IngressBackend, c *conversion.Cloner) error {
if err := deepCopy_api_LocalObjectReference(in.ServiceRef, &out.ServiceRef, c); err != nil {
return err
}
if err := deepCopy_util_IntOrString(in.ServicePort, &out.ServicePort, c); err != nil {
return err
}
out.Protocol = in.Protocol
return nil
}
func deepCopy_experimental_IngressList(in IngressList, out *IngressList, c *conversion.Cloner) error {
if err := deepCopy_unversioned_TypeMeta(in.TypeMeta, &out.TypeMeta, c); err != nil {
return err
}
if err := deepCopy_unversioned_ListMeta(in.ListMeta, &out.ListMeta, c); err != nil {
return err
}
if in.Items != nil {
out.Items = make([]Ingress, len(in.Items))
for i := range in.Items {
if err := deepCopy_experimental_Ingress(in.Items[i], &out.Items[i], c); err != nil {
return err
}
}
} else {
out.Items = nil
}
return nil
}
func deepCopy_experimental_IngressPath(in IngressPath, out *IngressPath, c *conversion.Cloner) error {
out.Path = in.Path
if err := deepCopy_experimental_IngressBackend(in.Backend, &out.Backend, c); err != nil {
return err
}
return nil
}
func deepCopy_experimental_IngressRule(in IngressRule, out *IngressRule, c *conversion.Cloner) error {
out.Host = in.Host
if in.Paths != nil {
out.Paths = make([]IngressPath, len(in.Paths))
for i := range in.Paths {
if err := deepCopy_experimental_IngressPath(in.Paths[i], &out.Paths[i], c); err != nil {
return err
}
}
} else {
out.Paths = nil
}
return nil
}
func deepCopy_experimental_IngressSpec(in IngressSpec, out *IngressSpec, c *conversion.Cloner) error {
if in.Rules != nil {
out.Rules = make([]IngressRule, len(in.Rules))
for i := range in.Rules {
if err := deepCopy_experimental_IngressRule(in.Rules[i], &out.Rules[i], c); err != nil {
return err
}
}
} else {
out.Rules = nil
}
return nil
}
func deepCopy_experimental_IngressStatus(in IngressStatus, out *IngressStatus, c *conversion.Cloner) error {
if err := deepCopy_api_LoadBalancerStatus(in.LoadBalancer, &out.LoadBalancer, c); err != nil {
return err
}
return nil
}
func deepCopy_experimental_Job(in Job, out *Job, c *conversion.Cloner) error {
if err := deepCopy_unversioned_TypeMeta(in.TypeMeta, &out.TypeMeta, c); err != nil {
return err
......@@ -1289,6 +1400,8 @@ func init() {
deepCopy_api_HostPathVolumeSource,
deepCopy_api_ISCSIVolumeSource,
deepCopy_api_Lifecycle,
deepCopy_api_LoadBalancerIngress,
deepCopy_api_LoadBalancerStatus,
deepCopy_api_LocalObjectReference,
deepCopy_api_NFSVolumeSource,
deepCopy_api_ObjectFieldSelector,
......@@ -1324,6 +1437,13 @@ func init() {
deepCopy_experimental_HorizontalPodAutoscalerList,
deepCopy_experimental_HorizontalPodAutoscalerSpec,
deepCopy_experimental_HorizontalPodAutoscalerStatus,
deepCopy_experimental_Ingress,
deepCopy_experimental_IngressBackend,
deepCopy_experimental_IngressList,
deepCopy_experimental_IngressPath,
deepCopy_experimental_IngressRule,
deepCopy_experimental_IngressSpec,
deepCopy_experimental_IngressStatus,
deepCopy_experimental_Job,
deepCopy_experimental_JobCondition,
deepCopy_experimental_JobList,
......
......@@ -42,6 +42,8 @@ func addKnownTypes() {
&DaemonSet{},
&ThirdPartyResourceData{},
&ThirdPartyResourceDataList{},
&Ingress{},
&IngressList{},
)
}
......@@ -59,3 +61,5 @@ func (*DaemonSet) IsAnAPIObject() {}
func (*DaemonSetList) IsAnAPIObject() {}
func (*ThirdPartyResourceData) IsAnAPIObject() {}
func (*ThirdPartyResourceDataList) IsAnAPIObject() {}
func (*Ingress) IsAnAPIObject() {}
func (*IngressList) IsAnAPIObject() {}
......@@ -462,3 +462,80 @@ type JobCondition struct {
// Human readable message indicating details about last transition.
Message string `json:"message,omitempty"`
}
// An Ingress is a way to give services externally-reachable urls. Each Ingress is a
// collection of rules that allow inbound connections to reach the endpoints defined by
// a backend.
type Ingress struct {
unversioned.TypeMeta `json:",inline"`
// Standard object's metadata.
// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
api.ObjectMeta `json:"metadata,omitempty"`
// Spec is the desired state of the Ingress.
// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status
Spec IngressSpec `json:"spec,omitempty"`
// Status is the current state of the Ingress.
// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status
Status IngressStatus `json:"status,omitempty"`
}
// IngressList is a collection of Ingress.
type IngressList struct {
unversioned.TypeMeta `json:",inline"`
// Standard object's metadata.
// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
unversioned.ListMeta `json:"metadata,omitempty"`
// Items is the list of Ingress.
Items []Ingress `json:"items"`
}
// IngressSpec describes the Ingress the user wishes to exist.
type IngressSpec struct {
// TODO: Add the ability to specify load-balancer IP just like what Service has already done?
// A list of rules used to configure the Ingress.
// http://<host>:<port>/<path>?<searchpart> -> IngressBackend
// Where parts of the url conform to RFC 1738.
Rules []IngressRule `json:"rules"`
}
// IngressStatus describe the current state of the Ingress.
type IngressStatus struct {
// LoadBalancer contains the current status of the load-balancer.
LoadBalancer api.LoadBalancerStatus `json:"loadBalancer,omitempty"`
}
// IngressRule represents the rules mapping the paths under a specified host to the related backend services.
type IngressRule struct {
// Host is the fully qualified domain name of a network host, or its IP
// address as a set of four decimal digit groups separated by ".".
// Conforms to RFC 1738.
Host string `json:"host,omitempty"`
// Paths describe a list of load-balancer rules under the specified host.
Paths []IngressPath `json:"paths"`
}
// IngressPath associates a path regex with an IngressBackend.
// Incoming urls matching the Path are forwarded to the Backend.
type IngressPath struct {
// Path is a regex matched against the url of an incoming request.
Path string `json:"path,omitempty"`
// Define the referenced service endpoint which the traffic will be forwarded to.
Backend IngressBackend `json:"backend"`
}
// IngressBackend describes all endpoints for a given Service, port and protocol.
type IngressBackend struct {
// Specifies the referenced service.
ServiceRef api.LocalObjectReference `json:"serviceRef"`
// Specifies the port of the referenced service.
ServicePort util.IntOrString `json:"servicePort,omitempty"`
// Specifies the protocol of the referenced service.
Protocol api.Protocol `json:"protocol,omitempty"`
}
......@@ -384,6 +384,26 @@ func deepCopy_v1_Lifecycle(in v1.Lifecycle, out *v1.Lifecycle, c *conversion.Clo
return nil
}
func deepCopy_v1_LoadBalancerIngress(in v1.LoadBalancerIngress, out *v1.LoadBalancerIngress, c *conversion.Cloner) error {
out.IP = in.IP
out.Hostname = in.Hostname
return nil
}
func deepCopy_v1_LoadBalancerStatus(in v1.LoadBalancerStatus, out *v1.LoadBalancerStatus, c *conversion.Cloner) error {
if in.Ingress != nil {
out.Ingress = make([]v1.LoadBalancerIngress, len(in.Ingress))
for i := range in.Ingress {
if err := deepCopy_v1_LoadBalancerIngress(in.Ingress[i], &out.Ingress[i], c); err != nil {
return err
}
}
} else {
out.Ingress = nil
}
return nil
}
func deepCopy_v1_LocalObjectReference(in v1.LocalObjectReference, out *v1.LocalObjectReference, c *conversion.Cloner) error {
out.Name = in.Name
return nil
......@@ -1009,6 +1029,97 @@ func deepCopy_v1_HorizontalPodAutoscalerStatus(in HorizontalPodAutoscalerStatus,
return nil
}
func deepCopy_v1_Ingress(in Ingress, out *Ingress, c *conversion.Cloner) error {
if err := deepCopy_unversioned_TypeMeta(in.TypeMeta, &out.TypeMeta, c); err != nil {
return err
}
if err := deepCopy_v1_ObjectMeta(in.ObjectMeta, &out.ObjectMeta, c); err != nil {
return err
}
if err := deepCopy_v1_IngressSpec(in.Spec, &out.Spec, c); err != nil {
return err
}
if err := deepCopy_v1_IngressStatus(in.Status, &out.Status, c); err != nil {
return err
}
return nil
}
func deepCopy_v1_IngressBackend(in IngressBackend, out *IngressBackend, c *conversion.Cloner) error {
if err := deepCopy_v1_LocalObjectReference(in.ServiceRef, &out.ServiceRef, c); err != nil {
return err
}
if err := deepCopy_util_IntOrString(in.ServicePort, &out.ServicePort, c); err != nil {
return err
}
out.Protocol = in.Protocol
return nil
}
func deepCopy_v1_IngressList(in IngressList, out *IngressList, c *conversion.Cloner) error {
if err := deepCopy_unversioned_TypeMeta(in.TypeMeta, &out.TypeMeta, c); err != nil {
return err
}
if err := deepCopy_unversioned_ListMeta(in.ListMeta, &out.ListMeta, c); err != nil {
return err
}
if in.Items != nil {
out.Items = make([]Ingress, len(in.Items))
for i := range in.Items {
if err := deepCopy_v1_Ingress(in.Items[i], &out.Items[i], c); err != nil {
return err
}
}
} else {
out.Items = nil
}
return nil
}
func deepCopy_v1_IngressPath(in IngressPath, out *IngressPath, c *conversion.Cloner) error {
out.Path = in.Path
if err := deepCopy_v1_IngressBackend(in.Backend, &out.Backend, c); err != nil {
return err
}
return nil
}
func deepCopy_v1_IngressRule(in IngressRule, out *IngressRule, c *conversion.Cloner) error {
out.Host = in.Host
if in.Paths != nil {
out.Paths = make([]IngressPath, len(in.Paths))
for i := range in.Paths {
if err := deepCopy_v1_IngressPath(in.Paths[i], &out.Paths[i], c); err != nil {
return err
}
}
} else {
out.Paths = nil
}
return nil
}
func deepCopy_v1_IngressSpec(in IngressSpec, out *IngressSpec, c *conversion.Cloner) error {
if in.Rules != nil {
out.Rules = make([]IngressRule, len(in.Rules))
for i := range in.Rules {
if err := deepCopy_v1_IngressRule(in.Rules[i], &out.Rules[i], c); err != nil {
return err
}
}
} else {
out.Rules = nil
}
return nil
}
func deepCopy_v1_IngressStatus(in IngressStatus, out *IngressStatus, c *conversion.Cloner) error {
if err := deepCopy_v1_LoadBalancerStatus(in.LoadBalancer, &out.LoadBalancer, c); err != nil {
return err
}
return nil
}
func deepCopy_v1_Job(in Job, out *Job, c *conversion.Cloner) error {
if err := deepCopy_unversioned_TypeMeta(in.TypeMeta, &out.TypeMeta, c); err != nil {
return err
......@@ -1315,6 +1426,8 @@ func init() {
deepCopy_v1_HostPathVolumeSource,
deepCopy_v1_ISCSIVolumeSource,
deepCopy_v1_Lifecycle,
deepCopy_v1_LoadBalancerIngress,
deepCopy_v1_LoadBalancerStatus,
deepCopy_v1_LocalObjectReference,
deepCopy_v1_NFSVolumeSource,
deepCopy_v1_ObjectFieldSelector,
......@@ -1346,6 +1459,13 @@ func init() {
deepCopy_v1_HorizontalPodAutoscalerList,
deepCopy_v1_HorizontalPodAutoscalerSpec,
deepCopy_v1_HorizontalPodAutoscalerStatus,
deepCopy_v1_Ingress,
deepCopy_v1_IngressBackend,
deepCopy_v1_IngressList,
deepCopy_v1_IngressPath,
deepCopy_v1_IngressRule,
deepCopy_v1_IngressSpec,
deepCopy_v1_IngressStatus,
deepCopy_v1_Job,
deepCopy_v1_JobCondition,
deepCopy_v1_JobList,
......
......@@ -46,6 +46,8 @@ func addKnownTypes() {
&DaemonSet{},
&ThirdPartyResourceData{},
&ThirdPartyResourceDataList{},
&Ingress{},
&IngressList{},
)
}
......@@ -63,3 +65,5 @@ func (*DaemonSet) IsAnAPIObject() {}
func (*DaemonSetList) IsAnAPIObject() {}
func (*ThirdPartyResourceData) IsAnAPIObject() {}
func (*ThirdPartyResourceDataList) IsAnAPIObject() {}
func (*Ingress) IsAnAPIObject() {}
func (*IngressList) IsAnAPIObject() {}
......@@ -464,3 +464,80 @@ type JobCondition struct {
// Human readable message indicating details about last transition.
Message string `json:"message,omitempty"`
}
// An Ingress is a way to give services externally-reachable urls. Each Ingress is a
// collection of rules that allow inbound connections to reach the endpoints defined by
// a backend.
type Ingress struct {
unversioned.TypeMeta `json:",inline"`
// Standard object's metadata.
// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
v1.ObjectMeta `json:"metadata,omitempty"`
// Spec is the desired state of the Ingress.
// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status
Spec IngressSpec `json:"spec,omitempty"`
// Status is the current state of the Ingress.
// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status
Status IngressStatus `json:"status,omitempty"`
}
// IngressList is a collection of Ingress.
type IngressList struct {
unversioned.TypeMeta `json:",inline"`
// Standard object's metadata.
// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
unversioned.ListMeta `json:"metadata,omitempty"`
// Items is the list of Ingress.
Items []Ingress `json:"items"`
}
// IngressSpec describes the Ingress the user wishes to exist.
type IngressSpec struct {
// TODO: Add the ability to specify load-balancer IP just like what Service has already done?
// A list of rules used to configure the Ingress.
// http://<host>:<port>/<path>?<searchpart> -> IngressBackend
// Where parts of the url conform to RFC 1738.
Rules []IngressRule `json:"rules"`
}
// IngressStatus describe the current state of the Ingress.
type IngressStatus struct {
// LoadBalancer contains the current status of the load-balancer.
LoadBalancer v1.LoadBalancerStatus `json:"loadBalancer,omitempty"`
}
// IngressRule represents the rules mapping the paths under a specified host to the related backend services.
type IngressRule struct {
// Host is the fully qualified domain name of a network host, or its IP
// address as a set of four decimal digit groups separated by ".".
// Conforms to RFC 1738.
Host string `json:"host,omitempty"`
// Paths describe a list of load-balancer rules under the specified host.
Paths []IngressPath `json:"paths"`
}
// IngressPath associates a path regex with an IngressBackend.
// Incoming urls matching the Path are forwarded to the Backend.
type IngressPath struct {
// Path is a regex matched against the url of an incoming request.
Path string `json:"path,omitempty"`
// Define the referenced service endpoint which the traffic will be forwarded to.
Backend IngressBackend `json:"backend"`
}
// IngressBackend describes all endpoints for a given Service, port and protocol.
type IngressBackend struct {
// Specifies the referenced service.
ServiceRef v1.LocalObjectReference `json:"serviceRef"`
// Specifies the port of the referenced service.
ServicePort util.IntOrString `json:"servicePort,omitempty"`
// Specifies the protocol of the referenced service.
Protocol v1.Protocol `json:"protocol,omitempty"`
}
......@@ -178,6 +178,76 @@ func (HorizontalPodAutoscalerStatus) SwaggerDoc() map[string]string {
return map_HorizontalPodAutoscalerStatus
}
var map_Ingress = map[string]string{
"": "An Ingress is a way to give services externally-reachable urls. Each Ingress is a collection of rules that allow inbound connections to reach the endpoints defined by a backend.",
"metadata": "Standard object's metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata",
"spec": "Spec is the desired state of the Ingress. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status",
"status": "Status is the current state of the Ingress. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status",
}
func (Ingress) SwaggerDoc() map[string]string {
return map_Ingress
}
var map_IngressBackend = map[string]string{
"": "IngressBackend describes all endpoints for a given Service, port and protocol.",
"serviceRef": "Specifies the referenced service.",
"servicePort": "Specifies the port of the referenced service.",
"protocol": "Specifies the protocol of the referenced service.",
}
func (IngressBackend) SwaggerDoc() map[string]string {
return map_IngressBackend
}
var map_IngressList = map[string]string{
"": "IngressList is a collection of Ingress.",
"metadata": "Standard object's metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata",
"items": "Items is the list of Ingress.",
}
func (IngressList) SwaggerDoc() map[string]string {
return map_IngressList
}
var map_IngressPath = map[string]string{
"": "IngressPath associates a path regex with an IngressBackend. Incoming urls matching the Path are forwarded to the Backend.",
"path": "Path is a regex matched against the url of an incoming request.",
"backend": "Define the referenced service endpoint which the traffic will be forwarded to.",
}
func (IngressPath) SwaggerDoc() map[string]string {
return map_IngressPath
}
var map_IngressRule = map[string]string{
"": "IngressRule represents the rules mapping the paths under a specified host to the related backend services.",
"host": "Host is the fully qualified domain name of a network host, or its IP address as a set of four decimal digit groups separated by \".\". Conforms to RFC 1738.",
"paths": "Paths describe a list of load-balancer rules under the specified host.",
}
func (IngressRule) SwaggerDoc() map[string]string {
return map_IngressRule
}
var map_IngressSpec = map[string]string{
"": "IngressSpec describes the Ingress the user wishes to exist.",
"rules": "A list of rules used to configure the Ingress. http://<host>:<port>/<path>?<searchpart> -> IngressBackend Where parts of the url conform to RFC 1738.",
}
func (IngressSpec) SwaggerDoc() map[string]string {
return map_IngressSpec
}
var map_IngressStatus = map[string]string{
"": "IngressStatus describe the current state of the Ingress.",
"loadBalancer": "LoadBalancer contains the current status of the load-balancer.",
}
func (IngressStatus) SwaggerDoc() map[string]string {
return map_IngressStatus
}
var map_Job = map[string]string{
"": "Job represents the configuration of a single job.",
"metadata": "Standard object's metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment