make drain option configuable
fix #724
I think the config syntax needs some further thinking.
-
Should it be node specific or global? 🤔 Adding node specific settings becomes quite tedious if it's something you want to set for all hosts. You can use yaml anchors, but it's not really straightforward either. I've been thinking if there should be some kind of "host groups" or "host classes" or something else that could be used to easily set some base values for a large number of hosts. Something like:
metadata: hostgroups: longDrain: drainGracePrediod: 100d corpBastion: bastion: address: 10.0.0.1 port: 8822 user: ${USER} spec: hosts: - role: controller groups: - longDrain - corpBastionMaybe there could be something like this to set something for all hosts?:
metadata: hostdefaults: drainGracePeriod: 100d -
Maybe it should be a flag but there could be a k0sctl.yaml way to set flags? There's already
--no-drainwhich is kind of related to these settings, so adding these new settings that are set in a different place feels slightly wrong.But there's also reasons to have some or all of them settable through k0sctl.yaml.
Maybe there could be something like
metadata.optionsas an alternate source for all flag values 🤔