diff --git a/helm/config/default.conf b/helm/config/default.conf index 7e0b8cb..75be472 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.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 | 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