Skip to content

Conversation

@thoraxe
Copy link
Contributor

@thoraxe thoraxe commented Oct 28, 2025

Description

Implement comprehensive ROSA (Red Hat OpenShift Service on AWS) environment detection capabilities with intelligent content delivery system for OpenShift Lightspeed. This feature automatically detects ROSA environments and configures specialized documentation and knowledge sources.

Core Features:
• ROSA Environment Detection: Automatically detects ROSA clusters by analyzing
Console CR customization brand field, with graceful fallback for missing
Console objects
• Intelligent Documentation Switching: Conditionally skips default OpenShift
documentation when ROSA is detected, preventing content conflicts and
improving relevance
• Dynamic RAG Configuration: Automatically provisions ROSA-specific RAG
(Retrieval-Augmented Generation) sources while preserving user-defined
configurations
• State-Aware Reconciliation: Caches ROSA detection results across reconciler
components for consistent behavior

Technical Implementation:
• Early detection integration in main reconciliation flow (olsconfig_controller.go:174) • Console CR brand field analysis with "ROSA" brand detection (rosa_detection.go:25) • Conditional documentation logic in OLS config map generation (ols_app_server_assets.go:254) • RAG source management with duplicate prevention (rag.go:50) • Robust error handling with dedicated error constants • Fixed operator service monitor reconciliation to skip when deployment doesn't exist
(resolves issues with local development using 'make run')

Testing Coverage:
• Unit tests for ROSA detection logic with multiple brand scenarios • Integration tests for full reconciliation flow with ROSA detection • RAG-specific tests covering configuration addition and duplicate prevention • End-to-end tests verifying complete ROSA environment integration • Tests for graceful handling of missing Console objects

Files Added:
• internal/controller/rosa_detection.go - Core ROSA detection logic • internal/controller/rosa_detection_test.go - Unit tests for detection • internal/controller/olsconfig_rosa_integration_test.go - Integration tests • internal/controller/rosa_rag_test.go - RAG configuration tests • test/e2e/rosa_integration_test.go - E2E ROSA integration tests

Files Modified:
• internal/controller/constants.go - ROSA detection constants and error messages • internal/controller/olsconfig_controller.go - Early ROSA detection integration • internal/controller/ols_app_server_*.go - Conditional documentation logic • internal/controller/rag.go - ROSA RAG configuration management • internal/controller/operator_reconciliator.go - Fixed service monitor for local dev

This implementation ensures ROSA environments receive specialized, relevant content while maintaining backward compatibility and preserving user customizations.

🤖 Generated with Claude Code

Type of change

  • Refactor
  • New feature
  • Bug fix
  • CVE fix
  • Optimization
  • Documentation Update
  • Configuration Update
  • Bump-up dependent library

Related Tickets & Documents

https://issues.redhat.com/browse/OLS-2232

Checklist before requesting a review

  • I have performed a self-review of my code.
  • PR has passed all pre-merge test jobs.
  • If it is a core feature, I have added thorough tests.

Implement comprehensive ROSA (Red Hat OpenShift Service on AWS) environment
detection capabilities with intelligent content delivery system for OpenShift
Lightspeed. This feature automatically detects ROSA environments and configures
specialized documentation and knowledge sources.

Core Features:
• ROSA Environment Detection: Automatically detects ROSA clusters by analyzing
  Console CR customization brand field, with graceful fallback for missing
  Console objects
• Intelligent Documentation Switching: Conditionally skips default OpenShift
  documentation when ROSA is detected, preventing content conflicts and
  improving relevance
• Dynamic RAG Configuration: Automatically provisions ROSA-specific RAG
  (Retrieval-Augmented Generation) sources while preserving user-defined
  configurations
• State-Aware Reconciliation: Caches ROSA detection results across reconciler
  components for consistent behavior

Technical Implementation:
• Early detection integration in main reconciliation flow (olsconfig_controller.go:174)
• Console CR brand field analysis with "ROSA" brand detection (rosa_detection.go:25)
• Conditional documentation logic in OLS config map generation (ols_app_server_assets.go:254)
• RAG source management with duplicate prevention (rag.go:50)
• Robust error handling with dedicated error constants
• Fixed operator service monitor reconciliation to skip when deployment doesn't exist
  (resolves issues with local development using 'make run')

Testing Coverage:
• Unit tests for ROSA detection logic with multiple brand scenarios
• Integration tests for full reconciliation flow with ROSA detection
• RAG-specific tests covering configuration addition and duplicate prevention
• End-to-end tests verifying complete ROSA environment integration
• Tests for graceful handling of missing Console objects

Files Added:
• internal/controller/rosa_detection.go - Core ROSA detection logic
• internal/controller/rosa_detection_test.go - Unit tests for detection
• internal/controller/olsconfig_rosa_integration_test.go - Integration tests
• internal/controller/rosa_rag_test.go - RAG configuration tests
• test/e2e/rosa_integration_test.go - E2E ROSA integration tests

Files Modified:
• internal/controller/constants.go - ROSA detection constants and error messages
• internal/controller/olsconfig_controller.go - Early ROSA detection integration
• internal/controller/ols_app_server_*.go - Conditional documentation logic
• internal/controller/rag.go - ROSA RAG configuration management
• internal/controller/operator_reconciliator.go - Fixed service monitor for local dev

This implementation ensures ROSA environments receive specialized, relevant
content while maintaining backward compatibility and preserving user customizations.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
@openshift-ci openshift-ci bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Oct 28, 2025
@openshift-ci
Copy link

openshift-ci bot commented Oct 28, 2025

[APPROVALNOTIFIER] This PR is NOT APPROVED

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

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

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

@openshift-merge-robot openshift-merge-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Nov 1, 2025
@openshift-merge-robot
Copy link

PR needs rebase.

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.

@openshift-ci
Copy link

openshift-ci bot commented Nov 6, 2025

@thoraxe: The following tests 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/unit 2b0160e link true /test unit
ci/prow/bundle-e2e-4-19 2b0160e link true /test bundle-e2e-4-19
ci/prow/bundle-e2e-4-20 2b0160e link true /test bundle-e2e-4-20

Full PR test history. Your PR dashboard.

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.

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

Labels

do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants