Remove vestigial inline authzConfig ConfigMap and volume mount
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 2.2k
- Forks
- 300
- Avg merge
- 1d 15h
- Merged PRs (30d)
- 184
Description
Background
The operator never sets RunConfig.AuthzConfigPath, so the standalone authz ConfigMap the operator materializes from spec.authzConfig (via EnsureAuthzConfigMap) and mounts at /etc/toolhive/authz (via GenerateAuthzVolumeConfig) is never read. Enforcement happens entirely through the authz config embedded in the RunConfig (addAuthzInlineConfigOptions -> WithAuthzConfig), which the proxy reads from /etc/runconfig/runconfig.json.
The equivalent ref path (spec.authzConfigRef) was removed in #5564 (commit "Stop materializing authzConfigRef into an unread ConfigMap"). The inline path is equally vestigial but pre-existing, so it was left untouched there to keep that change scoped.
Originally flagged by @jhrozek in review of #5563 (the inline GenerateAuthzVolumeConfig is "equally unread").
Scope
- Remove the inline authz ConfigMap materialization (
EnsureAuthzConfigMap) and its volume mount (GenerateAuthzVolumeConfig) frommcpserver_controller.goandmcpremoteproxy_controller.go/mcpremoteproxy_deployment.go. - Delete the helpers and their tests once unused.
- Confirm nothing reads the mounted file (no
AuthzConfigPathis ever set in the operator path).
NOTE: the user-supplied authzConfig.type: configMap input (read via LoadAuthzConfigFromConfigMap) is a separate, genuinely-read mechanism — do not remove that.
Tracked as a follow-up to #5564.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in mcpserver_controller.go and mcpremoteproxy_controller.go or mcpremoteproxy_deployment.go, then locate EnsureAuthzConfigMap, GenerateAuthzVolumeConfig, and their tests. Remove the unused materialization and mount, confirm the operator never sets AuthzConfigPath, and run the affected tests while preserving LoadAuthzConfigFromConfigMap.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, kubernetes
- Domain
- infrastructure
- Issue type
- Refactor
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 72/100