Skip to content
Open
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
8 changes: 4 additions & 4 deletions npdbchart_belle2_java/templates/nginx.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ data:
add_header X-Cache-Status $upstream_cache_status;

proxy_cache my_cache;
proxy_cache_valid 200 302 10h; # Cache successful responses for 60 seconds
proxy_cache_valid 200 302 {{ .Values.nginx.cache.global_tag_status_valid }};
proxy_cache_use_stale error timeout updating http_500 http_502 http_503 http_504;
proxy_ignore_headers "Cache-Control" "Expires";

Expand All @@ -64,7 +64,7 @@ data:
add_header X-Cache-Status $upstream_cache_status;

proxy_cache my_cache;
proxy_cache_valid 200 302 600s; # Cache successful responses for 60 seconds
proxy_cache_valid 200 302 {{ .Values.nginx.cache.global_tag_valid }};
proxy_cache_use_stale error timeout updating http_500 http_502 http_503 http_504;
proxy_ignore_headers "Cache-Control" "Expires";

Expand All @@ -88,7 +88,7 @@ data:
add_header X-Cache-Status $upstream_cache_status;

proxy_cache my_cache;
proxy_cache_valid 200 302 300s; # Cache successful responses for 60 seconds
proxy_cache_valid 200 302 {{ .Values.nginx.cache.iov_payloads_valid }};
proxy_cache_use_stale error timeout updating http_500 http_502 http_503 http_504;
proxy_ignore_headers "Cache-Control" "Expires";

Expand All @@ -110,7 +110,7 @@ data:
add_header X-Cache-Status $upstream_cache_status;

proxy_cache my_cache;
proxy_cache_valid 200 302 60s; # Cache successful responses for 60 seconds
proxy_cache_valid 200 302 {{ .Values.nginx.cache.any_valid }};
proxy_cache_use_stale error timeout updating http_500 http_502 http_503 http_504;
proxy_ignore_headers "Cache-Control" "Expires";

Expand Down
10 changes: 10 additions & 0 deletions npdbchart_belle2_java/values.yaml.template
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,17 @@ dbpassword: password
#Docker
java_docker_image: docker_image
pgbouncer_docker_image: docker_image
nginx_docker_image: "nginx:1.25"
#JWT
jwt_secret: secret
#NGINX Cache-Control
nginx_cache_control_value: max-age=3600
#NGINX Cache Durations
#Note: Durations can be in seconds(s), minutes(m), or hours(h).
nginx:
cache:
global_tag_status_valid: 10h #For /globalTagStatus
global_tag_valid: 600s #For /globalTags
iov_payloads_valid: 300s #For /iovPayloads
any_valid: 60s #Default for all other 200/302 responses

4 changes: 2 additions & 2 deletions npdbchart_sphenix/templates/nginx.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ data:
proxy_pass http://django;
proxy_redirect off;
proxy_cache my_cache;
proxy_cache_valid 200 302 1h; # Cache successful responses for 5 seconds
proxy_cache_valid 200 302 {{ .Values.nginx.cache.gtstatus_valid }};
proxy_cache_use_stale error timeout updating http_500 http_502 http_503 http_504;
proxy_ignore_headers "Cache-Control" "Expires";
}
Expand All @@ -35,7 +35,7 @@ data:
proxy_pass http://django;
proxy_redirect off;
proxy_cache my_cache;
proxy_cache_valid 200 302 1s; # Cache successful responses for 5 seconds
proxy_cache_valid 200 302 {{ .Values.nginx.cache.global_tag_valid }};
proxy_cache_use_stale error timeout updating http_500 http_502 http_503 http_504;
proxy_ignore_headers "Cache-Control" "Expires";
}
Expand Down
9 changes: 9 additions & 0 deletions npdbchart_sphenix/values.yaml.template
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ project: project_name
appname: spp_name
#Docker
django_docker_image: docker_image
nginx_docker_image: "nginx:1.25"
#DB parameters
dbhost_w: host_name
dbname_w: database_name
Expand All @@ -22,3 +23,11 @@ django_logpath: /mnt/current_logfiles
nginx_logpath: /mnt/current_logfiles
#PersistentVolumeClaims
pvcname: pvc_name

#NGINX Cache Durations
#Note: Durations can be in seconds(s), minutes(m), or hours(h).
nginx:
cache:
gt_status_valid: 1h #For /globalTagStatus
global_tag_valid: 1s #For /globalTags