Skip to content

fix: consider apiVersion when getting example yaml for crds#60

Open
tthvo wants to merge 3 commits intok8s-operatorhub:mainfrom
tthvo:crd-examples
Open

fix: consider apiVersion when getting example yaml for crds#60
tthvo wants to merge 3 commits intok8s-operatorhub:mainfrom
tthvo:crd-examples

Conversation

@tthvo
Copy link
Copy Markdown

@tthvo tthvo commented Jul 9, 2024

Fixes #56

Description

  • Added additional condition for checking apiVersion when searching for alm-examples for CRDs.
  • Displayed a version next to CRD name for clarity (maybe there is a better design?)
  • Applied lint fixes.

Motivations

See #56. Additionally, CRD that has no corresponding alm-example is showing an incorrect one if an example of the same kind (different version) is available. See cryostatio/cryostat-operator#909

How to test

Use the following CSV, which both specify a CRD with >= 2 versions.

Use the CSV with preview page to see the changes.

@tthvo tthvo force-pushed the crd-examples branch 2 times, most recently from aa0502a to 6579c21 Compare July 9, 2024 23:25
@tthvo
Copy link
Copy Markdown
Author

tthvo commented Jul 9, 2024

Hey @mvalarh, would I be able to get your or anyone's opinions on these changes?

@ebaron
Copy link
Copy Markdown

ebaron commented Oct 25, 2024

Hi, would someone mind taking a look at this PR? This bug is still affecting the Cryostat Operator:
https://operatorhub.io/operator/cryostat-operator

tthvo added 3 commits April 16, 2025 15:50
Solves k8s-operatorhub#56. When getting example YAMLs for CRDs, apiVersion should be
considered in cases where a CRD is shipped with >= 2 versions.

Signed-off-by: Thuan Vo <thuan.votann@gmail.com>
Signed-off-by: Thuan Vo <thuan.votann@gmail.com>
Signed-off-by: Thuan Vo <thuan.votann@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

Operator preview CRD tiles do not display the correct examples for CRDs with more than 1 apiVersion

2 participants