builder

package
v1.95.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ManagedResource

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

ManagedResource is a structure managing a ManagedResource.

func NewManagedResource

func NewManagedResource(client client.Client) *ManagedResource

NewManagedResource creates a new builder for a ManagedResource.

func (*ManagedResource) CreateIfNotExists added in v1.90.0

func (m *ManagedResource) CreateIfNotExists(createIfNotExists bool) *ManagedResource

CreateIfNotExists determines if the managed resources should be created if it does not exist.

func (*ManagedResource) Delete

func (m *ManagedResource) Delete(ctx context.Context) error

Delete deletes the ManagedResource.

func (*ManagedResource) DeletePersistentVolumeClaims

func (m *ManagedResource) DeletePersistentVolumeClaims(v bool) *ManagedResource

DeletePersistentVolumeClaims sets the DeletePersistentVolumeClaims field.

func (*ManagedResource) ForceOverwriteAnnotations

func (m *ManagedResource) ForceOverwriteAnnotations(v bool) *ManagedResource

ForceOverwriteAnnotations sets the ForceOverwriteAnnotations field.

func (*ManagedResource) ForceOverwriteLabels

func (m *ManagedResource) ForceOverwriteLabels(v bool) *ManagedResource

ForceOverwriteLabels sets the ForceOverwriteLabels field.

func (*ManagedResource) KeepObjects

func (m *ManagedResource) KeepObjects(v bool) *ManagedResource

KeepObjects sets the KeepObjects field.

func (*ManagedResource) Reconcile

func (m *ManagedResource) Reconcile(ctx context.Context) error

Reconcile creates or updates the ManagedResource as well as marks all referenced secrets as garbage collectable.

func (*ManagedResource) WithAnnotations

func (m *ManagedResource) WithAnnotations(annotations map[string]string) *ManagedResource

WithAnnotations sets the annotations.

func (*ManagedResource) WithClass

func (m *ManagedResource) WithClass(name string) *ManagedResource

WithClass sets the Class field.

func (*ManagedResource) WithInjectedLabels

func (m *ManagedResource) WithInjectedLabels(labelsToInject map[string]string) *ManagedResource

WithInjectedLabels sets the InjectLabels field.

func (*ManagedResource) WithLabels

func (m *ManagedResource) WithLabels(labels map[string]string) *ManagedResource

WithLabels sets the labels.

func (*ManagedResource) WithNamespacedName

func (m *ManagedResource) WithNamespacedName(namespace, name string) *ManagedResource

WithNamespacedName sets the namespace and name.

func (*ManagedResource) WithSecretRef

func (m *ManagedResource) WithSecretRef(secretRefName string) *ManagedResource

WithSecretRef adds a reference with the given name to the SecretRefs field.

func (*ManagedResource) WithSecretRefs

func (m *ManagedResource) WithSecretRefs(secretRefs []corev1.LocalObjectReference) *ManagedResource

WithSecretRefs sets the SecretRefs field.

type Secret

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

Secret is a structure for managing a secret.

func NewSecret

func NewSecret(client client.Client) *Secret

NewSecret creates a new builder for a secret.

func (*Secret) AddLabels added in v1.77.0

func (s *Secret) AddLabels(labels map[string]string) *Secret

AddLabels adds the labels to the existing secret labels.

func (*Secret) CreateIfNotExists added in v1.90.0

func (s *Secret) CreateIfNotExists(createIfNotExists bool) *Secret

CreateIfNotExists determines if the secret should be created if it does not exist. Immutable secrets are always created, regardless of this configuration.

func (*Secret) Reconcile

func (s *Secret) Reconcile(ctx context.Context) error

Reconcile creates or updates the secret.

func (*Secret) Unique added in v1.77.0

func (s *Secret) Unique() (string, *Secret)

Unique makes the secret unique and immutable. Returns the new and unique name of the secret and the builder object. This function should be called after the name and data of the secret were set.

func (*Secret) WithAnnotations

func (s *Secret) WithAnnotations(annotations map[string]string) *Secret

WithAnnotations sets the annotations.

func (*Secret) WithKeyValues

func (s *Secret) WithKeyValues(keyValues map[string][]byte) *Secret

WithKeyValues sets the data map.

func (*Secret) WithLabels

func (s *Secret) WithLabels(labels map[string]string) *Secret

WithLabels sets the labels. The label "resources.gardener.cloud/garbage-collectable-reference" is retained if it already exists in the current labels.

func (*Secret) WithNamespacedName

func (s *Secret) WithNamespacedName(namespace, name string) *Secret

WithNamespacedName sets the namespace and name.

Jump to

Keyboard shortcuts

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