Documentation ¶
Overview ¶
Package kubernetes provides helper functions related to Kubernetes.
Index ¶
- func ClientAndConfig() (kubernetes.Interface, *rest.Config, error)
- func WaitForReady(ctx context.Context, sw watcher.StatusWatcher, objs []object.ObjMetadata) error
- func WaitForReadyRuntime(ctx context.Context, sw watcher.StatusWatcher, robjs []runtime.Object) error
- func WatcherForConfig(cfg *rest.Config) (watcher.StatusWatcher, error)
- type ImmediateWatcher
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.
Click to show internal directories.
Click to hide internal directories.