[k8s_ironic] Move wc out of master resource group

This patch let kubemasters share same wait condition and wait condition
handler resource instead of create same function of resource for each
kubemaster node.
Partial-Bug: #1646720

Change-Id: Ib529e695409ba4519bdf0ad159a4599ef0805d54
This commit is contained in:
ricolin 2017-01-04 18:20:11 +08:00
parent a9ded02418
commit f7bf92ae24
2 changed files with 22 additions and 17 deletions

View File

@ -394,7 +394,6 @@ resources:
kube_allow_priv: {get_param: kube_allow_priv}
docker_volume_size: {get_param: docker_volume_size}
docker_storage_driver: {get_param: docker_storage_driver}
wait_condition_timeout: {get_param: wait_condition_timeout}
network_driver: {get_param: network_driver}
flannel_network_cidr: {get_param: flannel_network_cidr}
flannel_network_subnetlen: {get_param: flannel_network_subnetlen}
@ -423,6 +422,22 @@ resources:
trust_id: {get_param: trust_id}
auth_url: {get_param: auth_url}
insecure_registry_url: {get_param: insecure_registry_url}
wc_curl_cli: {get_attr: [master_wait_handle, curl_cli]}
######################################################################
#
# wait condition handler for kubernetes master
#
master_wait_handle:
type: OS::Heat::WaitConditionHandle
master_wait_condition:
type: OS::Heat::WaitCondition
properties:
count: {get_param: number_of_masters}
handle: {get_resource: master_wait_handle}
timeout: {get_param: wait_condition_timeout}
######################################################################
#

View File

@ -108,11 +108,6 @@ parameters:
type: string
description: network driver to use for instantiating container networks
wait_condition_timeout:
type: number
description : >
timeout for the Wait Conditions
secgroup_base_id:
type: string
description: ID of the security group for base.
@ -183,18 +178,13 @@ parameters:
type: string
description: insecure registry url
wc_curl_cli:
type: string
description : >
Wait condition notify command for Master.
resources:
master_wait_handle:
type: OS::Heat::WaitConditionHandle
master_wait_condition:
type: OS::Heat::WaitCondition
depends_on: kube-master
properties:
handle: {get_resource: master_wait_handle}
timeout: {get_param: wait_condition_timeout}
######################################################################
#
# resource that exposes the IPs of either the kube master or the API
@ -248,7 +238,7 @@ resources:
"$HTTPS_PROXY": {get_param: https_proxy}
"$NO_PROXY": {get_param: no_proxy}
"$KUBE_VERSION": {get_param: kube_version}
"$WAIT_CURL": {get_attr: [master_wait_handle, curl_cli]}
"$WAIT_CURL": {get_param: wc_curl_cli}
"$TRUSTEE_USER_ID": {get_param: trustee_user_id}
"$TRUSTEE_PASSWORD": {get_param: trustee_password}
"$TRUST_ID": {get_param: trust_id}