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