manifests

package
v0.113.1 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2024 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MutateFuncFor added in v0.85.0

func MutateFuncFor(existing, desired client.Object) controllerutil.MutateFn

MutateFuncFor returns a mutate function based on the existing resource's concrete type. It supports currently only the following types or else panics: - ConfigMap - Service - ServiceAccount - ClusterRole - ClusterRoleBinding - Role - RoleBinding - Deployment - DaemonSet - StatefulSet - ServiceMonitor - Ingress - HorizontalPodAutoscaler - Route - Secret - TargetAllocator In order for the operator to reconcile other types, they must be added here. The function returned takes no arguments but instead uses the existing and desired inputs here. Existing is expected to be set by the controller-runtime package through a client get call.

func ObjectIsNotNil added in v0.85.0

func ObjectIsNotNil(obj client.Object) bool

ObjectIsNotNil ensures that we only create an object IFF it isn't nil, and it's concrete type isn't nil either. This works around the Go type system by using reflection to verify its concrete type isn't nil.

Types

type Builder

type Builder[Params any] func(params Params) ([]client.Object, error)

type ImmutableFieldChangeErr added in v0.113.0

type ImmutableFieldChangeErr struct {
	Field string
}
var (
	ImmutableChangeErr *ImmutableFieldChangeErr
)

func (*ImmutableFieldChangeErr) Error added in v0.113.0

func (e *ImmutableFieldChangeErr) Error() string

type K8sManifestFactory

type K8sManifestFactory[Params any] ManifestFactory[client.Object, Params]

func Factory

func Factory[T client.Object, Params any](f ManifestFactory[T, Params]) K8sManifestFactory[Params]

func FactoryWithoutError

func FactoryWithoutError[T client.Object, Params any](f SimpleManifestFactory[T, Params]) K8sManifestFactory[Params]

type ManifestFactory

type ManifestFactory[T client.Object, Params any] func(params Params) (T, error)

type Params

type Params struct {
	Client          client.Client
	Recorder        record.EventRecorder
	Scheme          *runtime.Scheme
	Log             logr.Logger
	OtelCol         v1beta1.OpenTelemetryCollector
	TargetAllocator *v1alpha1.TargetAllocator
	OpAMPBridge     v1alpha1.OpAMPBridge
	Config          config.Config
	Reviewer        rbac.SAReviewer
	ErrorAsWarning  bool
}

Params holds the reconciliation-specific parameters.

type SimpleManifestFactory

type SimpleManifestFactory[T client.Object, Params any] func(params Params) T

Directories

Path Synopsis
Package collector handles the OpenTelemetry Collector.
Package collector handles the OpenTelemetry Collector.
adapters
Package adapters is for data conversion.
Package adapters is for data conversion.

Jump to

Keyboard shortcuts

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