runtime
runtime copied to clipboard
Feature request: Implement "acorn apply" like behavior
To install an app and than update it, one must do a acorn run --name foo
and than on any follow up changes must run acorn update foo
. It would be really cool to have something like acorn apply --name foo
or similar to helm an acorn update --install foo
. This would allow easy docs in new projects. We just have to document the single command to run and update the app if already present.
Moreover, this will ease the setup of CD steps in pipelines, since we must not distinguish in the pipeline between first install and later updates.
We plan to add a feature like this. If you are not aware you can do acorn run -o yaml ...
which will give you the YAML output of the run command. So what your are asking for is basically the opposite where we take in that yaml. (dumb hack right now is to actually do acorn run -o yaml ....
and then edit the yaml and apply with kubectl apply
. We want a acorn native way to do that, but it is technically possible because acorn API is just a custom k8s api).
I basically want to have a "acorn make it so" mode. In that mode I give acorn a acorn image or Acornfile and an application name. And than acorn will figure out if the current application have to be updated or created. Because I actually don't care if it's the first time the application is created (acorn run
), or the application have to be updated ( acorn update
).
This is something I really hate with docker-compose for example. There is no quick way for "make it so".
Ah cool, I totally misunderstood your issue. I too would like this feature. There are three approaches I can think of to address this.
- If your run command has a
--name
parameter then we will create or update always. - Add a
--update
to run to enable the --update behavior. This will implicitly require --name to be set - Add a
--create
to update to create if not found.
I personally like option 2. Option 1 is nice but does remove a guardrail of when a user accidentally uses the same name twice and they really wanted two different apps.
I think, acorn run --update --name foo
will be a good solution.
One can easily write this into the CI scripts, or a developer can easily define a shell alias alias acornapply=acorn run --update --name
and than run acornapply foo
.
coming in 0.4. updated title to reflect the current plan
Almost there, one more tweak that won't make it in time for v0.4.0. We will release v0.4.1 when this is in
back in! 😎
working as expected. 👍