We store all versioned API definitions in
`staging/src/
k8s.io/api/<name>/<version>`.
There is a class of constants that are, at least theoretically,
versionable. We store those with the versioned API definitions. For
example, names of enumerated values COULD (in theory) change between
API versions. It seems unlikely but plausible.
There is another class of constants that, while theoretically
versionable, seem very unlikely to be changed between versions. For
example, well-known label keys.
We often see PRs which add a well-known label key, and to do that they
add a const to the versioned API and to the internal API. Those
consts are usually 100% identical in name, value, and comments. This
seems like a smell to me.
I wanted to ask if anyone thinks this is something we should refine.
It's clearly not urgent, but could be cleaned up over time.
Specifically, what if we put such constants into
`staging/src/
k8s.io/api/<name>` (no version) and then depended on that
from everywhere?
Again, I know it's theoretically possible to have things like a
well-known label key (e.g. used by batch controller to select pods)
change across versions, but would we really do that?
Tim