diff options
| author | micplus <micplus@github.com> | 2024-04-03 15:05:35 +0800 |
|---|---|---|
| committer | micplus <ain01a@outlook.com> | 2024-04-07 14:17:33 +0800 |
| commit | 016f63950c956b7a6da7fcb1ed58c978df0b8a29 (patch) | |
| tree | dc5697c9d56168aa17b459922ec475f37ec7ecf6 | |
| parent | feat: module auto restart feature (diff) | |
| download | kubeedge-016f63950c956b7a6da7fcb1ed58c978df0b8a29.tar.gz | |
feat: add feature-gate for module restarting
Signed-off-by: micplus <ain01a@outlook.com>
| -rw-r--r-- | edge/cmd/edgecore/app/options/options.go | 2 | ||||
| -rw-r--r-- | edge/cmd/edgecore/app/server.go | 6 |
2 files changed, 8 insertions, 0 deletions
diff --git a/edge/cmd/edgecore/app/options/options.go b/edge/cmd/edgecore/app/options/options.go index ebc09e470..88de1e576 100644 --- a/edge/cmd/edgecore/app/options/options.go +++ b/edge/cmd/edgecore/app/options/options.go @@ -28,6 +28,8 @@ import ( "github.com/kubeedge/kubeedge/pkg/util/validation" ) +var FeatureModuleAutoStart = "moduleAutoStart" + type EdgeCoreOptions struct { ConfigFile string } diff --git a/edge/cmd/edgecore/app/server.go b/edge/cmd/edgecore/app/server.go index 8cd11902a..128bfdbfc 100644 --- a/edge/cmd/edgecore/app/server.go +++ b/edge/cmd/edgecore/app/server.go @@ -121,6 +121,12 @@ offering HTTP client capabilities to components of cloud to reach HTTP servers r } registerModules(config) + + // enable module auto-restart feature + if config.FeatureGates[options.FeatureModuleAutoStart] { + core.EnableModuleRestart() + } + // start all modules core.Run() }, |
