Skip to content

feat(motd)!: store the MOTD over HTTP, dropping gRPC - #40

Merged
hbrombeer merged 2 commits into
mainfrom
feat/rest-client
Aug 10, 2026
Merged

feat(motd)!: store the MOTD over HTTP, dropping gRPC#40
hbrombeer merged 2 commits into
mainfrom
feat/rest-client

Conversation

@hbrombeer

Copy link
Copy Markdown
Member

The MOTD store was the last gRPC caller here — and, with groundsgg/plugin-config#14, the last one in the network. It now reads GET /v1/config/apps/{app}/envs/{env}/namespaces/motd/documents/active and writes PUT/DELETE under /v1/config/admin/..., the endpoints groundsgg/service-config#48 added (released as 0.8.0).

The read/write split is deliberate and tested. Reads go to the consumer API, which any authenticated workload may use; writes go to the admin API, which service-config restricts to admin service accounts and to writers explicitly named for this app. That is what lets the proxies own the network MOTD without being handed every other app's configuration — and it means a proxy missing the grant can still show the MOTD, and /motd set says why rather than failing silently. A test asserts all three calls land on the half they should.

A refusal has to reach chat as a sentence. Over gRPC the store let StatusRuntimeException out and MotdCommand dug the description out of the status. Now the store unwraps the problem response's detail — which is where service-config explains a missing writer grant — and raises MotdStoreException carrying it. describe() in the command is correspondingly one line instead of a cast.

The whole :grpc module is deleted. It existed only to generate the config stubs for this one store; nothing else in the plugin imported it. grpc-netty-shaded and the NameResolverRegistry/LoadBalancerRegistry registration that Velocity's per-plugin classloader needed go with it. unzip -l on the built velocity jar reports 0 gRPC classes, down from 3823.

No manifest change needed. This plugin already reads CONFIG_SERVICE_URL with CONFIG_GRPC_TARGET as a fallback, and both point at the same address and port.

Order of deployment: service-config 0.8.0 must be live first (it already serves both transports), and proxies load plugin jars at startup — so this needs a rollout restart, not just an Argo sync.

82 tests green, six of them new around the store.

MotdConfigStore reads through the consumer API and writes through the
admin one — the same split it had over gRPC, because service-config
grants the two separately: a proxy that may show the MOTD need not be
allowed to change it.

The whole :grpc module goes with it. It existed only to generate the
config stubs for this one store, and nothing else in the plugin used it;
grpc-netty-shaded and the DNS/pick-first provider registration Velocity's
classloader needed go too. The velocity jar carries no gRPC classes.

A refusal now arrives as the problem's `detail` rather than a gRPC status
description. That line is the only place a missing writer grant is
explained, so the store unwraps it and /motd shows the sentence
service-config wrote instead of a status code.

CONFIG_SERVICE_URL and CONFIG_GRPC_TARGET are both already read here, so
no manifest change is needed to roll this.
@hbrombeer
hbrombeer merged commit 9767c9f into main Aug 10, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant