REST Resource: namespaces.routes

Resource: Route

Route is responsible for configuring ingress over a collection of Revisions. Some of the Revisions a Route distributes traffic over may be specified by referencing the Configuration responsible for creating them; in these cases the Route is additionally responsible for monitoring the Configuration for "latest ready" revision changes, and smoothly rolling out latest revisions. Cloud Run currently supports referencing a single Configuration to automatically deploy the "latest ready" Revision from that Configuration.

JSON representation
{
  "apiVersion": string,
  "kind": string,
  "metadata": {
    object (ObjectMeta)
  },
  "spec": {
    object (RouteSpec)
  },
  "status": {
    object (RouteStatus)
  }
}
Fields
apiVersion

string

The API version for this call such as "serving.knative.dev/v1".

kind

string

The kind of this resource, in this case always "Route".

metadata

object (ObjectMeta)

Metadata associated with this Route, including name, namespace, labels, and annotations.

spec

object (RouteSpec)

Spec holds the desired state of the Route (from the client).

status

object (RouteStatus)

Status communicates the observed state of the Route (from the controller).

RouteSpec

RouteSpec holds the desired state of the Route (from the client).

JSON representation
{
  "traffic": [
    {
      object (TrafficTarget)
    }
  ]
}
Fields
traffic[]

object (TrafficTarget)

Traffic specifies how to distribute traffic over a collection of Knative Revisions and Configurations. Cloud Run currently supports a single configurationName.

RouteStatus

RouteStatus communicates the observed state of the Route (from the controller).

JSON representation
{
  "observedGeneration": integer,
  "conditions": [
    {
      object (Condition)
    }
  ],
  "traffic": [
    {
      object (TrafficTarget)
    }
  ],
  "url": string,
  "address": {
    object (Addressable)
  }
}
Fields
observedGeneration

integer

ObservedGeneration is the 'Generation' of the Route that was last processed by the controller.

Clients polling for completed reconciliation should poll until observedGeneration = metadata.generation and the Ready condition's status is True or False.

Note that providing a TrafficTarget that has latestRevision=True will result in a Route that does not increment either its metadata.generation or its observedGeneration, as new "latest ready" revisions from the Configuration are processed without an update to the Route's spec.

conditions[]

object (Condition)

Conditions communicates information about ongoing/complete reconciliation processes that bring the "spec" inline with the observed state of the world.

traffic[]

object (TrafficTarget)

Traffic holds the configured traffic distribution. These entries will always contain RevisionName references. When ConfigurationName appears in the spec, this will hold the LatestReadyRevisionName that was last observed.

url

string

URL holds the url that will distribute traffic over the provided traffic targets. It generally has the form: https://{route-hash}-{project-hash}-{cluster-level-suffix}.a.run.app

address

object (Addressable)

Similar to url, information on where the service is available on HTTP.

Methods

get

Get information about a route.

list

List routes.