RHOAIENG-65524: feat(mcplifecycleoperator): integrate MCP Lifecycle Operator module#3676
RHOAIENG-65524: feat(mcplifecycleoperator): integrate MCP Lifecycle Operator module#3676matzew wants to merge 27 commits into
Conversation
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughAdds MCPLifecycleOperator API types and deepcopy methods, extends DataScienceCluster schemas and docs, registers the new module and GVK, rewrites module manifest paths, and wires module alerting rules into monitoring deployment. Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes 🚥 Pre-merge checks | ✅ 10✅ Passed checks (10 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
317356c to
555df3b
Compare
555df3b to
1328f8a
Compare
f4ae7a0 to
1ee997f
Compare
|
We are waiting on the actual build |
| ManifestDir: "mcplifecycleoperator", | ||
| ContextDir: "default", | ||
| GVK: gvk.MCPLifecycleOperator, | ||
| ControllerImage: "RELATED_IMAGE_ODH_MCP_LIFECYCLE_MODULE_OPERATOR_CONTROLLER_IMAGE", |
There was a problem hiding this comment.
This does not yet exist
| ["mlflowoperator"]="opendatahub-io:mlflow-operator:main@a9b2aa5ab0b505af3b449316937bde176f6decc6:config" | ||
| ["sparkoperator"]="opendatahub-io:spark-operator:main@c2bad1c04553283b617846156d6dc2ee335662ac:config" | ||
| ["wva"]="opendatahub-io:workload-variant-autoscaler:main@1a33d8559d4d56fcd0d4b9b2cc2afdbf6d832aee:config" | ||
| ["mcplifecycleoperator"]="opendatahub-io:mcp-lifecycle-module-operator:main@60ec3aea86d1352c9a8f6ee710441cc608556e27:config" |
There was a problem hiding this comment.
will this eventually be "automated" ?
1ee997f to
a0d3aa9
Compare
|
@MarianMacik can you look into this ? |
43a7bd6 to
5ae67b6
Compare
There was a problem hiding this comment.
Actionable comments posted: 5
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@docs/api-overview.md`:
- Around line 1201-1230: The markdown reference for ComponentRelease in the
MCPLifecycleOperatorCommonStatus table is broken because no matching anchor
exists in docs/api-overview.md. Update the docs entry that contains the releases
field so the ComponentRelease link points to a real heading or remove the link
if the type is not documented, using the MCPLifecycleOperatorCommonStatus and
ComponentRelease sections as the places to align.
In `@get_all_manifests.sh`:
- Line 36: The manifest source entry for mcplifecycleoperator points to the
wrong repository name even though the pinned SHA and config path belong to
opendatahub-io/opendatahub-operator; update the repository identifier in
get_all_manifests.sh so the source string uses
opendatahub-io/opendatahub-operator with the existing commit and config path,
and verify the manifest fetch target still resolves correctly.
In
`@internal/controller/components/mcplifecycleoperator/monitoring/mcplifecycleoperator-prometheusrules.tmpl.yaml`:
- Line 4: The PrometheusRule resource name in
mcplifecycleoperator-prometheusrules.tmpl.yaml does not match the cleanup
contract, so the generated rule is not removed correctly. Update the name used
by the template to follow the same <component>-prometheusrules naming pattern
expected by the cleanup logic, and make sure the mcplifecycleoperator monitoring
rule identifier stays consistent with the delete path.
- Line 12: The Prometheus alert selector is using the display name “MCP
Lifecycle Operator” instead of the canonical job identity, which can cause false
alerts. Update the `expr` in `mcplifecycleoperator-prometheusrules.tmpl.yaml` to
match the actual job label used by the `mcplifecycleoperator` component, and
keep the existing absent/up logic intact while replacing the non-canonical
`job=~` matcher with the correct identity.
In `@internal/controller/services/monitoring/monitoring_controller_actions.go`:
- Line 420: The ManagementState field is currently allowed to be omitted, which
lets it default to an empty value and fall into the controller’s cleanup path.
Update the ManagementState definition in api/common/types.go to either enforce
an explicit value or add the kubebuilder default marker so omitted CRs resolve
to Managed. Keep the Enum=Managed;Removed constraint and ensure the controller
logic that treats non-Managed states as cleanup-triggering no longer receives a
zero value from json:"managementState,omitempty".
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Central YAML (base), Organization UI (inherited)
Review profile: CHILL
Plan: Enterprise
Run ID: 9fdbb704-ba58-49fd-a294-7e259ea2afe4
📒 Files selected for processing (16)
api/components/v1alpha1/mcplifecycleoperator_types.goapi/components/v1alpha1/zz_generated.deepcopy.goapi/datasciencecluster/v2/datasciencecluster_types.goapi/datasciencecluster/v2/zz_generated.deepcopy.gobuild/manifests-config.yamlcmd/main.godocs/api-overview.mdget_all_manifests.shinternal/controller/components/components.gointernal/controller/components/mcplifecycleoperator/monitoring/mcplifecycleoperator-alerting.unit-tests.yamlinternal/controller/components/mcplifecycleoperator/monitoring/mcplifecycleoperator-prometheusrules.tmpl.yamlinternal/controller/modules/mcplifecycleoperator/handler.gointernal/controller/modules/mcplifecycleoperator/handler_test.gointernal/controller/modules/modules_controller_actions.gointernal/controller/services/monitoring/monitoring_controller_actions.gopkg/cluster/gvk/gvk.go
|
I think we must wait until opendatahub-io/ODH-Build-Config#2461 merges. |
|
/retest |
4f5c880 to
0e67840
Compare
|
I think the "Red Hat Konflux / odh-operator-ci-on-pull-request" failed, b/c it's looking for |
|
/test opendatahub-operator-rhoai-e2e |
Co-authored-by: Christoph Stäbler <cstabler@redhat.com>
- Align ManifestDir to mcp-lifecycle-module-operator (cgoodfred) - Rewrite BuildModuleCR to error on nil DSC instead of defaulting (MarianMacik) - Remove monitoring/PrometheusRules - modules handle own observability - Add run level RL(20) for MCPLifecycleOperator in moduleRunlevels - Add RHOAI manifests entry in get_all_manifests.sh - Update handler_test.go to match new BuildModuleCR behavior Signed-off-by: Matthias Wessendorf <mwessend@redhat.com> Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add enable/disable E2E test suite following the aigateway pattern: - Validate module CR and controller deployment come up when Managed - Validate cleanup when set to Removed Signed-off-by: Matthias Wessendorf <mwessend@redhat.com> Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Docs-only update in upstream (ConfigMap-to-env-var migration docs). Signed-off-by: Matthias Wessendorf <mwessend@redhat.com> Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The function and its operatorv1 import were added for module monitoring but all callers were removed when monitoring was dropped. Restores the file to match upstream main. Signed-off-by: Matthias Wessendorf <mwessend@redhat.com> Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Remove redundant prefixManifestPaths from modules_controller_actions.go (already handled by BaseHandler.GetOperatorManifests via ManifestsBasePath) - Add mcplifecycleoperator to ODH/RHOAI DSC samples - Add MCPLifecycleOperator to createDefaultDSC and E2E createDSC helper - Add mcplifecycleoperator to README DSC example - Exclude MCPLifecycleOperator in resilience_test.go (module, no DSC condition) - Remove resolved known_issues entries from component-params-env.yaml Signed-off-by: Matthias Wessendorf <mwessend@redhat.com> Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…AI CI Re-add known_issues entries for MCPLO images (RHOAIENG-71453, RHOAIENG-71452) to fix the RELATED_IMAGE validation CI check. Images are not yet present on the rhoai-3.5-ea.2 branch, pending RHOAI Konflux onboarding. Signed-off-by: Matthias Wessendorf <mwessend@redhat.com> Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Includes: - df69d50d RHOAIENG-72309: Honor cluster TLS security profile (opendatahub-io#64) - c6568a38 Add all manifests from MCPLO (opendatahub-io#65) Signed-off-by: Matthias Wessendorf <mwessend@redhat.com> Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Align ManifestDir, get_all_manifests.sh keys, and manifests-config.yaml dest with the codebase convention (no hyphens) and Marian's fix in opendatahub-io#3729. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Matthias Wessendorf <mwessend@redhat.com>
Add MCP Lifecycle Operator entry to the components list in both ODH and RHOAI OLM description patches shown in OperatorHub. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Matthias Wessendorf <mwessend@redhat.com>
Align with the pattern used by AI Gateway and Monitoring handlers, which both return false when no DSC/DSCI/Platform context provides an explicit managementState. Returning true would incorrectly enable the module when there is no CR to read the state from. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Matthias Wessendorf <mwessend@redhat.com>
Add MCPLifecycleOperator to PlatformModules and EnabledModules in platform_types.go, and update IsEnabled/BuildModuleCR to handle the Platform CR alongside DSC, following the monitoring handler pattern. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Matthias Wessendorf <mwessend@redhat.com>
Run make generate manifests-all api-docs to include generated api-overview.md and RBAC changes. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Matthias Wessendorf <mwessend@redhat.com>
Picks up: Update make deploy to use RELATED_IMAGE env var (opendatahub-io#66) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Matthias Wessendorf <mwessend@redhat.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Matthias Wessendorf <mwessend@redhat.com>
… Platform TestIsEnabled_NilDSC expected true for a PlatformContext with neither DSC nor Platform set. IsEnabled correctly returns false in that case since there is no source to read ManagementState from. Signed-off-by: Matthias Wessendorf <mwessend@redhat.com> Co-Authored-By: Claude <noreply@anthropic.com> Signed-off-by: Matthias Wessendorf <mwessend@redhat.com>
…merge Signed-off-by: Matthias Wessendorf <mwessend@redhat.com> Co-Authored-By: Claude <noreply@anthropic.com> Signed-off-by: Matthias Wessendorf <mwessend@redhat.com>
…e name Module CRD XValidation requires singleton name "default", not "default-mcplifecycleoperator". Also add missing kubebuilder RBAC markers for mcplifecycleoperators resource so the module controller has permission to manage the CR. Signed-off-by: Matthias Wessendorf <mwessend@redhat.com> Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Matthias Wessendorf <mwessend@redhat.com>
…8516b7 Pin the downstream mcp-lifecycle-module-operator manifest entry to commit cd8516b7 on the rhoai-3.5 branch. Signed-off-by: Matthias Wessendorf <mwessend@redhat.com> Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Matthias Wessendorf <mwessend@redhat.com>
Picks up fix for OOMKill caused by tight 128Mi memory limit. Signed-off-by: Matthias Wessendorf <mwessend@redhat.com> Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Matthias Wessendorf <mwessend@redhat.com>
Picks up fix from mcp-lifecycle-module-operator#68: use Makefile-ocp.mk for operand install.yaml generation, ensuring a pullable default image when RELATED_IMAGE env vars are not set. Signed-off-by: Matthias Wessendorf <mwessend@redhat.com> Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
27c7652 to
cfa86c3
Compare
|
@davidebianchi what do you think? Do we need to execite xks e2e? |
|
Yes, we are improving the check but should run before merging the PR. By the way, e2e are failing now for a component failure, so it needs to be fixed to have e2e passing. |
/retest odh-operator-ci-on-pull-request |
|
@creydr: The The following commands are available to trigger optional jobs: Use DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
Co-authored-by: Christoph Stäbler <cstabler@redhat.com>
|
@matzew: The following tests failed, say
Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
Add MCPLifecycleOperator as a module in the ODH operator, covering API types, module handler, monitoring, and wiring.
Ref: RHOAIENG-65524
Description
How Has This Been Tested?
Screenshot or short clip
Merge criteria
E2E test suite update requirement
When bringing new changes to the operator code, such changes are by default required to be accompanied by extending and/or updating the E2E test suite accordingly.
To opt-out of this requirement:
E2E update requirement opt-out justificationsection belowE2E update requirement opt-out justification
It seems that all existing E2E tests under
tests/e2e/are all for the (legacy) component controllers, not modules.Summary by CodeRabbit