validatedpatterns / patterns-operator

Apache License 2.0
5 stars 10 forks source link

Pattern Catalog UI Proposal #61

Open RyanMillerC opened 1 year ago

RyanMillerC commented 1 year ago

Hello @ipbabble @mbaldessari,

Since our conversation last Validated Pattern Office Hours, I have been experimenting with both the Operator Framework and Dynamic Plugin capabilities of OpenShift. I'm ready to start building out a prototype.

Before I start, I'd like to review this high-level proposal to implement a pattern catalog based on this YAML file. Let me know what you think.

Proposed Changes

I would like to add two new custom k8s resources (and controller logic) to the operator:

(The names and ideas of these custom resources are based on OLM.)

In addition to the CRDs and controller logic, I am also proposing adding a Dynamic Console Plugin for the catalog UI. This will require adding a separate deployment to the Operator that will serve the catalog UI React components.

Use Cases

Here's three use cases I came up with.

Use Case 1: As an organization, I want to use the default Validated Patterns catalog hosted in a public Git repo.

The first use case can be achieved by creating a default PatternCatalogSource when the Operator is installed that points to a public catalog repo/YAML file.

Screenshot 2023-02-21 at 11 45 29 PM

Use Case 2: As an organization, I want to use a custom patterns catalog hosted in a public or private Git repo.

The second use case can be achieved by the admin deleting the default PatternCatalogSource after Operator installation. The admin can then create a custom PatternCatalogSource that points to their pattern Git repo/YAML file.

Screenshot 2023-02-21 at 11 45 41 PM

Use Case 3: As an admin, I want to be able to view and deploy patterns from a catalog UI in the OpenShift console.

The third use case uses the dynamic plugin to display a list of patterns (PatternManifests) to the admin. When the admin selects a pattern from the list, a Pattern CR is created based on data from the PatternManifest.

Screenshot 2023-02-21 at 11 45 56 PM

Unanswered Questions

These aren't pressing but will need to be figured out.

RyanMillerC commented 1 year ago

I'm breaking this into at least 2 PRs: