From b29c9d397ef7c6548f23515f5037fc29e1a6dce5 Mon Sep 17 00:00:00 2001 From: Simon K <6615834+simon-20@users.noreply.github.com> Date: Thu, 22 Aug 2024 13:09:40 +0100 Subject: [PATCH 1/2] fix: serve metrics over single port --- nginx-reverse-proxy/nginx.conf | 84 ++++++---------------------------- 1 file changed, 15 insertions(+), 69 deletions(-) diff --git a/nginx-reverse-proxy/nginx.conf b/nginx-reverse-proxy/nginx.conf index 01201cb..79a7d6d 100644 --- a/nginx-reverse-proxy/nginx.conf +++ b/nginx-reverse-proxy/nginx.conf @@ -29,92 +29,38 @@ http { server_name _; - location / { + location /c1_refresh { + rewrite ^/c1_refresh(.*)$ /$1 break; proxy_pass http://localhost:9091; } - auth_basic "Unified Pipelne Metrics Exporter - Refresh"; - auth_basic_user_file htpasswd; - } - - server { - listen 9159; - listen [::]:9159; - - root /var/www/html; - - server_name _; - - location / { + location /c2_validate { + rewrite ^/c2_validate(.*)$ /$1 break; proxy_pass http://localhost:9092; } - auth_basic "Unified Pipelne Metrics Exporter - Validate"; - auth_basic_user_file htpasswd; - } - - server { - listen 9160; - listen [::]:9160; - - root /var/www/html; - - server_name _; - - location / { + location /c3_clean { + rewrite ^/c3_clean(.*)$ /$1 break; proxy_pass http://localhost:9093; } - auth_basic "Unified Pipelne Metrics Exporter - Clean"; - auth_basic_user_file htpasswd; - } - - server { - listen 9161; - listen [::]:9161; - - root /var/www/html; - - server_name _; - - location / { + location /c4_flatten { + rewrite ^/c4_flatten(.*)$ /$1 break; proxy_pass http://localhost:9094; } - auth_basic "Unified Pipelne Metrics Exporter - Flatten"; - auth_basic_user_file htpasswd; - } - - server { - listen 9162; - listen [::]:9162; - - root /var/www/html; - - server_name _; - - location / { + location /c5_lakify { + rewrite ^/c5_lakify(.*)$ /$1 break; proxy_pass http://localhost:9095; } - auth_basic "Unified Pipelne Metrics Exporter - Lakify"; - auth_basic_user_file htpasswd; - } - - server { - listen 9163; - listen [::]:9163; - - root /var/www/html; - - server_name _; - - location / { + location /c6_solrize { + rewrite ^/c6_solrize(.*)$ /$1 break; proxy_pass http://localhost:9096; } - auth_basic "Unified Pipelne Metrics Exporter - Solrize"; + auth_basic "Unified Pipelne Metrics Exporters"; auth_basic_user_file htpasswd; - } + } + } - From 8bb7e2e04f6813f07b3a42df50d786552fe481fc Mon Sep 17 00:00:00 2001 From: Simon K <6615834+simon-20@users.noreply.github.com> Date: Thu, 22 Aug 2024 13:11:44 +0100 Subject: [PATCH 2/2] deployment: alter to expose single nginx port --- deployment/deployment.yml | 21 +-------------------- 1 file changed, 1 insertion(+), 20 deletions(-) diff --git a/deployment/deployment.yml b/deployment/deployment.yml index 3b7c56c..3ac0549 100644 --- a/deployment/deployment.yml +++ b/deployment/deployment.yml @@ -298,31 +298,12 @@ properties: # Properties of container group ports: - port: 9158 protocol: TCP - - port: 9159 - protocol: TCP - - port: 9160 - protocol: TCP - - port: 9161 - protocol: TCP - - port: 9162 - protocol: TCP - - port: 9163 - protocol: TCP resources: requests: cpu: 0.1 memoryInGB: 0.6 ipAddress: type: "public" - dnsNameLabel: "#NAME#-#ENVIRONMENT#-1" + dnsNameLabel: "#NAME#-#ENVIRONMENT#" ports: - port: 9158 - - port: 9159 - - port: 9160 - ipAddress: # split across two IPs because there is hard limit of 5-public ports per IP - type: "public" - dnsNameLabel: "#NAME#-#ENVIRONMENT#-2" - ports: - - port: 9161 - - port: 9162 - - port: 9163