managedresources

package
v1.19.3 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2021 License: Apache-2.0, BSD-2-Clause, MIT, + 1 more Imports: 20 Imported by: 25

Documentation

Index

Constants

This section is empty.

Variables

View Source
var IntervalWait = 2 * time.Second

IntervalWait is the interval when waiting for managed resources.

Functions

func CreateManagedResource

func CreateManagedResource(ctx context.Context, client client.Client, namespace, name, class, key string, data []byte, keepObjects bool, injectedLabels map[string]string, forceOverwriteAnnotations bool) error

CreateManagedResource creates a managed resource and its secret with the given name, class, key, and data in the given namespace.

func CreateManagedResourceFromUnstructured

func CreateManagedResourceFromUnstructured(ctx context.Context, client client.Client, namespace, name, class string, objs []*unstructured.Unstructured, keepObjects bool, injectedLabels map[string]string) error

CreateManagedResourceFromUnstructured creates a managed resource and its secret with the given name, class, and objects in the given namespace.

func DeleteManagedResource

func DeleteManagedResource(ctx context.Context, client client.Client, namespace string, name string) error

DeleteManagedResource deletes the managed resource and its secret with the given name in the given namespace.

func KeepManagedResourceObjects added in v1.12.0

func KeepManagedResourceObjects(ctx context.Context, c client.Client, namespace, name string, keepObjects bool) error

KeepManagedResourceObjects updates the keepObjects field of the managed resource with the given name in the given namespace.

func WaitUntilManagedResourceDeleted

func WaitUntilManagedResourceDeleted(ctx context.Context, client client.Client, namespace, name string) error

WaitUntilManagedResourceDeleted waits until the given managed resource is deleted.

func WaitUntilManagedResourceHealthy added in v1.13.0

func WaitUntilManagedResourceHealthy(ctx context.Context, client client.Client, namespace, name string) error

WaitUntilManagedResourceHealthy waits until the given managed resource is healthy.

Types

type Registry added in v1.13.0

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

Registry stores objects and their serialized form. It allows to compute a map of all registered objects that can be used as part of a Secret's data which is referenced by a ManagedResource.

func NewRegistry added in v1.13.0

func NewRegistry(scheme *runtime.Scheme, codec serializer.CodecFactory, serializer *json.Serializer) *Registry

NewRegistry returns a new registry for resources. The given scheme, codec, and serializer must know all the resource types that will later be added to the registry.

func (*Registry) Add added in v1.13.0

func (r *Registry) Add(obj client.Object) error

Add adds the given object the registry. It computes a filename based on its type, namespace, and name. It serializes the object to YAML and stores both representations (object and serialization) in the registry.

func (*Registry) AddAllAndSerialize added in v1.13.0

func (r *Registry) AddAllAndSerialize(objects ...client.Object) (map[string][]byte, error)

AddAllAndSerialize calls Add() for all the given objects before calling SerializedObjects().

func (*Registry) RegisteredObjects added in v1.13.0

func (r *Registry) RegisteredObjects() map[string]client.Object

RegisteredObjects returns a map whose keys are filenames and whose values are objects.

func (*Registry) SerializedObjects added in v1.13.0

func (r *Registry) SerializedObjects() map[string][]byte

SerializedObjects returns a map whose keys are filenames and whose values are serialized objects.

func (*Registry) String added in v1.13.0

func (r *Registry) String() string

String returns the string representation of the registry.

Jump to

Keyboard shortcuts

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