Skip to content

Support OLMv1 API for getting Operator's installed namespaces#23

Merged
openshift-merge-bot[bot] merged 3 commits intomedik8s:mainfrom
razo7:must-gather-olmv1
Dec 2, 2025
Merged

Support OLMv1 API for getting Operator's installed namespaces#23
openshift-merge-bot[bot] merged 3 commits intomedik8s:mainfrom
razo7:must-gather-olmv1

Conversation

@razo7
Copy link
Member

@razo7 razo7 commented Dec 1, 2025

Why we need this PR

  • Support OLMv1 API for getting Operator's installed namespaces
  • Include suggested namespace by default when gathering Medik8s operators
  • Gather namespaces from ClusterExtension (OLM v1) without overwriting subscription results

Changes made

  • Include OLM Operator's installed namespaces with OLM v1 API and append them to OLM v0 list
  • All of Medik8s operators CSV include a operatorframework.io/suggested-namespace annotation with a value of openshift-workload-availability
  • Append namespaces from ClusterExtension to the list of installed medik8s namespaces

Which issue(s) this PR fixes

RHWA-448

Test plan

@openshift-ci openshift-ci bot requested review from beekhof and mshitrit December 1, 2025 11:24
@openshift-ci openshift-ci bot added the approved label Dec 1, 2025
Copy link
Member

@slintes slintes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you test this on older clusters where the ClusterExtension CRD doesn't exist yet? 🤔
Will be relevant later on as well, when Subscription doesn't exist anymore on newer clusters.

@razo7
Copy link
Member Author

razo7 commented Dec 2, 2025

Did you test this on older clusters where the ClusterExtension CRD doesn't exist yet? 🤔
Will be relevant later on as well, when Subscription doesn't exist anymore on newer clusters.

  • I tested it (quay.io/oraz/must-gather:pr-23-1) on OCP 4.17 where the OLM v1 API is missing.
➜  oc get ClusterExtension
error: the server doesn't have a resource type "ClusterExtension"
➜  oc get ClusterCatalog
error: the server doesn't have a resource type "ClusterCatalog"

IIRC, OLM v1 API is TP since 4.18.

  • On OCP 4.21, where both of the APIs exist, it works and looks for the namespaces of the installed operators.

razo7 added 3 commits December 2, 2025 14:33
Include OLM Operator's installed namespaces with OLM v1 API and append them to OLM v0 list
All of Medik8s operators CSV include a operatorframework.io/suggested-namespace annotation with a value of 'openshift-workload-availability'
…k8s namespaces

gather namespaces from ClusterExtension (OLM v1) without overwriting subscription results
@razo7 razo7 force-pushed the must-gather-olmv1 branch from 59ae24c to a9c2c1d Compare December 2, 2025 12:33
@openshift-ci
Copy link

openshift-ci bot commented Dec 2, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: razo7, slintes

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

The pull request process is described 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

@openshift-merge-bot openshift-merge-bot bot merged commit 43a02c0 into medik8s:main Dec 2, 2025
2 checks passed
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.

2 participants