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 descriptions and samples to CSV #372

Merged
merged 1 commit into from
Dec 13, 2023
Merged

Add descriptions and samples to CSV #372

merged 1 commit into from
Dec 13, 2023

Conversation

grzpiotrowski
Copy link
Contributor

@grzpiotrowski grzpiotrowski commented Dec 11, 2023

Fixes #369

Added descriptions to CSV template for:

  • DNSHealthCheckProbe
  • DNSPolicy
  • DNSRecord
  • ManagedZone
  • TLSPolicy

Added a kustomize remote base for the yaml samples from MGC repo:

  • DNSPolicy
  • ManagedZone
  • TLSPolicy

DNSRecord and DNSHealthCheckProbe sample not included since these are created by the controller.

Changes/suggestions very welcome.

The final looks in the OperatorHub can be checked by pasting the whole content of the generated kuadrant-operator.clusterserviceversion.yaml to the OperatorHub Preview tool.

@grzpiotrowski grzpiotrowski self-assigned this Dec 11, 2023
@grzpiotrowski grzpiotrowski added this to the v0.6.0 milestone Dec 11, 2023
Copy link

codecov bot commented Dec 11, 2023

Codecov Report

Merging #372 (5a818c4) into main (13c75de) will decrease coverage by 0.55%.
Report is 7 commits behind head on main.
The diff coverage is n/a.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #372      +/-   ##
==========================================
- Coverage   66.14%   65.59%   -0.55%     
==========================================
  Files          35       35              
  Lines        3843     3843              
==========================================
- Hits         2542     2521      -21     
- Misses       1113     1127      +14     
- Partials      188      195       +7     
Flag Coverage Δ
integration 71.02% <ø> (-1.04%) ⬇️
unit 59.54% <ø> (ø)

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) 37.11% <ø> (ø)
pkg/log (u) 31.81% <ø> (ø)
pkg/reconcilers (u) 33.21% <ø> (ø)
pkg/rlptools (u) 56.46% <ø> (ø)
controllers (i) 71.02% <ø> (-1.04%) ⬇️

see 4 files with indirect coverage changes

@grzpiotrowski grzpiotrowski force-pushed the csv-crd-desc branch 3 times, most recently from e946601 to b99f99e Compare December 11, 2023 18:01
@grzpiotrowski grzpiotrowski marked this pull request as ready for review December 11, 2023 18:02
@grzpiotrowski grzpiotrowski requested a review from a team as a code owner December 11, 2023 18:02
@@ -4,6 +4,78 @@ metadata:
annotations:
alm-examples: |-
[
{
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think these might need to be added in the MGC repo? I think this will get nuked when we do a new bundle as it is pulled in from MGC

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Right, here I just added the sample files manually to the kuadrant-operator/config/samples/kustomization.yaml from where they propagate to the examples in CSV.

Fetching these samples automatically from the MGC repo would make more sense I guess. I need to check how to do that in Kustomize. If not possible than I think the samples would need to be fetched in the make bundle script.

Copy link
Collaborator

Choose a reason for hiding this comment

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

ah I see. Yeah I mean I guess this is ok, but would be better to have them from the source

Copy link
Contributor Author

Choose a reason for hiding this comment

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

hm. Ok, did some experimentation and looks like we could put a kustomization.yaml to have a remote base with the samples in the MGC repo. The samples for TLSPolicy, ManagedZone and DNSPolicy are already there.
And since the DNSHealthCheckProbe and DNSRecord are created by the controller I suppose there is no real need to expose examples for these two in the Operator Hub through the CSV?

The snipped below would go to: multicluster-gateway-controller/config/samples/kustomization.yaml:

resources:
- kuadrant.io_v1alpha1_tlspolicy.yaml
- kuadrant.io_v1alpha1_managedzone.yaml
- dnspolicy.yaml

Then we could have a reference to it as a remote resource for kustomize in kuadrant-operator:

resources:
- github.com/Kuadrant/multicluster-gateway-controller/config/samples?ref=main

This would let us keep the samples in one place and not worry about updating them manually in kuadrant-operator.

Copy link
Collaborator

Choose a reason for hiding this comment

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

sounds like a good option. If you open the PR I will take a look at it

Copy link
Contributor Author

Choose a reason for hiding this comment

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

PR opened. I'll leave the link here as a cross reference: Add config/samples/kustomization.yaml #720

@@ -31,6 +31,31 @@ spec:
kind: RateLimitPolicy
name: ratelimitpolicies.kuadrant.io
version: v1beta2
- description: DNSHealthCheckProbe enables performing health checks against a DNS endpoint (A or CNAME record)
Copy link
Collaborator

Choose a reason for hiding this comment

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

same with these

@@ -0,0 +1,10 @@
apiVersion: kuadrant.io/v1alpha1
Copy link
Collaborator

Choose a reason for hiding this comment

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

looks good

@@ -0,0 +1,15 @@
apiVersion: kuadrant.io/v1alpha1
Copy link
Collaborator

Choose a reason for hiding this comment

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

probably less valuable as really only the dns conrtroller creates these but it looks accurate

Copy link
Collaborator

@maleck13 maleck13 left a comment

Choose a reason for hiding this comment

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

If the changes have been made directly in the CSV I think they will get wiped out via a future generated CSV

@grzpiotrowski
Copy link
Contributor Author

If the changes have been made directly in the CSV I think they will get wiped out via a future generated CSV

The changes were made in the base CSV file and persist when we regenerate the bundle

Copy link
Collaborator

@maleck13 maleck13 left a comment

Choose a reason for hiding this comment

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

ok so generally looks fine to me

@grzpiotrowski
Copy link
Contributor Author

Ok, so I made the changes to have the DNSPolicy, TLSPolicy and ManagedZone samples being pulled from MGC repo via kustomize remote base, instead of having the samples duplicated into kuadrant-operator repo.

This is a screenshot of how it will appear in OperatorHub now:
image

@grzpiotrowski
Copy link
Contributor Author

Bundle test failing now as multicluster-gateway-controller/pull/720 will need to be merged first.

Copy link
Member

@didierofrivia didierofrivia left a comment

Choose a reason for hiding this comment

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

🍔

@grzpiotrowski grzpiotrowski merged commit ec33986 into main Dec 13, 2023
22 checks passed
@eguzki eguzki deleted the csv-crd-desc branch December 13, 2023 20:28
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.

New CRDs names and descriptions missing in Operator Hub
3 participants