-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #350 from UffizziCloud/feature/#339_sleeping_mode
[339] added cluster sleep/wake commands
- Loading branch information
Showing
12 changed files
with
298 additions
and
10 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
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
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
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
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
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
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,30 @@ | ||
$ uffizzi cluster sleep -h | ||
uffizzi-cluster-sleep - put a cluster to sleep (non-destructive) | ||
================================================================ | ||
|
||
## SYNOPSIS | ||
uffizzi cluster sleep [CLUSTER_NAME] | ||
|
||
## DESCRIPTION | ||
Scales a Uffizzi cluster down to zero resource utilization | ||
while keeping the namespace and any stateful resources, | ||
like persistent volume claims. If no CLUSTER_NAME is | ||
specified, the kubeconfig current context is used. | ||
|
||
For more information on Uffizzi clusters, see: | ||
https://docs.uffizzi.com/references/cli/ | ||
|
||
## OPTIONS | ||
CLUSTER_NAME | ||
The name of the target Uffizzi cluster | ||
|
||
## EXAMPLES | ||
To put the Uffizzi cluster in the current context to | ||
sleep, run: | ||
|
||
$ uffizzi cluster sleep | ||
|
||
To put a Uffizzi cluster outside the current context to | ||
sleep, run: | ||
|
||
$ uffizzi cluster sleep my-cluster |
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,28 @@ | ||
$ uffizzi cluster wake -h | ||
uffizzi-cluster-wake - wake a cluster that is sleeping | ||
================================================================ | ||
|
||
## SYNOPSIS | ||
uffizzi cluster wake [CLUSTER_NAME] | ||
|
||
## DESCRIPTION | ||
Scales up a Uffizzi cluster to its original resource | ||
utilization from zero (see 'uffizzi cluster sleep -h'). | ||
If no CLUSTER_NAME is specified, the kubeconfig current | ||
context is used. | ||
|
||
For more information on Uffizzi clusters, see: | ||
https://docs.uffizzi.com/references/cli/ | ||
|
||
## OPTIONS | ||
CLUSTER_NAME | ||
The name of the target Uffizzi cluster | ||
|
||
## EXAMPLES | ||
To wake the Uffizzi cluster in the current context, run: | ||
|
||
$ uffizzi cluster wake | ||
|
||
To wake a Uffizzi cluster outside the current context, run: | ||
|
||
$ uffizzi cluster wake my-cluster |
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
10 changes: 10 additions & 0 deletions
10
test/fixtures/files/uffizzi/uffizzi_cluster_scaled_down.json
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,10 @@ | ||
{ | ||
"cluster": { | ||
"id": 1, | ||
"name": "uffizzi-test-cluster-vcluster", | ||
"state": "scaled_down", | ||
"created_at": "2023-07-15T15:33:41.590Z", | ||
"host": "some-host.cluster.com",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NEWXhiVTVvUzBaYWNtMXNiekJKZDFGRVFVOUNaMDVXU0ZFNFFrRm1PRVVLUWtGTlEwRnhVWGRFZDFsRVZsSXdWRUZSU0M5Q1FWVjNRWGRGUWk5NlFXUkNaMDVXU0ZFMFJVWm5VVlZEVEZoUlFtaFlVamhtVDBSV1JEVkNSRWQwZFFveGVVSnVXVk5WZDBObldVbExiMXBKZW1vd1JVRjNTVVJUUVVGM1VsRkphRUZLVFc5SGRISlllWEF2ZWtwNWNYRTROVkZEV1VaVVpWb3dTVzF3TnpJNENrbFRRMDVSZFNzelQwVmpSMEZwUW1OdWFYZERVMGRWT1c1M09VTmpkRWRvUlZWeFQyWlROUzlhVVRKSU5sUk5RMGxqWmxseFVFVk5XWGM5UFFvdExTMHRMVVZPUkNCRFJWSlVTVVpKUTBGVVJTMHRMUzB0Q2c9PQogICAgY2xpZW50LWtleS1kYXRhOiBMUzB0TFMxQ1JVZEpUaUJGUXlCUVVrbFdRVlJGSUV0RldTMHRMUzB0Q2sxSVkwTkJVVVZGU1VJM1ZGaE1NblpMVVdZNFRVNXhhR3B2VUhKdVJrTkhPVEZyVldSa2NYcGhPQ3M0WkRsSVpERTVVemR2UVc5SFEwTnhSMU5OTkRrS1FYZEZTRzlWVVVSUlowRkZUM2RyWmxscFZHMVpaakE1VGtZMmRXdzNUazFZU2xKcVVtUTBSakpRTlZseWVWcFVWM2xqYkhOMVZtbEhZemhWYldWb01BcG9MMGxQZDNCV1Uyb3lUMVprUjFwdGNVOW9ielF2UlhFdlowWnNOSFk0U0cxUlBUMEtMUzB0TFMxRlRrUWdSVU1nVUZKSlZrRlVSU0JMUlZrdExTMHRMUW89Cg==" | ||
} | ||
} |
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
Oops, something went wrong.