workflow
workflow copied to clipboard
Refactor charts to use Helm Tags and Condition fields
Currently some Workflow components such as minio are conditionally disabled by enclosing all their manifest templates in {{ if }}
blocks, because that was the only way to have Helm avoid installing a sub-chart. This is ugly and feels wrong when considering that most component sub-charts are also meant to stand alone.
Now Helm supports tags and conditions in requirements.yaml, a much cleaner way to accomplish this functionality. If it can be done in a backward-compatible way, we should refactor all relevant sub-charts to use this mechanism, and require Workflow users to install with helm
v2.2.1 or later.
See related discussion at https://github.com/deis/router/pull/316#discussion_r104589994.
For lots of the components we check if the field is either the string "on-cluster" or "off-cluster". That may be hard to work around since the conditional fields are supposed to be booleans.
I ran into the same problem https://github.com/deis/router/pull/316#discussion_r104589994 when I first drafted the chart. Luckily I was able to restructure the values so that we could use a bool
But to be honest it would be nice if helm
supported conditional inclusions based on more than just bools. I think a string compare (or even regex!) would fit in nicely.