Skip to content
This repository has been archived by the owner on Mar 16, 2024. It is now read-only.

Support acorn run --update --name ... functionality to achieve behavior like kubectl apply #466

Closed
hikhvar opened this issue Aug 5, 2022 · 8 comments
Assignees
Labels
kind/enhancement New feature or request
Milestone

Comments

@hikhvar
Copy link

hikhvar commented Aug 5, 2022

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.

@hikhvar hikhvar changed the title Implement "acorn apply" like behavior Feature request: Implement "acorn apply" like behavior Aug 5, 2022
@ibuildthecloud
Copy link
Member

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).

@hikhvar
Copy link
Author

hikhvar commented Aug 8, 2022

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".

@cjellick cjellick added this to the v0.2.0 milestone Aug 8, 2022
@ibuildthecloud
Copy link
Member

Ah cool, I totally misunderstood your issue. I too would like this feature. There are three approaches I can think of to address this.

  1. If your run command has a --name parameter then we will create or update always.
  2. Add a --update to run to enable the --update behavior. This will implicitly require --name to be set
  3. 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.

@hikhvar
Copy link
Author

hikhvar commented Aug 8, 2022

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.

@cjellick cjellick modified the milestones: v0.2.0, v.Next Aug 31, 2022
@iwilltry42 iwilltry42 self-assigned this Sep 24, 2022
@cjellick cjellick added the kind/enhancement New feature or request label Sep 26, 2022
@cjellick cjellick modified the milestones: v.Next, v0.3.0, v0.4.0 Sep 26, 2022
@cjellick cjellick added kind/feature and removed kind/enhancement New feature or request labels Oct 5, 2022
@cjellick cjellick changed the title Feature request: Implement "acorn apply" like behavior Feature request: Implement acorn run --update --name ... functionality to achieve behavior like kubectl apply Oct 5, 2022
@cjellick cjellick changed the title Feature request: Implement acorn run --update --name ... functionality to achieve behavior like kubectl apply Support acorn run --update --name ... functionality to achieve behavior like kubectl apply Oct 5, 2022
@cjellick
Copy link
Member

cjellick commented Oct 5, 2022

coming in 0.4. updated title to reflect the current plan

@cjellick cjellick added kind/enhancement New feature or request and removed kind/feature labels Oct 5, 2022
@cjellick
Copy link
Member

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

@cjellick cjellick modified the milestones: v0.4.0, v0.4.1 Nov 17, 2022
@cjellick
Copy link
Member

back in! 😎

@cjellick
Copy link
Member

working as expected. 👍

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants