service

package
v0.0.0-...-54d0854 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2024 License: Apache-2.0 Imports: 40 Imported by: 1

Documentation

Index

Constants

View Source
const (
	ManagedByLabel       = "reconciler.kyma-project.io/managed-by"
	KymaVersionLabel     = "reconciler.kyma-project.io/origin-version"
	LabelReconcilerValue = "reconciler"
)
View Source
const (
	NameLabel              = "name"
	SidecarInjectionLabel  = "istio-injection"
	SignifyValidationLabel = "namespaces.warden.kyma-project.io/validate"
)
View Source
const (
	ManagedByAnnotation = "reconciler.kyma-project.io/managed-by-reconciler-disclaimer"
)

Variables

This section is empty.

Functions

func EnableReconcilerDryRun

func EnableReconcilerDryRun()

func RefreshGlobalWorkspaceFactory deprecated

func RefreshGlobalWorkspaceFactory(workspaceFactory chart.Factory) error

Deprecated: do not switch global workspace at any time!

func RegisterReconciler

func RegisterReconciler(reconcilerName string, reconciler *ComponentReconciler)

func RegisteredReconcilers

func RegisteredReconcilers() []string

func UseGlobalWorkspaceFactory

func UseGlobalWorkspaceFactory(workspaceFactory chart.Factory) error

Types

type Action

type Action interface {
	Run(helper *ActionContext) error
}

type ActionContext

type ActionContext struct {
	KubeClient       kubernetes.Client
	WorkspaceFactory chart.Factory
	Context          context.Context
	Logger           *zap.SugaredLogger
	Task             *reconciler.Task
	ChartProvider    chart.Provider
}

type AnnotationsInterceptor

type AnnotationsInterceptor struct {
}

func (*AnnotationsInterceptor) Intercept

func (l *AnnotationsInterceptor) Intercept(resources *kubernetes.ResourceCacheList, _ string) error

type ClusterWideResourceInterceptor

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

func (*ClusterWideResourceInterceptor) Intercept

type ComponentReconciler

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

func GetReconciler

func GetReconciler(reconcilerName string) (*ComponentReconciler, error)

func NewComponentReconciler

func NewComponentReconciler(reconcilerName string) (*ComponentReconciler, error)

func (*ComponentReconciler) Collector

func (r *ComponentReconciler) Collector() prometheus.Collector

func (*ComponentReconciler) Debug

func (*ComponentReconciler) EnableDryRun

func (r *ComponentReconciler) EnableDryRun(dryRun bool)

func (*ComponentReconciler) StartLocal

func (r *ComponentReconciler) StartLocal(ctx context.Context, model *reconciler.Task, logger *zap.SugaredLogger) error

func (*ComponentReconciler) StartRemote

func (r *ComponentReconciler) StartRemote(ctx context.Context, reconcilerName string) (*WorkerPool, *OccupancyTracker, error)

func (*ComponentReconciler) WithDeleteAction

func (r *ComponentReconciler) WithDeleteAction(deleteAction Action) *ComponentReconciler

func (*ComponentReconciler) WithHeartbeatSenderConfig

func (r *ComponentReconciler) WithHeartbeatSenderConfig(interval, timeout time.Duration) *ComponentReconciler

func (*ComponentReconciler) WithPostDeleteAction

func (r *ComponentReconciler) WithPostDeleteAction(postDeleteAction Action) *ComponentReconciler

func (*ComponentReconciler) WithPostReconcileAction

func (r *ComponentReconciler) WithPostReconcileAction(postReconcileAction Action) *ComponentReconciler

func (*ComponentReconciler) WithPreDeleteAction

func (r *ComponentReconciler) WithPreDeleteAction(preDeleteAction Action) *ComponentReconciler

func (*ComponentReconciler) WithPreReconcileAction

func (r *ComponentReconciler) WithPreReconcileAction(preReconcileAction Action) *ComponentReconciler

func (*ComponentReconciler) WithProgressTrackerConfig

func (r *ComponentReconciler) WithProgressTrackerConfig(interval, timeout time.Duration) *ComponentReconciler

func (*ComponentReconciler) WithReconcileAction

func (r *ComponentReconciler) WithReconcileAction(reconcileAction Action) *ComponentReconciler

func (*ComponentReconciler) WithReconcilerMetricsSet

func (r *ComponentReconciler) WithReconcilerMetricsSet(reconcilerMetricsSet *metrics.ReconcilerMetricsSet) *ComponentReconciler

func (*ComponentReconciler) WithRetryDelay

func (r *ComponentReconciler) WithRetryDelay(retryDelay time.Duration) *ComponentReconciler

func (*ComponentReconciler) WithWorkers

func (r *ComponentReconciler) WithWorkers(workers int, timeout time.Duration) *ComponentReconciler

func (*ComponentReconciler) WithWorkspace

func (r *ComponentReconciler) WithWorkspace(workspace string) *ComponentReconciler

type FinalizerInterceptor

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

func (*FinalizerInterceptor) Intercept

func (i *FinalizerInterceptor) Intercept(resources *kubernetes.ResourceCacheList, _ string) error

Intercept preserves finalizers on all kinds in interceptableKinds or all found resources if not specified

type HPAInterceptor

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

func (*HPAInterceptor) Intercept

func (i *HPAInterceptor) Intercept(resources *kubernetes.ResourceCacheList, namespace string) error

type Install

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

func NewInstall

func NewInstall(logger *zap.SugaredLogger) *Install

func (*Install) Invoke

func (r *Install) Invoke(ctx context.Context, chartProvider chart.Provider, task *reconciler.Task, kubeClient kubernetes.Client) error

type LabelsInterceptor

type LabelsInterceptor struct {
	Version string
}

func (*LabelsInterceptor) Intercept

func (l *LabelsInterceptor) Intercept(resources *kubernetes.ResourceCacheList, _ string) error

type NamespaceInterceptor

type NamespaceInterceptor struct {
}

func (*NamespaceInterceptor) Intercept

func (l *NamespaceInterceptor) Intercept(resources *kubernetes.ResourceCacheList, _ string) error

Intercept adds the name of the namespace also as label to the namespace resource to be backward compatible with Kyma 1.x

type OccupancyTracker

type OccupancyTracker struct {
	sync.Mutex
	// contains filtered or unexported fields
}

func (*OccupancyTracker) AssignCallbackURL

func (t *OccupancyTracker) AssignCallbackURL(callbackURL string)

func (*OccupancyTracker) Track

func (t *OccupancyTracker) Track(ctx context.Context, pool *WorkerPool, reconcilerName string)

type Operation

type Operation interface {
	Invoke(ctx context.Context, chartProvider chart.Provider, model *reconciler.Task, kubeClient kubernetes.Client) error
}

type PVCInterceptor

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

func (*PVCInterceptor) Intercept

func (i *PVCInterceptor) Intercept(resources *kubernetes.ResourceCacheList, namespace string) error

type ServicesInterceptor

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

func (*ServicesInterceptor) Intercept

func (s *ServicesInterceptor) Intercept(resources *k8s.ResourceCacheList, namespace string) error

type TestCleanup

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

func NewTestCleanup

func NewTestCleanup(reconciler *ComponentReconciler, kubeClient kubernetes.Client) *TestCleanup

func (*TestCleanup) RemoveKymaComponent

func (c *TestCleanup) RemoveKymaComponent(t *testing.T, version, component, namespace, url string)

type WorkerPool

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

func (*WorkerPool) AssignWorker

func (wa *WorkerPool) AssignWorker(ctx context.Context, model *reconciler.Task) error

func (*WorkerPool) IsClosed

func (wa *WorkerPool) IsClosed() bool

func (*WorkerPool) IsFull

func (wa *WorkerPool) IsFull() bool

func (*WorkerPool) RunningWorkers

func (wa *WorkerPool) RunningWorkers() int

func (*WorkerPool) Size

func (wa *WorkerPool) Size() int

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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