Documentation
¶
Overview ¶
Package manager assembles the operator: the controllers and webhooks, in one controller-runtime manager. cmd/operator parses flags into Options.
Index ¶
Constants ¶
const ( // CertsRotate: the operator creates and renews the certificate, and // injects its CA. CertsRotate = "rotate" // CertsExternal: the certificate files are provided in WebhookCertDir, // e.g. by cert-manager. CertsExternal = "external" )
Certificate sources for the webhook (Options.WebhookCerts).
const DefaultEventsBufferBytes = controlplane.DefaultEventsBufferBytes
DefaultEventsBufferBytes bounds each replica's events buffer by default.
Variables ¶
This section is empty.
Functions ¶
func New ¶
New creates the operator's manager: the bundle builder (leader only), the validating webhook (every replica), health probes and metrics.
func Unwire ¶
func Unwire(ctx context.Context, c client.Client, namespace, deployment string, logger *slog.Logger) error
Unwire runs at uninstall (the chart's pre-delete hook): it stops the operator, lets proxy pods start without the Pod webhook, and undoes the wiring, so the routes keep working, uninspected, once Inkwall is gone. WAFPolicy objects are kept, without the operator's finalizer, so deleting them (or their namespace) doesn't wait for an operator that is gone.
Types ¶
type Options ¶
type Options struct {
MetricsAddr string
ProbeAddr string
LeaderElect bool
// Namespace is the operator's, for its Lease and Secrets.
Namespace string
// Debounce batches changes before a bundle is built; 0: the default.
Debounce time.Duration
Webhooks bool
WebhookPort int
WebhookCertDir string
// WebhookCerts is CertsRotate or CertsExternal.
WebhookCerts string
WebhookService string
WebhookSecret string
// WebhookDNSNames replaces the Services' names in the serving
// certificate; for tests, where everything calls localhost.
WebhookDNSNames []string
// DistributionPort serves bundles to the engines (gRPC over TLS, with
// the webhook's certificate); 0 disables.
DistributionPort int
// DistributionService is the Service engines reach it through, named in
// the certificate.
DistributionService string
// Replica names this replica (its Pod; default: the host name), and
// ReplicaUID, if set, makes its engine report go with the Pod.
Replica string
ReplicaUID types.UID
// EngineReportInterval is how often replicas publish their engines and
// the leader updates Enforced; 0: 2s.
EngineReportInterval time.Duration
// SigningKeyGrace is the least time each phase of a signing key
// rotation lasts; 0: controller.DefaultRotationGrace.
SigningKeyGrace time.Duration
// Inject adds the engine to proxy pods (needs Webhooks and
// DistributionPort), with EngineImage unless InkwallConfig sets one.
// Without it, the routes the operator wired are unwired.
Inject bool
EngineImage string
EnginePullPolicy corev1.PullPolicy
// Integrations select the proxy pods; nil: read from the InkwallConfig
// when the manager is created. The operator restarts when they change
// (its cache of proxy pods is built from them).
Integrations *integrations.Selectors
// Version is the operator's, sent to the optional control plane.
Version string
// ControlPlaneCAFile trusts the control plane's server certificate;
// empty: the system roots.
ControlPlaneCAFile string
// CRDInterval is how often the leader looks for Traefik's IngressRoute
// CRD until it is installed; 0: 30s.
CRDInterval time.Duration
// EventsDir holds the replica's buffer of security events for the
// control plane ("": in memory); EventsBufferBytes bounds it.
EventsDir string
EventsBufferBytes int64
}
Options configures the operator.