* Extract reuseable part of sink flag
* Return nil on empty sink
* Extract kube params
* Compute with default mappings
* Allow to change the default log level
* Publicate Zap based logger, and allow custom loggers to be used.
* Add support for Eventing/v1beta2 EventTypes
* Skip e2e tests on missing API
* Shortne the sink help message
* Reword the help by the review recommendation
* Reflect review feedback
* 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>
* feat: Add subscription CRUD
- Add kn subscription command group and CRUDL sub-commands
- create/update uses following flag names for better alignment:
- --sink for subscriber
- --sink-reply for reply
- --sink-dead-letter for dead-letter-sink
- Add 'subscriptions' and 'sub' aliases
- Introduce shared library `knative.dev/client/lib/printing`
to print Sink object in describe output
* Set default channel type messaging.knative.dev/v1beta1:Channel
i.e. if no prefix is given to `--channel`, consider it of `Channel` type
* Update e2e tests
* Update channel flag description
* Update description for sink flag
- Add examples for broker, service and URI
- Add note about default prefix and service alias
* Update the sink flag description
* Update cli conventions doc
* Update the sink prefixes mapping
- 'ksvc' prefix for knative services
- Remove 'svc' or 'service' prefixes mapping for knative services
* Hint in err msg to use 'ksvc' if used prefixes 'svc' or 'service'
* Update CHANGELOG
* Update source list e2e tests to refer ksvc prefix
* Update sink flag description
* Add grouping for help message + streamlined help messages
The top-level looks like
kn is the command line interface for managing Knative Serving and Eventing objects
Find more information about Knative at: https://knative.dev
Serving Commands:
service Manage Knative services
revision Manage service revisions
route List and show service routes
Eventing Commands:
source Manage event sources
trigger Manage event triggers
Other Commands:
plugin Manage kn plugins
completion Output shell completion code
version Show the version of this client
Use "kn <command> --help" for more information about a given command.
Use "kn options" for a list of global command-line options (applies to all commands).
The following changes have been applied:
* Add CommandGroups for grouping commands together
* Add flexible templating for the help messages
* Moved global options to an own command ('kn options', much like 'kubectl options')
* Aligned wording and typography of help messages
These features has been highly inspired by kubectl grouping & help templating but has been considerably been stripped down to the needs of kn.
Signed-off-by: Roland Huß <roland@ro14nd.de>
* chore: Add missing file
* Update pkg/templates/command_groups.go
Co-authored-by: Matt Moore <mattmoor@vmware.com>
* chore: Add some test for error messages
* fix formatting
* chore: Add test
* moar tests
* Update pkg/kn/commands/completion/completion.go
Co-authored-by: Navid Shaikh <nshaikh@redhat.com>
* Update pkg/kn/commands/source/apiserver/delete.go
Co-authored-by: Navid Shaikh <nshaikh@redhat.com>
* Update pkg/kn/commands/service/list.go
Co-authored-by: Navid Shaikh <nshaikh@redhat.com>
* Update pkg/kn/commands/route/route.go
Co-authored-by: Navid Shaikh <nshaikh@redhat.com>
* Update pkg/kn/commands/revision/delete.go
Co-authored-by: Navid Shaikh <nshaikh@redhat.com>
* Update pkg/kn/commands/plugin/plugin.go
Co-authored-by: Navid Shaikh <nshaikh@redhat.com>
* Update pkg/kn/commands/service/delete.go
Co-authored-by: Navid Shaikh <nshaikh@redhat.com>
* Update pkg/kn/commands/revision/delete.go
Co-authored-by: Navid Shaikh <nshaikh@redhat.com>
* Update pkg/kn/commands/service/delete.go
Co-authored-by: Navid Shaikh <nshaikh@redhat.com>
* regen docs
* chore: Update conventions doc
* Move some direct configuration of rootcmd to NewRootCommand()
* Moved CaptureOutput to "test" package for reuse
Co-authored-by: Matt Moore <mattmoor@vmware.com>
Co-authored-by: Navid Shaikh <nshaikh@redhat.com>
* Refactor main flow, plugin and configuration handling
* The plugin handling has been moved out of the `KnDefaultCommand` constructor where it was executed as a side-effect. The original code from `kubectl` suffers from the same issue that plugin handling is not a top-level concern but was very likely introduced as an after-thought. Instead, the plugin handling is done now by a `PluginManager` which is explicitly called in `main()`.
* Configuration and bootstrap option handling is centralized in the package `option`. After the bootstrap happened, the content of the configuration file, as well as any other global configuration, can be obtained from methods on `config.GlobalConfig`. Also, all flag handling is delegated to cobra so that no own parsing is needed.
* Many of the logic in `pkg/kn/commands/plugin` for plugin management has been moved up to `pkg/kn/plugin` as this code is not only relevant for `plugin list` but also for the bootstrap process.
* fix: invalid subcommands will lead to a proper error message
* Update pkg/kn/config/types.go
Co-authored-by: Navid Shaikh <nshaikh@redhat.com>
* Update pkg/kn/plugin/manager.go
Co-authored-by: Navid Shaikh <nshaikh@redhat.com>
* Update hack/generate-docs.go
Co-authored-by: Navid Shaikh <nshaikh@redhat.com>
* Update hack/generate-docs.go
Co-authored-by: Navid Shaikh <nshaikh@redhat.com>
* chore: Add missing links
* chore: recert to shas in links in developer guide for now.
Co-authored-by: Navid Shaikh <nshaikh@redhat.com>
* 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
* feature(source binding): Support for Sink Binding as source
Sink bindings are managed like any other source. Sinks are specified as usual (with prefix and name),
'subjects' (the other end of the binding) is managed via a shortcut notation:
* with name: `<kind>:<apiVersion>:<name>`
* with label selector: `<kind>:<apiVersion>:key1=value1,key2=value2`
With `--subject-namespace` and additional namespace can be provided (shoudl be possible for a sink, too but is not yet)
The implementation already uses the new sink binding from the `sources.knative.dev` group
and hence is a bit inconsistent to the still old usage kf `sources.eventing.knative.dev` for apiserver source and cronjob.
However as we will move over to `sources.knative.dev` very soon (right after v0.12.0) release,
this is was more appropriates.
Still WIP, but eventually fixes#624
Task list:
- [X] create
- [] update
- [] delete
- [] describe
- [] list
* fix(source binding): Added missing commands
Also, it looks like that knative eventing 0.12.0 is still on the old api group.
So I need to move this code to use the legacyclient, too, for the sink binding
and only switch over to the new client for 0.13.0
* feature(source binding): Added missing subcommands
* update
* delete
* list
* describe
* fix(source binding): Removed --subject-namespace as this namespace cant b set.
Tuned describe output a bit.
* feat(source binding) add support for CeOverride
* fix: Worked on review comments
* fix: review comments
* fix: names in binding client