grafana / k6-operator

An operator for running distributed k6 tests.
Apache License 2.0
578 stars 158 forks source link

Helm Chart Install with hashicorp/helm_release provider can't find k6-operator chart #377

Closed jsclifford closed 7 months ago

jsclifford commented 7 months ago

Brief summary

I am trying to install the k6-operator helm chart with terraform hashicorp/helm_release provider. I have tried to reference the repository via OCI/https and the provider cannot find the chart. Please provide the url and chart to put in the helm_release resource.

k6-operator version or image

0.0.13

Helm chart version (if applicable)

3.5.0

TestRun / PrivateLoadZone YAML

NA

Other environment details (if applicable)

No response

Steps to reproduce the problem

Create a terraform resource below.

resource "helm_release" "k6_operator" {
  name             = "k6-operator"
  repository       = "https://grafana.github.io/helm-charts"
  chart            = "grafana/k6-operator"
  namespace        = "k6-operator-system"
  version          = "3.5.0" # var.operator_versions.chart_version
  create_namespace = false
  cleanup_on_fail  = true
  recreate_pods    = true
  wait             = true
}

Expected behaviour

The provider can download the helm chart and install it.

Actual behaviour

Getting error when installing helm chart.

module.k6-operator.helm_release.k6_operator: Creating...
╷
│ Error: could not download chart: chart "grafana/k6-operator" version "3.5.0" not found in https://grafana.github.io/helm-charts repository
│
│   with module.k6-operator.helm_release.k6_operator,
│   on ..\modules\k6-operator\k6-operator.tf line 1, in resource "helm_release" "k6_operator":
│    1: resource "helm_release" "k6_operator" {
│
╵
yorugac commented 7 months ago

Hi @jsclifford, thanks for reporting the issue. AFAIS, helm-charts does not support OCI at the moment: https://github.com/grafana/helm-charts/issues/2481

To be clear, k6-operator doesn't publish the chart on its own -- it happens via that repo. Please feel free to update there with your use case.

Without OCI, other ways to specify the chart in Terraform should work, e.g.:

provider "helm" {
  kubernetes {
    config_path = "~/.kube/config"
  }
}

resource "helm_release" "k6_operator" {
  name  = "k6-operator"
  chart = "https://github.com/grafana/helm-charts/releases/download/helm-k6-operator-3.5.0/k6-operator-3.5.0.tgz"
}
jsclifford commented 7 months ago

Ok thanks. I tried the direct download to the release and it worked. I will request OCI support in the other repo.