Fixed issue re-setup the network
Then you scale nodes down or up, network re-setup Change-Id: Iad68e5e7a7c3d197576aec980943aff40d4c2b50
This commit is contained in:
parent
2d32a114e8
commit
5ca09f16f8
@ -57,22 +57,29 @@ Methods:
|
|||||||
|
|
||||||
setupCalico:
|
setupCalico:
|
||||||
Body:
|
Body:
|
||||||
- $._environment.reporter.report($this, 'Setup Calico network on gateway node {0}'.format($.instance.name))
|
- If: not $.getAttr(calicoSetup, false)
|
||||||
- $resources: new(sys:Resources)
|
Then:
|
||||||
- $template: $resources.yaml('SetupCalicoNode.template').bind(dict(
|
- $._environment.reporter.report($this, 'Setup Calico network on gateway node {0}'.format($.instance.name))
|
||||||
ip => $.getIp(),
|
- $resources: new(sys:Resources)
|
||||||
masterIp => $._cluster.masterNode.getIp()
|
- $template: $resources.yaml('SetupCalicoNode.template').bind(dict(
|
||||||
))
|
ip => $.getIp(),
|
||||||
- $.instance.agent.call($template, $resources)
|
masterIp => $._cluster.masterNode.getIp()
|
||||||
- $._enableCalicoTraffic()
|
))
|
||||||
|
- $.instance.agent.call($template, $resources)
|
||||||
|
- $._enableCalicoTraffic()
|
||||||
|
- $.setAttr(calicoSetup, true)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
setupFlannel:
|
setupFlannel:
|
||||||
Body:
|
Body:
|
||||||
- $._environment.reporter.report($this, 'Setup Flannel network on gateway node {0}'.format($.instance.name))
|
- If: not $.getAttr(flannelSetup, false)
|
||||||
- $resources: new(sys:Resources)
|
Then:
|
||||||
- $template: $resources.yaml('SetupFlannelNode.template')
|
- $._environment.reporter.report($this, 'Setup Flannel network on gateway node {0}'.format($.instance.name))
|
||||||
- $.instance.agent.call($template, $resources)
|
- $resources: new(sys:Resources)
|
||||||
|
- $template: $resources.yaml('SetupFlannelNode.template')
|
||||||
|
- $.instance.agent.call($template, $resources)
|
||||||
|
- $.setAttr(flannelSetup, true)
|
||||||
|
|
||||||
|
|
||||||
setupNode:
|
setupNode:
|
||||||
|
@ -65,22 +65,29 @@ Methods:
|
|||||||
|
|
||||||
setupCalico:
|
setupCalico:
|
||||||
Body:
|
Body:
|
||||||
- $._environment.reporter.report($this, 'Setup Calico network on node {0}'.format($.instance.name))
|
- If: not $.getAttr(calicoSetup, false)
|
||||||
- $resources: new(sys:Resources)
|
Then:
|
||||||
- $template: $resources.yaml('SetupCalicoNode.template').bind(dict(
|
- $._environment.reporter.report($this, 'Setup Calico network on node {0}'.format($.instance.name))
|
||||||
ip => $.getIp(),
|
- $resources: new(sys:Resources)
|
||||||
masterIp => $._cluster.masterNode.getIp()
|
- $template: $resources.yaml('SetupCalicoNode.template').bind(dict(
|
||||||
))
|
ip => $.getIp(),
|
||||||
- $.instance.agent.call($template, $resources)
|
masterIp => $._cluster.masterNode.getIp()
|
||||||
- $._enableCalicoTraffic()
|
))
|
||||||
|
- $.instance.agent.call($template, $resources)
|
||||||
|
- $._enableCalicoTraffic()
|
||||||
|
- $.setAttr(calicoSetup, true)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
setupFlannel:
|
setupFlannel:
|
||||||
Body:
|
Body:
|
||||||
- $._environment.reporter.report($this, 'Setup Flannel network on node {0}'.format($.instance.name))
|
- If: not $.getAttr(flannelSetup, false)
|
||||||
- $resources: new(sys:Resources)
|
Then:
|
||||||
- $template: $resources.yaml('SetupFlannelNode.template')
|
- $._environment.reporter.report($this, 'Setup Flannel network on node {0}'.format($.instance.name))
|
||||||
- $.instance.agent.call($template, $resources)
|
- $resources: new(sys:Resources)
|
||||||
|
- $template: $resources.yaml('SetupFlannelNode.template')
|
||||||
|
- $.instance.agent.call($template, $resources)
|
||||||
|
- $.setAttr(flannelSetup, true)
|
||||||
|
|
||||||
|
|
||||||
setupNode:
|
setupNode:
|
||||||
|
@ -18,7 +18,7 @@ Parameters:
|
|||||||
nodeId: $nodeId
|
nodeId: $nodeId
|
||||||
|
|
||||||
Body: |
|
Body: |
|
||||||
removeMinion(args.nodeId)
|
removeMinion('{0}'.format(args.nodeId))
|
||||||
|
|
||||||
Scripts:
|
Scripts:
|
||||||
removeMinion:
|
removeMinion:
|
||||||
|
Loading…
Reference in New Issue
Block a user