Open kron4eg opened 2 years ago
I agree that we should merge structs, but I'm worried about merging the same keys. For example, if you have the same machine defined both in the KubeOneCluster manifest and the Terraform config, which definition will be authoritative?
Users might have different expectations, which might lead to tricky to debug issues. I'm wondering should we fail in such cases and instruct users to use only one definition/source. However, we lose the main use case of that feature, so I'm not sure what's the best way to proceed.
Indeed, it could be confusing, but what's the way out?
I think we can keep this, but I would add a warning that the same machine is defined both in the config file and the Terraform state.
Currently we don't support having both, terraform integration sourcing information from terraform output and and having
controlPlane.hosts
configured, because terraform overwritescontrolPlane.hosts
completely, because we don't support merging sourced info from the terraform.What feature would you like to be added? Merge info from terraform with already existing config (if any), merge key should be privateIP.
What are use cases of the feature? Sometimes additional config options could be configured on hosts (e.g. taints), but it's excessive to integrate everything as terraform.