Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions helm/config/default.conf
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
1 change: 1 addition & 0 deletions helm/values.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 |
Comment on lines 19 to 22

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot apply changes based on this feedback

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated in commit 285cc32: helm/values.md now includes backend.enabled, backend.host, and backend.port in the generated Values table, so the new flag is documented for chart users.

| backend.port | int | `8080` | Backend service port |
| caKey | string | `"ca.crt"` | Key in the CA secret that contains the certificate data |
Expand Down
4 changes: 3 additions & 1 deletion helm/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
Loading