Commit Graph

3 Commits

Author SHA1 Message Date
Navid Shaikh 15dec583ca
Implement human readable output for kn route describe (#643)
* Implement human readable output for kn route describe

 - Keeps the machine readable output
 - Align the command description text, check for single argument, reported error messages and unit tests in service, revision, route, source binding describe commands

* Dont print separate section for owner references

* Print Service heading irrespective of owner.Kind == Service

* Align desc, err msg for trigger, apiserver and cronjob source
2020-02-10 07:46:07 -08:00
Roland Huß 164cb5f362
feature(source binding): Support for Sink Binding as source (#625)
* 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
2020-01-29 12:08:27 -08:00
Roland Huß 0ca6f14d4a feature(source cronjobs): Implementation of CronJobSource management (#542)
* feature(source cronjobs): Implementation of CronJobSource management

Contains create/delete/update/describe but not tests yet.

Still todo:

* Think how to provide a namespace for the sink
* Support for more sinks
* Synchronous mode for create & update
* Add list (or implement "source list")

* chore: Add a mock test for cronjob source

* addd missing license headers

* cosmetic changes

* chore(cronjobsource): Add tests

* fixup

* chore(cronjob source): Improved test coverage

* chore(cronjob source): some review polishing
2019-12-13 01:27:53 -08:00