component-basek8s.io/component-base/version Index | Files | Directories

package version

import "k8s.io/component-base/version"

Index

Constants

const (
	// DefaultKubeBinaryVersion is the hard coded k8 binary version based on the latest K8s release.
	// It is supposed to be consistent with gitMajor and gitMinor, except for local tests, where gitMajor and gitMinor are "".
	// Should update for each minor release!
	DefaultKubeBinaryVersion = "1.33"
)

Functions

func Get

Get returns the overall codebase version. It's for detecting what code a binary was built from.

func SetDynamicVersion

func SetDynamicVersion(dynamicVersion string) error

SetDynamicVersion overrides the version returned as the GitVersion from Get(). The specified version must be non-empty, a valid semantic version, and must match the major/minor/patch version of the default gitVersion.

func ValidateDynamicVersion

func ValidateDynamicVersion(dynamicVersion string) error

ValidateDynamicVersion ensures the given version is non-empty, a valid semantic version, and matched the major/minor/patch version of the default gitVersion.

Source Files

base.go dynamic.go version.go

Directories

PathSynopsis
version/verflagPackage verflag defines utility functions to handle command line flags related to version of Kubernetes.
Version
v0.33.0-beta.0
Published
Mar 12, 2025
Platform
js/wasm
Imports
5 packages
Last checked
3 seconds ago

Tools for package owners.