generated.proto 9.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223
  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.discovery.v1;
  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. // Package-wide variables from generator "generated".
  21. option go_package = "k8s.io/api/discovery/v1";
  22. // Endpoint represents a single logical "backend" implementing a service.
  23. message Endpoint {
  24. // addresses of this endpoint. For EndpointSlices of addressType "IPv4" or "IPv6",
  25. // the values are IP addresses in canonical form. The syntax and semantics of
  26. // other addressType values are not defined. This must contain at least one
  27. // address but no more than 100. EndpointSlices generated by the EndpointSlice
  28. // controller will always have exactly 1 address. No semantics are defined for
  29. // additional addresses beyond the first, and kube-proxy does not look at them.
  30. // +listType=set
  31. repeated string addresses = 1;
  32. // conditions contains information about the current status of the endpoint.
  33. optional EndpointConditions conditions = 2;
  34. // hostname of this endpoint. This field may be used by consumers of
  35. // endpoints to distinguish endpoints from each other (e.g. in DNS names).
  36. // Multiple endpoints which use the same hostname should be considered
  37. // fungible (e.g. multiple A values in DNS). Must be lowercase and pass DNS
  38. // Label (RFC 1123) validation.
  39. // +optional
  40. optional string hostname = 3;
  41. // targetRef is a reference to a Kubernetes object that represents this
  42. // endpoint.
  43. // +optional
  44. optional .k8s.io.api.core.v1.ObjectReference targetRef = 4;
  45. // deprecatedTopology contains topology information part of the v1beta1
  46. // API. This field is deprecated, and will be removed when the v1beta1
  47. // API is removed (no sooner than kubernetes v1.24). While this field can
  48. // hold values, it is not writable through the v1 API, and any attempts to
  49. // write to it will be silently ignored. Topology information can be found
  50. // in the zone and nodeName fields instead.
  51. // +optional
  52. map<string, string> deprecatedTopology = 5;
  53. // nodeName represents the name of the Node hosting this endpoint. This can
  54. // be used to determine endpoints local to a Node.
  55. // +optional
  56. optional string nodeName = 6;
  57. // zone is the name of the Zone this endpoint exists in.
  58. // +optional
  59. optional string zone = 7;
  60. // hints contains information associated with how an endpoint should be
  61. // consumed.
  62. // +optional
  63. optional EndpointHints hints = 8;
  64. }
  65. // EndpointConditions represents the current condition of an endpoint.
  66. message EndpointConditions {
  67. // ready indicates that this endpoint is ready to receive traffic,
  68. // according to whatever system is managing the endpoint. A nil value
  69. // should be interpreted as "true". In general, an endpoint should be
  70. // marked ready if it is serving and not terminating, though this can
  71. // be overridden in some cases, such as when the associated Service has
  72. // set the publishNotReadyAddresses flag.
  73. // +optional
  74. optional bool ready = 1;
  75. // serving indicates that this endpoint is able to receive traffic,
  76. // according to whatever system is managing the endpoint. For endpoints
  77. // backed by pods, the EndpointSlice controller will mark the endpoint
  78. // as serving if the pod's Ready condition is True. A nil value should be
  79. // interpreted as "true".
  80. // +optional
  81. optional bool serving = 2;
  82. // terminating indicates that this endpoint is terminating. A nil value
  83. // should be interpreted as "false".
  84. // +optional
  85. optional bool terminating = 3;
  86. }
  87. // EndpointHints provides hints describing how an endpoint should be consumed.
  88. message EndpointHints {
  89. // forZones indicates the zone(s) this endpoint should be consumed by when
  90. // using topology aware routing. May contain a maximum of 8 entries.
  91. // +listType=atomic
  92. repeated ForZone forZones = 1;
  93. // forNodes indicates the node(s) this endpoint should be consumed by when
  94. // using topology aware routing. May contain a maximum of 8 entries.
  95. // +listType=atomic
  96. repeated ForNode forNodes = 2;
  97. }
  98. // EndpointPort represents a Port used by an EndpointSlice
  99. // +structType=atomic
  100. message EndpointPort {
  101. // name represents the name of this port. All ports in an EndpointSlice must have a unique name.
  102. // If the EndpointSlice is derived from a Kubernetes service, this corresponds to the Service.ports[].name.
  103. // Name must either be an empty string or pass DNS_LABEL validation:
  104. // * must be no more than 63 characters long.
  105. // * must consist of lower case alphanumeric characters or '-'.
  106. // * must start and end with an alphanumeric character.
  107. // Default is empty string.
  108. optional string name = 1;
  109. // protocol represents the IP protocol for this port.
  110. // Must be UDP, TCP, or SCTP.
  111. // Default is TCP.
  112. optional string protocol = 2;
  113. // port represents the port number of the endpoint.
  114. // If the EndpointSlice is derived from a Kubernetes service, this must be set
  115. // to the service's target port. EndpointSlices used for other purposes may have
  116. // a nil port.
  117. optional int32 port = 3;
  118. // The application protocol for this port.
  119. // This is used as a hint for implementations to offer richer behavior for protocols that they understand.
  120. // This field follows standard Kubernetes label syntax.
  121. // Valid values are either:
  122. //
  123. // * Un-prefixed protocol names - reserved for IANA standard service names (as per
  124. // RFC-6335 and https://www.iana.org/assignments/service-names).
  125. //
  126. // * Kubernetes-defined prefixed names:
  127. // * 'kubernetes.io/h2c' - HTTP/2 prior knowledge over cleartext as described in https://www.rfc-editor.org/rfc/rfc9113.html#name-starting-http-2-with-prior-
  128. // * 'kubernetes.io/ws' - WebSocket over cleartext as described in https://www.rfc-editor.org/rfc/rfc6455
  129. // * 'kubernetes.io/wss' - WebSocket over TLS as described in https://www.rfc-editor.org/rfc/rfc6455
  130. //
  131. // * Other protocols should use implementation-defined prefixed names such as
  132. // mycompany.com/my-custom-protocol.
  133. // +optional
  134. optional string appProtocol = 4;
  135. }
  136. // EndpointSlice represents a set of service endpoints. Most EndpointSlices are created by
  137. // the EndpointSlice controller to represent the Pods selected by Service objects. For a
  138. // given service there may be multiple EndpointSlice objects which must be joined to
  139. // produce the full set of endpoints; you can find all of the slices for a given service
  140. // by listing EndpointSlices in the service's namespace whose `kubernetes.io/service-name`
  141. // label contains the service's name.
  142. message EndpointSlice {
  143. // Standard object's metadata.
  144. // +optional
  145. optional .k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
  146. // addressType specifies the type of address carried by this EndpointSlice.
  147. // All addresses in this slice must be the same type. This field is
  148. // immutable after creation. The following address types are currently
  149. // supported:
  150. // * IPv4: Represents an IPv4 Address.
  151. // * IPv6: Represents an IPv6 Address.
  152. // * FQDN: Represents a Fully Qualified Domain Name. (Deprecated)
  153. // The EndpointSlice controller only generates, and kube-proxy only processes,
  154. // slices of addressType "IPv4" and "IPv6". No semantics are defined for
  155. // the "FQDN" type.
  156. optional string addressType = 4;
  157. // endpoints is a list of unique endpoints in this slice. Each slice may
  158. // include a maximum of 1000 endpoints.
  159. // +listType=atomic
  160. repeated Endpoint endpoints = 2;
  161. // ports specifies the list of network ports exposed by each endpoint in
  162. // this slice. Each port must have a unique name. Each slice may include a
  163. // maximum of 100 ports.
  164. // Services always have at least 1 port, so EndpointSlices generated by the
  165. // EndpointSlice controller will likewise always have at least 1 port.
  166. // EndpointSlices used for other purposes may have an empty ports list.
  167. // +optional
  168. // +listType=atomic
  169. repeated EndpointPort ports = 3;
  170. }
  171. // EndpointSliceList represents a list of endpoint slices
  172. message EndpointSliceList {
  173. // Standard list metadata.
  174. // +optional
  175. optional .k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
  176. // items is the list of endpoint slices
  177. repeated EndpointSlice items = 2;
  178. }
  179. // ForNode provides information about which nodes should consume this endpoint.
  180. message ForNode {
  181. // name represents the name of the node.
  182. optional string name = 1;
  183. }
  184. // ForZone provides information about which zones should consume this endpoint.
  185. message ForZone {
  186. // name represents the name of the zone.
  187. optional string name = 1;
  188. }