Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scheduled sleep and wake periods #379

Open
gadkins opened this issue Nov 23, 2023 · 2 comments
Open

Scheduled sleep and wake periods #379

gadkins opened this issue Nov 23, 2023 · 2 comments

Comments

@gadkins
Copy link
Member

gadkins commented Nov 23, 2023

Summary

Add ability to schedule the sleep and wake times for all clusters of a project

Usage

uffizzi cluster sleep [SCHEDULE]

uffizzi cluster wake [SCHEDULE]

Where [SCHEDULE] is in Unix chron format

For example, to put all clusters to sleep every night at 8pm, run:
uffizzi cluster sleep - all 0 20 * * *

@gadkins
Copy link
Member Author

gadkins commented Nov 23, 2023

uffizzi cluster sleep --help page

uffizzi cluster sleep -h
uffizzi-cluster-sleep - put clusters to sleep 
================================================================

## SYNOPSIS
    uffizzi cluster sleep [SCHEDULE]

## DESCRIPTION
    Scales specified Uffizzi clusters down to zero resource utilization 
    while keeping the namespace and any stateful resources,
    like persistent volume claims. 

    SCHEDULE should be specified in Unix chron format. 
    If no SCHEDULE is specified, all clusters are scaled down 
    immediately.

    For more information on Uffizzi clusters, see:
    https://docs.uffizzi.com/references/cli/

## OPTIONS
    SCHEDULE
    The sleep schedule in Unix chron format  

## EXAMPLES
    To put cluster my-cluster to sleep, run:

        $ uffizzi cluster sleep my-cluster
    
    To put all Uffizzi clusters to sleep, run:

        $ uffizzi cluster sleep --all

    To put all Uffizzi clusters to sleep at 8 p.m. every night, run:

        $ uffizzi cluster sleep all 0 20 * * * 

    To put all Uffizzi clusters to sleep every Friday at midnight, run: 

        $ uffizzi cluster sleep all 0 0 * * 5
    

@gadkins
Copy link
Member Author

gadkins commented Nov 23, 2023

uffizzi cluster wake --help page

uffizzi cluster wake -h
uffizzi-cluster-wake-all - wake clusters to sleep 
================================================================

## SYNOPSIS
    uffizzi cluster wake [SCHEDULE]

## DESCRIPTION
    Scales one or more Uffizzi clusters to their original resource 
    utilization from zero (see 'uffizzi cluster sleep -h'). 
    
    SCHEDULE should be specified in Unix chron format. 
    If no SCHEDULE is specified, specified clusters are scaled up 
    immediately.

    For more information on Uffizzi clusters, see:
    https://docs.uffizzi.com/references/cli/

## OPTIONS
    SCHEDULE
    The wake schedule in Unix chron format  

## EXAMPLES
    To wake a sleeping cluster my-cluster, run:
        
    $ uffizzi cluster wake my-cluster 

    To wake all Uffizzi clusters from sleep, run:

        $ uffizzi cluster wake all

    To wake all Uffizzi clusters at 7 a.m. every weekday, run:

        $ uffizzi cluster wake all 0 7 * * 1-5 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Ready for Development
Development

No branches or pull requests

1 participant