Skip to content

Commit eaab908

Browse files
committed
Mark v1.Endpoints deprecated in the API
1 parent fc3e649 commit eaab908

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

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+
}

0 commit comments

Comments
 (0)