-
Notifications
You must be signed in to change notification settings - Fork 615
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
Proposal: Allow user to set own service defaults #2794
Comments
I recall there have been some discussions around this. While I can see this being useful, there's also quite some things that should be taken into account, and a proper design would be needed to outweigh all the pros and cons, e.g.
|
Good points
IMO, something like fake service where defaults are set would work and they would be visible with command like
This can be avoided by clearly decide which settings are configurable like this. On DevOps working model it is many time these OPS guys who want to have control which nodes services are actually running. DEVs are just interested that they works 😉
IMO, client should see full spec.
If I have understood current logic correctly these would be changed on when services are updated next time. Need to bit think about if that is good enough. |
Actually; I just recall this conversation docker/cli#291 (comment). Also moby/moby#32284, so there's some options already
Agreed; possibly not the same options as you were thinking, but (this one was a long time ago, before swarm); one of the examples that came up in that discussion; e.g. having a default volume-driver, default logging-driver, default networking-driver. (For those we also discussed having "aliases" for certain class of drivers (a default could be defined for certain classes; a volume driver suitable for "temp", "local", "shared" use e.g.)
Yes, this is a tricky one, because either could make sense, depending on the use-case. In some use-cases you'd definitely not want service-definitions to be updated, unless asked for explicitly. Perhaps a For the above; if we want the defaults to be updated (instead of "baked in"), one approach would be to leave "defaults" empty in the definition, and merge the defaults when presenting the information ( |
Description
Currently service defaults are set on:
https://github.com/docker/swarmkit/blob/b6a4260bcd2c3e8550d6535c787fb7395f73af9c/api/defaults/service.go#L11-L41
but it would be very useful to be able set own Swarm wide defaults for placement, failure action, restart condition, etc...
The text was updated successfully, but these errors were encountered: