Skip to content

Add OpenStackAssistant to lightspeed-operator - #47

Open
dprince wants to merge 2 commits into
openstack-k8s-operators:mainfrom
dprince:assistant2
Open

Add OpenStackAssistant to lightspeed-operator#47
dprince wants to merge 2 commits into
openstack-k8s-operators:mainfrom
dprince:assistant2

Conversation

@dprince

@dprince dprince commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

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.

@openshift-ci
openshift-ci Bot requested review from Akrog and lpiwowar August 12, 2026 22:25
@openshift-ci

openshift-ci Bot commented Aug 12, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: dprince
Once this PR has been reviewed and has the lgtm label, please assign akrog for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@dprince

dprince commented Aug 12, 2026

Copy link
Copy Markdown
Contributor Author

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.
@openshift-ci

openshift-ci Bot commented Aug 14, 2026

Copy link
Copy Markdown

@dprince: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/openstack-lightspeed-kuttl-4-20 74170fe link true /test openstack-lightspeed-kuttl-4-20

Full PR test history. Your PR dashboard.

Details

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. I understand the commands that are listed here.

@openshift-ci

openshift-ci Bot commented Aug 18, 2026

Copy link
Copy Markdown

PR needs rebase.

Details

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.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant