client/pkg/kn/commands/source
Navid Shaikh cc1b68e068
List inbuilt sources if CRD access is restricted (#948)
* List inbuilt sources if CRD access is restricted

 Fixes #947
 - Identify restricted access error
 - If server returns restricted access error, fallback to listing
   only eventing inbuilt sources using their GVKs.
 - List any inbuilt source (ApiServerSource) object and read the error
   to know if eventing is installed for `kn source list-types`.

* Fix golint warnings

* Remove unused imports

* Verify each built in source before listing source types

* Improve the check if sources are not installed in the cluster

* Update finding forbidden error

* Update finding errors

* Add unit tests for IsForbiddenError util

* Add unit tests

* Add tests for dynamic pkg library

* Add unit tests for case when no sources are installed

* Update test name
2020-08-04 04:42:28 -07:00
..
apiserver Revisit sink prefixes: Support only 'ksvc' prefix and drop 'svc', 'service' support for knative service (#896) 2020-07-14 00:46:18 -07:00
binding Revisit sink prefixes: Support only 'ksvc' prefix and drop 'svc', 'service' support for knative service (#896) 2020-07-14 00:46:18 -07:00
duck Revisit sink prefixes: Support only 'ksvc' prefix and drop 'svc', 'service' support for knative service (#896) 2020-07-14 00:46:18 -07:00
ping Revisit sink prefixes: Support only 'ksvc' prefix and drop 'svc', 'service' support for knative service (#896) 2020-07-14 00:46:18 -07:00
human_readable_flags.go Fix missing NAMESPACE column header (#951) 2020-07-27 23:48:59 -07:00
list.go List inbuilt sources if CRD access is restricted (#948) 2020-08-04 04:42:28 -07:00
list_test.go List inbuilt sources if CRD access is restricted (#948) 2020-08-04 04:42:28 -07:00
list_types.go List inbuilt sources if CRD access is restricted (#948) 2020-08-04 04:42:28 -07:00
source.go Add grouping for help message + streamlined help messages (#887) 2020-06-18 00:06:25 -07:00