kubernetes-sigs / kueue

Kubernetes-native Job Queueing
https://kueue.sigs.k8s.io
Apache License 2.0
1.49k stars 267 forks source link

Move Pod group labels and annotations to `apis/` package #3653

Open PBundyra opened 5 days ago

PBundyra commented 5 days ago

What would you like to be added: Move consts

GroupNameLabel               = "kueue.x-k8s.io/pod-group-name"
GroupTotalCountAnnotation    = "kueue.x-k8s.io/pod-group-total-count"
GroupFastAdmissionAnnotation = "kueue.x-k8s.io/pod-group-fast-admission"
RoleHashAnnotation           = "kueue.x-k8s.io/role-hash"
RetriableInGroupAnnotation   = "kueue.x-k8s.io/retriable-in-group"

from pkg/controller/jobs/pod/pod_webhook.go to apis package

Why is this needed: To improve code quality and API visibility

tenzen-y commented 5 days ago

I think that we should not move those labels to apis package since those are not for a whole of Kueue projects.

Instead of that, I think that creating dedicated constants package or restructure the Pod, Deployment, and StatefulSet packages. For example, we might be able to restructure those packages based on the Pod directory.

This is a similar concept to KubeflowJobs.