DNXLabs / terraform-aws-eks-efs-csi-driver

Terraform module for deploying aws-efs-csi-driver inside a pre-existing EKS cluster.
https://modules.dnx.one
Apache License 2.0
26 stars 57 forks source link

Error with settings #12

Open stdmje opened 2 years ago

stdmje commented 2 years ago

Contact Details (optional)

No response

Description. What happened?

When trying to pass values using settings i got an error.

Steps to reproduce

  settings = {
    nodeSelector = {
      OnDemand = "true"
    }
  }

Expected behavior

No response

Actual behavior

│ Error: error getting values for a diff: ---> error unmarshaling JSON: while decoding JSON: json: cannot unmarshal string into Go value of type map[string]interface {} "{\"nodeSelector\":{\"OnDemand\":\"true\"}}"
│
│
│   with helm_release.kubernetes_efs_csi_driver[0],
│   on helm.tf line 1, in resource "helm_release" "kubernetes_efs_csi_driver":
│    1: resource "helm_release" "kubernetes_efs_csi_driver" {
│
╵
Releasing state lock. This may take a few moments...

Occurrence

Frequently

Relevant log output

No response

Code of Conduct

kylebisley commented 1 year ago

I am also struggling to set the nodeSelector in the helm deployment.

I'd be happy to add to the documentation an example of how to set values through the settings object as it is a bit vague at the moment but I'm fairly convinced that it cannot do what I need so I'm following this bug .

Issue could lead me to abandoning this module and rolling my own as this functionality is essential for my use case.

Edit:

Solved Sorted it out with some good old fashion bruit force permutation. Convinced this is just a documentation issue now. Adding my solution here for posterity until I can get a pull request up for the documentation.

Setting the Controller nodeSelector

  settings = {
      "controller" = { 
        "nodeSelector" = {
          "deployment" = "dev"
          } 
      }
  }

or using the kubernetes example

  settings = {
      "controller" = { 
        "nodeSelector" = {
          "disktype" = "ssd"
          } 
      }
  }