Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[k8s/hpa] Add scaletargetref resource attributes to hpa metrics resource attributes #2008

Open
atoulme opened this issue Mar 19, 2025 · 0 comments

Comments

@atoulme
Copy link
Contributor

atoulme commented Mar 19, 2025

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:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Need triage
Status: No status
Development

No branches or pull requests

1 participant