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 = "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 // +listType=set 138 repeated IngressClass items = 2; 139} 140 141// IngressClassSpec provides information about the class of an Ingress. 142message IngressClassSpec { 143 // Controller refers to the name of the controller that should handle this 144 // class. This allows for different "flavors" that are controlled by the 145 // same controller. For example, you may have different Parameters for the 146 // same implementing controller. This should be specified as a 147 // domain-prefixed path no more than 250 characters in length, e.g. 148 // "acme.io/ingress-controller". This field is immutable. 149 optional string controller = 1; 150 151 // Parameters is a link to a custom resource containing additional 152 // configuration for the controller. This is optional if the controller does 153 // not require extra parameters. 154 // +optional 155 optional k8s.io.api.core.v1.TypedLocalObjectReference parameters = 2; 156} 157 158// IngressList is a collection of Ingress. 159message IngressList { 160 // Standard object's metadata. 161 // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata 162 // +optional 163 optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; 164 165 // Items is the list of Ingress. 166 repeated Ingress items = 2; 167} 168 169// IngressRule represents the rules mapping the paths under a specified host to 170// the related backend services. Incoming requests are first evaluated for a host 171// match, then routed to the backend associated with the matching IngressRuleValue. 172message IngressRule { 173 // Host is the fully qualified domain name of a network host, as defined by RFC 3986. 174 // Note the following deviations from the "host" part of the 175 // URI as defined in RFC 3986: 176 // 1. IPs are not allowed. Currently an IngressRuleValue can only apply to 177 // the IP in the Spec of the parent Ingress. 178 // 2. The `:` delimiter is not respected because ports are not allowed. 179 // Currently the port of an Ingress is implicitly :80 for http and 180 // :443 for https. 181 // Both these may change in the future. 182 // Incoming requests are matched against the host before the 183 // IngressRuleValue. If the host is unspecified, the Ingress routes all 184 // traffic based on the specified IngressRuleValue. 185 // 186 // Host can be "precise" which is a domain name without the terminating dot of 187 // a network host (e.g. "foo.bar.com") or "wildcard", which is a domain name 188 // prefixed with a single wildcard label (e.g. "*.foo.com"). 189 // The wildcard character '*' must appear by itself as the first DNS label and 190 // matches only a single label. You cannot have a wildcard label by itself (e.g. Host == "*"). 191 // Requests will be matched against the Host field in the following way: 192 // 1. If Host is precise, the request matches this rule if the http host header is equal to Host. 193 // 2. If Host is a wildcard, then the request matches this rule if the http host header 194 // is to equal to the suffix (removing the first label) of the wildcard rule. 195 // +optional 196 optional string host = 1; 197 198 // IngressRuleValue represents a rule to route requests for this IngressRule. 199 // If unspecified, the rule defaults to a http catch-all. Whether that sends 200 // just traffic matching the host to the default backend or all traffic to the 201 // default backend, is left to the controller fulfilling the Ingress. Http is 202 // currently the only supported IngressRuleValue. 203 // +optional 204 optional IngressRuleValue ingressRuleValue = 2; 205} 206 207// IngressRuleValue represents a rule to apply against incoming requests. If the 208// rule is satisfied, the request is routed to the specified backend. Currently 209// mixing different types of rules in a single Ingress is disallowed, so exactly 210// one of the following must be set. 211message IngressRuleValue { 212 // +optional 213 optional HTTPIngressRuleValue http = 1; 214} 215 216// IngressSpec describes the Ingress the user wishes to exist. 217message IngressSpec { 218 // IngressClassName is the name of the IngressClass cluster resource. The 219 // associated IngressClass defines which controller will implement the 220 // resource. This replaces the deprecated `kubernetes.io/ingress.class` 221 // annotation. For backwards compatibility, when that annotation is set, it 222 // must be given precedence over this field. The controller may emit a 223 // warning if the field and annotation have different values. 224 // Implementations of this API should ignore Ingresses without a class 225 // specified. An IngressClass resource may be marked as default, which can 226 // be used to set a default value for this field. For more information, 227 // refer to the IngressClass documentation. 228 // +optional 229 optional string ingressClassName = 4; 230 231 // A default backend capable of servicing requests that don't match any 232 // rule. At least one of 'backend' or 'rules' must be specified. This field 233 // is optional to allow the loadbalancer controller or defaulting logic to 234 // specify a global default. 235 // +optional 236 optional IngressBackend backend = 1; 237 238 // TLS configuration. Currently the Ingress only supports a single TLS 239 // port, 443. If multiple members of this list specify different hosts, they 240 // will be multiplexed on the same port according to the hostname specified 241 // through the SNI TLS extension, if the ingress controller fulfilling the 242 // ingress supports SNI. 243 // +optional 244 repeated IngressTLS tls = 2; 245 246 // A list of host rules used to configure the Ingress. If unspecified, or 247 // no rule matches, all traffic is sent to the default backend. 248 // +optional 249 repeated IngressRule rules = 3; 250} 251 252// IngressStatus describe the current state of the Ingress. 253message IngressStatus { 254 // LoadBalancer contains the current status of the load-balancer. 255 // +optional 256 optional k8s.io.api.core.v1.LoadBalancerStatus loadBalancer = 1; 257} 258 259// IngressTLS describes the transport layer security associated with an Ingress. 260message IngressTLS { 261 // Hosts are a list of hosts included in the TLS certificate. The values in 262 // this list must match the name/s used in the tlsSecret. Defaults to the 263 // wildcard host setting for the loadbalancer controller fulfilling this 264 // Ingress, if left unspecified. 265 // +optional 266 repeated string hosts = 1; 267 268 // SecretName is the name of the secret used to terminate TLS traffic on 269 // port 443. Field is left optional to allow TLS routing based on SNI 270 // hostname alone. If the SNI host in a listener conflicts with the "Host" 271 // header field used by an IngressRule, the SNI host is used for termination 272 // and value of the Host header is used for routing. 273 // +optional 274 optional string secretName = 2; 275} 276 277