controllers

package
v0.16.0 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2024 License: Apache-2.0 Imports: 31 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RunnerManager

type RunnerManager interface {
	StartOrUpdate(*meowsv1alpha1.RunnerPool, *github.ClientCredential) error
	Stop(*meowsv1alpha1.RunnerPool) error
	StopAll()
}

RunnerManager manages runner pods and runners registered in GitHub. It generates one goroutine for each RunnerPool CR to manage them.

func NewRunnerManager

func NewRunnerManager(log logr.Logger, k8sClient client.Client, scheme *runtime.Scheme, githubClientFactory github.ClientFactory, runnerPodClient runner.Client, interval time.Duration) RunnerManager

type RunnerPoolReconciler

type RunnerPoolReconciler struct {
	client.Client
	// contains filtered or unexported fields
}

RunnerPoolReconciler reconciles a RunnerPool object

func NewRunnerPoolReconciler

func NewRunnerPoolReconciler(
	log logr.Logger, client client.Client, scheme *runtime.Scheme, runnerImage string,
	runnerManager RunnerManager, secretUpdater SecretUpdater,
	organizationRegexp, repositoryRegexp *regexp.Regexp) *RunnerPoolReconciler

NewRunnerPoolReconciler creates RunnerPoolReconciler

func (*RunnerPoolReconciler) Reconcile

func (r *RunnerPoolReconciler) 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.

func (*RunnerPoolReconciler) SetupWithManager

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

SetupWithManager sets up the controller with the Manager.

type SecretUpdater added in v0.5.0

type SecretUpdater interface {
	Start(*meowsv1alpha1.RunnerPool, *github.ClientCredential) error
	Stop(*meowsv1alpha1.RunnerPool) error
	StopAll()
}

SecretUpdater creates a registration token for self-hosted runners and updates a secret periodically. It generates one goroutine for each RunnerPool CR.

func NewSecretUpdater added in v0.5.0

func NewSecretUpdater(log logr.Logger, k8sClient client.Client, githubClientFactory github.ClientFactory) SecretUpdater

Jump to

Keyboard shortcuts

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