Skip to content

Conversation

rakesh-garimella
Copy link
Contributor

Description

  • Add support for k8s leader elector to k8s cluster receiver so that multiple instances of k8s cluster receiver can be executed.
  • The instance which has the lease fetches the metrics.

example config:

extensions:
  k8s_leader_elector:
    auth_type: kubeConfig
    lease_name: foo
    lease_namespace: default
receivers:
  k8s_cluster:
    k8s_leader_elector: k8s_leader_elector
    node_conditions_to_report: [Ready, MemoryPressure]
    allocatable_types_to_report: [cpu, memory]
exporters:
  debug:
    verbosity: detailed

service:
  extensions: [k8s_leader_elector]
  pipelines:
    metrics:
      receivers: [k8s_cluster]
      exporters: [debug]
  telemetry:
    logs:
      level: info

Link to tracking issue

Fixes

Testing

Documentation

@github-actions github-actions bot requested a review from povilasv March 6, 2025 15:00
@rakesh-garimella rakesh-garimella marked this pull request as draft March 6, 2025 15:00
@rakesh-garimella rakesh-garimella changed the title [receiver/k8s leader elector]add support for K8s leader extension into k8s cluster receiver [receiver/k8s cluster receiver]add support for K8s leader extension into k8s cluster receiver Mar 6, 2025
@rakesh-garimella rakesh-garimella force-pushed the k8s_leader_support_for_k8s_cluster_receiver branch from 0eacdf0 to bc5304c Compare March 6, 2025 15:14
Copy link
Contributor

This PR was marked stale due to lack of activity. It will be closed in 14 days.

@github-actions github-actions bot added the Stale label Mar 25, 2025
@rakesh-garimella rakesh-garimella marked this pull request as ready for review April 10, 2025 14:20
@atoulme atoulme removed the cmd/otelcontribcol otelcontribcol command label Apr 10, 2025
@atoulme atoulme marked this pull request as draft April 14, 2025 00:31
@atoulme
Copy link
Contributor

atoulme commented Apr 14, 2025

moving to draft, please address feedback and fix conflicts, and mark ready to review again

@rakesh-garimella rakesh-garimella marked this pull request as ready for review April 14, 2025 18:24
Copy link
Member

@dmitryax dmitryax left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Please rebase and resolve conflicts

@dmitryax dmitryax merged commit dc2c787 into open-telemetry:main Apr 16, 2025
172 checks passed
@github-actions github-actions bot added this to the next release milestone Apr 16, 2025
akshays-19 pushed a commit to akshays-19/opentelemetry-collector-contrib that referenced this pull request Apr 23, 2025
…nto k8s cluster receiver (open-telemetry#38429)

#### Description

- Add support for k8s leader elector to k8s cluster receiver so that
multiple instances of k8s cluster receiver can be executed.
- The instance which has the lease fetches the metrics.

example config:
```yaml
extensions:
  k8s_leader_elector:
    auth_type: kubeConfig
    lease_name: foo
    lease_namespace: default
receivers:
  k8s_cluster:
    k8s_leader_elector: k8s_leader_elector
    node_conditions_to_report: [Ready, MemoryPressure]
    allocatable_types_to_report: [cpu, memory]
exporters:
  debug:
    verbosity: detailed

service:
  extensions: [k8s_leader_elector]
  pipelines:
    metrics:
      receivers: [k8s_cluster]
      exporters: [debug]
  telemetry:
    logs:
      level: info
```
Fiery-Fenix pushed a commit to Fiery-Fenix/opentelemetry-collector-contrib that referenced this pull request Apr 24, 2025
…nto k8s cluster receiver (open-telemetry#38429)

#### Description

- Add support for k8s leader elector to k8s cluster receiver so that
multiple instances of k8s cluster receiver can be executed.
- The instance which has the lease fetches the metrics.

example config:
```yaml
extensions:
  k8s_leader_elector:
    auth_type: kubeConfig
    lease_name: foo
    lease_namespace: default
receivers:
  k8s_cluster:
    k8s_leader_elector: k8s_leader_elector
    node_conditions_to_report: [Ready, MemoryPressure]
    allocatable_types_to_report: [cpu, memory]
exporters:
  debug:
    verbosity: detailed

service:
  extensions: [k8s_leader_elector]
  pipelines:
    metrics:
      receivers: [k8s_cluster]
      exporters: [debug]
  telemetry:
    logs:
      level: info
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants