Terraform-provider-helm: Timeout not taken into account in helm_release resource

Created on 8 Apr 2020  路  6Comments  路  Source: hashicorp/terraform-provider-helm

So, I'm trying to create an Elasticsearch cluster using the ECK operator. I'm able to install the operator properly (without helm). I created a local chart to help me create the elasticsearch cluster. When I apply it using terraform, it fails because of a 30 seconds timeout. It's expected because the ECK documentation states :

kubectl --request-timeout=1m apply -f elasticsearch.yaml

But it's seems impossible to reproduce such timeout configuration using the Helm provider 馃槩

Terraform Version and Provider Version

Terraform v0.12.23

Provider Version

1.1

Affected Resource(s)

  • helm_release

Terraform Configuration Files

provider "helm" {
  version = "~> v1.1"
  debug   = true

  kubernetes {
    load_config_file       = false
    host                   = "https://${var.k8s_cluster_endpoint}"
    token                  = data.google_client_config.default.access_token
    cluster_ca_certificate = var.k8s_cluster_ca_cert
  }
}

resource "helm_release" "elasticsearch" {
  name      = "elasticsearch"
  chart     = "./elasticsearch"
  namespace = "elasticsearch"
  timeout   = 600000
  wait      = true
}

Debug Output

https://gist.github.com/jeromepin/8389eeaa21e9ed516a5e773fba54adfc

Expected Behavior

timeout should be taken into account OR another parameter should be created like --request-timeout

The length of time to wait before giving up on a single server request. Non-zero values should contain a corresponding time unit (e.g. 1s, 2m, 3h). A value of zero means don't timeout requests.

Actual Behavior

The client times out at 30 seconds.

Steps to Reproduce

  1. terraform apply

Important Factoids

Running in GKE but I don't think it's relevant here.

acknowledged bug needs-investigation

Most helpful comment

have the same issue in aks with timeout not taken into account (Terraform v0.12.24 and helm provider 1.2.0)

All 6 comments

have the same issue in aks with timeout not taken into account (Terraform v0.12.24 and helm provider 1.2.0)

I have the same issue with Terraform v0.12.26 and Helm provider v1.2.2
It doesn't even take the default of 300 seconds, it timeouts at 30 seconds.
For me at least seems to be an intermittent problem.
Also using GKE

Update: I found the app I was deploying with Helm was getting a timeout from a remote gateway. After I fix the remote gateway issues the Helm provided is working as expected. However, I do still believe the provider should honor the defined timeout setting regardless if it's getting a timeout elsewhere.

I also had this issue too.

wait = true
timeout = 300

is not obeyed

Having the same issue using the latest helm provider with TF13.

I have added 2 tests and i can't reproduce the error.
Can you give us the pod describes file when the helm ends?

@sebglon - here's where I bumped into this problem. My initial thought was that this was because they had an extensive _tests.tpl or similar which was waiting for all the resources to be happy but that's not the case. Fire up a GKE cluster, grab your kubeconfig, and do something like this...

provider "helm" {
  kubernetes {
    config_path = "./${path.module}/kubeconfig.yaml"
    load_config_file = true
  }
}

resource "helm_release" "cilium" {
  name             = "cilium"
  chart            = "https://github.com/cilium/charts/raw/master/cilium-1.8.5.tgz"
  namespace        = "cilium"
  create_namespace = true
  # None of these seem to work?
  # wait    = false
  # timeout = 3600
  #
  # This resource doesn't support this. If it times out, run the pipeline again.
  #timeouts {
  #  create = "60m"
  #  delete = "60m"
  #}

  set {
    name  = "global.hubble.metrics.enabled"
    value = "{dns,drop,tcp,flow,port-distribution,icmp,http}"
  }

  set {
    name  = "global.hubble.enabled"
    value = "true"
  }

  set {
    name  = "nodeinit.restartPods"
    value = "true"
  }

  set {
    name  = "global.nativeRoutingCIDR"
    value = google_container_cluster.default.cluster_ipv4_cidr
  }

  set {
    name  = "config.ipam"
    value = "kubernetes"
  }

  set {
    name  = "global.gke.enabled"
    value = "true"
  }

  set {
    name  = "global.cni.binPath"
    value = "/home/kubernetes/bin"
  }

  set {
    name  = "nodeinit.removeCbrBridge"
    value = "true"
  }

  set {
    name  = "nodeinit.reconfigureKubelet"
    value = "true"
  }

  set {
    name  = "global.nodeinit.enabled"
    value = "true"
  }

}
Was this page helpful?
0 / 5 - 0 ratings

Related issues

dfry picture dfry  路  14Comments

kim0 picture kim0  路  12Comments

stefanthorpe picture stefanthorpe  路  14Comments

obeyler picture obeyler  路  16Comments

utx0 picture utx0  路  11Comments