-
Notifications
You must be signed in to change notification settings - Fork 40.1k
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
Rename Minions -> Nodes internally #2788
Rename Minions -> Nodes internally #2788
Conversation
Brian, wanted your opinion on exposing "nodes" on v1beta1 and v1beta2 as additional endpoints. Right now we allow posting objects of either api version (1 or 2) to any API endpoint, so this is really just allowing naive clients to also post to the old names. Downside is someone writing a new client in another language might not realize that not all v1beta1 servers support "nodes" (joys of additive apis). |
Everything looks good, I'm just uncomfortable with removing the sanity checks. I added AddKnownTypeWithName in part to allow for type renames; can we make that work for this? |
Unfortunately the type check happens inside conversion, and the lookup happens after we've already checked the type. Name func might be able to abstract it - I'll look at what options we have. It would require a map of all possible type conversions, or normalization to the same type in both places. Will look at it more - I agree safety is lost this way.
|
@smarterclayton I'm happier with polluting old API versions (v1beta1/2) to simplify conversion than new ones (v1beta3). Could we not add minions to v1beta3? |
We can do that - when I expose v1beta3 I'll elide minions from the rest endpoints
|
8aa0d37
to
49ef31e
Compare
@lavalamp I reverted the type safety changes, and updated nameFunc to try to find a canonical name for a type by looking at the internal version. If we ever have both "minions" and "nodes" as their own objects (by introducing "minions" as something else in the new api version), we'll need to preserve more information when each type is registered (have an explicit "minions in v1beta1 resolves to nodes internally") but for now we don't need it. Ready for re-review. |
ed943e1
to
84b0fe7
Compare
LGTM - thanks, that's exactly what I was hoping for. Is it harmful to leave Minions out of v1beta3 entirely & not just omit them from the REST interface? |
It helps us test both directions round trip, but it's not strictly useful to end users. We can always drop it from v1 without impact. ----- Original Message -----
|
LGTM. Kicked travis. |
looks like it needs a rebase... |
Allows v1beta3.Node to be converted to api.Minion
Also refactor v1beta1/conversion_test.go `v1beta` -> `current` to allow easier cut and paste of tests.
Result is a 500 error if the client object is used
Replaces the client public interface but leaves old references to "minions" for a later refactor. Selects the path "nodes" for v1beta3 and "minions" for older versions.
Retrieves a lot less data
84b0fe7
to
0d887ae
Compare
Rebased, no code changes needed. Waiting for green. |
Rename Minions -> Nodes internally
@GoogleCloudPlatform/kubernetes-write FYI Minions are now called Nodes internally, when reviewing code or adding new code we should be gradually phasing out "minion" in doc, functions, variables, etc and replacing it with "node". That may take a long time, but we should suggest it or do it ourselves when we see it. |
For those of us who are new, what was the reason for the renaming? In my mind "minion" maps to a very specific set of components, whereas when I hear "node" I always wonder is the person talking about what we used to call "minion," or everything that runs in the VM, or everything that runs on the physical machine. |
Was it perceived political correctness? (I liked "minion" too.) |
Thanks for the pointer to #1111. It looks like the decision was to use "node" in the code and "kubernetes node" or "knode" in documentation and discussion. This seems reasonable, but I hope people actually do use "kubernetes node" or "knode" in documentation and discussion, because "node" is ambiguous for the reasons I mentioned in my previous comment. |
Allows "minions" to be passed to v1beta3, and "nodes" to be passed to v1beta1/v1beta2
endpoints. Relaxes conversion type checking on names where conversion is possible.
Now the API will respond to:
identically to their "minions" counterparts. Kubectl and kubecfg will also respect
"nodes".
A few other little fixes in the change. The big one is the mechanical find and replace.
Addresses parts of #1519