-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
chore(deployments/data-streams): adds don related label to node registration #16534
Conversation
|
labels = append(labels, &ptypes.Label{ | ||
Key: "nodeType", | ||
Value: &ntStr, | ||
}) | ||
|
||
labels = append(labels, &ptypes.Label{ | ||
Key: fmt.Sprintf("don-%d-%s", donID, donName), |
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 key feels off. Isn't that a value that we should assign to a key?
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.
Yeah, alternatively, we could use a don
key and assign fmt.Sprintf("don-%d-%s", donID, donName)
as its value. However, this approach would limit us to a single value per key. For instance, if you wanted to label a node with two DONs, there wouldn’t be a way to attach multiple values to the same key.
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.
Oh, I see, so this is a "presence marker", i.e. a boolean flag. Sure, works for me.
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 suppose whether this is a limitation for data-streams depends on how the product is operated, but it might still be a good idea to future-proof the implementation regardless.
This PR adds an additional label to indicate the DON a node belongs to, making it easier to retrieve a set of nodes from a specific DON in data-streams changesets.
Requires
Supports