Right now, the process of scaffolding charts "works", but produces charts like https://gerrit.wikimedia.org/r/c/operations/deployment-charts/+/726933 which are overcomplex and often include stuff that is not really needed for the chart to work - like all the list of containers for both nodejs and php deployments.
Moreover, scaffolding still doesn't include the option to generate a cronjob, which are increasingly used in production.
Finally, scaffolding doesn't provide any form of help in creating an helmfile.d deployment.
As an additional dimension to the problem: scaffolding is now written in ruby, as part of our Rakefile, to keep the dependencies of running it to a minimum. It creates an issue of maintainability.
We should write a wizard, whose logic can be plugged both in a cli tool and served via web, that allows to generate a tailor-made chart with only the components needed by the user at the present moment.
This wizard should do the following:
- Ask for a name for the chart ("what software do we want to run?")
- Ask for the service port to be reserved on https://wikitech.wikimedia.org/wiki/Kubernetes/Service_ports if this is a production chart
- Ask what language is the software written in (php/nodejs/python/golang for now?)
- Asks if prometheus support is native or not
- Asks if some additional sidecars are needed (mcrouter/nutcracker/logging)
- Asks if running periodic jobs or one-off jobs is needed
- Finally, asks for the image name and tag
and generates a chart based on those answers, only including the needed pieces.
For added maintainability, we should add comments in the templates referencing the version/sha1 of the scaffolding, so that we can easily find specific templates to update with a git grep.