addon

package
v2.25.11 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2024 License: Apache-2.0 Imports: 41 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"

	CSIAddonName = "csi"
)

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

	KubeconfigProvider KubeconfigProvider
	// 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)

Jump to

Keyboard shortcuts

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