-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Add KEP 1659 - standard topology labels #1660
Add KEP 1659 - standard topology labels #1660
Conversation
@thockin: GitHub didn't allow me to request PR reviews from the following users: jeremyot. Note that only kubernetes members and repo collaborators can review this PR, and authors cannot review their own PRs. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
35db052
to
ed25c3f
Compare
#1127 for reference to previous discussions |
ed25c3f
to
b21c6a2
Compare
b21c6a2
to
d48d06f
Compare
Hello assignees. I am looking for a volunteer or two to be approvers of this. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/approve
/lgtm
Just had some minor comments/questions about kep.yaml
.
@@ -0,0 +1,17 @@ | |||
title: Standard Topology Labels | |||
kep-number: NNNN #FIXME |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1659
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
will fix
- sig-cloud-provider | ||
- sig-network | ||
- sig-scheduling | ||
status: provisional |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this should just be implemented
since we're just documenting what already exists?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think "implemented" means docs are done.
by downstream consumers of topology. | ||
|
||
<<[UNRESOLVED]>> | ||
Should we also try to standardize "kubernetes.io/hostname" as "topology.kubernetes.io/node" ? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This would be really nice for consistency, but not sure it's worth the trouble. Migrating from the old beta labels for zone/region was already a lot of work :(
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Devil's advocate: we could add it and just support both, but call the old one deprecated.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See my comment above. I don't actually think limiting the application of these labels to the Node
object is beneficial.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In this case, the label specifically means that the labelled item is strongly linked to a given k8s Node. The labelled item might be a pod or a disk or something else.
d48d06f
to
122164c
Compare
Nits fixed. I added you as a reviewer. Do you want to be an approver? I want to get broad eyes on this, so I tagged it sig-arch. @smarterclayton or @dcbw or @danwinship - do you guys have thoughts here? Who else should I ping? :) Other cloud-provider people? @ahg-g for scheduling |
ping @cheftako @nckturner for SIG cloud provider |
@cheftako @nckturner @ahg-g @smarterclayton This KEP has been open for a while. I'm still looking for an approver (unless you want to be it @andrewsykim ?) and more feedback. |
This make a lot of sense for the scheduler, in the fact the scheduler already uses the zone topology label to spread pods by default across zones. The scheduler also special cases |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/approve
/lgtm
creation-date: 2020-03-31 | ||
reviewers: | ||
- "@andrewsykim" | ||
approvers: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you can list me as an approver.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK
/approve |
Label prefixes allow us to group labels on common origin and meaning. We | ||
propose to document somewhere (TBD) that the prefix "topology.kuberntes.io" is | ||
explicitly reserved for use in defining metadata about the physical or logical | ||
connectivity and grouping of Kubernetes nodes, and the associated behavioral |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I recognize that the topology.kubernetes.io/region
and topology.kubernetes.io/zone
labels are currently mostly used for Kubernetes Node
objects, but I think explicitly limiting the application of these labels to Node
objects might be unnecessarily constraining. I've seen other cloud/virtual objects -- elastic load balancers, VPC subnets, etc -- as well as objects that represent physical inventory -- racks, TORs, etc -- be decorated with these labels and the desired meaning of the label is identical even if it doesn't apply to a Node
object.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK
|
||
This will also define that, while labels are generally mutable, the topology | ||
labels should be assumed immutable and that any changes to them may be ignored | ||
by downstream consumers of topology. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would "region" have some explicit geographic denotation? Currently, "region" is almost always (AFAICT) assumed to be related to a geographic location. I would support an explicit callout that a "region" should actually NOT be assumed to be a specific geographic location in order to dispel this particularly constraining assumption. :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree, but I think that's a comment for a PR to actually write the words :)
by downstream consumers of topology. | ||
|
||
<<[UNRESOLVED]>> | ||
Should we also try to standardize "kubernetes.io/hostname" as "topology.kubernetes.io/node" ? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See my comment above. I don't actually think limiting the application of these labels to the Node
object is beneficial.
This KEP proposes to define the meaning and semantics of the following labels: | ||
|
||
* topology.kubernetes.io/region | ||
* topology.kubernetes.io/zone |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Above, you say the definition of "region" and "zone" needs to address "the associated behavioral and failure properties of those groups". I think I agree. I'm interested in seeing the proposed definitions from folks in this area.
In particular, I'm curious how a single key-value label will be enough to describe the behaviours and failure properties. Would one alternative to this KEP (albeit a more invasive one) be to have actual Region
and Zone
objects in the API that could have additional properties associated with them?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see that as an alternative to, but rather a further extension. If we assert that topology is region/zone/host then we may want to expose additional information about the possible values for those labels (network cost metric, etc)
@thockin I just had an idea about hybrid cloud model could also be improved, if you could specify "use DC first" (maybe more relevant to multi cluster scheduling). TBH: I don't have a hybrid cloud, so take it maybe as random idea with no priority. |
122164c
to
f2a4f0f
Compare
@szuecs I am trying to bite off a really small nibble here - just documenting the current assumptions and behavior. :) How this is used is a different KEP (or several) |
f2a4f0f
to
76e2171
Compare
@ahg-g PTAL |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
/approve
replaces: [] | ||
|
||
prr-approvers: | ||
- "@jbelamaric" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
verify is complaining, use johnbelamaric
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK
76e2171
to
9dd59dd
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. just one nit
9dd59dd
to
0d40180
Compare
Pushed with nits fixed |
This KEP still needs another LGTM and approve :) |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED Approval requirements bypassed by manually added approval. This pull-request has been approved by: ahg-g, andrewsykim, M00nF1sh, thockin The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Kubernetes has always taken the position that "topology is arbitrary", and
designs dealing with topology have had to take that into account. Even so, the
project has two commonly assumed labels -
topology.kubernetes.io/region
andtopology.kubernetes.io/zone
- which are used in many components, generallyhard-coded and not extensible. Those labels have relatively well understood
meanings, and (so far) have been sufficient to represent what most people need.
This KEP proposes to declare those labels, and possibly one more, as "standard"
and give them more well-defined meanings and semantics. APIs that handle
topology can still handle arbitrary topology keys, but these common ones may be
handled automatically.
/cc @robscott
/cc @freehan
/cc @JeremyOT
/cc @andrewsykim
/cc @dcbw
/cc @danwinship
/cc @ahg-g