Skip to content
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

Support Pause/Unpause MCP in Openshift #61

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

adrianchiris
Copy link
Collaborator

Implement MCPManager which pauses/unpauses MCP
in openshift environments.

  • Add Openshift detection logic
  • Implement MCPManager
  • Integrate MCPManager in nodemaintenance controller

@adrianchiris adrianchiris changed the title Support Pause/Unpause MCP in Openshift WIP: Support Pause/Unpause MCP in Openshift Jan 14, 2025
@coveralls
Copy link

coveralls commented Jan 14, 2025

Pull Request Test Coverage Report for Build 12811084017

Details

  • 161 of 270 (59.63%) changed or added relevant lines in 4 files are covered.
  • 1 unchanged line in 1 file lost coverage.
  • Overall coverage decreased (-0.8%) to 69.226%

Changes Missing Coverage Covered Lines Changed/Added Lines %
internal/openshift/utils.go 18 22 81.82%
cmd/maintenance-manager/main.go 0 12 0.0%
internal/openshift/mcp.go 135 178 75.84%
internal/controller/nodemaintenance_controller.go 8 58 13.79%
Files with Coverage Reduction New Missed Lines %
internal/controller/nodemaintenance_controller.go 1 55.68%
Totals Coverage Status
Change from base Build 12804513564: -0.8%
Covered Lines: 1217
Relevant Lines: 1758

💛 - Coveralls

@adrianchiris
Copy link
Collaborator Author

adrianchiris commented Jan 14, 2025

code is complete, i need to test on ocp setup.

LMK if you prefer i split to multiple commits

Implement MCPManager which pauses/unpauses MCP
in openshift environments.

- Add Openshift detection logic
- Implement MCPManager
- Integrate MCPManager in nodemaintenance controller

Signed-off-by: adrianc <adrianc@nvidia.com>
@adrianchiris adrianchiris force-pushed the mcp-support branch 2 times, most recently from 8def208 to a6e78a6 Compare January 16, 2025 14:33
@adrianchiris adrianchiris changed the title WIP: Support Pause/Unpause MCP in Openshift Support Pause/Unpause MCP in Openshift Jan 16, 2025
@adrianchiris adrianchiris requested a review from rollandf January 19, 2025 06:23
reqLog.Info("Handle Scheduled NodeMaintenance")
var err error
var res ctrl.Result
Copy link
Member

Choose a reason for hiding this comment

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

Why do we need the res? It always the same, no?

@@ -147,12 +152,24 @@ func main() {
ctx := ctrl.SetupSignalHandler()
mgrClient := mgr.GetClient()

Copy link
Member

Choose a reason for hiding this comment

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

Why is mgr.GetAPIReader() needed? mgrClient is not enough?

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.

3 participants