diff --git a/helm/Chart.lock b/helm/Chart.lock index 7e66de4..344ccf1 100644 --- a/helm/Chart.lock +++ b/helm/Chart.lock @@ -1,6 +1,6 @@ dependencies: - name: nginx repository: oci://acrarolibotnonprod.azurecr.io/helm/common - version: 2.1.0 -digest: sha256:18e8ad9d643309745bcdd30df03b0e01ec004d295ce2d5a7a81fc8c40e0e9206 -generated: "2025-09-02T12:36:32.560619638+03:00" + version: 2.1.2 +digest: sha256:83c525d0b74b939863f38f4a6716d1e7a3b1b955433cda7ee0e36f1af473d798 +generated: "2026-03-30T12:20:07.932221448+03:00" diff --git a/helm/Chart.yaml b/helm/Chart.yaml index cadbb9c..f30f670 100644 --- a/helm/Chart.yaml +++ b/helm/Chart.yaml @@ -6,5 +6,5 @@ version: 2.2.0 appVersion: 2.2.0 dependencies: - name: nginx - version: 2.1.0 + version: 2.1.2 repository: oci://acrarolibotnonprod.azurecr.io/helm/common diff --git a/helm/config/log_format.conf b/helm/config/log_format.conf deleted file mode 100644 index bf44a2f..0000000 --- a/helm/config/log_format.conf +++ /dev/null @@ -1,44 +0,0 @@ -map $msec $nanosec { - ~(.*)\.(.*) $1$2000000; -} - -log_format json escape=json -'{' - '"Timestamp":"$nanosec",' - '"Attributes":{' - '"mapcolonies.time_local":"$time_local",' - '"mapcolonies.http.auth.token.client_name":"$jwt_payload_sub",' - '"http.request.method":"$request_method",' - '"http.request.header.referer":"$http_referer",' - '"http.request.body.size":"$content_length",' - '"http.response.body.size":"$body_bytes_sent",' - '"http.response.header.x_forwarded_for":"$proxy_add_x_forwarded_for",' - '"http.response.status_code":"$status",' - '"user_agent.original":"$http_user_agent",' - '"network.protocol":"$server_protocol",' - '"mapcolonies.request_time":"$request_time",' - '"mapcolonies.http.upstream_connect_time":"$upstream_connect_time",' - '"mapcolonies.http.upstream_response_time":"$upstream_response_time",' - '"mapcolonies.http.upstream_addr":"$upstream_addr",' - '"mapcolonies.http.upstream_status_code":"$upstream_status",' - '"mapcolonies.http.upstream_cache_status":"$upstream_cache_status",' - '"mapcolonies.server":"$hostname",' - '"server.address":"$host",' - '"server.port":"$server_port",' - '"client.address":"$remote_addr",' - '"client.port":"$remote_port",' - '"url.scheme":"$scheme",' - '"url.path":"$uri",' - '"url.full":"$request_uri"' - '},' - '"Resource":{' - '"service.name":"{{ .Values.image.repository }}",' - '"service.version":"{{ .Values.image.tag }}"' - '},' - '"TraceId":"$otel_trace_id",' ## this is a byte sequence (hex-encoded in JSON) - '"SpanId":"$otel_span_id",' - '"SeverityText":"INFO",' - '"SeverityNumber":"9",' - '"InstrumentationScope":"access.log",' - '"Body":"$request"' -'}'; diff --git a/helm/config/nginx.conf b/helm/config/nginx.conf deleted file mode 100644 index 6651bac..0000000 --- a/helm/config/nginx.conf +++ /dev/null @@ -1,41 +0,0 @@ -#user nginx; -load_module modules/ngx_http_js_module.so; -load_module modules/ngx_otel_module.so; -worker_processes 4; - -error_log /var/log/nginx/error.log warn; -pid /tmp/nginx.pid; - -events { - worker_connections 1024; -} - -http { - otel_service_name {{ .Values.nginx.opentelemetry.serviceName }}; - otel_exporter { - endpoint {{ .Values.nginx.opentelemetry.exporterHost }}:{{ .Values.nginx.opentelemetry.exporterPort }}; - } - - include /etc/nginx/mime.types; - default_type application/octet-stream; - - {{ if .Values.nginx.authorization.enabled }} - js_import auth from /etc/nginx/auth.js; - js_set $jwt_payload_sub auth.jwtPayloadSub; - - js_var $opa_result; - js_var $opa_reason; - {{ end }} - - include /etc/nginx/log_format.conf; - access_log /var/log/nginx/access.log json; - - sendfile on; - #tcp_nopush on; - - keepalive_timeout 65; - - #gzip on; - - include /etc/nginx/conf.d/*.conf; -} diff --git a/helm/templates/nginx-configmap.yaml b/helm/templates/nginx-configmap.yaml index 315bc2d..66cab39 100644 --- a/helm/templates/nginx-configmap.yaml +++ b/helm/templates/nginx-configmap.yaml @@ -10,7 +10,5 @@ metadata: environment: {{ include "heights.environment" . }} release: {{ .Release.Name }} data: - log_format.conf: {{ tpl (.Files.Get "config/log_format.conf") . | quote }} default.conf: {{ tpl (.Files.Get "config/default.conf") . | quote }} - nginx.conf: {{ tpl (.Files.Get "config/nginx.conf") . | quote }} {{- end }} diff --git a/helm/values.yaml b/helm/values.yaml index a0e5d8b..bba45ad 100644 --- a/helm/values.yaml +++ b/helm/values.yaml @@ -100,12 +100,6 @@ nginx: - name: nginx-config mountPath: "/etc/nginx/conf.d/default.conf" subPath: default.conf - - name: nginx-config - mountPath: "/etc/nginx/nginx.conf" - subPath: nginx.conf - - name: nginx-config - mountPath: "/etc/nginx/log_format.conf" - subPath: log_format.conf resources: enabled: true value: