sighupio / furyctl

furyctl is the KFD (Kubernetes Fury Distribution) lifecycle manager
https://sighup.io
Apache License 2.0
32 stars 4 forks source link

Add a flag to rerun a phase at the end of the furyctl execution #504

Open nutellinoit opened 2 months ago

nutellinoit commented 2 months ago

A flag like --extra-phase-apply (or a better name) could be useful when creating OnPremises cluster to re-apply the distribution phase after the plugin phase (that often contains the storage plugin)

ralgozino commented 2 months ago

I gave some thought to this in the past, one option could be to be able to specify more than one phase, like this:

furyctl apply cluster --phase=plugin,distribution

But for the particular problem of the plugins it may be better to have "pre" plugins and "post" plugins, so the storage plugin will be a "pre" plugin, for example. Maybe adding a type field to the plugin spec.

A more generic approach could be setting in the plugin after (or before) which phase it should be installed. So for the storage plugin example, it could have a after: kubernetes field.

nutellinoit commented 2 months ago

I gave some thought to this in the past, one option could be to be able to specify more than one phase, like this:

furyctl apply cluster --phase=plugin,distribution

But for the particular problem of the plugins it may be better to have "pre" plugins and "post" plugins, so the storage plugin will be a "pre" plugin, for example. Maybe adding a type field to the plugin spec.

A more generic approach could be setting in the plugin after (or before) which phase it should be installed. So for the storage plugin example, it could have a after: kubernetes field.

It's a little bit tricky to apply only some plugins before a phase, because for example for helm we are using helmfile, and this way we should change a lot of logic to make this possible (multiple ways to render and execute templates)