From 48fc5b6ad86772cc4420f052cf1b10eac111db4e Mon Sep 17 00:00:00 2001 From: almog8k Date: Thu, 16 Apr 2026 09:55:32 +0300 Subject: [PATCH 1/3] feat: add conditional proxy_pass to backend service in NGINX configuration --- helm/config/default.conf | 2 ++ helm/values.yaml | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/helm/config/default.conf b/helm/config/default.conf index 7e0b8cb..40bdffc 100644 --- a/helm/config/default.conf +++ b/helm/config/default.conf @@ -47,7 +47,9 @@ server { otel_span_attr opa.reason $opa_reason; {{ end }} + {{ if .Values.backend.enabled }} proxy_pass http://{{ .Values.backend.host }}:{{ .Values.backend.port }}; + {{ end }} } {{ if .Values.authorization.enabled }} diff --git a/helm/values.yaml b/helm/values.yaml index 171bd4f..439e38c 100644 --- a/helm/values.yaml +++ b/helm/values.yaml @@ -59,7 +59,7 @@ image: # -- Docker image name repository: nginx # -- Docker image tag. If no value is specified, appVersion will be taken. - tag: '' + tag: "" # -- Port on which the application will listen port: 8080 # -- Port to which the service will forward traffic @@ -116,6 +116,8 @@ extraVolumeMounts: [] sidecars: "" backend: + # -- Enable or disable the proxy_pass to the backend service + enabled: false # -- Backend service name for proxy_pass host: "backend-service" # -- Backend service port From 285cc32419eead9b885bbab454e443f645ed410a Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 16 Apr 2026 06:55:58 +0000 Subject: [PATCH 2/3] update Helm documentation --- helm/values.md | 1 + 1 file changed, 1 insertion(+) diff --git a/helm/values.md b/helm/values.md index 7213798..913dfe3 100644 --- a/helm/values.md +++ b/helm/values.md @@ -18,6 +18,7 @@ A Helm chart for nginx | authorization.domain | string | `"example"` | Your authorization domain | | authorization.enabled | bool | `true` | Use authroization mechanism | | authorization.url | string | `"http://localhost:8181/v1/data/http/authz/decision"` | Authorization endpoint | +| backend.enabled | bool | `false` | Enable or disable the proxy_pass to the backend service | | backend.host | string | `"backend-service"` | Backend service name for proxy_pass | | backend.port | int | `8080` | Backend service port | | caKey | string | `"ca.crt"` | Key in the CA secret that contains the certificate data | From 2a38c55fb4fcca2c35e2d1c710dbc36cb0aa58a1 Mon Sep 17 00:00:00 2001 From: almog8k <60139576+almog8k@users.noreply.github.com> Date: Thu, 16 Apr 2026 10:00:18 +0300 Subject: [PATCH 3/3] Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --- helm/config/default.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/helm/config/default.conf b/helm/config/default.conf index 40bdffc..75be472 100644 --- a/helm/config/default.conf +++ b/helm/config/default.conf @@ -49,7 +49,7 @@ server { {{ if .Values.backend.enabled }} proxy_pass http://{{ .Values.backend.host }}:{{ .Values.backend.port }}; - {{ end }} + {{ end }} } {{ if .Values.authorization.enabled }}