dragonflydb / dragonfly-operator

A Kubernetes operator to install and manage Dragonfly instances.
https://www.dragonflydb.io/docs/managing-dragonfly/operator/installation
Apache License 2.0
146 stars 34 forks source link

Helm chart installation issue #236

Closed jurim76 closed 1 month ago

jurim76 commented 3 months ago

Please clarify in documentation installation process via helm chart Current instructions doesn't work for me

What's the reason to use docker pull for helm chart?

docker pull ghcr.io/dragonflydb/dragonfly-operator/helm/dragonfly-operator:v1.1.7
v1.1.7: Pulling from dragonflydb/dragonfly-operator/helm/dragonfly-operator
unsupported media type application/vnd.cncf.helm.config.v1+json

Helm chart installation doesn't work via helm pull According to https://github.com/dragonflydb/dragonfly-operator/releases/tag/v1.1.7

Docker image: docker.dragonflydb.io/dragonflydb/operator:v1.1.7
Helm chart: oci://ghcr.io/dragonflydb/dragonfly-operator/helm:v1.1.7

Docker image URL is different ghcr.io/dragonflydb/dragonfly-operator/helm/dragonfly-operator:v1.1.7 vs docker.dragonflydb.io/dragonflydb/operator:v1.1.7

OCI image looks strange helm:v1.1.7 and doesn't available via helm pull

helm pull oci://ghcr.io/dragonflydb/dragonfly-operator/helm:v1.1.7
Error: GET "https://ghcr.io/v2/dragonflydb/dragonfly-operator/helm/tags/list": GET "https://ghcr.io/token?scope=repository%3Adragonflydb%2Fdragonfly-operator%2Fhelm%3Apull&service=ghcr.io": unexpected status code 403: denied: requested access to the resource is denied
tmsdce commented 1 month ago

Hi @jurim76

You need to use the following command to pull the Helm chart stored in OCI format

helm pull oci://ghcr.io/dragonflydb/dragonfly-operator/helm/dragonfly-operator --version v1.1.7
supertylerc commented 1 month ago

@tmsdce that works for a helm pull, but does not work for Chart dependencies. Given this Chart.yaml:

---
apiVersion: v2
name: example-chart
version: 0.0.1
description: Example chart with Dragonfly Operator chart as a dependencies
home: https://github.com
appVersion: "1.0.0"
dependencies:
  - name: dragonfly-operator
    version: "v1.1.7"
    repository: oci://ghcr.io/dragonflydb/dragonfly-operator/helm/dragonfly-operator
    condition: dragonfly-operator.enabled

The follow is raised from a helm dependency build:

❯ helm dependency build
Hang tight while we grab the latest from your chart repositories...
Update Complete. ⎈Happy Helming!⎈
Saving 1 chart
Downloading dragonfly-operator from repo oci://ghcr.io/dragonflydb/dragonfly-operator/helm/dragonfly-operator
Save error occurred:  could not download oci://ghcr.io/dragonflydb/dragonfly-operator/helm/dragonfly-operator/dragonfly-operator: failed to authorize: failed to fetch anonymous token: unexpected status from GET request to https://ghcr.io/token?scope=repository%3Adragonflydb%2Fdragonfly-operator%2Fhelm%2Fdragonfly-operator%2Fdragonfly-operator%3Apull&service=ghcr.io: 403 Forbidden
Error: could not download oci://ghcr.io/dragonflydb/dragonfly-operator/helm/dragonfly-operator/dragonfly-operator: failed to authorize: failed to fetch anonymous token: unexpected status from GET request to https://ghcr.io/token?scope=repository%3Adragonflydb%2Fdragonfly-operator%2Fhelm%2Fdragonfly-operator%2Fdragonfly-operator%3Apull&service=ghcr.io: 403 Forbidden
Pothulapati commented 1 month ago

@supertylerc I don't think its an issue from our side and looks more like a helm configuration issue.

Looking at the logs, it seems to pull the chart oci://ghcr.io/dragonflydb/dragonfly-operator/helm/dragonfly-operator/dragonfly-operator but there is an extra dragonfly-operator? maybe remove it from the repository suffix and try? 🤔

tmsdce commented 1 month ago

Hi @supertylerc

As @Pothulapati suggested, you need to use the repo name when using the chart as a dependency (i.e. removing the extra dragonfly-operator in the URL). When using helm pull you need the full path.