replicator

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2021 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsApplicableForUpdate

func IsApplicableForUpdate(src, dst *corev1.Secret, force bool) (bool, string, error)

IsApplicableForUpdate checks whether a resource is applicable for an update. The destination resource is not overwritten if the replicaOf annotation does not matches the source resource. Setting force also updates the destination resource if no replicaOf is set. The function returns if the secret is applicated to be updasted, the new src hash and a optional error. The source hash is only returned if the secret should be updated.

Types

type Replicator

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

func New

func New(kubeClient client.Client, secret *corev1.Secret) *Replicator

func (*Replicator) ReplicateTo

func (r *Replicator) ReplicateTo(ctx context.Context, namespace string) error

ReplicateTo replicates the secret to the given namespace.

Jump to

Keyboard shortcuts

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