client
client copied to clipboard
Adjust source list-types to not require cluster admin permissions when using -oyaml
Feature request
Currently, running kn source list-types -oyaml
requires cluster admin permissions as it works with CustomResourcesDefinition and CurtomResourceDefinitionList.
The goal is to fix/adjust this command to not require cluster admin permissions.
Related to discussions in https://github.com/knative/client/pull/1384
Use case
- A user or project admin can list available source types without requiring cluster admin permissions.
UI Example
This issue is stale because it has been open for 90 days with no
activity. It will automatically close after 30 more days of
inactivity. Reopen the issue with /reopen
. Mark the issue as
fresh by adding the comment /remove-lifecycle stale
.
/reopen
That's a tricky one, as there is currently no alternative to examine CRDs. We could examine deployments for source-related labels, but this will then only the types for which a source has been already created. We hoped to leverage the DiscoveryApi
that would collect the available sources into an CR's status that we then can evaluate (the discovery-api controller is supposed to be able to read CRDs), but it looks like that work on the Discovery API has been stalled.
Maybe for now we should just print out a nicer error message is the type can not be listed ? Happy for any other ideas how to fix this, of course.