target

package
v0.16.0 Latest Latest
Warning

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

Go to latest
Published: Feb 11, 2025 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func TrustBundleHash added in v0.14.0

func TrustBundleHash(data []byte, additionalFormats *trustapi.AdditionalFormats) string

Types

type Data

type Data struct {
	Data       string
	BinaryData map[string][]byte
}

func (*Data) Populate

func (b *Data) Populate(pool *util.CertPool, formats *trustapi.AdditionalFormats) error

type Kind

type Kind string
const (
	KindConfigMap Kind = "ConfigMap"
	KindSecret    Kind = "Secret"
)

type Reconciler

type Reconciler struct {
	// a cache-backed Kubernetes client
	Client client.Client

	// Cache is a cache.Cache that holds cached ConfigMap and Secret
	// resources that are used as targets for Bundles.
	Cache client.Reader

	// PatchResourceOverwrite allows use to override the patchResource function
	// it is used for testing purposes
	PatchResourceOverwrite func(ctx context.Context, obj interface{}) error
}

func (*Reconciler) Sync added in v0.14.0

func (r *Reconciler) Sync(
	ctx context.Context,
	target Resource,
	bundle *trustapi.Bundle,
	resolvedBundle Data,
	shouldExist bool,
) (bool, error)

Sync syncs the given data to the target resource. Ensures the resource is owned by the given Bundle, and the data is up to date. Returns true if the resource has been created, updated or deleted.

type Resource added in v0.14.0

type Resource struct {
	Kind Kind
	types.NamespacedName
}

Jump to

Keyboard shortcuts

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