Documentation ¶
Index ¶
- Variables
- func CreateManagedResource(ctx context.Context, client client.Client, namespace, name, class, key string, ...) error
- func CreateManagedResourceFromUnstructured(ctx context.Context, client client.Client, namespace, name, class string, ...) error
- func DeleteManagedResource(ctx context.Context, client client.Client, namespace string, name string) error
- func KeepManagedResourceObjects(ctx context.Context, c client.Client, namespace, name string, keepObjects bool) error
- func WaitUntilManagedResourceDeleted(ctx context.Context, client client.Client, namespace, name string) error
- func WaitUntilManagedResourceHealthy(ctx context.Context, client client.Client, namespace, name string) error
- type Registry
Constants ¶
This section is empty.
Variables ¶
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.
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
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
AddAllAndSerialize calls Add() for all the given objects before calling SerializedObjects().
func (*Registry) RegisteredObjects ¶ added in v1.13.0
RegisteredObjects returns a map whose keys are filenames and whose values are objects.
func (*Registry) SerializedObjects ¶ added in v1.13.0
SerializedObjects returns a map whose keys are filenames and whose values are serialized objects.