6767 return 200 'alive';
6868 }
6969
70+ {{- if .Values.distributor.enabled }}
71+
7072 # Distributor Config
7173 location = /ring {
7274 proxy_pass http://{{ template "cortex.fullname" . }}-distributor.{{ $rootDomain }}$request_uri;
8587 proxy_pass http://{{ template "cortex.fullname" . }}-distributor.{{ $rootDomain }}$request_uri;
8688 }
8789
90+ {{- end }}
91+
92+ {{- if .Values.alertmanager.enabled }}
93+
8894 # Alertmanager Config
8995 location ~ /api/prom/alertmanager/.* {
9096 proxy_pass http://{{ template "cortex.fullname" . }}-alertmanager.{{ $rootDomain }}$request_uri;
@@ -102,6 +108,10 @@ data:
102108 proxy_pass http://{{ template "cortex.fullname" . }}-alertmanager.{{ $rootDomain }}/api/v1/alerts;
103109 }
104110
111+ {{- end }}
112+
113+ {{- if .Values.ruler.enabled }}
114+
105115 # Ruler Config
106116 location ~ /api/v1/rules {
107117 proxy_pass http://{{ template "cortex.fullname" . }}-ruler.{{ $rootDomain }}$request_uri;
@@ -115,11 +125,19 @@ data:
115125 proxy_pass http://{{ template "cortex.fullname" . }}-ruler.{{ $rootDomain }}$request_uri;
116126 }
117127
128+ {{- end }}
129+
130+ {{- if .Values.configs.enabled }}
131+
118132 # Config Config
119133 location ~ /api/prom/configs/.* {
120134 proxy_pass http://{{ template "cortex.fullname" . }}-configs.{{ $rootDomain }}$request_uri;
121135 }
122136
137+ {{- end }}
138+
139+ {{- if .Values.query_frontend.enabled }}
140+
123141 # Query Config
124142 location ~ /api/prom/.* {
125143 proxy_pass http://{{ template "cortex.fullname" . }}-query-frontend.{{ $rootDomain }}$request_uri;
@@ -133,6 +151,9 @@ data:
133151 location ~ {{.Values.config.api.prometheus_http_prefix}}/api/v1/label/.* {
134152 proxy_pass http://{{ template "cortex.fullname" . }}-query-frontend.{{ $rootDomain }}$request_uri;
135153 }
154+
155+ {{- end }}
156+
136157 {{- if and (.Values.config.auth_enabled) (.Values.nginx.config.auth_orgs) }}
137158 # Auth orgs
138159 {{- range $org := compact .Values.nginx.config.auth_orgs | uniq }}
0 commit comments