util

package
v1.33.1 Latest Latest
Warning

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

Go to latest
Published: May 13, 2024 License: Apache-2.0 Imports: 21 Imported by: 365

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultAdmissionControllers = []string{
	"NamespaceLifecycle",
	"LimitRanger",
	"ServiceAccount",
	"DefaultStorageClass",
	"DefaultTolerationSeconds",
	"NodeRestriction",
	"MutatingAdmissionWebhook",
	"ValidatingAdmissionWebhook",
	"ResourceQuota",
}

DefaultAdmissionControllers are admission controllers we default to

Functions

func AlternateDNS added in v1.33.0

func AlternateDNS(domain string) []string

AlternateDNS returns a list of alternate names for a domain

func CalculateSizeInMB added in v1.3.0

func CalculateSizeInMB(humanReadableSize string) (int, error)

CalculateSizeInMB returns the number of MB in the human readable string

func ChownR added in v0.21.0

func ChownR(path string, uid, gid int) error

ChownR does a recursive os.Chown

func ConvertBytesToMB added in v1.14.0

func ConvertBytesToMB(byteSize int64) int

ConvertBytesToMB converts bytes to MB

func ConvertMBToBytes added in v1.14.0

func ConvertMBToBytes(mbSize int) int64

ConvertMBToBytes converts MB to bytes

func ConvertUnsignedBytesToMB added in v1.14.0

func ConvertUnsignedBytesToMB(byteSize uint64) int64

ConvertUnsignedBytesToMB converts bytes to MB

func DNSIP added in v1.33.0

func DNSIP(serviceCIDR string) (net.IP, error)

DNSIP returns x.x.x.10 of the service CIDR

func GenerateCACert added in v0.6.0

func GenerateCACert(certPath, keyPath string, name string) error

GenerateCACert generates a CA certificate and RSA key for a common name

func GenerateSignedCert added in v0.6.0

func GenerateSignedCert(certPath, keyPath, cn string, ips []net.IP, alternateDNS []string, signerCertPath, signerKeyPath string, expiration time.Duration) error

GenerateSignedCert generates a signed certificate and key

func GetBinaryDownloadURL added in v0.26.0

func GetBinaryDownloadURL(version, platform, arch string) string

GetBinaryDownloadURL returns a suitable URL for the platform and arch

func MaskProxyPassword added in v1.33.0

func MaskProxyPassword(proxyURL string) string

MaskProxyPassword masks the password in a proxy URL

func MaskProxyPasswordWithKey added in v1.33.0

func MaskProxyPasswordWithKey(v string) string

MaskProxyPasswordWithKey masks the password in a proxy URL specified by a key-value pair

func MaybeChownDirRecursiveToMinikubeUser added in v0.21.0

func MaybeChownDirRecursiveToMinikubeUser(dir string) error

MaybeChownDirRecursiveToMinikubeUser changes ownership of a dir, if requested

func ParseKubernetesVersion added in v1.8.2

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

ParseKubernetesVersion parses the Kubernetes version

func RemoveDuplicateStrings added in v1.27.0

func RemoveDuplicateStrings(initial []string) []string

RemoveDuplicateStrings takes a string slice and returns a slice without duplicates

func ServiceClusterIP added in v1.33.0

func ServiceClusterIP(serviceCIDR string) (net.IP, error)

ServiceClusterIP returns the first IP of the ServiceCIDR

Types

This section is empty.

Directories

Path Synopsis
Package retry implements wrappers to retry function calls
Package retry implements wrappers to retry function calls

Jump to

Keyboard shortcuts

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