jetstack / jetstack/version-checker

[FEATURE] Expose application name as a label in Prometheus metrics

Đang mở
#448 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
enhancement
Ngôn ngữ chính
Go
Star
778
Fork
82
Merge trung bình
2 phút
Pull request đã merge (30 ngày)
3

Mô tả

**Is your feature request related to a problem? Please describe.**
I'm always frustrated when I look at the version-checker Grafana dashboard and see an outdated image (for example, `bitnami/redis`), but I can't immediately tell which specific third-party application or internal service is using it. In clusters with many deployments, I have to manually cross-reference the namespace or pod name to figure out which application owns the image before I can take action.

**Describe the solution you'd like**
I would like `version-checker` to natively expose the application name as a label in its generated Prometheus metrics.

Ideally, the controller could extract this from a dedicated annotation like `version-checker.io/app-name`, or fallback to standard Kubernetes resource labels (such as `app.kubernetes.io/name` or `app`) on the pod/deployment. Mapping this to an `app_name` or `application` label in the exported metric would allow the official Grafana dashboards to easily display which specific application is associated with which image(s), significantly improving visibility.

**Describe alternatives you've considered**
My current alternative/workaround is manually adding custom annotations to my deployments alongside the standard version-checker configs, like this:

```
podAnnotations:
enable.version-checker.io/controller: "true"
version-checker.io/app-name: "Karpenter"
match-regex.version-checker.io/controller: ^v?\d+\.\d+\.\d+.*
```
While this allows me to attach the metadata to the pod, it still requires complex, expensive PromQL queries using `kube-state-metrics` (e.g., `kube_pod_annotations`) to join this custom annotation with the actual `version-checker` metrics in Grafana. This slows down dashboard load times and makes the PromQL very difficult to maintain.

**Additional context**
Add any other context or screenshots about the feature request here.

---

**Message from the maintainers**:

If you wish to see this enhancement implemented please add a 👍 reaction to this issue! We often sort issues this way to know what to prioritize.

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Hướng nghiên cứu

Bắt đầu bằng cách xác định đoạn mã tạo các metric Prometheus của version-checker và đoạn mã đọc metadata của pod hoặc deployment Kubernetes. So sánh annotation chuyên dụng version-checker.io/app-name với app.kubernetes.io/name và các label app, sau đó xác định hành vi của các label được export và kiểm tra rằng các metric kết quả hỗ trợ use case dashboard Grafana dự kiến.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
go, grafana, kubernetes, prometheus
Lĩnh vực
devops, observability
Loại issue
Tính năng
Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức độ hoạt động
Ít trao đổi
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
45/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.