|
180 | 180 |
|
181 | 181 | {{- define "common.collector_endpoint" }}
|
182 | 182 | {{- $regions := fromYaml (include "common.regions" .) }}
|
183 |
| - {{- if ne "custom" .Values.sysdig_endpoint.region }} |
184 |
| - {{- get (get $regions .Values.sysdig_endpoint.region) "collector_endpoint" }} |
| 183 | + {{- if and (ne "custom" .Values.sysdig_endpoint.region) (not .Values.sysdig_endpoint.collector.host) }} |
| 184 | + {{- get (get $regions .Values.sysdig_endpoint.region) "collector_endpoint" }} |
185 | 185 | {{- else }}
|
186 | 186 | {{- .Values.sysdig_endpoint.collector.host }}
|
187 | 187 | {{- end }}
|
188 | 188 | {{- end }}
|
189 | 189 |
|
190 | 190 | {{- define "common.monitor_api_endpoint" }}
|
191 | 191 | {{- $regions := fromYaml (include "common.regions" .) }}
|
192 |
| - {{- if hasKey $regions .Values.sysdig_endpoint.region }} |
| 192 | + {{- if and (ne "custom" .Values.sysdig_endpoint.region) (not .Values.sysdig_endpoint.api_url) }} |
193 | 193 | {{- get (get $regions .Values.sysdig_endpoint.region) "monitor_api_endpoint" }}
|
194 | 194 | {{- else }}
|
195 | 195 | {{- .Values.sysdig_endpoint.api_url }}
|
|
198 | 198 |
|
199 | 199 | {{- define "common.secure_api_endpoint" }}
|
200 | 200 | {{- $regions := fromYaml (include "common.regions" .) }}
|
201 |
| - {{- if ne "custom" .Values.sysdig_endpoint.region }} |
| 201 | + {{- if and (ne "custom" .Values.sysdig_endpoint.region) (not .Values.sysdig_endpoint.api_url) }} |
202 | 202 | {{- get (get $regions .Values.sysdig_endpoint.region) "secure_api_endpoint" }}
|
203 | 203 | {{- else }}
|
204 |
| - {{- .Values.sysdig_endpoint.api_url }} |
| 204 | + {{- .Values.sysdig_endpoint.api_url }} |
205 | 205 | {{- end }}
|
206 | 206 | {{- end }}
|
207 | 207 |
|
208 | 208 | {{- define "common.secure_ui" }}
|
209 | 209 | {{- $regions := fromYaml (include "common.regions" .) }}
|
210 |
| - {{- if ne "custom" .Values.sysdig_endpoint.region }} |
| 210 | + {{- if and (ne "custom" .Values.sysdig_endpoint.region) (not .Values.sysdig_endpoint.api_url) }} |
211 | 211 | {{- get (get $regions .Values.sysdig_endpoint.region) "secure_ui" }}
|
212 | 212 | {{- else }}
|
213 |
| - {{- .Values.sysdig_endpoint.api_url}} |
| 213 | + {{- .Values.sysdig_endpoint.api_url }} |
214 | 214 | {{- end }}
|
215 | 215 | {{- end }}
|
0 commit comments