Skip to content

Conversation

yrobla
Copy link
Contributor

@yrobla yrobla commented Sep 9, 2025

Initially it will read the configmap and validate that it exists

Copy link

codecov bot commented Sep 9, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 42.08%. Comparing base (0392dcf) to head (6d70dd1).
⚠️ Report is 10 commits behind head on main.

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.
📢 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.

@coveralls
Copy link
Collaborator

coveralls commented Sep 9, 2025

Coverage Status

coverage: 39.61% (+0.6%) from 39.043%
when pulling 6d70dd1 on issue-1638-add-configmap-flag
into 7e74099 on main.

@yrobla yrobla force-pushed the issue-1638-add-configmap-flag branch 6 times, most recently from de10445 to a69e895 Compare September 9, 2025 10:25
@yrobla yrobla requested a review from Copilot September 9, 2025 10:28
Copilot

This comment was marked as outdated.

@yrobla yrobla force-pushed the issue-1638-add-configmap-flag branch 9 times, most recently from 88d22fb to 324d002 Compare September 9, 2025 12:09
Copy link
Contributor

@Copilot Copilot AI left a 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.

@yrobla yrobla force-pushed the issue-1638-add-configmap-flag branch 6 times, most recently from c2bab59 to 52b55a1 Compare September 9, 2025 14:01
Initially it will read the configmap and validate that it exists

Related-to: #1638
@yrobla yrobla force-pushed the issue-1638-add-configmap-flag branch from 4f1c062 to 6d70dd1 Compare September 10, 2025 08:52
@yrobla yrobla merged commit cb30b33 into main Sep 10, 2025
18 of 19 checks passed
@yrobla yrobla deleted the issue-1638-add-configmap-flag branch September 10, 2025 08:59
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