diff --git a/magnum/drivers/k8s_coreos_v1/templates/kubeminion.yaml b/magnum/drivers/k8s_coreos_v1/templates/kubeminion.yaml index 2bbea9927f..b216fbeec6 100644 --- a/magnum/drivers/k8s_coreos_v1/templates/kubeminion.yaml +++ b/magnum/drivers/k8s_coreos_v1/templates/kubeminion.yaml @@ -524,7 +524,18 @@ outputs: description: > This is the "public" IP address of the Kubernetes minion node. + ###################################################################### + # + # NOTE(flwang): Returning the minion node server ID here so that + # consumer can send API request to Heat to remove a particular + # node with removal_policies. Otherwise, the consumer (e.g. AutoScaler) + # has to use index to do the remove which is confusing out of the + # OpenStack world. + # https://storyboard.openstack.org/#!/story/2005054 + # + ###################################################################### + OS::stack_id: - value: {get_param: "OS::stack_id"} + value: { get_resource: kube-minion } description: > - This is a id of the stack which creates from this template. + This is the Nova server id of the node. diff --git a/magnum/drivers/k8s_fedora_atomic_v1/templates/kubeminion.yaml b/magnum/drivers/k8s_fedora_atomic_v1/templates/kubeminion.yaml index f62db5f55d..0dc834b8af 100644 --- a/magnum/drivers/k8s_fedora_atomic_v1/templates/kubeminion.yaml +++ b/magnum/drivers/k8s_fedora_atomic_v1/templates/kubeminion.yaml @@ -543,7 +543,18 @@ outputs: description: > This is the "public" IP address of the Kubernetes minion node. + ###################################################################### + # + # NOTE(flwang): Returning the minion node server ID here so that + # consumer can send API request to Heat to remove a particular + # node with removal_policies. Otherwise, the consumer (e.g. AutoScaler) + # has to use index to do the remove which is confusing out of the + # OpenStack world. + # https://storyboard.openstack.org/#!/story/2005054 + # + ###################################################################### + OS::stack_id: - value: {get_param: "OS::stack_id"} + value: { get_resource: kube-minion } description: > - This is a id of the stack which creates from this template. + This is the Nova server id of the node. diff --git a/magnum/drivers/k8s_fedora_ironic_v1/templates/kubeminion.yaml b/magnum/drivers/k8s_fedora_ironic_v1/templates/kubeminion.yaml index 143b1bab96..7e038b0fbc 100644 --- a/magnum/drivers/k8s_fedora_ironic_v1/templates/kubeminion.yaml +++ b/magnum/drivers/k8s_fedora_ironic_v1/templates/kubeminion.yaml @@ -108,7 +108,18 @@ outputs: description: > This is the "public" IP address of the Kubernetes minion node. + ###################################################################### + # + # NOTE(flwang): Returning the minion node server ID here so that + # consumer can send API request to Heat to remove a particular + # node with removal_policies. Otherwise, the consumer (e.g. AutoScaler) + # has to use index to do the remove which is confusing out of the + # OpenStack world. + # https://storyboard.openstack.org/#!/story/2005054 + # + ###################################################################### + OS::stack_id: - value: {get_param: "OS::stack_id"} + value: { get_resource: kube-minion } description: > - This is a id of the stack which creates from this template. + This is the Ironic server id of the node. diff --git a/releasenotes/notes/return-server-id-in-kubeminion-cb33f5141e0b7fa9.yaml b/releasenotes/notes/return-server-id-in-kubeminion-cb33f5141e0b7fa9.yaml new file mode 100644 index 0000000000..3a622ab657 --- /dev/null +++ b/releasenotes/notes/return-server-id-in-kubeminion-cb33f5141e0b7fa9.yaml @@ -0,0 +1,11 @@ +--- +fixes: + - | + Return instance ID of workder node in k8s minion template so that + consumer can send API request to Heat to remove a particular + node with removal_policies. Otherwise, the consumer (e.g. AutoScaler) + has to use index to do the remove which is confusing out of the + OpenStack world. + https://storyboard.openstack.org/#!/story/2005054 + +