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
4 changes: 2 additions & 2 deletions helm/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ version: 2.2.2
appVersion: 2.2.2
dependencies:
- name: nginx
version: 1.3.0
repository: oci://acrarolibotnonprod.azurecr.io/helm
version: 2.1.1
repository: oci://acrarolibotnonprod.azurecr.io/helm/common
41 changes: 41 additions & 0 deletions helm/config/downloads.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{{- $storage := (include "common.storage.merged" .) | fromYaml }}
{{- $serviceUrls := (include "common.serviceUrls.merged" .) | fromYaml }}

server {
listen {{ .Values.nginx.backend.port }};
server_name {{ .Values.nginx.backend.host }};

location /downloads {
{{- if eq (upper $storage.gpkgProvider) "FS" }}
# FS provider
root /usr/share/nginx/html;
types {}
{{- end }}

{{- if eq (upper $storage.gpkgProvider) "S3" }}
# S3 provider
rewrite ^/downloads/(.*) /$1 break;

proxy_pass {{ $serviceUrls.ngnixS3Gateway }};
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;

# Timeouts for larger files
proxy_connect_timeout 300;
proxy_send_timeout 300;
proxy_read_timeout 300;
send_timeout 300;

# Buffer settings for handling large files
proxy_buffering off;
proxy_max_temp_file_size 0;
{{- end }}
}

error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
}
150 changes: 0 additions & 150 deletions helm/config/nginx.conf

This file was deleted.

2 changes: 1 addition & 1 deletion helm/templates/nginx/nginx-configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@ metadata:
environment: {{ .Values.environment }}
release: {{ $releaseName }}
data:
nginx.conf: {{ tpl (.Files.Get "config/nginx.conf") . | quote }}
downloads.conf: {{ tpl (.Files.Get "config/downloads.conf") . | quote }}
{{- end }}
32 changes: 23 additions & 9 deletions helm/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -66,13 +66,23 @@ nginx:
enabled: false
replicaCount: 1
image:
repository: nginx-otel-unprivileged
tag: "v1.0.0"
repository: common/nginx
tag: "v2.1.1"
port: 8080
internalServicePort: 80
targetPort: 8080
nodePort: 30003

backend:
host: "127.0.0.1"
port: 8082

opentelemetry:
serviceName: ""
exporterHost: ""
exporterPort: 4317
samplerMethod: "AlwaysOff"
ratio: 10

extraVolumes:
- name: nginx-config
configMap:
Expand All @@ -82,9 +92,9 @@ nginx:
claimName: "internal-pvc-nfs"

extraVolumeMounts:
- mountPath: "/etc/nginx/nginx.conf"
- mountPath: "/etc/nginx/conf.d/downloads.conf"
name: nginx-config
subPath: nginx.conf
subPath: downloads.conf
- name: gpkgs-storage
mountPath: /usr/share/nginx/html/downloads
subPath: gpkgs
Expand Down Expand Up @@ -115,12 +125,16 @@ nginx:
caCertificate: ""
ingress:
enabled: false
type: "nginx-org" # supported values: 'nginx-org' | 'nginx-kubernetes
path: /
host: ""
ingressClassName: nginx
additionalAnnotations: {}
ingressMapping:
- path: /
host: ""
pathType: Prefix
domain: ""
tls:
enabled: false
useExternal: ""
secretName: ""
cors:
enabled: true
origin: "*"
Loading