generated.proto 8.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205
  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. The contents of this field are interpreted
  25. // according to the corresponding EndpointSlice addressType field. Consumers
  26. // must handle different types of addresses in the context of their own
  27. // capabilities. This must contain at least one address but no more than
  28. // 100. These are all assumed to be fungible and clients may choose to only
  29. // use the first element. Refer to: https://issue.k8s.io/106267
  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 prepared to receive traffic,
  68. // according to whatever system is managing the endpoint. A nil value
  69. // indicates an unknown state. In most cases consumers should interpret this
  70. // unknown state as ready. For compatibility reasons, ready should never be
  71. // "true" for terminating endpoints, except when the normal readiness
  72. // behavior is being explicitly overridden, for example when the associated
  73. // Service has set the publishNotReadyAddresses flag.
  74. // +optional
  75. optional bool ready = 1;
  76. // serving is identical to ready except that it is set regardless of the
  77. // terminating state of endpoints. This condition should be set to true for
  78. // a ready endpoint that is terminating. If nil, consumers should defer to
  79. // the ready condition.
  80. // +optional
  81. optional bool serving = 2;
  82. // terminating indicates that this endpoint is terminating. A nil value
  83. // indicates an unknown state. Consumers should interpret this unknown state
  84. // to mean that the endpoint is not terminating.
  85. // +optional
  86. optional bool terminating = 3;
  87. }
  88. // EndpointHints provides hints describing how an endpoint should be consumed.
  89. message EndpointHints {
  90. // forZones indicates the zone(s) this endpoint should be consumed by to
  91. // enable topology aware routing.
  92. // +listType=atomic
  93. repeated ForZone forZones = 1;
  94. }
  95. // EndpointPort represents a Port used by an EndpointSlice
  96. // +structType=atomic
  97. message EndpointPort {
  98. // name represents the name of this port. All ports in an EndpointSlice must have a unique name.
  99. // If the EndpointSlice is dervied from a Kubernetes service, this corresponds to the Service.ports[].name.
  100. // Name must either be an empty string or pass DNS_LABEL validation:
  101. // * must be no more than 63 characters long.
  102. // * must consist of lower case alphanumeric characters or '-'.
  103. // * must start and end with an alphanumeric character.
  104. // Default is empty string.
  105. optional string name = 1;
  106. // protocol represents the IP protocol for this port.
  107. // Must be UDP, TCP, or SCTP.
  108. // Default is TCP.
  109. optional string protocol = 2;
  110. // port represents the port number of the endpoint.
  111. // If this is not specified, ports are not restricted and must be
  112. // interpreted in the context of the specific consumer.
  113. optional int32 port = 3;
  114. // The application protocol for this port.
  115. // This is used as a hint for implementations to offer richer behavior for protocols that they understand.
  116. // This field follows standard Kubernetes label syntax.
  117. // Valid values are either:
  118. //
  119. // * Un-prefixed protocol names - reserved for IANA standard service names (as per
  120. // RFC-6335 and https://www.iana.org/assignments/service-names).
  121. //
  122. // * Kubernetes-defined prefixed names:
  123. // * 'kubernetes.io/h2c' - HTTP/2 over cleartext as described in https://www.rfc-editor.org/rfc/rfc7540
  124. // * 'kubernetes.io/ws' - WebSocket over cleartext as described in https://www.rfc-editor.org/rfc/rfc6455
  125. // * 'kubernetes.io/wss' - WebSocket over TLS as described in https://www.rfc-editor.org/rfc/rfc6455
  126. //
  127. // * Other protocols should use implementation-defined prefixed names such as
  128. // mycompany.com/my-custom-protocol.
  129. // +optional
  130. optional string appProtocol = 4;
  131. }
  132. // EndpointSlice represents a subset of the endpoints that implement a service.
  133. // For a given service there may be multiple EndpointSlice objects, selected by
  134. // labels, which must be joined to produce the full set of endpoints.
  135. message EndpointSlice {
  136. // Standard object's metadata.
  137. // +optional
  138. optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
  139. // addressType specifies the type of address carried by this EndpointSlice.
  140. // All addresses in this slice must be the same type. This field is
  141. // immutable after creation. The following address types are currently
  142. // supported:
  143. // * IPv4: Represents an IPv4 Address.
  144. // * IPv6: Represents an IPv6 Address.
  145. // * FQDN: Represents a Fully Qualified Domain Name.
  146. optional string addressType = 4;
  147. // endpoints is a list of unique endpoints in this slice. Each slice may
  148. // include a maximum of 1000 endpoints.
  149. // +listType=atomic
  150. repeated Endpoint endpoints = 2;
  151. // ports specifies the list of network ports exposed by each endpoint in
  152. // this slice. Each port must have a unique name. When ports is empty, it
  153. // indicates that there are no defined ports. When a port is defined with a
  154. // nil port value, it indicates "all ports". Each slice may include a
  155. // maximum of 100 ports.
  156. // +optional
  157. // +listType=atomic
  158. repeated EndpointPort ports = 3;
  159. }
  160. // EndpointSliceList represents a list of endpoint slices
  161. message EndpointSliceList {
  162. // Standard list metadata.
  163. // +optional
  164. optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
  165. // items is the list of endpoint slices
  166. repeated EndpointSlice items = 2;
  167. }
  168. // ForZone provides information about which zones should consume this endpoint.
  169. message ForZone {
  170. // name represents the name of the zone.
  171. optional string name = 1;
  172. }