Helm Chart Metadata Dependency Issue with DAPR

179 views Asked by At

I am trying to create a DAPR Deployment via helm:

resource "helm_release" "dapr" {
  depends_on = [module.primary]
  name       = "dapr"
  repository = "https://charts.wener.tech"
  chart      = "dapr"
  version    = "1.11.0"
  namespace  = "kube-system"
  lint       = true
  timeout    = "600"

  values = ["${file("./values/dapr.values.yaml")}"]

  cleanup_on_fail = true
}

From the above helm chart I reference a values file within the same directory called ./values/dapr.values.yaml:

global:
  logAsJson: true
  imagePullPolicy: IfNotPresent
  nodeSelector: {}
  tolerations: []
  ha:
    enabled: false
    replicaCount: 3
    disruption:
      minimumAvailable: ""
      maximumUnavailable: "25%"
  prometheus:
    enabled: true
    port: 9090
  dapr_dashboard:
    resources:
      requests:
        memory: "200Mi"
        cpu: "50m"
      limits:
        memory: "200Mi"
  dapr_operator:
    resources:
      requests:
        memory: "200Mi"
        cpu: "100m"
      limits:
        memory: "200Mi"
  dapr_placement:
    resources:
      requests:
        memory: "150Mi"
        cpu: "250m"
      limits:
        memory: "150Mi"
  dapr_sentry:
    resources:
      requests:
        memory: "200Mi"
        cpu: "100m"
      limits:
        memory: "200Mi"
  dapr_sidecar_injector:
    resources:
      requests:
        memory: "200Mi"
        cpu: "100m"
      limits:
        memory: "200Mi"

When I run the terraform, on the terraform plan it fails saying the following:

Error: malformed chart or values: 
    /tmp/helm-lint80298427/dapr: chart metadata is missing these dependencies: dapr_placement,dapr_rbac,dapr_sentry,dapr_sidecar_injector,dapr_config,dapr_operator

Yet, I have the dependencies mentioned within the dapr.values.yaml, why is it still failing? Is there something wrong with my yaml?

1

There are 1 answers

0
R. Barrett On BEST ANSWER

So something is wrong with the chart. Essentially I had to take out the following out of the terraform block:

lint       = true

After I took that out, it defaulted to false as defined by helm_release, so the messages were obviously related to the linter utilized by the provider, and for some odd reason it didn't respect the chart values I placed in. Once I took it out, everything worked on terraform plan and terraform apply and the resources did deploy. So I guess Linters Beware.

The new block looks like this:

resource "helm_release" "dapr" {
  depends_on = [module.primary]
  name       = "dapr"
  repository = "https://dapr.github.io/helm-charts/"
  chart      = "dapr"
  version    = "1.10.7"
  namespace  = "kube-system"
  timeout    = "600"

  values = ["${file("./values/dapr.values.yaml")}"]

  cleanup_on_fail   = true
  dependency_update = true
}

I also changed to using the other dapr repository. Apparently there are two main ones that seem to stem from the same place, but with lint set to true, it failed on both.