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

Add flag to target either active or standby production environment #187

Open
nicksantamaria opened this issue Apr 28, 2021 · 0 comments
Open
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@nicksantamaria
Copy link

nicksantamaria commented Apr 28, 2021

Is your feature request related to a problem? Please describe.

Currently when a project uses active/standby deployments, it is up to the user to know or look up which environment is active before running commands.

Describe the solution you'd like

For all commands that accept the --environment flag, add a new optional --production flag to target the active/standby environment for a project. eg

lagoon ssh \
  --project=foo \
  --production=active

# Opens a ssh session on foo-prod-left

Describe alternatives you've considered

If there was another lagoon command which showed the active/standby status you could potentially subshell output from that command into the --environment flag. eg

# Hypothetical active/standby output from list environments command
$ lagoon list environments --project foo
ID    	NAME      	DEPLOYTYPE 	ENVIRONMENT	OPENSHIFTPROJECTNAME  	ROUTE			STATUS
xxxxx	prod-left 	branch     	production 	foo-prod-left   	https://www.foo.com	active
xxxxx	prod-right	branch     	production 	foo-prod-right		https://standby.foo.com	standby

# Hypothetically use subshell to inject that into another command
lagoon ssh \
  --project foo \
  --environment $(lagoon list environments --project foo | grep active | awk '{print $2}')

alas this feature does not exist yet.

@shreddedbacon shreddedbacon added enhancement New feature or request help wanted Extra attention is needed labels Apr 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants