-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Description
What would you like to be added:
Add owner_is_controller
field back to owner metrics (or reconsider its implementation as an enum instead of boolean).
Why is this needed:
Currently, multiple owner metrics use owner_is_controller
as a boolean label:
kube_pod_owner
kube_job_owner
kube_replicaset_owner
kube_replicationcontroller_owner
kube_secret_owner
During review of kube_deployment_owner
metric, a question was raised: should this field use an enum instead of boolean to better represent different owner relationship types (e.g., "controller", "application", "custom resource")?
Describe the solution you'd like:
Option 1: Keep boolean implementation
- Use
owner_is_controller="true|false"
(current implementation for existing metrics) - Simple and directly maps to Kubernetes
OwnerReference.Controller
field - Add this field back to
kube_deployment_owner
Option 2: Change to enum
- Use
owner_type="controller|application|reference"
(or similar) - More extensible for future owner relationship types
- Requires migration for all existing owner metrics
Additional context:
The kube_deployment_owner
metric (#2782) currently has this field removed pending this decision. Once resolved, all owner metrics should be updated consistently for a uniform API.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status