declarative

package
v0.0.0-...-5e84c48 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2022 License: Apache-2.0 Imports: 19 Imported by: 3

Documentation

Index

Constants

View Source
const (
	ErrMsgMandatory = "invalid type conversion for `%s` or does not exist in spec "
)

Variables

This section is empty.

Functions

func GetComponentName

func GetComponentName(objectInstance types.BaseCustomObject) (string, error)

Types

type DefaultManifestResolver

type DefaultManifestResolver struct{}

DefaultManifestResolver represents the chart information for the passed BaseCustomObject resource.

func (DefaultManifestResolver) Get

Get returns the chart information to be processed.

type ManifestReconciler

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

func (*ManifestReconciler) HandleDeletingState

func (r *ManifestReconciler) HandleDeletingState(ctx context.Context, objectInstance types.BaseCustomObject) error

HandleDeletingState processed the deletion on the reconciled resource. Once the deletion if processed the relevant finalizers (if applied) are removed.

func (*ManifestReconciler) HandleInitialState

func (r *ManifestReconciler) HandleInitialState(ctx context.Context, objectInstance types.BaseCustomObject) error

HandleInitialState bootstraps state handling for the reconciled resource.

func (*ManifestReconciler) HandleProcessingState

func (r *ManifestReconciler) HandleProcessingState(ctx context.Context, objectInstance types.BaseCustomObject) error

HandleProcessingState processes the reconciled resource by processing the underlying resources. Based on the processing either a success or failure state is set on the reconciled resource.

func (*ManifestReconciler) HandleReadyState

func (r *ManifestReconciler) HandleReadyState(ctx context.Context, objectInstance types.BaseCustomObject) error

HandleReadyState checks for the consistency of reconciled resource, by verifying the underlying resources.

func (*ManifestReconciler) Inject

func (r *ManifestReconciler) Inject(mgr manager.Manager, customObject types.BaseCustomObject,
	opts ...ReconcilerOption,
) error

func (*ManifestReconciler) Reconcile

func (r *ManifestReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)

Reconcile is the entry point from the controller-runtime framework. It performs a reconciliation based on the passed ctrl.Request object.

type ReconcilerOption

type ReconcilerOption func(manifestOptions) manifestOptions

func WithCustomResourceLabels

func WithCustomResourceLabels(labels map[string]string) ReconcilerOption

WithCustomResourceLabels adds the specified labels to the list of labels for the reconciled resource.

func WithDefaultResolver

func WithDefaultResolver() ReconcilerOption

WithDefaultResolver resolves manifest object using the default resolver. This resolver parses the `spec` of the given object into an InstallationSpec.

func WithFinalizer

func WithFinalizer(finalizer string) ReconcilerOption

WithFinalizer adds a finalizer to the reconciled resource.

func WithManifestResolver

func WithManifestResolver(resolver types.ManifestResolver) ReconcilerOption

WithManifestResolver resolves manifest object for a given object instance.

func WithPostRenderTransform

func WithPostRenderTransform(operations ...types.ObjectTransform) ReconcilerOption

WithPostRenderTransform adds the specified ObjectTransforms to the list of manifest resource changes.

func WithResourcesReady

func WithResourcesReady(verify bool) ReconcilerOption

WithResourcesReady verifies if native resources are in their respective ready states.

type ResolveError

type ResolveError struct {
	ObjectName string
	Err        error
}

func (*ResolveError) Error

func (r *ResolveError) Error() string

Jump to

Keyboard shortcuts

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