controller

package
v0.0.0-...-d6154db Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2024 License: Apache-2.0 Imports: 53 Imported by: 0

README

Controllers used within Lifecycle Manager

This package contains all controllers that can be registered within the Lifecycle Manager. For more details, read Lifecycle Manager Controllers in the /docs folder. For more information on how the API behaves after the controller finishes up the synchronization, please look at the Lifecycle Manager API document.

Documentation

Index

Constants

View Source
const (
	WatcherControllerName                     = "watcher"
	PurgeControllerName                       = "purge"
	KymaControllerName                        = "kyma"
	ManifestControllerName                    = "manifest"
	MandatoryModuleInstallationControllerName = "mandatory-module-installation"
	MandatoryModuleDeletionControllerName     = "mandatory-module-deletion"
)

Variables

View Source
var ErrManifestsStillExist = errors.New("manifests still exist")

Functions

func ManifestReconciler

func ManifestReconciler(mgr manager.Manager, requeueIntervals queue.RequeueIntervals,
	manifestMetrics *metrics.ManifestMetrics, mandatoryModulesMetrics *metrics.MandatoryModulesMetrics,
) *declarativev2.Reconciler

func SetupWithManager

func SetupWithManager(mgr manager.Manager,
	options ctrlruntime.Options,
	requeueIntervals queue.RequeueIntervals,
	settings SetupUpSetting,
	manifestMetrics *metrics.ManifestMetrics, mandatoryModulesMetrics *metrics.MandatoryModulesMetrics,
) error

Types

type EventReasonError

type EventReasonError string

type EventReasonInfo

type EventReasonInfo string

type KymaReconciler

type KymaReconciler struct {
	client.Client
	record.EventRecorder
	queue.RequeueIntervals
	DescriptorProvider  *provider.CachedDescriptorProvider
	SyncRemoteCrds      remote.SyncCrdsUseCase
	SKRWebhookManager   *watcher.SKRWebhookManifestManager
	KcpRestConfig       *rest.Config
	RemoteClientCache   *remote.ClientCache
	InKCPMode           bool
	RemoteSyncNamespace string
	IsManagedKyma       bool
	Metrics             *metrics.KymaMetrics
}

func (*KymaReconciler) DeleteNoLongerExistingModules

func (r *KymaReconciler) DeleteNoLongerExistingModules(ctx context.Context, kyma *v1beta2.Kyma) error

func (*KymaReconciler) GenerateModulesFromTemplate

func (r *KymaReconciler) GenerateModulesFromTemplate(ctx context.Context, kyma *v1beta2.Kyma) (common.Modules, error)

func (*KymaReconciler) IsInKcp

func (r *KymaReconciler) IsInKcp() bool

func (*KymaReconciler) IsKymaManaged

func (r *KymaReconciler) IsKymaManaged() bool

func (*KymaReconciler) Reconcile

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

func (*KymaReconciler) SetupWithManager

func (r *KymaReconciler) SetupWithManager(mgr ctrl.Manager,
	options ctrlruntime.Options, settings SetupUpSetting,
) error

SetupWithManager sets up the Kyma controller with the Manager.

func (*KymaReconciler) SyncKymaEnabled

func (r *KymaReconciler) SyncKymaEnabled(kyma *v1beta2.Kyma) bool

func (*KymaReconciler) UpdateMetrics

func (r *KymaReconciler) UpdateMetrics(ctx context.Context, kyma *v1beta2.Kyma)

func (*KymaReconciler) WatcherEnabled

func (r *KymaReconciler) WatcherEnabled(kyma *v1beta2.Kyma) bool

type MandatoryModuleDeletionReconciler

type MandatoryModuleDeletionReconciler struct {
	client.Client
	record.EventRecorder
	queue.RequeueIntervals
	DescriptorProvider *provider.CachedDescriptorProvider
}

func (*MandatoryModuleDeletionReconciler) Reconcile

func (*MandatoryModuleDeletionReconciler) SetupWithManager

func (r *MandatoryModuleDeletionReconciler) SetupWithManager(mgr ctrl.Manager,
	options ctrlruntime.Options,
) error

SetupWithManager sets up the MandatoryModuleDeletionReconciler with the Manager.

type MandatoryModuleReconciler

type MandatoryModuleReconciler struct {
	client.Client
	record.EventRecorder
	queue.RequeueIntervals
	DescriptorProvider  *provider.CachedDescriptorProvider
	RemoteSyncNamespace string
	InKCPMode           bool
	Metrics             *metrics.MandatoryModulesMetrics
}

func (*MandatoryModuleReconciler) GenerateModulesFromTemplate

func (r *MandatoryModuleReconciler) GenerateModulesFromTemplate(ctx context.Context,
	templates templatelookup.ModuleTemplatesByModuleName, kyma *v1beta2.Kyma,
) (common.Modules, error)

func (*MandatoryModuleReconciler) Reconcile

func (*MandatoryModuleReconciler) SetupWithManager

func (r *MandatoryModuleReconciler) SetupWithManager(mgr ctrl.Manager,
	options ctrlruntime.Options,
) error

SetupWithManager sets up the MandatoryModuleReconciler with the Manager.

type PurgeReconciler

type PurgeReconciler struct {
	client.Client
	record.EventRecorder
	ResolveRemoteClient   RemoteClientResolver
	PurgeFinalizerTimeout time.Duration
	SkipCRDs              matcher.CRDMatcherFunc
	IsManagedKyma         bool
	Metrics               *metrics.PurgeMetrics
}

func (*PurgeReconciler) IsKymaManaged

func (r *PurgeReconciler) IsKymaManaged() bool

func (*PurgeReconciler) Reconcile

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

func (*PurgeReconciler) SetupWithManager

func (r *PurgeReconciler) SetupWithManager(mgr ctrl.Manager,
	options ctrlruntime.Options,
) error

SetupWithManager sets up the Purge controller with the Manager.

func (*PurgeReconciler) UpdateMetrics

func (r *PurgeReconciler) UpdateMetrics(_ context.Context, _ *v1beta2.Kyma)

func (*PurgeReconciler) UpdateStatus

func (r *PurgeReconciler) UpdateStatus(ctx context.Context, kyma *v1beta2.Kyma, state shared.State, message string,
) error

type RemoteClientResolver

type RemoteClientResolver func(context.Context, client.ObjectKey) (client.Client, error)

type SetupUpSetting

type SetupUpSetting struct {
	ListenerAddr                 string
	EnableDomainNameVerification bool
	IstioNamespace               string
}

type WatcherReconciler

type WatcherReconciler struct {
	client.Client
	record.EventRecorder
	IstioClient           *istio.Client
	VirtualServiceFactory istio.VirtualServiceFactory
	RestConfig            *rest.Config
	Scheme                *machineryruntime.Scheme
	IstioGatewayNamespace string
	queue.RequeueIntervals
}

WatcherReconciler reconciles a Watcher object.

func (*WatcherReconciler) Reconcile

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

Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state.

func (*WatcherReconciler) SetupWithManager

func (r *WatcherReconciler) SetupWithManager(mgr ctrl.Manager, options ctrlruntime.Options,
) error

SetupWithManager sets up the Watcher controller with the Manager.

Jump to

Keyboard shortcuts

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