controllers

package
v0.0.0-...-3516743 Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2022 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildKubeClientWithSecret

func BuildKubeClientWithSecret(secret *corev1.Secret) (kubernetes.Interface, error)

func CheckLeaseUpdaterClient

func CheckLeaseUpdaterClient(u *leaseUpdater) bool

CheckLeaseUpdaterClient checks if the current client still functioning properly

Types

type IBuildKubeClientWithSecret

type IBuildKubeClientWithSecret func(secret *corev1.Secret) (kubernetes.Interface, error)

IBuildKubeClientWithSecret a function which convert a secret to client

type ICheckLeaseUpdaterClient

type ICheckLeaseUpdaterClient func(u *leaseUpdater) bool

ICheckLeaseUpdaterClient checks if a leaseUpdater has valid client

type LeaseReconciler

type LeaseReconciler struct {
	client.Client
	Log                 logr.Logger
	Scheme              *runtime.Scheme
	LeaseName           string
	LeaseNamespace      string
	HubConfigSecretName string
	// Use a type because this allows to create a fake function
	BuildKubeClientWithSecretFunc IBuildKubeClientWithSecret
	LeaseDurationSeconds          int32
	PodName                       string
	PodNamespace                  string

	CheckLeaseUpdaterClient ICheckLeaseUpdaterClient
	// contains filtered or unexported fields
}

LeaseReconciler reconciles a Secret object

func (*LeaseReconciler) Reconcile

func (r *LeaseReconciler) Reconcile(req ctrl.Request) (ctrl.Result, error)

func (*LeaseReconciler) SetupWithManager

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

Jump to

Keyboard shortcuts

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