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
This commit is contained in:
Theodoros Tsioutsias 2019-04-08 11:21:01 +00:00
parent 6212fc974d
commit e655db3338
3 changed files with 4 additions and 4 deletions

View File

@ -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)

View File

@ -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)

View File

@ -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')