Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions charts/hdx-oss-v2/templates/hyperdx-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ spec:
{{- if .Values.mongodb.enabled }}
initContainers:
- name: wait-for-mongodb
image: "busybox@sha256:1fcf5df59121b92d61e066df1788e8df0cc35623f5d62d9679a41e163b6a0cdb"
imagePullPolicy: IfNotPresent
image: {{ .Values.hyperdx.waitForMongodb.image }}
imagePullPolicy: {{ .Values.hyperdx.waitForMongodb.pullPolicy }}
command: ['sh', '-c', 'until nc -z {{ include "hdx-oss.fullname" . }}-mongodb {{ .Values.mongodb.port }}; do echo waiting for mongodb; sleep 2; done;']
{{- end }}
containers:
Expand Down
21 changes: 20 additions & 1 deletion charts/hdx-oss-v2/tests/hyperdx-deployment_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,9 @@ tests:
- equal:
path: spec.template.spec.initContainers[0].image
value: busybox@sha256:1fcf5df59121b92d61e066df1788e8df0cc35623f5d62d9679a41e163b6a0cdb
- equal:
path: spec.template.spec.initContainers[0].imagePullPolicy
value: IfNotPresent
- contains:
path: spec.template.spec.initContainers[0].command
content: sh
Expand All @@ -130,6 +133,22 @@ tests:
path: spec.template.spec.initContainers[0].command[2]
pattern: "until nc -z .+-mongodb [0-9]+; do echo waiting for mongodb; sleep 2; done;"

- it: should allow overriding initContainer image and pullPolicy
set:
mongodb:
enabled: true
hyperdx:
waitForMongodb:
image: busybox:1.36.1
pullPolicy: Always
asserts:
- equal:
path: spec.template.spec.initContainers[0].image
value: busybox:1.36.1
- equal:
path: spec.template.spec.initContainers[0].imagePullPolicy
value: Always

- it: should include livenessProbe with default values when enabled
asserts:
- isSubset:
Expand Down Expand Up @@ -269,4 +288,4 @@ tests:
value: private-registry-secret
- lengthEqual:
path: spec.template.spec.imagePullSecrets
count: 3
count: 3
4 changes: 4 additions & 0 deletions charts/hdx-oss-v2/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ hyperdx:
repository: docker.hyperdx.io/hyperdx/hyperdx
tag:
pullPolicy: IfNotPresent
waitForMongodb:
# Image used by the init container that waits for MongoDB to be reachable.
image: "busybox@sha256:1fcf5df59121b92d61e066df1788e8df0cc35623f5d62d9679a41e163b6a0cdb"
pullPolicy: IfNotPresent
livenessProbe:
enabled: true
initialDelaySeconds: 10
Expand Down