Repository navigation
✨ Integrate new kagenti operator and new installer changes - #425
Conversation
|
@cwiklik can you pls. rebase? |
942b8c7 to
ad17b6d
Compare
Testing Instructions for PR 425These instructions are for testing PR 425 locally on your machine. Pull PR from GitHub
git clone https://github.com/kagenti/kagenti.git
cd kagenti
git fetch origin new-operator-and-installer-changes
git checkout new-operator-and-installer-changesPre-Installation Setup
# Example secret values file. This file should be kept out of source control (add to
# .gitignore) and provided at runtime via -e "secret_values_file=secret_values.yaml".
# Top-level keys will be merged into each component's values unless you
# structure them under component-specific keys.
# Example for global secrets:
global: {}
# jwt_key: "REPLACE_WITH_JWT_KEY"
# db_password: "REPLACE_WITH_DB_PASSWORD"
charts:
kagenti:
values:
secrets:
githubUser: ""
githubToken: ""
openaiApiKey: ""
# Example component-specific secrets
#kagenti:
# postgres:
# password: "REPLACE_WITH_PG_PASSWORD"Important: Replace Installation Steps
cd deployments/ansible
watch kubectl get pods -A
./run-install.sh --env dev --preload --extra-vars '{"kind_images_preload": true}'
UI Pod ReplacementOnce the installation is complete, replace the UI pod: Note: The installer installs a release-level version of the UI which does not include the changes from this PR. You need to replace it with the version from the PR branch.
cd kaegenti/kagenti/ui
./scripts/ui-dev-build.shThat's it! The environment should now be ready for testing. |
There was a problem hiding this comment.
Pull request overview
This PR integrates the new Kagenti operator architecture and Toolhive operator for MCP tool management, representing a significant architectural evolution of the platform.
Key Changes:
- Replaces single
ComponentCRD with separateAgent,AgentBuild, andMCPServerCRDs for better separation of concerns - Integrates Toolhive operator (v0.5.3) and CRDs (v0.0.60) for managing MCP tools
- Updates UI to work with new CRD structure and API groups (
agent.kagenti.devandtoolhive.stacklok.dev) - Adds new
AgentBuildworkflow that separates image building from agent deployment - Updates installer with new Helm chart dependencies for kagenti-webhook and removes deprecated platform-operator
Reviewed changes
Copilot reviewed 19 out of 21 changed files in this pull request and generated 17 comments.
Show a summary per file
| File | Description |
|---|---|
| uv.lock | Updates Python dependencies including test dependencies (pytest, httpx, a2a-sdk, etc.) and adjusts resolution markers for Python 3.13 |
| kagenti/ui/scripts/ui-dev-build.sh | Updates kind cluster name from agent-platform to kagenti |
| kagenti/ui/pages/02_Tool_Catalog.py | Updates tool catalog to use Toolhive CRD group/version and MCPServer plural |
| kagenti/ui/pages/01_Agent_Catalog.py | Updates agent deletion to handle both Agent and AgentBuild CRs |
| kagenti/ui/lib/kube.py | Updates API calls to use new CRD groups and plurals for agents and tools |
| kagenti/ui/lib/constants.py | Defines new CRD groups, versions, and plurals for the new operator architecture |
| kagenti/ui/lib/build_utils.py | Major refactoring: adds AgentBuild CR construction, updates Agent/MCPServer resource bodies, adds strip_protocol utility |
| kagenti/installer/app/components/operator.py | Updates log message to reflect "Kagenti Operator" naming |
| docs/ocp/openshift-install.md | Adds troubleshooting section for SPIRE daemonsets (contains duplicate content) |
| deployments/envs/*.yaml | Adds toolhive operator and CRDs configuration flags |
| deployments/ansible/roles/kagenti_installer/tasks/main.yml | Updates Toolhive CRD installation configuration |
| deployments/ansible/default_values.yaml | Adds toolhive configuration (contains duplicate keys) |
| charts/kagenti/values.yaml | Renames operator components and updates default agent namespace |
| charts/kagenti/templates/ui.yaml | Updates UI RBAC to grant permissions for new CRDs |
| charts/kagenti/Chart.yaml | Replaces platform-operator with agent-operator and adds webhook chart dependency |
| charts/kagenti/Chart.lock | Updates chart lock with new dependencies |
| charts/kagenti-deps/values.yaml | Adds toolhive components configuration |
| charts/kagenti-deps/templates/spire-operand.yaml | Contains unresolved merge conflict |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
24c6528 to
8401988
Compare
Signed-off-by: cwiklik <[email protected]>
8401988 to
aaaf035
Compare
Signed-off-by: cwiklik <[email protected]> Co-authored-by: Copilot <[email protected]>
Signed-off-by: cwiklik <[email protected]> Co-authored-by: Copilot <[email protected]>
Signed-off-by: cwiklik <[email protected]> Co-authored-by: Copilot <[email protected]>
Signed-off-by: cwiklik <[email protected]> Co-authored-by: Copilot <[email protected]>
Signed-off-by: cwiklik <[email protected]> Co-authored-by: Copilot <[email protected]>
Signed-off-by: cwiklik <[email protected]>
…om/kagenti/kagenti into new-operator-and-installer-changes
Signed-off-by: cwiklik <[email protected]>
Signed-off-by: cwiklik <[email protected]>
Signed-off-by: cwiklik <[email protected]>
| version: 0.5.3 | ||
| release_name: "toolhive-operator" | ||
| namespace: "toolhive-system" | ||
|
|
There was a problem hiding this comment.
duplication of the keys in line 37-39 and 41-46 with those in lines 16-17 and 19-20.
- Please consolidate them
- since they are helm charts, please put them under the "charts:" key
- Adjust the templates depending on this refactoring (e.g.
.Values.toolhiveOperator -> Values.charts.toolhiveOperator)
There was a problem hiding this comment.
- is probably a merge bug.
- These already are under charts:
charts:
kagenti-deps:
enabled: true
chart: "../../charts/kagenti-deps"
release_name: "kagenti-deps"
namespace: "kagenti-system"
dependency_update: true
# values for the helm chart overriding the chart's values.yaml file
values:
openshift: false
components:
...
toolhiveOperator:
enabled: false
toolhiveCRDs:
enabled: false
There was a problem hiding this comment.
But ToolHive charts are installed as separate charts ... so those values should not be under charts.kagenti-deps.values - they should be a main key under charts:
There was a problem hiding this comment.
is this right:
charts:
kagenti-deps:
enabled: true
...
toolhiveCRDs:
namespace: "kagenti-system"
enabled: true
version: 0.0.60
toolhiveOperator:
namespace: "kagenti-system"
enabled: true
version: 0.5.3
There was a problem hiding this comment.
right .. then make sure that the references to these are correct in the templates
There was a problem hiding this comment.
I must admit that the changes I've made to the installer are just best guesses. When you say 'templates' do you mean yaml files in charts/kagenti-deps/templates folder? Should there be a dedicated yaml for toolhiveOperator and another for toolhiveCRDs? With the changes above, the installer installs both charts for toolhive.
There was a problem hiding this comment.
oh that's right... those variables would be used by Ansible, not by a helm chart, sorry I was unclear. So they would rather show up on the ansible installer main file https://github.com/kagenti/kagenti/blob/main/deployments/ansible/roles/kagenti_installer/tasks/main.yml
There was a problem hiding this comment.
will need also another rebase (should be simple this time)
There was a problem hiding this comment.
The main has already been updated with toolhive charts. Rebase done as well.
Signed-off-by: cwiklik <[email protected]>
Signed-off-by: cwiklik <[email protected]>
Signed-off-by: cwiklik <[email protected]>
|
testing with the new UI uncovered a new issue - the agent operator deploys a service with name for example: the UI detail page shows: but the service is: |
Signed-off-by: cwiklik <[email protected]>
Signed-off-by: cwiklik <[email protected]>
Signed-off-by: cwiklik <[email protected]>
Signed-off-by: cwiklik <[email protected]>
Signed-off-by: cwiklik <[email protected]>
|
Tested the installer from the latest PR 425, replace the UI image with the above script and deploy both weather agent and tool, and get them to work! couple of issues:
I had to delete one deployment to have enough CPUs (I have now 4 in my podman machine) |
Signed-off-by: cwiklik <[email protected]>
Signed-off-by: cwiklik <[email protected]>
Signed-off-by: cwiklik <[email protected]>
Signed-off-by: cwiklik <[email protected]>
|
|
||
| To override existing environments, you may create a [customized override file](../deployments/ansible/README.md#using-override-files). | ||
|
|
||
| <<<<<<< HEAD |
There was a problem hiding this comment.
seems like some leftover merge conflicts remained here?
|
OK, will fix this soon. Thanks for catching this. |
Summary
This PR implements changes to support the new Kagenti operator and Toolhive integration in the UI and installer.
Changes
UI Enhancements
New Kagent Installer Updates
Related issue(s)
Fixes #401