File tree Expand file tree Collapse file tree 2 files changed +16
-0
lines changed
Expand file tree Collapse file tree 2 files changed +16
-0
lines changed Original file line number Diff line number Diff line change 2929- Add mesos-cli plugin
3030- Mesos-CLI: Show all running M3s frameworks
3131- Mesos-CLI: Get kubeconfig from a selected running m3s
32+ - Add supress offers if every services are running
3233
3334## v0.0.4
3435
Original file line number Diff line number Diff line change @@ -112,6 +112,7 @@ func Subscribe() error {
112112 case mesosproto .Event_HEARTBEAT :
113113 // K3S API Server Heatbeat
114114 K3SHeartbeat ()
115+ suppressFramework ()
115116 case mesosproto .Event_OFFERS :
116117 restartFailedContainer ()
117118 logrus .Debug ("Offer Got: " , event .Offers .Offers [0 ].GetID ())
@@ -221,6 +222,20 @@ func restartFailedContainer() {
221222 }
222223}
223224
225+ // if all Tasks are running, suppress framework offers
226+ func suppressFramework () {
227+ if config .ETCDCount == config .ETCDMax &&
228+ config .K3SServerCount == config .K3SServerMax &&
229+ config .K3SAgentCount == config .K3SAgentMax {
230+
231+ logrus .Info ("Framework Suppress" )
232+ suppress := & mesosproto.Call {
233+ Type : mesosproto .Call_SUPPRESS ,
234+ }
235+ Call (suppress )
236+ }
237+ }
238+
224239/*
225240 default:
226241 // tell mesos he dont have to offer again until we ask
You can’t perform that action at this time.
0 commit comments