Documentation
¶
Overview ¶
gitrepository.go reconciles the GitRepository CR — the entry point of the delivery pipeline (GitRepository → GitHubEvent → Build → SupplyChain → Package → Deployment). On setup it wires the GitRepository domain's mediator, GitHub provider, and service into the domain registry.
The finalizer (GitRepositoryFinalizer) gates deletion on teardown of cluster-scoped, label-linked resources (the Crossplane Repository and RepositoryWebhook) that Kubernetes GC can't reclaim on its own — see the constant's doc comment for the full add/check/remove lifecycle.
Index ¶
Constants ¶
const GitRepositoryFinalizer = "sources.blanketops.dev/gitrepository-finalizer"
GitRepositoryFinalizer gates GitRepository deletion on teardown of the resources the domain provisioned: the Crossplane Repository and RepositoryWebhook (cluster-scoped, label-linked only — Kubernetes GC cannot reclaim them) and the per-CR prerequisites. The finalizer is removed only after CmdDelete completes successfully; any teardown error keeps it in place for retry on the next reconcile.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GitRepositoryReconciler ¶
type GitRepositoryReconciler struct {
client.Client
GitRepositoryService *application.GitRepositoryService
Scheme *runtime.Scheme
GitRepositoryMediator *gitrepository.Mediator
Log logr.Logger
Runtime *runtimeinfra.Runtime
Recorder events.EventRecorder
}
GitRepositoryReconciler reconciles a GitRepository object
func (*GitRepositoryReconciler) Reconcile ¶
func (r *GitRepositoryReconciler) 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.
The lifecycle is finalizer-gated: live objects get the finalizer added before any domain work runs, and deletion routes CmdDelete through the engine — the finalizer is removed only after teardown succeeds.
For more details, check Reconcile and its Result here: - https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.23.1/pkg/reconcile
func (*GitRepositoryReconciler) SetupWithManager ¶
func (r *GitRepositoryReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.