File tree Expand file tree Collapse file tree 2 files changed +52
-10
lines changed
components/konflux-ui/staging/base/proxy Expand file tree Collapse file tree 2 files changed +52
-10
lines changed Original file line number Diff line number Diff line change 3434 }
3535
3636 server {
37- listen 8888 ;
3837 listen 9443 ssl ;
3938 ssl_certificate /mnt/tls.crt;
4039 ssl_certificate_key /mnt/tls.key;
@@ -46,12 +45,6 @@ http {
4645 try_files $uri /index .html;
4746 }
4847
49- location /nginx_status {
50- stub_status ;
51- allow 127.0.0.1 ;
52- deny all;
53- }
54-
5548 location = /404 .html {
5649 }
5750
@@ -136,4 +129,20 @@ http {
136129
137130 include /mnt/nginx-additional-location -configs/*.conf;
138131 }
132+
133+ server {
134+ listen 9090 ;
135+ server_name _;
136+
137+ location /metrics {
138+ stub_status on;
139+ access_log off;
140+ allow all;
141+ }
142+
143+ location /health {
144+ return 200 'healthy' ;
145+ add_header Content-Type text/plain;
146+ }
147+ }
139148}
Original file line number Diff line number Diff line change @@ -117,9 +117,6 @@ spec:
117117 - containerPort : 8080
118118 name : web
119119 protocol : TCP
120- - containerPort : 8888
121- name : web-metrics
122- protocol : TCP
123120 - containerPort : 9443
124121 name : web-tls
125122 protocol : TCP
@@ -215,6 +212,26 @@ spec:
215212 secretName : proxy
216213 - name : static-content
217214 emptyDir : {}
215+ - image : nginx/nginx-prometheus-exporter:1.1.0
216+ name : nginx-prometheus-exporter
217+ args :
218+ - -nginx.scrape-uri=http://localhost:9090/metrics
219+ - -web.listen-address=:9113
220+ ports :
221+ - containerPort : 9113
222+ name : exporter
223+ protocol : TCP
224+ resources :
225+ limits :
226+ cpu : 100m
227+ memory : 64Mi
228+ requests :
229+ cpu : 10m
230+ memory : 32Mi
231+ securityContext :
232+ readOnlyRootFilesystem : true
233+ runAsNonRoot : true
234+ runAsUser : 1001
218235---
219236apiVersion : v1
220237kind : Service
@@ -303,3 +320,19 @@ subjects:
303320- kind : ServiceAccount
304321 name : proxy
305322 namespace : konflux-ui
323+ ---
324+ apiVersion : monitoring.coreos.com/v1
325+ kind : ServiceMonitor
326+ metadata :
327+ name : proxy-nginx-metrics
328+ labels :
329+ app : proxy
330+ spec :
331+ endpoints :
332+ - port : exporter
333+ path : /metrics
334+ interval : 30s
335+ scheme : http
336+ selector :
337+ matchLabels :
338+ app : proxy
You can’t perform that action at this time.
0 commit comments