controller

package
v0.0.0-...-ae3d3cc Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2024 License: MIT Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HashObject

func HashObject(obj runtime.Object) string

HashObject returns the hash of a Object hash by a Codec

func WithKubernetesVolumeMountV1OverWrite

func WithKubernetesVolumeMountV1OverWrite() kubernetesVolumeMountV1OverWriteTransformer

func WithKubernetesVolumeV1OverWrite

func WithKubernetesVolumeV1OverWrite() kubernetesVolumeV1OverWriteTransformer

func WithOverwriteZeroValue

func WithOverwriteZeroValue() overwriteZeroValueTransformer

Types

type Controller

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

func NewController

func NewController(scheme *runtime.Scheme, cli client.Client) *Controller

func (*Controller) AddTransformer

func (c *Controller) AddTransformer(transformer ...mergo.Transformers)

func (Controller) ForObject

func (c Controller) ForObject(object client.Object) *Controller

func (Controller) GetStatus

func (c Controller) GetStatus() (*types.FormationStatus, error)

status.formation

func (Controller) Reconcile

func (c Controller) Reconcile(ctx context.Context, list []types.Resource) (result ctrl.Result, err error)

func (Controller) ReconcileObject

func (c Controller) ReconcileObject(ctx context.Context, resource types.Resource, owner v1.Object) (bool, error)

ReconcileObject In some cases, we want to reconcile a single object without the need to reconcile the whole formation. This will bypass the status check and will only check if the object exists and if not, create it. All the other logic will be the same as the Reconcile method.

type Transformers

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

func NewTransformersWithDefault

func NewTransformersWithDefault() *Transformers

func (*Transformers) Add

func (t *Transformers) Add(transformers ...mergo.Transformers)

func (*Transformers) Transformer

func (t *Transformers) Transformer(reflectType reflect.Type) func(dst, src reflect.Value) error

Jump to

Keyboard shortcuts

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