Publish Helm chart on ArtifactHub #11

Open
opened 2023-09-15 19:23:22 +00:00 by djjudas21 · 21 comments

Please would you consider publishing this Helm chart on ArtifactHub? For me, the use case is that I use a tool called Fairwinds Nova to find outdated Helm deployments in my cluster. It uses ArtifactHub to discover the latest versions of Helm charts.

Setting up the integration with ArtifactHub is easy: https://www.devopsschool.com/blog/helm-tutorial-how-to-publish-chart-at-artifacthub/

Thanks! 😄

Please would you consider publishing this Helm chart on [ArtifactHub](https://artifacthub.io/)? For me, the use case is that I use a tool called [Fairwinds Nova](https://github.com/FairwindsOps/nova) to find outdated Helm deployments in my cluster. It uses ArtifactHub to discover the latest versions of Helm charts. Setting up the integration with ArtifactHub is easy: https://www.devopsschool.com/blog/helm-tutorial-how-to-publish-chart-at-artifacthub/ Thanks! 😄
Member

@konrad WDYT?

P.S. We somewhy have not finished that last time

@konrad WDYT? P.S. We somewhy have not finished that last time
Owner

I think that's a good idea.

@vlasov-y Do you remember what held us up last time?

I think that's a good idea. @vlasov-y Do you remember what held us up last time?
Author

Hey, any progress on this one? 😄

Hey, any progress on this one? 😄
Contributor

@konrad would you be interested in trying again? We could talk about it over email if you would prefer as well, as it might require some back and forth for configuration.

It looks like the majority of the documentation around getting it listed is here.

Opened #18 for it.

@konrad would you be interested in trying again? We could talk about it over email if you would prefer as well, as it might require some back and forth for configuration. It looks like the majority of the documentation around getting it listed is [here](https://artifacthub.io/docs/topics/repositories/helm-charts/). Opened #18 for it.
Contributor

There is an extra metadata file that you can add at the repository URL’s path named artifacthub-repo.yml, which can be used to setup features like Verified publisher or Ownership claim. Please note that the artifacthub-repo.yml metadata file must be located at the same level of the chart repository index.yaml file, and it must be served from the chart repository HTTP server as well.

I wonder if this is a deal breaker since the Chart is hosted on Gitea...not sure if it's possible to also serve that metadata file?

Of course, this is only required if you want the Verified publisher or Ownership claim...

> There is an extra metadata file that you can add at the repository URL’s path named artifacthub-repo.yml, which can be used to setup features like Verified publisher or Ownership claim. Please note that the artifacthub-repo.yml metadata file must be located at the same level of the chart repository index.yaml file, and it must be served from the chart repository HTTP server as well. I wonder if this is a deal breaker since the Chart is hosted on Gitea...not sure if it's possible to also serve that metadata file? Of course, this is only required if you want the `Verified publisher` or `Ownership claim`...
Author

You can put the metadata file in the root of the git repo, as I have done for my own chart repo: https://github.com/djjudas21/charts/blob/main/artifacthub-repo.yml

You can put the metadata file in the root of the git repo, as I have done for my own chart repo: https://github.com/djjudas21/charts/blob/main/artifacthub-repo.yml
Owner

I've created the repo on ArtifactHub and merged #18 with the id, let's see if ArtifactHub picks it up.

I've created the repo on ArtifactHub and merged #18 with the id, let's see if ArtifactHub picks it up.
Owner

Looks like ArtifactHub picked it up: https://artifacthub.io/packages/helm/vikunja/vikunja/0.4.1

It's not verified though

Looks like ArtifactHub picked it up: https://artifacthub.io/packages/helm/vikunja/vikunja/0.4.1 It's not verified though
Contributor

Woohoo! Yeah, I tried looking at Gitea's own: https://artifacthub.io/packages/helm/gitea/gitea

It looks like even they aren't "verified" though. They appear to be using Caddy as well - but still they haven't added that metadata to Gitea's Helm repository...

I think being not "verified" is still okay, I'm sure the cream will rise to the top ;) thanks for doing that @konrad, it looks great!

Woohoo! Yeah, I tried looking at Gitea's own: https://artifacthub.io/packages/helm/gitea/gitea It looks like even they aren't "verified" though. They appear to be using Caddy as well - but still they haven't added that metadata to Gitea's Helm repository... I think being not "verified" is still okay, I'm sure the cream will rise to the top ;) thanks for doing that @konrad, it looks great!
Contributor

You can put the metadata file in the root of the git repo, as I have done for my own chart repo: https://github.com/djjudas21/charts/blob/main/artifacthub-repo.yml

Understood @djjudas21, but you're serving the files from GitHub, we're serving the chart from Gitea currently.

> You can put the metadata file in the root of the git repo, as I have done for my own chart repo: https://github.com/djjudas21/charts/blob/main/artifacthub-repo.yml Understood @djjudas21, but you're serving the files from GitHub, we're serving the chart from Gitea currently.
Author

Doesn’t gitea just serve the files in the repo as a web server? That’s all GitHub is doing via GitHub Pages. No fancy tricks etc 🙂

Doesn’t gitea just serve the files in the repo as a web server? That’s all GitHub is doing via GitHub Pages. No fancy tricks etc 🙂
Owner

Well i tried it and it does not work. As far as I understand it, there's all kinds of metadata associated with the helm repo that's being served in a special package.

I wasn't able to figure out where exactly they expect the artifacthub file, did you?

Well i tried it and it does not work. As far as I understand it, there's all kinds of metadata associated with the helm repo that's being served in a special package. I wasn't able to figure out where exactly they expect the artifacthub file, did you?
Owner

Woohoo! Yeah, I tried looking at Gitea's own: https://artifacthub.io/packages/helm/gitea/gitea

It looks like even they aren't "verified" though. They appear to be using Caddy as well - but still they haven't added that metadata to Gitea's Helm repository...

I think being not "verified" is still okay, I'm sure the cream will rise to the top ;) thanks for doing that @konrad, it looks great!

Looks like forjo has theirs verified: https://codeberg.org/forgejo-contrib/-/packages/container/forgejo/0.14.0

> Woohoo! Yeah, I tried looking at Gitea's own: https://artifacthub.io/packages/helm/gitea/gitea > > It looks like even they aren't "verified" though. They appear to be using Caddy as well - but still they haven't added that metadata to Gitea's Helm repository... > > I think being not "verified" is still okay, I'm sure the cream will rise to the top ;) thanks for doing that @konrad, it looks great! Looks like forjo has theirs verified: https://codeberg.org/forgejo-contrib/-/packages/container/forgejo/0.14.0
Contributor

Ah, they're serving it over OCI:
image

Which I guess requires the following:
image

Ah, they're serving it over OCI: ![image](/attachments/1fe977e7-f25e-4db1-9a53-3ff3600a5fee) Which I guess requires the [following](https://artifacthub.io/docs/topics/repositories/helm-charts/): ![image](/attachments/8849a8fc-dbc1-4a9a-b240-3e6fafcc116d)
Owner

I've published it as oci image and set the url to that on artifacthub. Pulled the helm chart's tgz and it seems to contain the artifacthub-repo.yml file. But it still does not show up as verified on artifacthub 🤔

I've published it as oci image and set the url to that on artifacthub. Pulled the helm chart's `tgz` and it seems to contain the `artifacthub-repo.yml` file. But it still does not show up as verified on artifacthub 🤔
Owner

@djjudas21 Your charts don't seem to show up as verified on artifacthub either?

@djjudas21 Your charts don't seem to show up as verified on artifacthub either?
Contributor

Well it look like Gitea's registry is OCI compatible:

[root on DESKTOP-BBIJ559] ~
 » oras manifest fetch kolaente.dev/vikunja/vikunja:0.4.1 | jq
{
  "schemaVersion": 2,
  "config": {
    "mediaType": "application/vnd.cncf.helm.config.v1+json",
    "digest": "sha256:099e32e101368b119a1463beac494f4d2322ec59571436e0c1a5f92e308e32ed",
    "size": 1203
  },
  "layers": [
    {
      "mediaType": "application/vnd.cncf.helm.chart.content.v1.tar+gzip",
      "digest": "sha256:93b5b8363a62c2b7c90eef5eb90eee98c71b78f2632132ebf3248d4afcaa908b",
      "size": 225844
    }
  ],
  "annotations": {
    "category": "TaskTracker",
    "org.opencontainers.image.authors": "Vikunja, Yurii Vlasov (yuriy@vlasov.pro)",
    "org.opencontainers.image.created": "2023-11-21T15:31:30Z",
    "org.opencontainers.image.description": "The open-source, self-hostable to-do app. Organize everything, on all platforms. Also one of the two wild South American camelids which live in the high alpine areas of the Andes and a relative of the llama.",
    "org.opencontainers.image.source": "https://kolaente.dev/vikunja/helm-chart",
    "org.opencontainers.image.title": "vikunja",
    "org.opencontainers.image.url": "https://kolaente.dev/vikunja/helm-chart",
    "org.opencontainers.image.version": "0.4.1"
  }
}

So you might just need to run the following command in the same folder as the artifacthub-repo.yml in order to be
"verified" (command taken from the screenshot of the ArtifactHub docs above):

oras push \
  kolaente.dev/vikunja/vikunja:artifacthub.io \
  --config /dev/null:application/vnd.cncf.artifacthub.config.v1+yaml \
  artifacthub-repo.yml:application/vnd.cncf.artifacthub.repository-metadata.layer.v1.yaml

oras might require authentication, so you might need to do something like:

oras login -u username -p password kolaente.dev

and then the above oras push command after authenticating to Gitea's registry...maybe it will then work?

Well it look like Gitea's registry is OCI compatible: ```bash [root on DESKTOP-BBIJ559] ~ » oras manifest fetch kolaente.dev/vikunja/vikunja:0.4.1 | jq { "schemaVersion": 2, "config": { "mediaType": "application/vnd.cncf.helm.config.v1+json", "digest": "sha256:099e32e101368b119a1463beac494f4d2322ec59571436e0c1a5f92e308e32ed", "size": 1203 }, "layers": [ { "mediaType": "application/vnd.cncf.helm.chart.content.v1.tar+gzip", "digest": "sha256:93b5b8363a62c2b7c90eef5eb90eee98c71b78f2632132ebf3248d4afcaa908b", "size": 225844 } ], "annotations": { "category": "TaskTracker", "org.opencontainers.image.authors": "Vikunja, Yurii Vlasov (yuriy@vlasov.pro)", "org.opencontainers.image.created": "2023-11-21T15:31:30Z", "org.opencontainers.image.description": "The open-source, self-hostable to-do app. Organize everything, on all platforms. Also one of the two wild South American camelids which live in the high alpine areas of the Andes and a relative of the llama.", "org.opencontainers.image.source": "https://kolaente.dev/vikunja/helm-chart", "org.opencontainers.image.title": "vikunja", "org.opencontainers.image.url": "https://kolaente.dev/vikunja/helm-chart", "org.opencontainers.image.version": "0.4.1" } } ``` So you might just need to run the following command in the same folder as the `artifacthub-repo.yml` in order to be "verified" (command taken from the screenshot of the ArtifactHub docs above): ```bash oras push \ kolaente.dev/vikunja/vikunja:artifacthub.io \ --config /dev/null:application/vnd.cncf.artifacthub.config.v1+yaml \ artifacthub-repo.yml:application/vnd.cncf.artifacthub.repository-metadata.layer.v1.yaml ``` `oras` might require authentication, so you might need to do something like: ``` oras login -u username -p password kolaente.dev ``` and then the above `oras push` command after authenticating to Gitea's registry...maybe it will then work?
Owner

I tried using oras before but couldn't get the login to work. Looks like it won't do with an account with 2fa enabled. Used the bot account and now it almost worked:

$ oras push \
  kolaente.dev/vikunja/vikunja:artifacthub.io \
  --config /dev/null:application/vnd.cncf.artifacthub.config.v1+yaml \
  artifacthub-repo.yml:application/vnd.cncf.artifacthub.repository-metadata.layer.v1.yaml
Uploading 256cbe0962c2 artifacthub-repo.yml
Uploaded  256cbe0962c2 artifacthub-repo.yml
Error: PUT "https://kolaente.dev/v2/vikunja/vikunja/manifests/artifacthub.io": response status code 500: Internal Server Error

Looks like there is a Gitea issue for it already: https://github.com/go-gitea/gitea/issues/25846

I tried using `oras` before but couldn't get the login to work. Looks like it won't do with an account with 2fa enabled. Used the bot account and now it almost worked: ``` $ oras push \ kolaente.dev/vikunja/vikunja:artifacthub.io \ --config /dev/null:application/vnd.cncf.artifacthub.config.v1+yaml \ artifacthub-repo.yml:application/vnd.cncf.artifacthub.repository-metadata.layer.v1.yaml Uploading 256cbe0962c2 artifacthub-repo.yml Uploaded 256cbe0962c2 artifacthub-repo.yml Error: PUT "https://kolaente.dev/v2/vikunja/vikunja/manifests/artifacthub.io": response status code 500: Internal Server Error ``` Looks like there is a Gitea issue for it already: https://github.com/go-gitea/gitea/issues/25846
Author

@djjudas21 Your charts don't seem to show up as verified on artifacthub either?

Thanks for spotting. I noticed my artifacthub-repo.yml was only in the main branch and not the gh-pages branch that is the basis for the repo hosting. Fixed now. Should get picked up by ArtifactHub next time the repo index is changed. Still, enough about my GitHub 🙂

> @djjudas21 Your charts don't seem to show up as verified on artifacthub either? Thanks for spotting. I noticed my `artifacthub-repo.yml` was only in the `main` branch and not the `gh-pages` branch that is the basis for the repo hosting. Fixed now. Should get picked up by ArtifactHub next time the repo index is changed. Still, enough about my GitHub 🙂
Contributor

Well I would say that even getting the chart on ArtifactHub is a huge win.

If you try to use a Gitea API token (perhaps with admin permissions) in place of a password when using oras, perhaps it will cooperate? If not, it might be worthwhile to watch Gitea logs when the command is executed. Thanks for all your help @konrad!

edit: just looked at the Gitea issue, yeah perhaps an API token with elevated permissions will resolve the issue...

Well I would say that even getting the chart on ArtifactHub is a huge win. If you try to use a Gitea API token (perhaps with admin permissions) in place of a password when using `oras`, perhaps it will cooperate? If not, it might be worthwhile to watch Gitea logs when the command is executed. Thanks for all your help @konrad! edit: just looked at the Gitea issue, yeah perhaps an API token with elevated permissions will resolve the issue...
Owner

Oh I pushed with the bot account (which has permissions to do that) but it looks like Gitea does not know how to handle the push of the extra file.

Oh I pushed with the bot account (which has permissions to do that) but it looks like Gitea does not know how to handle the push of the extra file.
Sign in to join this conversation.
No Milestone
No project
No Assignees
4 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: vikunja/helm-chart#11
No description provided.