Adding overide for setting etcd version

Added new overide capability to set all etcd version dynamically.  This
is needed for HA testing. For example following flag can now be used with
create cluster.

--override "cluster.spec.etcdClusters*.version=3.0.17"
This commit is contained in:
chrislovecnm 2017-12-30 19:38:52 -07:00
parent 2fdf83454b
commit b5bb3f983f
1 changed files with 4 additions and 0 deletions

View File

@ -1246,6 +1246,10 @@ func setOverrides(overrides []string, cluster *api.Cluster, instanceGroups []*ap
switch kv[0] {
case "cluster.spec.nodePortAccess":
cluster.Spec.NodePortAccess = append(cluster.Spec.NodePortAccess, kv[1])
case "cluster.spec.etcdClusters[*].version":
for _, etcd := range cluster.Spec.EtcdClusters {
etcd.Version = kv[1]
}
default:
return fmt.Errorf("unhandled override: %q", override)
}