Skip to content
Draft
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
Binary file not shown.
Binary file not shown.
2 changes: 1 addition & 1 deletion charts/opentelemetry-kube-stack/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: v2
name: opentelemetry-kube-stack
version: 0.20.6
version: 0.20.8
description: |
OpenTelemetry Quickstart chart for Kubernetes.
Installs an operator and collector for an easy way to get started with Kubernetes observability.
Expand Down
14 changes: 14 additions & 0 deletions charts/opentelemetry-kube-stack/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,20 @@ By default, the daemonset collector will load in the daemon_scrape_configs.yaml
**`prometheus-node-exporter` subchart**: when installed via the top-level `nodeExporter.enabled: true` flag, the subchart creates its own `ServiceMonitor` by default.
If a target allocator picks it up and `presets.prometheus.nodeExporter.enabled=true` or `scrape_configs_file=daemon_scrape_configs.yaml`, then node-exporter metrics are scraped twice.

### Profiling

The `presets.profiling` preset adds the profiling receiver and a `profiles` pipeline to a collector, enabling
collection of eBPF-based continuous profiling data.

> [!WARNING]
> The profiling receiver requires elevated capabilities and hostPID, so it should be used with a dedicated
> collector distribution (e.g. [`opentelemetry-collector-ebpf-profiler`](https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-ebpf-profiler))
> rather than the general-purpose k8s distribution. This avoids granting elevated privileges to the same
> collector that handles metrics, traces, and logs.

See the [`daemonset-profiling`](examples/daemonset-profiling/values.yaml) example for a dedicated daemonset
collector running the `opentelemetry-collector-ebpf-profiler` image with `presets.profiling` enabled.

### Image versioning

The appVersion of the chart is aligned to the latest image version of the operator. Images are upgraded within the chart manually by setting the image tag to the latest release of each image used. This will be the latest patch release for the chart's appVersion. example:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ kind: OpAMPBridge
metadata:
name: example
labels:
helm.sh/chart: opentelemetry-kube-stack-0.20.6
helm.sh/chart: opentelemetry-kube-stack-0.20.8
app.kubernetes.io/version: "0.154.0"
app.kubernetes.io/managed-by: Helm
release: "example"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ metadata:
name: example-daemon
namespace: default
labels:
helm.sh/chart: opentelemetry-kube-stack-0.20.6
helm.sh/chart: opentelemetry-kube-stack-0.20.8
app.kubernetes.io/version: "0.154.0"
app.kubernetes.io/managed-by: Helm
release: "example"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,4 +61,4 @@ spec:
- "delete"
- "instrumentations,opampbridges,opentelemetrycollectors"
- "-l"
- "helm.sh/chart=opentelemetry-kube-stack-0.20.6"
- "helm.sh/chart=opentelemetry-kube-stack-0.20.8"
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ kind: Instrumentation
metadata:
name: example
labels:
helm.sh/chart: opentelemetry-kube-stack-0.20.6
helm.sh/chart: opentelemetry-kube-stack-0.20.8
app.kubernetes.io/version: "0.154.0"
app.kubernetes.io/managed-by: Helm
release: "example"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ metadata:
name: example-daemon
namespace: default
labels:
helm.sh/chart: opentelemetry-kube-stack-0.20.6
helm.sh/chart: opentelemetry-kube-stack-0.20.8
app.kubernetes.io/version: "0.154.0"
app.kubernetes.io/managed-by: Helm
release: "example"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,4 +61,4 @@ spec:
- "delete"
- "instrumentations,opampbridges,opentelemetrycollectors"
- "-l"
- "helm.sh/chart=opentelemetry-kube-stack-0.20.6"
- "helm.sh/chart=opentelemetry-kube-stack-0.20.8"
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ metadata:
name: example-daemon
namespace: default
labels:
helm.sh/chart: opentelemetry-kube-stack-0.20.6
helm.sh/chart: opentelemetry-kube-stack-0.20.8
app.kubernetes.io/version: "0.154.0"
app.kubernetes.io/managed-by: Helm
release: "example"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,4 +61,4 @@ spec:
- "delete"
- "instrumentations,opampbridges,opentelemetrycollectors"
- "-l"
- "helm.sh/chart=opentelemetry-kube-stack-0.20.6"
- "helm.sh/chart=opentelemetry-kube-stack-0.20.8"
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ metadata:
name: example-daemon
namespace: default
labels:
helm.sh/chart: opentelemetry-kube-stack-0.20.6
helm.sh/chart: opentelemetry-kube-stack-0.20.8
app.kubernetes.io/version: "0.154.0"
app.kubernetes.io/managed-by: Helm
release: "example"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,4 +61,4 @@ spec:
- "delete"
- "instrumentations,opampbridges,opentelemetrycollectors"
- "-l"
- "helm.sh/chart=opentelemetry-kube-stack-0.20.6"
- "helm.sh/chart=opentelemetry-kube-stack-0.20.8"
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ metadata:
name: example-daemon
namespace: default
labels:
helm.sh/chart: opentelemetry-kube-stack-0.20.6
helm.sh/chart: opentelemetry-kube-stack-0.20.8
app.kubernetes.io/version: "0.154.0"
app.kubernetes.io/managed-by: Helm
release: "example"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,4 +61,4 @@ spec:
- "delete"
- "instrumentations,opampbridges,opentelemetrycollectors"
- "-l"
- "helm.sh/chart=opentelemetry-kube-stack-0.20.6"
- "helm.sh/chart=opentelemetry-kube-stack-0.20.8"
Original file line number Diff line number Diff line change
@@ -0,0 +1,147 @@
---
# Source: opentelemetry-kube-stack/templates/clusterrole.yaml
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: example-collector
rules:
- apiGroups: [""]
resources:
- namespaces
- nodes
- nodes/proxy
- nodes/metrics
- nodes/stats
- services
- endpoints
- pods
- events
- secrets
- persistentvolumeclaims
- persistentvolumes
verbs: ["get", "list", "watch"]
- apiGroups: ["monitoring.coreos.com"]
resources:
- servicemonitors
- podmonitors
- scrapeconfigs
- probes
verbs: ["get", "list", "watch"]
- apiGroups:
- extensions
resources:
- ingresses
verbs: ["get", "list", "watch"]
- apiGroups:
- apps
resources:
- daemonsets
- deployments
- replicasets
- statefulsets
verbs: ["get", "list", "watch"]
- apiGroups:
- networking.k8s.io
resources:
- ingresses
verbs: ["get", "list", "watch"]
- apiGroups: ["discovery.k8s.io"]
resources:
- endpointslices
verbs: ["get", "list", "watch"]
- nonResourceURLs: ["/metrics", "/metrics/cadvisor"]
verbs: ["get"]

- verbs:
- get
- list
- watch
- create
- update
- patch
- delete
apiGroups:
- coordination.k8s.io
resources:
- leases
- apiGroups:
- ""
resources:
- events
- namespaces
- namespaces/status
- nodes
- nodes/spec
- pods
- pods/status
- replicationcontrollers
- replicationcontrollers/status
- resourcequotas
- services
verbs:
- get
- list
- watch
- apiGroups:
- apps
resources:
- daemonsets
- deployments
- replicasets
- statefulsets
verbs:
- get
- list
- watch
- apiGroups:
- extensions
resources:
- daemonsets
- deployments
- replicasets
verbs:
- get
- list
- watch
- apiGroups:
- batch
resources:
- jobs
- cronjobs
verbs:
- get
- list
- watch
- apiGroups:
- autoscaling
resources:
- horizontalpodautoscalers
verbs:
- get
- list
- watch
- apiGroups: ["events.k8s.io"]
resources: ["events"]
verbs: ["watch", "list"]
- apiGroups: [""]
resources: ["nodes"]
verbs: ["get", "list"]
- apiGroups: [""]
resources: ["namespaces"]
resourceNames: ["kube-system"]
verbs: ["get"]
---
# Source: opentelemetry-kube-stack/templates/clusterrole.yaml
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: example-profiler
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: example-collector
subjects:
- kind: ServiceAccount
# quirk of the Operator
name: "example-profiler-collector"
namespace: default
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
---
# Source: opentelemetry-kube-stack/templates/collector.yaml
apiVersion: opentelemetry.io/v1beta1
kind: OpenTelemetryCollector
metadata:
name: example-profiler
namespace: default
labels:
helm.sh/chart: opentelemetry-kube-stack-0.20.8
app.kubernetes.io/version: "0.154.0"
app.kubernetes.io/managed-by: Helm
release: "example"
spec:
managementState: managed
mode: daemonset
config:
exporters:
debug: {}
otlp_http:
endpoint: http://example-otelcol-otlp-http.default.svc.cluster.local:4318
processors:
cumulativetodelta: {}
receivers:
profiling: {}
service:
pipelines:
profiles:
exporters:
- otlp_http
receivers:
- profiling
imagePullPolicy: IfNotPresent
upgradeStrategy: automatic
hostPID: true
terminationGracePeriodSeconds: 30
resources:
limits:
cpu: 250m
memory: 128Mi
requests:
cpu: 250m
memory: 64Mi
securityContext:
runAsUser: 0
runAsGroup: 0
privileged: false
allowPrivilegeEscalation: false
seccompProfile:
type: Unconfined
seLinuxOptions:
type: spc_t
capabilities:
drop: [ALL]
add: ["BPF", "PERFMON", "SYS_PTRACE", "SYS_RESOURCE", "DAC_READ_SEARCH", "SYSLOG", "CHECKPOINT_RESTORE", "IPC_LOCK"]
podAnnotations:
container.apparmor.security.beta.kubernetes.io/otc-container: unconfined
volumeMounts:
- name: tracefs
mountPath: /sys/kernel/tracing
readOnly: true
env:
- name: K8S_NODE_NAME
valueFrom:
fieldRef:
fieldPath: spec.nodeName
- name: OTEL_K8S_NODE_NAME
valueFrom:
fieldRef:
fieldPath: spec.nodeName
- name: OTEL_K8S_NODE_IP
valueFrom:
fieldRef:
fieldPath: status.hostIP
- name: OTEL_K8S_NAMESPACE
valueFrom:
fieldRef:
apiVersion: v1
fieldPath: metadata.namespace
- name: OTEL_K8S_POD_NAME
valueFrom:
fieldRef:
apiVersion: v1
fieldPath: metadata.name
- name: OTEL_K8S_POD_IP
valueFrom:
fieldRef:
apiVersion: v1
fieldPath: status.podIP
- name: OTEL_RESOURCE_ATTRIBUTES
value: "k8s.pod.name=$(OTEL_K8S_POD_NAME),k8s.namespace.name=$(OTEL_K8S_NAMESPACE),k8s.node.name=$(OTEL_K8S_NODE_NAME),host.name=$(OTEL_K8S_NODE_NAME),k8s.node.ip=$(OTEL_K8S_NODE_IP),k8s.pod.ip=$(OTEL_K8S_POD_IP),k8s.cluster.name=unknown_k8s_cluster"

volumes:
- name: tracefs
hostPath:
path: /sys/kernel/tracing
Loading
Loading