util

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2024 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ConfigSecretDataKey = "kubeconfig"
)

Variables

This section is empty.

Functions

func CheckNamespacedName added in v0.1.1

func CheckNamespacedName(name string) bool

CheckNamespacedName checks if the given string is in the format of "namespace/name".

func Filter

func Filter[T any](ss []T, test func(T) bool) (ret []T)

Filter is a generic filter function.

func GetHarvesterClientFromSecret

func GetHarvesterClientFromSecret(secret *corev1.Secret) (*hvclientset.Clientset, error)

func GetNamespacedName added in v0.1.1

func GetNamespacedName(name string, alternativeTargetNS string) (error, types.NamespacedName)

GetNamespacedName returns the namespace and name from the given string in the format of "namespace/name".

func GetSecretForHarvesterConfig

func GetSecretForHarvesterConfig(ctx context.Context, cluster *infrav1.HarvesterCluster, cl client.Client) (*corev1.Secret, error)

func Healthcheck

func Healthcheck(config *clientcmdapi.Config) (bool, error)

func MergeCloudInitData

func MergeCloudInitData(cloudInits ...string) ([]byte, error)

func NewTrue

func NewTrue() *bool

NewTrue returns a pointer to true.

func RandomID

func RandomID() string

RandomID returns a random string used as an ID internally in Harvester.

Types

This section is empty.

Jump to

Keyboard shortcuts

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