Open
Description
Area(s)
area:k8s
What's missing?
We currently support hpa
metrics related to the state of the hpa
. We also want to capture the scale target of the hpa
with a set of additional resource attributes mapping to the scaleTargetRef
portion of the hpa
spec: https://github.com/kubernetes/kubernetes/blob/master/pkg/apis/autoscaling/types.go#L80
A scaleTargetRef
is represented as a CrossVersionObjectReference
which represents a trio of fields:
// CrossVersionObjectReference contains enough information to let you identify the referred resource.
type CrossVersionObjectReference struct {
// kind is the kind of the referent; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds"
Kind string
// name is the name of the referent; More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
Name string
// apiVersion is the API version of the referent
// +optional
APIVersion string
}
Describe the solution you'd like
Define 3 new resource attributes that are added to all hpa
metrics, all 3 of type string:
k8s.hpa.target.kind
(mapping to https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds)k8s.hpa.target.name
(mapping to names https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names)k8s.hpa.target.apiversion
(optional)
Metadata
Metadata
Assignees
Type
Projects
Status
No status
Status
Need triage