Skip to content

Commit 7d75b73

Browse files
authored
Merge pull request kubernetes#74057 from liggitt/ingress-network-v1beta1
Ingress extensions/v1beta1 -> networking.k8s.io/v1beta1
2 parents 54240ce + f7f153e commit 7d75b73

File tree

115 files changed

+7606
-1492
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

115 files changed

+7606
-1492
lines changed

api/openapi-spec/swagger.json

Lines changed: 1655 additions & 304 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build/kazel_generated.bzl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ tags_values_pkgs = {"openapi-gen": {
6262
"staging/src/k8s.io/api/extensions/v1beta1",
6363
"staging/src/k8s.io/api/imagepolicy/v1alpha1",
6464
"staging/src/k8s.io/api/networking/v1",
65+
"staging/src/k8s.io/api/networking/v1beta1",
6566
"staging/src/k8s.io/api/policy/v1beta1",
6667
"staging/src/k8s.io/api/rbac/v1",
6768
"staging/src/k8s.io/api/rbac/v1alpha1",
@@ -135,6 +136,7 @@ tags_pkgs_values = {"openapi-gen": {
135136
"staging/src/k8s.io/api/extensions/v1beta1": ["true"],
136137
"staging/src/k8s.io/api/imagepolicy/v1alpha1": ["true"],
137138
"staging/src/k8s.io/api/networking/v1": ["true"],
139+
"staging/src/k8s.io/api/networking/v1beta1": ["true"],
138140
"staging/src/k8s.io/api/policy/v1beta1": ["true"],
139141
"staging/src/k8s.io/api/rbac/v1": ["true"],
140142
"staging/src/k8s.io/api/rbac/v1alpha1": ["true"],

cmd/kube-apiserver/app/aggregator.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -258,6 +258,7 @@ var apiVersionPriorities = map[schema.GroupVersion]priority{
258258
{Group: "batch", Version: "v2alpha1"}: {group: 17400, version: 9},
259259
{Group: "certificates.k8s.io", Version: "v1beta1"}: {group: 17300, version: 9},
260260
{Group: "networking.k8s.io", Version: "v1"}: {group: 17200, version: 15},
261+
{Group: "networking.k8s.io", Version: "v1beta1"}: {group: 17200, version: 9},
261262
{Group: "policy", Version: "v1beta1"}: {group: 17100, version: 9},
262263
{Group: "rbac.authorization.k8s.io", Version: "v1"}: {group: 17000, version: 15},
263264
{Group: "rbac.authorization.k8s.io", Version: "v1beta1"}: {group: 17000, version: 12},

hack/.golint_failures

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -303,8 +303,6 @@ pkg/registry/core/service/storage
303303
pkg/registry/core/serviceaccount/storage
304304
pkg/registry/events/rest
305305
pkg/registry/extensions/controller/storage
306-
pkg/registry/extensions/ingress
307-
pkg/registry/extensions/ingress/storage
308306
pkg/registry/extensions/rest
309307
pkg/registry/networking/networkpolicy/storage
310308
pkg/registry/networking/rest

hack/lib/init.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ extensions/v1beta1 \
7979
events.k8s.io/v1beta1 \
8080
imagepolicy.k8s.io/v1alpha1 \
8181
networking.k8s.io/v1 \
82+
networking.k8s.io/v1beta1 \
8283
policy/v1beta1 \
8384
rbac.authorization.k8s.io/v1 \
8485
rbac.authorization.k8s.io/v1beta1 \

hack/update-generated-protobuf-dockerized.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ PACKAGES=(
7979
k8s.io/api/admissionregistration/v1beta1
8080
k8s.io/api/admission/v1beta1
8181
k8s.io/api/auditregistration/v1alpha1
82+
k8s.io/api/networking/v1beta1
8283
k8s.io/api/networking/v1
8384
k8s.io/metrics/pkg/apis/metrics/v1alpha1
8485
k8s.io/metrics/pkg/apis/metrics/v1beta1

pkg/apis/extensions/BUILD

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,11 @@ go_library(
1717
deps = [
1818
"//pkg/apis/apps:go_default_library",
1919
"//pkg/apis/autoscaling:go_default_library",
20-
"//pkg/apis/core:go_default_library",
2120
"//pkg/apis/networking:go_default_library",
2221
"//pkg/apis/policy:go_default_library",
2322
"//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library",
2423
"//staging/src/k8s.io/apimachinery/pkg/runtime:go_default_library",
2524
"//staging/src/k8s.io/apimachinery/pkg/runtime/schema:go_default_library",
26-
"//staging/src/k8s.io/apimachinery/pkg/util/intstr:go_default_library",
2725
],
2826
)
2927

pkg/apis/extensions/register.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,8 @@ func addKnownTypes(scheme *runtime.Scheme) error {
5656
&ReplicationControllerDummy{},
5757
&apps.DaemonSetList{},
5858
&apps.DaemonSet{},
59-
&Ingress{},
60-
&IngressList{},
59+
&networking.Ingress{},
60+
&networking.IngressList{},
6161
&apps.ReplicaSet{},
6262
&apps.ReplicaSetList{},
6363
&policy.PodSecurityPolicy{},

pkg/apis/extensions/types.go

Lines changed: 0 additions & 171 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,6 @@ package extensions
3030

3131
import (
3232
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
33-
"k8s.io/apimachinery/pkg/util/intstr"
34-
api "k8s.io/kubernetes/pkg/apis/core"
3533
)
3634

3735
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
@@ -40,172 +38,3 @@ import (
4038
type ReplicationControllerDummy struct {
4139
metav1.TypeMeta
4240
}
43-
44-
// +genclient
45-
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
46-
47-
// Ingress is a collection of rules that allow inbound connections to reach the
48-
// endpoints defined by a backend. An Ingress can be configured to give services
49-
// externally-reachable urls, load balance traffic, terminate SSL, offer name
50-
// based virtual hosting etc.
51-
type Ingress struct {
52-
metav1.TypeMeta
53-
// Standard object's metadata.
54-
// More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
55-
// +optional
56-
metav1.ObjectMeta
57-
58-
// Spec is the desired state of the Ingress.
59-
// More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
60-
// +optional
61-
Spec IngressSpec
62-
63-
// Status is the current state of the Ingress.
64-
// More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
65-
// +optional
66-
Status IngressStatus
67-
}
68-
69-
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
70-
71-
// IngressList is a collection of Ingress.
72-
type IngressList struct {
73-
metav1.TypeMeta
74-
// Standard object's metadata.
75-
// More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
76-
// +optional
77-
metav1.ListMeta
78-
79-
// Items is the list of Ingress.
80-
Items []Ingress
81-
}
82-
83-
// IngressSpec describes the Ingress the user wishes to exist.
84-
type IngressSpec struct {
85-
// A default backend capable of servicing requests that don't match any
86-
// rule. At least one of 'backend' or 'rules' must be specified. This field
87-
// is optional to allow the loadbalancer controller or defaulting logic to
88-
// specify a global default.
89-
// +optional
90-
Backend *IngressBackend
91-
92-
// TLS configuration. Currently the Ingress only supports a single TLS
93-
// port, 443. If multiple members of this list specify different hosts, they
94-
// will be multiplexed on the same port according to the hostname specified
95-
// through the SNI TLS extension, if the ingress controller fulfilling the
96-
// ingress supports SNI.
97-
// +optional
98-
TLS []IngressTLS
99-
100-
// A list of host rules used to configure the Ingress. If unspecified, or
101-
// no rule matches, all traffic is sent to the default backend.
102-
// +optional
103-
Rules []IngressRule
104-
// TODO: Add the ability to specify load-balancer IP through claims
105-
}
106-
107-
// IngressTLS describes the transport layer security associated with an Ingress.
108-
type IngressTLS struct {
109-
// Hosts are a list of hosts included in the TLS certificate. The values in
110-
// this list must match the name/s used in the tlsSecret. Defaults to the
111-
// wildcard host setting for the loadbalancer controller fulfilling this
112-
// Ingress, if left unspecified.
113-
// +optional
114-
Hosts []string
115-
// SecretName is the name of the secret used to terminate SSL traffic on 443.
116-
// Field is left optional to allow SSL routing based on SNI hostname alone.
117-
// If the SNI host in a listener conflicts with the "Host" header field used
118-
// by an IngressRule, the SNI host is used for termination and value of the
119-
// Host header is used for routing.
120-
// +optional
121-
SecretName string
122-
// TODO: Consider specifying different modes of termination, protocols etc.
123-
}
124-
125-
// IngressStatus describe the current state of the Ingress.
126-
type IngressStatus struct {
127-
// LoadBalancer contains the current status of the load-balancer.
128-
// +optional
129-
LoadBalancer api.LoadBalancerStatus
130-
}
131-
132-
// IngressRule represents the rules mapping the paths under a specified host to
133-
// the related backend services. Incoming requests are first evaluated for a host
134-
// match, then routed to the backend associated with the matching IngressRuleValue.
135-
type IngressRule struct {
136-
// Host is the fully qualified domain name of a network host, as defined
137-
// by RFC 3986. Note the following deviations from the "host" part of the
138-
// URI as defined in the RFC:
139-
// 1. IPs are not allowed. Currently an IngressRuleValue can only apply to the
140-
// IP in the Spec of the parent Ingress.
141-
// 2. The `:` delimiter is not respected because ports are not allowed.
142-
// Currently the port of an Ingress is implicitly :80 for http and
143-
// :443 for https.
144-
// Both these may change in the future.
145-
// Incoming requests are matched against the host before the IngressRuleValue.
146-
// If the host is unspecified, the Ingress routes all traffic based on the
147-
// specified IngressRuleValue.
148-
// +optional
149-
Host string
150-
// IngressRuleValue represents a rule to route requests for this IngressRule.
151-
// If unspecified, the rule defaults to a http catch-all. Whether that sends
152-
// just traffic matching the host to the default backend or all traffic to the
153-
// default backend, is left to the controller fulfilling the Ingress. Http is
154-
// currently the only supported IngressRuleValue.
155-
// +optional
156-
IngressRuleValue
157-
}
158-
159-
// IngressRuleValue represents a rule to apply against incoming requests. If the
160-
// rule is satisfied, the request is routed to the specified backend. Currently
161-
// mixing different types of rules in a single Ingress is disallowed, so exactly
162-
// one of the following must be set.
163-
type IngressRuleValue struct {
164-
//TODO:
165-
// 1. Consider renaming this resource and the associated rules so they
166-
// aren't tied to Ingress. They can be used to route intra-cluster traffic.
167-
// 2. Consider adding fields for ingress-type specific global options
168-
// usable by a loadbalancer, like http keep-alive.
169-
170-
// +optional
171-
HTTP *HTTPIngressRuleValue
172-
}
173-
174-
// HTTPIngressRuleValue is a list of http selectors pointing to backends.
175-
// In the example: http://<host>/<path>?<searchpart> -> backend where
176-
// where parts of the url correspond to RFC 3986, this resource will be used
177-
// to match against everything after the last '/' and before the first '?'
178-
// or '#'.
179-
type HTTPIngressRuleValue struct {
180-
// A collection of paths that map requests to backends.
181-
Paths []HTTPIngressPath
182-
// TODO: Consider adding fields for ingress-type specific global
183-
// options usable by a loadbalancer, like http keep-alive.
184-
}
185-
186-
// HTTPIngressPath associates a path regex with a backend. Incoming urls matching
187-
// the path are forwarded to the backend.
188-
type HTTPIngressPath struct {
189-
// Path is an extended POSIX regex as defined by IEEE Std 1003.1,
190-
// (i.e this follows the egrep/unix syntax, not the perl syntax)
191-
// matched against the path of an incoming request. Currently it can
192-
// contain characters disallowed from the conventional "path"
193-
// part of a URL as defined by RFC 3986. Paths must begin with
194-
// a '/'. If unspecified, the path defaults to a catch all sending
195-
// traffic to the backend.
196-
// +optional
197-
Path string
198-
199-
// Backend defines the referenced service endpoint to which the traffic
200-
// will be forwarded to.
201-
Backend IngressBackend
202-
}
203-
204-
// IngressBackend describes all endpoints for a given service and port.
205-
type IngressBackend struct {
206-
// Specifies the name of the referenced service.
207-
ServiceName string
208-
209-
// Specifies the port of the referenced service.
210-
ServicePort intstr.IntOrString
211-
}

pkg/apis/extensions/v1beta1/doc.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ limitations under the License.
1616

1717
// +k8s:conversion-gen=k8s.io/kubernetes/pkg/apis/apps
1818
// +k8s:conversion-gen=k8s.io/kubernetes/pkg/apis/policy
19+
// +k8s:conversion-gen=k8s.io/kubernetes/pkg/apis/networking
1920
// +k8s:conversion-gen=k8s.io/kubernetes/pkg/apis/extensions
2021
// +k8s:conversion-gen=k8s.io/kubernetes/pkg/apis/autoscaling
2122
// +k8s:conversion-gen-external-types=k8s.io/api/extensions/v1beta1

0 commit comments

Comments
 (0)