Skip to content

Commit 45440ff

Browse files
authored
Adjust helm chart for remotely managed collector (#20)
1 parent ca0833f commit 45440ff

File tree

4 files changed

+16
-36
lines changed

4 files changed

+16
-36
lines changed

Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ apiVersion: v2
22
name: collector
33
description: A Helm chart for Better Stack Collector - monitoring solution that collects metrics, logs, and traces
44
type: application
5-
version: 0.1.20
5+
version: 0.1.21
66
appVersion: "latest"
77
keywords:
88
- monitoring

templates/daemonset.yaml

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -66,13 +66,15 @@ spec:
6666
value: {{ .Chart.Version | quote }}
6767
ports:
6868
- name: otlp
69-
containerPort: {{ .Values.collector.otlpPort }}
70-
hostPort: {{ .Values.collector.otlpPort }}
69+
containerPort: 34320
70+
hostPort: 34320
7171
protocol: TCP
7272
livenessProbe:
7373
exec:
7474
command:
75-
- /healthcheck.sh
75+
- /bin/sh
76+
- -c
77+
- if [ -x /var/lib/better-stack/collector/healthcheck.sh ]; then /var/lib/better-stack/collector/healthcheck.sh; else exit 0; fi
7678
initialDelaySeconds: 60
7779
periodSeconds: 30
7880
timeoutSeconds: 10
@@ -82,6 +84,8 @@ spec:
8284
- name: docker-metadata
8385
mountPath: {{ .Values.volumes.dockerMetadata.mountPath }}
8486
{{- end }}
87+
- name: betterstack-data
88+
mountPath: /var/lib/better-stack
8589
- name: cgroup
8690
mountPath: /sys/fs/cgroup
8791
readOnly: true
@@ -138,8 +142,6 @@ spec:
138142
- name: HELM_CHART_VERSION
139143
value: {{ .Chart.Version | quote }}
140144
# Special configuration (these need dynamic template values)
141-
- name: OTEL_EXPORTER_OTLP_ENDPOINT
142-
value: "http://localhost:{{ .Values.collector.otlpPort }}"
143145
- name: ENABLE_DOCKERPROBE
144146
value: {{ .Values.beyla.dockerprobe.enabled | quote }}
145147
{{- if .Values.beyla.memoryRestartThreshold }}
@@ -171,6 +173,8 @@ spec:
171173
- name: docker-metadata
172174
mountPath: {{ .Values.volumes.dockerMetadata.mountPath }}
173175
{{- end }}
176+
- name: betterstack-data
177+
mountPath: /var/lib/better-stack
174178
- name: sys-kernel-tracing
175179
mountPath: /sys/kernel/tracing
176180
- name: sys-kernel-debug
@@ -187,6 +191,9 @@ spec:
187191
- name: docker-metadata
188192
emptyDir: {}
189193
{{- end }}
194+
# Shared Better Stack data volume
195+
- name: betterstack-data
196+
emptyDir: {}
190197
# Collector volumes
191198
- name: cgroup
192199
hostPath:

templates/service.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ metadata:
66
{{- include "better-stack-collector.labels" . | nindent 4 }}
77
app.kubernetes.io/component: better-stack-collector
88
spec:
9-
type: {{ .Values.collector.service.type }}
9+
type: ClusterIP
1010
ports:
11-
- port: {{ .Values.collector.service.port }}
11+
- port: 34320
1212
targetPort: otlp
1313
protocol: TCP
1414
name: otlp
1515
selector:
16-
{{- include "better-stack-collector.selectorLabels" . | nindent 4 }}
16+
{{- include "better-stack-collector.selectorLabels" . | nindent 4 }}

values.yaml

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -34,14 +34,6 @@ collector:
3434
# Affinity
3535
affinity: {}
3636

37-
# Service configuration
38-
service:
39-
type: ClusterIP
40-
port: 34320
41-
42-
# Port for internal OTLP communication
43-
otlpPort: 34320
44-
4537
# Host filesystem mount configuration
4638
# By default, mounts the entire host root filesystem at /host (read-only)
4739
# You can specify specific paths to mount instead. Each path will be mounted
@@ -62,25 +54,6 @@ beyla:
6254

6355
# Environment variables
6456
env:
65-
# OTEL_EXPORTER_OTLP_ENDPOINT is set dynamically in the template
66-
OTEL_EXPORTER_OTLP_PROTOCOL: "http/protobuf"
67-
BEYLA_DISCOVERY_POLL_INTERVAL: "30s"
68-
BEYLA_MIN_PROCESS_AGE: "20s"
69-
BEYLA_CONFIG_PATH: "/etc/beyla/beyla.yaml"
70-
BEYLA_OPEN_PORT: "" # Set to "1-32767" to skip ephemeral ports, set to "1-65535" to enable all ports
71-
BEYLA_PROFILE_PORT: "" # Set to 6060 for profiling
72-
BEYLA_LOG_LEVEL: "" # Options: debug, info, warn, error
73-
OTEL_TRACES_SAMPLER: "" # Set to "traceidratio" for sampling
74-
OTEL_TRACES_SAMPLER_ARG: "" # Set to "0.1" for 10% sampling
75-
OTEL_EBPF_NETWORK_CACHE_MAX_FLOWS: ""
76-
BEYLA_EXCLUDE_OTEL_INSTRUMENTED_SERVICES: ""
77-
BEYLA_BPF_CONTEXT_PROPAGATION: ""
78-
BEYLA_BPF_TRACK_REQUEST_HEADERS: ""
79-
80-
# Kubernetes metadata for just current node
81-
BEYLA_KUBE_METADATA_ENABLE: "true"
82-
BEYLA_KUBE_META_RESTRICT_LOCAL_NODE: "true"
83-
8457
# Makes garbage collection more aggressive once memory is over this threshold
8558
# Too low might cause GC to run too often and increase CPU usage
8659
GOMEMLIMIT: 1400MiB

0 commit comments

Comments
 (0)