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

Add better information for OperatorHub #330

Merged
merged 3 commits into from
Nov 27, 2023
Merged

Add better information for OperatorHub #330

merged 3 commits into from
Nov 27, 2023

Conversation

alexsnaps
Copy link
Member

@alexsnaps alexsnaps commented Nov 22, 2023

Attempt to fix #328

Copy link

codecov bot commented Nov 22, 2023

Codecov Report

Merging #330 (7cee3b3) into main (2740b79) will decrease coverage by 0.32%.
The diff coverage is n/a.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #330      +/-   ##
==========================================
- Coverage   65.10%   64.78%   -0.32%     
==========================================
  Files          35       35              
  Lines        3797     3797              
==========================================
- Hits         2472     2460      -12     
- Misses       1130     1139       +9     
- Partials      195      198       +3     
Flag Coverage Δ
integration 69.54% <ø> (-0.60%) ⬇️
unit 59.40% <ø> (ø)

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

Components Coverage Δ
api/v1beta1 (u) ∅ <ø> (∅)
pkg/common (u) 76.92% <ø> (ø)
pkg/istio (u) 30.24% <ø> (ø)
pkg/log (u) 31.81% <ø> (ø)
pkg/reconcilers (u) 33.33% <ø> (ø)
pkg/rlptools (u) 56.46% <ø> (ø)
controllers (i) 69.54% <ø> (-0.60%) ⬇️
Files Coverage Δ
api/v1beta2/authpolicy_types.go 77.57% <ø> (ø)
api/v1beta2/ratelimitpolicy_types.go 26.86% <ø> (ø)

... and 5 files with indirect coverage changes

@grzpiotrowski
Copy link
Contributor

Did a bit of searching and to get the AuthPolicy and RateLimitPolicy CRD's names displayed correctly it looks like we need to add a displayName in the spec -> customresourcedefinitions -> owned section of the CSV. Like so:

customresourcedefinitions:
    owned:
    - kind: AuthPolicy
      name: authpolicies.kuadrant.io
      version: v1beta2
      displayName: AuthPolicy
    - description: Kuadrant is the Schema for the kuadrants API
      displayName: Kuadrant
      kind: Kuadrant
      name: kuadrants.kuadrant.io
      version: v1beta1
    - kind: RateLimitPolicy
      name: ratelimitpolicies.kuadrant.io
      version: v1beta2
      displayName: RateLimitPolicy

Tested in the viewer here

@alexsnaps
Copy link
Member Author

This integration test can be ignored:

2023-11-23T16:05:38.4177912Z �[38;5;9m• [FAILED] [32.090 seconds]�[0m
2023-11-23T16:05:38.4180192Z �[0mRateLimitPolicy controller �[38;5;243mRLP targeting Gateway �[38;5;9m�[1m[It] Creates all the resources for a basic Gateway and RateLimitPolicy�[0m
2023-11-23T16:05:38.4182033Z �[38;5;243m/home/runner/work/kuadrant-operator/kuadrant-operator/controllers/ratelimitpolicy_controller_test.go:419�[0m
2023-11-23T16:05:38.4182780Z 
2023-11-23T16:05:38.4182996Z   �[38;5;9m[FAILED] Unexpected error:
2023-11-23T16:05:38.4183553Z       <*errors.StatusError | 0xc000ce26e0>: 
2023-11-23T16:05:38.4184736Z       wasmplugins.extensions.istio.io "kuadrant-toystore-gw" not found
2023-11-23T16:05:38.4185343Z       {
2023-11-23T16:05:38.4185774Z           ErrStatus: {
2023-11-23T16:05:38.4186395Z               TypeMeta: {Kind: "", APIVersion: ""},
2023-11-23T16:05:38.4186971Z               ListMeta: {
2023-11-23T16:05:38.4187663Z                   SelfLink: "",
2023-11-23T16:05:38.4188234Z                   ResourceVersion: "",
2023-11-23T16:05:38.4188691Z                   Continue: "",
2023-11-23T16:05:38.4189366Z                   RemainingItemCount: nil,
2023-11-23T16:05:38.4189868Z               },
2023-11-23T16:05:38.4190194Z               Status: "Failure",
2023-11-23T16:05:38.4191309Z               Message: "wasmplugins.extensions.istio.io \"kuadrant-toystore-gw\" not found",
2023-11-23T16:05:38.4191974Z               Reason: "NotFound",
2023-11-23T16:05:38.4192430Z               Details: {
2023-11-23T16:05:38.4193030Z                   Name: "kuadrant-toystore-gw",
2023-11-23T16:05:38.4193558Z                   Group: "extensions.istio.io",
2023-11-23T16:05:38.4194138Z                   Kind: "wasmplugins",
2023-11-23T16:05:38.4194600Z                   UID: "",
2023-11-23T16:05:38.4195147Z                   Causes: nil,
2023-11-23T16:05:38.4195559Z                   RetryAfterSeconds: 0,
2023-11-23T16:05:38.4196171Z               },
2023-11-23T16:05:38.4196663Z               Code: 404,
2023-11-23T16:05:38.4197158Z           },
2023-11-23T16:05:38.4197572Z       }

It is being addressed as part of #331

@grzpiotrowski
Copy link
Contributor

If all is correct then one more task left, to add new CRDs or rather add them to the config CSV so they also have a nice name displayed, description + samples?

@alexsnaps
Copy link
Member Author

@grzpiotrowski Given what happened with #338, that last task is obsolete…
So I guess this is done & ready for review/merging, right?

@grzpiotrowski grzpiotrowski force-pushed the ophub-desc branch 2 times, most recently from 6f1b8cd to 2217972 Compare November 24, 2023 13:42
@grzpiotrowski
Copy link
Contributor

Yes, this should be good to merge in that case.
I pushed again rebasing on top of main and with some small corrections to the owned CRDs descirptions in the config CSV to match with the spelling in the doc comments.

The new CRDs are still present in the bundle manifests but I see they'll be deleted by that other PR.

@grzpiotrowski grzpiotrowski marked this pull request as ready for review November 24, 2023 14:00
@grzpiotrowski grzpiotrowski requested a review from a team as a code owner November 24, 2023 14:00
@grzpiotrowski
Copy link
Contributor

To test how it will render on Operator Hub, paste the whole CSV from the bundle here:
Operator Preview

@grzpiotrowski
Copy link
Contributor

How it would look like now:

Screenshot from 2023-11-27 14-21-09

Copy link
Contributor

@guicassolato guicassolato left a comment

Choose a reason for hiding this comment

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

LGTM

@grzpiotrowski grzpiotrowski merged commit 77ee696 into main Nov 27, 2023
21 checks passed
@eguzki eguzki deleted the ophub-desc branch November 27, 2023 14:56
maleck13 pushed a commit to maleck13/kuadrant-operator that referenced this pull request Dec 12, 2023
* Add description

* Update CRDs versions and samples in CSV

* Enhance CRDs descriptions

---------

Co-authored-by: Grzegorz Piotrowski <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Add more explicit descriptions on OperatorHub
3 participants