Skip to content

Commit 4535744

Browse files
committed
fix: add protocol to default opamp url
1 parent ffc26bb commit 4535744

File tree

2 files changed

+33
-2
lines changed

2 files changed

+33
-2
lines changed

charts/hdx-oss-v2/templates/otel-collector-deployment.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ spec:
3737
value: "{{ .Values.otel.clickhousePrometheusEndpoint | default (printf "%s-clickhouse:%v" (include "hdx-oss.fullname" .) .Values.clickhouse.prometheus.port ) }}"
3838
{{- end }}
3939
- name: OPAMP_SERVER_URL
40-
value: {{ .Values.otel.opampServerUrl | default (printf "%s-app:%v" (include "hdx-oss.fullname" .) .Values.hyperdx.opampPort ) }}
40+
value: {{ .Values.otel.opampServerUrl | default (printf "http://%s-app:%v" (include "hdx-oss.fullname" .) .Values.hyperdx.opampPort ) }}
4141
- name: HYPERDX_LOG_LEVEL
4242
value: {{ .Values.hyperdx.logLevel }}
4343
- name: HYPERDX_API_KEY

charts/hdx-oss-v2/tests/otel-collector_test.yaml

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,12 @@ tests:
8888
content:
8989
name: CLICKHOUSE_PASSWORD
9090
value: test-password
91+
- documentIndex: 0
92+
contains:
93+
path: spec.template.spec.containers[0].env
94+
content:
95+
name: OPAMP_SERVER_URL
96+
value: http://test-release-hdx-oss-v2-app:4320
9197

9298
- it: should render environment variables correctly with custom clickhouse endpoint
9399
set:
@@ -276,4 +282,29 @@ tests:
276282
notContains:
277283
path: spec.template.spec.containers[0].env
278284
content:
279-
name: CLICKHOUSE_PROMETHEUS_METRICS_ENDPOINT
285+
name: CLICKHOUSE_PROMETHEUS_METRICS_ENDPOINT
286+
287+
- it: should render OPAMP_SERVER_URL with custom value when specified
288+
set:
289+
otel:
290+
enabled: true
291+
image: hyperdx/hyperdx-otel-collector:2-beta
292+
opampServerUrl: "https://custom-opamp-server:8080"
293+
hyperdx:
294+
logLevel: info
295+
clickhouse:
296+
config:
297+
users:
298+
otelUserPassword: test-password
299+
release:
300+
name: test-release
301+
asserts:
302+
- documentIndex: 0
303+
isKind:
304+
of: Deployment
305+
- documentIndex: 0
306+
contains:
307+
path: spec.template.spec.containers[0].env
308+
content:
309+
name: OPAMP_SERVER_URL
310+
value: "https://custom-opamp-server:8080"

0 commit comments

Comments
 (0)