Commit Graph

11 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
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
Chris Suszynski 605e40ab56
Making a toReference public to enable reuse from kn-plugins (#1203)
* Making a toReference public to enable reuse from kn-plugins

* Add to changelog

* Reformat

* Reformat p.2
2021-01-26 07:45:30 -08:00
Navid Shaikh c1de0add97
Add --ce-override flag for apiserver and ping sources (#865)
* SinkBinding: Support update and remove of cloud events extensions

 - Add unit tests
 - Update flag description
 - Update parsing utilities for map

* APIServer: Add, update and remove cloud events extensions

 - Add --ce-override flag
 - Add unit tests

* PingSource: Add, update and remove cloud events extensions

  - Add --ce-override flag
  - Add unit tests

* Update CHANGELOG

* Update binding builder method name to CloudEventOverrides

* Fix lint warnings

* Add ceoverrides to unit test objects

* Update PR number in CHANGELOG

* Show ce-override extensions in describe output
2020-06-01 02:39:03 -07:00
Ying Chun Guo 00da0064a0 Improve 'source apiserver update --resource' (#590)
* improve 'source apiserver update --resource' to follow the common update semantics

* add more tests and update based on comments

* rebase
2020-01-28 06:49:26 -08:00
Ying Chun Guo 71c9238b7e Enable trigger filter to be optional (#603)
* Enable trigger filter to be optional

* remove RemoveFilters from builder
2020-01-13 23:33:04 -08:00
Lv Jiawei 99d8b2269b Handling map like options in a same way (#592)
Fixes #577
2020-01-01 22:57:41 -08:00
Ingwon Song 9d759ca6e4 Add support for envFrom and volumeMounts (#393)
* Add support for envFrom, volumeMounts, serviceAccountName, and imagePullPolicy

* Add comments for added functions

* Add test functions for --env-from

* Add test functions for --volume-mount

* Add test functions for --service-account-name and --image-pull-policy

* Add testing functions to cover the case "service update --env-from"

* Add test functions to cover the case "service update --volume-mount"

* Add missing test functions for config_changes.go

* Add testing functions for pkg/util/parsing_helper.go

* Fix a bug on a test case, caused by ignoring random orderedness of map

* Remove image-pull-policy because it is not supported by Knative

* Fix comments to clarify it as well as to fix a typo

* Remove service-account-name flags in order to submit it as a seperate PR

* Split --volume-mount flag into --volume-mount and --volume flags in order to enable multiple times mounting for the same volume

* Change the name of local variable to simplify

* Update docs

* Change the flag "--volume-mount" into "--mount", and fix it to make volume automatically when the config-map or secret is directley used. In addition, the test cases are changed to new unit test style. To keep the original orderedness given via flags, OrderedMap implementation is added as well

* Fix usage descriptions for the mount flag

* Factor out the name existence checking from createEnvFromSource

* Fix the usage description for --mount

* Sanitize a generated volume name
2019-11-06 04:15:03 -08:00
Tsubasa Nagasawa 9b52fc8345 Update EnvVars in alphabetical order of Env key name (#389) 2019-09-12 01:12:32 -07:00
Toshinori Sugita 699ac5e7cb fix lint errors (#388)
* fix typo (misspell)

* ineffectual assignment to err (ineffassign)

* if block ends with a return statement, so drop this else and outdent its block (golint)

* should replace errors.New(fmt.Sprintf(...)) with fmt.Errorf(...) (golint)

* struct field LogHttp should be LogHTTP (golint)

* fix last typo
2019-08-24 22:46:13 -07:00
Aaron Lerner 27d8f4330a Service and Revision labels (#342)
* Add support for service labels with --label or -l

* Add tests

* Fix typo

* Move MapToArray helper method to separate file

* Allow unsetting labels by passing empty value

* Fix test

* Add test case for label removal

* Wrap error message with flag

* Update docs to include --label

* Update labels on both services and revisions

* Add some test cases around weirder user input

* Change unset behavior and allow setting empty env and label

* Update docs for new unset behavior

* Make single keys to map to empty values

* Move helper to util

* Use assert.DeepEqual

* Use new mock test + check both service and revision

* Use new method and correct year
2019-08-13 17:07:06 -07:00