Skip to content

xmatters/xm-labs-steps-cloud-run

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Google Cloud Run Steps

This step allows you to manage traffic of a Google Cloud Run service.



Files

How it works

This step runs on the xMatters agent on a Google Cloud Compute instance and uses the gcloud command line tools.

Installation

Google Cloud Run Setup

In order for xMatters to properly authenticate with Google Cloud Run, the xMatters agent needs to be running somewhere that it can run gcloud commands. We've found that a compute instance with full Cloud API access scopes (currently there are no specific settings for Cloud Run access) is suitable for this. We would recommend using a service account on this compute instance that has the minimal access to services.

Also, a Cloud Run service is required for this step to be effective.

xMatters Setup

  1. Download the CloudRunSteps.zip file onto your local computer
  2. Navigate to the Workflows tab of your xMatters instance
  3. Click Import, and select the zip file you just downloaded
  4. In the Cloud Run - Manage Traffic step select the agent to run on.

Usage

The Cloud Run - Manage Traffic step is now available in your custom steps. So navigate to the appropriate canvas so you can add the step there. If you'd like to experiment with it, the Manage Traffic workflow has a canvas that can be triggered via HTTP call.

If an invalid revision is requested it will fail after a two minute timeout. If this is not enough, it can be adjusted in the step code.

Inputs

Name Required? Min Max Help Text Default Value Multiline
Service Name Yes 0 2000 Name of service to manage traffic. No
Revision Name No 0 2000 Revision to move traffic to. By default, will move traffic to previous revision. No
Region Yes 0 2000 Region where your service is located. Options can be found here. No

Outputs

Name Description
json Raw json output from changing traffic.
success (true) or (false) depending on if traffic redirection succeeded.

Example

This is an image of the included example flow.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors