There are too many drivers to add configuration options manually, so we leverage the Ember-CSI script that outputs detailed information about drivers to automatically generate the form fields and examples on the OLM catalog.
The new script olvm-csv-gen.sh runs an Ember-CSI docker container to get the driver specific configuration options and the passes them to a Python script to generate the Cluster Service Version YAML file deploy/olm-catalog/next/ember-csi-operator.vX.Y.Z.clusterserviceversion.yaml
In this file we'll have:
One example with all the configuration options for all the drivers (this is used for default values).
One example for each driver which its own configuration options.
The form options.
The Python script has the capability to ignore some drivers (like the NFS ones we don't support), to ignore some configuration options (which are irrelevant form Ember-CSI), and it also adds missing configuration options (Cinder drivers are not properly reporting all the configuration options that are actually using).
The form options will be generated on an independent group by default because the first console version that supports hiding fields is in OpenShift 4.4. If we want to generate the sample file for such a console we can set env variable CONSOLE_VERSION to 4.4
For development we can also generate out.yaml using a different template (template-dev.yaml) setting DEVELOPMENT env var to a non zero int, which will allow us to copy/paste it into the console (we have to change the resourceVersion field with the latest one that appears on the console).
This patch also includes an example of what the generated file looks like.
There are too many drivers to add configuration options manually, so we leverage the Ember-CSI script that outputs detailed information about drivers to automatically generate the form fields and examples on the OLM catalog.
The new script olvm-csv-gen.sh runs an Ember-CSI docker container to get the driver specific configuration options and the passes them to a Python script to generate the Cluster Service Version YAML file
deploy/olm-catalog/next/ember-csi-operator.vX.Y.Z.clusterserviceversion.yaml
In this file we'll have:
The Python script has the capability to ignore some drivers (like the NFS ones we don't support), to ignore some configuration options (which are irrelevant form Ember-CSI), and it also adds missing configuration options (Cinder drivers are not properly reporting all the configuration options that are actually using).
The form options will be generated on an independent group by default because the first console version that supports hiding fields is in OpenShift 4.4. If we want to generate the sample file for such a console we can set env variable
CONSOLE_VERSION
to 4.4For development we can also generate
out.yaml
using a different template (template-dev.yaml
) settingDEVELOPMENT
env var to a non zero int, which will allow us to copy/paste it into the console (we have to change theresourceVersion
field with the latest one that appears on the console).This patch also includes an example of what the generated file looks like.