Skip to content

Commit

Permalink
updating extend explorer internal documentation out of the feedback f…
Browse files Browse the repository at this point in the history
…rom adding gitopssets (#3283)

* updating extend explorer internal documentation out of the feedback from adding gitopssets

* updated with integration test info

* updated tests section
  • Loading branch information
enekofb authored Sep 6, 2023
1 parent 40b9b58 commit f774d0e
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion docs/extending-explorer.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,19 @@ Things to know:
## Adding a new Object Kind

1. Add a new entry in the [`SupportedObjectKinds`](https://github.com/weaveworks/weave-gitops-enterprise/blob/253256c16c777b0d488ca0ba8068b8f80b1b4c07/pkg/query/configuration/objectkind.go#L119) slice
2. Add an [RBAC entry](https://github.com/weaveworks/weave-gitops-enterprise/blob/9101b60a487e1f999b4e988e9ca27bdde4ac7538/charts/mccp/templates/clusters-service/collector.yaml#L13) to WeGO ServiceAccount for your kind
2. Add a entry to [`ToFluxObject`](https://github.com/weaveworks/weave-gitops-enterprise/blob/f36d549b6010afbd3c086c4955637586629ec589/pkg/query/configuration/objectkind.go#L284) as will be required
for [Status and Message](https://github.com/weaveworks/weave-gitops-enterprise/blob/f36d549b6010afbd3c086c4955637586629ec589/pkg/query/internal/models/object.go#L113C1-L129)
3. Add an [RBAC entry](https://github.com/weaveworks/weave-gitops-enterprise/blob/9101b60a487e1f999b4e988e9ca27bdde4ac7538/charts/mccp/templates/clusters-service/collector.yaml#L13) to WeGO ServiceAccount for your kind

## Using the default Explorer UI component

If you would like to use default Explorer view with your Kind:

1. Add your Kind details Route to [`getKindRoute`](https://github.com/weaveworks/weave-gitops-enterprise/blob/f36d549b6010afbd3c086c4955637586629ec589/ui-cra/src/utils/nav.ts#L3)
2. Add a test case for your kind in the [integration test](https://github.com/weaveworks/weave-gitops-enterprise/blob/main/pkg/query/server/server_integration_test.go#L44)
- Add any CRDs to [testdata/crds](../pkg/query/server/testdata/crds)
- Add the GV to [`AddToScheme`](../pkg/query/server/suite_test.go) to register the GVK.

## Using the Explorer UI component

If you would like to view your object list in a dedicated table:
Expand Down

0 comments on commit f774d0e

Please sign in to comment.