generated.proto 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462
  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 = "k8s.io/api/networking/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 '/' and must be present
  29. // when using PathType with value "Exact" or "Prefix".
  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. // paths is a collection of paths that map requests to backends.
  59. // +listType=atomic
  60. repeated HTTPIngressPath paths = 1;
  61. }
  62. // IPAddress represents a single IP of a single IP Family. The object is designed to be used by APIs
  63. // that operate on IP addresses. The object is used by the Service core API for allocation of IP addresses.
  64. // An IP address can be represented in different formats, to guarantee the uniqueness of the IP,
  65. // the name of the object is the IP address in canonical format, four decimal digits separated
  66. // by dots suppressing leading zeros for IPv4 and the representation defined by RFC 5952 for IPv6.
  67. // Valid: 192.168.1.5 or 2001:db8::1 or 2001:db8:aaaa:bbbb:cccc:dddd:eeee:1
  68. // Invalid: 10.01.2.3 or 2001:db8:0:0:0::1
  69. message IPAddress {
  70. // Standard object's metadata.
  71. // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
  72. // +optional
  73. optional .k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
  74. // spec is the desired state of the IPAddress.
  75. // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
  76. // +optional
  77. optional IPAddressSpec spec = 2;
  78. }
  79. // IPAddressList contains a list of IPAddress.
  80. message IPAddressList {
  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.ListMeta metadata = 1;
  85. // items is the list of IPAddresses.
  86. repeated IPAddress items = 2;
  87. }
  88. // IPAddressSpec describe the attributes in an IP Address.
  89. message IPAddressSpec {
  90. // ParentRef references the resource that an IPAddress is attached to.
  91. // An IPAddress must reference a parent object.
  92. // +required
  93. optional ParentReference parentRef = 1;
  94. }
  95. // Ingress is a collection of rules that allow inbound connections to reach the
  96. // endpoints defined by a backend. An Ingress can be configured to give services
  97. // externally-reachable urls, load balance traffic, terminate SSL, offer name
  98. // based virtual hosting etc.
  99. message Ingress {
  100. // Standard object's metadata.
  101. // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
  102. // +optional
  103. optional .k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
  104. // spec is the desired state of the Ingress.
  105. // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
  106. // +optional
  107. optional IngressSpec spec = 2;
  108. // status is the current state of the Ingress.
  109. // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
  110. // +optional
  111. optional IngressStatus status = 3;
  112. }
  113. // IngressBackend describes all endpoints for a given service and port.
  114. message IngressBackend {
  115. // serviceName specifies the name of the referenced service.
  116. // +optional
  117. optional string serviceName = 1;
  118. // servicePort Specifies the port of the referenced service.
  119. // +optional
  120. optional .k8s.io.apimachinery.pkg.util.intstr.IntOrString servicePort = 2;
  121. // resource is an ObjectRef to another Kubernetes resource in the namespace
  122. // of the Ingress object. If resource is specified, serviceName and servicePort
  123. // must not be specified.
  124. // +optional
  125. optional .k8s.io.api.core.v1.TypedLocalObjectReference resource = 3;
  126. }
  127. // IngressClass represents the class of the Ingress, referenced by the Ingress
  128. // Spec. The `ingressclass.kubernetes.io/is-default-class` annotation can be
  129. // used to indicate that an IngressClass should be considered default. When a
  130. // single IngressClass resource has this annotation set to true, new Ingress
  131. // resources without a class specified will be assigned this default class.
  132. message IngressClass {
  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.ObjectMeta metadata = 1;
  137. // spec is the desired state of the IngressClass.
  138. // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
  139. // +optional
  140. optional IngressClassSpec spec = 2;
  141. }
  142. // IngressClassList is a collection of IngressClasses.
  143. message IngressClassList {
  144. // Standard list metadata.
  145. // +optional
  146. optional .k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
  147. // items is the list of IngressClasses.
  148. repeated IngressClass items = 2;
  149. }
  150. // IngressClassParametersReference identifies an API object. This can be used
  151. // to specify a cluster or namespace-scoped resource.
  152. message IngressClassParametersReference {
  153. // apiGroup is the group for the resource being referenced. If APIGroup is
  154. // not specified, the specified Kind must be in the core API group. For any
  155. // other third-party types, APIGroup is required.
  156. // +optional
  157. optional string aPIGroup = 1;
  158. // kind is the type of resource being referenced.
  159. optional string kind = 2;
  160. // name is the name of resource being referenced.
  161. optional string name = 3;
  162. // scope represents if this refers to a cluster or namespace scoped resource.
  163. // This may be set to "Cluster" (default) or "Namespace".
  164. optional string scope = 4;
  165. // namespace is the namespace of the resource being referenced. This field is
  166. // required when scope is set to "Namespace" and must be unset when scope is set to
  167. // "Cluster".
  168. // +optional
  169. optional string namespace = 5;
  170. }
  171. // IngressClassSpec provides information about the class of an Ingress.
  172. message IngressClassSpec {
  173. // controller refers to the name of the controller that should handle this
  174. // class. This allows for different "flavors" that are controlled by the
  175. // same controller. For example, you may have different parameters for the
  176. // same implementing controller. This should be specified as a
  177. // domain-prefixed path no more than 250 characters in length, e.g.
  178. // "acme.io/ingress-controller". This field is immutable.
  179. optional string controller = 1;
  180. // parameters is a link to a custom resource containing additional
  181. // configuration for the controller. This is optional if the controller does
  182. // not require extra parameters.
  183. // +optional
  184. optional IngressClassParametersReference parameters = 2;
  185. }
  186. // IngressList is a collection of Ingress.
  187. message IngressList {
  188. // Standard object's metadata.
  189. // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
  190. // +optional
  191. optional .k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
  192. // items is the list of Ingress.
  193. repeated Ingress items = 2;
  194. }
  195. // IngressLoadBalancerIngress represents the status of a load-balancer ingress point.
  196. message IngressLoadBalancerIngress {
  197. // ip is set for load-balancer ingress points that are IP based.
  198. // +optional
  199. optional string ip = 1;
  200. // hostname is set for load-balancer ingress points that are DNS based.
  201. // +optional
  202. optional string hostname = 2;
  203. // ports provides information about the ports exposed by this LoadBalancer.
  204. // +listType=atomic
  205. // +optional
  206. repeated IngressPortStatus ports = 4;
  207. }
  208. // LoadBalancerStatus represents the status of a load-balancer.
  209. message IngressLoadBalancerStatus {
  210. // ingress is a list containing ingress points for the load-balancer.
  211. // +optional
  212. // +listType=atomic
  213. repeated IngressLoadBalancerIngress ingress = 1;
  214. }
  215. // IngressPortStatus represents the error condition of a service port
  216. message IngressPortStatus {
  217. // port is the port number of the ingress port.
  218. optional int32 port = 1;
  219. // protocol is the protocol of the ingress port.
  220. // The supported values are: "TCP", "UDP", "SCTP"
  221. optional string protocol = 2;
  222. // error is to record the problem with the service port
  223. // The format of the error shall comply with the following rules:
  224. // - built-in error values shall be specified in this file and those shall use
  225. // CamelCase names
  226. // - cloud provider specific error values must have names that comply with the
  227. // format foo.example.com/CamelCase.
  228. // ---
  229. // The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt)
  230. // +optional
  231. // +kubebuilder:validation:Required
  232. // +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])$`
  233. // +kubebuilder:validation:MaxLength=316
  234. optional string error = 3;
  235. }
  236. // IngressRule represents the rules mapping the paths under a specified host to
  237. // the related backend services. Incoming requests are first evaluated for a host
  238. // match, then routed to the backend associated with the matching IngressRuleValue.
  239. message IngressRule {
  240. // host is the fully qualified domain name of a network host, as defined by RFC 3986.
  241. // Note the following deviations from the "host" part of the
  242. // URI as defined in RFC 3986:
  243. // 1. IPs are not allowed. Currently an IngressRuleValue can only apply to
  244. // the IP in the Spec of the parent Ingress.
  245. // 2. The `:` delimiter is not respected because ports are not allowed.
  246. // Currently the port of an Ingress is implicitly :80 for http and
  247. // :443 for https.
  248. // Both these may change in the future.
  249. // Incoming requests are matched against the host before the
  250. // IngressRuleValue. If the host is unspecified, the Ingress routes all
  251. // traffic based on the specified IngressRuleValue.
  252. //
  253. // host can be "precise" which is a domain name without the terminating dot of
  254. // a network host (e.g. "foo.bar.com") or "wildcard", which is a domain name
  255. // prefixed with a single wildcard label (e.g. "*.foo.com").
  256. // The wildcard character '*' must appear by itself as the first DNS label and
  257. // matches only a single label. You cannot have a wildcard label by itself (e.g. Host == "*").
  258. // Requests will be matched against the Host field in the following way:
  259. // 1. If Host is precise, the request matches this rule if the http host header is equal to Host.
  260. // 2. If Host is a wildcard, then the request matches this rule if the http host header
  261. // is to equal to the suffix (removing the first label) of the wildcard rule.
  262. // +optional
  263. optional string host = 1;
  264. // IngressRuleValue represents a rule to route requests for this IngressRule.
  265. // If unspecified, the rule defaults to a http catch-all. Whether that sends
  266. // just traffic matching the host to the default backend or all traffic to the
  267. // default backend, is left to the controller fulfilling the Ingress. Http is
  268. // currently the only supported IngressRuleValue.
  269. // +optional
  270. optional IngressRuleValue ingressRuleValue = 2;
  271. }
  272. // IngressRuleValue represents a rule to apply against incoming requests. If the
  273. // rule is satisfied, the request is routed to the specified backend. Currently
  274. // mixing different types of rules in a single Ingress is disallowed, so exactly
  275. // one of the following must be set.
  276. message IngressRuleValue {
  277. // +optional
  278. optional HTTPIngressRuleValue http = 1;
  279. }
  280. // IngressSpec describes the Ingress the user wishes to exist.
  281. message IngressSpec {
  282. // ingressClassName is the name of the IngressClass cluster resource. The
  283. // associated IngressClass defines which controller will implement the
  284. // resource. This replaces the deprecated `kubernetes.io/ingress.class`
  285. // annotation. For backwards compatibility, when that annotation is set, it
  286. // must be given precedence over this field. The controller may emit a
  287. // warning if the field and annotation have different values.
  288. // Implementations of this API should ignore Ingresses without a class
  289. // specified. An IngressClass resource may be marked as default, which can
  290. // be used to set a default value for this field. For more information,
  291. // refer to the IngressClass documentation.
  292. // +optional
  293. optional string ingressClassName = 4;
  294. // backend is the default backend capable of servicing requests that don't match any
  295. // rule. At least one of 'backend' or 'rules' must be specified. This field
  296. // is optional to allow the loadbalancer controller or defaulting logic to
  297. // specify a global default.
  298. // +optional
  299. optional IngressBackend backend = 1;
  300. // tls represents the TLS configuration. Currently the Ingress only supports a
  301. // single TLS port, 443. If multiple members of this list specify different hosts,
  302. // they will be multiplexed on the same port according to the hostname specified
  303. // through the SNI TLS extension, if the ingress controller fulfilling the
  304. // ingress supports SNI.
  305. // +optional
  306. // +listType=atomic
  307. repeated IngressTLS tls = 2;
  308. // rules is a list of host rules used to configure the Ingress. If unspecified, or
  309. // no rule matches, all traffic is sent to the default backend.
  310. // +optional
  311. // +listType=atomic
  312. repeated IngressRule rules = 3;
  313. }
  314. // IngressStatus describes the current state of the Ingress.
  315. message IngressStatus {
  316. // loadBalancer contains the current status of the load-balancer.
  317. // +optional
  318. optional IngressLoadBalancerStatus loadBalancer = 1;
  319. }
  320. // IngressTLS describes the transport layer security associated with an Ingress.
  321. message IngressTLS {
  322. // hosts is a list of hosts included in the TLS certificate. The values in
  323. // this list must match the name/s used in the tlsSecret. Defaults to the
  324. // wildcard host setting for the loadbalancer controller fulfilling this
  325. // Ingress, if left unspecified.
  326. // +optional
  327. // +listType=atomic
  328. repeated string hosts = 1;
  329. // secretName is the name of the secret used to terminate TLS traffic on
  330. // port 443. Field is left optional to allow TLS routing based on SNI
  331. // hostname alone. If the SNI host in a listener conflicts with the "Host"
  332. // header field used by an IngressRule, the SNI host is used for termination
  333. // and value of the Host header is used for routing.
  334. // +optional
  335. optional string secretName = 2;
  336. }
  337. // ParentReference describes a reference to a parent object.
  338. message ParentReference {
  339. // Group is the group of the object being referenced.
  340. // +optional
  341. optional string group = 1;
  342. // Resource is the resource of the object being referenced.
  343. // +required
  344. optional string resource = 2;
  345. // Namespace is the namespace of the object being referenced.
  346. // +optional
  347. optional string namespace = 3;
  348. // Name is the name of the object being referenced.
  349. // +required
  350. optional string name = 4;
  351. }
  352. // ServiceCIDR defines a range of IP addresses using CIDR format (e.g. 192.168.0.0/24 or 2001:db2::/64).
  353. // This range is used to allocate ClusterIPs to Service objects.
  354. message ServiceCIDR {
  355. // Standard object's metadata.
  356. // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
  357. // +optional
  358. optional .k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
  359. // spec is the desired state of the ServiceCIDR.
  360. // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
  361. // +optional
  362. optional ServiceCIDRSpec spec = 2;
  363. // status represents the current state of the ServiceCIDR.
  364. // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
  365. // +optional
  366. optional ServiceCIDRStatus status = 3;
  367. }
  368. // ServiceCIDRList contains a list of ServiceCIDR objects.
  369. message ServiceCIDRList {
  370. // Standard object's metadata.
  371. // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
  372. // +optional
  373. optional .k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
  374. // items is the list of ServiceCIDRs.
  375. repeated ServiceCIDR items = 2;
  376. }
  377. // ServiceCIDRSpec define the CIDRs the user wants to use for allocating ClusterIPs for Services.
  378. message ServiceCIDRSpec {
  379. // CIDRs defines the IP blocks in CIDR notation (e.g. "192.168.0.0/24" or "2001:db8::/64")
  380. // from which to assign service cluster IPs. Max of two CIDRs is allowed, one of each IP family.
  381. // This field is immutable.
  382. // +optional
  383. // +listType=atomic
  384. repeated string cidrs = 1;
  385. }
  386. // ServiceCIDRStatus describes the current state of the ServiceCIDR.
  387. message ServiceCIDRStatus {
  388. // conditions holds an array of metav1.Condition that describe the state of the ServiceCIDR.
  389. // Current service state
  390. // +optional
  391. // +patchMergeKey=type
  392. // +patchStrategy=merge
  393. // +listType=map
  394. // +listMapKey=type
  395. repeated .k8s.io.apimachinery.pkg.apis.meta.v1.Condition conditions = 1;
  396. }