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 also as an OCI package #4630

Open
BWagenerGenerali opened this issue Jul 23, 2024 · 2 comments · May be fixed by #4894
Open

Publish helm charts also as an OCI package #4630

BWagenerGenerali opened this issue Jul 23, 2024 · 2 comments · May be fixed by #4894
Labels
kind/feature Categorizes issue or PR as related to a new feature.

Comments

@BWagenerGenerali
Copy link

Copied from aws/eks-charts#1070

The helm charts are published using the classic approach with a static webserver and an index.yaml:

However in helm 3.8+ the OCI method went GA:

https://blog.bitnami.com/2023/04/httpsblog.bitnami.com202304bitnami-helm-charts-now-oci.html?m=1
https://helm.sh/docs/topics/registries/
https://github.com/helm/helm/releases/tag/v3.8.0

I see two options to use as an OCI mirror:

If you would fully rely on native Github actions to produce these artifacts, the change would be super simple

  - name: Run chart-releaser
    uses: helm/[email protected]
    env:
      CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
      CR_GENERATE_RELEASE_NOTES: true

    # ================
    # below this line is relevant for OCI publishing
    # ================

  - name: Login to GitHub Container Registry
    uses: docker/login-action@v3
    with:
      registry: ghcr.io
      username: ${{ github.actor }}
      password: ${{ secrets.GITHUB_TOKEN }}

  - name: Push charts to GHCR
    run: |
      shopt -s nullglob
      for pkg in .cr-release-packages/*; do
        if [ -z "${pkg:-}" ]; then
          break
        fi
        helm push "${pkg}" "oci://ghcr.io/${GITHUB_REPOSITORY_OWNER}/charts"
      done

Source: https://github.com/prometheus-community/helm-charts/blob/4bbd07f308884d44d0edff23ee60da967dc2cd23/.github/workflows/release.yaml#L39C1-L61C15
Also a lot of other CNCF projects are using this approach.

@BWagenerGenerali BWagenerGenerali added the kind/feature Categorizes issue or PR as related to a new feature. label Jul 23, 2024
@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue as fresh with /remove-lifecycle stale
  • Close this issue with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Oct 21, 2024
@BWagenerGenerali
Copy link
Author

/remove-lifecycle stale

@k8s-ci-robot k8s-ci-robot removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Oct 22, 2024
@M0NsTeRRR M0NsTeRRR linked a pull request Nov 22, 2024 that will close this issue
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Categorizes issue or PR as related to a new feature.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants