...

Package controller

import "edge-infra.dev/pkg/sds/patching/k8s/controller"
Overview
Index
Subdirectories

Overview ▾

func Run

func Run(logger logr.Logger, opts ...controller.Option) error

type PatchController

type PatchController struct {
    client.Client
    kuberecorder.EventRecorder
    K8sClient   client.Client
    Log         logr.Logger
    Name        string
    RequeueTime time.Duration
    Conditions  controllerReconciler.Conditions
    Metrics     patchMetrics.Metrics
}

func NewPatchController

func NewPatchController(mgr ctrl.Manager, log logr.Logger) *PatchController

Create new controller. Summarize conditions will be a list of all node hostnames. NoCacheClient is for single requests to node list without watcher instead of default for controllers.

func (*PatchController) NewPatchManager

func (c *PatchController) NewPatchManager(ctx context.Context, ienpatch *v1ienpatch.IENPatch) (patchmanager patchManager.PatchManager, err error)

func (*PatchController) Patch

func (c *PatchController) Patch(ctx context.Context, req ctrl.Request, patchmanager patchManager.PatchManager, metrics *patchMetrics.ControllerMetrics) (result controllerReconciler.Result, patchErr error)

func (*PatchController) Reconcile

func (c *PatchController) Reconcile(ctx context.Context, req ctrl.Request) (res ctrl.Result, recErr error)

Reconciles on updates to Patchmanager objects

func (*PatchController) SetUpWithManager

func (c *PatchController) SetUpWithManager(mgr ctrl.Manager) error

func (*PatchController) Summarizer

func (c *PatchController) Summarizer(ctx context.Context, ns types.NamespacedName, ienpatch *v1ienpatch.IENPatch, result controllerReconciler.Result, patchErr error) (res ctrl.Result, recErr error)

Creates a new Summarizer and summarizes and patches the IENPatches object

Subdirectories

Name Synopsis
..