feat(controller): add OCP version auto-detection for RAG configuration#72
feat(controller): add OCP version auto-detection for RAG configuration#72omkarjoshi0304 wants to merge 0 commit into
Conversation
|
Merge Failed. This change or one of its cross-repo dependencies was unable to be automatically merged with the current state of its repository. Please rebase the change and upload a new patchset. |
461e09c to
26797aa
Compare
|
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. |
|
Merge Failed. This change or one of its cross-repo dependencies was unable to be automatically merged with the current state of its repository. Please rebase the change and upload a new patchset. |
26797aa to
b6cc1dc
Compare
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: omkarjoshi0304 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 |
Description
This PR implements the automatic detection of the OpenShift (OCP) cluster version to dynamically select the correct RAG database directory and index name.
Key Changes
config.openshift.io/v1/ClusterVersionAPI.4.16->/ocp/4.16).4.20), it defaults tolatestand sets a Warning condition in the Status.detectedOCPVersion: The actual version found on the cluster.activeOCPVersion: The version string used for paths (e.g.,latestor4.18).ocpVersionFallback: Boolean flag indicating if fallback logic was used.Testing / Verification
I have verified this functionality on a local CRC environment running OCP 4.20 (which triggers the fallback logic as expected).
1. Verification of Logic (Unit Tests)
Ran
go test ./internal/controller/...covering detection, path generation, and fallback logic.status:
activeOCPVersion: latest
conditions:
message: Waiting for the OpenShift Lightspeed operator to deploy.
reason: Requested
severity: Info
status: "False"
type: Ready
message: 'Cluster version 4.20 is not explicitly supported. Using ''latest'' OCP
documentation. Supported versions: [4.16 4.18 latest]'
reason: Ready
status: "True"
type: OCPVersionResolved
message: Waiting for the OpenShift Lightspeed operator to deploy.
reason: Requested
severity: Info
status: "False"
type: OpenShiftLightspeedOperatorReady
message: OpenStack Lightspeed not started
reason: Init
status: Unknown
type: OpenStackLightspeedReady
detectedOCPVersion: "4.20"
observedGeneration: 1
ocpVersionFallback: true