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

ci: publish helm chart to ghcr #3319

Merged
merged 1 commit into from
Dec 23, 2023
Merged

Conversation

davidspek
Copy link
Contributor

@davidspek davidspek commented Dec 19, 2023

What this PR does / why we need it:
This PR extends the CI to push the helm charts to GHCR so that users can easily install KServe using them.
Examples of the charts published from this PR can be seen here:
https://github.com/davidspek/kserve/pkgs/container/charts%2Fkserve
https://github.com/davidspek/kserve/pkgs/container/charts%2Fkserve-crd

Checklist:

  • Have you added unit/e2e tests that prove your fix is effective or that this feature works?
  • Has code been commented, particularly in hard-to-understand areas?
  • Have you made corresponding changes to the documentation?

Release note:

ci: publish helm charts to GHCR

Signed-off-by: David van der Spek <vanderspek.david@gmail.com>
@yuzisun
Copy link
Member

yuzisun commented Dec 23, 2023

/lgtm
/approve

Copy link

oss-prow-bot bot commented Dec 23, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: davidspek, yuzisun

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@yuzisun yuzisun merged commit aa281b7 into kserve:master Dec 23, 2023
43 checks passed
@gawsoftpl
Copy link
Contributor

gawsoftpl commented Dec 24, 2023

I have created new issue: #3331

@davidspek Hi I have trouble with install helm chart with oci registry

I received error 403

I have created token with public repo read only

echo $GHCR_PAT | helm registry login ghcr.io -u <username> --password-stdin

When execute helm install I received error 403. Charts for kserve required special privilege scope?

helm install --debug kserve-crd oci://ghcr.io/kserve/charts/kserve-crd --version 0.11.2
install.go:194: [debug] Original chart version: "0.11.2"
DEBU[0000] resolving                                     host=ghcr.io
DEBU[0000] do request                                    host=ghcr.io request.header.accept="application/vnd.docker.distribution.manifest.v2+json, application/vnd.docker.distribution.manifest.list.v2+json, application/vnd.oci.image.manifest.v1+json, application/vnd.oci.image.index.v1+json, */*" request.header.user-agent=Helm/3.11.1 request.method=HEAD url="https://ghcr.io/v2/kserve/charts/kserve-crd/manifests/0.11.2"
DEBU[0000] fetch response received                       host=ghcr.io response.header.content-length=73 response.header.content-type=application/json response.header.date="Sun, 24 Dec 2023 22:38:16 GMT" response.header.www-authenticate="Bearer realm=\"https://ghcr.io/token\",service=\"ghcr.io\",scope=\"repository:kserve/charts/kserve-crd:pull\"" response.header.x-github-request-id="AB80:3B3095:175D1DA:17FBFE1:6588B2D8" response.status="401 Unauthorized" url="https://ghcr.io/v2/kserve/charts/kserve-crd/manifests/0.11.2"
DEBU[0000] Unauthorized                                  header="Bearer realm=\"https://ghcr.io/token\",service=\"ghcr.io\",scope=\"repository:kserve/charts/kserve-crd:pull\"" host=ghcr.io
DEBU[0000] do request                                    host=ghcr.io request.header.accept="application/vnd.docker.distribution.manifest.v2+json, application/vnd.docker.distribution.manifest.list.v2+json, application/vnd.oci.image.manifest.v1+json, application/vnd.oci.image.index.v1+json, */*" request.header.user-agent=Helm/3.11.1 request.method=HEAD url="https://ghcr.io/v2/kserve/charts/kserve-crd/manifests/0.11.2"
DEBU[0001] fetch response received                       host=ghcr.io response.header.content-length=86 response.header.content-type=application/json response.header.date="Sun, 24 Dec 2023 22:38:17 GMT" response.header.docker-distribution-api-version=registry/2.0 response.header.x-github-request-id="AB80:3B3095:175D247:17FC052:6588B2D9" response.status="403 Forbidden" url="https://ghcr.io/v2/kserve/charts/kserve-crd/manifests/0.11.2"
Error: INSTALLATION FAILED: pulling from host ghcr.io failed with status code [manifests 0.11.2]: 403 Forbidden
helm.go:84: [debug] pulling from host ghcr.io failed with status code [manifests 0.11.2]: 403 Forbidden
INSTALLATION FAILED
main.newInstallCmd.func2
	helm.sh/helm/v3/cmd/helm/install.go:141
github.com/spf13/cobra.(*Command).execute
	github.com/spf13/cobra@v1.6.1/command.go:916
github.com/spf13/cobra.(*Command).ExecuteC
	github.com/spf13/cobra@v1.6.1/command.go:1044
github.com/spf13/cobra.(*Command).Execute
	github.com/spf13/cobra@v1.6.1/command.go:968
main.main
	helm.sh/helm/v3/cmd/helm/helm.go:83
runtime.main
	runtime/proc.go:250
runtime.goexit
	runtime/asm_amd64.s:1571

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants