Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

k8sattributes processor documentation PR #7913

Merged
merged 20 commits into from
Feb 23, 2022
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Updated a new section with "Optional" config
  • Loading branch information
Yadumathur authored Feb 15, 2022
commit 11a50b760b021148f0b09e8ebf18d84e2078b0bd
16 changes: 12 additions & 4 deletions processor/k8sattributesprocessor/doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,17 @@
// fieldRef:
// apiVersion: v1
Yadumathur marked this conversation as resolved.
Show resolved Hide resolved
// fieldPath: spec.nodeName
//
// This will inject a new environment variable to the OpenTelemetry container with the value as the
// name of the node the pod was scheduled to run on.

Yadumathur marked this conversation as resolved.
Show resolved Hide resolved
// 2. ( Optional in case the filereciever does not have k8s.pod.uid available in filepath ) Use the downward API to inject the podIP in the instrumented pod inside spec.containers.env to capture status.podIP
// and add it as part of the OTEL_RESOURCE_ATTRIBUTES env variable. After this is set it is used by the OpenTelemetry Collector's
// resourcedetection and k8sattributes processors to tag k8s metadata.
// Add the following snippet under the pod env section of instrumented pod
// spec:
// containers:
// - env:
// - name: POD_IP
// valueFrom:
// fieldRef:
Expand All @@ -158,10 +169,7 @@
// - name: OTEL_RESOURCE_ATTRIBUTES
// value: k8s.pod.ip=$(POD_IP)
//
// This will inject a new environment variable to the OpenTelemetry container with the value as the
// name of the node the pod was scheduled to run on.
//
// 2. Set "filter.node_from_env_var" to the name of the environment variable holding the node name.
// 3. Set "filter.node_from_env_var" to the name of the environment variable holding the node name.
//
// k8sattributes:
// filter:
Expand Down