Skip to content

Commit 45338a1

Browse files
committed
K8S-713 force stateless scaling mode
1 parent 35a1ab6 commit 45338a1

File tree

3 files changed

+10
-0
lines changed

3 files changed

+10
-0
lines changed

addons/upgrade.jps

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,8 @@ onInstall:
6767
version: ${settings.version}
6868
- env.control.ApplyNodeGroupData [${globals.workers}]:
6969
data:
70+
validation:
71+
scalingMode: "stateless"
7072
isRedeploySupport: false
7173
- env.file.AddFavorite [k8sm, ${globals.workers}]:
7274
path: /etc/jelastic/redeploy.conf

manifest.jps

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,10 @@ onAfterScaleOut:
116116

117117
return {result: 0, onAfterReturn: { api: mount } }
118118

119+
- env.control.ApplyNodeGroupData[${event.response.nodes.nodeGroup}]:
120+
data:
121+
validation:
122+
scalingMode: "stateless"
119123
- cmd[${nodes.k8sm.master.id}]: |-
120124
token_age=$(expr $(date +%s) - $(stat /var/log/kubeadm-init.log -c %Y))
121125
[ ${token_age} -lt $((20*60*60)) ] && { sed -n '/kubeadm join/,/^$/{/./p}' /var/log/kubeadm-init.log | sed ':a;N;$!ba;s/\\\n//g' | grep -v 'control-plane'; } || { kubeadm token create --print-join-command; }
@@ -193,6 +197,7 @@ actions:
193197
validation:
194198
minCount: ${nodes.k8sm.length}
195199
maxCount: ${nodes.k8sm.length}
200+
scalingMode: "stateless"
196201
- if (${nodes.storage.length:0} > 0):
197202
- script: |
198203
return { result: 0, min: ${nodes.storage.length:0} > 1 ? 3: 1, max: ${nodes.storage.length:0} > 1 ? 7: 1 }

scripts/beforeinstall.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ var resp = {
2121
nodeGroup: "cp",
2222
nodeType: "kubernetes",
2323
tag: tag,
24+
validation: {
25+
scalingMode: "stateless"
26+
},
2427
scalingMode: "stateless",
2528
displayName: "Workers",
2629
cloudlets: 32,

0 commit comments

Comments
 (0)