Skip to content

Commit

Permalink
Merge pull request #3570 from kubecost/avr/eng-235
Browse files Browse the repository at this point in the history
alerts NGINX routing to aggregator pod
  • Loading branch information
avrodrigues5 authored Aug 6, 2024
2 parents c9bfb32 + d7b1bcf commit e12c9b8
Showing 1 changed file with 35 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1203,6 +1203,41 @@ data:
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}

# alert end points with v2 will be routed to aggregator server
location = /model/v2/alerts {
proxy_read_timeout {{ .Values.kubecostFrontend.timeoutSeconds | default 300 }};
proxy_pass http://aggregator/alerts;
proxy_redirect off;
proxy_set_header Connection "";
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
location ~* ^/model/v2/alerts/(.*) {
proxy_read_timeout {{ .Values.kubecostFrontend.timeoutSeconds | default 300 }};
proxy_pass http://aggregator/alerts/$1;
proxy_redirect off;
proxy_set_header Connection "";
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
# alert end points without any version will be routed to model server
location = /model/alerts {
proxy_read_timeout {{ .Values.kubecostFrontend.timeoutSeconds | default 300 }};
proxy_pass http://model/alerts;
proxy_redirect off;
proxy_set_header Connection "";
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
location ~* ^/model/alerts/(.*) {
proxy_read_timeout {{ .Values.kubecostFrontend.timeoutSeconds | default 300 }};
proxy_pass http://model/alerts/$1;
proxy_redirect off;
proxy_set_header Connection "";
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
{{- end }}
location = /model/hideOrphanedResources {
default_type 'application/json';
Expand Down

0 comments on commit e12c9b8

Please sign in to comment.