utils

package
v0.0.0-...-9d571ef Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2024 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConvertHelmValsToMap

func ConvertHelmValsToMap(a []struct {
	Name  string
	Value string
}) map[string]string

ConvertHelmValsToMap converts a slice of strings to a map of strings

func DoSSA

func DoSSA(ctx context.Context, cfg *rest.Config, yaml []byte) error

DoSSA does service side apply with the given YAML as a []byte

func DownloadFileString

func DownloadFileString(url string) (string, error)

DownloadFileString will load the contents of a url to a string and return it

func GetDefaultRuntime

func GetDefaultRuntime() cluster.ProviderOption

GetDefault selected the default runtime from the environment override

func GetRestConfig

func GetRestConfig(kubeConfigPath string) (*rest.Config, error)

GetRestConfig returns a *rest.Config

func IsDeploymentRunning

func IsDeploymentRunning(c kubernetes.Interface, ns string, depl string) wait.ConditionWithContextFunc

check to see if the named deployment is running func IsDeploymentRunning(c kubernetes.Interface, ns string, depl string) wait.ConditionFunc {

func LabelWorkers

func LabelWorkers(c kubernetes.Interface) error

LabelWorkers will label the workers nodes as such

func NewClient

func NewClient(kubeConfigPath string) (kubernetes.Interface, error)

NewClient returns a kubernetes.Interface

func PostInstallManifests

func PostInstallManifests(manifests []string, ctx context.Context, cfg *rest.Config) error

PostInstallManifests will install the manifests after cluster has been created and setup. It is currently best effort/garbage in garbage out

func SplitYAML

func SplitYAML(resources []byte) ([][]byte, error)

SplitYAML splits a multipart YAML and returns a slice of a slice of byte

func WaitForDeployment

func WaitForDeployment(c kubernetes.Interface, namespace string, deployment string, timeout time.Duration) error

Poll up to timeout seconds for pod to enter running state.

Types

This section is empty.

Jump to

Keyboard shortcuts

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