Browse Source

etcd_volume_size from cluster not CT

The size of the etcd volume should be taken from the cluster and not
the cluster template.

story: 2005143
Change-Id: I4cdbb436558fba90adec717e228e2970be509b87
changes/58/650858/2
Theodoros Tsioutsias 3 years ago
parent
commit
e655db3338
  1. 2
      magnum/drivers/heat/k8s_coreos_template_def.py
  2. 2
      magnum/drivers/heat/k8s_fedora_template_def.py
  3. 4
      magnum/drivers/heat/template_def.py

2
magnum/drivers/heat/k8s_coreos_template_def.py

@ -159,7 +159,7 @@ class CoreOSK8sTemplateDefinition(k8s_template_def.K8sTemplateDefinition):
template_def.add_priv_net_env_file(env_files, cluster_template,
cluster)
template_def.add_etcd_volume_env_file(env_files, cluster_template)
template_def.add_etcd_volume_env_file(env_files, cluster)
template_def.add_volume_env_file(env_files, cluster)
template_def.add_lb_env_file(env_files, cluster_template)
template_def.add_fip_env_file(env_files, cluster_template, cluster)

2
magnum/drivers/heat/k8s_fedora_template_def.py

@ -219,7 +219,7 @@ class K8sFedoraTemplateDefinition(k8s_template_def.K8sTemplateDefinition):
template_def.add_priv_net_env_file(env_files, cluster_template,
cluster)
template_def.add_etcd_volume_env_file(env_files, cluster_template)
template_def.add_etcd_volume_env_file(env_files, cluster)
template_def.add_volume_env_file(env_files, cluster)
template_def.add_lb_env_file(env_files, cluster_template)
template_def.add_fip_env_file(env_files, cluster_template, cluster)

4
magnum/drivers/heat/template_def.py

@ -500,8 +500,8 @@ def add_volume_env_file(env_files, cluster):
env_files.append(COMMON_ENV_PATH + 'with_volume.yaml')
def add_etcd_volume_env_file(env_files, cluster_template):
if int(cluster_template.labels.get('etcd_volume_size', 0)) < 1:
def add_etcd_volume_env_file(env_files, cluster):
if int(cluster.labels.get('etcd_volume_size', 0)) < 1:
env_files.append(COMMON_ENV_PATH + 'no_etcd_volume.yaml')
else:
env_files.append(COMMON_ENV_PATH + 'with_etcd_volume.yaml')

Loading…
Cancel
Save