resources

package
v0.13.6 Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2026 License: Apache-2.0 Imports: 47 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Add added in v0.13.0

func Add(
	log logr.Logger,
	mgr manager.Manager,
	configuration configuration.Configuration,
	opts utils.ControllerOptions,
	cache *cache.ImpersonationCache,
) (err error)

func ForeachNamespace added in v0.13.0

func ForeachNamespace(
	ctx context.Context,
	controllerClient client.Client,
	resourceClient client.Client,
	collector Collector,
	opts CollectorOptions,
	log logr.Logger,
	resource capsulev1beta2.ResourceSpec,
	resourceIndex int,
	tnt capsulev1beta2.Tenant,
	acc processor.Accumulator,
) (err error)

func GatherAdditionalMetadata added in v0.13.0

func GatherAdditionalMetadata(
	spec capsulev1beta2.ResourceSpec,
	fastContext map[string]string,
) (labels map[string]string, annotations map[string]string)

Allows templating in.

Types

type Collector added in v0.13.0

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

func NewCollector added in v0.13.0

func NewCollector(c client.Reader, mapper k8smeta.RESTMapper) Collector

func (*Collector) AddToAccumulation added in v0.13.0

func (co *Collector) AddToAccumulation(
	tnt *capsulev1beta2.Tenant,
	ns *corev1.Namespace,
	opts CollectorOptions,
	spec capsulev1beta2.ResourceSpec,
	obj *unstructured.Unstructured,
	origin string,
	combine bool,
) (err error)

Add an item to the accumulator Mainly handles conflicts.

func (*Collector) Collect added in v0.13.0

func (co *Collector) Collect(
	ctx context.Context,
	c client.Client,
	opts CollectorOptions,
	tnt *capsulev1beta2.Tenant,
	resourceIndex string,
	spec capsulev1beta2.ResourceSpec,
	ns *corev1.Namespace,
) (err error)

func (*Collector) CollectNamespacedItems added in v0.13.0

type CollectorIteratorOptions added in v0.13.0

type CollectorIteratorOptions struct {
	Labels         map[string]string
	Annotations    map[string]string
	FastContext    map[string]string
	FastContextAny map[string]any
}

func NewCollectorIteratorOptions added in v0.13.0

func NewCollectorIteratorOptions(
	tnt *capsulev1beta2.Tenant,
	ns *corev1.Namespace,
	spec capsulev1beta2.ResourceSpec,
) CollectorIteratorOptions

type CollectorOptions added in v0.13.0

type CollectorOptions struct {
	AllowCrossNamespaceSelection bool
	Accumulator                  processor.Accumulator
	Iterator                     CollectorIteratorOptions
	ValidatorNamespaces          tpl.NamespaceValidator
}

Jump to

Keyboard shortcuts

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