Overview
Thecontroller-manager subcommand runs the Datum control plane controller manager, which extends the Milo control plane with Datum Cloud-specific functionality.
Usage
Description
The controller-manager watches for Kubernetes resources and reconciles them to maintain the desired state. It currently includes:- PersonalOrganizationController: Automatically creates personal organizations and projects for users
Flags
Metrics and Health
The address the metrics endpoint binds to. Use
:8443 for HTTPS or :8080 for HTTP, or leave as 0 to disable the metrics service.The address the probe endpoint binds to.
If set, the metrics endpoint is served securely via HTTPS. Use
--metrics-secure=false to use HTTP instead.Leader Election
Enable leader election for controller manager. Enabling this will ensure there is only one active controller manager.
The name of the resource that leader election will use for holding the leader lock.
The namespace in which the leader election resource will be created. If not specified, it will use the namespace where the controller is running.
The duration that non-leader candidates will wait to force acquire leadership.
The duration that the acting leader will retry refreshing leadership before giving up.
The duration the LeaderElector clients should wait between tries of actions.
If the leader should step down voluntarily when the Manager ends. This requires the binary to immediately end when the Manager is stopped.
Security and Certificates
The directory that contains the webhook certificate.
The name of the webhook certificate file.
The name of the webhook key file.
The directory that contains the metrics server certificate.
The name of the metrics server certificate file.
The name of the metrics server key file.
If set, HTTP/2 will be enabled for the metrics and webhook servers. Disabled by default due to HTTP/2 vulnerabilities (CVE-2023-44487, CVE-2023-39325).
Configuration
Path to the controller manager config file. The config file allows you to configure controllers and their behavior.
Configuration File
The controller manager can be configured using a YAML configuration file:Configuration Fields
Examples
Basic usage with metrics enabled
Enable leader election for high availability
Use custom certificates
Load configuration from file
Production deployment example
Health Checks
The controller manager exposes two health check endpoints:/healthz- Liveness probe endpoint/readyz- Readiness probe endpoint
Metrics
When metrics are enabled, Prometheus metrics are exposed at the configured metrics bind address. By default, the metrics endpoint is protected with authentication and authorization using Kubernetes RBAC.Source Reference
Source:cmd/controller/manager.go:50-138