client icon indicating copy to clipboard operation
client copied to clipboard

Adjust source list-types to not require cluster admin permissions when using -oyaml

Open mgencur opened this issue 3 years ago • 3 comments

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


mgencur avatar Jul 14 '21 07:07 mgencur

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.

github-actions[bot] avatar Oct 13 '21 01:10 github-actions[bot]

/reopen

mgencur avatar Oct 19 '21 07:10 mgencur

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.

rhuss avatar Nov 04 '21 08:11 rhuss