summaryrefslogtreecommitdiffstats
path: root/tools/cicdansible/heat/installer.yaml
diff options
context:
space:
mode:
authorMichal Zegan <m.zegan@samsung.com>2019-09-05 18:46:05 +0200
committerMichal Zegan <m.zegan@samsung.com>2019-09-06 12:26:09 +0200
commit6425e67d3832878b93b0da1520c150b81675cd3b (patch)
tree17cf4054bb9e2c024db1b8739108b7db598ef58a /tools/cicdansible/heat/installer.yaml
parent07d99883b5e5895000fa400da3dfe12dad54c4e9 (diff)
Make kubernetes nodes to be placed on different computes
Modify the heat template so that kubernetes node instances are not placed on the same compute nodes, but each on a different node. This is called anti-affinity. Change-Id: I16cad7cc2f503130bae80be3820c477890214594 Issue-ID: OOM-2042 Signed-off-by: Mateusz Pilat <m.pilat@partner.samsung.com> Signed-off-by: Michal Zegan <m.zegan@samsung.com>
Diffstat (limited to 'tools/cicdansible/heat/installer.yaml')
-rw-r--r--tools/cicdansible/heat/installer.yaml11
1 files changed, 11 insertions, 0 deletions
diff --git a/tools/cicdansible/heat/installer.yaml b/tools/cicdansible/heat/installer.yaml
index 7dd585d5..793386c6 100644
--- a/tools/cicdansible/heat/installer.yaml
+++ b/tools/cicdansible/heat/installer.yaml
@@ -171,6 +171,13 @@ resources:
data: { num_nodes: { get_param: num_nodes } }
#This is number of all nodes + 2 (infra instance and installer)
expression: "$.data.num_nodes + 2"
+ #Affinity Policy - nodes spread onto as many physical machines as possible (aka. .anti-affinity.).
+ anti_affinity_group:
+ type: OS::Nova::ServerGroup
+ properties:
+ name: k8s nodes on separate computes
+ policies:
+ - anti-affinity
#Resource group to deploy n nodes using node template for each, each node numbered starting from 0.
nodes:
type: OS::Heat::ResourceGroup
@@ -187,6 +194,8 @@ resources:
flavor_name: { get_param: node_flavor_name }
notify_command: { get_attr: ["instance_wait_handle", "curl_cli"] }
security_group: { get_resource: secgroup }
+ scheduler_hints:
+ group: { get_resource: anti_affinity_group }
depends_on: [routercon, instance_wait_handle]
#Nfs storage volume for first node.
nfs_storage:
@@ -224,6 +233,7 @@ resources:
image_name: { get_param: image_name }
notify_command: { get_attr: ["instance_wait_handle", "curl_cli"] }
security_group: { get_resource: secgroup }
+ scheduler_hints: {}
depends_on: [instance_wait_handle]
#Volume attachment for infra node.
resources_storage_attachment:
@@ -249,6 +259,7 @@ resources:
subnet: { get_resource: privsubnet }
notify_command: { get_attr: ["instance_wait_handle", "curl_cli"] }
security_group: { get_resource: secgroup }
+ scheduler_hints: {}
depends_on: instance_wait_handle
#Floating ip for installer.
installer_fip_assoc: