Skip to content

Commit 0b946c4

Browse files
feat: disable local execution by default (#107)
Signed-off-by: Harikrishnan Balagopal <[email protected]>
1 parent 2750132 commit 0b946c4

File tree

3 files changed

+8
-0
lines changed

3 files changed

+8
-0
lines changed

cmd/move2kubeapi/move2kubeapi.go

+1
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ For more information, visit https://move2kube.konveyor.io/`,
5959
rootCmd.Flags().Bool("auth-enabled", false, "Enable authentication and authorization.")
6060
rootCmd.Flags().Bool("secure-cookies", false, "Send cookies only if it is a https TLS connection. Turn this on in production environments.")
6161
rootCmd.Flags().Bool("clean-up-after-transform", false, "Delete extra files after a transformation is finished. Helps save storage space.")
62+
rootCmd.Flags().Bool("enable-local-execution", false, "Enable local execution.")
6263
rootCmd.Flags().String("data-dir", "data", "Path to the directory where all the data will stored. It will be created if it doesn't exist.")
6364
rootCmd.Flags().String("static-files-dir", "", "Path to the directory containing static files to be served. Used to serve the Move2Kube UI.")
6465
rootCmd.Flags().String("session-secret", "", "A random secret to use for signing session cookies. By default it generates a new session secret.")

internal/filesystem/filesystem.go

+6
Original file line numberDiff line numberDiff line change
@@ -2129,6 +2129,9 @@ func (fs *FileSystem) runPlan(currentRunDir string, currentRunConfigPaths []stri
21292129
if verbose {
21302130
cmdArgs = append(cmdArgs, "--log-level", "trace")
21312131
}
2132+
if !common.Config.EnableLocalExecution {
2133+
cmdArgs = append(cmdArgs, "--disable-local-execution")
2134+
}
21322135
for _, p := range currentRunConfigPaths {
21332136
cmdArgs = append(cmdArgs, "--config", p)
21342137
}
@@ -2277,6 +2280,9 @@ func (fs *FileSystem) runTransform(currentRunDir string, currentRunConfigPaths [
22772280
if verbose {
22782281
cmdArgs = append(cmdArgs, "--log-level", "trace")
22792282
}
2283+
if !common.Config.EnableLocalExecution {
2284+
cmdArgs = append(cmdArgs, "--disable-local-execution")
2285+
}
22802286
if currentRunCustDir != "" {
22812287
cmdArgs = append(cmdArgs, "--customizations", currentRunCustDir)
22822288
}

internal/types/types.go

+1
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ type ConfigT struct {
3232
VersionLong bool `mapstructure:"version-long"`
3333
SecureCookies bool `mapstructure:"secure-cookies"`
3434
AuthEnabled bool `mapstructure:"auth-enabled"`
35+
EnableLocalExecution bool `mapstructure:"enable-local-execution"`
3536
CleanUpAfterTransform bool `mapstructure:"clean-up-after-transform"`
3637
CloudEventsEnabled bool `mapstructure:"cloud-events-enabled"`
3738
Port int `mapstructure:"port"`

0 commit comments

Comments
 (0)