magnum/magnum/drivers
Feilong Wang 20d03919fb Return instance ID of worker node
Return the nova instance UUID of worker nodes in kubeminion
templates. We will be able to remove resources from the
ResourceGroups based on nova instance uuid.

Backstory:
In heat a ResourceGroup creates a stack of depth 2. ResourceGroups
support removal policies to declare which resources must be removed.
This can be done by passing the index of the resource or the stack_id
of the nested stack. If a stack update call receives a list of
indices (eg [0, 5, 3]) or nested stack uuid (eg [uuidA, uuidB]), it
will remove the corresponding nested stacks.

In magnum's heat templates, a nested stack logically represents a
nova compute instance which is a cluster node. Using composition in
heat, we can change the way a resources group references the nested
stacks. This proposes to use the nova instance uuid as
'OS::stack_id'.

With this change, an external consumer of the stack (the cluster
autoscaler or an actual user) can remove resources from the
ResourceGroup using the nova instance uuid or resource index. Without
this change, a user or system  (which typically knows the name,
server uuid or ip) would have to find in which nested stack a
kubernetes node belongs too.  Resulting multiple call to heat.

The end result of this patch can be verified like this:
nested_stack_id=$(openstack stack resource show <STACK_ID_OR_NAME> kube_minions -c physical_resource_id -f value)
openstack stack show "${nested_stack_id}"

Task: 29664
Story: 2005054

Change-Id: I6d776f62d640c72b3228460392b92df94fe56fe6
2019-02-27 10:46:41 +01:00
..
common Merge "[k8s] Add trustee as a secret in kube-system" 2019-02-20 11:08:01 +00:00
heat k8s_fedora: Deploy tiller 2019-02-11 11:18:08 +01:00
k8s_coreos_v1 Return instance ID of worker node 2019-02-27 10:46:41 +01:00
k8s_fedora_atomic_v1 Return instance ID of worker node 2019-02-27 10:46:41 +01:00
k8s_fedora_ironic_v1 Return instance ID of worker node 2019-02-27 10:46:41 +01:00
mesos_ubuntu_v1 Make providing a keypair optional 2018-11-21 16:17:46 +00:00
swarm_fedora_atomic_v1 Make providing a keypair optional 2018-11-21 16:17:46 +00:00
swarm_fedora_atomic_v2 Make providing a keypair optional 2018-11-21 16:17:46 +00:00
__init__.py Bay driver implementation 2016-07-05 22:30:31 +02:00