Skip to content

Conversation

@amirejaz
Copy link
Contributor

Summary

Adds operator-side feature flags to complement the CRD installation flags from #2809, allowing users to conditionally enable/disable controller groups at runtime.

Changes

  • Add ENABLE_SERVER, ENABLE_REGISTRY, ENABLE_VMCP environment variables in main.go
  • Refactor setupControllersAndWebhooks to conditionally start controllers based on flags
  • Add dependency checking (VMCP requires Server to be enabled)
  • Wire feature flags through Helm values (operator.features.server/registry/virtualMCP)
  • Update deployment template to pass environment variables

Usage

Skip Virtual MCP controllers (matches crds.install.virtualMcp=false):

helm install operator ... --set operator.features.virtualMCP=false

Related

Complements #2809 (CRD installation feature flags)

@github-actions github-actions bot added the size/S Small PR: 100-299 lines changed label Dec 18, 2025
@codecov
Copy link

codecov bot commented Dec 18, 2025

Codecov Report

❌ Patch coverage is 25.00000% with 45 lines in your changes missing coverage. Please review.
✅ Project coverage is 57.16%. Comparing base (dda67b9) to head (dc1442a).

Files with missing lines Patch % Lines
cmd/thv-operator/main.go 25.00% 45 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3093      +/-   ##
==========================================
- Coverage   57.21%   57.16%   -0.05%     
==========================================
  Files         341      341              
  Lines       34089    34145      +56     
==========================================
+ Hits        19503    19519      +16     
- Misses      12972    13019      +47     
+ Partials     1614     1607       -7     

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

@github-actions github-actions bot added size/S Small PR: 100-299 lines changed and removed size/S Small PR: 100-299 lines changed labels Dec 19, 2025
Copy link
Contributor

@yrobla yrobla left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added a comment
also, it's missing tests and documentation

@github-actions github-actions bot added size/S Small PR: 100-299 lines changed and removed size/S Small PR: 100-299 lines changed labels Dec 22, 2025
@amirejaz amirejaz requested a review from yrobla December 22, 2025 13:43
yrobla
yrobla previously approved these changes Dec 23, 2025
@github-actions github-actions bot added size/S Small PR: 100-299 lines changed and removed size/S Small PR: 100-299 lines changed labels Jan 2, 2026
@github-actions github-actions bot added size/M Medium PR: 300-599 lines changed and removed size/S Small PR: 100-299 lines changed labels Jan 2, 2026
@amirejaz amirejaz requested a review from yrobla January 2, 2026 12:32
}

// Set up Virtual MCP controllers and webhooks
if enabledFeatures[featureVMCP] {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why does it depend only on vmcp enabled? and not on server?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/M Medium PR: 300-599 lines changed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants