Files
opencloud/opencloud/pkg
Thomas Schweiger 3275bd5a67 fix(cli): make the report work without a service registry
The report looked the gateway and the graph service up in the micro
service registry only. A deployment that runs the services with
MICRO_REGISTRY=memory and discovers them through Kubernetes instead,
which is what the Helm chart does with an external NATS endpoint, leaves
a separate process with an empty registry. `opencloud report` then failed
with "eu.opencloud.api.gateway: service not found" even though both
services were listening in the very same pod.

Both lookups now fall back to the configured address when the registry
holds no entry for them. The gateway is dialled over dns:/// at the
address from the gateway config, with a wildcard bind rewritten to
loopback since the report runs next to the gateway it talks to, and the
graph service at the address from the graph config. The configured reva
address is still tried first, so nothing changes on a deployment where
the registry is populated.

Parsing the gateway config in PreRunE is new. It carries the fallback
address and was not needed before.

Verified on a k3s deployment with MICRO_REGISTRY=memory: the report runs
in the opencloud-api pod with no environment overrides at all, and
--with-sign-in is correctly refused there because that deployment sets
OC_LDAP_SERVER_WRITE_ENABLED=false. A Docker Compose deployment, where
the registry is populated, returns the same result as before.

Assisted-by: Claude Code:claude-opus-5
2026-11-20 14:12:11 +01:00
..
2026-04-23 09:31:11 +02:00
2026-04-22 14:50:57 +02:00