`kra pod edit` should render compose and then use the launch api
Opened this issue · 1 comments
kra pod edit uses a json object that is only available in this api.
while its a good format in isolation, its just weird in context of having originally used compose or run to launch a pod and then edit it in a totally different format.
ideally we want a way to render a namespace or pod as canonical compose.
i.e do not just store the compose file, since we also support run and technically still k8s.
also we might change the syntax slightly over time, and the original compose wouldnt even work anymore.
editing a namespace this way will always be non ideal because a later kra up
from local compose file will just undo it,
so i suggest adding a taint to a namespace. that is the user gets a warning before applying. (see also #18)
in an ideal future, we keep all diffs as log, so we can even show the diff, but probably not yet.
if i can make a wish, i'd like it to work this way:
kra edit <tab>
shows namespaces and then pods below that
kra edit myapp
renders the compose for the entire namespace
kra edit myapp/nginx
only one pod
then after closing editor, show diff then immediately apply ( #18 ) rather than requiring a restart