blob: 2cbbdcdb01ca03a901959b9db91b21f3007acaf6 [file] [log] [blame]
Matteo Scandoloa4285862020-12-01 18:10:10 -08001/*
2Copyright The Kubernetes Authors.
3
4Licensed under the Apache License, Version 2.0 (the "License");
5you may not use this file except in compliance with the License.
6You may obtain a copy of the License at
7
8 http://www.apache.org/licenses/LICENSE-2.0
9
10Unless required by applicable law or agreed to in writing, software
11distributed under the License is distributed on an "AS IS" BASIS,
12WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13See the License for the specific language governing permissions and
14limitations under the License.
15*/
16
17
18// This file was autogenerated by go-to-protobuf. Do not edit it manually!
19
20syntax = 'proto2';
21
22package k8s.io.api.discovery.v1alpha1;
23
24import "k8s.io/api/core/v1/generated.proto";
25import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto";
26import "k8s.io/apimachinery/pkg/runtime/generated.proto";
27import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto";
28
29// Package-wide variables from generator "generated".
30option go_package = "v1alpha1";
31
32// Endpoint represents a single logical "backend" implementing a service.
33message Endpoint {
34 // addresses of this endpoint. The contents of this field are interpreted
35 // according to the corresponding EndpointSlice addressType field. Consumers
36 // must handle different types of addresses in the context of their own
37 // capabilities. This must contain at least one address but no more than
38 // 100.
39 // +listType=set
40 repeated string addresses = 1;
41
42 // conditions contains information about the current status of the endpoint.
43 optional EndpointConditions conditions = 2;
44
45 // hostname of this endpoint. This field may be used by consumers of
46 // endpoints to distinguish endpoints from each other (e.g. in DNS names).
47 // Multiple endpoints which use the same hostname should be considered
48 // fungible (e.g. multiple A values in DNS). Must pass DNS Label (RFC 1123)
49 // validation.
50 // +optional
51 optional string hostname = 3;
52
53 // targetRef is a reference to a Kubernetes object that represents this
54 // endpoint.
55 // +optional
56 optional k8s.io.api.core.v1.ObjectReference targetRef = 4;
57
58 // topology contains arbitrary topology information associated with the
59 // endpoint. These key/value pairs must conform with the label format.
60 // https://kubernetes.io/docs/concepts/overview/working-with-objects/labels
61 // Topology may include a maximum of 16 key/value pairs. This includes, but
62 // is not limited to the following well known keys:
63 // * kubernetes.io/hostname: the value indicates the hostname of the node
64 // where the endpoint is located. This should match the corresponding
65 // node label.
66 // * topology.kubernetes.io/zone: the value indicates the zone where the
67 // endpoint is located. This should match the corresponding node label.
68 // * topology.kubernetes.io/region: the value indicates the region where the
69 // endpoint is located. This should match the corresponding node label.
70 // +optional
71 map<string, string> topology = 5;
72}
73
74// EndpointConditions represents the current condition of an endpoint.
75message EndpointConditions {
76 // ready indicates that this endpoint is prepared to receive traffic,
77 // according to whatever system is managing the endpoint. A nil value
78 // indicates an unknown state. In most cases consumers should interpret this
79 // unknown state as ready.
80 // +optional
81 optional bool ready = 1;
82}
83
84// EndpointPort represents a Port used by an EndpointSlice
85message EndpointPort {
86 // The name of this port. All ports in an EndpointSlice must have a unique
87 // name. If the EndpointSlice is dervied from a Kubernetes service, this
88 // corresponds to the Service.ports[].name.
89 // Name must either be an empty string or pass DNS_LABEL validation:
90 // * must be no more than 63 characters long.
91 // * must consist of lower case alphanumeric characters or '-'.
92 // * must start and end with an alphanumeric character.
93 // Default is empty string.
94 optional string name = 1;
95
96 // The IP protocol for this port.
97 // Must be UDP, TCP, or SCTP.
98 // Default is TCP.
99 optional string protocol = 2;
100
101 // The port number of the endpoint.
102 // If this is not specified, ports are not restricted and must be
103 // interpreted in the context of the specific consumer.
104 optional int32 port = 3;
105
106 // The application protocol for this port.
107 // This field follows standard Kubernetes label syntax.
108 // Un-prefixed names are reserved for IANA standard service names (as per
109 // RFC-6335 and http://www.iana.org/assignments/service-names).
110 // Non-standard protocols should use prefixed names.
111 // Default is empty string.
112 optional string appProtocol = 4;
113}
114
115// EndpointSlice represents a subset of the endpoints that implement a service.
116// For a given service there may be multiple EndpointSlice objects, selected by
117// labels, which must be joined to produce the full set of endpoints.
118message EndpointSlice {
119 // Standard object's metadata.
120 // +optional
121 optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
122
123 // addressType specifies the type of address carried by this EndpointSlice.
124 // All addresses in this slice must be the same type. This field is
125 // immutable after creation. The following address types are currently
126 // supported:
127 // * IPv4: Represents an IPv4 Address.
128 // * IPv6: Represents an IPv6 Address.
129 // * FQDN: Represents a Fully Qualified Domain Name.
130 optional string addressType = 4;
131
132 // endpoints is a list of unique endpoints in this slice. Each slice may
133 // include a maximum of 1000 endpoints.
134 // +listType=atomic
135 repeated Endpoint endpoints = 2;
136
137 // ports specifies the list of network ports exposed by each endpoint in
138 // this slice. Each port must have a unique name. When ports is empty, it
139 // indicates that there are no defined ports. When a port is defined with a
140 // nil port value, it indicates "all ports". Each slice may include a
141 // maximum of 100 ports.
142 // +optional
143 // +listType=atomic
144 repeated EndpointPort ports = 3;
145}
146
147// EndpointSliceList represents a list of endpoint slices
148message EndpointSliceList {
149 // Standard list metadata.
150 // +optional
151 optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
152
153 // List of endpoint slices
154 repeated EndpointSlice items = 2;
155}
156