...
1/*
2Copyright The Kubernetes Authors.
3
4Licensed under the Apache License, Version 2.0 (the "License");
5you may not use this file except in compliance with the License.
6You may obtain a copy of the License at
7
8 http://www.apache.org/licenses/LICENSE-2.0
9
10Unless required by applicable law or agreed to in writing, software
11distributed under the License is distributed on an "AS IS" BASIS,
12WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13See the License for the specific language governing permissions and
14limitations under the License.
15*/
16
17
18// This file was autogenerated by go-to-protobuf. Do not edit it manually!
19
20syntax = "proto2";
21
22package k8s.io.api.networking.v1beta1;
23
24import "k8s.io/api/core/v1/generated.proto";
25import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto";
26import "k8s.io/apimachinery/pkg/runtime/generated.proto";
27import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto";
28import "k8s.io/apimachinery/pkg/util/intstr/generated.proto";
29
30// Package-wide variables from generator "generated".
31option go_package = "k8s.io/api/networking/v1beta1";
32
33// HTTPIngressPath associates a path with a backend. Incoming urls matching the
34// path are forwarded to the backend.
35message HTTPIngressPath {
36 // path is matched against the path of an incoming request. Currently it can
37 // contain characters disallowed from the conventional "path" part of a URL
38 // as defined by RFC 3986. Paths must begin with a '/' and must be present
39 // when using PathType with value "Exact" or "Prefix".
40 // +optional
41 optional string path = 1;
42
43 // pathType determines the interpretation of the path matching. PathType can
44 // be one of the following values:
45 // * Exact: Matches the URL path exactly.
46 // * Prefix: Matches based on a URL path prefix split by '/'. Matching is
47 // done on a path element by element basis. A path element refers is the
48 // list of labels in the path split by the '/' separator. A request is a
49 // match for path p if every p is an element-wise prefix of p of the
50 // request path. Note that if the last element of the path is a substring
51 // of the last element in request path, it is not a match (e.g. /foo/bar
52 // matches /foo/bar/baz, but does not match /foo/barbaz).
53 // * ImplementationSpecific: Interpretation of the Path matching is up to
54 // the IngressClass. Implementations can treat this as a separate PathType
55 // or treat it identically to Prefix or Exact path types.
56 // Implementations are required to support all path types.
57 // Defaults to ImplementationSpecific.
58 optional string pathType = 3;
59
60 // backend defines the referenced service endpoint to which the traffic
61 // will be forwarded to.
62 optional IngressBackend backend = 2;
63}
64
65// HTTPIngressRuleValue is a list of http selectors pointing to backends.
66// In the example: http://<host>/<path>?<searchpart> -> backend where
67// where parts of the url correspond to RFC 3986, this resource will be used
68// to match against everything after the last '/' and before the first '?'
69// or '#'.
70message HTTPIngressRuleValue {
71 // paths is a collection of paths that map requests to backends.
72 // +listType=atomic
73 repeated HTTPIngressPath paths = 1;
74}
75
76// Ingress is a collection of rules that allow inbound connections to reach the
77// endpoints defined by a backend. An Ingress can be configured to give services
78// externally-reachable urls, load balance traffic, terminate SSL, offer name
79// based virtual hosting etc.
80message Ingress {
81 // Standard object's metadata.
82 // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
83 // +optional
84 optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
85
86 // spec is the desired state of the Ingress.
87 // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
88 // +optional
89 optional IngressSpec spec = 2;
90
91 // status is the current state of the Ingress.
92 // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
93 // +optional
94 optional IngressStatus status = 3;
95}
96
97// IngressBackend describes all endpoints for a given service and port.
98message IngressBackend {
99 // serviceName specifies the name of the referenced service.
100 // +optional
101 optional string serviceName = 1;
102
103 // servicePort Specifies the port of the referenced service.
104 // +optional
105 optional k8s.io.apimachinery.pkg.util.intstr.IntOrString servicePort = 2;
106
107 // resource is an ObjectRef to another Kubernetes resource in the namespace
108 // of the Ingress object. If resource is specified, serviceName and servicePort
109 // must not be specified.
110 // +optional
111 optional k8s.io.api.core.v1.TypedLocalObjectReference resource = 3;
112}
113
114// IngressClass represents the class of the Ingress, referenced by the Ingress
115// Spec. The `ingressclass.kubernetes.io/is-default-class` annotation can be
116// used to indicate that an IngressClass should be considered default. When a
117// single IngressClass resource has this annotation set to true, new Ingress
118// resources without a class specified will be assigned this default class.
119message IngressClass {
120 // Standard object's metadata.
121 // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
122 // +optional
123 optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
124
125 // spec is the desired state of the IngressClass.
126 // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
127 // +optional
128 optional IngressClassSpec spec = 2;
129}
130
131// IngressClassList is a collection of IngressClasses.
132message IngressClassList {
133 // Standard list metadata.
134 // +optional
135 optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
136
137 // items is the list of IngressClasses.
138 repeated IngressClass items = 2;
139}
140
141// IngressClassParametersReference identifies an API object. This can be used
142// to specify a cluster or namespace-scoped resource.
143message IngressClassParametersReference {
144 // apiGroup is the group for the resource being referenced. If APIGroup is
145 // not specified, the specified Kind must be in the core API group. For any
146 // other third-party types, APIGroup is required.
147 // +optional
148 optional string aPIGroup = 1;
149
150 // kind is the type of resource being referenced.
151 optional string kind = 2;
152
153 // name is the name of resource being referenced.
154 optional string name = 3;
155
156 // scope represents if this refers to a cluster or namespace scoped resource.
157 // This may be set to "Cluster" (default) or "Namespace".
158 optional string scope = 4;
159
160 // namespace is the namespace of the resource being referenced. This field is
161 // required when scope is set to "Namespace" and must be unset when scope is set to
162 // "Cluster".
163 // +optional
164 optional string namespace = 5;
165}
166
167// IngressClassSpec provides information about the class of an Ingress.
168message IngressClassSpec {
169 // controller refers to the name of the controller that should handle this
170 // class. This allows for different "flavors" that are controlled by the
171 // same controller. For example, you may have different parameters for the
172 // same implementing controller. This should be specified as a
173 // domain-prefixed path no more than 250 characters in length, e.g.
174 // "acme.io/ingress-controller". This field is immutable.
175 optional string controller = 1;
176
177 // parameters is a link to a custom resource containing additional
178 // configuration for the controller. This is optional if the controller does
179 // not require extra parameters.
180 // +optional
181 optional IngressClassParametersReference parameters = 2;
182}
183
184// IngressList is a collection of Ingress.
185message IngressList {
186 // Standard object's metadata.
187 // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
188 // +optional
189 optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
190
191 // items is the list of Ingress.
192 repeated Ingress items = 2;
193}
194
195// IngressLoadBalancerIngress represents the status of a load-balancer ingress point.
196message IngressLoadBalancerIngress {
197 // ip is set for load-balancer ingress points that are IP based.
198 // +optional
199 optional string ip = 1;
200
201 // hostname is set for load-balancer ingress points that are DNS based.
202 // +optional
203 optional string hostname = 2;
204
205 // ports provides information about the ports exposed by this LoadBalancer.
206 // +listType=atomic
207 // +optional
208 repeated IngressPortStatus ports = 4;
209}
210
211// LoadBalancerStatus represents the status of a load-balancer.
212message IngressLoadBalancerStatus {
213 // ingress is a list containing ingress points for the load-balancer.
214 // +optional
215 // +listType=atomic
216 repeated IngressLoadBalancerIngress ingress = 1;
217}
218
219// IngressPortStatus represents the error condition of a service port
220message IngressPortStatus {
221 // port is the port number of the ingress port.
222 optional int32 port = 1;
223
224 // protocol is the protocol of the ingress port.
225 // The supported values are: "TCP", "UDP", "SCTP"
226 optional string protocol = 2;
227
228 // error is to record the problem with the service port
229 // The format of the error shall comply with the following rules:
230 // - built-in error values shall be specified in this file and those shall use
231 // CamelCase names
232 // - cloud provider specific error values must have names that comply with the
233 // format foo.example.com/CamelCase.
234 // ---
235 // The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt)
236 // +optional
237 // +kubebuilder:validation:Required
238 // +kubebuilder:validation:Pattern=`^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$`
239 // +kubebuilder:validation:MaxLength=316
240 optional string error = 3;
241}
242
243// IngressRule represents the rules mapping the paths under a specified host to
244// the related backend services. Incoming requests are first evaluated for a host
245// match, then routed to the backend associated with the matching IngressRuleValue.
246message IngressRule {
247 // host is the fully qualified domain name of a network host, as defined by RFC 3986.
248 // Note the following deviations from the "host" part of the
249 // URI as defined in RFC 3986:
250 // 1. IPs are not allowed. Currently an IngressRuleValue can only apply to
251 // the IP in the Spec of the parent Ingress.
252 // 2. The `:` delimiter is not respected because ports are not allowed.
253 // Currently the port of an Ingress is implicitly :80 for http and
254 // :443 for https.
255 // Both these may change in the future.
256 // Incoming requests are matched against the host before the
257 // IngressRuleValue. If the host is unspecified, the Ingress routes all
258 // traffic based on the specified IngressRuleValue.
259 //
260 // host can be "precise" which is a domain name without the terminating dot of
261 // a network host (e.g. "foo.bar.com") or "wildcard", which is a domain name
262 // prefixed with a single wildcard label (e.g. "*.foo.com").
263 // The wildcard character '*' must appear by itself as the first DNS label and
264 // matches only a single label. You cannot have a wildcard label by itself (e.g. Host == "*").
265 // Requests will be matched against the Host field in the following way:
266 // 1. If Host is precise, the request matches this rule if the http host header is equal to Host.
267 // 2. If Host is a wildcard, then the request matches this rule if the http host header
268 // is to equal to the suffix (removing the first label) of the wildcard rule.
269 // +optional
270 optional string host = 1;
271
272 // IngressRuleValue represents a rule to route requests for this IngressRule.
273 // If unspecified, the rule defaults to a http catch-all. Whether that sends
274 // just traffic matching the host to the default backend or all traffic to the
275 // default backend, is left to the controller fulfilling the Ingress. Http is
276 // currently the only supported IngressRuleValue.
277 // +optional
278 optional IngressRuleValue ingressRuleValue = 2;
279}
280
281// IngressRuleValue represents a rule to apply against incoming requests. If the
282// rule is satisfied, the request is routed to the specified backend. Currently
283// mixing different types of rules in a single Ingress is disallowed, so exactly
284// one of the following must be set.
285message IngressRuleValue {
286 // +optional
287 optional HTTPIngressRuleValue http = 1;
288}
289
290// IngressSpec describes the Ingress the user wishes to exist.
291message IngressSpec {
292 // ingressClassName is the name of the IngressClass cluster resource. The
293 // associated IngressClass defines which controller will implement the
294 // resource. This replaces the deprecated `kubernetes.io/ingress.class`
295 // annotation. For backwards compatibility, when that annotation is set, it
296 // must be given precedence over this field. The controller may emit a
297 // warning if the field and annotation have different values.
298 // Implementations of this API should ignore Ingresses without a class
299 // specified. An IngressClass resource may be marked as default, which can
300 // be used to set a default value for this field. For more information,
301 // refer to the IngressClass documentation.
302 // +optional
303 optional string ingressClassName = 4;
304
305 // backend is the default backend capable of servicing requests that don't match any
306 // rule. At least one of 'backend' or 'rules' must be specified. This field
307 // is optional to allow the loadbalancer controller or defaulting logic to
308 // specify a global default.
309 // +optional
310 optional IngressBackend backend = 1;
311
312 // tls represents the TLS configuration. Currently the Ingress only supports a
313 // single TLS port, 443. If multiple members of this list specify different hosts,
314 // they will be multiplexed on the same port according to the hostname specified
315 // through the SNI TLS extension, if the ingress controller fulfilling the
316 // ingress supports SNI.
317 // +optional
318 // +listType=atomic
319 repeated IngressTLS tls = 2;
320
321 // rules is a list of host rules used to configure the Ingress. If unspecified, or
322 // no rule matches, all traffic is sent to the default backend.
323 // +optional
324 // +listType=atomic
325 repeated IngressRule rules = 3;
326}
327
328// IngressStatus describes the current state of the Ingress.
329message IngressStatus {
330 // loadBalancer contains the current status of the load-balancer.
331 // +optional
332 optional IngressLoadBalancerStatus loadBalancer = 1;
333}
334
335// IngressTLS describes the transport layer security associated with an Ingress.
336message IngressTLS {
337 // hosts is a list of hosts included in the TLS certificate. The values in
338 // this list must match the name/s used in the tlsSecret. Defaults to the
339 // wildcard host setting for the loadbalancer controller fulfilling this
340 // Ingress, if left unspecified.
341 // +optional
342 // +listType=atomic
343 repeated string hosts = 1;
344
345 // secretName is the name of the secret used to terminate TLS traffic on
346 // port 443. Field is left optional to allow TLS routing based on SNI
347 // hostname alone. If the SNI host in a listener conflicts with the "Host"
348 // header field used by an IngressRule, the SNI host is used for termination
349 // and value of the Host header is used for routing.
350 // +optional
351 optional string secretName = 2;
352}
353
View as plain text