Mark v1.Endpoints deprecated in the API

This commit is contained in:
Dan Winship 2025-01-26 07:40:55 -05:00
parent fc3e649ef4
commit eaab908195

View File

@ -16,6 +16,10 @@ limitations under the License.
package v1
import (
"k8s.io/apimachinery/pkg/runtime/schema"
)
// APILifecycleIntroduced returns the release in which the API struct was introduced as int versions of major and minor for comparison.
func (in *ComponentStatus) APILifecycleIntroduced() (major, minor int) {
return 1, 0
@ -35,3 +39,23 @@ func (in *ComponentStatusList) APILifecycleIntroduced() (major, minor int) {
func (in *ComponentStatusList) APILifecycleDeprecated() (major, minor int) {
return 1, 19
}
// APILifecycleDeprecated returns the release in which the API struct was or will be deprecated as int versions of major and minor for comparison.
func (in *Endpoints) APILifecycleDeprecated() (major, minor int) {
return 1, 33
}
// APILifecycleReplacement returns the GVK of the replacement for the given API
func (in *Endpoints) APILifecycleReplacement() schema.GroupVersionKind {
return schema.GroupVersionKind{Group: "discovery.k8s.io", Version: "v1", Kind: "EndpointSlice"}
}
// APILifecycleDeprecated returns the release in which the API struct was or will be deprecated as int versions of major and minor for comparison.
func (in *EndpointsList) APILifecycleDeprecated() (major, minor int) {
return 1, 33
}
// APILifecycleReplacement returns the GVK of the replacement for the given API
func (in *EndpointsList) APILifecycleReplacement() schema.GroupVersionKind {
return schema.GroupVersionKind{Group: "discovery.k8s.io", Version: "v1", Kind: "EndpointSliceList"}
}