Skip to content
Merged
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
14 changes: 8 additions & 6 deletions helm/config/default.conf
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,6 @@ server {

{{ include "nginx.otelTrace" . | nindent 8 }}

# Allow extending root path with custom configurations
{{- if .Values.nginx.extensions.location.enabled }}
include /etc/nginx/conf.d/extensions/{{ .Values.nginx.extensions.location.fileName }};
{{- end }}

set $original_method $request_method;
set $original_args $args;

Expand All @@ -47,7 +42,14 @@ server {
otel_span_attr opa.reason $opa_reason;
{{ end }}

proxy_pass http://{{ .Values.backend.host }}:{{ .Values.backend.port }};
# Allow extending root path with custom configurations
{{- if .Values.nginx.extensions.location.enabled }}
include /etc/nginx/conf.d/extensions/{{ .Values.nginx.extensions.location.fileName }};
{{- end }}

{{- if .Values.backend.enabled }}
proxy_pass http://{{ .Values.backend.host | default "localhost" }}:{{ .Values.backend.port }};
{{- end }}
}

{{ if .Values.authorization.enabled }}
Expand Down
3 changes: 2 additions & 1 deletion helm/values.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ 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.host | string | `"backend-service"` | Backend service name for proxy_pass |
| backend.enabled | bool | `true` | Enable or disable the backend service |
| backend.host | string | `""` | 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 |
| caPath | string | `"/usr/local/share/ca-certificates"` | Path where the CA certificate will be mounted in the container |
Expand Down
4 changes: 3 additions & 1 deletion helm/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,10 @@ extraVolumeMounts: []
sidecars: ""

backend:
# -- Enable or disable the backend service
enabled: true
# -- Backend service name for proxy_pass
host: "backend-service"
host: ''
# -- Backend service port
port: 8080

Expand Down