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

Rancher terraform does not work with Hetzner #206

Open
namqdam opened this issue May 10, 2022 · 4 comments
Open

Rancher terraform does not work with Hetzner #206

namqdam opened this issue May 10, 2022 · 4 comments

Comments

@namqdam
Copy link

namqdam commented May 10, 2022

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
Copy link
Contributor

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
Copy link

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
Copy link

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

@usrGabriel
Copy link

@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!

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

No branches or pull requests

4 participants