clientutil

package
v1.1.0-rc.0 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2020 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	KubeoneComponentLabel = "kubeone.io/component"
)

Variables

This section is empty.

Functions

func AddLabels

func AddLabels(labels map[string]string, objects ...runtime.Object) []runtime.Object

func CRDsReadyCondition

func CRDsReadyCondition(ctx context.Context, client dynclient.Client, groupKinds []string) func() (bool, error)

CRDsReadyCondition generate a k8s.io/apimachinery/pkg/util/wait.ConditionFunc function to be used in k8s.io/apimachinery/pkg/util/wait.Poll* family of functions. It will check all provided GKs (GroupKinds) to exists and have Established status

func CreateOrUpdate

func CreateOrUpdate(ctx context.Context, c client.Client, obj runtime.Object, updaters ...Updater) error

CreateOrUpdate makes it easy to "apply" objects to kubernetes API server

func LabelComponent

func LabelComponent(component string, objects ...runtime.Object) []runtime.Object

func PodsReadyCondition

func PodsReadyCondition(ctx context.Context, c dynclient.Client, listOpts dynclient.ListOptions) func() (bool, error)

PodsReadyCondition generate a k8s.io/apimachinery/pkg/util/wait.ConditionFunc function to be used in k8s.io/apimachinery/pkg/util/wait.Poll* family of functions. It will check all selected pods to have PodReady condition and phase PodRunning.

Types

type Updater

type Updater func(client.Client, runtime.Object)

func WithComponentLabel

func WithComponentLabel(componentname string) Updater

Jump to

Keyboard shortcuts

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