Skip to content

Commit 39d37c5

Browse files
authored
fix typo (#50)
I had a mistake before https://github.com/hyperdxio/helm-charts/pull/29/files#diff-a32468ffc6e97c35e5d2cf46c1793d0bcd937a43703fded1b89605571f1e7e78R31 If MongoDB is disabled, the initContainer should be removed, but I did the opposite. So fixed this.
1 parent e98126d commit 39d37c5

File tree

3 files changed

+28
-1
lines changed

3 files changed

+28
-1
lines changed

.changeset/cruel-trees-join.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"helm-charts": patch
3+
---
4+
5+
fix if condition typo

charts/hdx-oss-v2/templates/hyperdx-deployment.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ spec:
2828
{{- end -}}
2929
{{- end }}
3030
spec:
31-
{{- if not .Values.mongodb.enabled }}
31+
{{- if .Values.mongodb.enabled }}
3232
initContainers:
3333
- name: wait-for-mongodb
3434
image: busybox

charts/hdx-oss-v2/tests/hyperdx-deployment_test.yaml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,3 +107,25 @@ tests:
107107
- equal:
108108
path: spec.template.spec.containers[0].ports[2].containerPort
109109
value: 5320
110+
- it: should include initContainers when mongodb.enabled is true
111+
set:
112+
mongodb:
113+
enabled: true
114+
asserts:
115+
- isNotEmpty:
116+
path: spec.template.spec.initContainers
117+
- equal:
118+
path: spec.template.spec.initContainers[0].name
119+
value: wait-for-mongodb
120+
- equal:
121+
path: spec.template.spec.initContainers[0].image
122+
value: busybox
123+
- contains:
124+
path: spec.template.spec.initContainers[0].command
125+
content: sh
126+
- contains:
127+
path: spec.template.spec.initContainers[0].command
128+
content: -c
129+
- matchRegex:
130+
path: spec.template.spec.initContainers[0].command[2]
131+
pattern: "until nc -z .+-mongodb [0-9]+; do echo waiting for mongodb; sleep 2; done;"

0 commit comments

Comments
 (0)