Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add "kn service apply" #655

Closed
rhuss opened this issue Feb 11, 2020 · 8 comments
Closed

Add "kn service apply" #655

rhuss opened this issue Feb 11, 2020 · 8 comments
Labels
kind/feature New feature or request lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale.

Comments

@rhuss
Copy link
Contributor

rhuss commented Feb 11, 2020

In what area(s)?

Describe the feature:

One criticism of kn service create is its imperative nature (also I only partially agree as I think at the end we still just create a declarative resource descriptor which is thrown over to k8s)

We have kn service create --force but this (a) not very intuitive and (b) not idempotent (IIRC).

I suggest adding a kn service apply with the very same semantics of a create-and-update that a kubectl apply offers. Having the possibility of a 3-way merge and a distinction of own and external changes for a resource would be nice, but in a first step, I think it might not be necessary (if the implementation is too complicated). The most important part would be to have an idempotent operation (i.e. if applied twice for the same parameters it should be a no-op). kn service apply would be perfectly suited for being used in a CI pipeline step when it's not clear if a service is already deployed or not.

We could have a look at how kubectl apply is implemented. AFAIK its currently done completely client-side but there are plans to move the diff algorithm to the server-side.

@rhuss rhuss added the kind/feature New feature or request label Feb 11, 2020
@wslyln
Copy link
Contributor

wslyln commented Feb 25, 2020

Could I work on this? or is this still be scoped.

@navidshaikh
Copy link
Collaborator

/assign @wslyln

I think scope mentioned in the issue description is good to start with.

@rhuss
Copy link
Contributor Author

rhuss commented Mar 3, 2020

@wslyln let me know if you need some more clarification on the scope and use case. Thanks for picking this up !

coryrc pushed a commit to coryrc/client that referenced this issue May 14, 2020
* Let boskos handle test cluster teardown

* Let boskos delete leaked network resources
@wslyln wslyln removed their assignment Jun 8, 2020
@wslyln
Copy link
Contributor

wslyln commented Jun 9, 2020

Hi sorry, but I don't think I have time right now to accomplish this task, I'll reassign myself if I work on it later. I'll attempted it slightly, but didn't quite understand how the original kubectl apply used annotations to save the previous state's configs.

@rhuss
Copy link
Contributor Author

rhuss commented Jun 10, 2020

No worries, and thanks for the update !

@itsmurugappan
Copy link
Contributor

@rhuss your thoughts on Ko Apply way of dealing this ?
https://github.com/google/ko/blob/master/pkg/commands/apply.go

@github-actions
Copy link

This issue is stale because it has been open for 90 days with no
activity. It will automatically close after 30 more days of
inactivity. Reopen the issue with /reopen. Mark the issue as
fresh by adding the comment /remove-lifecycle stale.

@github-actions github-actions bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Oct 15, 2020
@rhuss
Copy link
Contributor Author

rhuss commented Dec 1, 2020

@itsmurugappan I think this would be a nice addition, but only if not restricted to Golang. In the meantime, mink continued on this idea, by leveraging build packs for broader language support. Let's keep core kn focussed on deploy aspects only.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature New feature or request lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale.
Projects
None yet
Development

No branches or pull requests

4 participants