kubernetes

package module
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2024 License: Apache-2.0 Imports: 14 Imported by: 1

Documentation

Overview

Package kubernetes provides helper functions related to Kubernetes.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ClientAndConfig

func ClientAndConfig() (kubernetes.Interface, *rest.Config, error)

ClientAndConfig returns a Kubernetes client and the rest config used to configure the client.

func WaitForReady

func WaitForReady(ctx context.Context, sw watcher.StatusWatcher, objs []object.ObjMetadata) error

WaitForReady waits for all of the objects to reach a ready state.

func WaitForReadyRuntime added in v0.2.0

func WaitForReadyRuntime(ctx context.Context, sw watcher.StatusWatcher, robjs []runtime.Object) error

WaitForReadyRuntime waits for all of the runtime objects to reach a ready state.

func WatcherForConfig

func WatcherForConfig(cfg *rest.Config) (watcher.StatusWatcher, error)

WatcherForConfig returns a status watcher for the give Kubernetes configuration.

Types

type ImmediateWatcher added in v0.1.0

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

ImmediateWatcher should only be used for testing and returns the set status immediatly.

func NewImmediateWatcher added in v0.1.0

func NewImmediateWatcher(status status.Status) *ImmediateWatcher

NewImmediateWatcher returns a ImmediateWatcher.

func (*ImmediateWatcher) Watch added in v0.1.0

Watch watches the given objects and immediatly returns the configured status.

Jump to

Keyboard shortcuts

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