Skip to content
Merged
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/conditional-app-suffix.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"helm-charts": patch
---

Make the `-app` suffix on HyperDX Deployment and Service names conditional on `fullnameOverride`. When `fullnameOverride` is set, the suffix is omitted so users get full control over resource naming. The default behavior (no override) is unchanged.
2 changes: 1 addition & 1 deletion charts/clickstack/templates/NOTES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Application Access:
--set hyperdx.ingress.tls.enabled=true

2. Port Forward (Development/Testing):
kubectl port-forward svc/{{ include "clickstack.fullname" . }}-app {{ .Values.hyperdx.ports.app }}:{{ .Values.hyperdx.ports.app }}
kubectl port-forward svc/{{ include "clickstack.hyperdx.fullname" . }} {{ .Values.hyperdx.ports.app }}:{{ .Values.hyperdx.ports.app }}
Then access: http://localhost:{{ .Values.hyperdx.ports.app }}

Note: This application handles sensitive telemetry data and should not be exposed
Expand Down
13 changes: 13 additions & 0 deletions charts/clickstack/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,19 @@ Create a default fully qualified app name.
{{- end }}
{{- end }}

{{/*
HyperDX app resource name. When fullnameOverride is set the user expects full
control over naming, so the -app suffix is omitted. Without the override the
suffix is kept for backward compatibility.
*/}}
{{- define "clickstack.hyperdx.fullname" -}}
{{- if .Values.fullnameOverride -}}
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
{{- else -}}
{{- printf "%s-app" (include "clickstack.fullname" .) -}}
{{- end -}}
{{- end -}}

{{/*
Create chart name and version as used by the chart label.
*/}}
Expand Down
2 changes: 1 addition & 1 deletion charts/clickstack/templates/hyperdx/deployment.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "clickstack.fullname" . }}-app
name: {{ include "clickstack.hyperdx.fullname" . }}
labels:
{{- include "clickstack.labels" . | nindent 4 }}
app: {{ include "clickstack.fullname" . }}
Expand Down
4 changes: 2 additions & 2 deletions charts/clickstack/templates/hyperdx/ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: {{ include "clickstack.fullname" . }}-app-ingress
name: {{ include "clickstack.hyperdx.fullname" . }}-ingress
labels:
{{- include "clickstack.labels" . | nindent 4 }}
annotations:
Expand Down Expand Up @@ -37,7 +37,7 @@ spec:
pathType: {{ .Values.hyperdx.ingress.pathType | default "ImplementationSpecific" }}
backend:
service:
name: {{ include "clickstack.fullname" . }}-app
name: {{ include "clickstack.hyperdx.fullname" . }}
port:
number: {{ .Values.hyperdx.ports.app }}
{{- range .Values.hyperdx.ingress.additionalIngresses}}
Expand Down
2 changes: 1 addition & 1 deletion charts/clickstack/templates/hyperdx/service.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: v1
kind: Service
metadata:
name: {{ include "clickstack.fullname" . }}-app
name: {{ include "clickstack.hyperdx.fullname" . }}
labels:
{{- include "clickstack.labels" . | nindent 4 }}
{{- if .Values.hyperdx.service.annotations }}
Expand Down
12 changes: 10 additions & 2 deletions charts/clickstack/tests/helpers_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,16 @@ tests:
asserts:
- equal:
path: metadata.name
value: direct-override-app

value: direct-override

- it: should not append -app suffix when fullnameOverride is set
set:
fullnameOverride: hyperdx-api
asserts:
- equal:
path: metadata.name
value: hyperdx-api

- it: should render common labels correctly
asserts:
- matchRegex:
Expand Down
2 changes: 1 addition & 1 deletion charts/clickstack/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ hyperdx:
CLICKHOUSE_ENDPOINT: 'tcp://{{ include "clickstack.clickhouse.svc" . }}:{{ .Values.clickhouse.nativePort }}?dial_timeout=10s'
CLICKHOUSE_SERVER_ENDPOINT: '{{ include "clickstack.clickhouse.svc" . }}:{{ .Values.clickhouse.nativePort }}'
CLICKHOUSE_PROMETHEUS_METRICS_ENDPOINT: '{{ include "clickstack.clickhouse.svc" . }}:{{ .Values.clickhouse.prometheus.port }}'
OPAMP_SERVER_URL: 'http://{{ include "clickstack.fullname" . }}-app:{{ .Values.hyperdx.ports.opamp }}'
OPAMP_SERVER_URL: 'http://{{ include "clickstack.hyperdx.fullname" . }}:{{ .Values.hyperdx.ports.opamp }}'

# ── K8s Secret (clickstack-secret) ───────────────────────
# Shared sensitive environment variables. Used by HyperDX and OTEL collector via envFrom.
Expand Down
4 changes: 2 additions & 2 deletions examples/alb-ingress/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ additionalManifests:
pathType: Prefix
backend:
service:
name: '{{ include "clickstack.fullname" . }}-app'
name: '{{ include "clickstack.hyperdx.fullname" . }}'
port:
name: app

Expand Down Expand Up @@ -101,7 +101,7 @@ additionalManifests:
scaleTargetRef:
apiVersion: apps/v1
kind: Deployment
name: '{{ include "clickstack.fullname" . }}-app'
name: '{{ include "clickstack.hyperdx.fullname" . }}'
minReplicas: 2
maxReplicas: 10
metrics:
Expand Down
Loading