controller

package
v1.6.1 Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2026 License: BSD-3-Clause Imports: 23 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TokenAppRefIndex        = ".spec.appRef.name"
	ClusterTokenAppRefIndex = ".spec.appRef"
)

Field-indexer keys used to watch App changes and map them back to the Tokens/ClusterTokens that reference them.

View Source
const (
	ControllerNameToken        = "github-token"
	ControllerNameClusterToken = "github-clustertoken"
	ControllerNameApp          = "github-app"
)
View Source
const AppKeyRefIndex = ".spec.keyRef.name"

AppKeyRefIndex is the field-indexer key used to watch Secrets and map them back to the Apps that reference them via spec.keyRef.name.

Variables

This section is empty.

Functions

This section is empty.

Types

type AppReconciler added in v1.5.0

type AppReconciler struct {
	client.Client
	Metrics  *metrics.Recorder
	Registry *ghapp.Registry
}

AppReconciler reconciles an App resource by (re)building a cached ghait client in the shared ghapp.Registry and surfacing its readiness via status conditions.

func (*AppReconciler) Reconcile added in v1.5.0

func (r *AppReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)

func (*AppReconciler) SetupWithManager added in v1.5.0

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

SetupWithManager sets up the controller with the Manager.

type ClusterTokenReconciler

type ClusterTokenReconciler struct {
	TokenReconcilerBase
}

ClusterTokenReconciler reconciles a ClusterToken object.

func (*ClusterTokenReconciler) Reconcile

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

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

func (*ClusterTokenReconciler) SetupWithManager

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

SetupWithManager sets up the controller with the Manager.

type TokenReconciler

type TokenReconciler struct {
	TokenReconcilerBase
}

TokenReconciler reconciles a Token object.

func (*TokenReconciler) Reconcile

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

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

func (*TokenReconciler) SetupWithManager

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

SetupWithManager sets up the controller with the Manager.

type TokenReconcilerBase added in v1.5.0

type TokenReconcilerBase struct {
	client.Client
	// Reader is an uncached client used to resolve extraData ConfigMap/Secret
	// sources live on every reconcile, rather than caching every such object
	// cluster-wide.
	Reader   client.Reader
	Recorder record.EventRecorder
	Metrics  *metrics.Recorder
	Registry *ghapp.Registry
}

TokenReconcilerBase carries the dependencies shared by Token and ClusterToken reconcilers. Both reconcilers embed it so the generic reconcile helper can take a single receiver value.

Jump to

Keyboard shortcuts

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