SovereignCloudStack / cluster-stacks

Definition of Cluster Stacks based on the ClusterAPI ClusterClass feature
https://scs.community/
Apache License 2.0
7 stars 6 forks source link

Generate Markdown table from Cluster.spec.topology.variables #72

Closed jschoone closed 2 months ago

jschoone commented 4 months ago

/kind feature

Describe the solution you'd like With Cluster.spec.topology.variables we have a way to configure the Cluster for specific needs (flavors, dns_nameservers, ephemeral disk size...). To make it easier for the user to understand what options are available those should automatically be presented in a table.

Example

   - name: external_id
     required: false
     schema:
       openAPIV3Schema:
         type: string
         default: "ebfe5546-f09f-4f42-ab54-094e457d42ec"
         example: "ebfe5546-f09f-4f42-ab54-094e457d42ec"
         format: "uuid4"
         description: "ExternalNetworkID is the ID of an external OpenStack Network. This is necessary to get public internet to the VMs."
   - name: dns_nameservers
     required: false
     schema:
       openAPIV3Schema:
         type: array
         description: "DNSNameservers is the list of nameservers for the OpenStack Subnet being created. Set this value when you need to create a new network/subnet while the access through DNS is required."
         default: ["5.1.66.255", "185.150.99.255"]
         example: ["5.1.66.255", "185.150.99.255"]
         items:
           type: string
   - name: controller_flavor
     required: false
     schema:
       openAPIV3Schema:
         type: string
         default: "SCS-2V-4-20"
         example: "SCS-2V-4-20"
         description: "OpenStack instance flavor for control-plane nodes."

Should result in something like

Variable Type Default Example Description Required
external_id string "ebfe5546-f09f-4f42-ab54-094e457d42ec" "ebfe5546-f09f-4f42-ab54-094e457d42ec" ExternalNetworkID is the ID of an external OpenStack Network. This is necessary to get public internet to the VMs. false
dns_nameservers array ["5.1.66.255", "185.150.99.255"] ["5.1.66.255", "185.150.99.255"] DNSNameservers is the list of nameservers for the OpenStack Subnet being created. Set this value when you need to create a new network/subnet while the access through DNS is required. false
controller_flavor string "SCS-2V-4-20" "SCS-2V-4-20" OpenStack instance flavor for control-plane nodes. false

Anything else you would like to add: [Miscellaneous information that will assist in solving the issue.]

Environment:

mxmxchere commented 3 months ago

Perhaps also have a look how to feed the cluster-stacks documentation to https://github.com/SovereignCloudStack/docs

jschoone commented 3 months ago

Perhaps also have a look how to feed the cluster-stacks documentation to https://github.com/SovereignCloudStack/docs

Thanks, absolutely!