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 8 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
39 changes: 32 additions & 7 deletions processor/k8sattributesprocessor/doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,28 @@
//
// Config
//
// TODO: example config.
// k8sattributes:
// k8sattributes/2:
// auth_type: "serviceAccount"
// passthrough: false
// filter:
// node_from_env_var: KUBE_NODE_NAME
//
// extract:
// metadata:
// - k8s.pod.name
// - k8s.pod.uid
// - k8s.deployment.name
// - k8s.cluster.name
// - k8s.namespace.name
// - k8s.node.name
// - k8s.pod.start_time
//
// pod_association:
// - from: resource_attribute
// name: k8s.pod.ip
// - from: resource_attribute
// name: k8s.pod.uid
Yadumathur marked this conversation as resolved.
Show resolved Hide resolved
//
// Deployment scenarios
//
Expand All @@ -117,15 +138,19 @@
// 1. Use the downward API to inject the node name as an environment variable.
// Add the following snippet under the pod env section of the OpenTelemetry container.
//
// env:
// - name: KUBE_NODE_NAME
// valueFrom:
// fieldRef:
// apiVersion: v1
// fieldPath: spec.nodeName
//
// spec:
// containers:
// - env:
// - name: KUBE_NODE_NAME
// valueFrom:
// fieldRef:
// apiVersion: v1
// 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. Set "filter.node_from_env_var" to the name of the environment variable holding the node name.
//
Expand Down