Skip to content

Conversation

@ChrisJBurns
Copy link
Collaborator

@ChrisJBurns ChrisJBurns commented Nov 12, 2025

This PR adds the functionality that takes a MCPRegistry CR and depending on what the source for the registry data is creates the necessary volume mounts for the registry server. When the registry server has been released under 0.2.0 the code in this PR will be able to use the new flags.

  • It will create a config volume mount via a configmap and tells the registry server where the config is via the --config flag.
  • If the source for the registry json is a configmap, it will mount that config map as a file then tell the registry where the file is via the file source.
  • If the source for the registry is git or api, then it will tell the registry server of the associated source types
  • We also mount an emptyDir volume to the registry server for the synchronisation and status information. the registry server creates local files so it needs a writeable volume and directory to do this.

Things to note:

  • There is still sync code in the Operator that should be removed after this PR as part of the cleanup Registry controller Cleanup #2399
  • Currently the configmap file name for the registry datasource is hardcoded into the registry server, this requires users with registry.json configmaps to name the key registry.json to match. We should make this a bit more dynamic in a future PR
  • We should revisit the integration tests because there are some overlaps with existing ones and the ones added in this PR. It wasn't done as part of this PR because things were getting near the 1k diff mark.
  • We hardcode the emptyDir mount path because the registry server expects it at /data. We should allow for a flag to configure this - even if the operator doesn't expose this to the user.

Ref: #2396

@codecov
Copy link

codecov bot commented Nov 12, 2025

Codecov Report

❌ Patch coverage is 78.19549% with 29 lines in your changes missing coverage. Please review.
✅ Project coverage is 55.16%. Comparing base (e6cc263) to head (9071c89).
⚠️ Report is 4 commits behind head on main.

Files with missing lines Patch % Lines
cmd/thv-operator/pkg/registryapi/manager.go 89.58% 5 Missing and 5 partials ⚠️
cmd/thv-operator/pkg/registryapi/deployment.go 30.76% 5 Missing and 4 partials ⚠️
cmd/thv-operator/api/v1alpha1/mcpregistry_types.go 0.00% 8 Missing ⚠️
cmd/thv-operator/pkg/registryapi/config/config.go 87.50% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2558      +/-   ##
==========================================
+ Coverage   54.95%   55.16%   +0.20%     
==========================================
  Files         305      305              
  Lines       28732    28853     +121     
==========================================
+ Hits        15791    15917     +126     
+ Misses      11532    11510      -22     
- Partials     1409     1426      +17     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@ChrisJBurns ChrisJBurns force-pushed the reg-server-configmap-operator branch from d975943 to d1edf62 Compare November 13, 2025 17:34
@ChrisJBurns ChrisJBurns changed the title DRAFT: adds creation of configmap for mcpregistry config adds creation of configmap for mcpregistry config Nov 13, 2025
@ChrisJBurns ChrisJBurns changed the title adds creation of configmap for mcpregistry config adds creation of configmap for registry server config Nov 13, 2025
@dmartinol
Copy link
Collaborator

We hardcode the emptyDir mount path because the registry server expects it at /data. We should allow for a flag to configure this - even if the operator doesn't expose this to the user.

This will disappear when we connect the DB that will replace file storage

@ChrisJBurns ChrisJBurns enabled auto-merge (squash) November 14, 2025 17:32
@ChrisJBurns ChrisJBurns merged commit c94268a into main Nov 14, 2025
39 checks passed
@ChrisJBurns ChrisJBurns deleted the reg-server-configmap-operator branch November 14, 2025 17:33
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.

4 participants