terraform-provider-helm icon indicating copy to clipboard operation
terraform-provider-helm copied to clipboard

Helm-release or modules fails to install with `unable to recognize "": unknown` error

Open novy4 opened this issue 1 year ago • 6 comments

Terraform, Provider, Kubernetes and Helm Versions

Terraform version: v1.5.2
Helm Provider version: 2.10.x
EKS version: 1.27
Kubernetes provider: 2.21.1
AWS terraform provider version: 5.5.0 

Affected Resource(s)

  • helm_release: prometheus-community/kube-prometheus-stack
  • terraform module: DNXLabs/eks-lb-controller/aws Both are using helm provider

Terraform Configuration Files

module "eks-lb-controller" {
  source  = "DNXLabs/eks-lb-controller/aws"
  version = "0.7.0"
  cluster_name = local.env
  cluster_identity_oidc_issuer = local.oidc.url
  cluster_identity_oidc_issuer_arn = local.oidc.arn

}

Debug Output

NOTE: In addition to Terraform debugging, please set HELM_DEBUG=1 to enable debugging info from helm. debug logs trace:

2023-07-06T12:04:45.844+0300 [TRACE] provider.terraform-provider-helm_v2.10.1_x5: Called downstream: @module=sdk.helper_schema tf_provider_addr=provider tf_resource_type=helm_release @caller=github.com/hashicorp/terraform-plugin-sdk/[email protected]/helper/schema/resource.go:838 tf_req_id=bf77dee2-a562-bb71-d173-dd2c7a063baf tf_rpc=ApplyResourceChange timestamp=2023-07-06T12:04:45.844+0300
2023-07-06T12:04:45.844+0300 [TRACE] provider.stdio: received data: channel=STDERR len=99
2023-07-06T12:04:45.845+0300 [TRACE] provider.stdio: waiting for stdio data
2023-07-06T12:04:45.844+0300 [TRACE] provider.terraform-provider-helm_v2.10.1_x5: Received downstream response: @module=sdk.proto tf_proto_version=5.3 tf_provider_addr=provider tf_req_id=bf77dee2-a562-bb71-d173-dd2c7a063baf tf_rpc=ApplyResourceChange @caller=github.com/hashicorp/[email protected]/tfprotov5/internal/tf5serverlogging/downstream_request.go:37 diagnostic_error_count=1 diagnostic_warning_count=0 tf_req_duration_ms=3715 tf_resource_type=helm_release timestamp=2023-07-06T12:04:45.844+0300
2023-07-06T12:04:45.845+0300 [ERROR] provider.terraform-provider-helm_v2.10.1_x5: Response contains error diagnostic: @caller=github.com/hashicorp/[email protected]/tfprotov5/internal/diag/diagnostics.go:55 diagnostic_detail= diagnostic_severity=ERROR tf_provider_addr=provider tf_rpc=ApplyResourceChange @module=sdk.proto diagnostic_summary="failed to install CRD crds/crd-alertmanagerconfigs.yaml: unable to recognize "": unknown" tf_proto_version=5.3 tf_req_id=bf77dee2-a562-bb71-d173-dd2c7a063baf tf_resource_type=helm_release timestamp=2023-07-06T12:04:45.844+0300
2023-07-06T12:04:45.845+0300 [TRACE] provider.terraform-provider-helm_v2.10.1_x5: Served request: tf_rpc=ApplyResourceChange @module=sdk.proto tf_proto_version=5.3 tf_provider_addr=provider tf_req_id=bf77dee2-a562-bb71-d173-dd2c7a063baf tf_resource_type=helm_release @caller=github.com/hashicorp/[email protected]/tfprotov5/tf5server/server.go:831 timestamp=2023-07-06T12:04:45.844+0300
2023-07-06T12:04:46.530+0300 [DEBUG] provider.stdio: received EOF, stopping recv loop: err="rpc error: code = Unavailable desc = error reading from server: EOF"
2023-07-06T12:04:46.538+0300 [DEBUG] provider: plugin process exited: path=.terraform/providers/registry.terraform.io/hashicorp/helm/2.10.1/darwin_arm64/terraform-provider-helm_v2.10.1_x5 pid=82763
2023-07-06T12:04:46.538+0300 [DEBUG] provider: plugin exited

Steps to Reproduce

  1. terraform apply

Expected Behavior

Terraform should deploy helm release of prometheus-stack or DNXLabs/eks-lb-controller/aws

Actual Behavior

I am getting an error: Error: failed to install CRD crds/crd-alertmanagerconfigs.yaml: unable to recognize "": unknown or for lb-ingress-controller Error: failed to install CRD crds/crds.yaml: unable to recognize "": unknown

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

novy4 avatar Jul 06 '23 07:07 novy4

Hi @novy4,

Have you tried to reproduce this issue with the Helm provider outside of the modules? It is hard to say what is happening inside the module and would be helpful if we can focus only on the Helm provider part only.

Please share your Helm provider resource code and any additional inputs that can help to reproduce the issue. For example, a CRD file.

Thank you.

arybolovlev avatar Jul 12 '23 08:07 arybolovlev

Hi @novy4,

Have you tried to reproduce this issue with the Helm provider outside of the modules? It is hard to say what is happening inside the module and would be helpful if we can focus only on the Helm provider part only.

Please share your Helm provider resource code and any additional inputs that can help to reproduce the issue. For example, a CRD file.

Thank you.

Hi @arybolovlev , would it be okay to post here debug info during Prometheus-stack helm release deployment?

novy4 avatar Jul 12 '23 09:07 novy4

I think the debug output is quite big, so please use GitHub Gist and then paste a link here.

Thanks!

arybolovlev avatar Jul 12 '23 14:07 arybolovlev

@arybolovlev I have some trace logs for the helm-release as follows:

resource "helm_release" "monitoring" {
  count       = local.stg ? 1 : 0
  name  = local.env
  repository = "https://prometheus-community.github.io/helm-charts"
  chart = "kube-prometheus-stack"
  namespace = "tools"
  version = "47.2.0"
  values  = ["${file("monitoring/prometheus-operator.yaml")}"]
}

Trace log

if you need more info, just ping me...

novy4 avatar Jul 14 '23 08:07 novy4

hi @arybolovlev any chance to look into this issue any time soon?

novy4 avatar Jul 31 '23 13:07 novy4

~~@novy4 - were ever able to make progress? I am seeing the same behavior when attempting to run EKS Blueprints for Terraform including an addon, and opened an issue there~~

My provider was not authenticating properly. Error was a bit of a red herring

corkupine avatar Oct 31 '23 20:10 corkupine