networks

package
v0.6.7 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2026 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Overview

This file owns DomainReconciler — the controller-runtime reconciler for the Domain CR.

The reconciler is deliberately thin. It owns three responsibilities only:

  1. Fetch the Domain CR (NotFound → drop, the CR is gone).
  2. Resolve the raw contract into a ResolvedDomain (resolution layer).
  3. Hand the ResolvedDomain to DomainService, which maps, selects, dispatches, and writes status.

All business logic lives in pkg/apis/domain/application. The reconciler does not build conditions, select providers, or touch the runtime resource directly. A resolution failure is terminal for this generation — it is logged and the request is dropped (no requeue) because re-running the same bad contract will fail identically. Service errors are returned for controller-runtime to requeue with backoff.

ACME is set by RegisterDomain (internal/bootstrap) before SetupWithManager runs — it configures the cert-manager Issuer the Knative provider creates for custom-strategy domains, and has no safe hardcoded default.

This file owns RouteReconciler — the controller-runtime reconciler for the Route CR.

The reconciler is deliberately thin. It owns three responsibilities only:

  1. Fetch the Route CR (NotFound → drop, the CR is gone).
  2. Resolve the raw contract into a ResolvedRoute (resolution layer).
  3. Hand the ResolvedRoute to RouteService, which maps, selects, dispatches, and writes status.

All business logic lives in pkg/routes/application. The reconciler does not build conditions, select providers, or touch the runtime resource directly. A resolution failure is terminal for this generation — it is logged and the request is dropped (no requeue) because re-running the same bad contract will fail identically. Service errors are returned for controller-runtime to requeue with backoff.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DomainReconciler

type DomainReconciler struct {
	client.Client
	Log           logr.Logger
	Scheme        *runtime.Scheme
	DomainService *domainapp.DomainService
	Runtime       *runtimeinfra.Runtime
	Recorder      events.EventRecorder

	// ACME configures the cert-manager Issuer the Knative provider creates
	// for custom-strategy domains. Must be set before SetupWithManager runs.
	ACME domainapi.ACMEConfig
}

DomainReconciler reconciles a Domain CR by resolving its contract and handing it to the domain application service.

func (*DomainReconciler) Reconcile

func (r *DomainReconciler) 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 (*DomainReconciler) SetupWithManager

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

SetupWithManager sets up the controller with the Manager.

type RouteReconciler

type RouteReconciler struct {
	client.Client
	Log          logr.Logger
	Scheme       *runtime.Scheme
	RouteService *routeapp.RouteService
	Runtime      *runtimeinfra.Runtime
	Recorder     events.EventRecorder
}

RouteReconciler reconciles a Route CR by resolving its contract and handing it to the route application service.

func (*RouteReconciler) Reconcile

func (r *RouteReconciler) 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. TODO(user): Modify the Reconcile function to compare the state specified by the Build object against the actual cluster state, and then perform operations to make the cluster state reflect the state specified by the user.

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

func (*RouteReconciler) SetupWithManager

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

SetupWithManager sets up the controller with the Manager.

Jump to

Keyboard shortcuts

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