Skip to content

Commit 4f925a6

Browse files
authored
Merge pull request kubernetes#130098 from danwinship/deprecate-endpoints
Mark v1.Endpoints deprecated
2 parents 72b404f + eaab908 commit 4f925a6

File tree

7 files changed

+64
-20
lines changed

7 files changed

+64
-20
lines changed

api/openapi-spec/swagger.json

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

api/openapi-spec/v3/api__v1_openapi.json

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkg/generated/openapi/zz_generated.openapi.go

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

staging/src/k8s.io/api/core/v1/generated.proto

Lines changed: 10 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

staging/src/k8s.io/api/core/v1/lifecycle.go

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@ limitations under the License.
1616

1717
package v1
1818

19+
import (
20+
"k8s.io/apimachinery/pkg/runtime/schema"
21+
)
22+
1923
// APILifecycleIntroduced returns the release in which the API struct was introduced as int versions of major and minor for comparison.
2024
func (in *ComponentStatus) APILifecycleIntroduced() (major, minor int) {
2125
return 1, 0
@@ -35,3 +39,23 @@ func (in *ComponentStatusList) APILifecycleIntroduced() (major, minor int) {
3539
func (in *ComponentStatusList) APILifecycleDeprecated() (major, minor int) {
3640
return 1, 19
3741
}
42+
43+
// APILifecycleDeprecated returns the release in which the API struct was or will be deprecated as int versions of major and minor for comparison.
44+
func (in *Endpoints) APILifecycleDeprecated() (major, minor int) {
45+
return 1, 33
46+
}
47+
48+
// APILifecycleReplacement returns the GVK of the replacement for the given API
49+
func (in *Endpoints) APILifecycleReplacement() schema.GroupVersionKind {
50+
return schema.GroupVersionKind{Group: "discovery.k8s.io", Version: "v1", Kind: "EndpointSlice"}
51+
}
52+
53+
// APILifecycleDeprecated returns the release in which the API struct was or will be deprecated as int versions of major and minor for comparison.
54+
func (in *EndpointsList) APILifecycleDeprecated() (major, minor int) {
55+
return 1, 33
56+
}
57+
58+
// APILifecycleReplacement returns the GVK of the replacement for the given API
59+
func (in *EndpointsList) APILifecycleReplacement() schema.GroupVersionKind {
60+
return schema.GroupVersionKind{Group: "discovery.k8s.io", Version: "v1", Kind: "EndpointSliceList"}
61+
}

staging/src/k8s.io/api/core/v1/types.go

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5888,6 +5888,11 @@ type ServiceAccountList struct {
58885888
// Ports: [{"name": "a", "port": 93}, {"name": "b", "port": 76}]
58895889
// },
58905890
// ]
5891+
//
5892+
// Endpoints is a legacy API and does not contain information about all Service features.
5893+
// Use discoveryv1.EndpointSlice for complete information about Service endpoints.
5894+
//
5895+
// Deprecated: This API is deprecated in v1.33+. Use discoveryv1.EndpointSlice.
58915896
type Endpoints struct {
58925897
metav1.TypeMeta `json:",inline"`
58935898
// Standard object's metadata.
@@ -5920,6 +5925,8 @@ type Endpoints struct {
59205925
//
59215926
// a: [ 10.10.1.1:8675, 10.10.2.2:8675 ],
59225927
// b: [ 10.10.1.1:309, 10.10.2.2:309 ]
5928+
//
5929+
// Deprecated: This API is deprecated in v1.33+.
59235930
type EndpointSubset struct {
59245931
// IP addresses which offer the related ports that are marked as ready. These endpoints
59255932
// should be considered safe for load balancers and clients to utilize.
@@ -5939,6 +5946,7 @@ type EndpointSubset struct {
59395946
}
59405947

59415948
// EndpointAddress is a tuple that describes single IP address.
5949+
// Deprecated: This API is deprecated in v1.33+.
59425950
// +structType=atomic
59435951
type EndpointAddress struct {
59445952
// The IP of this endpoint.
@@ -5957,6 +5965,7 @@ type EndpointAddress struct {
59575965
}
59585966

59595967
// EndpointPort is a tuple that describes a single port.
5968+
// Deprecated: This API is deprecated in v1.33+.
59605969
// +structType=atomic
59615970
type EndpointPort struct {
59625971
// The name of this port. This must match the 'name' field in the
@@ -5998,6 +6007,7 @@ type EndpointPort struct {
59986007
// +k8s:prerelease-lifecycle-gen:introduced=1.0
59996008

60006009
// EndpointsList is a list of endpoints.
6010+
// Deprecated: This API is deprecated in v1.33+.
60016011
type EndpointsList struct {
60026012
metav1.TypeMeta `json:",inline"`
60036013
// Standard list metadata.

0 commit comments

Comments
 (0)