From a383baa83b677499d8a13ec57bea9d4a2717eb2f Mon Sep 17 00:00:00 2001 From: OZGCloud <ozgcloud@mgm-tp.com> Date: Wed, 18 Oct 2023 15:07:57 +0200 Subject: [PATCH] variable ingress annotations --- src/main/helm/templates/ingress.yaml | 4 +++- src/test/helm/ingress_test.yaml | 4 ++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/main/helm/templates/ingress.yaml b/src/main/helm/templates/ingress.yaml index 0199f6603..5c22e5c6b 100644 --- a/src/main/helm/templates/ingress.yaml +++ b/src/main/helm/templates/ingress.yaml @@ -32,7 +32,9 @@ metadata: {{- else }} cert-manager.io/cluster-issuer: letsencrypt-prod {{- end }} - nginx.ingress.kubernetes.io/proxy-body-size: 42m + {{- with (.Values.ingress).annotations }} +{{ toYaml . | indent 4 }} + {{- end }} name: {{ include "app.name" . }} namespace: {{ include "app.namespace" . }} spec: diff --git a/src/test/helm/ingress_test.yaml b/src/test/helm/ingress_test.yaml index 7561bb305..3675fb2ea 100644 --- a/src/test/helm/ingress_test.yaml +++ b/src/test/helm/ingress_test.yaml @@ -125,6 +125,10 @@ tests: path: metadata.annotations.[cert-manager.io/cluster-issuer] value: letsencrypt-prod - it: should set proxy body size to 42m + set: + ingress: + annotations: + nginx.ingress.kubernetes.io/proxy-body-size: 42m asserts: - equal: path: metadata.annotations.[nginx.ingress.kubernetes.io/proxy-body-size] -- GitLab