controllers

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2023 License: Apache-2.0 Imports: 56 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddObjectsToInventory

func AddObjectsToInventory(inv *cuev1alpha1.ResourceInventory, set *ssa.ChangeSet) error

AddObjectsToInventory extracts the metadata from the given objects and adds it to the inventory.

func DiffInventory

DiffInventory returns the slice of objects that do not exist in the target inventory.

func ListMetaInInventory

func ListMetaInInventory(inv *cuev1alpha1.ResourceInventory) (object.ObjMetadataSet, error)

ListMetaInInventory returns the inventory entries as object.ObjMetadata objects.

func ListObjectsInInventory

func ListObjectsInInventory(inv *cuev1alpha1.ResourceInventory) ([]*unstructured.Unstructured, error)

ListObjectsInInventory returns the inventory entries as unstructured.Unstructured objects.

func NewInventory

func NewInventory() *cuev1alpha1.ResourceInventory

Types

type CueInstanceImpersonation

type CueInstanceImpersonation struct {
	client.Client
	// contains filtered or unexported fields
}

func NewCueInstanceImpersonation

func NewCueInstanceImpersonation(
	cueInstance cuev1alpha1.CueInstance,
	kubeClient client.Client,
	statusPoller *polling.StatusPoller,
	defaultServiceAccount string) *CueInstanceImpersonation

func (*CueInstanceImpersonation) CanFinalize

func (ci *CueInstanceImpersonation) CanFinalize(ctx context.Context) bool

CanFinalize asserts if the given CueInstance can be finalized using impersonation.

func (*CueInstanceImpersonation) GetClient

GetClient creates a controller-runtime client for talcing to a Kubernetes API server. If KubeConfig is set, will use the kubeconfig bytes from the Kubernetes secret. If ServiceAccountName is set, will use the cluster provided kubeconfig impersonating the SA. If --kubeconfig is set, will use the kubeconfig file at that location. Otherwise will assume running in cluster and use the cluster provided kubeconfig.

func (*CueInstanceImpersonation) GetServiceAccountToken

func (ci *CueInstanceImpersonation) GetServiceAccountToken(ctx context.Context) (string, error)

type CueInstanceReconciler

type CueInstanceReconciler struct {
	client.Client

	Scheme                *runtime.Scheme
	EventRecorder         kuberecorder.EventRecorder
	ExternalEventRecorder *events.Recorder
	MetricsRecorder       *metrics.Recorder
	StatusPoller          *polling.StatusPoller
	ControllerName        string

	NoCrossNamespaceRefs  bool
	DefaultServiceAccount string
	// contains filtered or unexported fields
}

CueInstanceReconciler reconciles a CueInstance object

func (*CueInstanceReconciler) Reconcile

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

Reconcile is the main reconciler loop.

func (*CueInstanceReconciler) SetupWithManager

func (r *CueInstanceReconciler) SetupWithManager(mgr ctrl.Manager, opts CueInstanceReconcilerOptions) error

SetupWithManager sets up the controller with the Manager. SetupWithManager sets up the controller with the Manager.

type CueInstanceReconcilerOptions

type CueInstanceReconcilerOptions struct {
	MaxConcurrentReconciles   int
	HTTPRetry                 int
	DependencyRequeueInterval time.Duration
}

CueInstanceReconcilerOptions options

type SourceRevisionChangePredicate

type SourceRevisionChangePredicate struct {
	predicate.Funcs
}

func (SourceRevisionChangePredicate) Update

Jump to

Keyboard shortcuts

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