0

I have this working resource configuration to install helm nginx ingress using terraform.

resource "helm_release" "nginx" {
  name       = "nginx"
  repository = "https://charts.bitnami.com/bitnami"
  chart      = "nginx-ingress-controller"
  namespace  = "nginx"
  

  set {
    name  = "serviceAccount.name"
    value = "myaccount"
  }
  set {
    name  = "rbac.create"
    value = "true"
  }
  set {
    name  = "service.loadBalancerIP"
    value = "1.2.3.4"
  }
  set {
    name  = "service.externalTrafficPolicy"
    value = "Local"
  }
  set {
    name  = "replicaCount"
    value = 1
  }
  
  set {
    type  = "string"
    name  = "service.annotations.service\\.beta\\.kubernetes\\.io/azure-load-balancer-resource-group"
    value = "myname"
  }  
  

}

I can't figure out how to change from here some of the nginx defaults, like for example proxy_buffer_size or the large_client_header_buffers, which by default are not enough for the large ID cookies from some ID servers.

nmm
  • 108
  • 7
  • You probably want to take a look at values: https://registry.terraform.io/providers/hashicorp/helm/latest/docs/resources/release#values – Marko E Oct 19 '22 at 17:43
  • Tried, but it did not worked. Found working solution creating configmap based on https://stackoverflow.com/questions/54884735/how-to-use-configmap-configuration-with-helm-nginx-ingress-controller-kubernet but will not make as answer, as it should be possible direct in the helm resource – nmm Oct 19 '22 at 22:47

1 Answers1

0

You can use controller.config.key

  set {
    name  = "controller.config.proxy-body-size"
    value = "100m"
  }

Note that you may have to escape some chars:

  set {
    name  = "controller.config.custom-http-errors"
    value = "502\\,503\\,504\\,404"
  }
Nicolas Braun
  • 746
  • 4
  • 16