Documentation
¶
Overview ¶
Package discovery finds the cluster's proxies (0004 §4.1): the controllers its IngressClasses and GatewayClasses name, and how far Inkwall wires each, in InkwallConfig.status.proxies.
Index ¶
Constants ¶
const ( ReasonConfigured = "Configured" ReasonInvalidSelector = "InvalidSelector" )
Reasons of the InkwallConfig's IntegrationsConfigured condition.
Variables ¶
var GatewayClassGVK = schema.GroupVersionKind{Group: "gateway.networking.k8s.io", Version: "v1", Kind: "GatewayClass"}
GatewayClassGVK is the Gateway API's GatewayClass, whose CRD may be missing.
Functions ¶
func Disable ¶
func Disable(proxies []wafv1alpha1.ProxyStatus, disabled map[string]string) []wafv1alpha1.ProxyStatus
Disable reports the proxies of the disabled integrations (name -> why) Unsupported, with why.
func Proxies ¶
func Proxies(ingressClasses, gatewayClasses []Class, kinds map[string][]schema.GroupKind) []wafv1alpha1.ProxyStatus
Proxies groups the classes by controller, and says how far Inkwall wires each: an IngressClass's routes are wired when its integration wires Ingresses, a GatewayClass's when it wires HTTPRoutes. kinds are the target kinds each integration wires, by name.
Types ¶
type Class ¶
type Class struct {
Name, Controller string
}
Class is an IngressClass or a GatewayClass.
type Reconciler ¶
type Reconciler struct {
Client client.Client
// GatewayClasses watches the GatewayClasses once their CRD is
// installed; nil: they are only read at each reconcile.
GatewayClasses *crdwatch.Kind
// Kinds are the target kinds each integration wires, by name.
Kinds map[string][]schema.GroupKind
// Disabled are the integrations the operator may not wire, by name,
// and why: their proxies are Unsupported.
Disabled map[string]string
// Recorder records an Event on the InkwallConfig when its
// EngineConfigured condition changes, but for the first True; nil:
// none.
Recorder events.EventRecorder
}
Reconciler writes the discovered proxies into the InkwallConfig, when there is one. It runs on the leader.
func (*Reconciler) SetupWithManager ¶
func (r *Reconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager registers the controller.