Skip to content

Commit 5fdf53f

Browse files
authored
Merge branch 'main' into dan/more-otel-collector-testing
2 parents cdb96d9 + 00d69b9 commit 5fdf53f

File tree

12 files changed

+583
-7
lines changed

12 files changed

+583
-7
lines changed

.changeset/better-otters-train.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

.github/workflows/helm-test.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,11 @@ jobs:
3737
helm repo add open-telemetry https://open-telemetry.github.io/opentelemetry-helm-charts
3838
helm dependency build charts/clickstack
3939
40+
- name: Validate ALB example values render
41+
run: |
42+
helm template clickstack-example charts/clickstack \
43+
-f examples/alb-ingress/values.yaml >/dev/null
44+
4045
- name: Run helm-unittest
4146
run: |
4247
helm unittest charts/clickstack

CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
11
# helm-charts
22

3+
## 2.1.0
4+
5+
### Minor Changes
6+
7+
- a615199: Add `additionalManifests` value for deploying arbitrary Kubernetes objects (NetworkPolicy, HPA, ServiceAccount, PodMonitor, ALB Ingress, etc.) alongside the chart. See docs/ADDITIONAL-MANIFESTS.md for usage and examples.
8+
9+
### Patch Changes
10+
11+
- 6f29e73: fix: combine ClickHouse app user grants into single query
12+
313
## 2.0.0
414

515
### Major Changes

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@ For configuration, cloud deployment, ingress setup, and troubleshooting, see the
2121
- **`clickstack/clickstack-operators`** - Installs the MongoDB and ClickHouse operator controllers and CRDs. Must be installed first.
2222
- **`clickstack/clickstack`** - Installs HyperDX, OpenTelemetry Collector, and operator custom resources.
2323

24+
## Additional Manifests
25+
26+
The `clickstack` chart supports deploying arbitrary Kubernetes objects (NetworkPolicy, HPA, ServiceAccount, PodMonitor, ALB Ingress, etc.) alongside the chart's own resources via the `additionalManifests` value. See the [Additional Manifests Guide](docs/ADDITIONAL-MANIFESTS.md) for values-file constraints and examples, including [AWS ALB example values](examples/alb-ingress/values.yaml).
27+
2428
## Operator Dependencies
2529

2630
The `clickstack-operators` chart bundles:

charts/clickstack/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ annotations:
1515
- name: Upstream Project
1616
url: https://github.com/hyperdxio/hyperdx
1717
type: application
18-
version: 2.0.0
18+
version: 2.1.0
1919
appVersion: 2.22.0
2020
dependencies:
2121
- name: opentelemetry-collector
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{{- range .Values.additionalManifests }}
2+
---
3+
{{ tpl (toYaml .) $ }}
4+
{{- end }}
Lines changed: 119 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,119 @@
1+
suite: Test Additional Manifests
2+
templates:
3+
- additional-manifests.yaml
4+
tests:
5+
- it: should render nothing when additionalManifests is empty
6+
asserts:
7+
- hasDocuments:
8+
count: 0
9+
10+
- it: should render a single manifest
11+
set:
12+
additionalManifests:
13+
- apiVersion: v1
14+
kind: ConfigMap
15+
metadata:
16+
name: my-extra-config
17+
data:
18+
key: value
19+
asserts:
20+
- hasDocuments:
21+
count: 1
22+
- isKind:
23+
of: ConfigMap
24+
- equal:
25+
path: metadata.name
26+
value: my-extra-config
27+
- equal:
28+
path: data.key
29+
value: value
30+
31+
- it: should render multiple manifests
32+
set:
33+
additionalManifests:
34+
- apiVersion: v1
35+
kind: ServiceAccount
36+
metadata:
37+
name: my-service-account
38+
- apiVersion: networking.k8s.io/v1
39+
kind: NetworkPolicy
40+
metadata:
41+
name: my-network-policy
42+
spec:
43+
podSelector:
44+
matchLabels:
45+
app: test
46+
asserts:
47+
- hasDocuments:
48+
count: 2
49+
- isKind:
50+
of: ServiceAccount
51+
documentIndex: 0
52+
- equal:
53+
path: metadata.name
54+
value: my-service-account
55+
documentIndex: 0
56+
- isKind:
57+
of: NetworkPolicy
58+
documentIndex: 1
59+
- equal:
60+
path: metadata.name
61+
value: my-network-policy
62+
documentIndex: 1
63+
64+
- it: should evaluate tpl expressions in manifest values
65+
set:
66+
additionalManifests:
67+
- apiVersion: v1
68+
kind: ServiceAccount
69+
metadata:
70+
name: '{{ include "clickstack.fullname" . }}-sa'
71+
asserts:
72+
- hasDocuments:
73+
count: 1
74+
- matchRegex:
75+
path: metadata.name
76+
pattern: -clickstack-sa$
77+
78+
- it: should render an ALB Ingress with controller-specific annotations
79+
set:
80+
additionalManifests:
81+
- apiVersion: networking.k8s.io/v1
82+
kind: Ingress
83+
metadata:
84+
name: my-alb-ingress
85+
annotations:
86+
alb.ingress.kubernetes.io/scheme: internet-facing
87+
alb.ingress.kubernetes.io/target-type: ip
88+
alb.ingress.kubernetes.io/certificate-arn: "arn:aws:acm:us-east-1:123456789:certificate/abc-123"
89+
alb.ingress.kubernetes.io/listen-ports: '[{"HTTPS":443}]'
90+
spec:
91+
ingressClassName: alb
92+
rules:
93+
- host: clickstack.example.com
94+
http:
95+
paths:
96+
- path: /
97+
pathType: Prefix
98+
backend:
99+
service:
100+
name: my-app
101+
port:
102+
number: 3000
103+
asserts:
104+
- hasDocuments:
105+
count: 1
106+
- isKind:
107+
of: Ingress
108+
- equal:
109+
path: spec.ingressClassName
110+
value: alb
111+
- equal:
112+
path: metadata.annotations["alb.ingress.kubernetes.io/scheme"]
113+
value: internet-facing
114+
- equal:
115+
path: metadata.annotations["alb.ingress.kubernetes.io/target-type"]
116+
value: ip
117+
- equal:
118+
path: metadata.annotations["alb.ingress.kubernetes.io/certificate-arn"]
119+
value: "arn:aws:acm:us-east-1:123456789:certificate/abc-123"

charts/clickstack/values.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -316,6 +316,13 @@ clickhouse:
316316
keep_alive_timeout: 64
317317
max_concurrent_queries: 100
318318

319+
# Additional Kubernetes manifests to deploy alongside the chart.
320+
# Each entry is a complete Kubernetes object. Values are rendered through
321+
# Helm's tpl function so template expressions (Release.Name, include, .Values)
322+
# are available inside string fields.
323+
# See docs/ADDITIONAL-MANIFESTS.md for full examples.
324+
additionalManifests: []
325+
319326
# OpenTelemetry Collector subchart configuration (alias: otel-collector)
320327
# See https://github.com/open-telemetry/opentelemetry-helm-charts for all options
321328
# Set otel-collector.enabled to false to disable the OTEL collector entirely.

0 commit comments

Comments
 (0)