package deprecation
import "k8s.io/apiserver/pkg/endpoints/deprecation"
Index ¶
- func IsDeprecated(obj runtime.Object, currentMajor, currentMinor int) bool
- func MajorMinor(v version.Info) (int, int, error)
- func RemovedRelease(obj runtime.Object) string
- func WarningMessage(obj runtime.Object) string
Functions ¶
func IsDeprecated ¶
IsDeprecated returns true if obj implements APILifecycleDeprecated() and returns a major/minor version that is non-zero and is <= the specified current major/minor version.
func MajorMinor ¶
MajorMinor parses a numeric major/minor version from the provided version info. The minor version drops all characters after the first non-digit character:
version.Info{Major:"1", Minor:"2+"} -> 1,2 version.Info{Major:"1", Minor:"2.3-build4"} -> 1,2
func RemovedRelease ¶
RemovedRelease returns the major/minor version in which the given object is unavailable (in the form "<major>.<minor>") if the object implements APILifecycleRemoved() to indicate a non-zero removal version, and returns an empty string otherwise.
func WarningMessage ¶
WarningMessage returns a human-readable deprecation warning if the object implements APILifecycleDeprecated() to indicate a non-zero deprecated major/minor version and has a populated GetObjectKind().GroupVersionKind().
Source Files ¶
deprecation.go
- Version
- v0.33.0 (latest)
- Published
- Apr 23, 2025
- Platform
- linux/amd64
- Imports
- 6 packages
- Last checked
- 1 hour ago –
Tools for package owners.