Serving API

    Package v1alpha1 contains the Autoscaling v1alpha1 API types.

    Resource Types:

    PodAutoscaler is a Knative abstraction that encapsulates the interface by which Knative components instantiate autoscalers. This definition is an abstraction that may be backed by multiple definitions. For more information, see the Knative Pluggability presentation:

    Metric

    Metric represents a resource to configure the metric collector with.

    FieldDescription
    metadata
    (Optional) Refer to the Kubernetes API documentation for the fields of the metadata field.
    spec
    MetricSpec
    (Optional)

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



    stableWindow

    StableWindow is the aggregation window for metrics in a stable state.

    panicWindow
    time.Duration

    PanicWindow is the aggregation window for metrics where quick reactions are needed.

    scrapeTarget
    string

    ScrapeTarget is the K8s service that publishes the metric endpoint.

    status
    (Optional)

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

    MetricSpec

    (Appears on:)

    MetricSpec contains all values a metric collector needs to operate.

    FieldDescription
    stableWindow
    time.Duration

    StableWindow is the aggregation window for metrics in a stable state.

    panicWindow

    PanicWindow is the aggregation window for metrics where quick reactions are needed.

    scrapeTarget
    string

    ScrapeTarget is the K8s service that publishes the metric endpoint.

    MetricStatus

    (Appears on:)

    MetricStatus reflects the status of metric collection for this specific entity.

    FieldDescription
    Status
    knative.dev/pkg/apis/duck/v1.Status

    (Members of Status are embedded into this type.)

    PodAutoscalerSpec

    (Appears on:PodAutoscaler)

    PodAutoscalerSpec holds the desired state of the PodAutoscaler (from the client).

    FieldDescription
    containerConcurrency
    int64
    (Optional)

    ContainerConcurrency specifies the maximum allowed in-flight (concurrent) requests per container of the Revision. Defaults to 0 which means unlimited concurrency.

    scaleTargetRef

    ScaleTargetRef defines the /scale-able resource that this PodAutoscaler is responsible for quickly right-sizing.

    reachability
    ReachabilityType
    (Optional)

    Reachability specifies whether or not the ScaleTargetRef can be reached (ie. has a route). Defaults to ReachabilityUnknown

    protocolType

    The application-layer protocol. Matches ProtocolType inferred from the revision spec.

    PodAutoscalerStatus

    (Appears on:)

    PodAutoscalerStatus communicates the observed state of the PodAutoscaler (from the controller).

    FieldDescription
    Status
    knative.dev/pkg/apis/duck/v1.Status

    (Members of Status are embedded into this type.)

    serviceName
    string

    ServiceName is the K8s Service name that serves the revision, scaled by this PA. The service is created and owned by the ServerlessService object owned by this PA.

    metricsServiceName
    string

    MetricsServiceName is the K8s Service name that provides revision metrics. The service is managed by the PA object.

    desiredScale
    int32

    DesiredScale shows the current desired number of replicas for the revision.

    actualScale
    int32

    ActualScale shows the actual number of replicas for the revision.

    PodScalable

    PodScalable is a duck type that the resources referenced by the PodAutoscaler’s ScaleTargetRef must implement. They must also implement the /scale sub-resource for use with /scale based implementations (e.g. HPA), but this further constrains the shape the referenced resources may take.

    FieldDescription
    metadata
    Kubernetes meta/v1.ObjectMeta
    Refer to the Kubernetes API documentation for the fields of the metadata field.
    spec


    replicas
    int32
    selector
    Kubernetes meta/v1.LabelSelector
    template
    status
    PodScalableStatus

    PodScalableSpec

    (Appears on:PodScalable)

    PodScalableSpec is the specification for the desired state of a PodScalable (or at least our shared portion).

    FieldDescription
    replicas
    int32
    selector
    template
    Kubernetes core/v1.PodTemplateSpec

    PodScalableStatus

    (Appears on:PodScalable)

    PodScalableStatus is the observed state of a PodScalable (or at least our shared portion).

    FieldDescription
    replicas
    int32

    ReachabilityType (string alias)

    (Appears on:PodAutoscalerSpec)

    ReachabilityType is the enumeration type for the different states of reachability to the ScaleTarget of a PodAutoscaler

    ValueDescription

    “Reachable”

    ReachabilityReachable means the ScaleTarget is reachable, ie. it has an active route.

    “”

    ReachabilityUnknown means the reachability of the ScaleTarget is unknown. Used when the reachability cannot be determined, eg. during activation.

    “Unreachable”

    ReachabilityUnreachable means the ScaleTarget is not reachable, ie. it does not have an active route.


    Package v1 contains the Serving v1 API types.

    Resource Types:

    Configuration

    Configuration represents the “floating HEAD” of a linear history of Revisions. Users create new Revisions by updating the Configuration’s spec. The “latest created” revision’s name is available under status, as is the “latest ready” revision’s name. See also:

    FieldDescription
    apiVersion
    string
    serving.knative.dev/v1
    kind
    string
    Configuration
    metadata
    Kubernetes meta/v1.ObjectMeta
    (Optional) Refer to the Kubernetes API documentation for the fields of the metadata field.
    spec
    (Optional)

    template
    RevisionTemplateSpec
    (Optional)

    Template holds the latest specification for the Revision to be stamped out.

    status
    (Optional)

    Revision

    Revision is an immutable snapshot of code and configuration. A revision references a container image. Revisions are created by updates to a Configuration.

    See also:

    FieldDescription
    apiVersion
    string
    serving.knative.dev/v1

    string
    Revision
    metadata
    Kubernetes meta/v1.ObjectMeta
    (Optional) Refer to the Kubernetes API documentation for the fields of the metadata field.
    spec
    (Optional)

    status
    RevisionStatus
    (Optional)

    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/main/docs/spec/overview.md#route

    FieldDescription
    apiVersion
    string
    serving.knative.dev/v1
    kind
    string
    Route
    metadata
    (Optional) Refer to the Kubernetes API documentation for the fields of the metadata field.
    spec
    RouteSpec
    (Optional)

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



    traffic
    (Optional)

    Traffic specifies how to distribute traffic over a collection of revisions and configurations.

    status
    RouteStatus
    (Optional)

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

    Service

    Service acts as a top-level container that manages a Route and Configuration which implement a network service. Service exists to provide a singular abstraction which can be access controlled, reasoned about, and which encapsulates software lifecycle decisions such as rollout policy and team resource ownership. Service acts only as an orchestrator of the underlying Routes and Configurations (much as a kubernetes Deployment orchestrates ReplicaSets), and its usage is optional but recommended.

    See also: https://github.com/knative/serving/blob/main/docs/spec/overview.md#service

    FieldDescription
    apiVersion
    string
    serving.knative.dev/v1
    kind
    string
    Service
    metadata
    (Optional) Refer to the Kubernetes API documentation for the fields of the metadata field.
    spec
    ServiceSpec
    (Optional)

    ConfigurationSpec

    (Members of ConfigurationSpec are embedded into this type.)

    ServiceSpec inlines an unrestricted ConfigurationSpec.

    RouteSpec
    RouteSpec

    (Members of RouteSpec are embedded into this type.)

    ServiceSpec inlines RouteSpec and restricts/defaults its fields via webhook. In particular, this spec can only reference this Service’s configuration and revisions (which also influences defaults).

    status
    (Optional)

    ConfigurationSpec

    (Appears on:, ServiceSpec)

    ConfigurationSpec holds the desired state of the Configuration (from the client).

    FieldDescription
    template
    (Optional)

    Template holds the latest specification for the Revision to be stamped out.

    ConfigurationStatus

    (Appears on:)

    ConfigurationStatus communicates the observed state of the Configuration (from the controller).

    FieldDescription
    Status
    knative.dev/pkg/apis/duck/v1.Status

    (Members of Status are embedded into this type.)

    ConfigurationStatusFields

    (Members of ConfigurationStatusFields are embedded into this type.)

    ConfigurationStatusFields

    (Appears on:, ServiceStatus)

    ConfigurationStatusFields holds the fields of Configuration’s status that are not generally shared. This is defined separately and inlined so that other types can readily consume these fields via duck typing.

    FieldDescription
    latestReadyRevisionName
    string
    (Optional)

    LatestReadyRevisionName holds the name of the latest Revision stamped out from this Configuration that has had its “Ready” condition become “True”.

    latestCreatedRevisionName
    string
    (Optional)

    LatestCreatedRevisionName is the last revision that was created from this Configuration. It might not be ready yet, for that use LatestReadyRevisionName.

    ContainerStatus

    (Appears on:RevisionStatus)

    ContainerStatus holds the information of container name and image digest value

    FieldDescription
    name
    string
    imageDigest
    string

    RevisionSpec

    (Appears on:Revision, )

    RevisionSpec holds the desired state of the Revision (from the client).

    FieldDescription
    PodSpec
    Kubernetes core/v1.PodSpec

    (Members of PodSpec are embedded into this type.)

    containerConcurrency
    int64
    (Optional)

    ContainerConcurrency specifies the maximum allowed in-flight (concurrent) requests per container of the Revision. Defaults to 0 which means concurrency to the application is not limited, and the system decides the target concurrency for the autoscaler.

    timeoutSeconds
    int64
    (Optional)

    TimeoutSeconds is the maximum duration in seconds that the request instance is allowed to respond to a request. If unspecified, a system default will be provided.

    responseStartTimeoutSeconds
    int64
    (Optional)

    ResponseStartTimeoutSeconds is the maximum duration in seconds that the request routing layer will wait for a request delivered to a container to begin sending any network traffic.

    idleTimeoutSeconds
    int64
    (Optional)

    IdleTimeoutSeconds is the maximum duration in seconds a request will be allowed to stay open while not receiving any bytes from the user’s application. If unspecified, a system default will be provided.

    RevisionStatus

    (Appears on:Revision)

    RevisionStatus communicates the observed state of the Revision (from the controller).

    FieldDescription
    Status

    (Members of Status are embedded into this type.)

    logUrl
    string
    (Optional)

    LogURL specifies the generated logging url for this particular revision based on the revision url template specified in the controller’s config.

    containerStatuses
    []ContainerStatus
    (Optional)

    ContainerStatuses is a slice of images present in .Spec.Container[].Image to their respective digests and their container name. The digests are resolved during the creation of Revision. ContainerStatuses holds the container name and image digests for both serving and non serving containers. ref:

    initContainerStatuses
    []ContainerStatus
    (Optional)

    InitContainerStatuses is a slice of images present in .Spec.InitContainer[].Image to their respective digests and their container name. The digests are resolved during the creation of Revision. ContainerStatuses holds the container name and image digests for both serving and non serving containers. ref:

    actualReplicas
    int32
    (Optional)

    ActualReplicas reflects the amount of ready pods running this revision.

    desiredReplicas
    int32
    (Optional)

    DesiredReplicas reflects the desired amount of pods running this revision.

    RevisionTemplateSpec

    (Appears on:)

    RevisionTemplateSpec describes the data a revision should have when created from a template. Based on: https://github.com/kubernetes/api/blob/e771f807/core/v1/types.go#L3179-L3190

    FieldDescription
    metadata
    (Optional) Refer to the Kubernetes API documentation for the fields of the metadata field.
    spec
    RevisionSpec
    (Optional)

    PodSpec

    (Members of PodSpec are embedded into this type.)

    containerConcurrency
    int64
    (Optional)

    ContainerConcurrency specifies the maximum allowed in-flight (concurrent) requests per container of the Revision. Defaults to 0 which means concurrency to the application is not limited, and the system decides the target concurrency for the autoscaler.

    timeoutSeconds
    int64
    (Optional)

    TimeoutSeconds is the maximum duration in seconds that the request instance is allowed to respond to a request. If unspecified, a system default will be provided.

    responseStartTimeoutSeconds
    int64
    (Optional)

    ResponseStartTimeoutSeconds is the maximum duration in seconds that the request routing layer will wait for a request delivered to a container to begin sending any network traffic.

    idleTimeoutSeconds
    int64
    (Optional)

    IdleTimeoutSeconds is the maximum duration in seconds a request will be allowed to stay open while not receiving any bytes from the user’s application. If unspecified, a system default will be provided.

    RouteSpec

    (Appears on:, ServiceSpec)

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

    FieldDescription
    traffic
    (Optional)

    Traffic specifies how to distribute traffic over a collection of revisions and configurations.

    RouteStatus

    (Appears on:)

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

    FieldDescription
    Status
    knative.dev/pkg/apis/duck/v1.Status

    (Members of Status are embedded into this type.)

    RouteStatusFields

    (Members of RouteStatusFields are embedded into this type.)

    RouteStatusFields

    (Appears on:, ServiceStatus)

    RouteStatusFields holds the fields of Route’s status that are not generally shared. This is defined separately and inlined so that other types can readily consume these fields via duck typing.

    FieldDescription
    url
    (Optional)

    URL holds the url that will distribute traffic over the provided traffic targets. It generally has the form http[s]://{route-name}.{route-namespace}.{cluster-level-suffix}

    address
    knative.dev/pkg/apis/duck/v1.Addressable
    (Optional)

    Address holds the information needed for a Route to be the target of an event.


    (Optional)

    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.

    RoutingState represents states of a revision with regards to serving a route.

    ServiceSpec

    (Appears on:Service)

    ServiceSpec represents the configuration for the Service object. A Service’s specification is the union of the specifications for a Route and Configuration. The Service restricts what can be expressed in these fields, e.g. the Route must reference the provided Configuration; however, these limitations also enable friendlier defaulting, e.g. Route never needs a Configuration name, and may be defaulted to the appropriate “run latest” spec.

    FieldDescription
    ConfigurationSpec

    (Members of ConfigurationSpec are embedded into this type.)

    ServiceSpec inlines an unrestricted ConfigurationSpec.

    RouteSpec
    RouteSpec

    ServiceSpec inlines RouteSpec and restricts/defaults its fields via webhook. In particular, this spec can only reference this Service’s configuration and revisions (which also influences defaults).

    ServiceStatus

    (Appears on:Service)

    ServiceStatus represents the Status stanza of the Service resource.

    FieldDescription
    Status

    (Members of Status are embedded into this type.)

    ConfigurationStatusFields
    ConfigurationStatusFields

    (Members of ConfigurationStatusFields are embedded into this type.)

    In addition to inlining ConfigurationSpec, we also inline the fields specific to ConfigurationStatus.

    RouteStatusFields

    (Members of RouteStatusFields are embedded into this type.)

    In addition to inlining RouteSpec, we also inline the fields specific to RouteStatus.

    TrafficTarget

    (Appears on:, RouteStatusFields)

    TrafficTarget holds a single entry of the routing table for a Route.

    FieldDescription
    tag
    string
    (Optional)

    Tag is optionally used to expose a dedicated url for referencing this target exclusively.

    revisionName
    string
    (Optional)

    RevisionName of a specific revision to which to send this portion of traffic. This is mutually exclusive with ConfigurationName.

    configurationName
    string
    (Optional)

    ConfigurationName of a configuration to whose latest revision we will send this portion of traffic. When the “status.latestReadyRevisionName” of the referenced configuration changes, we will automatically migrate traffic from the prior “latest ready” revision to the new one. This field is never set in Route’s status, only its spec. This is mutually exclusive with RevisionName.

    latestRevision
    bool
    (Optional)

    LatestRevision may be optionally provided to indicate that the latest ready Revision of the Configuration should be used for this traffic target. When provided LatestRevision must be true if RevisionName is empty; it must be false when RevisionName is non-empty.

    percent
    int64
    (Optional)

    Percent indicates that percentage based routing should be used and the value indicates the percent of traffic that is be routed to this Revision or Configuration. 0 (zero) mean no traffic, 100 means all traffic. When percentage based routing is being used the follow rules apply: - the sum of all percent values must equal 100 - when not specified, the implied value for percent is zero for that particular Revision or Configuration

    url
    (Optional)

    URL displays the URL for accessing named traffic targets. URL is displayed in status, and is disallowed on spec. URL must contain a scheme (e.g. http://) and a hostname, but may not contain anything else (e.g. basic auth, url path, etc.)


    Package v1alpha1 contains the v1alpha1 versions of the serving apis. Api versions allow the api contract for a resource to be changed while keeping backward compatibility by support multiple concurrent versions of the same resource

    Resource Types:

    DomainMapping

    DomainMapping is a mapping from a custom hostname to an Addressable.

    FieldDescription
    apiVersion
    string
    serving.knative.dev/v1alpha1
    kind
    string
    DomainMapping
    metadata
    (Optional)

    Standard object’s metadata. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata

    Refer to the Kubernetes API documentation for the fields of the metadata field.
    spec
    (Optional)

    Spec is the desired state of the DomainMapping. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#spec-and-status



    ref

    Ref specifies the target of the Domain Mapping.

    The object identified by the Ref must be an Addressable with a URL of the form {name}.{namespace}.{domain} where {domain} is the cluster domain, and {name} and {namespace} are the name and namespace of a Kubernetes Service.

    This contract is satisfied by Knative types such as Knative Services and Knative Routes, and by Kubernetes Services.

    tls
    SecretTLS
    (Optional)

    TLS allows the DomainMapping to terminate TLS traffic with an existing secret.

    status
    (Optional)

    Status is the current state of the DomainMapping. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#spec-and-status

    CannotConvertError

    CannotConvertError is returned when a field cannot be converted.

    FieldDescription
    Message
    string
    Field
    string

    DomainMappingSpec

    (Appears on:)

    DomainMappingSpec describes the DomainMapping the user wishes to exist.

    FieldDescription
    ref
    knative.dev/pkg/apis/duck/v1.KReference

    Ref specifies the target of the Domain Mapping.

    The object identified by the Ref must be an Addressable with a URL of the form {name}.{namespace}.{domain} where {domain} is the cluster domain, and {name} and {namespace} are the name and namespace of a Kubernetes Service.

    This contract is satisfied by Knative types such as Knative Services and Knative Routes, and by Kubernetes Services.

    tls
    (Optional)

    TLS allows the DomainMapping to terminate TLS traffic with an existing secret.

    DomainMappingStatus

    (Appears on:)

    DomainMappingStatus describes the current state of the DomainMapping.

    FieldDescription
    Status
    knative.dev/pkg/apis/duck/v1.Status

    (Members of Status are embedded into this type.)

    url
    (Optional)

    URL is the URL of this DomainMapping.

    address
    knative.dev/pkg/apis/duck/v1.Addressable
    (Optional)

    Address holds the information needed for a DomainMapping to be the target of an event.

    SecretTLS

    (Appears on:DomainMappingSpec)

    SecretTLS wrapper for TLS SecretName.

    FieldDescription
    secretName
    string

    SecretName is the name of the existing secret used to terminate TLS traffic.


    Package v1beta1 contains the v1beta1 versions of the serving apis. Api versions allow the api contract for a resource to be changed while keeping backward compatibility by support multiple concurrent versions of the same resource

    Resource Types:

    DomainMapping

    DomainMapping is a mapping from a custom hostname to an Addressable.

    FieldDescription
    apiVersion
    string
    serving.knative.dev/v1beta1
    kind
    string
    DomainMapping
    metadata
    Kubernetes meta/v1.ObjectMeta
    (Optional)

    Standard object’s metadata. More info:

    Refer to the Kubernetes API documentation for the fields of the metadata field.
    spec
    DomainMappingSpec
    (Optional)

    Spec is the desired state of the DomainMapping. More info:



    ref
    knative.dev/pkg/apis/duck/v1.KReference

    Ref specifies the target of the Domain Mapping.

    The object identified by the Ref must be an Addressable with a URL of the form {name}.{namespace}.{domain} where {domain} is the cluster domain, and {name} and {namespace} are the name and namespace of a Kubernetes Service.

    This contract is satisfied by Knative types such as Knative Services and Knative Routes, and by Kubernetes Services.

    tls
    (Optional)

    TLS allows the DomainMapping to terminate TLS traffic with an existing secret.

    status
    DomainMappingStatus
    (Optional)

    Status is the current state of the DomainMapping. More info:

    CannotConvertError

    CannotConvertError is returned when a field cannot be converted.

    FieldDescription
    Message
    string
    Field
    string

    DomainMappingSpec

    (Appears on:DomainMapping)

    DomainMappingSpec describes the DomainMapping the user wishes to exist.

    FieldDescription
    ref

    Ref specifies the target of the Domain Mapping.

    The object identified by the Ref must be an Addressable with a URL of the form {name}.{namespace}.{domain} where {domain} is the cluster domain, and {name} and {namespace} are the name and namespace of a Kubernetes Service.

    This contract is satisfied by Knative types such as Knative Services and Knative Routes, and by Kubernetes Services.

    tls
    SecretTLS
    (Optional)

    TLS allows the DomainMapping to terminate TLS traffic with an existing secret.

    (Appears on:DomainMapping)

    DomainMappingStatus describes the current state of the DomainMapping.

    FieldDescription
    Status

    (Members of Status are embedded into this type.)

    url
    knative.dev/pkg/apis.URL
    (Optional)

    URL is the URL of this DomainMapping.

    address
    (Optional)

    Address holds the information needed for a DomainMapping to be the target of an event.

    SecretTLS

    (Appears on:)

    SecretTLS wrapper for TLS SecretName.

    FieldDescription

    string

    Generated with gen-crd-api-reference-docs .