Foreman Operator¶
A Kubernetes Operator that maps Foreman and Smart Proxy infrastructure onto native building blocks - CRDs, Secrets, cert-manager, CloudNativePG, and Multus - for running Foreman and bare-metal provisioning on Kubernetes.
Experimental
This is an unofficial, unsupported prototype. It is not affiliated with or endorsed by the Foreman project. The API will change without notice. Do not use it in production.
Some concepts and ideas were adopted from theforeman/foreman-kubernetes. See Acknowledgements.
Features¶
- 🌐 Foreman on Kubernetes - Web and Dynflow as native workloads, declared through a
Foremanresource - 🧱 Checked Upgrades - A preflight refuses skipped releases and waits for running tasks, writers stop while a Job migrates the database, and smoke checks verify the new version; no rollback onto a partly migrated database
- 💾 Backup and Restore - A documented restore order for the database and secrets, exercised by a restore drill
- 🛰️ Smart Proxy as a Resource - Each proxy is one
SmartProxy, registered in Foreman automatically through OAuth, for provisioning or for Remote Execution and Ansible over SSH - 🥾 Bare-Metal Provisioning - DHCP and TFTP through dnsmasq, DNS through nsupdate, BMC, and Discovery, on direct L2 networks through Multus
- 🔐 cert-manager Integration - Server, client, and proxy certificates requested from cert-manager issuers
- 🐘 CloudNativePG - PostgreSQL through CloudNativePG, with a chart for the cluster
- 🚪 TLS Passthrough Frontend - Apache with mutual TLS as a sidecar of Puma, behind a LoadBalancer, a Gateway API TLSRoute, or a Route; Puma listens only on a Unix socket
- 🧩 Plugin Catalog - Remote Execution, Ansible, Boot Disk, Discovery, Templates, Webhooks, Puppet, and the KubeVirt and Proxmox compute resources in the Foreman image, enabled per instance; VMware is always available
- ⏰ Recurring Tasks - The Foreman cron tasks as CronJobs, suspended during migrations
- 🔒 Rootless Images - Own UBI 9 images, built for random UIDs; only dnsmasq starts as root, with a minimal capability set
- 🛡️ Supply Chain Security - Pinned Foreman RPMs tracked by Renovate, cosign-signed release images and charts, provenance, and SBOMs
- 🧭 Planned - A real PXE build,
Releaseimage sets, and Katello
How It Works¶
| Kind | State | Purpose |
|---|---|---|
| Foreman | Implemented | FQDN, image, plugins, database and Valkey references; web with the frontend sidecar, Dynflow, recurring tasks, and checked migrations |
| SmartProxy | Implemented for Provisioning and Execution |
One registered proxy with networks and features |
| Release | Planned | Compatible image sets |
| Candlepin | Planned | Subscription service for Katello |
| Pulp | Planned | Content service for Katello |
Start with Getting Started to install the operator, or with the Architecture for the design. The milestones are in the Roadmap.
What is verified¶
The tests run on a single-node k3s cluster with cert-manager, CloudNativePG, Multus, and Envoy Gateway, see Testing.
| Area | Verified |
|---|---|
| Foreman | Migration from an empty database, web and Dynflow, recurring task CronJobs, the frontend sidecar through a Gateway API TLSRoute with Puma reachable only over its Unix socket |
| Plugins | Only the enabled plugins load; a boot ISO from foreman_bootdisk; the KubeVirt, Proxmox, and VMware compute resource providers |
| Provisioning proxy | Registration with the features BMC, DHCP, DNS, Discovery, Logs, TFTP, and Templates; a DHCP reservation that reaches a client on a fake VLAN and survives a new pod; a TFTP download of the boot loader; a DNS record in BIND through nsupdate; a discovered host that reaches Foreman through the proxy; unregistration on delete |
| Execution proxy | A Remote Execution job and an Ansible job on a target over SSH |
| Upgrades | From the released 0.1.0 chart to the current images, with data and proxy registrations kept and the smoke checks passing |
| Restore | Database, secrets, and proxy registrations restored in the documented order, with encrypted columns readable |
Not tested: a real VLAN, a real NIC, real PXE firmware, and a complete host build.
Scope¶
The first stage is the base deployment: Foreman with Smart Proxies for provisioning and Remote Execution. Katello is a later stage.
License¶
Apache License 2.0. Foreman and Smart Proxy are separate projects licensed under GPL-3.0.