From bbafc1ef191e2ba0b04504ce9eda53721d900f28 Mon Sep 17 00:00:00 2001 From: Lester Guerzon Date: Fri, 30 Aug 2024 17:52:08 +0800 Subject: [PATCH] fix: make customHeadersConfigMap optional (#112) Signed-off-by: Lester Guerzon --- charts/vaultwarden/Chart.yaml | 2 +- charts/vaultwarden/templates/configmap.yaml | 4 +++- charts/vaultwarden/values.yaml | 5 +++-- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/charts/vaultwarden/Chart.yaml b/charts/vaultwarden/Chart.yaml index d9da07b..795bce6 100644 --- a/charts/vaultwarden/Chart.yaml +++ b/charts/vaultwarden/Chart.yaml @@ -13,5 +13,5 @@ maintainers: - name: guerzon email: guerzon@proton.me url: https://github.com/guerzon -version: 0.25.0 +version: 0.25.1 kubeVersion: ">=1.12.0-0" diff --git a/charts/vaultwarden/templates/configmap.yaml b/charts/vaultwarden/templates/configmap.yaml index 9f93199..6aa80c2 100644 --- a/charts/vaultwarden/templates/configmap.yaml +++ b/charts/vaultwarden/templates/configmap.yaml @@ -1,10 +1,12 @@ +{{- with .Values.ingress.customHeadersConfigMap }} apiVersion: v1 kind: ConfigMap metadata: name: custom-headers-configmap data: - Request-Id: $req_id + {{- toYaml . | nindent 2 }} --- +{{- end }} apiVersion: v1 kind: ConfigMap metadata: diff --git a/charts/vaultwarden/values.yaml b/charts/vaultwarden/values.yaml index 835bbc9..30d0569 100644 --- a/charts/vaultwarden/values.yaml +++ b/charts/vaultwarden/values.yaml @@ -697,9 +697,10 @@ ingress: ## nginxAllowList: "" ## @param ingress.customHeadersConfigMap ConfigMap containing custom headers to be added to the ingress. - ## Defaults to "custom-headers-configmap", which sets a Request-ID header. + ## Requirement: First define the allowed response headers in global-allowed-response-headers. + ## Ref: https://kubernetes.github.io/ingress-nginx/user-guide/nginx-configuration/annotations/#custom-headers ## - customHeadersConfigMap: "custom-headers-configmap" + customHeadersConfigMap: {} ## TODO: ## - Add support for using cert-manager. ## - Support for multiple TLS hostnames.