addon

package
v2.26.0 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2024 License: Apache-2.0 Imports: 43 Imported by: 0

Documentation

Overview

Package addon contains a controller that applies addons based on a Addon CRD. It needs a folder per addon that contains all manifests, then adds a label to all objects and applies the addon via `kubectl apply --purge -l $added-label`, which result in all objects that do have the label but are not in the on-disk manifests being removed.

Index

Constants

View Source
const (
	ControllerName = "kkp-addon-controller"
)

Variables

This section is empty.

Functions

func Add

func Add(
	mgr manager.Manager,
	log *zap.SugaredLogger,
	numWorkers int,
	workerName string,
	addonEnforceInterval int,
	addonCtxVariables map[string]interface{},
	overwriteRegistry string,
	kubeconfigProvider KubeconfigProvider,
	versions kubermatic.Versions,
	addons map[string]*addon.Addon,
) error

Add creates a new Addon controller that is responsible for managing in-cluster addons.

Types

type KubeconfigProvider

type KubeconfigProvider interface {
	GetAdminKubeconfig(ctx context.Context, c *kubermaticv1.Cluster) ([]byte, error)
	GetClient(ctx context.Context, c *kubermaticv1.Cluster, options ...clusterclient.ConfigOption) (ctrlruntimeclient.Client, error)
}

KubeconfigProvider provides functionality to get a clusters admin kubeconfig.

type Reconciler

type Reconciler struct {
	ctrlruntimeclient.Client
	// contains filtered or unexported fields
}

Reconciler stores necessary components that are required to manage in-cluster Add-On's.

func (*Reconciler) Reconcile

func (r *Reconciler) Reconcile(ctx context.Context, request reconcile.Request) (reconcile.Result, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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