generated.proto 7.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195
  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.
  72. // +optional
  73. optional bool ready = 1;
  74. // serving is identical to ready except that it is set regardless of the
  75. // terminating state of endpoints. This condition should be set to true for
  76. // a ready endpoint that is terminating. If nil, consumers should defer to
  77. // the ready condition.
  78. // +optional
  79. optional bool serving = 2;
  80. // terminating indicates that this endpoint is terminating. A nil value
  81. // indicates an unknown state. Consumers should interpret this unknown state
  82. // to mean that the endpoint is not terminating.
  83. // +optional
  84. optional bool terminating = 3;
  85. }
  86. // EndpointHints provides hints describing how an endpoint should be consumed.
  87. message EndpointHints {
  88. // forZones indicates the zone(s) this endpoint should be consumed by to
  89. // enable topology aware routing.
  90. // +listType=atomic
  91. repeated ForZone forZones = 1;
  92. }
  93. // EndpointPort represents a Port used by an EndpointSlice
  94. // +structType=atomic
  95. message EndpointPort {
  96. // The name of this port. All ports in an EndpointSlice must have a unique
  97. // name. If the EndpointSlice is dervied from a Kubernetes service, this
  98. // corresponds to the Service.ports[].name.
  99. // Name must either be an empty string or pass DNS_LABEL validation:
  100. // * must be no more than 63 characters long.
  101. // * must consist of lower case alphanumeric characters or '-'.
  102. // * must start and end with an alphanumeric character.
  103. // Default is empty string.
  104. optional string name = 1;
  105. // The IP protocol for this port.
  106. // Must be UDP, TCP, or SCTP.
  107. // Default is TCP.
  108. optional string protocol = 2;
  109. // The port number of the endpoint.
  110. // If this is not specified, ports are not restricted and must be
  111. // interpreted in the context of the specific consumer.
  112. optional int32 port = 3;
  113. // The application protocol for this port.
  114. // This field follows standard Kubernetes label syntax.
  115. // Un-prefixed names are reserved for IANA standard service names (as per
  116. // RFC-6335 and https://www.iana.org/assignments/service-names).
  117. // Non-standard protocols should use prefixed names such as
  118. // mycompany.com/my-custom-protocol.
  119. // +optional
  120. optional string appProtocol = 4;
  121. }
  122. // EndpointSlice represents a subset of the endpoints that implement a service.
  123. // For a given service there may be multiple EndpointSlice objects, selected by
  124. // labels, which must be joined to produce the full set of endpoints.
  125. message EndpointSlice {
  126. // Standard object's metadata.
  127. // +optional
  128. optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
  129. // addressType specifies the type of address carried by this EndpointSlice.
  130. // All addresses in this slice must be the same type. This field is
  131. // immutable after creation. The following address types are currently
  132. // supported:
  133. // * IPv4: Represents an IPv4 Address.
  134. // * IPv6: Represents an IPv6 Address.
  135. // * FQDN: Represents a Fully Qualified Domain Name.
  136. optional string addressType = 4;
  137. // endpoints is a list of unique endpoints in this slice. Each slice may
  138. // include a maximum of 1000 endpoints.
  139. // +listType=atomic
  140. repeated Endpoint endpoints = 2;
  141. // ports specifies the list of network ports exposed by each endpoint in
  142. // this slice. Each port must have a unique name. When ports is empty, it
  143. // indicates that there are no defined ports. When a port is defined with a
  144. // nil port value, it indicates "all ports". Each slice may include a
  145. // maximum of 100 ports.
  146. // +optional
  147. // +listType=atomic
  148. repeated EndpointPort ports = 3;
  149. }
  150. // EndpointSliceList represents a list of endpoint slices
  151. message EndpointSliceList {
  152. // Standard list metadata.
  153. // +optional
  154. optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
  155. // List of endpoint slices
  156. repeated EndpointSlice items = 2;
  157. }
  158. // ForZone provides information about which zones should consume this endpoint.
  159. message ForZone {
  160. // name represents the name of the zone.
  161. optional string name = 1;
  162. }