eclipsesource / theia-cloud-helm

Eclipse Public License 2.0
3 stars 6 forks source link

any other strategy do we support? #22

Closed longfei-zhang closed 1 year ago

longfei-zhang commented 1 year ago

Here are the current default configuration:

Configures how sessions will be stopped. This defines the strategy and the limit in minutes and will override any specification from an appDefinition.

Possible values for strategy:

- FIXEDTIME Sessions will be stopped after a fixed limit

timeoutStrategy: "FIXEDTIME"

Limit in minutes

timeoutLimit: "30"

Current default config will lead to pod to be killed after 30 mins from create, even when we are using it. That means we will lose changes that not commited. any plan to support IDLE_FIXEDTIME or other strategy ? How to avoid lose changes for now?

jfaltermeier commented 1 year ago

Hi,

currently we have a VSCode Extension here: https://github.com/eclipsesource/theia-cloud/tree/main/node/monitor When this extension is part of your product, you can configure the Theia Cloud monitor to ping this extension whether there was user activity. The configuration looks like this: https://github.com/eclipsesource/theia-cloud/blob/ab961eaf5618c03d478d7fabd73ef898e70c54ca/helm/theia.cloud/valuesTestLandingPageMonitor.yaml#L45

# pings extension every minute
interval: 1    

# if there were no user actions for four minutes, shut down pod
timeoutAfter: 4

# if there were no user actions for two minutes, show a warning to user
notifyAfter: 2

Also you can also set timeoutLimit: "0" for the FIXEDTIME strategy.

We are currently also working on a Theia Extension that provides an endpoint that can be pinged if there were user actions.

longfei-zhang commented 1 year ago

@jfaltermeier thx very much.