sync

package
v0.0.0-...-8340aad Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LabelsAndAnnotationsSyncOptions

type LabelsAndAnnotationsSyncOptions struct {
	// ManagedLabelKeys is a set of label keys that should be managed by the Sync(). All other annotations are kept
	// on the object.
	ManagedLabelKeys []string
	// ManagedAnnotationKeys is a set of annotation keys that should be managed by the Sync(). All other annotations
	// are kept on the object.
	ManagedAnnotationKeys []string
}

type Syncer

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

Syncer synchronized K8s objects with the cluster

func New

func New(client client.Client) Syncer

func (*Syncer) Delete

func (s *Syncer) Delete(ctx context.Context, object client.Object) error

Delete deletes the supplied object from the cluster.

func (*Syncer) Sync

func (s *Syncer) Sync(ctx context.Context, owner client.Object, blueprint client.Object, diffOpts cmp.Option, laOpts LabelsAndAnnotationsSyncOptions) (bool, client.Object, error)

Sync syncs the blueprint to the cluster in a generic (as much as Go allows) manner. Returns true if the object was created or updated, false if there was no change detected.

Jump to

Keyboard shortcuts

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