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
5 changes: 5 additions & 0 deletions .changeset/goofy-beers-punch.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"helm-charts": minor
---

feat: support custom command and args for container
8 changes: 8 additions & 0 deletions charts/clickstack/templates/hyperdx/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,14 @@ spec:
- name: app
image: "{{ .Values.hyperdx.deployment.image.repository }}:{{ .Values.hyperdx.deployment.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.hyperdx.deployment.image.pullPolicy }}
{{- if .Values.hyperdx.deployment.command }}
command:
{{- toYaml .Values.hyperdx.deployment.command | nindent 12 }}
{{- end }}
{{- if .Values.hyperdx.deployment.args }}
args:
{{- toYaml .Values.hyperdx.deployment.args | nindent 12 }}
{{- end }}
ports:
- name: app-port
containerPort: {{ .Values.hyperdx.ports.app }}
Expand Down
41 changes: 41 additions & 0 deletions charts/clickstack/tests/hyperdx-deployment_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,47 @@ tests:
name: ANOTHER_ENV
value: "another-value"

- it: should not include command and args by default
asserts:
- isNull:
path: spec.template.spec.containers[0].command
- isNull:
path: spec.template.spec.containers[0].args

- it: should render custom command when provided
set:
hyperdx:
deployment:
command:
- sh
- -c
- "echo hello"
asserts:
- equal:
path: spec.template.spec.containers[0].command[0]
value: sh
- equal:
path: spec.template.spec.containers[0].command[1]
value: -c
- equal:
path: spec.template.spec.containers[0].command[2]
value: "echo hello"

- it: should render custom args when provided
set:
hyperdx:
deployment:
args:
- "--env"
- "prod"
asserts:
- equal:
path: spec.template.spec.containers[0].args[0]
value: --env
- equal:
path: spec.template.spec.containers[0].args[1]
value: prod

- it: should expose OpAMP container port with default values
asserts:
- equal:
Expand Down
2 changes: 2 additions & 0 deletions charts/clickstack/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ hyperdx:
repository: docker.hyperdx.io/hyperdx/hyperdx
tag:
pullPolicy: IfNotPresent
command: []
args: []
replicas: 1 # ignored when autoscaling.enabled is true (HPA manages replicas)
resources: {}
livenessProbe:
Expand Down