Open smothiki opened 8 years ago
solution is to call workflow to get all apps created rather than relying on k8s namespace.
:+1: to ^^
@helgi thoughts on this? earlier we had decided to use the k8s API and not to use the controller API to get the list of valid apps
I'm still not clear why we can't use the k8s API. The events api and many other things are used by the controller to handle state like that.
If that's the route we have to go to get a more stable idea of what apps are around then so be it but it goes against trying to make components more self sufficient. That can be solved later if k8s gets its act together tho
maybe @smothiki can expand, but my understanding is that an app may exist in the DB but the namespace may not yet exist. currently if the cleaner runs in that window, it'll clean the app's directory
@helgi I totally forgot about k8s events API rather than polling k8s API for every APP. Lets listen to even stream for deleted event for an APP and delete that particular directory
@arschles any comments on above proposal
nope, that sounds like a good plan. I can get started on at least a prototype shortly
moving this to next sprint
Right now cleaner calls k8s namespace to check for app existence and starts cleaning repos.