Skip to content

Commit 3b52050

Browse files
ajaumetnschad
authored andcommitted
fix the values reference in nginx config
Signed-off-by: ajaumet <[email protected]>
1 parent 4adb77d commit 3b52050

File tree

3 files changed

+10
-0
lines changed

3 files changed

+10
-0
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -494,6 +494,7 @@ Kubernetes: `^1.19.0-0`
494494
| nginx.&ZeroWidthSpace;config.&ZeroWidthSpace;mainSnippet | string | `""` | arbitrary snippet to inject in the top section of the nginx config |
495495
| nginx.&ZeroWidthSpace;config.&ZeroWidthSpace;serverSnippet | string | `""` | arbitrary snippet to inject in the server { } section of the nginx config |
496496
| nginx.&ZeroWidthSpace;config.&ZeroWidthSpace;setHeaders | object | `{}` | |
497+
| nginx.&ZeroWidthSpace;config.&ZeroWidthSpace;verboseLogging | bool | `true` | Enables all access logs from nginx, otherwise ignores 2XX and 3XX status codes |
497498
| nginx.&ZeroWidthSpace;containerSecurityContext.&ZeroWidthSpace;enabled | bool | `true` | |
498499
| nginx.&ZeroWidthSpace;containerSecurityContext.&ZeroWidthSpace;readOnlyRootFilesystem | bool | `false` | |
499500
| nginx.&ZeroWidthSpace;enabled | bool | `true` | |

templates/nginx/nginx-config.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,17 @@ data:
2828
log_format main '$remote_addr - $remote_user [$time_local] $status '
2929
'"$request" $body_bytes_sent "$http_referer" '
3030
'"$http_user_agent" "$http_x_forwarded_for" $http_x_scope_orgid';
31+
3132
{{- if .Values.nginx.config.verboseLogging }}
3233
access_log /dev/stderr main;
34+
{{- else }}
35+
map $status $loggable {
36+
~^[23] 0;
37+
default 1;
38+
}
39+
access_log /dev/stderr main if=$loggable;
3340
{{- end }}
41+
3442
sendfile on;
3543
tcp_nopush on;
3644
resolver {{ default (printf "kube-dns.kube-system.svc.%s" .Values.clusterDomain ) .Values.nginx.config.dnsResolver }}{{- if .Values.nginx.config.dnsTTL }} valid={{ .Values.nginx.config.dnsTTL }}{{- end }};

values.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1278,6 +1278,7 @@ nginx:
12781278
basicAuthSecretName: ""
12791279
# -- Including the valid parameter to the `resolver` directive to re-resolve names every `dnsTTL` seconds/minutes
12801280
dnsTTL: "15s"
1281+
# -- Enables all access logs from nginx, otherwise ignores 2XX and 3XX status codes
12811282
verboseLogging: true
12821283
image:
12831284
repository: nginx

0 commit comments

Comments
 (0)