Commit Graph

7 Commits

Author SHA1 Message Date
Roland Huß b6a8fa9213 fix(service update): Only update fields which have been sent by server. (#155)
* fix(service update): Only update fields which have been sent by server.

This reflects the lemonade process step1. Tests have been adapted to
verify this behaviours.

The only situation when we update field coming from the server is for
"kn service update" for envs, image and requests/limits.

All other operation are either create (here, we always have to send the
old fields), or read (get/describe).

Fixes #144.

* chore: typo fix

* refactor(service update/create): Moved from Configuration to RevisionTemplateSpec

In order to proper handling the v1alpha1 -> v1beta1 migration methods has been updated to get rid fo Configuration within the service as this
is completely inlined in v1beta1.

The helper methods have been also updated accordingly.
I think we are good now.
2019-06-03 13:30:35 -07:00
Roland Huß 52b6b236fe Update to serving 0.6.0 (#129)
* chore: Update to 0.6.0

* chore: Fix test

* chore: Update modules.txt
2019-05-20 10:41:27 -07:00
Navid Shaikh cab512c969 Adds --force flag to service create command (service replace) (#79)
* Adds --force flag to service create command / service replace

 Fixes #13

* Keeps the resourceVersion of service with --force flag

* Updates the tests

* Removes unnecessary comments
2019-05-15 14:49:32 -07:00
Navid Shaikh 5b8b9d53bc Adds info message after service create and delete operations (#95)
* Adds info message after service create operation

 Fixes #87

 Aligns the service delete info message with service create too.

* Updates per review comments

 Adds newline after std imports
 Line breaks at proper operator
2019-05-14 10:44:41 -07:00
dr.max 5dcc0f8641 added tests to `$kn service update ...` and removed required --image (#81)
* added tests for service update with variations of --requests/limits-cpu --requests/limits-memory
* made image optional on service update since that was not the case and image should be optional
2019-05-01 15:36:33 -07:00
dr.max dd4e2a917b Added support for limits and requests of CPU and memory (#78)
* Added support for limits and requests of CPU and memory. Examples:
1. kn service create mysvc --image dev.local/ns/image:latest --request-cpu 100m --requests-memory 64Mi
2. kn service create mysvc --image dev.local/ns/image:latest --limits-cpu 1000m --limits-memory 1024Mi

You can also include and/or omit the requests and limits. So the following should also work:
kn service create mysvc --image dev.local/ns/image:latest  --request-cpu 1000m --limits-memory 1024Mi

* Addressed comments about maintaining existing requests and limits and added more tests
* TestServiceCreateWithRequests
* TestServiceCreateWithLimits
* TestServiceCreateRequestsLimitsCPU
* TestServiceCreateRequestsLimitsMemory
* TestServiceCreateRequestsLimitsCPUMemory

* updating dependencies and formatting tests code
2019-04-25 20:20:29 -07:00
Naomi Seyfer c3772a02ab `service create` beginning implementation (#47)
* Intermediate.

* Basic creation working

* Simplify

* Simple test passes

* Tests for env var updater, fix to bug found where wasnt getting a pointer

* Add some comments

* Fix env var quoting issues

* More comments from cppforlife

* Fix a couple copyrights
2019-04-03 22:33:56 -07:00