Open jschoone opened 2 months ago
Not only the variables can be fetched from the apiserver-link. The available cluster-classes and the namespaces they are deployed in can be used as input too.
The new dynamic approach fetches all available ClusterClass definitions from the kubeapi-server of the moin-cluster via the REST API provided by capi-jsgen. The response is a JSON Schema object, which gets read by react-jsonschema-form to render the form. This new library allows us to dynamically render forms by providing a schema of the data and the associated UI components
To make use of all possible variables provided by the specific ClusterClass, this should be generated out of it, the same way we do for the documentation, see https://github.com/SovereignCloudStack/cluster-stacks/pull/94. In case of moin cluster, they are available publicly available here