Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

📖 fix(docs): fix apiVersion for clustercatalogs. Replace 'catalogd.operatorframework.io/v1alpha1' with 'olm.operatorframework.io/v1alpha1' #1433

Merged
merged 1 commit into from
Nov 7, 2024

Conversation

camilamacedo86
Copy link
Contributor

Replace apiVersion: catalogd.operatorframework.io/v1alpha1 with apiVersion: olm.operatorframework.io/v1alpha1 for clustercatalogs.olm.operatorframework.io.

Reason:
The API version referenced in the docs appears incorrect. After installing, the correct API name is confirmed with:

$ kubectl get crds | grep clustercatalog
clustercatalogs.olm.operatorframework.io   2024-11-06T21:34:38Z

The API is listed under clustercatalogs.olm.operatorframework.io, not catalogd.

Example error faced when trying to apply with the incorrect API name:

$ kubectl apply -f - <<EOF
> apiVersion: catalogd.operatorframework.io/v1alpha1
> kind: ClusterCatalog
> metadata:
>   name: operatorhubio
> spec:
>   source:
>     type: Image
>     image:
>       ref: quay.io/operatorhubio/catalog:latest
>       pollInterval: 10m
> EOF
error: resource mapping not found for name: "operatorhubio" namespace: "" from "STDIN": no matches for kind "ClusterCatalog" in version "catalogd.operatorframework.io/v1alpha1"
ensure CRDs are installed first

For reference, see the correct API name here:
olm.operatorframework.io_clustercatalogs.yaml.

@camilamacedo86 camilamacedo86 requested a review from a team as a code owner November 6, 2024 23:23
Copy link

netlify bot commented Nov 6, 2024

Deploy Preview for olmv1 ready!

Name Link
🔨 Latest commit ec47a13
🔍 Latest deploy log https://app.netlify.com/sites/olmv1/deploys/672c9dbd1fc0bd0008c5a522
😎 Deploy Preview https://deploy-preview-1433--olmv1.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@camilamacedo86 camilamacedo86 changed the title 📖 fix(docs): update API name to correct version 📖 fix(docs): fix apiVersion for clustercatalogs. Replace 'catalogd.operatorframework.io/v1alpha1' with 'olm.operatorframework.io/v1alpha1' Nov 6, 2024
Copy link

codecov bot commented Nov 6, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 73.26%. Comparing base (22004fa) to head (ec47a13).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1433      +/-   ##
==========================================
- Coverage   73.45%   73.26%   -0.20%     
==========================================
  Files          42       42              
  Lines        3063     3063              
==========================================
- Hits         2250     2244       -6     
- Misses        640      644       +4     
- Partials      173      175       +2     
Flag Coverage Δ
e2e 55.20% <ø> (-0.20%) ⬇️
unit 52.59% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@joelanford joelanford left a comment

Choose a reason for hiding this comment

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

Good catch! Thanks for reviewing with fresh eyes!

@@ -125,7 +125,7 @@ When multiple catalogs provide the same package, you can set priorities to resol
In your `ClusterCatalog` resource, set the `priority` field:

```yaml
apiVersion: catalogd.operatorframework.io/v1alpha1
apiVersion: clustercatalogs.olm.operatorframework.io
Copy link
Member

Choose a reason for hiding this comment

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

Drop the clustercatalogs. prefix. That's the plural resource name, not part of the apiGroup.

Copy link
Contributor Author

@camilamacedo86 camilamacedo86 Nov 6, 2024

Choose a reason for hiding this comment

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

Oh boy, you have a good catcher too :

I did the test, create the title with the right apiVersion but I did the replace wrong :-P

) $ kubectl get crds | grep clustercatalog
clustercatalogs.olm.operatorframework.io     2024-11-06T21:34:38Z
camiladeomacedo@camilas-MacBook-Air ~/go/src/github.com/operator-framework/operator-controller (fix-install-script) $ kubectl apply -f - <<EOF
> apiVersion: olm.operatorframework.io/v1alpha1
> kind: ClusterCatalog
> metadata:
>   name: operatorhubio
> spec:
>   source:
>     type: Image
>     image:
>       ref: quay.io/operatorhubio/catalog:latest
>       pollInterval: 10m
> EOF
clustercatalog.olm.operatorframework.io/operatorhubio configured

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done! Thanks.
Stopping for today to avoid missing any boats—at least for today. :-)

Replace `apiVersion: catalogd.operatorframework.io/v1alpha1` with `apiVersion: olm.operatorframework.io/v1alpha1` for `clustercatalogs.olm.operatorframework.io`.

Reason:
The API version referenced in the docs appears incorrect. After installing, the correct API name is confirmed with:

```
$ kubectl get crds | grep clustercatalog
clustercatalogs.olm.operatorframework.io   2024-11-06T21:34:38Z
```

The API is listed under `clustercatalogs.olm.operatorframework.io`, not `catalogd`.

Example error faced when trying to apply with the incorrect API name:

```
$ kubectl apply -f - <<EOF
> apiVersion: catalogd.operatorframework.io/v1alpha1
> kind: ClusterCatalog
> metadata:
>   name: operatorhubio
> spec:
>   source:
>     type: Image
>     image:
>       ref: quay.io/operatorhubio/catalog:latest
>       pollInterval: 10m
> EOF
error: resource mapping not found for name: "operatorhubio" namespace: "" from "STDIN": no matches for kind "ClusterCatalog" in version "catalogd.operatorframework.io/v1alpha1"
ensure CRDs are installed first
```

For reference, see the correct API name here:
[olm.operatorframework.io_clustercatalogs.yaml](https://github.com/operator-framework/catalogd/blob/main/config/base/crd/bases/olm.operatorframework.io_clustercatalogs.yaml).
Copy link
Member

@m1kola m1kola left a comment

Choose a reason for hiding this comment

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

Good catch! Thanks for fixing it.

@m1kola m1kola added this pull request to the merge queue Nov 7, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Nov 7, 2024
@m1kola m1kola added this pull request to the merge queue Nov 7, 2024
Merged via the queue into operator-framework:main with commit 481bd5d Nov 7, 2024
17 of 18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants