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. See also: https://github.com/knative/serving/blob/master/docs/spec/overview.md#route

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 "v1alpha1".

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)
    }
  ],
  "generation": number
}
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.

generation
(deprecated)

number

Deprecated and not currently populated by Cloud Run. See metadata.generation instead, which is the sequence number containing the latest generation of the desired state.

Read-only.

RouteStatus

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

JSON representation
{
  "domain": string,
  "traffic": [
    {
      object(TrafficTarget)
    }
  ],
  "observedGeneration": number,
  "conditions": [
    {
      object(RouteCondition)
    }
  ],
  "domainInternal": string,
  "address": {
    object(Addressable)
  }
}
Fields
domain

string

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

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 we last observed.

observedGeneration

number

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 only has a configurationName 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(RouteCondition)

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

domainInternal

string

For Cloud Run, identifical to domain.

address

object(Addressable)

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

RouteCondition

RouteCondition defines a readiness condition for a Route.

JSON representation
{
  "type": string,
  "status": string,
  "reason": string,
  "message": string,
  "lastTransitionTime": string
}
Fields
type

string

RouteConditionType is used to communicate the status of the reconciliation process. See also: https://github.com/knative/serving/blob/master/docs/spec/errors.md#error-conditions-and-reporting Types include: "Ready".

status

string

Status of the condition, one of "True", "False", "Unknown".

reason

string

One-word CamelCase reason for the condition's last transition. +optional

message

string

Human-readable message indicating details about last transition. +optional

lastTransitionTime

string (Timestamp format)

Last time the condition transitioned from one status to another. +optional

A timestamp in RFC3339 UTC "Zulu" format, accurate to nanoseconds. Example: "2014-10-02T15:01:23.045123456Z".

Methods

get

Rpc to get information about a route.

list

Rpc to list routes.
Was this page helpful? Let us know how we did:

Send feedback about...