Documentation
¶
Index ¶
Constants ¶
View Source
const Name = "kubernetes_node"
Variables ¶
View Source
var DefaultArguments = Config{ KubernetesAPIConfig: otelcol.KubernetesAPIConfig{ AuthType: otelcol.KubernetesAPIConfig_AuthType_None, }, NodeFromEnvVar: "K8S_NODE_NAME", ResourceAttributes: ResourceAttributesConfig{ K8sNodeName: rac.ResourceAttributeConfig{Enabled: true}, K8sNodeUID: rac.ResourceAttributeConfig{Enabled: true}, }, }
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { KubernetesAPIConfig otelcol.KubernetesAPIConfig `river:",squash"` // NodeFromEnv can be used to extract the node name from an environment // variable. The value must be the name of the environment variable. // This is useful when the node where an Agent will run on cannot be // predicted. In such cases, the Kubernetes downward API can be used to // add the node name to each pod as an environment variable. K8s tagger // can then read this value and filter pods by it. // // For example, node name can be passed to each agent with the downward API as follows // // env: // - name: K8S_NODE_NAME // valueFrom: // fieldRef: // fieldPath: spec.nodeName // // Then the NodeFromEnv field can be set to `K8S_NODE_NAME` to filter all pods by the node that // the agent is running on. // // More on downward API here: https://kubernetes.io/docs/tasks/inject-data-application/environment-variable-expose-pod-information/ NodeFromEnvVar string `river:"node_from_env_var,attr,optional"` ResourceAttributes ResourceAttributesConfig `river:"resource_attributes,block,optional"` }
func (*Config) SetToDefault ¶
func (c *Config) SetToDefault()
SetToDefault implements river.Defaulter.
type ResourceAttributesConfig ¶
type ResourceAttributesConfig struct { K8sNodeName rac.ResourceAttributeConfig `river:"k8s.node.name,block,optional"` K8sNodeUID rac.ResourceAttributeConfig `river:"k8s.node.uid,block,optional"` }
ResourceAttributesConfig provides config for k8snode resource attributes.
func (ResourceAttributesConfig) Convert ¶
func (r ResourceAttributesConfig) Convert() map[string]interface{}
Click to show internal directories.
Click to hide internal directories.