-
Notifications
You must be signed in to change notification settings - Fork 53
Remove some of the scheduling abstraction in favour of more tightly coupled model <-> k8s integration #88
Comments
Domain information is now saved to routerConfig annotations in addition to still being in etcd. This solves part of deis#50 Also adds new flatten and dict_merge to both scheduler and models The code has a little oddity in it where subdomains for app (on the platform domain) are added during scale event from 0 to 1. That will be address in deis#88 It is possible to remove the apps subdomain but during any scaling event it gets added back to the Domain model. This allows the router to treat all domains the same way
This makes sense to me, and this write up makes the issue more clear to me than our convo yesterday. Things such as "service," for example are unique to k8s. Keeping a generic interface that was suitable for multiple schedulers before, meant not hooking into app creation, for instance, to define a service. It had to be done elsewhere where it was a tad trickier. I get it. It no longer needs to be this way. To be fair, there was probably a clever way to have done this better in the past too, but hindsight is 20/20. I'm no django expert, but here's what I have in mind... Separate generic, highly reusable k8s functions such as crud operations on services, rcs, etc. into their own module for eventual extraction into a package. (I know you already intend that.) Then create a layer between that and the model with very generic fuction names on its interface-- things like This would allow, for instance, k8s service creation to be triggered by app creation, even though services aren't a thing in other schedulers. Persisting a new app object triggers |
Domain information is now saved to routerConfig annotations in addition to still being in etcd. This solves part of deis#50 Also adds new flatten and dict_merge to both scheduler and models The code has a little oddity in it where subdomains for app (on the platform domain) are added during scale event from 0 to 1. That will be address in deis#88 It is possible to remove the apps subdomain but during any scaling event it gets added back to the Domain model. This allows the router to treat all domains the same way
Domain information is now saved to routerConfig annotations in addition to still being in etcd. This solves part of deis#50 Also adds new flatten and dict_merge to both scheduler and models The code has a little oddity in it where subdomains for app (on the platform domain) are added during scale event from 0 to 1. That will be address in deis#88 It is possible to remove the apps subdomain but during any scaling event it gets added back to the Domain model. This allows the router to treat all domains the same way
Domain information is now saved to routerConfig annotations in addition to still being in etcd. This solves part of deis#50 Also adds new flatten and dict_merge to both scheduler and models The code has a little oddity in it where subdomains for app (on the platform domain) are added during scale event from 0 to 1. That will be address in deis#88 It is possible to remove the apps subdomain but during any scaling event it gets added back to the Domain model. This allows the router to treat all domains the same way
Domain information is now saved to routerConfig annotations in addition to still being in etcd. This solves part of deis#50 Also adds new flatten and dict_merge to both scheduler and models The code has a little oddity in it where subdomains for app (on the platform domain) are added during scale event from 0 to 1. That will be address in deis#88 It is possible to remove the apps subdomain but during any scaling event it gets added back to the Domain model. This allows the router to treat all domains the same way
Domain information is now saved to routerConfig annotations in addition to still being in etcd. This solves part of deis#50 Also adds new flatten and dict_merge to both scheduler and models The code has a little oddity in it where subdomains for app (on the platform domain) are added during scale event from 0 to 1. That will be address in deis#88 It is possible to remove the apps subdomain but during any scaling event it gets added back to the Domain model. This allows the router to treat all domains the same way
Domain information is now saved to routerConfig annotations in addition to still being in etcd. This solves part of deis#50 Also adds new flatten and dict_merge to both scheduler and models The code has a little oddity in it where subdomains for app (on the platform domain) are added during scale event from 0 to 1. That will be address in deis#88 It is possible to remove the apps subdomain but during any scaling event it gets added back to the Domain model. This allows the router to treat all domains the same way
Domain information is now saved to routerConfig annotations in addition to still being in etcd. This solves part of deis#50 Also adds new flatten and dict_merge to both scheduler and models The code has a little oddity in it where subdomains for app (on the platform domain) are added during scale event from 0 to 1. That will be address in deis#88 It is possible to remove the apps subdomain but during any scaling event it gets added back to the Domain model. This allows the router to treat all domains the same way
I'm going to close this as we have done a lot to separate things out and the high level functions left in the scheduler are pretty slim, beside |
check image access on `deis pull`
Right now all the model code has to interact with the scheduler via a thin and very constraint
scheduler.k8s
andscheduler.abstract
API which includes very simple constructs such asstart
,create
,destroy
,deploy
,scale
and so on.This is a hangover from when we had many schedulers and we were catering to the lowest common denominator and doing things in a very simplistic manner to reduce the surface area of models <-> scheduler interaction.
An example of that is when
deis apps:create
is ran then the only wayk8s:service
is created is when ascale
event is triggered and internal to that scheduling code it is discovered thatReplicationController
andService
is missing for the given app, the scheduling code creates those and then continues to scale from0
to1
.The above makes it very hard for us to appropriately hook into the
k8s
life cycle to dropannotations
(such asdomain
information) to an existingService
without teachingDomain
model how to createServices
in addition to update. Keeping with theDomain
example I have had to teachDomain
minimalk8s
-fu to store information.This was all much simpler with
etcd
due to a far more adhoc nature. Drop a key,confd
picks it up and does stuff with it somewhere. Fullk8s
integration is forcing us to think about models differentlyBy bringing
k8s
up one layer and giving models more direct access then we can keep thek8s-client
clean and potentially separated out fromworkflow
. This would involve bringing back #48, fixing it up and extending it so models can use it easily.k8s
up into the models?The text was updated successfully, but these errors were encountered: