Commit Graph

31 Commits

Author SHA1 Message Date
Shashank Sharma 66ddaf63ae
Assigning nodes to knative services (#1924)
* node selector changes

* adding nodeselector and node affinity (only required)

* changing type for toleration and affinity

* handling panic

* handling panic

* handling panic

* handling panic

* handling panic

* adding preferred node affinity support

* adding preferred node affinity support

* adding test cases, accepting multiple whitespace separated values for nodeaffinity

* adding test cases, accepting multiple whitespace separated values for nodeaffinity

* updating docs

* updating docs

Signed-off-by: Shashankft9 <shanky.337marchss@gmail.com>

* adding experimental flags section

* basic setup with experimental features working, removing general subsection in favour of original code

* Revert "basic setup with experimental features working, removing general subsection in favour of original code"

This reverts commit 793718e51065d6c05f044c5d172c52caf79aac0a.

* Revert "adding experimental flags section"

This reverts commit 4f844f23b77f842579e7d3a1a0057b6c95f9e4bb.

* doc nits

* tests added, docs sanitised

Signed-off-by: Shashankft9 <shanky.337marchss@gmail.com>

* adding feature flag message for pvc

Signed-off-by: Shashankft9 <shanky.337marchss@gmail.com>

* fixing lint and code analyzer issues

Signed-off-by: Shashankft9 <shanky.337marchss@gmail.com>

* whitespace fixes and feature flag doc change

* whitespace fixes and feature flag doc change

* whitespace fixes and feature flag doc change

* whitespace fixes and feature flag doc change

---------

Signed-off-by: Shashankft9 <shanky.337marchss@gmail.com>
2024-05-03 12:53:31 +00:00
Anshul Sharma 70805a67db
Add support for Profiles (#1903)
* Added test case for Profiles

* changed config profiles to be a map, added an accessor method for getting a certain configuration profile

* Added test cases for profile check

* added profile feature

* Fix generated files

* Fix go.mod deps

* Added support for labels and added test cases

---------

Co-authored-by: Roland Huß <rhuss@redhat.com>
Co-authored-by: David Simansky <dsimansk@redhat.com>
2023-12-20 13:17:37 +00:00
David Simansky 4621b10ed6
Change default SecurityContext to none (#1832)
* Change default SecurityContext to none

* Fix unit test
2023-07-26 15:16:41 +00:00
David Simansky 75d62a3618
Add default SecurityContext to every new ksvc (#1821)
* Add default SecurityContext to every new ksvc

* Add basic seccon config flag

* Fix export e2e tests

* Fix unit test
2023-07-13 08:01:14 +00:00
Amir Alavi 0382c171d7
cli options to enable user, uid, and group impersonation (#1745)
* cli options to enable kubernetes user and group impersonation

Signed-off-by: Amir Alavi <amiralavi7@gmail.com>

* cli option to enable uid impersonation

Signed-off-by: Amir Alavi <amiralavi7@gmail.com>
2022-10-13 13:11:53 +00:00
Gunjan Vyas 84cba981c1
Added config support to specify read only volumes (#1732)
* Added config support to specify read only volumes

* modified unit tests for read only customization

* fix e2e test
2022-10-05 12:01:29 +00:00
Gunjan Vyas 6376f9a607
Add --scale-activation flag to match new Serving option (#1729)
* Add --scale-activation flag to match new Serving option

* Add scale activation tests

* Docs gen

* moved the scale activation test to service_options_test.go
2022-09-05 09:00:22 +00:00
David Simansky 9abb876c76
Add --probe-liveness and --probe-readiness flags (#1697)
* Add --probe-liveness and --probe-readiness flags

* Add more unit test

* Add even more unit tests

* Fix spelling

* Add error coverage

* Update pkg/kn/flags/podspec.go

Co-authored-by: Gunjan Vyas <vyasgun20@gmail.com>

* Regen docs

* Fix error message

* Split probe opts into standalone flag

* Fix docs

Co-authored-by: Gunjan Vyas <vyasgun20@gmail.com>
2022-07-12 17:27:13 +00:00
Gunjan Vyas c23a1f7dbe
Added PVC support to volume mounts (#1693)
* Added  PVC support to volume mounts

* Added unit tests for pvc volume type

* Added e2e tests
2022-07-01 09:54:42 +00:00
Gunjan Vyas b6965469fe
Added support for mounting EmptyDir volume type (#1679)
* Added emptyDir support for volume mount

* Moved detailed emptyDir configuration spec to --volume

* Added unit tests

* Added readonly false for emptyDir volume
2022-06-24 12:22:25 +00:00
Gunjan Vyas b858dab2b4
Added subpath functionality to --mount flag (#1655)
* Added subpath functionality to --mount flag

* Added mount subpath test

* Added e2e tests for volume subpath mount

* Updated changelog
2022-04-18 14:12:13 +00:00
Gunjan Vyas bb055ee1a4
Added scale-metric flag to configure metric name (#1653)
* Added scale-metric flag to configure metric name

* Updated flag description

* code gen fix

* Added test for coverage

* Updated Changelog
2022-04-18 09:15:12 +00:00
Gunjan Vyas 2929f381a9
Added flag to configure wait-window between intermediate errors durin… (#1645)
* Added flag to configure wait-window between intermediate errors during service create

* Added waitconfig struct

* Moved --wait-window flag to shared flags
2022-04-13 17:17:09 +00:00
Gunjan Vyas 0ac405d4b5
Add timeout option to service create (#1643)
* Add timeout option to service create

* Changed unit tests to reflect the default timeout value

* Fixed timeout help message

* Added unit test for --timeout flag

* Moved --timeout flag to shared flags
2022-04-13 16:14:09 +00:00
Gunjan Vyas bb7fd73821
Added pull-policy flag to service (#1644)
* Added pull-policy flag to service

* Added unit tests

* Added test to increase coverage

* Added unit test and made --pull-policy case insensitive

* Added config_changes test cases to increase coverage

* Improve help message for pull-policy flag

* Move image pull policy processing to podspec.go

* Add negative test case for pull policy
2022-04-13 08:15:08 +00:00
Boaz Shuster 0e89cfccbe
Fix env, annotation and labels flags in service create/update/apply (#1516)
Signed-off-by: Boaz Shuster <boaz.shuster.github@gmail.com>
2021-11-25 00:32:16 -08:00
Roland Huß e7e5372594
Mark deprecated options as 'hidden' (#1500)
so that they do not appear in the help messages
2021-11-01 08:00:23 -07:00
Roland Huß db3bcbc6b0
Rename `--extra-containers` to `--containers` (#1499)
and make `--extra-containers deprecated`
2021-11-01 04:39:22 -07:00
Roland Huß 33666193cf
Rename --concurrency-target and --concurrency-utilization (#1490)
* Rename --concurrency-target and --concurrency-utilization

The new option names are --scale-target and --scale-limit, respectively

Both options are still available but deprecated. Reasoning is that both
options really belong to the 'scale' option group as they influencen
the scaling behaviour.

* rebased and added changelog
2021-10-27 02:40:01 -07:00
Roland Huß 03045c8195
Move `--autoscale-window` to `--scale-window` (#1489)
* Move `--autoscale-window` to `--scale-window`

and deprecate `--autoscale-window`

* regenerate docs

* fix issue that --scale-window was not picked up

* add some test

* add some additional test
2021-10-26 02:12:20 -07:00
Boaz Shuster 539a5a97a6
Add option to allow enviornment variables using file (#1433)
* Add `GetEnvsFromFile` to `util`
* Add to `podspec` flags `--env-file` and `EnvFile` to `PodSpec`.
* If `env-file` is specified load env vars from file to memory,
  convert them into ordered map and pass them to UpdateEnvVars function
  by setting custom args for each one of them instead of using command line args.

Signed-off-by: Boaz <boaz.shuster.github@gmail.com>
2021-09-21 11:41:38 -07:00
David Simansky fc7e87667f
Add support for multi-containers (#1382)
* Add support for multi-containers

* Update examples

* Fix UpdateContainers to match by name

* Add experimental note & tests

* Rename flag to --extra-containers

* Fix formatting

* Fix flag renaming leftovers

* Update pkg/kn/flags/podspec_test.go

Co-authored-by: Roland Huß <rhuss@redhat.com>

Co-authored-by: Roland Huß <rhuss@redhat.com>
2021-08-09 12:25:12 -07:00
Murugappan Chetty 0c3e236006
make command as array instead of string (#1380)
* make command as array instead of string

* make command as array instead of string

* make command as array instead of string

* make command as array instead of string

* make command as array instead of string

* make command as array instead of string
2021-07-13 13:32:31 -07:00
Zbynek Roubalik a086cc9707
Add `env-value-from` flag & keep order of env vars in created/updated services (#1328)
* Add --env-value-from & preserve env var order

Signed-off-by: Zbynek Roubalik <zroubali@redhat.com>

* add e2e test for checking Service Env Vars

Signed-off-by: Zbynek Roubalik <zroubali@redhat.com>

* update changelog

Signed-off-by: Zbynek Roubalik <zroubali@redhat.com>

* refactor UpdateEnvVars()

Signed-off-by: Zbynek Roubalik <zroubali@redhat.com>

* apply review suggestions

Signed-off-by: Zbynek Roubalik <zroubali@redhat.com>

* fix typo

Signed-off-by: Zbynek Roubalik <zroubali@redhat.com>

* improve test cases names

Signed-off-by: Zbynek Roubalik <zroubali@redhat.com>
2021-06-29 01:48:13 -07:00
Roland Huß 5f68d61295
update: Change default to server-side generated revision names (extended) (#1240)
* update: Change default to server-side generated revision names

Fixes #1144

* update: Fix wait loop for synthetic events for which the generations are already in sync

* fix assertion as a service label change does not create a new revision

* fix: --cluster-local does not create a new revision but just changes a service's label

* chore: Fixed formatting

* update: Check generation in update already before doing a watch

* fixed lint issue

* fix test assertions
2021-02-23 23:16:46 -08:00
David Simansky 671ee229f3
feat: Add `--context` flag to choose specific context from kubeconfig (#1234)
* feat: Add  flag to choose specific context from kubeconfig

* chore: Generate docs

* chore: Add changelog entry

* fix: Review feedback

Co-authored-by: Roland Huß <rhuss@redhat.com>

* chore: Add --cluster flag to specify cluster from kubeconfig

* chore: Generate docs

* chore: Update changelog

Co-authored-by: Roland Huß <rhuss@redhat.com>
2021-02-23 00:54:46 -08:00
Markus Thömmes d647e44938
Upgrade a few assorted dependencies (#1220)
* Update spf13 deps

* Upgrade gotest.tools and correctly use versioned module

* Regenerate docs
2021-02-12 05:55:50 -08:00
Mike Petersen ed4fa06e2e
adds --scale range option (#1114)
* adds --scale range option

* added scale range tests with negative values
2020-11-24 11:51:43 -08:00
David Simansky 8d3580a4b3
chore: Remove deprecated requests/limits flags (#1110)
* chore: Remove deprecated requests/limits flags

* chore: Add changelog entry
2020-11-11 05:52:59 -08:00
Navid Shaikh 45ffadecec
Drop deprecated --async flag support (#1094)
in the favor of --no-wait flag
2020-11-09 01:49:17 -08:00
Roland Huß 8ca97c7920
Feature: "kn service apply" (#964)
* feat: "kn service apply"

This commit introduces a client-side apply with a plain JsonPatchMerge. This is more limited than a StrategicPatchMerg as it does not allow to merge lists (they are just overwritten). Also is not a real 3-way merger that would lead to a conflict when both the, the server-side and the provide update overlapp in fields that updated, compared to the shared original configuration. This is a problem of  JsonThreeWayMerger itself, as pointed out in https://github.com/kubernetes/kubernetes/pull/40666#pullrequestreview-502804243.

This limitation is shared with kubectl, which suffers from the same issue if using `kubectl apply` with a custom resource (i.e. with everything that has schema that is not registered within kubectl).

Tests are missing, too, but will come soon

* chore: Add tests for 'kn apply'

* refactor: Removed PatchService from pulic API interface

* fix: Display of service URL at the end, when no changes apply

* chore: Add initial E2E test

* chore: Implemented review suggestions

* More tests
* Example for kn service apply
* Remove commented-out code

* lint fixes

* fix formatting of kn service apply doc

* fixing go.sum

* chore: Update deps
2020-11-02 00:36:35 -08:00