You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: devspaces-machineexec/cfg/cfg.go
+36-3
Original file line number
Diff line number
Diff line change
@@ -34,11 +34,14 @@ var (
34
34
AuthenticatedUserIDstring
35
35
36
36
// IdleTimeout is a inactivity period after which workspace should be stopped
37
-
// Default -1, which mean - does not stop
37
+
// Default value is 30 minutes
38
38
IdleTimeout time.Duration
39
39
// StopRetryPeriod is a period after which workspace should be tried to stop if the previous try failed
40
-
// Defaults 10 second
40
+
// Default value is 10 seconds
41
41
StopRetryPeriod time.Duration
42
+
// RunTimeout is the maximum duration a workspace can be running before it is stopped
43
+
// Default value is -1, which means - no maximium duration
44
+
RunTimeout time.Duration
42
45
43
46
// UseTLS flag to enable/disable serving TLS
44
47
UseTLSbool
@@ -82,7 +85,32 @@ func init() {
82
85
}
83
86
flag.StringVar(&AuthenticatedUserID, "authenticated-user-id", defaultAuthenticatedUserID, "OpenShift user's ID that should has access to API. Is used only if useBearerToken is configured")
84
87
85
-
flag.DurationVar(&IdleTimeout, "idle-timeout", -1*time.Nanosecond, "IdleTimeout is a inactivity period after which workspace should be stopped. Examples: -1, 30s, 15m, 1h")
logrus.Errorf("Invalid value '%s' for env variable key '%s'. Value should be an integer", idleTimeoutEnvValue, idleTimeoutEnv)
97
+
}
98
+
}
99
+
flag.DurationVar(&IdleTimeout, "idle-timeout", idleTimeout, "IdleTimeout is a inactivity period after which workspace should be stopped. By default, IdleTimeout is set to 30m. To disable IdleTimeout, set to -1. Examples: -1, 30s, 15m, 1h")
logrus.Errorf("Invalid value '%s' for env variable key '%s'. Value should be an integer", runTimeoutEnvValue, runTimeoutEnv)
110
+
}
111
+
}
112
+
flag.DurationVar(&RunTimeout, "run-timeout", runtimeout, "RunTimeout is the maximum duration a workspace can run. After this period, the workspace will be stopped. Examples: -1, 30s, 15m, 1h")
113
+
86
114
flag.DurationVar(&StopRetryPeriod, "stop-retry-period", 10*time.Second, "StopRetryPeriod is a period after which workspace should be tried to stop if the previous try failed. Examples: 30s")
87
115
88
116
flag.BoolVar(&UseTLS, "use-tls", false, "Serve content via TLS")
0 commit comments