Skip to content

Commit 1a1cb5d

Browse files
author
WilliamCassanova
authored
Exclude cortex components endpoint from nginx config when disabled (#326)
* Exclude cortex components endpoint from nginx config when disabled Signed-off-by: Bill Cassanova <[email protected]>
1 parent c01d9ed commit 1a1cb5d

File tree

2 files changed

+23
-1
lines changed

2 files changed

+23
-1
lines changed

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
## master / unreleased
44

55
* [ENHANCEMENT] Includes enable flags for each component #319
6+
* [ENHANCEMENT] Exclude cortex components endpoint from nginx config when disabled #326
67

78
## 1.3.0 / 2022-02-10
89

@@ -39,8 +40,8 @@
3940
* [BUGFIX] alertmanager/ruler deployment: fix indentation #266
4041

4142
## 1.0.0 / 2021-11-25
42-
### This Release includes BREAKING CHANGES
4343

44+
### This Release includes BREAKING CHANGES
4445

4546
* [FEATURE] Add autoscaler for nginx #249
4647
* [FEATURE] Add in lifecycle for querier, querier-frontend, and distributor #243

templates/nginx/nginx-config.yaml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,8 @@ data:
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;
@@ -85,6 +87,10 @@ data:
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

Comments
 (0)