generated.proto 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275
  1. /*
  2. Copyright The Kubernetes Authors.
  3. Licensed under the Apache License, Version 2.0 (the "License");
  4. you may not use this file except in compliance with the License.
  5. You may obtain a copy of the License at
  6. http://www.apache.org/licenses/LICENSE-2.0
  7. Unless required by applicable law or agreed to in writing, software
  8. distributed under the License is distributed on an "AS IS" BASIS,
  9. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  10. See the License for the specific language governing permissions and
  11. limitations under the License.
  12. */
  13. // This file was autogenerated by go-to-protobuf. Do not edit it manually!
  14. syntax = 'proto2';
  15. package k8s.io.api.networking.v1beta1;
  16. import "k8s.io/api/core/v1/generated.proto";
  17. import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto";
  18. import "k8s.io/apimachinery/pkg/runtime/generated.proto";
  19. import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto";
  20. import "k8s.io/apimachinery/pkg/util/intstr/generated.proto";
  21. // Package-wide variables from generator "generated".
  22. option go_package = "v1beta1";
  23. // HTTPIngressPath associates a path with a backend. Incoming urls matching the
  24. // path are forwarded to the backend.
  25. message HTTPIngressPath {
  26. // Path is matched against the path of an incoming request. Currently it can
  27. // contain characters disallowed from the conventional "path" part of a URL
  28. // as defined by RFC 3986. Paths must begin with a '/'. When unspecified,
  29. // all paths from incoming requests are matched.
  30. // +optional
  31. optional string path = 1;
  32. // PathType determines the interpretation of the Path matching. PathType can
  33. // be one of the following values:
  34. // * Exact: Matches the URL path exactly.
  35. // * Prefix: Matches based on a URL path prefix split by '/'. Matching is
  36. // done on a path element by element basis. A path element refers is the
  37. // list of labels in the path split by the '/' separator. A request is a
  38. // match for path p if every p is an element-wise prefix of p of the
  39. // request path. Note that if the last element of the path is a substring
  40. // of the last element in request path, it is not a match (e.g. /foo/bar
  41. // matches /foo/bar/baz, but does not match /foo/barbaz).
  42. // * ImplementationSpecific: Interpretation of the Path matching is up to
  43. // the IngressClass. Implementations can treat this as a separate PathType
  44. // or treat it identically to Prefix or Exact path types.
  45. // Implementations are required to support all path types.
  46. // Defaults to ImplementationSpecific.
  47. optional string pathType = 3;
  48. // Backend defines the referenced service endpoint to which the traffic
  49. // will be forwarded to.
  50. optional IngressBackend backend = 2;
  51. }
  52. // HTTPIngressRuleValue is a list of http selectors pointing to backends.
  53. // In the example: http://<host>/<path>?<searchpart> -> backend where
  54. // where parts of the url correspond to RFC 3986, this resource will be used
  55. // to match against everything after the last '/' and before the first '?'
  56. // or '#'.
  57. message HTTPIngressRuleValue {
  58. // A collection of paths that map requests to backends.
  59. repeated HTTPIngressPath paths = 1;
  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.
  65. message Ingress {
  66. // Standard object's metadata.
  67. // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
  68. // +optional
  69. optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
  70. // Spec is the desired state of the Ingress.
  71. // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
  72. // +optional
  73. optional IngressSpec spec = 2;
  74. // Status is the current state of the Ingress.
  75. // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
  76. // +optional
  77. optional IngressStatus status = 3;
  78. }
  79. // IngressBackend describes all endpoints for a given service and port.
  80. message IngressBackend {
  81. // Specifies the name of the referenced service.
  82. // +optional
  83. optional string serviceName = 1;
  84. // Specifies the port of the referenced service.
  85. // +optional
  86. optional k8s.io.apimachinery.pkg.util.intstr.IntOrString servicePort = 2;
  87. // Resource is an ObjectRef to another Kubernetes resource in the namespace
  88. // of the Ingress object. If resource is specified, serviceName and servicePort
  89. // must not be specified.
  90. // +optional
  91. optional k8s.io.api.core.v1.TypedLocalObjectReference resource = 3;
  92. }
  93. // IngressClass represents the class of the Ingress, referenced by the Ingress
  94. // Spec. The `ingressclass.kubernetes.io/is-default-class` annotation can be
  95. // used to indicate that an IngressClass should be considered default. When a
  96. // single IngressClass resource has this annotation set to true, new Ingress
  97. // resources without a class specified will be assigned this default class.
  98. message IngressClass {
  99. // Standard object's metadata.
  100. // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
  101. // +optional
  102. optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
  103. // Spec is the desired state of the IngressClass.
  104. // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
  105. // +optional
  106. optional IngressClassSpec spec = 2;
  107. }
  108. // IngressClassList is a collection of IngressClasses.
  109. message IngressClassList {
  110. // Standard list metadata.
  111. // +optional
  112. optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
  113. // Items is the list of IngressClasses.
  114. repeated IngressClass items = 2;
  115. }
  116. // IngressClassSpec provides information about the class of an Ingress.
  117. message IngressClassSpec {
  118. // Controller refers to the name of the controller that should handle this
  119. // class. This allows for different "flavors" that are controlled by the
  120. // same controller. For example, you may have different Parameters for the
  121. // same implementing controller. This should be specified as a
  122. // domain-prefixed path no more than 250 characters in length, e.g.
  123. // "acme.io/ingress-controller". This field is immutable.
  124. optional string controller = 1;
  125. // Parameters is a link to a custom resource containing additional
  126. // configuration for the controller. This is optional if the controller does
  127. // not require extra parameters.
  128. // +optional
  129. optional k8s.io.api.core.v1.TypedLocalObjectReference parameters = 2;
  130. }
  131. // IngressList is a collection of Ingress.
  132. message IngressList {
  133. // Standard object's metadata.
  134. // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
  135. // +optional
  136. optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
  137. // Items is the list of Ingress.
  138. repeated Ingress items = 2;
  139. }
  140. // IngressRule represents the rules mapping the paths under a specified host to
  141. // the related backend services. Incoming requests are first evaluated for a host
  142. // match, then routed to the backend associated with the matching IngressRuleValue.
  143. message IngressRule {
  144. // Host is the fully qualified domain name of a network host, as defined by RFC 3986.
  145. // Note the following deviations from the "host" part of the
  146. // URI as defined in RFC 3986:
  147. // 1. IPs are not allowed. Currently an IngressRuleValue can only apply to
  148. // the IP in the Spec of the parent Ingress.
  149. // 2. The `:` delimiter is not respected because ports are not allowed.
  150. // Currently the port of an Ingress is implicitly :80 for http and
  151. // :443 for https.
  152. // Both these may change in the future.
  153. // Incoming requests are matched against the host before the
  154. // IngressRuleValue. If the host is unspecified, the Ingress routes all
  155. // traffic based on the specified IngressRuleValue.
  156. //
  157. // Host can be "precise" which is a domain name without the terminating dot of
  158. // a network host (e.g. "foo.bar.com") or "wildcard", which is a domain name
  159. // prefixed with a single wildcard label (e.g. "*.foo.com").
  160. // The wildcard character '*' must appear by itself as the first DNS label and
  161. // matches only a single label. You cannot have a wildcard label by itself (e.g. Host == "*").
  162. // Requests will be matched against the Host field in the following way:
  163. // 1. If Host is precise, the request matches this rule if the http host header is equal to Host.
  164. // 2. If Host is a wildcard, then the request matches this rule if the http host header
  165. // is to equal to the suffix (removing the first label) of the wildcard rule.
  166. // +optional
  167. optional string host = 1;
  168. // IngressRuleValue represents a rule to route requests for this IngressRule.
  169. // If unspecified, the rule defaults to a http catch-all. Whether that sends
  170. // just traffic matching the host to the default backend or all traffic to the
  171. // default backend, is left to the controller fulfilling the Ingress. Http is
  172. // currently the only supported IngressRuleValue.
  173. // +optional
  174. optional IngressRuleValue ingressRuleValue = 2;
  175. }
  176. // IngressRuleValue represents a rule to apply against incoming requests. If the
  177. // rule is satisfied, the request is routed to the specified backend. Currently
  178. // mixing different types of rules in a single Ingress is disallowed, so exactly
  179. // one of the following must be set.
  180. message IngressRuleValue {
  181. // +optional
  182. optional HTTPIngressRuleValue http = 1;
  183. }
  184. // IngressSpec describes the Ingress the user wishes to exist.
  185. message IngressSpec {
  186. // IngressClassName is the name of the IngressClass cluster resource. The
  187. // associated IngressClass defines which controller will implement the
  188. // resource. This replaces the deprecated `kubernetes.io/ingress.class`
  189. // annotation. For backwards compatibility, when that annotation is set, it
  190. // must be given precedence over this field. The controller may emit a
  191. // warning if the field and annotation have different values.
  192. // Implementations of this API should ignore Ingresses without a class
  193. // specified. An IngressClass resource may be marked as default, which can
  194. // be used to set a default value for this field. For more information,
  195. // refer to the IngressClass documentation.
  196. // +optional
  197. optional string ingressClassName = 4;
  198. // A default backend capable of servicing requests that don't match any
  199. // rule. At least one of 'backend' or 'rules' must be specified. This field
  200. // is optional to allow the loadbalancer controller or defaulting logic to
  201. // specify a global default.
  202. // +optional
  203. optional IngressBackend backend = 1;
  204. // TLS configuration. Currently the Ingress only supports a single TLS
  205. // port, 443. If multiple members of this list specify different hosts, they
  206. // will be multiplexed on the same port according to the hostname specified
  207. // through the SNI TLS extension, if the ingress controller fulfilling the
  208. // ingress supports SNI.
  209. // +optional
  210. repeated IngressTLS tls = 2;
  211. // A list of host rules used to configure the Ingress. If unspecified, or
  212. // no rule matches, all traffic is sent to the default backend.
  213. // +optional
  214. repeated IngressRule rules = 3;
  215. }
  216. // IngressStatus describe the current state of the Ingress.
  217. message IngressStatus {
  218. // LoadBalancer contains the current status of the load-balancer.
  219. // +optional
  220. optional k8s.io.api.core.v1.LoadBalancerStatus loadBalancer = 1;
  221. }
  222. // IngressTLS describes the transport layer security associated with an Ingress.
  223. message IngressTLS {
  224. // Hosts are a list of hosts included in the TLS certificate. The values in
  225. // this list must match the name/s used in the tlsSecret. Defaults to the
  226. // wildcard host setting for the loadbalancer controller fulfilling this
  227. // Ingress, if left unspecified.
  228. // +optional
  229. repeated string hosts = 1;
  230. // SecretName is the name of the secret used to terminate TLS traffic on
  231. // port 443. Field is left optional to allow TLS routing based on SNI
  232. // hostname alone. If the SNI host in a listener conflicts with the "Host"
  233. // header field used by an IngressRule, the SNI host is used for termination
  234. // and value of the Host header is used for routing.
  235. // +optional
  236. optional string secretName = 2;
  237. }