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

Publish helm charts to artifact registry #790

Open
ahg-g opened this issue Feb 21, 2025 · 18 comments
Open

Publish helm charts to artifact registry #790

ahg-g opened this issue Feb 21, 2025 · 18 comments
Assignees

Comments

@ahg-g
Copy link
Contributor

ahg-g commented Feb 21, 2025

We can do this to the staging artifact registry we have for jobset similar to Kueue:

See the makefile rule here: https://github.com/kubernetes-sigs/kueue/blob/main/Makefile#L215; and then we add it to the cloudbuild.yaml file like https://github.com/kubernetes-sigs/kueue/blob/main/cloudbuild.yaml#L13

@ahg-g ahg-g mentioned this issue Feb 21, 2025
3 tasks
@tenzen-y
Copy link
Member

Just FYI: If we do not promote the Chart similar to container images, the Chart will be removed in 90 days. Additionally, the Chart promotion way is different from container image promotion (see: more detail kubernetes-sigs/kueue#4143)

@ahg-g
Copy link
Contributor Author

ahg-g commented Feb 22, 2025

Can we follow the same promotion process as Kueue and publish to https://github.com/kubernetes/k8s.io/tree/main/registry.k8s.io/images/charts ?

btw, why is that path not qualified with a subproject name?

@tenzen-y
Copy link
Member

Can we follow the same promotion process as Kueue and publish to https://github.com/kubernetes/k8s.io/tree/main/registry.k8s.io/images/charts ?

I think so too.

btw, why is that path not qualified with a subproject name?

As we discussed in https://docs.google.com/document/d/1xa2me_O0N5sHMD_np9ztr2O9GL3uX1yKBgDcApDqV_8/edit?usp=sharing&resourcekey=0-JHI0r4CeitKdIEJII7c8eg, we evaluate some solutions with sig k8s-infra.
In conclusion, we follow the recommendation from sig- k8s-infra folks to provide full compatibility of Helm specifications (mostly image path specification like charts/$(PROJECT) instead of $(PROJECT)/charts).

@kannon92
Copy link
Contributor

/assign

i started this work #792

@ChenYi015
Copy link
Contributor

What about using the netlify doc website to host the Helm chart repo index file? We can add a GitHub action workflow to do that, once a new release is published, a helm-chart-releaser workflow will be triggered to update the Helm repo index file which will be placed at site/content/en/charts/index.yaml, then users can install the Helm chart as follows:

# Add Helm repo
helm repo add jobset https://jobset.sigs.k8s.io/charts

# Update Helm repo index
helm repo update jobset

# Search Helm repo for stable release versions of jobset
helm search repo jobset
# NAME                    CHART VERSION   APP VERSION             DESCRIPTION
# jobset/jobset           0.8.0                                   A Helm chart for deploying jobset on Kubernetes.

# Install the latest released version of jobset
helm install jobset jobset/jobset \
    --namespace jobset-system \
    --create-namespace

# Or, install jobset with the specified version
helm install jobset jobset/jobset \
    --version 0.8.0 \
    --namespace jobset-system \
    --create-namespace

@andreyvelich
Copy link
Member

@ChenYi015 Does it require to host netlify doc website as part of every repo where we want to publish Helm Charts ?
If possible, I would like us to design solution that can work even if we don't host website in the repo.
What do we do for Spark Operator since docs are located in the kubeflow.org ?
https://github.com/kubeflow/spark-operator/tree/gh-pages

@ChenYi015
Copy link
Contributor

Does it require to host netlify doc website as part of every repo where we want to publish Helm Charts ?

We can also use GitHub pages to host the Helm repo index file. Spark operator publish helm charts in this way, see https://github.com/kubeflow/spark-operator/blob/gh-pages/index.yaml. Another example is prometheus-operator, the Prometheus community creates a dedicated repo prometheus-community/helm-charts and use GitHub pages to host the Helm chart index file, see https://github.com/prometheus-community/helm-charts/blob/gh-pages/index.yaml.

@andreyvelich
Copy link
Member

I actually, like how Prometheus handle it.
Do you know if Argo does the same way https://github.com/argoproj/argo-helm/tree/gh-pages ?
Or they also publish them to ghcr.io/argoproj/argo-helm ?

@tenzen-y
Copy link
Member

ArtifactRegistry hosting has different objectives. The goal is to support Helm OCI features like helm install jobset oci://registry.k8s.io/charts/jobset --version 0.8.0. This is just one command, there is no needed helm repo add and helm repo update.

This way provides more CI/CD automated deploy mechanism compatibility. Actually, the requested users use FluxCD.

@tenzen-y
Copy link
Member

tenzen-y commented Feb 24, 2025

If JobSet does not aim to support the Helm OCI feature, we can take any approach, including GH pages, although we need to build another publishing mechanism for GH pages, which means we need to maintain GH actions.

@tenzen-y
Copy link
Member

Note that I do not have any preference here. All things are just comments.

@kannon92
Copy link
Contributor

I want consistency with Kueue, JobSet and LWS. So I lean with going with @tenzen-y 's suggestion.

@ChenYi015
Copy link
Contributor

Do you know if Argo does the same way https://github.com/argoproj/argo-helm/tree/gh-pages ?
Or they also publish them to ghcr.io/argoproj/argo-helm ?

Yes, it would be better if we can also publish Helm charts in both two ways, just like Prometheus, Argo and Spark Operator has did.

Just FYI, we have already setup an workflow in Spark operator to publish Helm charts both to the release artifacts (use GH pages to host index file) and GHCR, see https://github.com/kubeflow/spark-operator/blob/79264a4ac559cd6373b43bb54365d566b2537acb/.github/workflows/release-helm-charts.yaml#L50-L84.

@kannon92
Copy link
Contributor

I was going to follow @tenzen-y work with Kueue for this release. We can iterate on this but i'd like to get a release out and this seems to be the solution we have at the moment.

@ahg-g
Copy link
Contributor Author

ahg-g commented Feb 26, 2025

where do we have the charts published now? I don't see them under https://pantheon.corp.google.com/artifacts/docker/k8s-staging-images/us-central1/jobset yet, I thought they will be created on each commit just like the controller image

@kannon92
Copy link
Contributor

I can't view that link.

@kannon92
Copy link
Contributor

@ahg-g
Copy link
Contributor Author

ahg-g commented Feb 26, 2025

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

No branches or pull requests

5 participants