blob: a97c318db0e0a20383267c11458c13792cb55878 [file] [log] [blame]
Matteo Scandoloa4285862020-12-01 18:10:10 -08001/*
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 = "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 '/'. When unspecified,
39 // all paths from incoming requests are matched.
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 // A collection of paths that map requests to backends.
72 repeated HTTPIngressPath paths = 1;
73}
74
75// Ingress is a collection of rules that allow inbound connections to reach the
76// endpoints defined by a backend. An Ingress can be configured to give services
77// externally-reachable urls, load balance traffic, terminate SSL, offer name
78// based virtual hosting etc.
79message Ingress {
80 // Standard object's metadata.
81 // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
82 // +optional
83 optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
84
85 // Spec is the desired state of the Ingress.
86 // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
87 // +optional
88 optional IngressSpec spec = 2;
89
90 // Status is the current state of the Ingress.
91 // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
92 // +optional
93 optional IngressStatus status = 3;
94}
95
96// IngressBackend describes all endpoints for a given service and port.
97message IngressBackend {
98 // Specifies the name of the referenced service.
99 // +optional
100 optional string serviceName = 1;
101
102 // Specifies the port of the referenced service.
103 // +optional
104 optional k8s.io.apimachinery.pkg.util.intstr.IntOrString servicePort = 2;
105
106 // Resource is an ObjectRef to another Kubernetes resource in the namespace
107 // of the Ingress object. If resource is specified, serviceName and servicePort
108 // must not be specified.
109 // +optional
110 optional k8s.io.api.core.v1.TypedLocalObjectReference resource = 3;
111}
112
113// IngressClass represents the class of the Ingress, referenced by the Ingress
114// Spec. The `ingressclass.kubernetes.io/is-default-class` annotation can be
115// used to indicate that an IngressClass should be considered default. When a
116// single IngressClass resource has this annotation set to true, new Ingress
117// resources without a class specified will be assigned this default class.
118message IngressClass {
119 // Standard object's metadata.
120 // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
121 // +optional
122 optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
123
124 // Spec is the desired state of the IngressClass.
125 // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
126 // +optional
127 optional IngressClassSpec spec = 2;
128}
129
130// IngressClassList is a collection of IngressClasses.
131message IngressClassList {
132 // Standard list metadata.
133 // +optional
134 optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
135
136 // Items is the list of IngressClasses.
137 repeated IngressClass items = 2;
138}
139
140// IngressClassSpec provides information about the class of an Ingress.
141message IngressClassSpec {
142 // Controller refers to the name of the controller that should handle this
143 // class. This allows for different "flavors" that are controlled by the
144 // same controller. For example, you may have different Parameters for the
145 // same implementing controller. This should be specified as a
146 // domain-prefixed path no more than 250 characters in length, e.g.
147 // "acme.io/ingress-controller". This field is immutable.
148 optional string controller = 1;
149
150 // Parameters is a link to a custom resource containing additional
151 // configuration for the controller. This is optional if the controller does
152 // not require extra parameters.
153 // +optional
154 optional k8s.io.api.core.v1.TypedLocalObjectReference parameters = 2;
155}
156
157// IngressList is a collection of Ingress.
158message IngressList {
159 // Standard object's metadata.
160 // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
161 // +optional
162 optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
163
164 // Items is the list of Ingress.
165 repeated Ingress items = 2;
166}
167
168// IngressRule represents the rules mapping the paths under a specified host to
169// the related backend services. Incoming requests are first evaluated for a host
170// match, then routed to the backend associated with the matching IngressRuleValue.
171message IngressRule {
172 // Host is the fully qualified domain name of a network host, as defined by RFC 3986.
173 // Note the following deviations from the "host" part of the
174 // URI as defined in RFC 3986:
175 // 1. IPs are not allowed. Currently an IngressRuleValue can only apply to
176 // the IP in the Spec of the parent Ingress.
177 // 2. The `:` delimiter is not respected because ports are not allowed.
178 // Currently the port of an Ingress is implicitly :80 for http and
179 // :443 for https.
180 // Both these may change in the future.
181 // Incoming requests are matched against the host before the
182 // IngressRuleValue. If the host is unspecified, the Ingress routes all
183 // traffic based on the specified IngressRuleValue.
184 //
185 // Host can be "precise" which is a domain name without the terminating dot of
186 // a network host (e.g. "foo.bar.com") or "wildcard", which is a domain name
187 // prefixed with a single wildcard label (e.g. "*.foo.com").
188 // The wildcard character '*' must appear by itself as the first DNS label and
189 // matches only a single label. You cannot have a wildcard label by itself (e.g. Host == "*").
190 // Requests will be matched against the Host field in the following way:
191 // 1. If Host is precise, the request matches this rule if the http host header is equal to Host.
192 // 2. If Host is a wildcard, then the request matches this rule if the http host header
193 // is to equal to the suffix (removing the first label) of the wildcard rule.
194 // +optional
195 optional string host = 1;
196
197 // IngressRuleValue represents a rule to route requests for this IngressRule.
198 // If unspecified, the rule defaults to a http catch-all. Whether that sends
199 // just traffic matching the host to the default backend or all traffic to the
200 // default backend, is left to the controller fulfilling the Ingress. Http is
201 // currently the only supported IngressRuleValue.
202 // +optional
203 optional IngressRuleValue ingressRuleValue = 2;
204}
205
206// IngressRuleValue represents a rule to apply against incoming requests. If the
207// rule is satisfied, the request is routed to the specified backend. Currently
208// mixing different types of rules in a single Ingress is disallowed, so exactly
209// one of the following must be set.
210message IngressRuleValue {
211 // +optional
212 optional HTTPIngressRuleValue http = 1;
213}
214
215// IngressSpec describes the Ingress the user wishes to exist.
216message IngressSpec {
217 // IngressClassName is the name of the IngressClass cluster resource. The
218 // associated IngressClass defines which controller will implement the
219 // resource. This replaces the deprecated `kubernetes.io/ingress.class`
220 // annotation. For backwards compatibility, when that annotation is set, it
221 // must be given precedence over this field. The controller may emit a
222 // warning if the field and annotation have different values.
223 // Implementations of this API should ignore Ingresses without a class
224 // specified. An IngressClass resource may be marked as default, which can
225 // be used to set a default value for this field. For more information,
226 // refer to the IngressClass documentation.
227 // +optional
228 optional string ingressClassName = 4;
229
230 // A default backend capable of servicing requests that don't match any
231 // rule. At least one of 'backend' or 'rules' must be specified. This field
232 // is optional to allow the loadbalancer controller or defaulting logic to
233 // specify a global default.
234 // +optional
235 optional IngressBackend backend = 1;
236
237 // TLS configuration. Currently the Ingress only supports a single TLS
238 // port, 443. If multiple members of this list specify different hosts, they
239 // will be multiplexed on the same port according to the hostname specified
240 // through the SNI TLS extension, if the ingress controller fulfilling the
241 // ingress supports SNI.
242 // +optional
243 repeated IngressTLS tls = 2;
244
245 // A list of host rules used to configure the Ingress. If unspecified, or
246 // no rule matches, all traffic is sent to the default backend.
247 // +optional
248 repeated IngressRule rules = 3;
249}
250
251// IngressStatus describe the current state of the Ingress.
252message IngressStatus {
253 // LoadBalancer contains the current status of the load-balancer.
254 // +optional
255 optional k8s.io.api.core.v1.LoadBalancerStatus loadBalancer = 1;
256}
257
258// IngressTLS describes the transport layer security associated with an Ingress.
259message IngressTLS {
260 // Hosts are a list of hosts included in the TLS certificate. The values in
261 // this list must match the name/s used in the tlsSecret. Defaults to the
262 // wildcard host setting for the loadbalancer controller fulfilling this
263 // Ingress, if left unspecified.
264 // +optional
265 repeated string hosts = 1;
266
267 // SecretName is the name of the secret used to terminate TLS traffic on
268 // port 443. Field is left optional to allow TLS routing based on SNI
269 // hostname alone. If the SNI host in a listener conflicts with the "Host"
270 // header field used by an IngressRule, the SNI host is used for termination
271 // and value of the Host header is used for routing.
272 // +optional
273 optional string secretName = 2;
274}
275