controllers

package
v0.0.0-...-19785be Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2024 License: MIT Imports: 28 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	CurveCertKey = "curve.cert"
)

Functions

func NewMiniClusterJob

func NewMiniClusterJob(cluster *api.MiniCluster) (*batchv1.Job, error)

newMiniCluster is used to create the MiniCluster Job

Types

type MiniClusterReconciler

type MiniClusterReconciler struct {
	client.Client
	Scheme  *runtime.Scheme
	Manager ctrl.Manager

	RESTClient rest.Interface
	RESTConfig *rest.Config
	// contains filtered or unexported fields
}

MiniClusterReconciler reconciles a MiniCluster object

func NewMiniClusterReconciler

func NewMiniClusterReconciler(
	client client.Client,
	scheme *runtime.Scheme,
	restConfig rest.Config,
	restClient rest.Interface,
	watchers ...MiniClusterUpdateWatcher,
) *MiniClusterReconciler

func (*MiniClusterReconciler) Create

Called when a new job is created

func (*MiniClusterReconciler) Delete

func (*MiniClusterReconciler) Generic

func (*MiniClusterReconciler) New

Wrapper to Client.Create (New) for easier interaction

func (*MiniClusterReconciler) Reconcile

func (r *MiniClusterReconciler) 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. We compare the state of the Flux object to the actual cluster state and perform operations to make the cluster state reflect the state specified by the user.

For more details, check Reconcile and its Result here: - https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.12.1/pkg/reconcile

func (*MiniClusterReconciler) SetupWithManager

func (r *MiniClusterReconciler) SetupWithManager(mgr ctrl.Manager) error

SetupWithManager sets up the controller with the Manager.

func (*MiniClusterReconciler) Update

type MiniClusterUpdateWatcher

type MiniClusterUpdateWatcher interface {
	NotifyMiniClusterUpdate(*api.MiniCluster)
}

This interface allows us to define a NotifyMiniClusterUpdate function

Jump to

Keyboard shortcuts

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