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

feat: Expand install msg on artifacthub #306

Merged
merged 2 commits into from
Jul 17, 2023

Conversation

viccuad
Copy link
Member

@viccuad viccuad commented Jul 14, 2023

Description

I find the install modal on artifacthub lacking:

https://artifacthub.io/packages/kubewarden/safe-annotations/safe-annotations?modal=install

This is an attempt to improve it, as I was typing too much on my own.

Test

Additional Information

Tradeoff

Potential improvement

Signed-off-by: Víctor Cuadrado Juan <[email protected]>
@viccuad viccuad self-assigned this Jul 14, 2023
@viccuad viccuad requested a review from a team as a code owner July 14, 2023 15:44
@@ -375,6 +375,10 @@ fn compose_install(oci_url: String) -> String {
```console
kwctl pull {}
```
Then, generate the policy manifest and tune it to your liking. For example:
```console
kwctl scaffold manifest -t ClusterAdmissionPolicy registry://{}
Copy link
Member Author

Choose a reason for hiding this comment

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

Note that here I needed to add registry:// while for kwctl pull one doesn't need to.
Opened kubewarden/kwctl#537. Maybe worth fixing it at the same time as this for simplicity.

@viccuad viccuad force-pushed the install-artifacthub branch from efc5274 to 4f0c357 Compare July 14, 2023 16:35
"#,
oci_url
oci_url, oci_url
Copy link
Member

Choose a reason for hiding this comment

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

I would change the way we build this string to make use of the new string interpolation used by latest versions of rust. I think it would make things more readable:

Do something like

kwctl scaffold manifest -t ClusterAdmissionPolicy registry://{oci_url}

So that we can drop the line referenced by this comment

Copy link
Member Author

Choose a reason for hiding this comment

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

TIL, amended the commit.

@viccuad viccuad force-pushed the install-artifacthub branch from 4f0c357 to efc5274 Compare July 17, 2023 12:58
Copy link
Member

@flavio flavio left a comment

Choose a reason for hiding this comment

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

thanks for the quick change!

Signed-off-by: Víctor Cuadrado Juan <[email protected]>
@viccuad viccuad force-pushed the install-artifacthub branch from 2caac07 to 595d381 Compare July 17, 2023 13:47
@viccuad viccuad merged commit cc27525 into kubewarden:main Jul 17, 2023
@viccuad viccuad deleted the install-artifacthub branch July 17, 2023 13:53
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.

3 participants