-
Feature Request
-
Resolution: Unresolved
-
Undefined
-
None
-
None
-
None
-
None
-
Product / Portfolio Work
-
None
-
False
-
-
None
-
None
-
None
-
-
None
-
None
-
None
-
None
-
None
1. Proposed title of this feature request
OpenShift Lightspeed (OLS) Integration into the oc Command-Line Interface (CLI)
2. What is the nature and description of the request?
The request is to develop and integrate OpenShift Lightspeed (OLS) capabilities directly into the OpenShift Command-Line Interface (oc) tool. This would allow users to access the generative AI assistant’s features—currently limited to the OpenShift Web Console—from the terminal environment.
The primary implementation should be via a new top-level subcommand, such as oc lightspeed, enabling non-interactive queries for knowledge and troubleshooting assistance.
Key Functional Requirements:
- Non-Interactive Query: A command to ask a single, natural-language question and receive a text-based answer, often including suggested oc commands.
-
- Example: oc lightspeed query "How do I create a new project and deployment?"
- Context Passing: The ability to pipe content (e.g., oc describe output, log snippets, YAML files) into the oc lightspeed command for context-aware troubleshooting and analysis.
-
- Example: oc logs pod/failing-pod | oc lightspeed analyze "Why is this pod crashing and what is the fix?"
- Structured Output: An option to receive the response in a structured format (e.g., JSON) to facilitate integration into shell scripts and automation workflows.
- Service Discovery: The oc client must be able to automatically detect and authenticate with the OLS service running within the cluster.
3. Why does the customer need this? (List the business requirements here)
The customer requires this feature to reduce operational friction for OpenShift users who primarily interact with the platform via the terminal. Many platform admins and users only use the CLI to access OCP. This can, in fact, serve as an OC Agent that can be later integrated with other agents.
Direct CLI integration will eliminate context-switching, allowing them to rapidly analyze complex cluster state (e.g., using piped oc describe output or large log files) and get immediate, actionable oc commands without leaving their current session.
Enabling AI-Assisted Automation and Scripting:
**
A CLI-native Lightspeed integration is essential for leveraging its intelligence in automation. By providing an output option like --json, customers can build custom tools that:
- Automatically analyze failed application logs and surface suggested commands to a ticketing system.
- Validate Kubernetes resource YAML files against best practices before applying them.
- Programmatically generate initial oc commands for repetitive tasks based on configuration parameters.
4. List any affected packages or components.
This is, to the best of my knowledge, but I am sure there may be other components that might get impacted:
- OpenShift Command-Line Interface (oc): Modification to introduce the new lightspeed command and its logic for connecting to the OLS backend.
- OpenShift Lightspeed Service/Operator: May require API enhancements to better support CLI-specific use cases, such as handling large text inputs (logs/YAML) and providing structured responses for scripting.
- Authentication/Authorization Components: Any components governing user authentication and RBAC for the OLS service endpoint may need updates to properly authorize access from the oc client context.