rancher / quickstart

381 stars 338 forks source link

Rancher terraform does not work with Hetzner #206

Open namqdam opened 2 years ago

namqdam commented 2 years ago

Hi, I have error when using with Hetzner cloud when install cert-manager.

module.rancher_common.helm_release.cert_manager: Creating... │ │ Error: could not download chart: failed to download "https://charts.jetstack.io/charts/cert-manager-v1.8.0.tgz" │ │ with module.rancher_common.helm_release.cert_manager, │ on ../rancher-common/helm.tf line 4, in resource "helm_release" "cert_manager": │ 4: resource "helm_release" "cert_manager" { │ │

my config:

cert_manager_version = "1.8.0" docker_version = "20.10" rancher_kubernetes_version = "v1.21.11+k3s1" rancher_version = "2.6.4" workload_kubernetes_version = "v1.21.10-rancher1-1"

Please help me. Thank you.

bashofmann commented 2 years ago

I can't reproduce this issue. Provisioning works fine with the default cert-manager version in the module (1.7.1) as well as with 1.8.0.

The URL is also correct and points to the packaged Helm chart. Do you have internet connectivity on the machine where you are running Terraform? Is there maybe some Proxy, Firewall or Anti-Virus Scanner that could block the download?

If you run TF_LOG=debug terraform apply, you should get more detailed logs that may include more details on why the download failed.

obi12341 commented 2 years ago

i get the exact same problem:

module.rancher_common.helm_release.cert_manager: Creating...
2022-06-27T19:36:40.523+0200 [INFO]  Starting apply for module.rancher_common.helm_release.cert_manager
2022-06-27T19:36:40.523+0200 [DEBUG] module.rancher_common.helm_release.cert_manager: applying the planned Create change
2022-06-27T19:36:40.524+0200 [INFO]  provider.terraform-provider-helm_v2.5.1_x5: 2022/06/27 19:36:40 [DEBUG] setting computed for "metadata" from ComputedKeys: timestamp=2022-06-27T19:36:40.524+0200
2022-06-27T19:36:40.524+0200 [INFO]  provider.terraform-provider-helm_v2.5.1_x5: 2022/06/27 19:36:40 [DEBUG] [resourceReleaseCreate: cert-manager] Started: timestamp=2022-06-27T19:36:40.524+0200
2022-06-27T19:36:40.524+0200 [INFO]  provider.terraform-provider-helm_v2.5.1_x5: 2022/06/27 19:36:40 [DEBUG] [resourceReleaseCreate: cert-manager] Getting helm configuration: timestamp=2022-06-27T19:36:40.524+0200
2022-06-27T19:36:40.524+0200 [INFO]  provider.terraform-provider-helm_v2.5.1_x5: 2022/06/27 19:36:40 [DEBUG] [INFO] GetHelmConfiguration start: timestamp=2022-06-27T19:36:40.524+0200
2022-06-27T19:36:40.527+0200 [INFO]  provider.terraform-provider-helm_v2.5.1_x5: 2022/06/27 19:36:40 [DEBUG] Using kubeconfig: ./kube_config_server.yaml: timestamp=2022-06-27T19:36:40.524+0200
2022-06-27T19:36:40.527+0200 [INFO]  provider.terraform-provider-helm_v2.5.1_x5: 2022/06/27 19:36:40 [INFO] Successfully initialized kubernetes config: timestamp=2022-06-27T19:36:40.524+0200
2022-06-27T19:36:40.527+0200 [INFO]  provider.terraform-provider-helm_v2.5.1_x5: 2022/06/27 19:36:40 [DEBUG] [INFO] GetHelmConfiguration success: timestamp=2022-06-27T19:36:40.524+0200
2022-06-27T19:36:40.527+0200 [INFO]  provider.terraform-provider-helm_v2.5.1_x5: 2022/06/27 19:36:40 [DEBUG] [resourceReleaseCreate: cert-manager] Getting chart: timestamp=2022-06-27T19:36:40.524+0200
2022-06-27T19:36:40.546+0200 [ERROR] vertex "module.rancher_common.helm_release.cert_manager" error: could not download chart: failed to download "https://charts.jetstack.io/charts/cert-manager-v1.7.1.tgz"
╷
│ Error: could not download chart: failed to download "https://charts.jetstack.io/charts/cert-manager-v1.7.1.tgz"
│
│   with module.rancher_common.helm_release.cert_manager,
│   on ../rancher-common/helm.tf line 4, in resource "helm_release" "cert_manager":
│    4: resource "helm_release" "cert_manager" {
│
╵
2022-06-27T19:36:40.567+0200 [DEBUG] provider.stdio: received EOF, stopping recv loop: err="rpc error: code = Unavailable desc = transport is closing"
2022-06-27T19:36:40.567+0200 [DEBUG] provider.stdio: received EOF, stopping recv loop: err="rpc error: code = Unavailable desc = transport is closing"
2022-06-27T19:36:40.567+0200 [DEBUG] provider.stdio: received EOF, stopping recv loop: err="rpc error: code = Unavailable desc = transport is closing"
2022-06-27T19:36:40.568+0200 [DEBUG] provider.stdio: received EOF, stopping recv loop: err="rpc error: code = Unavailable desc = transport is closing"
2022-06-27T19:36:40.568+0200 [DEBUG] provider: plugin process exited: path=.terraform/providers/registry.terraform.io/hashicorp/helm/2.5.1/darwin_arm64/terraform-provider-helm_v2.5.1_x5 pid=25608
2022-06-27T19:36:40.568+0200 [DEBUG] provider: plugin exited
2022-06-27T19:36:40.568+0200 [DEBUG] provider: plugin process exited: path=.terraform/providers/registry.terraform.io/hashicorp/local/2.2.3/darwin_arm64/terraform-provider-local_v2.2.3_x5 pid=25548
2022-06-27T19:36:40.568+0200 [DEBUG] provider: plugin exited
2022-06-27T19:36:40.568+0200 [DEBUG] provider: plugin process exited: path=.terraform/providers/registry.terraform.io/rancher/rancher2/1.24.0/darwin_arm64/terraform-provider-rancher2_v1.24.0 pid=25584
2022-06-27T19:36:40.569+0200 [DEBUG] provider: plugin exited
2022-06-27T19:36:40.569+0200 [DEBUG] provider: plugin process exited: path=.terraform/providers/registry.terraform.io/hetznercloud/hcloud/1.33.2/darwin_arm64/terraform-provider-hcloud_v1.33.2 pid=25549
2022-06-27T19:36:40.569+0200 [DEBUG] provider: plugin exited
obi12341 commented 2 years ago

helm repo update fixed it for me, although i don't have jetstack repo installed

usrGabriel commented 2 years ago

@obi12341 Thanks for posting this, had the same issue on AWS. Had to install helm on my local machine and then do a repo update like you did. Once that was done, the apply worked!