-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Mega-rename of service(s)/controller(s)/podController(s) to workload(s) #1777
Conversation
0d5cc37
to
6d975d4
Compare
Apparently even "controller" is wrong -- it refers to a program that interprets resources and e.g., starts pods. We eventually started naming the Deployments etc. "workloads", though not very visibly. |
I have seen that, but I (wrongly) assumed it meant something else. I am happy to rename everything to workload if that works better (even in Let me know if that would make this PR acceptable. |
A mass rename of Service and Controller to Workload would be mostly correct, I think. Maybe we should start a glossary. I'll go through all the actual changes and see whether each one makes sense. |
Upon further thinking I am not sure I like Workload either. It's a familiar term, though not very precise and it doesn't go well with the fact that we explicitly exclude pods which is counterintuitive (although ... who uses them in isolation anyways). Controller is more specific (although maybe too much since it's a k8s term, but I don't see it as a huge problem at this point). I guess the reason for moving towards Workload is that we now support HelmReleases which aren't controllers? I don't have a better suggestion at this point but I think it's worth spending some time thinking about it. I don't want to go through another mega-rename anytime soon (particularly since I plan to update @hiddeco @stefanprodan Thoughts? |
If I read the docs correctly the term Controller is a ReplicaSet in Kubernetes. All other type of objects are Workloads. Given that with |
I vote for workload, is what we use in Weave Cloud. Also Istio and other projects are using |
I have had Kubernetes-embedded people express confusion over the use of "controller" to refer to Deployments, etc., rather than the programs that interpret them. The consensus terminology seems to be that "workload" means a definition of something for the cluster to run, and a "controller" is a particular kind of program. |
.. though I should also note that within Kubernetes docs and code and so on, it's not especially consistent and has changed over time, too. |
Workload it is then |
Thanks a lot for all the comments! Again, I'm really enjoying working with you guys! |
6d975d4
to
84beebb
Compare
It took forever but it's done. I think it's going to take me some time to gain enough courage before doing this sort of thing again :) I also removed |
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.
❤️
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.
🥇
84beebb
to
e067647
Compare
I rebased and addressed the comments |
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.
Some completely understandable typos, and two main requests for changes:
- I think changing the RPC methods will break compatibility in a way that's not intended, so can we leave those for now;
Changing field names in things that get serialised, even with compensating tags, can make troubleshooting problems more difficult; so can we leave those for now, and plan to move serialised things into versioned packages (to be phased out eventually)
EDIT: Fons reverted the field name changes.
@@ -15,42 +15,39 @@ import ( | |||
"github.com/weaveworks/flux/update" | |||
) | |||
|
|||
type controllerShowOpts struct { | |||
type imageListOpts struct { |
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 good inclusion, thanks for changing this too
ServiceID flux.ResourceID | ||
Container resource.Container | ||
ImageID image.Ref | ||
WorkloadID flux.ResourceID |
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.
(NB to myself: this looks like it might be used in the API, but isn't)
2799b66
to
5fb9daf
Compare
I think this will lead to reverting a big part of the renaming. Do you mean the method names or also the type names? (I don't know the details of |
207ea2e
to
8f6ab6a
Compare
Owps, looks like we angered pflag:
|
It's just a near-duplicate line in |
Partly for historical reasons, there was a mixture of the term _service_, _controller_ and _workload_ throughout the whole codebase meaning the same thing. It was confusing for the newcomer and unpleasant to read. I left "service(s)" strings/identifiers as is were unavoidable to preserve backwards compatibility (e.g. URL pathas and query parameters, serialized data structure fields exposed to the http client etc ...). I renamed all the _controller_ commands and flags in `fluxctl` to _workload_ equivalents, preserving backwards compatibility (deprecating `--controller`).
They were deprecated and leading to an error when used.
This is to avoid confusion between names serialized data and names used in the code. These field names will be renamed again when versioning is in-place for the structs.
8f6ab6a
to
92a3aac
Compare
Sigh, sorry about this. I did test It's fixed now. |
There was a mixture of the term service and controller throughout the whole codebase meaning the same thing. It was confusing for the newcomer and unpleasant to read.
I don't know if the term service was supposed to be an abstraction agnostic to Kubernetes for things which can be updated in a cluster. If so, it was leaking considerably, including
fluxctl
and data structure names.I left "service(s)" strings/identifiers as is were unavoidable, to preserve backwards compatibility (e.g. query parameters, serialized data structure fields exposed to the http client etc ...).