From 87c0320b38c9f8863cde399e9e636e614ded4485 Mon Sep 17 00:00:00 2001 From: iameskild Date: Tue, 13 Sep 2022 07:57:56 -0700 Subject: [PATCH 1/2] Add properties to middleware crd headers --- .../modules/traefik_crds/main.tf | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/qhub/template/stages/03-kubernetes-initialize/modules/traefik_crds/main.tf b/qhub/template/stages/03-kubernetes-initialize/modules/traefik_crds/main.tf index c2335adf2..4de0d937d 100644 --- a/qhub/template/stages/03-kubernetes-initialize/modules/traefik_crds/main.tf +++ b/qhub/template/stages/03-kubernetes-initialize/modules/traefik_crds/main.tf @@ -548,6 +548,11 @@ resource "kubernetes_manifest" "middleware" { type = "object" properties = { customRequestHeaders = { + properties = { + testHeader = { + type = "string" + } + } type = "object" } customResponseHeaders = { @@ -611,6 +616,11 @@ resource "kubernetes_manifest" "middleware" { type = "string" } sslProxyHeaders = { + properties = { + X-Forwarded-Proto = { + type = "string" + } + } type = "object" } sslForceHost = { From 6affc2ceea74f823192ee9454b8e845b451f02bf Mon Sep 17 00:00:00 2001 From: iameskild Date: Tue, 13 Sep 2022 09:21:27 -0700 Subject: [PATCH 2/2] use additionalProperties instead --- .../modules/traefik_crds/main.tf | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/qhub/template/stages/03-kubernetes-initialize/modules/traefik_crds/main.tf b/qhub/template/stages/03-kubernetes-initialize/modules/traefik_crds/main.tf index 4de0d937d..ffc5bf09a 100644 --- a/qhub/template/stages/03-kubernetes-initialize/modules/traefik_crds/main.tf +++ b/qhub/template/stages/03-kubernetes-initialize/modules/traefik_crds/main.tf @@ -548,14 +548,15 @@ resource "kubernetes_manifest" "middleware" { type = "object" properties = { customRequestHeaders = { - properties = { - testHeader = { - type = "string" - } + additionalProperties = { + type = "string" } type = "object" } customResponseHeaders = { + additionalProperties = { + type = "string" + } type = "object" } accessControlAllowCredentials = { @@ -616,10 +617,8 @@ resource "kubernetes_manifest" "middleware" { type = "string" } sslProxyHeaders = { - properties = { - X-Forwarded-Proto = { - type = "string" - } + additionalProperties = { + type = "string" } type = "object" }