Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Organize the code to make resource types more easily pluggable #67

Open
bgrant0607 opened this issue Jul 11, 2022 · 1 comment
Open
Labels
enhancement New feature or request

Comments

@bgrant0607
Copy link

Most of the UI plugin is general-purpose, except for resource-type-specific code.

That code is currently spread across multiple files and directories:
https://github.com/GoogleContainerTools/kpt-backstage-plugins/tree/main/plugins/cad/src/types
https://github.com/GoogleContainerTools/kpt-backstage-plugins/blob/main/plugins/cad/src/components/ResourceEditorDialog/components/FirstClassEditorSelector.tsx
https://github.com/GoogleContainerTools/kpt-backstage-plugins/tree/main/plugins/cad/src/components/ResourceEditorDialog/components/FirstClassEditors
https://github.com/GoogleContainerTools/kpt-backstage-plugins/blob/main/plugins/cad/src/components/ResourceViewerDialog/components/FirstClassViewerSelector.tsx
https://github.com/GoogleContainerTools/kpt-backstage-plugins/tree/main/plugins/cad/src/components/ResourceViewerDialog/components/FirstClassViewers/StructuredMetadata/resources

and possibly other places.

It would be useful for resource-type-specific implementations to be self-contained, so that they could be easily added, eventually without a fork of the plugin. That would enable other projects to add types relevant to them: Kubernetes types, Config Connector types, ArgoCD types, Gatekeeper types, Istio types, etc.

At least until we're able to autogenerate UI forms from resource definitions. :-)

@bgrant0607 bgrant0607 added the enhancement New feature or request label Jul 11, 2022
@bgrant0607
Copy link
Author

We'll also want a mechanism for grouping resource types in navigation.

Most of supported resource types currently relate to Namespaces and Namespace-scoped policies.

When we add application resource types (kptdev/kpt#3351), that will add quite a few more.

Support for Config Connector would add even more.

Some types, such as Kptfile and ApplyReplacements, are independent of specific use cases.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant