From 8ec35149b5f432c08317568c6a7da6246a5a52ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Fr=C3=B6mbgen?= <23717573+mfroembgen@users.noreply.github.com> Date: Tue, 28 Jul 2026 08:33:51 +0200 Subject: [PATCH 1/3] feat: support HyperDX Deployment annotations --- .../expose-hyperdx-deployment-annotations.md | 5 +++++ .../templates/hyperdx/deployment.yaml | 4 ++++ .../tests/hyperdx-deployment_test.yaml | 22 ++++++++++++++++++- charts/clickstack/values.yaml | 3 +++ 4 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 .changeset/expose-hyperdx-deployment-annotations.md diff --git a/.changeset/expose-hyperdx-deployment-annotations.md b/.changeset/expose-hyperdx-deployment-annotations.md new file mode 100644 index 00000000..7416341f --- /dev/null +++ b/.changeset/expose-hyperdx-deployment-annotations.md @@ -0,0 +1,5 @@ +--- +"helm-charts": minor +--- + +Add `hyperdx.deployment.deploymentAnnotations` for setting annotations on the HyperDX Deployment metadata while preserving `hyperdx.deployment.annotations` for pod annotations. diff --git a/charts/clickstack/templates/hyperdx/deployment.yaml b/charts/clickstack/templates/hyperdx/deployment.yaml index 0719d075..16a4d0be 100644 --- a/charts/clickstack/templates/hyperdx/deployment.yaml +++ b/charts/clickstack/templates/hyperdx/deployment.yaml @@ -2,6 +2,10 @@ apiVersion: apps/v1 kind: Deployment metadata: name: {{ include "clickstack.hyperdx.fullname" . }} + {{- with .Values.hyperdx.deployment.deploymentAnnotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} labels: {{- include "clickstack.labels" . | nindent 4 }} app: {{ include "clickstack.fullname" . }} diff --git a/charts/clickstack/tests/hyperdx-deployment_test.yaml b/charts/clickstack/tests/hyperdx-deployment_test.yaml index 3c486e7f..2379996f 100644 --- a/charts/clickstack/tests/hyperdx-deployment_test.yaml +++ b/charts/clickstack/tests/hyperdx-deployment_test.yaml @@ -6,6 +6,8 @@ tests: asserts: - isKind: of: Deployment + - isNull: + path: metadata.annotations - equal: path: spec.replicas value: 1 @@ -42,7 +44,7 @@ tests: path: spec.replicas value: 3 - - it: should add custom annotations when provided + - it: should add custom pod annotations when provided set: hyperdx: deployment: @@ -55,6 +57,24 @@ tests: content: prometheus.io/scrape: "true" prometheus.io/port: "3000" + + - it: should keep deployment and pod annotations separate + set: + hyperdx: + deployment: + deploymentAnnotations: + example.com/configuration: deployment + annotations: + example.com/configuration: pod + asserts: + - isSubset: + path: metadata.annotations + content: + example.com/configuration: deployment + - isSubset: + path: spec.template.metadata.annotations + content: + example.com/configuration: pod - it: should add custom labels when provided set: diff --git a/charts/clickstack/values.yaml b/charts/clickstack/values.yaml index 501eb824..612ff76b 100644 --- a/charts/clickstack/values.yaml +++ b/charts/clickstack/values.yaml @@ -107,6 +107,9 @@ hyperdx: tolerations: [] topologySpreadConstraints: [] priorityClassName: "" + # Annotations applied to the HyperDX Deployment metadata. + deploymentAnnotations: {} + # Annotations applied to the HyperDX pod template metadata. annotations: {} labels: {} env: [] From ff9ef7db1ac56200af7dddfc12ff8e238baca61b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Fr=C3=B6mbgen?= <23717573+mfroembgen@users.noreply.github.com> Date: Tue, 28 Jul 2026 09:08:38 +0200 Subject: [PATCH 2/3] feat: clarify HyperDX annotation values --- .../expose-hyperdx-deployment-annotations.md | 2 +- .../templates/hyperdx/deployment.yaml | 5 +-- .../tests/hyperdx-deployment_test.yaml | 32 +++++++++++++++++-- charts/clickstack/values.yaml | 2 ++ 4 files changed, 36 insertions(+), 5 deletions(-) diff --git a/.changeset/expose-hyperdx-deployment-annotations.md b/.changeset/expose-hyperdx-deployment-annotations.md index 7416341f..d1d8ed5d 100644 --- a/.changeset/expose-hyperdx-deployment-annotations.md +++ b/.changeset/expose-hyperdx-deployment-annotations.md @@ -2,4 +2,4 @@ "helm-charts": minor --- -Add `hyperdx.deployment.deploymentAnnotations` for setting annotations on the HyperDX Deployment metadata while preserving `hyperdx.deployment.annotations` for pod annotations. +Add explicit `hyperdx.deployment.deploymentAnnotations` and `hyperdx.deployment.podAnnotations` values while preserving `hyperdx.deployment.annotations` as a deprecated pod annotation alias. diff --git a/charts/clickstack/templates/hyperdx/deployment.yaml b/charts/clickstack/templates/hyperdx/deployment.yaml index 16a4d0be..7bfc9ecb 100644 --- a/charts/clickstack/templates/hyperdx/deployment.yaml +++ b/charts/clickstack/templates/hyperdx/deployment.yaml @@ -1,3 +1,4 @@ +{{- $podAnnotations := mergeOverwrite (dict) (default (dict) .Values.hyperdx.deployment.annotations) (default (dict) .Values.hyperdx.deployment.podAnnotations) -}} apiVersion: apps/v1 kind: Deployment metadata: @@ -28,8 +29,8 @@ spec: {{- include "clickstack.selectorLabels" . | nindent 8 }} app: {{ include "clickstack.fullname" . }} annotations: - {{- if .Values.hyperdx.deployment.annotations }} - {{- with .Values.hyperdx.deployment.annotations }} + {{- if $podAnnotations }} + {{- with $podAnnotations }} {{- toYaml . | nindent 8 }} {{- end -}} {{- end }} diff --git a/charts/clickstack/tests/hyperdx-deployment_test.yaml b/charts/clickstack/tests/hyperdx-deployment_test.yaml index 2379996f..739eee00 100644 --- a/charts/clickstack/tests/hyperdx-deployment_test.yaml +++ b/charts/clickstack/tests/hyperdx-deployment_test.yaml @@ -44,7 +44,7 @@ tests: path: spec.replicas value: 3 - - it: should add custom pod annotations when provided + - it: should preserve the deprecated annotations alias for pod annotations set: hyperdx: deployment: @@ -58,13 +58,25 @@ tests: prometheus.io/scrape: "true" prometheus.io/port: "3000" + - it: should add custom pod annotations when podAnnotations is provided + set: + hyperdx: + deployment: + podAnnotations: + example.com/pod: "enabled" + asserts: + - isSubset: + path: spec.template.metadata.annotations + content: + example.com/pod: "enabled" + - it: should keep deployment and pod annotations separate set: hyperdx: deployment: deploymentAnnotations: example.com/configuration: deployment - annotations: + podAnnotations: example.com/configuration: pod asserts: - isSubset: @@ -75,6 +87,22 @@ tests: path: spec.template.metadata.annotations content: example.com/configuration: pod + + - it: should prefer podAnnotations over the deprecated annotations alias + set: + hyperdx: + deployment: + annotations: + example.com/configuration: legacy + example.com/legacy: preserved + podAnnotations: + example.com/configuration: explicit + asserts: + - isSubset: + path: spec.template.metadata.annotations + content: + example.com/configuration: explicit + example.com/legacy: preserved - it: should add custom labels when provided set: diff --git a/charts/clickstack/values.yaml b/charts/clickstack/values.yaml index 612ff76b..9993f59f 100644 --- a/charts/clickstack/values.yaml +++ b/charts/clickstack/values.yaml @@ -110,6 +110,8 @@ hyperdx: # Annotations applied to the HyperDX Deployment metadata. deploymentAnnotations: {} # Annotations applied to the HyperDX pod template metadata. + podAnnotations: {} + # Deprecated: use podAnnotations. Retained for backward compatibility. annotations: {} labels: {} env: [] From dd4a55b557ed8c9f79a9047742a7da02e3de3aa5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Fr=C3=B6mbgen?= <23717573+mfroembgen@users.noreply.github.com> Date: Tue, 28 Jul 2026 09:09:13 +0200 Subject: [PATCH 3/3] docs: clarify pod annotation precedence --- .changeset/expose-hyperdx-deployment-annotations.md | 2 +- charts/clickstack/values.yaml | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.changeset/expose-hyperdx-deployment-annotations.md b/.changeset/expose-hyperdx-deployment-annotations.md index d1d8ed5d..afc63b69 100644 --- a/.changeset/expose-hyperdx-deployment-annotations.md +++ b/.changeset/expose-hyperdx-deployment-annotations.md @@ -2,4 +2,4 @@ "helm-charts": minor --- -Add explicit `hyperdx.deployment.deploymentAnnotations` and `hyperdx.deployment.podAnnotations` values while preserving `hyperdx.deployment.annotations` as a deprecated pod annotation alias. +Add explicit `hyperdx.deployment.deploymentAnnotations` and `hyperdx.deployment.podAnnotations` values while preserving `hyperdx.deployment.annotations` as a deprecated pod annotation alias. When both pod annotation values contain the same key, `podAnnotations` takes precedence. diff --git a/charts/clickstack/values.yaml b/charts/clickstack/values.yaml index 9993f59f..337bcf48 100644 --- a/charts/clickstack/values.yaml +++ b/charts/clickstack/values.yaml @@ -111,7 +111,8 @@ hyperdx: deploymentAnnotations: {} # Annotations applied to the HyperDX pod template metadata. podAnnotations: {} - # Deprecated: use podAnnotations. Retained for backward compatibility. + # Deprecated: use podAnnotations. Retained for backward compatibility; + # podAnnotations takes precedence when both maps contain the same key. annotations: {} labels: {} env: []