Add OpenStackAssistant to lightspeed-operator - #47
Conversation
…penStackAssistant
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: dprince 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 |
|
Posting this as a WIP. Some inline changes here I needed to pin things and get it functionally working can be split out |
Add a fully functional OpenStackAssistant reconciler that manages an AI assistant pod (currently Goose-based) connected to the Lightspeed Stack AI backend and optional MCP servers. API types (api/v1beta1/): - Replace scaffolded OpenStackAssistantSpec with real fields: ContainerImage, Provider (goose), LightspeedStack (providerSecret, caBundleSecretName), Goose config (model, recipes, skills, hints, mcpServers), NodeSelector, and Env. - Add OpenStackAssistantStatus with PodName, Conditions, and ObservedGeneration. - Add MCPServerRef with support for direct URL or OpenStackClient CR reference (auto-computed service URL). - Add condition type OpenStackAssistantReadyCondition and associated status messages. Controller (internal/controller/openstackassistant_controller.go): - Full reconcile loop: wait for ServiceAccount (created by openstack-operator), resolve provider secret, optional CA bundle, optional recipes/skills/hints ConfigMaps, resolve MCP server URLs from OpenStackClient CRs via unstructured client. - Build and manage a single Pod per OpenStackAssistant CR with proper volumes, environment variables, and ownership. - Watch Secrets, ConfigMaps, ServiceAccounts, and Pods with field-index-based filtering to trigger reconciliation on dependent resource changes. Assistant helpers (internal/assistant/): - funcs.go: EntrypointScript() generating the shell init for Goose config, recipe/skill/MCP-server discovery; Pod() building the full corev1.Pod spec with all volume mounts and env vars; GooseConfigMap() generating the Goose extensions ConfigMap. - funcs_test.go: table-driven tests for Pod() and GooseConfigMap() covering base cases, MCP servers, CA bundles, recipes, skills, hints, custom env, and node selectors. RBAC and samples: - Add RBAC markers for pods, secrets, configmaps, serviceaccounts, and openstackclients. - Update sample CR with realistic provider configuration.
|
@dprince: The following test 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. |
|
PR needs rebase. 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. |
Implement OpenStackAssistant controller
Add a fully functional OpenStackAssistant reconciler that manages an AI assistant pod (currently Goose-based) connected to the Lightspeed Stack AI backend and optional MCP servers.