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
22 changes: 22 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,28 @@ jobs:
- name: Test template with envFrom
run: helm template test . --set-json 'collector.envFrom=[{"secretRef":{"name":"my-secret"}}]'

- name: Test template with collectOtel ports
run: |
output=$(helm template test . --set collector.env.COLLECTOR_SECRET=test123 --set collectOtel.grpcPort=4317 --set collectOtel.httpPort=4318)
echo "$output" | grep -q 'hostPort: 4317' || { echo "Missing hostPort 4317"; exit 1; }
echo "$output" | grep -q 'hostPort: 4318' || { echo "Missing hostPort 4318"; exit 1; }
echo "$output" | grep -q 'containerPort: 4317' || { echo "Missing containerPort 4317"; exit 1; }
echo "$output" | grep -q 'containerPort: 4318' || { echo "Missing containerPort 4318"; exit 1; }
echo "$output" | grep -q 'COLLECT_OTEL_GRPC_PORT' || { echo "Missing COLLECT_OTEL_GRPC_PORT env var"; exit 1; }
echo "$output" | grep -q 'COLLECT_OTEL_HTTP_PORT' || { echo "Missing COLLECT_OTEL_HTTP_PORT env var"; exit 1; }

- name: Test template without collectOtel ports has no otel ports
run: |
output=$(helm template test . --set collector.env.COLLECTOR_SECRET=test123)
if echo "$output" | grep -q 'otel-grpc\|otel-http'; then
echo "Unexpected otel ports when collectOtel ports are not set"
exit 1
fi
if echo "$output" | grep -q 'COLLECT_OTEL_GRPC_PORT\|COLLECT_OTEL_HTTP_PORT'; then
echo "Unexpected COLLECT_OTEL env vars when collectOtel ports are not set"
exit 1
fi

- name: Test validation fails without secret
run: |
if helm template test . 2>&1; then
Expand Down
2 changes: 1 addition & 1 deletion Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
name: collector
description: A Helm chart for Better Stack Collector - monitoring solution that collects metrics, logs, and traces
type: application
version: 0.1.34
version: 0.1.35
appVersion: "latest"
keywords:
- monitoring
Expand Down
20 changes: 20 additions & 0 deletions templates/daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,14 @@ spec:
value: {{ .Chart.Version | quote }}
- name: INSTALLED_AS
value: "kubernetes"
{{- if .Values.collectOtel.grpcPort }}
- name: COLLECT_OTEL_GRPC_PORT
value: {{ .Values.collectOtel.grpcPort | quote }}
{{- end }}
{{- if .Values.collectOtel.httpPort }}
- name: COLLECT_OTEL_HTTP_PORT
value: {{ .Values.collectOtel.httpPort | quote }}
{{- end }}
{{- with .Values.collector.envFrom }}
envFrom:
{{- toYaml . | nindent 10 }}
Expand All @@ -79,6 +87,18 @@ spec:
containerPort: 34320
hostPort: 34320
protocol: TCP
{{- if .Values.collectOtel.grpcPort }}
- name: otel-grpc
containerPort: {{ .Values.collectOtel.grpcPort }}
hostPort: {{ .Values.collectOtel.grpcPort }}
protocol: TCP
{{- end }}
{{- if .Values.collectOtel.httpPort }}
- name: otel-http
containerPort: {{ .Values.collectOtel.httpPort }}
hostPort: {{ .Values.collectOtel.httpPort }}
protocol: TCP
{{- end }}
livenessProbe:
exec:
command:
Expand Down
4 changes: 4 additions & 0 deletions values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,10 @@ collector:
# Example: ["/var/www/custom", "/var/lib/something"]
paths: []

collectOtel:
grpcPort: ""
httpPort: ""

# Beyla configuration for eBPF tracing
beyla:
enabled: true
Expand Down