Skip to content

SmartProxy

Spec

Field Type Required Default Description
foremanRef string Yes Foreman this proxy registers with, in the same namespace
profile string Yes Provisioning or Execution
url string Yes Address registered in Foreman, must start with https://. Its host is the certificate CN, its port the HTTPS port of the proxy
image image No Smart Proxy image, also used for the dnsmasq container
tls tls Yes Source of the server and client certificate
networks list For tftp and dnsmasq At most one network
networks[].attachment string Yes NetworkAttachmentDefinition name, in the same namespace
networks[].address string Yes Static address in CIDR notation
features object Yes See below
storage.size Quantity Yes, if storage is set Volume for the TFTP root and the DHCP reservations and leases. Without storage, an emptyDir is used
storage.storageClass string No Empty uses the cluster default
resources ResourceRequirements No requests 50m CPU and 256Mi, limit 512Mi Compute resources of the proxy container

The network is attached as net1. The dnsmasq container assigns its static address and serves only net1, so the NetworkAttachmentDefinition can use "ipam": {}.

Features

Field Required Description
tftp.serverName No Overrides the announced TFTP server name. Defaults to the address of the first network
tftp.bootFiles No image whose boot loaders an init container copies into the TFTP root. Defaults to the boot-files image
templates.url Yes Address hosts use to fetch templates, usually http://<address>:8000
dhcp.provider Yes dnsmasq, the only provider in the image
dhcp.subnets[].network Yes Subnet in CIDR notation, IPv4 only
dhcp.subnets[].range For dnsmasq Dynamic range as first-last
dhcp.subnets[].gateway No Announced as the default router (option 3). Without it, no router is announced
dhcp.subnets[].dnsServers No Announced DNS servers (option 6)
dns.provider No dns_nsupdate (default and only value)
dns.server Yes DNS server to update
dns.keySecretRef No Secret with the TSIG key under key
bmc.defaultProvider No ipmitool (default), redfish, shell, or ssh. See Provisioning
httpBoot No Enables UEFI HTTP Boot from the TFTP root on port 8000
remoteExecutionSSH.sshKeySecretRef Yes Secret with id_rsa and id_rsa.pub. Enables Dynflow and Remote Execution over SSH, see Smart Proxy
ansible No Enables Ansible. Requires remoteExecutionSSH
discovery No Relays the facts of discovered hosts to Foreman over HTTP and HTTPS. Foreman needs the foreman_discovery plugin, or it does not know the feature

Validation

  • Execution does not support dhcp, tftp, dns, or discovery.
  • Provisioning does not support remoteExecutionSSH or ansible.
  • ansible requires remoteExecutionSSH.
  • At most one network is supported.
  • The dnsmasq provider and tftp require a network.
  • The dnsmasq provider supports exactly one subnet per SmartProxy.
  • The dnsmasq provider requires a range.

Status

Field Type Description
observedGeneration integer Last processed generation
phase string Pending, Progressing, Running, or Failed
foremanID integer Identifier assigned by Foreman
registeredChecksum string URL, configuration, certificate, and Foreman migration whose features were last refreshed in Foreman
foremanMigrationHash string Migration hash of the Foreman when the features were last refreshed. The Foreman verifies an upgrade once every proxy caught up
conditions []Condition See Conditions

Created objects

Object Name Owner reference Notes
Certificate <name>-tls Yes Only with tls.issuerRef. Server and client usage. CN is the host of url, DNS names add the Service names
ConfigMap <name> Yes settings.yml, module settings, and dnsmasq.conf
PersistentVolumeClaim <name>-data No Only with storage. Survives deletion of the SmartProxy
Deployment <name> Yes One replica, strategy Recreate
Service <name> Yes HTTPS port of url

The finalizer platform.theforeman.org/smart-proxy-registration removes the proxy from Foreman before the resource is deleted. If the Foreman still exists but cannot be reached, the finalizer stays until it can.

Example

apiVersion: platform.theforeman.org/v1alpha1
kind: SmartProxy
metadata:
  name: provisioning-vlan100
spec:
  foremanRef: production
  profile: Provisioning
  url: https://proxy-vlan100.example.com:8443
  tls:
    issuerRef:
      name: foreman-internal-ca
  networks:
    - attachment: provisioning-vlan100
      address: 192.0.2.10/24
  features:
    tftp: {}
    templates:
      url: http://192.0.2.10:8000
    dhcp:
      provider: dnsmasq
      subnets:
        - network: 192.0.2.0/24
          range: 192.0.2.100-192.0.2.200
    dns:
      provider: dns_nsupdate
      server: dns.example.com
      keySecretRef: proxy-vlan100-tsig
  storage:
    size: 5Gi

The namespace needs the Pod Security level privileged, see Provisioning.