influxdata / influxdata/telegraf

kube_inventory plugin to collect init containers info

Open
#19,544 0 comments 0 reactions 0 assignees View on GitHub
feature request
Dominant language
Go
Stars
17.8k
Forks
5.8k
Avg merge
1d 20h
Merged PRs (30d)
161

Description

### Use Case

Kubernetes supports "[native sidecar containers](https://kubernetes.io/blog/2023/08/25/native-sidecar-containers/)" where initContainer with `restartPolicy:Always` keeps running alongside main containers. Therefore it can be useful to collect information on them too.

Currently `kube_inventory` plugin iterates only over `PodSpec.Containers` and completely ignores `PodSpec.InitContainers`.

### Expected behavior

Metrics for init container with `restartPolicy:Always` are included

### Actual behavior

No init containers info

### Additional info

_No response_

Contributor guide

Open the contributing guide

Research direction

Start at the kube_inventory plugin code that iterates over PodSpec.Containers, then compare how PodSpec.InitContainers is represented and filtered. Done means metrics for init containers with restartPolicy:Always are included while existing container metrics continue to work.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, kubernetes
Domain
observability
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.