util

package
v1.28.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 2, 2024 License: Apache-2.0 Imports: 5 Imported by: 283

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetNodeRole

func GetNodeRole(node *v1.Node) string

func IsKubernetesGTE

func IsKubernetesGTE(version string, k8sVersion semver.Version) bool

func ParseKubernetesVersion

func ParseKubernetesVersion(version string) (*semver.Version, error)

func ParseTaint added in v1.22.4

func ParseTaint(st string) (map[string]string, error)

parseTaint takes a string and returns a map of its value it mimics the function from https://github.com/kubernetes/kubernetes/blob/master/pkg/util/taints/taints.go but returns a map instead of a v1.Taint

Types

type Version added in v1.24.0

type Version struct {
	// contains filtered or unexported fields
}

Version is our helper type for semver versions.

func ParseVersion added in v1.24.0

func ParseVersion(s string) (*Version, error)

ParseVersion parses the semver version string into a Version.

func (*Version) IsInRange added in v1.24.0

func (v *Version) IsInRange(semverRange semver.Range) bool

IsInRange checks if we are in the provided semver range

func (*Version) String added in v1.24.0

func (v *Version) String() string

String returns a string representation of the object

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL