Skip to content

Commit 10737b0

Browse files
authored
fix: Allow for frontend url to be explicitly configured (#101)
Fixes: HDX-2201 * Removes appUrl from config * Removes logic that would render frontendurl conditionally * Updated tests * Update readme
1 parent 0b82b9a commit 10737b0

File tree

6 files changed

+21
-63
lines changed

6 files changed

+21
-63
lines changed

.changeset/polite-bats-exercise.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"helm-charts": minor
3+
---
4+
5+
fix: Allow for frontend url to be explicitly configured

.github/workflows/chart-test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ jobs:
7272
cat > test-values.yaml << EOF
7373
hyperdx:
7474
apiKey: "test-api-key-for-ci"
75-
appUrl: "http://localhost:3000"
75+
frontendUrl: "http://localhost:3000"
7676
replicas: 1
7777
7878
clickhouse:

README.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -252,15 +252,15 @@ hyperdx:
252252
host: "hyperdx.yourdomain.com" # Set this to your desired domain
253253
```
254254

255-
#### Configuring `ingress.host` and `hyperdx.appUrl`
255+
#### Configuring `ingress.host` and `hyperdx.frontendUrl`
256256

257257
- **`hyperdx.ingress.host`**: Set to the domain you want to use for accessing HyperDX (e.g., `hyperdx.yourdomain.com`).
258-
- **`hyperdx.appUrl`**: Should match the ingress host and include the protocol (e.g., `https://hyperdx.yourdomain.com`).
258+
- **`hyperdx.frontendUrl`**: Should match the ingress host and include the protocol (e.g., `https://hyperdx.yourdomain.com`).
259259

260260
**Example:**
261261
```yaml
262262
hyperdx:
263-
appUrl: "https://hyperdx.yourdomain.com"
263+
frontendUrl: "https://hyperdx.yourdomain.com"
264264
ingress:
265265
enabled: true
266266
host: "hyperdx.yourdomain.com"
@@ -323,7 +323,7 @@ spec:
323323

324324
- **Path and Rewrite Configuration:**
325325
- For Next.js and other SPAs, always use a regex path and rewrite annotation as shown above. Do not use just `path: /` without a rewrite, as this will break static asset serving.
326-
- **Mismatched `appUrl` and `ingress.host`:**
326+
- **Mismatched `frontendUrl` and `ingress.host`:**
327327
- If these do not match, you may experience issues with cookies, redirects, and asset loading.
328328
- **TLS Misconfiguration:**
329329
- Ensure your TLS secret is valid and referenced correctly in the ingress.
@@ -448,7 +448,7 @@ Use the fully qualified domain name (FQDN) for the OpAMP server URL:
448448

449449
```bash
450450
helm install my-hyperdx hyperdx/hdx-oss-v2 \
451-
--set hyperdx.appUrl="http://your-external-ip-or-domain.com" \
451+
--set hyperdx.frontendUrl="http://your-external-ip-or-domain.com" \
452452
--set otel.opampServerUrl="http://my-hyperdx-hdx-oss-v2-app.default.svc.cluster.local:4320"
453453
```
454454

@@ -457,7 +457,7 @@ helm install my-hyperdx hyperdx/hdx-oss-v2 \
457457
```yaml
458458
# values-gke.yaml
459459
hyperdx:
460-
appUrl: "http://34.123.61.99" # Use your LoadBalancer external IP
460+
frontendUrl: "http://34.123.61.99" # Use your LoadBalancer external IP
461461
462462
otel:
463463
opampServerUrl: "http://my-hyperdx-hdx-oss-v2-app.default.svc.cluster.local:4320"
@@ -477,7 +477,7 @@ For EKS deployments, consider these common configurations:
477477
```yaml
478478
# values-eks.yaml
479479
hyperdx:
480-
appUrl: "http://your-alb-domain.com"
480+
frontendUrl: "http://your-alb-domain.com"
481481
482482
# EKS typically uses these pod CIDRs
483483
clickhouse:
@@ -502,7 +502,7 @@ For AKS deployments:
502502
```yaml
503503
# values-aks.yaml
504504
hyperdx:
505-
appUrl: "http://your-azure-lb.com"
505+
frontendUrl: "http://your-azure-lb.com"
506506
507507
# AKS pod networking
508508
clickhouse:
@@ -514,7 +514,7 @@ clickhouse:
514514

515515
### Production Cloud Deployment Checklist
516516

517-
- [ ] Configure proper `appUrl` with your external domain/IP
517+
- [ ] Configure proper `frontendUrl` with your external domain/IP
518518
- [ ] Set up ingress with TLS for HTTPS access
519519
- [ ] Override `otel.opampServerUrl` with FQDN if experiencing connection issues
520520
- [ ] Adjust `clickhouse.config.clusterCidrs` for your pod network CIDR

charts/hdx-oss-v2/templates/configmaps/app-configmap.yaml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,9 @@ metadata:
77
data:
88
APP_PORT: {{ .Values.hyperdx.appPort | quote }}
99
API_PORT: {{ .Values.hyperdx.apiPort | quote }}
10-
{{- if .Values.hyperdx.ingress.enabled }}
11-
FRONTEND_URL: "{{ if .Values.hyperdx.ingress.tls.enabled }}https{{ else }}http{{ end }}://{{ .Values.hyperdx.ingress.host }}"
12-
{{- else }}
13-
FRONTEND_URL: "{{ .Values.hyperdx.appUrl }}:{{ .Values.hyperdx.appPort }}"
14-
{{- end }}
10+
FRONTEND_URL: "{{ tpl .Values.hyperdx.frontendUrl . }}"
1511
HYPERDX_API_PORT: "{{ .Values.hyperdx.apiPort }}"
1612
HYPERDX_APP_PORT: "{{ .Values.hyperdx.appPort }}"
17-
HYPERDX_APP_URL: "{{ .Values.hyperdx.appUrl }}"
1813
HYPERDX_LOG_LEVEL: "{{ .Values.hyperdx.logLevel }}"
1914
MINER_API_URL: "http://{{ include "hdx-oss.fullname" . }}-miner:5123"
2015
MONGO_URI: "{{ tpl .Values.hyperdx.mongoUri . }}"

charts/hdx-oss-v2/tests/configmap_test.yaml

Lines changed: 1 addition & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ tests:
77
hyperdx:
88
apiPort: 8000
99
appPort: 3000
10-
appUrl: http://localhost
10+
frontendUrl: http://localhost:3000
1111
logLevel: info
1212
usageStatsEnabled: true
1313
mongodb:
@@ -41,48 +41,3 @@ tests:
4141
- matchRegex:
4242
path: data.MONGO_URI
4343
pattern: mongodb://.*-mongodb:27017/hyperdx
44-
45-
- it: should use ingress URL for FRONTEND_URL when ingress is enabled
46-
set:
47-
hyperdx:
48-
apiPort: 8000
49-
appPort: 3000
50-
appUrl: http://localhost
51-
ingress:
52-
enabled: true
53-
host: hyperdx.example.com
54-
tls:
55-
enabled: false
56-
asserts:
57-
- equal:
58-
path: data.FRONTEND_URL
59-
value: "http://hyperdx.example.com"
60-
61-
- it: should use ingress HTTPS URL for FRONTEND_URL when TLS is enabled
62-
set:
63-
hyperdx:
64-
apiPort: 8000
65-
appPort: 3000
66-
appUrl: http://localhost
67-
ingress:
68-
enabled: true
69-
host: hyperdx.example.com
70-
tls:
71-
enabled: true
72-
asserts:
73-
- equal:
74-
path: data.FRONTEND_URL
75-
value: "https://hyperdx.example.com"
76-
77-
- it: should fallback to appUrl:port when ingress is disabled
78-
set:
79-
hyperdx:
80-
apiPort: 8000
81-
appPort: 4000
82-
appUrl: http://custom-host
83-
ingress:
84-
enabled: false
85-
asserts:
86-
- equal:
87-
path: data.FRONTEND_URL
88-
value: "http://custom-host:4000"

charts/hdx-oss-v2/values.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,9 @@ hyperdx:
4343
apiPort: 8000
4444
appPort: 3000
4545
opampPort: 4320
46-
appUrl: "http://localhost"
46+
# The URL that will be use to access the frontend. Defaults to the http://localhost:appPort.
47+
# If you have an ingress enabled, you should set this to the ingress host with the protocol. E.g. https://hdx-my-domain.com
48+
frontendUrl: http://localhost:{{ .Values.hyperdx.appPort }}
4749
logLevel: "info"
4850
usageStatsEnabled: true
4951
# Endpoint to send hyperdx logs/traces/metrics to.Defaults to the chart's otel collector endpoint.
@@ -182,6 +184,7 @@ hyperdx:
182184
enabled: false
183185
ingressClassName: nginx
184186
annotations: {}
187+
# The host to use for the ingress. Defaults to localhost. Be sure to update hyperdx.frontendUrl with this host value + protocol
185188
host: "localhost" # Production domain
186189
path: "/(.*)"
187190
pathType: "ImplementationSpecific"

0 commit comments

Comments
 (0)