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

feature: API Start and Stop mechanism for RpaasInstance. #150

Merged
merged 11 commits into from
Apr 8, 2024

Conversation

gvicentin
Copy link
Member

@gvicentin gvicentin commented Apr 4, 2024

This PR is adding two new commands to the rpaasv2 plugin cli and two new routes to the rpaasv2 api for managing the Shutdown state.

1. Start

The start command will scale out RpaasInstance replicas and setup autoscaling objects if needed.

$ ./bin/rpaasv2 start -s some-service -i my-instance
Started instance some-service/my-instance

2. Stop

The stop command will scale in RpaasInstance replicas and remove autoscaling objects if needed.

$ ./bin/rpaasv2 stop -s some-service -i my-instance
Shutting down instance some-service/my-instance

3. Info

The info command now shows information about the Shutdown state.

$ ./bin/rpaasv2 info -s some-service -i my-instance
Name: my-instance
Description:
Tags:
Team owner:
Plan: basic
Flavors:
Shutdown: false
...

4. Extra

Also now, RpaasInstance shutdown's state is showing when using kubectl.

$ kubectl get rpaasinstance
NAME          SUSPENDED   SHUTDOWN   AGE   IPS   HOSTNAMES
my-instance   false       false      10d

@gvicentin gvicentin marked this pull request as ready for review April 8, 2024 11:18
pkg/rpaas/client/start.go Outdated Show resolved Hide resolved
pkg/rpaas/client/stop.go Outdated Show resolved Hide resolved
@wpjunior wpjunior merged commit f69ce91 into tsuru:main Apr 8, 2024
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants