Enable a service¶
Status: validated on the lab (OKD 4.22.0-okd-scos.10, operators 18-stable) on 2026-11-11
The lab starts with a minimal set of services. Adding one is the equivalent
of setting enable_horizon: "yes" in globals.yml and running a deploy,
except that there is nothing to run: flipping enabled makes the operator
build the whole service. Horizon is the example because it is stateless and
harmless to remove again.
In short¶
- Setting
enabled: truein the control plane resource makes the operator build the whole service: no command to run. - Horizon was
Trueabout 50 seconds after the patch on the lab, and uses about 400 MiB. - Side effect seen on the lab: the Glance pod is rolled once, when Horizon is enabled and when it is disabled.
- Disabling removes the service objects but leaves two TLS Secrets behind.
- Disabling a service that has a database was not executed on this lab.
1. Initial symptoms¶
- You want the dashboard, or want to see what an operator creates for a brand-new service.
2. Read-only investigation¶
[READ-ONLY]
oc get oscp openstack -o jsonpath='{.spec.horizon.enabled}{"\n"}'
oc get horizon
oc get pods -l service=horizon
oc get routes
oc get oscp openstack -o json | jq -r '.status.conditions[] | select(.type | test("Horizon"))'
oc adm top node
3. Expected observations¶
enabledisfalse;oc get horizonand the pod query answerNo resources found in openstack namespace., no route has "horizon" in its name, and there is no Horizon condition on the control plane.- The node has memory headroom (the Horizon pod uses about 400 MiB).
4. Root cause¶
What enabling does:
- The openstack operator sees
horizon.enabled: trueand creates aHorizonresource from thetemplatesection. - The horizon operator generates the configuration (ConfigMaps
horizon-config-dataandhorizon-scripts) and a Secrethorizonholding the Django secret key, then creates a Deployment and a Service, both namedhorizon. - Because
apiOverride.routeis set, the openstack operator requests two certificates (horizon-svcfor the pod,horizon-routefor the Route) and creates a Routehorizon(TLS re-encryption, HTTP redirected to HTTPS) so that the dashboard is reachable on the*.appsdomain. It reports this asOpenStackControlPlaneExposeHorizonReady.
Measured on the lab: the Horizon resource exists four seconds after the
patch and is True after about 50 seconds, of which 20 are the first pull
of the image. The Glance StatefulSet is rolled once as a side effect, both
when Horizon is enabled and when it is disabled: expect a short Glance API
interruption.
Disabling reverses step 1: the operator deletes the Horizon resource, and
Kubernetes garbage collection removes everything it owned (Deployment, pods,
Service, ConfigMaps, the horizon Secret) and the Route. The resource is
gone after four seconds, the pod after about thirty. The two Horizon
conditions are removed from the control plane status. Two things stay
behind:
- the TLS Secrets
cert-horizon-routeandcert-horizon-svc(theCertificateresources are removed, their Secrets are not); - the
templatesection underspec.horizon, now filled with defaults. It is harmless and is reused if you enable the service again.
Horizon has no database. For a service with one (Cinder, Heat, ...) the
operator also creates a database, a database account and a Keystone service
with its endpoints. Disabling such a service was not executed on this lab,
so this guide makes no statement on what it leaves in the database and in
Keystone: check with oc get mariadbdatabase,mariadbaccount and
openstack service list after doing it.
5. Resolution¶
[CHANGE]
oc patch openstackcontrolplane openstack --type=merge -p '
spec:
horizon:
enabled: true
apiOverride:
route: {}
template:
replicas: 1
secret: osp-secret
'
Watch the operator work:
[READ-ONLY]
oc get horizon -w
oc get pods -l service=horizon -w
oc get events --sort-by=.lastTimestamp | tail -20
Disable again¶
[CHANGE] Removes the dashboard and its generated objects.
oc patch openstackcontrolplane openstack --type=merge -p '{"spec":{"horizon":{"enabled":false}}}'
6. Verification¶
[READ-ONLY]
oc get horizon # STATUS True, "Setup complete"
oc get deployment,pods -l service=horizon
oc get route horizon # reencrypt/Redirect
oc get oscp openstack -o json | jq -r '.status.conditions[] | select(.type | test("Horizon")) | "\(.type) \(.status)"'
curl -sk -o /dev/null -w '%{http_code}\n' "https://$(oc get route horizon -o jsonpath='{.spec.host}')/"
The curl prints 301 (redirect to the login page); add -L to follow it
and get 200.
Log in with user admin, domain Default, and the admin password
(see passwords). The dashboard name only
resolves through the lab DNS on the bastion; from a workstation use an SSH
tunnel or a SOCKS proxy through the bastion.
After disabling: oc get horizon returns nothing, and the pods, Service and
Route are gone. oc get secrets | grep horizon still lists the two cert-
Secrets described above; delete them by hand if you want a clean namespace.
7. Risks and precautions¶
- Each enabled service costs memory on a 32 GB node (about 400 MiB for
Horizon, measured). Check
oc adm top nodebefore and after; see resource exhaustion. - Do not enable
telemetryon OKD without an image override: one of its images comes from a registry that requires a Red Hat account, and the pod stays inImagePullBackOff. - Services with their own storage or network needs (Cinder volume backends,
Swift, Octavia, Designate, Manila) need more than
enabled: true. Enabling them without a backend gives a control plane that never returns toTrue. - Keep the template in the repository in step with what you enable, or the next run of the deployment script will disable it again.
Previous: Change service configuration · Up: Operations guide · Next: Scale a service