-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Weijie <[email protected]>
- Loading branch information
Showing
5 changed files
with
51 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
import useBaseUrl from '@docusaurus/useBaseUrl'; | ||
|
||
# Sleep Mode | ||
|
||
Sleep mode is the act of scaling the replicas of a workload to 0 within a specified time. With sleep mode, you can put the DevSpace to sleep which means that Kubernetes will delete all pods but the entire configuration within the DevSpace is still there. | ||
|
||
## What workloads support sleep? | ||
|
||
* `StatefulSet` | ||
* `Deployment` | ||
* `CronJob` | ||
|
||
## How to sleep/wakeup? | ||
|
||
You can trigger sleep/wakeup in three different ways. | ||
|
||
* Customize the sleep time period in the `DevSpace` management page, the `DevSpace` will automatically sleep/wakeup. | ||
<figure className="img-frame"> | ||
<img className="gif-img" src={useBaseUrl('/img/sleep/custom.png')} /> | ||
</figure> | ||
|
||
* Manually trigger sleep/wakeup in the `DevSpace` management page. | ||
<figure className="img-frame"> | ||
<img className="gif-img" src={useBaseUrl('/img/sleep/dashboard.png')} /> | ||
</figure> | ||
|
||
* Manually trigger sleep/wakeup in the JetBrains Plugin / VSCode Plugin. | ||
<figure className="img-frame"> | ||
<img className="gif-img" src={useBaseUrl('/img/sleep/jetbrains.png')} /> | ||
</figure> | ||
|
||
## How does `sleep` works? | ||
|
||
- `StatefulSet`: set `spec.replicas: 0` | ||
- `Deployment`: set `spec.replicas: 0` | ||
- `CronJob`: set `spec.suspend: true` | ||
|
||
## How does `wakeup` works? | ||
|
||
- `StatefulSet`: restore `spec.replicas` | ||
- `Deployment`: restore `spec.replicas` | ||
- `CronJob`: set `spec.suspend: false` | ||
|
||
## Notes | ||
|
||
- By default, `Nocalhost` performs a round of sleep checks every `10s`. | ||
- Workloads that are already in `DevMode` will be ignored and will not be sleep. | ||
- `DevSpace` that are manually sleep by the user will not automatically wakeup that day. | ||
- `DevSpace` that are manually wakeup by the user will not automatically sleep that day. | ||
- When the user clears all sleep settings, the `DevSpace` that has gone to sleep will wake up automatically. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.