-
Notifications
You must be signed in to change notification settings - Fork 122
add new configmap flag in proxy runner to read config from there #1789
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1789 +/- ##
==========================================
+ Coverage 41.78% 42.08% +0.30%
==========================================
Files 184 184
Lines 21533 21649 +116
==========================================
+ Hits 8997 9111 +114
- Misses 11841 11844 +3
+ Partials 695 694 -1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
de10445
to
a69e895
Compare
88d22fb
to
324d002
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR introduces a new readFromConfigMap
flag to the MCPServer CRD that enables the proxy runner to read configuration from a Kubernetes ConfigMap instead of individual command-line flags. The implementation adds validation to ensure the ConfigMap exists and contains valid configuration data.
Key changes:
- Adds
readFromConfigMap
boolean field to MCPServer spec with operator logic to use--from-configmap
flag - Implements ConfigMap validation in proxy runner to verify existence and parse runconfig.json content
- Updates RBAC permissions to allow ConfigMap access and adds comprehensive end-to-end tests
Reviewed Changes
Copilot reviewed 17 out of 17 changed files in this pull request and generated 3 comments.
Show a summary per file
File | Description |
---|---|
cmd/thv-operator/api/v1alpha1/mcpserver_types.go | Adds readFromConfigMap field to MCPServer spec |
cmd/thv-operator/controllers/mcpserver_controller.go | Implements conditional logic to use ConfigMap flag vs individual flags |
cmd/thv-proxyrunner/app/run.go | Adds --from-configmap flag with validation and ConfigMap identification logic |
cmd/thv-proxyrunner/app/run_test.go | Comprehensive test coverage for new ConfigMap functionality |
deploy/charts/operator-crds/templates/toolhive.stacklok.dev_mcpservers.yaml | Updates CRD schema to include new field |
test/e2e/chainsaw/operator/single-tenancy/test-scenarios/configmap-mode/ | Complete e2e test suite for ConfigMap mode |
test/e2e/chainsaw/operator/*/test-scenarios/common/proxyrunner-role.yaml | Adds ConfigMap RBAC permissions |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
test/e2e/chainsaw/operator/single-tenancy/test-scenarios/configmap-mode/chainsaw-test.yaml
Outdated
Show resolved
Hide resolved
c2bab59
to
52b55a1
Compare
Initially it will read the configmap and validate that it exists Related-to: #1638
4f1c062
to
6d70dd1
Compare
Initially it will read the configmap and validate that it exists