* 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
* Vendors serving v0.9.0
* Updates references per serving v0.9.0 vendoring
- Updates code and tests to refer the required data structure and method/function calls
- duckv1beta1 -> duckv1 conditions
- traffic percent value is now *int64
- containerConcurrency validation method relocation
* fix(golint): exported function should have comment
for NonReadyConditionReason function
* Updates check for removing null targets
fixes the pointer value check
* Updates per review comments
* feat(annotations): Adds annotation flag for service create and update
- Adds specified annotations to service object meta and revision template meta
- Adds --annotation / -a flag to service create and update options
- User can specify '-' at the end of the annotation key to remove an annotation
- Adds unit and e2e tests
- Updates docs and changelog accordingly
* Adds example for service create with annotation
* Adds mock unit tests for service update with annotations
* Removes the short hand -a for annotation flag
* Add --service-account-name flag
* Change the flag --service-account-name to --service-account, and change its default value from "-" to an empty string. In addition, CHANGELOG.adoc is changed.
* Update docs with ./hack/build.sh
* Option to freeze revision to digest
* Tests pass. Checkpoint.
* Tests for env now check pinning to digest
* Bool flag using convention. Tweak usage.
* Describing the image carefully using the annotation and digest
* lint
* Test matrix of locking to digest behaviors
* Expose both flags, and rewrite help text again
* Unit tests.
* Removed unsed method
* Add tests for getting base revision
* Make tests actually test stuff better
* Make tests actually test stuff better
* A mergeout killed a returning of error. Restore it
* Help text again
* Update serving to 0.8. Try building.
* Find the right serving version
* Change our own import path to knative.dev to match
* Remove dependency on old version of client
* Update yaml template
* Add sleep to test to deal with race
* fix merge conflict
* Update vendor modules
* Groundwork for naming revisions automatically and deliberately
* Tests for name updates
* Add godoc comments
* Changelog entry for naming flags
* Error when trying to BYO revision name to an old-format service
* fix tests again
* Template the names
* Polsh, remove unused flags, generate helptext, add better helptext
* Decapitalize error msg
* Respond to Roland comments
* Forgot to add test file
* Be a good citizen, add more tests, try to get coverage happy.
* true dat
* Re-add implicit service prefix if one was not added.
* 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
* Validate invalid container concurrency options
* Use assert package
* Use FlagSet.Changed and don't care about default values
* Update dependency
* Follow e2e test changes
* Return error if invalid value is specified by users
* Fix broken e2e test
* Add more unit tests
* Fix error message
* Fix comment statement
* Revert back unrelated changes
* Fix typo
(and gofmt if goimports isn't available)
- Runs goimports on all packages except vendor dir and filter on only *.go files
- Runs gofmt on all dirs except vendor and filters on *.go files, also writes the results instead of printing diff
- Fixes typo s/insteat/insead
- Adds the changes after adding simply code step in hack/build.sh
- Uses source_dir var specifying the dirs to work on
- Combines gofmt commands into single command
* feat(build.sh): Enable goimports for cleanup imports + cleanup imports
Much like 'go fmt' for cleaning up go source, 'goimports' can help
in properly formatting and grouping imports. See https://goinbigdata.com/goimports-vs-gofmt/
for a quick overview.
This commit also cleansup imports on existing files.
* fix(build): Add missing space for output on iterm
* chore(build): Merged gofmt and goimports
And changed order so that formatting and import reordering comes
before compiling and testing
Autoscaler concurrency annotations are added to the revision template if
--min-scale / --max-scale / --concurrency-target/--concurrency-limit
are provided to `kn service create` and `kn service update`
Fixes#151
* 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.
* 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