diff --git a/hack/gen-api-reference-docs.sh b/hack/gen-api-reference-docs.sh new file mode 100755 index 000000000..a859008b9 --- /dev/null +++ b/hack/gen-api-reference-docs.sh @@ -0,0 +1,169 @@ +#!/usr/bin/env bash +# +# This script is for generating API reference docs for Knative components. + +# Copyright 2018 Knative authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +set -euo pipefail + +SCRIPTDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +[[ -n "${DEBUG:-}" ]] && set -x + +REFDOCS_PKG="github.com/ahmetb/gen-crd-api-reference-docs" +REFDOCS_REPO="https://${REFDOCS_PKG}.git" +REFDOCS_VER="5c208a6" + +KNATIVE_SERVING_REPO="github.com/knative/serving" +KNATIVE_SERVING_COMMIT="v0.2.3" +KNATIVE_SERVING_OUT_FILE="serving.md" + +KNATIVE_BUILD_REPO="github.com/knative/build" +KNATIVE_BUILD_COMMIT="v0.2.0" +KNATIVE_BUILD_OUT_FILE="build.md" + +KNATIVE_EVENTING_REPO="github.com/knative/eventing" +KNATIVE_EVENTING_COMMIT="v0.2.1" +KNATIVE_EVENTING_OUT_FILE="eventing/eventing.md" + +KNATIVE_EVENTING_SOURCES_REPO="github.com/knative/eventing-sources" +KNATIVE_EVENTING_SOURCES_COMMIT="v0.2.1" +KNATIVE_EVENTING_SOURCES_OUT_FILE="eventing/eventing-sources.md" + +log() { + echo "$@" >&2 +} + +fail() { + log "error: $*" + exit 1 +} + +install_go_bin() { + local pkg + pkg="$1" + ( + cd "$(mktemp -d)" + go mod init tmp + go get -u "$pkg" + # will be downloaded to "$(go env GOPATH)/bin/$(basename $pkg)" + ) +} + +repo_tarball_url() { + local repo commit + repo="$1" + commit="$2" + echo "https://$repo/archive/$commit.tar.gz" +} + +dl_and_extract() { + # TODO(ahmetb) remove this function. no longer dl'ing tarballs since they + # won't have a .git dir to infer the commit ID from to be used by refdocs. + local url dest + url="$1" + dest="$2" + mkdir -p "${dest}" + curl -sSLf "$url" | tar zxf - --directory="$dest" --strip 1 +} + +clone_at_commit() { + local repo commit dest + repo="$1" + commit="$2" + dest="$3" + mkdir -p "${dest}" + git clone "${repo}" "${dest}" + git --git-dir="${dest}/.git" --work-tree="${dest}" checkout --detach --quiet "${commit}" +} + +gen_refdocs() { + local refdocs_bin gopath out_file repo_root + refdocs_bin="$1" + gopath="$2" + out_file="$3" + repo_root="$4" + + ( + cd "${repo_root}" + env GOPATH="${gopath}" "${refdocs_bin}" \ + -out-file "${gopath}/out/${out_file}" \ + -api-dir "./pkg/apis" \ + -config "${SCRIPTDIR}/reference-docs-gen-config.json" + ) +} + + +main() { + if [[ -n "${GOPATH:-}" ]]; then + fail "GOPATH should not be set." + fi + if ! command -v "go" 1>/dev/null ; then + fail "\"go\" is not in PATH" + fi + if ! command -v "git" 1>/dev/null ; then + fail "\"git\" is not in PATH" + fi + + # install and place the refdocs tool + local refdocs_bin refdocs_bin_expected refdocs_dir + refdocs_dir="$(mktemp -d)" + refdocs_bin="${refdocs_dir}/refdocs" + # clone repo for ./templates + git clone --quiet --depth=1 "${REFDOCS_REPO}" "${refdocs_dir}" + # install bin + install_go_bin "${REFDOCS_PKG}@${REFDOCS_VER}" + # move bin to final location + refdocs_bin_expected="$(go env GOPATH)/bin/$(basename ${REFDOCS_PKG})" + mv "${refdocs_bin_expected}" "${refdocs_bin}" + [[ ! -f "${refdocs_bin}" ]] && fail "refdocs failed to install" + + local clone_root + clone_root="$(mktemp -d)" + + local knative_serving_root + knative_serving_root="${clone_root}/src/${KNATIVE_SERVING_REPO}" + clone_at_commit "https://${KNATIVE_SERVING_REPO}.git" "${KNATIVE_SERVING_COMMIT}" \ + "${knative_serving_root}" + gen_refdocs "${refdocs_bin}" "${clone_root}" "${KNATIVE_SERVING_OUT_FILE}" \ + "${knative_serving_root}" + + local knative_build_root + knative_build_root="${clone_root}/src/${KNATIVE_BUILD_REPO}" + clone_at_commit "https://${KNATIVE_BUILD_REPO}.git" "${KNATIVE_BUILD_COMMIT}" \ + "${knative_build_root}" + gen_refdocs "${refdocs_bin}" "${clone_root}" "${KNATIVE_BUILD_OUT_FILE}" \ + "${knative_build_root}" + + local knative_eventing_root + knative_eventing_root="${clone_root}/src/${KNATIVE_EVENTING_REPO}" + clone_at_commit "https://${KNATIVE_EVENTING_REPO}.git" "${KNATIVE_EVENTING_COMMIT}" \ + "${knative_eventing_root}" + gen_refdocs "${refdocs_bin}" "${clone_root}" "${KNATIVE_EVENTING_OUT_FILE}" \ + "${knative_eventing_root}" + + local knative_eventing_sources_root + knative_eventing_sources_root="${clone_root}/src/${KNATIVE_EVENTING_SOURCES_REPO}" + clone_at_commit "https://${KNATIVE_EVENTING_SOURCES_REPO}.git" "${KNATIVE_EVENTING_SOURCES_COMMIT}" \ + "${knative_eventing_sources_root}" + gen_refdocs "${refdocs_bin}" "${clone_root}" "${KNATIVE_EVENTING_SOURCES_OUT_FILE}" \ + "${knative_eventing_sources_root}" + + log "Generated files written to ${clone_root}/out/." + log "Copy the files in reference/ directory to knative/docs." + if command -v open >/dev/null; then + open "${clone_root}/out/" + fi +} + +main "$@" diff --git a/hack/reference-docs-gen-config.json b/hack/reference-docs-gen-config.json new file mode 100644 index 000000000..e5fdbc706 --- /dev/null +++ b/hack/reference-docs-gen-config.json @@ -0,0 +1,28 @@ +{ + "hideMemberFields": [ + "TypeMeta" + ], + "hideTypePatterns": [ + "ParseError$", + "List$" + ], + "externalPackages": [ + { + "typeMatchPrefix": "^k8s\\.io/apimachinery/pkg/apis/meta/v1\\.Duration$", + "docsURLTemplate": "https://godoc.org/k8s.io/apimachinery/pkg/apis/meta/v1#Duration" + }, + { + "typeMatchPrefix": "^k8s\\.io/(api|apimachinery/pkg/apis)/", + "docsURLTemplate": "https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.13/#{{lower .TypeIdentifier}}-{{arrIndex .PackageSegments -1}}-{{arrIndex .PackageSegments -2}}" + }, + { + "typeMatchPrefix": "^github\\.com/knative/pkg/apis/duck/", + "docsURLTemplate": "https://godoc.org/github.com/knative/pkg/apis/duck/{{arrIndex .PackageSegments -1}}#{{.TypeIdentifier}}" + } + ], + "typeDisplayNamePrefixOverrides": { + "k8s.io/api/": "Kubernetes ", + "k8s.io/apimachinery/pkg/apis/": "Kubernetes " + }, + "markdownDisabled": false +} diff --git a/reference/README.md b/reference/README.md new file mode 100644 index 000000000..21cb236d7 --- /dev/null +++ b/reference/README.md @@ -0,0 +1,6 @@ +# Knative API Reference documentation + +- [Serving API](serving.md) +- [Build API](build.md) +- [Eventing API](eventing/eventing.md) +- [Event Sources API](eventing/eventing-sources.md) diff --git a/reference/build.md b/reference/build.md new file mode 100644 index 000000000..bef66011a --- /dev/null +++ b/reference/build.md @@ -0,0 +1,1241 @@ +

Packages:

+ +

build.knative.dev

+

+

Package v1alpha1 is the v1alpha1 version of the API.

+

+Resource Types: + +

Build +

+

+

Build represents a build of a container image. A Build is made up of a +source, and a set of steps. Steps can mount volumes to share data between +themselves. A build may be created by instantiating a BuildTemplate.

+

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+apiVersion
+string
+ +build.knative.dev/v1alpha1 + +
+kind
+string +
Build
+metadata
+ + +Kubernetes meta/v1.ObjectMeta + + +
+Refer to the Kubernetes API documentation for the fields of the +metadata field. +
+spec
+ + +BuildSpec + + +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+generation
+ +int64 + +
+(Optional) +

TODO: Generation does not work correctly with CRD. They are scrubbed +by the APIserver (https://github.com/kubernetes/kubernetes/issues/58778) +So, we add Generation here. Once that gets fixed, remove this and use +ObjectMeta.Generation instead.

+
+source
+ + +SourceSpec + + +
+

Source specifies the input to the build.

+
+steps
+ + +[]Kubernetes core/v1.Container + + +
+

Steps are the steps of the build; each step is run sequentially with the +source mounted into /workspace.

+
+volumes
+ + +[]Kubernetes core/v1.Volume + + +
+

Volumes is a collection of volumes that are available to mount into the +steps of the build.

+
+serviceAccountName
+ +string + +
+

The name of the service account as which to run this build.

+
+template
+ + +TemplateInstantiationSpec + + +
+

Template, if specified, references a BuildTemplate resource to use to +populate fields in the build, and optional Arguments to pass to the +template. The default Kind of template is BuildTemplate

+
+nodeSelector
+ +map[string]string + +
+(Optional) +

NodeSelector is a selector which must be true for the pod to fit on a node. +Selector which must match a node’s labels for the pod to be scheduled on that node. +More info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/

+
+timeout
+ + +Kubernetes meta/v1.Duration + + +
+(Optional) +

Time after which the build times out. Defaults to 10 minutes. +Specified build timeout should be less than 24h. +Refer Go’s ParseDuration documentation for expected format: https://golang.org/pkg/time/#ParseDuration

+
+affinity
+ + +Kubernetes core/v1.Affinity + + +
+(Optional) +

If specified, the pod’s scheduling constraints

+
+
+status
+ + +BuildStatus + + +
+
+

BuildTemplate +

+

+

BuildTemplate is a template that can used to easily create Builds.

+

+ + + + + + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+apiVersion
+string
+ +build.knative.dev/v1alpha1 + +
+kind
+string +
BuildTemplate
+metadata
+ + +Kubernetes meta/v1.ObjectMeta + + +
+Refer to the Kubernetes API documentation for the fields of the +metadata field. +
+spec
+ + +BuildTemplateSpec + + +
+
+
+ + + + + + + + + + + + + + + + + +
+generation
+ +int64 + +
+(Optional) +

TODO: Generation does not work correctly with CRD. They are scrubbed +by the APIserver (https://github.com/kubernetes/kubernetes/issues/58778) +So, we add Generation here. Once that gets fixed, remove this and use +ObjectMeta.Generation instead.

+
+parameters
+ + +[]ParameterSpec + + +
+

Parameters defines the parameters that can be populated in a template.

+
+steps
+ + +[]Kubernetes core/v1.Container + + +
+

Steps are the steps of the build; each step is run sequentially with the +source mounted into /workspace.

+
+volumes
+ + +[]Kubernetes core/v1.Volume + + +
+

Volumes is a collection of volumes that are available to mount into the +steps of the build.

+
+
+

ClusterBuildTemplate +

+

+

ClusterBuildTemplate is a template that can used to easily create Builds.

+

+ + + + + + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+apiVersion
+string
+ +build.knative.dev/v1alpha1 + +
+kind
+string +
ClusterBuildTemplate
+metadata
+ + +Kubernetes meta/v1.ObjectMeta + + +
+Refer to the Kubernetes API documentation for the fields of the +metadata field. +
+spec
+ + +BuildTemplateSpec + + +
+
+
+ + + + + + + + + + + + + + + + + +
+generation
+ +int64 + +
+(Optional) +

TODO: Generation does not work correctly with CRD. They are scrubbed +by the APIserver (https://github.com/kubernetes/kubernetes/issues/58778) +So, we add Generation here. Once that gets fixed, remove this and use +ObjectMeta.Generation instead.

+
+parameters
+ + +[]ParameterSpec + + +
+

Parameters defines the parameters that can be populated in a template.

+
+steps
+ + +[]Kubernetes core/v1.Container + + +
+

Steps are the steps of the build; each step is run sequentially with the +source mounted into /workspace.

+
+volumes
+ + +[]Kubernetes core/v1.Volume + + +
+

Volumes is a collection of volumes that are available to mount into the +steps of the build.

+
+
+

ArgumentSpec +

+

+(Appears on: +TemplateInstantiationSpec) +

+

+

ArgumentSpec defines the actual values to use to populate a template’s +parameters.

+

+ + + + + + + + + + + + + + + + + +
FieldDescription
+name
+ +string + +
+

Name is the name of the argument.

+
+value
+ +string + +
+

Value is the value of the argument.

+
+

BuildProvider +(string alias)

+

+(Appears on: +BuildStatus) +

+

+

BuildProvider defines a build execution implementation.

+

+

BuildSpec +

+

+(Appears on: +Build) +

+

+

BuildSpec is the spec for a Build resource.

+

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+generation
+ +int64 + +
+(Optional) +

TODO: Generation does not work correctly with CRD. They are scrubbed +by the APIserver (https://github.com/kubernetes/kubernetes/issues/58778) +So, we add Generation here. Once that gets fixed, remove this and use +ObjectMeta.Generation instead.

+
+source
+ + +SourceSpec + + +
+

Source specifies the input to the build.

+
+steps
+ + +[]Kubernetes core/v1.Container + + +
+

Steps are the steps of the build; each step is run sequentially with the +source mounted into /workspace.

+
+volumes
+ + +[]Kubernetes core/v1.Volume + + +
+

Volumes is a collection of volumes that are available to mount into the +steps of the build.

+
+serviceAccountName
+ +string + +
+

The name of the service account as which to run this build.

+
+template
+ + +TemplateInstantiationSpec + + +
+

Template, if specified, references a BuildTemplate resource to use to +populate fields in the build, and optional Arguments to pass to the +template. The default Kind of template is BuildTemplate

+
+nodeSelector
+ +map[string]string + +
+(Optional) +

NodeSelector is a selector which must be true for the pod to fit on a node. +Selector which must match a node’s labels for the pod to be scheduled on that node. +More info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/

+
+timeout
+ + +Kubernetes meta/v1.Duration + + +
+(Optional) +

Time after which the build times out. Defaults to 10 minutes. +Specified build timeout should be less than 24h. +Refer Go’s ParseDuration documentation for expected format: https://golang.org/pkg/time/#ParseDuration

+
+affinity
+ + +Kubernetes core/v1.Affinity + + +
+(Optional) +

If specified, the pod’s scheduling constraints

+
+

BuildStatus +

+

+(Appears on: +Build) +

+

+

BuildStatus is the status for a Build resource

+

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+builder
+ + +BuildProvider + + +
+
+cluster
+ + +ClusterSpec + + +
+

Cluster provides additional information if the builder is Cluster.

+
+google
+ + +GoogleSpec + + +
+

Google provides additional information if the builder is Google.

+
+startTime,omitEmpty
+ + +Kubernetes meta/v1.Time + + +
+

StartTime is the time the build is actually started.

+
+completionTime,omitEmpty
+ + +Kubernetes meta/v1.Time + + +
+

CompletionTime is the time the build completed.

+
+stepStates,omitEmpty
+ + +[]Kubernetes core/v1.ContainerState + + +
+

StepStates describes the state of each build step container.

+
+stepsCompleted
+ +[]string + +
+

StepsCompleted lists the name of build steps completed.

+
+conditions
+ + +github.com/knative/pkg/apis/duck/v1alpha1.Conditions + + +
+

Conditions describes the set of conditions of this build.

+
+

BuildTemplateInterface +

+

+

BuildTemplateInterface is implemented by BuildTemplate and ClusterBuildTemplate

+

+

BuildTemplateSpec +

+

+(Appears on: +BuildTemplate, +ClusterBuildTemplate) +

+

+

BuildTemplateSpec is the spec for a BuildTemplate.

+

+ + + + + + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+generation
+ +int64 + +
+(Optional) +

TODO: Generation does not work correctly with CRD. They are scrubbed +by the APIserver (https://github.com/kubernetes/kubernetes/issues/58778) +So, we add Generation here. Once that gets fixed, remove this and use +ObjectMeta.Generation instead.

+
+parameters
+ + +[]ParameterSpec + + +
+

Parameters defines the parameters that can be populated in a template.

+
+steps
+ + +[]Kubernetes core/v1.Container + + +
+

Steps are the steps of the build; each step is run sequentially with the +source mounted into /workspace.

+
+volumes
+ + +[]Kubernetes core/v1.Volume + + +
+

Volumes is a collection of volumes that are available to mount into the +steps of the build.

+
+

ClusterSpec +

+

+(Appears on: +BuildStatus) +

+

+

ClusterSpec provides information about the on-cluster build, if applicable.

+

+ + + + + + + + + + + + + + + + + +
FieldDescription
+namespace
+ +string + +
+

Namespace is the namespace in which the pod is running.

+
+podName
+ +string + +
+

PodName is the name of the pod responsible for executing this build’s steps.

+
+

GCSSourceSpec +

+

+(Appears on: +SourceSpec) +

+

+

GCSSourceSpec describes source input to the Build in the form of an archive, +or a source manifest describing files to fetch.

+

+ + + + + + + + + + + + + + + + + +
FieldDescription
+type
+ + +GCSSourceType + + +
+

Type declares the style of source to fetch.

+
+location
+ +string + +
+

Location specifies the location of the source archive or manifest file.

+
+

GCSSourceType +(string alias)

+

+(Appears on: +GCSSourceSpec) +

+

+

GCSSourceType defines a type of GCS source fetch.

+

+

GitSourceSpec +

+

+(Appears on: +SourceSpec) +

+

+

GitSourceSpec describes a Git repo source input to the Build.

+

+ + + + + + + + + + + + + + + + + +
FieldDescription
+url
+ +string + +
+

URL of the Git repository to clone from.

+
+revision
+ +string + +
+

Git revision (branch, tag, commit SHA or ref) to clone. See +https://git-scm.com/docs/gitrevisions#_specifying_revisions for more +information.

+
+

GoogleSpec +

+

+(Appears on: +BuildStatus) +

+

+

GoogleSpec provides information about the GCB build, if applicable.

+

+ + + + + + + + + + + + + +
FieldDescription
+operation
+ +string + +
+

Operation is the unique name of the GCB API Operation for the build.

+
+

ParameterSpec +

+

+(Appears on: +BuildTemplateSpec) +

+

+

ParameterSpec defines the possible parameters that can be populated in a +template.

+

+ + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+name
+ +string + +
+

Name is the unique name of this template parameter.

+
+description
+ +string + +
+

Description is a human-readable explanation of this template parameter.

+
+default
+ +string + +
+

Default, if specified, defines the default value that should be applied if +the build does not specify the value for this parameter.

+
+

SourceSpec +

+

+(Appears on: +BuildSpec) +

+

+

SourceSpec defines the input to the Build

+

+ + + + + + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+git
+ + +GitSourceSpec + + +
+

Git represents source in a Git repository.

+
+gcs
+ + +GCSSourceSpec + + +
+

GCS represents source in Google Cloud Storage.

+
+custom
+ + +Kubernetes core/v1.Container + + +
+

Custom indicates that source should be retrieved using a custom +process defined in a container invocation.

+
+subPath
+ +string + +
+

SubPath specifies a path within the fetched source which should be +built. This option makes parent directories inaccessible to the +build steps. (The specific source type may, in fact, not even fetch +files not in the SubPath.)

+
+

Template +

+

+

Template is an interface for accessing the BuildTemplateSpec +from various forms of template (namespace-/cluster-scoped).

+

+

TemplateInstantiationSpec +

+

+(Appears on: +BuildSpec) +

+

+

TemplateInstantiationSpec specifies how a BuildTemplate is instantiated into +a Build.

+

+ + + + + + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+name
+ +string + +
+

Name references the BuildTemplate resource to use.

+

The template is assumed to exist in the Build’s namespace.

+
+kind
+ + +TemplateKind + + +
+

The Kind of the template to be used, possible values are BuildTemplate +or ClusterBuildTemplate. If nothing is specified, the default if is BuildTemplate

+
+arguments
+ + +[]ArgumentSpec + + +
+

Arguments, if specified, lists values that should be applied to the +parameters specified by the template.

+
+env
+ + +[]Kubernetes core/v1.EnvVar + + +
+

Env, if specified will provide variables to all build template steps. +This will override any of the template’s steps environment variables.

+
+

TemplateKind +(string alias)

+

+(Appears on: +TemplateInstantiationSpec) +

+

+

TemplateKind defines the type of BuildTemplate used by the build.

+

+
+

+Generated with gen-crd-api-reference-docs +on git commit 9485975. +

diff --git a/reference/eventing/eventing-sources.md b/reference/eventing/eventing-sources.md new file mode 100644 index 000000000..ef3f2cb76 --- /dev/null +++ b/reference/eventing/eventing-sources.md @@ -0,0 +1,1135 @@ +

Packages:

+ +

sources.eventing.knative.dev

+

+

Package v1alpha1 contains API Schema definitions for the sources v1alpha1 API group

+

+Resource Types: + +

ContainerSource +

+

+

ContainerSource is the Schema for the containersources API

+

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+apiVersion
+string
+ +sources.eventing.knative.dev/v1alpha1 + +
+kind
+string +
ContainerSource
+metadata
+ + +Kubernetes meta/v1.ObjectMeta + + +
+Refer to the Kubernetes API documentation for the fields of the +metadata field. +
+spec
+ + +ContainerSourceSpec + + +
+
+
+ + + + + + + + + + + + + + + + + + + + + +
+image
+ +string + +
+

Image is the image to run inside of the container.

+
+args
+ +[]string + +
+

Args are passed to the ContainerSpec as they are.

+
+env
+ + +[]Kubernetes core/v1.EnvVar + + +
+(Optional) +

Env is the list of environment variables to set in the container. +Cannot be updated.

+
+serviceAccountName
+ +string + +
+(Optional) +

ServiceAccountName is the name of the ServiceAccount to use to run this +source.

+
+sink
+ + +Kubernetes core/v1.ObjectReference + + +
+(Optional) +

Sink is a reference to an object that will resolve to a domain name to use as the sink.

+
+
+status
+ + +ContainerSourceStatus + + +
+
+

GcpPubSubSource +

+

+

GcpPubSubSource is the Schema for the gcppubsubsources API.

+

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+apiVersion
+string
+ +sources.eventing.knative.dev/v1alpha1 + +
+kind
+string +
GcpPubSubSource
+metadata
+ + +Kubernetes meta/v1.ObjectMeta + + +
+Refer to the Kubernetes API documentation for the fields of the +metadata field. +
+spec
+ + +GcpPubSubSourceSpec + + +
+
+
+ + + + + + + + + + + + + + + + + + + + + +
+gcpCredsSecret
+ + +Kubernetes core/v1.SecretKeySelector + + +
+

GcpCredsSecret is the credential to use to poll the GCP PubSub Subscription. It is not used +to create or delete the Subscription, only to poll it. The value of the secret entry must be +a service account key in the JSON format (see +https://cloud.google.com/iam/docs/creating-managing-service-account-keys).

+
+googleCloudProject
+ +string + +
+

GoogleCloudProject is the ID of the Google Cloud Project that the PubSub Topic exists in.

+
+topic
+ +string + +
+

Topic is the ID of the GCP PubSub Topic to Subscribe to. It must be in the form of the +unique identifier within the project, not the entire name. E.g. it must be ‘laconia’, not +‘projects/my-gcp-project/topics/laconia’.

+
+sink
+ + +Kubernetes core/v1.ObjectReference + + +
+(Optional) +

Sink is a reference to an object that will resolve to a domain name to use as the sink.

+
+serviceAccountName
+ +string + +
+

ServiceAccoutName is the name of the ServiceAccount that will be used to run the Receive +Adapter Deployment.

+
+
+status
+ + +GcpPubSubSourceStatus + + +
+
+

GitHubSource +

+

+

GitHubSource is the Schema for the githubsources API

+

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+apiVersion
+string
+ +sources.eventing.knative.dev/v1alpha1 + +
+kind
+string +
GitHubSource
+metadata
+ + +Kubernetes meta/v1.ObjectMeta + + +
+Refer to the Kubernetes API documentation for the fields of the +metadata field. +
+spec
+ + +GitHubSourceSpec + + +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+serviceAccountName
+ +string + +
+(Optional) +

ServiceAccountName holds the name of the Kubernetes service account +as which the underlying K8s resources should be run. If unspecified +this will default to the “default” service account for the namespace +in which the GitHubSource exists.

+
+ownerAndRepository
+ +string + +
+

OwnerAndRepository is the GitHub owner/org and repository to +receive events from. The repository may be left off to receive +events from an entire organization. +Examples: +myuser/project +myorganization

+
+eventTypes
+ +[]string + +
+

EventType is the type of event to receive from GitHub. These +correspond to the “Webhook event name” values listed at +https://developer.github.com/v3/activity/events/types/ - ie +“pull_request”

+
+accessToken
+ + +SecretValueFromSource + + +
+

AccessToken is the Kubernetes secret containing the GitHub +access token

+
+secretToken
+ + +SecretValueFromSource + + +
+

SecretToken is the Kubernetes secret containing the GitHub +secret token

+
+sink
+ + +Kubernetes core/v1.ObjectReference + + +
+(Optional) +

Sink is a reference to an object that will resolve to a domain +name to use as the sink.

+
+
+status
+ + +GitHubSourceStatus + + +
+
+

KubernetesEventSource +

+

+

KubernetesEventSource is the Schema for the kuberneteseventsources API

+

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+apiVersion
+string
+ +sources.eventing.knative.dev/v1alpha1 + +
+kind
+string +
KubernetesEventSource
+metadata
+ + +Kubernetes meta/v1.ObjectMeta + + +
+Refer to the Kubernetes API documentation for the fields of the +metadata field. +
+spec
+ + +KubernetesEventSourceSpec + + +
+
+
+ + + + + + + + + + + + + +
+namespace
+ +string + +
+

Namespace that we watch kubernetes events in.

+
+serviceAccountName
+ +string + +
+(Optional) +

ServiceAccountName is the name of the ServiceAccount to use to run this +source.

+
+sink
+ + +Kubernetes core/v1.ObjectReference + + +
+(Optional) +

Sink is a reference to an object that will resolve to a domain name to use +as the sink.

+
+
+status
+ + +KubernetesEventSourceStatus + + +
+
+

ContainerSourceSpec +

+

+(Appears on: +ContainerSource) +

+

+

ContainerSourceSpec defines the desired state of ContainerSource

+

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+image
+ +string + +
+

Image is the image to run inside of the container.

+
+args
+ +[]string + +
+

Args are passed to the ContainerSpec as they are.

+
+env
+ + +[]Kubernetes core/v1.EnvVar + + +
+(Optional) +

Env is the list of environment variables to set in the container. +Cannot be updated.

+
+serviceAccountName
+ +string + +
+(Optional) +

ServiceAccountName is the name of the ServiceAccount to use to run this +source.

+
+sink
+ + +Kubernetes core/v1.ObjectReference + + +
+(Optional) +

Sink is a reference to an object that will resolve to a domain name to use as the sink.

+
+

ContainerSourceStatus +

+

+(Appears on: +ContainerSource) +

+

+

ContainerSourceStatus defines the observed state of ContainerSource

+

+ + + + + + + + + + + + + + + + + +
FieldDescription
+conditions
+ + +github.com/knative/pkg/apis/duck/v1alpha1.Conditions + + +
+(Optional) +

Conditions holds the state of a source at a point in time.

+
+sinkUri
+ +string + +
+(Optional) +

SinkURI is the current active sink URI that has been configured for the ContainerSource.

+
+

GcpPubSubSourceSpec +

+

+(Appears on: +GcpPubSubSource) +

+

+

GcpPubSubSourceSpec defines the desired state of the GcpPubSubSource.

+

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+gcpCredsSecret
+ + +Kubernetes core/v1.SecretKeySelector + + +
+

GcpCredsSecret is the credential to use to poll the GCP PubSub Subscription. It is not used +to create or delete the Subscription, only to poll it. The value of the secret entry must be +a service account key in the JSON format (see +https://cloud.google.com/iam/docs/creating-managing-service-account-keys).

+
+googleCloudProject
+ +string + +
+

GoogleCloudProject is the ID of the Google Cloud Project that the PubSub Topic exists in.

+
+topic
+ +string + +
+

Topic is the ID of the GCP PubSub Topic to Subscribe to. It must be in the form of the +unique identifier within the project, not the entire name. E.g. it must be ‘laconia’, not +‘projects/my-gcp-project/topics/laconia’.

+
+sink
+ + +Kubernetes core/v1.ObjectReference + + +
+(Optional) +

Sink is a reference to an object that will resolve to a domain name to use as the sink.

+
+serviceAccountName
+ +string + +
+

ServiceAccoutName is the name of the ServiceAccount that will be used to run the Receive +Adapter Deployment.

+
+

GcpPubSubSourceStatus +

+

+(Appears on: +GcpPubSubSource) +

+

+

GcpPubSubSourceStatus defines the observed state of GcpPubSubSource.

+

+ + + + + + + + + + + + + + + + + +
FieldDescription
+conditions
+ + +github.com/knative/pkg/apis/duck/v1alpha1.Conditions + + +
+(Optional) +

Conditions holds the state of a source at a point in time.

+
+sinkUri
+ +string + +
+(Optional) +

SinkURI is the current active sink URI that has been configured for the GcpPubSubSource.

+
+

GitHubSourceSpec +

+

+(Appears on: +GitHubSource) +

+

+

GitHubSourceSpec defines the desired state of GitHubSource

+

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+serviceAccountName
+ +string + +
+(Optional) +

ServiceAccountName holds the name of the Kubernetes service account +as which the underlying K8s resources should be run. If unspecified +this will default to the “default” service account for the namespace +in which the GitHubSource exists.

+
+ownerAndRepository
+ +string + +
+

OwnerAndRepository is the GitHub owner/org and repository to +receive events from. The repository may be left off to receive +events from an entire organization. +Examples: +myuser/project +myorganization

+
+eventTypes
+ +[]string + +
+

EventType is the type of event to receive from GitHub. These +correspond to the “Webhook event name” values listed at +https://developer.github.com/v3/activity/events/types/ - ie +“pull_request”

+
+accessToken
+ + +SecretValueFromSource + + +
+

AccessToken is the Kubernetes secret containing the GitHub +access token

+
+secretToken
+ + +SecretValueFromSource + + +
+

SecretToken is the Kubernetes secret containing the GitHub +secret token

+
+sink
+ + +Kubernetes core/v1.ObjectReference + + +
+(Optional) +

Sink is a reference to an object that will resolve to a domain +name to use as the sink.

+
+

GitHubSourceStatus +

+

+(Appears on: +GitHubSource) +

+

+

GitHubSourceStatus defines the observed state of GitHubSource

+

+ + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+conditions
+ + +github.com/knative/pkg/apis/duck/v1alpha1.Conditions + + +
+(Optional) +

Conditions holds the state of a source at a point in time.

+
+webhookIDKey
+ +string + +
+

WebhookIDKey is the ID of the webhook registered with GitHub

+
+sinkUri
+ +string + +
+(Optional) +

SinkURI is the current active sink URI that has been configured +for the GitHubSource.

+
+

KubernetesEventSourceSpec +

+

+(Appears on: +KubernetesEventSource) +

+

+

KubernetesEventSourceSpec defines the desired state of the source.

+

+ + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+namespace
+ +string + +
+

Namespace that we watch kubernetes events in.

+
+serviceAccountName
+ +string + +
+(Optional) +

ServiceAccountName is the name of the ServiceAccount to use to run this +source.

+
+sink
+ + +Kubernetes core/v1.ObjectReference + + +
+(Optional) +

Sink is a reference to an object that will resolve to a domain name to use +as the sink.

+
+

KubernetesEventSourceStatus +

+

+(Appears on: +KubernetesEventSource) +

+

+

KubernetesEventSourceStatus defines the observed state of the source.

+

+ + + + + + + + + + + + + + + + + +
FieldDescription
+conditions
+ + +github.com/knative/pkg/apis/duck/v1alpha1.Conditions + + +
+(Optional) +

Conditions holds the state of a source at a point in time.

+
+sinkUri
+ +string + +
+(Optional) +

SinkURI is the current active sink URI that has been configured for the source.

+
+

SecretValueFromSource +

+

+(Appears on: +GitHubSourceSpec) +

+

+

SecretValueFromSource represents the source of a secret value

+

+ + + + + + + + + + + + + +
FieldDescription
+secretKeyRef
+ + +Kubernetes core/v1.SecretKeySelector + + +
+

The Secret key to select from.

+
+
+

+Generated with gen-crd-api-reference-docs +on git commit 9741f15. +

diff --git a/reference/eventing/eventing.md b/reference/eventing/eventing.md new file mode 100644 index 000000000..127a02477 --- /dev/null +++ b/reference/eventing/eventing.md @@ -0,0 +1,1127 @@ +

Packages:

+ +

duck.knative.dev

+

+

Package v1alpha1 is the v1alpha1 version of the API.

+

+Resource Types: + +

Channel +

+

+

Channel is a skeleton type wrapping Subscribable in the manner we expect resource writers +defining compatible resources to embed it. We will typically use this type to deserialize +Channel ObjectReferences and access the Subscription data. This is not a real resource.

+

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

ChannelSpec is the part where Subscribable object is +configured as to be compatible with Subscribable contract.

+
+
+ + + + + +
+subscribable
+ + +Subscribable + + +
+
+
+

ChannelSpec +

+

+(Appears on: +Channel) +

+

+

ChannelSpec shows how we expect folks to embed Subscribable in their Spec field.

+

+ + + + + + + + + + + + + +
FieldDescription
+subscribable
+ + +Subscribable + + +
+
+

ChannelSubscriberSpec +

+

+(Appears on: +Subscribable) +

+

+

ChannelSubscriberSpec defines a single subscriber to a Channel. +Ref is a reference to the Subscription this ChannelSubscriberSpec was created for +SubscriberURI is the endpoint for the subscriber +ReplyURI is the endpoint for the reply +At least one of SubscriberURI and ReplyURI must be present

+

+ + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+ref
+ + +Kubernetes core/v1.ObjectReference + + +
+(Optional) +
+subscriberURI
+ +string + +
+(Optional) +
+replyURI
+ +string + +
+(Optional) +
+

Subscribable +

+

+(Appears on: +ChannelSpec, +ChannelSpec) +

+

+

Subscribable is the schema for the subscribable portion of the spec +section of the resource.

+

+ + + + + + + + + + + + + +
FieldDescription
+subscribers
+ + +[]ChannelSubscriberSpec + + +
+

TODO: What is actually required here for Channel spec. +This is the list of subscriptions for this channel.

+
+
+

eventing.knative.dev

+

+

Package v1alpha1 is the v1alpha1 version of the API.

+

+Resource Types: + +

Channel +

+

+

Channel is an abstract resource that implements the Addressable contract. +The Provisioner provisions infrastructure to accepts events and +deliver to Subscriptions.

+

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+apiVersion
+string
+ +eventing.knative.dev/v1alpha1 + +
+kind
+string +
Channel
+metadata
+ + +Kubernetes meta/v1.ObjectMeta + + +
+(Optional) +Refer to the Kubernetes API documentation for the fields of the +metadata field. +
+spec
+ + +ChannelSpec + + +
+

Spec defines the desired state of the Channel.

+
+
+ + + + + + + + + + + + + + + + + +
+generation
+ +int64 + +
+(Optional) +

TODO: Generation does not work correctly with CRD. They are scrubbed +by the APIserver (https://github.com/kubernetes/kubernetes/issues/58778) +So, we add Generation here. Once that gets fixed, remove this and use +ObjectMeta.Generation instead.

+
+provisioner
+ + +Kubernetes core/v1.ObjectReference + + +
+

Provisioner defines the name of the Provisioner backing this channel.

+
+arguments
+ +k8s.io/apimachinery/pkg/runtime.RawExtension + +
+(Optional) +

Arguments defines the arguments to pass to the Provisioner which +provisions this Channel.

+
+subscribable
+ + +Subscribable + + +
+

Channel conforms to Duck type Subscribable.

+
+
+status
+ + +ChannelStatus + + +
+(Optional) +

Status represents the current state of the Channel. This data may be out of +date.

+
+

ClusterChannelProvisioner +

+

+

ClusterChannelProvisioner encapsulates a provisioning strategy for the +backing resources required to realize a particular resource type.

+

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+apiVersion
+string
+ +eventing.knative.dev/v1alpha1 + +
+kind
+string +
ClusterChannelProvisioner
+metadata
+ + +Kubernetes meta/v1.ObjectMeta + + +
+(Optional) +Refer to the Kubernetes API documentation for the fields of the +metadata field. +
+spec
+ + +ClusterChannelProvisionerSpec + + +
+

Spec defines the Types provisioned by this Provisioner.

+
+
+ + + + + +
+generation
+ +int64 + +
+(Optional) +

TODO: Generation does not work correctly with CRD. They are scrubbed +by the APIserver (https://github.com/kubernetes/kubernetes/issues/58778) +So, we add Generation here. Once that gets fixed, remove this and use +ObjectMeta.Generation instead.

+
+
+status
+ + +ClusterChannelProvisionerStatus + + +
+(Optional) +

Status is the current status of the Provisioner.

+
+

Subscription +

+

+

Subscription routes events received on a Channel to a DNS name and +corresponds to the subscriptions.channels.knative.dev CRD.

+

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+apiVersion
+string
+ +eventing.knative.dev/v1alpha1 + +
+kind
+string +
Subscription
+metadata
+ + +Kubernetes meta/v1.ObjectMeta + + +
+Refer to the Kubernetes API documentation for the fields of the +metadata field. +
+spec
+ + +SubscriptionSpec + + +
+
+
+ + + + + + + + + + + + + + + + + +
+generation
+ +int64 + +
+(Optional) +

TODO: Generation used to not work correctly with CRD. They were scrubbed +by the APIserver (https://github.com/kubernetes/kubernetes/issues/58778) +So, we add Generation here. Once the above bug gets rolled out to production +clusters, remove this and use ObjectMeta.Generation instead.

+
+channel
+ + +Kubernetes core/v1.ObjectReference + + +
+

Reference to a channel that will be used to create the subscription +for receiving events. The channel must have spec.subscriptions +list which will then be modified accordingly.

+

You can specify only the following fields of the ObjectReference: +- Kind +- APIVersion +- Name +Kind must be “Channel” and APIVersion must be +“eventing.knative.dev/v1alpha1”

+

This field is immutable. We have no good answer on what happens to +the events that are currently in the channel being consumed from +and what the semantics there should be. For now, you can always +delete the Subscription and recreate it to point to a different +channel, giving the user more control over what semantics should +be used (drain the channel first, possibly have events dropped, +etc.)

+
+subscriber
+ + +SubscriberSpec + + +
+(Optional) +

Subscriber is reference to (optional) function for processing events. +Events from the Channel will be delivered here and replies are +sent to a channel as specified by the Reply.

+
+reply
+ + +ReplyStrategy + + +
+(Optional) +

Reply specifies (optionally) how to handle events returned from +the Subscriber target.

+
+
+status
+ + +SubscriptionStatus + + +
+
+

ChannelProvisionerDefaulter +

+

+

ChannelProvisionerDefaulter sets the default Provisioner and Arguments on Channels that do not +specify any Provisioner.

+

+

ChannelSpec +

+

+(Appears on: +Channel) +

+

+

ChannelSpec specifies the Provisioner backing a channel and the configuration +arguments for a Channel.

+

+ + + + + + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+generation
+ +int64 + +
+(Optional) +

TODO: Generation does not work correctly with CRD. They are scrubbed +by the APIserver (https://github.com/kubernetes/kubernetes/issues/58778) +So, we add Generation here. Once that gets fixed, remove this and use +ObjectMeta.Generation instead.

+
+provisioner
+ + +Kubernetes core/v1.ObjectReference + + +
+

Provisioner defines the name of the Provisioner backing this channel.

+
+arguments
+ +k8s.io/apimachinery/pkg/runtime.RawExtension + +
+(Optional) +

Arguments defines the arguments to pass to the Provisioner which +provisions this Channel.

+
+subscribable
+ + +Subscribable + + +
+

Channel conforms to Duck type Subscribable.

+
+

ChannelStatus +

+

+(Appears on: +Channel) +

+

+

ChannelStatus represents the current state of a Channel.

+

+ + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+observedGeneration
+ +int64 + +
+(Optional) +

ObservedGeneration is the most recent generation observed for this Channel. +It corresponds to the Channel’s generation, which is updated on mutation by +the API Server. +TODO: The above comment is only true once +https://github.com/kubernetes/kubernetes/issues/58778 is fixed.

+
+address
+ + +github.com/knative/pkg/apis/duck/v1alpha1.Addressable + + +
+

Channel is Addressable. It currently exposes the endpoint as a +fully-qualified DNS name which will distribute traffic over the +provided targets from inside the cluster.

+

It generally has the form {channel}.{namespace}.svc.cluster.local

+
+conditions
+ + +github.com/knative/pkg/apis/duck/v1alpha1.Conditions + + +
+(Optional) +

Represents the latest available observations of a channel’s current state.

+
+

ClusterChannelProvisionerSpec +

+

+(Appears on: +ClusterChannelProvisioner) +

+

+

ClusterChannelProvisionerSpec is the spec for a ClusterChannelProvisioner resource.

+

+ + + + + + + + + + + + + +
FieldDescription
+generation
+ +int64 + +
+(Optional) +

TODO: Generation does not work correctly with CRD. They are scrubbed +by the APIserver (https://github.com/kubernetes/kubernetes/issues/58778) +So, we add Generation here. Once that gets fixed, remove this and use +ObjectMeta.Generation instead.

+
+

ClusterChannelProvisionerStatus +

+

+(Appears on: +ClusterChannelProvisioner) +

+

+

ClusterChannelProvisionerStatus is the status for a ClusterChannelProvisioner resource

+

+ + + + + + + + + + + + + + + + + +
FieldDescription
+conditions
+ + +github.com/knative/pkg/apis/duck/v1alpha1.Conditions + + +
+(Optional) +

Conditions holds the state of a cluster provisioner at a point in time.

+
+observedGeneration
+ +int64 + +
+(Optional) +

ObservedGeneration is the ‘Generation’ of the ClusterChannelProvisioner that +was last reconciled by the controller.

+
+

ReplyStrategy +

+

+(Appears on: +SubscriptionSpec) +

+

+

ReplyStrategy specifies the handling of the SubscriberSpec’s returned replies. +If no SubscriberSpec is specified, the identity function is assumed.

+

+ + + + + + + + + + + + + +
FieldDescription
+channel
+ + +Kubernetes core/v1.ObjectReference + + +
+(Optional) +

This object must be a Channel.

+

You can specify only the following fields of the ObjectReference: +- Kind +- APIVersion +- Name +Kind must be “Channel” and APIVersion must be +“eventing.knative.dev/v1alpha1”

+
+

SubscriberSpec +

+

+(Appears on: +SubscriptionSpec) +

+

+

SubscriberSpec specifies the reference to an object that’s expected to +provide the resolved target of the action. +Currently we inspect the objects Status and see if there’s a predefined +Status field that we will then use to dispatch events to be processed by +the target. Currently must resolve to a k8s service or Istio virtual +service. +Note that in the future we should try to utilize subresources (/resolve ?) to +make this cleaner, but CRDs do not support subresources yet, so we need +to rely on a specified Status field today. By relying on this behaviour +we can utilize a dynamic client instead of having to understand all +kinds of different types of objects. As long as they adhere to this +particular contract, they can be used as a Target.

+

This ensures that we can support external targets and for ease of use +we also allow for an URI to be specified. +There of course is also a requirement for the resolved SubscriberSpec to +behave properly at the data plane level. +TODO: Add a pointer to a real spec for this. +For now, this means: Receive an event payload, and respond with one of: +success and an optional response event, or failure. +Delivery failures may be retried by the channel

+

+ + + + + + + + + + + + + + + + + +
FieldDescription
+ref
+ + +Kubernetes core/v1.ObjectReference + + +
+(Optional) +

Reference to an object that will be used to find the target +endpoint, which should implement the Addressable duck type. +For example, this could be a reference to a Route resource +or a Knative Service resource. +TODO: Specify the required fields the target object must +have in the status. +You can specify only the following fields of the ObjectReference: +- Kind +- APIVersion +- Name

+
+dnsName
+ +string + +
+(Optional) +

Reference to a ‘known’ endpoint where no resolving is done. +http://k8s-service for example +http://myexternalhandler.example.com/foo/bar

+
+

SubscriptionSpec +

+

+(Appears on: +Subscription) +

+

+

SubscriptionSpec specifies the Channel for incoming events, a Subscriber target +for processing those events and where to put the result of the processing. Only +From (where the events are coming from) is always required. You can optionally +only Process the events (results in no output events) by leaving out the Result. +You can also perform an identity transformation on the invoming events by leaving +out the Subscriber and only specifying Result.

+

The following are all valid specifications: +channel –[subscriber]–> reply +Sink, no outgoing events: +channel – subscriber +no-op function (identity transformation): +channel –> reply

+

+ + + + + + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+generation
+ +int64 + +
+(Optional) +

TODO: Generation used to not work correctly with CRD. They were scrubbed +by the APIserver (https://github.com/kubernetes/kubernetes/issues/58778) +So, we add Generation here. Once the above bug gets rolled out to production +clusters, remove this and use ObjectMeta.Generation instead.

+
+channel
+ + +Kubernetes core/v1.ObjectReference + + +
+

Reference to a channel that will be used to create the subscription +for receiving events. The channel must have spec.subscriptions +list which will then be modified accordingly.

+

You can specify only the following fields of the ObjectReference: +- Kind +- APIVersion +- Name +Kind must be “Channel” and APIVersion must be +“eventing.knative.dev/v1alpha1”

+

This field is immutable. We have no good answer on what happens to +the events that are currently in the channel being consumed from +and what the semantics there should be. For now, you can always +delete the Subscription and recreate it to point to a different +channel, giving the user more control over what semantics should +be used (drain the channel first, possibly have events dropped, +etc.)

+
+subscriber
+ + +SubscriberSpec + + +
+(Optional) +

Subscriber is reference to (optional) function for processing events. +Events from the Channel will be delivered here and replies are +sent to a channel as specified by the Reply.

+
+reply
+ + +ReplyStrategy + + +
+(Optional) +

Reply specifies (optionally) how to handle events returned from +the Subscriber target.

+
+

SubscriptionStatus +

+

+(Appears on: +Subscription) +

+

+

SubscriptionStatus (computed) for a subscription

+

+ + + + + + + + + + + + + + + + + +
FieldDescription
+conditions
+ + +github.com/knative/pkg/apis/duck/v1alpha1.Conditions + + +
+

Represents the latest available observations of a subscription’s current state.

+
+physicalSubscription,omitEmpty
+ + +SubscriptionStatusPhysicalSubscription + + +
+

PhysicalSubscription is the fully resolved values that this Subscription represents.

+
+

SubscriptionStatusPhysicalSubscription +

+

+(Appears on: +SubscriptionStatus) +

+

+

SubscriptionStatusPhysicalSubscription represents the fully resolved values for this +Subscription.

+

+ + + + + + + + + + + + + + + + + +
FieldDescription
+subscriberURI,omitEmpty
+ +string + +
+

SubscriberURI is the fully resolved URI for spec.subscriber.

+
+replyURI,omitEmpty
+ +string + +
+

ReplyURI is the fully resolved URI for the spec.reply.

+
+
+

+Generated with gen-crd-api-reference-docs +on git commit 90852711. +

diff --git a/reference/gen-api-reference-docs.sh b/reference/gen-api-reference-docs.sh new file mode 100755 index 000000000..818379eff --- /dev/null +++ b/reference/gen-api-reference-docs.sh @@ -0,0 +1,165 @@ +#!/usr/bin/env bash +# +# This script is for generating API reference docs for Knative components. + +# Copyright 2018 Knative authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +set -euo pipefail + +SCRIPTDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +[[ -n "${DEBUG:-}" ]] && set -x + +REFDOCS_PKG="github.com/ahmetb/gen-crd-api-reference-docs" +REFDOCS_REPO="https://${REFDOCS_PKG}.git" +REFDOCS_VER="5c208a6" + +KNATIVE_SERVING_REPO="github.com/knative/serving" +KNATIVE_SERVING_COMMIT="v0.2.3" +KNATIVE_SERVING_OUT_FILE="reference/serving.md" + +KNATIVE_BUILD_REPO="github.com/knative/build" +KNATIVE_BUILD_COMMIT="v0.2.0" +KNATIVE_BUILD_OUT_FILE="reference/build.md" + +KNATIVE_EVENTING_REPO="github.com/knative/eventing" +KNATIVE_EVENTING_COMMIT="v0.2.1" +KNATIVE_EVENTING_OUT_FILE="reference/eventing/eventing.md" + +KNATIVE_EVENTING_SOURCES_REPO="github.com/knative/eventing-sources" +KNATIVE_EVENTING_SOURCES_COMMIT="v0.2.1" +KNATIVE_EVENTING_SOURCES_OUT_FILE="reference/eventing/eventing-sources.md" + +log() { + echo "$@" >&2 +} + +fail() { + log "error: $*" + exit 1 +} + +install_go_bin() { + local pkg + pkg="$1" + ( + cd "$(mktemp -d)" + go mod init tmp + go get -u "$pkg" + # will be downloaded to "$(go env GOPATH)/bin/$(basename $pkg)" + ) +} + +repo_tarball_url() { + local repo commit + repo="$1" + commit="$2" + echo "https://$repo/archive/$commit.tar.gz" +} + +dl_and_extract() { + # TODO(ahmetb) remove this function. no longer dl'ing tarballs since they + # won't have a .git dir to infer the commit ID from to be used by refdocs. + local url dest + url="$1" + dest="$2" + mkdir -p "${dest}" + curl -sSLf "$url" | tar zxf - --directory="$dest" --strip 1 +} + +clone_at_commit() { + local repo commit dest + repo="$1" + commit="$2" + dest="$3" + mkdir -p "${dest}" + git clone "${repo}" "${dest}" + git --git-dir="${dest}/.git" --work-tree="${dest}" checkout --detach --quiet "${commit}" +} + +gen_refdocs() { + local refdocs_bin gopath out_file repo_root + refdocs_bin="$1" + gopath="$2" + out_file="$3" + repo_root="$4" + + ( + cd "${repo_root}" + env GOPATH="${gopath}" "${refdocs_bin}" \ + -out-file "${gopath}/out/${out_file}" \ + -api-dir "./pkg/apis" \ + -config "${SCRIPTDIR}/knative-refdocs-gen-config.json" + ) +} + + +main() { + if [[ -n "${GOPATH:-}" ]]; then + fail "GOPATH should not be set." + fi + if ! command -v "go" 1>/dev/null ; then + fail "\"go\" is not in PATH" + fi + + # install and place the refdocs tool + local refdocs_bin refdocs_bin_expected refdocs_dir + refdocs_dir="$(mktemp -d)" + refdocs_bin="${refdocs_dir}/refdocs" + # clone repo for ./templates + git clone --quiet --depth=1 "${REFDOCS_REPO}" "${refdocs_dir}" + # install bin + install_go_bin "${REFDOCS_PKG}@${REFDOCS_VER}" + # move bin to final location + refdocs_bin_expected="$(go env GOPATH)/bin/$(basename ${REFDOCS_PKG})" + mv "${refdocs_bin_expected}" "${refdocs_bin}" + [[ ! -f "${refdocs_bin}" ]] && fail "refdocs failed to install" + + local clone_root + clone_root="$(mktemp -d)" + + local knative_serving_root + knative_serving_root="${clone_root}/src/${KNATIVE_SERVING_REPO}" + clone_at_commit "https://${KNATIVE_SERVING_REPO}.git" "${KNATIVE_SERVING_COMMIT}" \ + "${knative_serving_root}" + gen_refdocs "${refdocs_bin}" "${clone_root}" "${KNATIVE_SERVING_OUT_FILE}" \ + "${knative_serving_root}" + + local knative_build_root + knative_build_root="${clone_root}/src/${KNATIVE_BUILD_REPO}" + clone_at_commit "https://${KNATIVE_BUILD_REPO}.git" "${KNATIVE_BUILD_COMMIT}" \ + "${knative_build_root}" + gen_refdocs "${refdocs_bin}" "${clone_root}" "${KNATIVE_BUILD_OUT_FILE}" \ + "${knative_build_root}" + + local knative_eventing_root + knative_eventing_root="${clone_root}/src/${KNATIVE_EVENTING_REPO}" + clone_at_commit "https://${KNATIVE_EVENTING_REPO}.git" "${KNATIVE_EVENTING_COMMIT}" \ + "${knative_eventing_root}" + gen_refdocs "${refdocs_bin}" "${clone_root}" "${KNATIVE_EVENTING_OUT_FILE}" \ + "${knative_eventing_root}" + + local knative_eventing_sources_root + knative_eventing_sources_root="${clone_root}/src/${KNATIVE_EVENTING_SOURCES_REPO}" + clone_at_commit "https://${KNATIVE_EVENTING_SOURCES_REPO}.git" "${KNATIVE_EVENTING_SOURCES_COMMIT}" \ + "${knative_eventing_sources_root}" + gen_refdocs "${refdocs_bin}" "${clone_root}" "${KNATIVE_EVENTING_SOURCES_OUT_FILE}" \ + "${knative_eventing_sources_root}" + + log "Generated files written to ${clone_root}/out/." + if command -v open >/dev/null; then + open "${clone_root}/out/" + fi +} + +main "$@" diff --git a/reference/knative-refdocs-gen-config.json b/reference/knative-refdocs-gen-config.json new file mode 100644 index 000000000..e5fdbc706 --- /dev/null +++ b/reference/knative-refdocs-gen-config.json @@ -0,0 +1,28 @@ +{ + "hideMemberFields": [ + "TypeMeta" + ], + "hideTypePatterns": [ + "ParseError$", + "List$" + ], + "externalPackages": [ + { + "typeMatchPrefix": "^k8s\\.io/apimachinery/pkg/apis/meta/v1\\.Duration$", + "docsURLTemplate": "https://godoc.org/k8s.io/apimachinery/pkg/apis/meta/v1#Duration" + }, + { + "typeMatchPrefix": "^k8s\\.io/(api|apimachinery/pkg/apis)/", + "docsURLTemplate": "https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.13/#{{lower .TypeIdentifier}}-{{arrIndex .PackageSegments -1}}-{{arrIndex .PackageSegments -2}}" + }, + { + "typeMatchPrefix": "^github\\.com/knative/pkg/apis/duck/", + "docsURLTemplate": "https://godoc.org/github.com/knative/pkg/apis/duck/{{arrIndex .PackageSegments -1}}#{{.TypeIdentifier}}" + } + ], + "typeDisplayNamePrefixOverrides": { + "k8s.io/api/": "Kubernetes ", + "k8s.io/apimachinery/pkg/apis/": "Kubernetes " + }, + "markdownDisabled": false +} diff --git a/reference/serving.md b/reference/serving.md new file mode 100644 index 000000000..6202c01d0 --- /dev/null +++ b/reference/serving.md @@ -0,0 +1,2995 @@ +

Packages:

+ +

autoscaling.internal.knative.dev

+

+

+Resource Types: + +

PodAutoscaler +

+

+

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: +https://docs.google.com/presentation/d/10KWynvAJYuOEWy69VBa6bHJVCqIsz1TNdEKosNvcpPY/edit

+

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+apiVersion
+string
+ +autoscaling.internal.knative.dev/v1alpha1 + +
+kind
+string +
PodAutoscaler
+metadata
+ + +Kubernetes meta/v1.ObjectMeta + + +
+(Optional) +Refer to the Kubernetes API documentation for the fields of the +metadata field. +
+spec
+ + +PodAutoscalerSpec + + +
+(Optional) +

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

+
+
+ + + + + + + + + + + + + + + + + + + + + +
+generation
+ +int64 + +
+(Optional) +

TODO: Generation does not work correctly with CRD. They are scrubbed +by the APIserver (https://github.com/kubernetes/kubernetes/issues/58778) +So, we add Generation here. Once that gets fixed, remove this and use +ObjectMeta.Generation instead.

+
+concurrencyModel
+ + +RevisionRequestConcurrencyModelType + + +
+(Optional) +

ConcurrencyModel specifies the desired concurrency model +(Single or Multi) for the scale target. Defaults to Multi. +Deprecated in favor of ContainerConcurrency.

+
+containerConcurrency
+ + +RevisionContainerConcurrencyType + + +
+(Optional) +

ContainerConcurrency specifies the maximum allowed +in-flight (concurrent) requests per container of the Revision. +Defaults to 0 which means unlimited concurrency. +This field replaces ConcurrencyModel. A value of 1 +is equivalent to Single and 0 is equivalent to Multi.

+
+scaleTargetRef
+ + +Kubernetes autoscaling/v1.CrossVersionObjectReference + + +
+

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

+
+serviceName
+ +string + +
+

ServiceName holds the name of a core Kubernetes Service resource that +load balances over the pods referenced by the ScaleTargetRef.

+
+
+status
+ + +PodAutoscalerStatus + + +
+(Optional) +

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

+
+

PodAutoscalerSpec +

+

+(Appears on: +PodAutoscaler) +

+

+

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

+

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+generation
+ +int64 + +
+(Optional) +

TODO: Generation does not work correctly with CRD. They are scrubbed +by the APIserver (https://github.com/kubernetes/kubernetes/issues/58778) +So, we add Generation here. Once that gets fixed, remove this and use +ObjectMeta.Generation instead.

+
+concurrencyModel
+ + +RevisionRequestConcurrencyModelType + + +
+(Optional) +

ConcurrencyModel specifies the desired concurrency model +(Single or Multi) for the scale target. Defaults to Multi. +Deprecated in favor of ContainerConcurrency.

+
+containerConcurrency
+ + +RevisionContainerConcurrencyType + + +
+(Optional) +

ContainerConcurrency specifies the maximum allowed +in-flight (concurrent) requests per container of the Revision. +Defaults to 0 which means unlimited concurrency. +This field replaces ConcurrencyModel. A value of 1 +is equivalent to Single and 0 is equivalent to Multi.

+
+scaleTargetRef
+ + +Kubernetes autoscaling/v1.CrossVersionObjectReference + + +
+

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

+
+serviceName
+ +string + +
+

ServiceName holds the name of a core Kubernetes Service resource that +load balances over the pods referenced by the ScaleTargetRef.

+
+

PodAutoscalerStatus +

+

+(Appears on: +PodAutoscaler) +

+

+

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

+

+ + + + + + + + + + + + + +
FieldDescription
+conditions
+ + +github.com/knative/pkg/apis/duck/v1alpha1.Conditions + + +
+(Optional) +

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

+
+
+

networking.internal.knative.dev

+

+

+Resource Types: + +

ClusterIngress +

+

+

ClusterIngress is a collection of rules that allow inbound connections to reach the +endpoints defined by a backend. An ClusterIngress can be configured to give services +externally-reachable urls, load balance traffic offer name based virtual hosting etc.

+

This is heavily based on K8s Ingress https://godoc.org/k8s.io/api/extensions/v1beta1#Ingress +which some highlighted modifications.

+

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+apiVersion
+string
+ +networking.internal.knative.dev/v1alpha1 + +
+kind
+string +
ClusterIngress
+metadata
+ + +Kubernetes meta/v1.ObjectMeta + + +
+(Optional) +

Standard object’s metadata. +More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata

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

Spec is the desired state of the ClusterIngress. +More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status

+
+
+ + + + + + + + + + + + + +
+generation
+ +int64 + +
+(Optional) +

TODO: Generation does not work correctly with CRD. They are scrubbed +by the APIserver (https://github.com/kubernetes/kubernetes/issues/58778) +So, we add Generation here. Once that gets fixed, remove this and use +ObjectMeta.Generation instead.

+
+tls
+ + +[]ClusterIngressTLS + + +
+(Optional) +

TLS configuration. Currently the ClusterIngress only supports a single TLS +port, 443. If multiple members of this list specify different hosts, they +will be multiplexed on the same port according to the hostname specified +through the SNI TLS extension, if the ingress controller fulfilling the +ingress supports SNI.

+
+rules
+ + +[]ClusterIngressRule + + +
+(Optional) +

A list of host rules used to configure the ClusterIngress.

+
+
+status
+ + +IngressStatus + + +
+(Optional) +

Status is the current state of the ClusterIngress. +More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status

+
+

ClusterIngressBackend +

+

+(Appears on: +ClusterIngressBackendSplit) +

+

+

ClusterIngressBackend describes all endpoints for a given service and port.

+

+ + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+serviceNamespace
+ +string + +
+

Specifies the namespace of the referenced service.

+

NOTE: This differs from K8s Ingress to allow routing to different namespaces.

+
+serviceName
+ +string + +
+

Specifies the name of the referenced service.

+
+servicePort
+ +k8s.io/apimachinery/pkg/util/intstr.IntOrString + +
+

Specifies the port of the referenced service.

+
+

ClusterIngressBackendSplit +

+

+(Appears on: +HTTPClusterIngressPath) +

+

+

ClusterIngressBackend describes all endpoints for a given service and port.

+

+ + + + + + + + + + + + + + + + + +
FieldDescription
+ClusterIngressBackend
+ + +ClusterIngressBackend + + +
+

+(Members of ClusterIngressBackend are embedded into this type.) +

+

Specifies the backend receiving the traffic split.

+
+percent
+ +int + +
+

Specifies the split percentage, a number between 0 and 100. If +only one split is specified, we default to 100.

+

NOTE: This differs from K8s Ingress to allow percentage split.

+
+

ClusterIngressRule +

+

+(Appears on: +IngressSpec) +

+

+

ClusterIngressRule represents the rules mapping the paths under a specified host to +the related backend services. Incoming requests are first evaluated for a host +match, then routed to the backend associated with the matching ClusterIngressRuleValue.

+

+ + + + + + + + + + + + + + + + + +
FieldDescription
+hosts
+ +[]string + +
+(Optional) +

Host is the fully qualified domain name of a network host, as defined +by RFC 3986. Note the following deviations from the “host” part of the +URI as defined in the RFC: +1. IPs are not allowed. Currently a rule value can only apply to the +IP in the Spec of the parent ClusterIngress. +2. The : delimiter is not respected because ports are not allowed. +Currently the port of an ClusterIngress is implicitly :80 for http and +:443 for https. +Both these may change in the future. +If the host is unspecified, the ClusterIngress routes all traffic based on the +specified ClusterIngressRuleValue. +If multiple matching Hosts were provided, the first rule will take precedent.

+
+http
+ + +HTTPClusterIngressRuleValue + + +
+

HTTP represents a rule to apply against incoming requests. If the +rule is satisfied, the request is routed to the specified backend.

+
+

ClusterIngressTLS +

+

+(Appears on: +IngressSpec) +

+

+

ClusterIngressTLS describes the transport layer security associated with an ClusterIngress.

+

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+hosts
+ +[]string + +
+(Optional) +

Hosts are a list of hosts included in the TLS certificate. The values in +this list must match the name/s used in the tlsSecret. Defaults to the +wildcard host setting for the loadbalancer controller fulfilling this +ClusterIngress, if left unspecified.

+
+secretName
+ +string + +
+

SecretName is the name of the secret used to terminate SSL traffic.

+
+secretNamespace
+ +string + +
+

SecretNamespace is the namespace of the secret used to terminate SSL traffic.

+
+serverCertificate
+ +string + +
+(Optional) +

ServerCertificate identifies the certificate filename in the secret. +Defaults to tls.cert.

+
+privateKey
+ +string + +
+(Optional) +

PrivateKey identifies the private key filename in the secret. +Defaults to tls.key.

+
+

HTTPClusterIngressPath +

+

+(Appears on: +HTTPClusterIngressRuleValue) +

+

+

HTTPClusterIngressPath associates a path regex with a backend. Incoming urls matching +the path are forwarded to the backend.

+

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+path
+ +string + +
+(Optional) +

Path is an extended POSIX regex as defined by IEEE Std 1003.1, +(i.e this follows the egrep/unix syntax, not the perl syntax) +matched against the path of an incoming request. Currently it can +contain characters disallowed from the conventional “path” +part of a URL as defined by RFC 3986. Paths must begin with +a ‘/’. If unspecified, the path defaults to a catch all sending +traffic to the backend.

+
+splits
+ + +[]ClusterIngressBackendSplit + + +
+

Splits defines the referenced service endpoints to which the traffic +will be forwarded to.

+
+appendHeaders
+ +map[string]string + +
+(Optional) +

AppendHeaders allow specifying additional HTTP headers to add +before forwarding a request to the destination service.

+

NOTE: This differs from K8s Ingress which doesn’t allow header appending.

+
+timeout
+ + +Kubernetes meta/v1.Duration + + +
+(Optional) +

Timeout for HTTP requests.

+

NOTE: This differs from K8s Ingress which doesn’t allow setting timeouts.

+
+retries
+ + +HTTPRetry + + +
+(Optional) +

Retry policy for HTTP requests.

+

NOTE: This differs from K8s Ingress which doesn’t allow retry settings.

+
+

HTTPClusterIngressRuleValue +

+

+(Appears on: +ClusterIngressRule) +

+

+

HTTPClusterIngressRuleValue is a list of http selectors pointing to backends. +In the example: http:///? -> backend where +where parts of the url correspond to RFC 3986, this resource will be used +to match against everything after the last ‘/’ and before the first ‘?’ +or ‘#’.

+

+ + + + + + + + + + + + + +
FieldDescription
+paths
+ + +[]HTTPClusterIngressPath + + +
+

A collection of paths that map requests to backends.

+

If they are multiple matching paths, the first match takes precendent.

+
+

HTTPRetry +

+

+(Appears on: +HTTPClusterIngressPath) +

+

+

HTTPRetry describes the retry policy to use when a HTTP request fails.

+

+ + + + + + + + + + + + + + + + + +
FieldDescription
+attempts
+ +int + +
+

Number of retries for a given request.

+
+perTryTimeout
+ + +Kubernetes meta/v1.Duration + + +
+

Timeout per retry attempt for a given request. format: 1h/1m/1s/1ms. MUST BE >=1ms.

+
+

IngressSpec +

+

+(Appears on: +ClusterIngress) +

+

+

IngressSpec describes the ClusterIngress the user wishes to exist.

+

In general this follow the same shape as K8s Ingress. Some notable differences: +- Backends now can have namespace: +- Traffic can be split across multiple backends. +- Timeout & Retry can be configured. +- Headers can be appended.

+

+ + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+generation
+ +int64 + +
+(Optional) +

TODO: Generation does not work correctly with CRD. They are scrubbed +by the APIserver (https://github.com/kubernetes/kubernetes/issues/58778) +So, we add Generation here. Once that gets fixed, remove this and use +ObjectMeta.Generation instead.

+
+tls
+ + +[]ClusterIngressTLS + + +
+(Optional) +

TLS configuration. Currently the ClusterIngress only supports a single TLS +port, 443. If multiple members of this list specify different hosts, they +will be multiplexed on the same port according to the hostname specified +through the SNI TLS extension, if the ingress controller fulfilling the +ingress supports SNI.

+
+rules
+ + +[]ClusterIngressRule + + +
+(Optional) +

A list of host rules used to configure the ClusterIngress.

+
+

IngressStatus +

+

+(Appears on: +ClusterIngress) +

+

+

IngressStatus describe the current state of the ClusterIngress.

+

+ + + + + + + + + + + + + + + + + +
FieldDescription
+conditions
+ + +github.com/knative/pkg/apis/duck/v1alpha1.Conditions + + +
+(Optional) +
+loadBalancer
+ + +LoadBalancerStatus + + +
+(Optional) +

LoadBalancer contains the current status of the load-balancer.

+
+

LoadBalancerIngressStatus +

+

+(Appears on: +LoadBalancerStatus) +

+

+

LoadBalancerIngress represents the status of a load-balancer ingress point: +traffic intended for the service should be sent to an ingress point.

+

+ + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+ip
+ +string + +
+(Optional) +

IP is set for load-balancer ingress points that are IP based +(typically GCE or OpenStack load-balancers)

+
+domain
+ +string + +
+(Optional) +

Domain is set for load-balancer ingress points that are DNS based +(typically AWS load-balancers)

+
+domainInternal
+ +string + +
+(Optional) +

DomainInternal is set if there is a cluster-local DNS name to access the Ingress.

+

NOTE: This differs from K8s Ingress, since we also desire to have a cluster-local +DNS name to allow routing in case of not having a mesh.

+
+

LoadBalancerStatus +

+

+(Appears on: +IngressStatus) +

+

+

LoadBalancerStatus represents the status of a load-balancer.

+

+ + + + + + + + + + + + + +
FieldDescription
+ingress
+ + +[]LoadBalancerIngressStatus + + +
+(Optional) +

Ingress is a list containing ingress points for the load-balancer. +Traffic intended for the service should be sent to these ingress points.

+
+
+

serving.knative.dev

+

+

+Resource Types: + +

Configuration +

+

+

Configuration represents the “floating HEAD” of a linear history of Revisions, +and optionally how the containers those revisions reference are built. +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: https://github.com/knative/serving/blob/master/docs/spec/overview.md#configuration

+

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

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

+
+
+ + + + + + + + + + + + + +
+generation
+ +int64 + +
+(Optional) +

TODO: Generation does not work correctly with CRD. They are scrubbed +by the APIserver (https://github.com/kubernetes/kubernetes/issues/58778) +So, we add Generation here. Once that gets fixed, remove this and use +ObjectMeta.Generation instead.

+
+build
+ + +RawExtension + + +
+(Optional) +

Build optionally holds the specification for the build to +perform to produce the Revision’s container image.

+
+revisionTemplate
+ + +RevisionTemplateSpec + + +
+(Optional) +

RevisionTemplate holds the latest specification for the Revision to +be stamped out. If a Build specification is provided, then the +RevisionTemplate’s BuildName field will be populated with the name of +the Build object created to produce the container for the Revision.

+
+
+status
+ + +ConfigurationStatus + + +
+(Optional) +

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

+
+

Revision +

+

+

Revision is an immutable snapshot of code and configuration. A revision +references a container image, and optionally a build that is responsible for +materializing that container image from source. Revisions are created by +updates to a Configuration.

+

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

+

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

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

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+generation
+ +int64 + +
+(Optional) +

TODO: Generation does not work correctly with CRD. They are scrubbed +by the APIserver (https://github.com/kubernetes/kubernetes/issues/58778) +So, we add Generation here. Once that gets fixed, remove this and use +ObjectMeta.Generation instead.

+
+servingState
+ + +DeprecatedRevisionServingStateType + + +
+(Optional) +

DeprecatedServingState holds a value describing the desired state the Kubernetes +resources should be in for this Revision. +Users must not specify this when creating a revision. These values are no longer +updated by the system.

+
+concurrencyModel
+ + +RevisionRequestConcurrencyModelType + + +
+(Optional) +

ConcurrencyModel specifies the desired concurrency model +(Single or Multi) for the +Revision. Defaults to Multi. +Deprecated in favor of ContainerConcurrency.

+
+containerConcurrency
+ + +RevisionContainerConcurrencyType + + +
+(Optional) +

ContainerConcurrency specifies the maximum allowed +in-flight (concurrent) requests per container of the Revision. +Defaults to 0 which means unlimited concurrency. +This field replaces ConcurrencyModel. A value of 1 +is equivalent to Single and 0 is equivalent to Multi.

+
+serviceAccountName
+ +string + +
+(Optional) +

ServiceAccountName holds the name of the Kubernetes service account +as which the underlying K8s resources should be run. If unspecified +this will default to the “default” service account for the namespace +in which the Revision exists. +This may be used to provide access to private container images by +following: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/#add-imagepullsecrets-to-a-service-account +TODO(ZhiminXiang): verify the corresponding service account exists.

+
+buildName
+ +string + +
+(Optional) +

BuildName optionally holds the name of the Build responsible for +producing the container image for its Revision. +DEPRECATED: Use BuildRef instead.

+
+buildRef
+ + +Kubernetes core/v1.ObjectReference + + +
+(Optional) +

BuildRef holds the reference to the build (if there is one) responsible +for producing the container image for this Revision. Otherwise, nil

+
+container
+ + +Kubernetes core/v1.Container + + +
+(Optional) +

Container defines the unit of execution for this Revision. +In the context of a Revision, we disallow a number of the fields of +this Container, including: name, resources, ports, and volumeMounts. +TODO(mattmoor): Link to the runtime contract tracked by: +https://github.com/knative/serving/issues/627

+
+
+status
+ + +RevisionStatus + + +
+(Optional) +

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

+
+

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

+

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+apiVersion
+string
+ +serving.knative.dev/v1alpha1 + +
+kind
+string +
Route
+metadata
+ + +Kubernetes meta/v1.ObjectMeta + + +
+(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).

+
+
+ + + + + + + + + +
+generation
+ +int64 + +
+(Optional) +

TODO: Generation does not work correctly with CRD. They are scrubbed +by the APIserver (https://github.com/kubernetes/kubernetes/issues/58778) +So, we add Generation here. Once that gets fixed, remove this and use +ObjectMeta.Generation instead.

+
+traffic
+ + +[]TrafficTarget + + +
+(Optional) +

Traffic specifies how to distribute traffic over a collection of Knative Serving 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 set of Routes and +Configurations 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.

+

The Service’s controller will track the statuses of its owned Configuration +and Route, reflecting their statuses and conditions as its own.

+

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

+

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

TODO: Generation does not work correctly with CRD. They are scrubbed +by the APIserver (https://github.com/kubernetes/kubernetes/issues/58778) +So, we add Generation here. Once that gets fixed, remove this and use +ObjectMeta.Generation instead.

+
+runLatest
+ + +RunLatestType + + +
+(Optional) +

RunLatest defines a simple Service. It will automatically +configure a route that keeps the latest ready revision +from the supplied configuration running.

+
+pinned
+ + +PinnedType + + +
+(Optional) +

Pins this service to a specific revision name. The revision must +be owned by the configuration provided. +PinnedType is DEPRECATED in favor of ReleaseType

+
+manual
+ + +ManualType + + +
+(Optional) +

Manual mode enables users to start managing the underlying Route and Configuration +resources directly. This advanced usage is intended as a path for users to graduate +from the limited capabilities of Service to the full power of Route.

+
+release
+ + +ReleaseType + + +
+(Optional) +

Release enables gradual promotion of new revisions by allowing traffic +to be split between two revisions. This type replaces the deprecated Pinned type.

+
+
+status
+ + +ServiceStatus + + +
+(Optional) +
+

ConfigurationSpec +

+

+(Appears on: +Configuration, +PinnedType, +ReleaseType, +RunLatestType) +

+

+

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

+

+ + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+generation
+ +int64 + +
+(Optional) +

TODO: Generation does not work correctly with CRD. They are scrubbed +by the APIserver (https://github.com/kubernetes/kubernetes/issues/58778) +So, we add Generation here. Once that gets fixed, remove this and use +ObjectMeta.Generation instead.

+
+build
+ + +RawExtension + + +
+(Optional) +

Build optionally holds the specification for the build to +perform to produce the Revision’s container image.

+
+revisionTemplate
+ + +RevisionTemplateSpec + + +
+(Optional) +

RevisionTemplate holds the latest specification for the Revision to +be stamped out. If a Build specification is provided, then the +RevisionTemplate’s BuildName field will be populated with the name of +the Build object created to produce the container for the Revision.

+
+

ConfigurationStatus +

+

+(Appears on: +Configuration) +

+

+

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

+

+ + + + + + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+conditions
+ + +github.com/knative/pkg/apis/duck/v1alpha1.Conditions + + +
+(Optional) +

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

+
+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.

+
+observedGeneration
+ +int64 + +
+(Optional) +

ObservedGeneration is the ‘Generation’ of the Configuration that +was last processed by the controller. The observed generation is updated +even if the controller failed to process the spec and create the Revision.

+
+

DeprecatedRevisionServingStateType +(string alias)

+

+(Appears on: +RevisionSpec) +

+

+

DeprecatedRevisionServingStateType is an enumeration of the levels of serving readiness of the Revision. +See also: https://github.com/knative/serving/blob/master/docs/spec/errors.md#error-conditions-and-reporting

+

+

ManualType +

+

+(Appears on: +ServiceSpec) +

+

+

ManualType contains the options for configuring a manual service. See ServiceSpec for +more details.

+

+

PinnedType +

+

+(Appears on: +ServiceSpec) +

+

+

PinnedType is DEPRECATED. ReleaseType should be used instead. To get the behavior of PinnedType set +ReleaseType.Revisions to []string{PinnedType.RevisionName} and ReleaseType.RolloutPercent to 0.

+

+ + + + + + + + + + + + + + + + + +
FieldDescription
+revisionName
+ +string + +
+(Optional) +

The revision name to pin this service to until changed +to a different service type.

+
+configuration
+ + +ConfigurationSpec + + +
+(Optional) +

The configuration for this service.

+
+

RawExtension +

+

+(Appears on: +ConfigurationSpec) +

+

+

RawExtension is modeled after runtime.RawExtension, and should be +replaced with it (or an alias) once we can stop supporting embedded +BuildSpecs.

+

+ + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+Raw
+ +[]byte + +
+

Field order is the precedence for JSON marshaling if multiple +fields are set.

+
+Object
+ +k8s.io/apimachinery/pkg/runtime.Object + +
+
+BuildSpec
+ +github.com/knative/build/pkg/apis/build/v1alpha1.BuildSpec + +
+
+

ReleaseType +

+

+(Appears on: +ServiceSpec) +

+

+

ReleaseType contains the options for slowly releasing revisions. See ServiceSpec for +more details.

+

+ + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+revisions
+ +[]string + +
+(Optional) +

Revisions is an ordered list of 1 or 2 revisions. The first will +have a TrafficTarget with a name of “current” and the second will have +a name of “candidate”.

+
+rolloutPercent
+ +int + +
+(Optional) +

RolloutPercent is the percent of traffic that should be sent to the “candidate” +revision. Valid values are between 0 and 99 inclusive.

+
+configuration
+ + +ConfigurationSpec + + +
+(Optional) +

The configuration for this service. All revisions from this service must +come from a single configuration.

+
+

RevisionContainerConcurrencyType +(int64 alias)

+

+(Appears on: +PodAutoscalerSpec, +RevisionSpec) +

+

+

RevisionContainerConcurrencyType is an integer expressing a number of +in-flight (concurrent) requests.

+

+

RevisionRequestConcurrencyModelType +(string alias)

+

+(Appears on: +PodAutoscalerSpec, +RevisionSpec) +

+

+

RevisionRequestConcurrencyModelType is an enumeration of the +concurrency models supported by a Revision. +Deprecated in favor of RevisionContainerConcurrencyType.

+

+

RevisionSpec +

+

+(Appears on: +Revision, +RevisionTemplateSpec) +

+

+

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

+

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+generation
+ +int64 + +
+(Optional) +

TODO: Generation does not work correctly with CRD. They are scrubbed +by the APIserver (https://github.com/kubernetes/kubernetes/issues/58778) +So, we add Generation here. Once that gets fixed, remove this and use +ObjectMeta.Generation instead.

+
+servingState
+ + +DeprecatedRevisionServingStateType + + +
+(Optional) +

DeprecatedServingState holds a value describing the desired state the Kubernetes +resources should be in for this Revision. +Users must not specify this when creating a revision. These values are no longer +updated by the system.

+
+concurrencyModel
+ + +RevisionRequestConcurrencyModelType + + +
+(Optional) +

ConcurrencyModel specifies the desired concurrency model +(Single or Multi) for the +Revision. Defaults to Multi. +Deprecated in favor of ContainerConcurrency.

+
+containerConcurrency
+ + +RevisionContainerConcurrencyType + + +
+(Optional) +

ContainerConcurrency specifies the maximum allowed +in-flight (concurrent) requests per container of the Revision. +Defaults to 0 which means unlimited concurrency. +This field replaces ConcurrencyModel. A value of 1 +is equivalent to Single and 0 is equivalent to Multi.

+
+serviceAccountName
+ +string + +
+(Optional) +

ServiceAccountName holds the name of the Kubernetes service account +as which the underlying K8s resources should be run. If unspecified +this will default to the “default” service account for the namespace +in which the Revision exists. +This may be used to provide access to private container images by +following: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/#add-imagepullsecrets-to-a-service-account +TODO(ZhiminXiang): verify the corresponding service account exists.

+
+buildName
+ +string + +
+(Optional) +

BuildName optionally holds the name of the Build responsible for +producing the container image for its Revision. +DEPRECATED: Use BuildRef instead.

+
+buildRef
+ + +Kubernetes core/v1.ObjectReference + + +
+(Optional) +

BuildRef holds the reference to the build (if there is one) responsible +for producing the container image for this Revision. Otherwise, nil

+
+container
+ + +Kubernetes core/v1.Container + + +
+(Optional) +

Container defines the unit of execution for this Revision. +In the context of a Revision, we disallow a number of the fields of +this Container, including: name, resources, ports, and volumeMounts. +TODO(mattmoor): Link to the runtime contract tracked by: +https://github.com/knative/serving/issues/627

+
+

RevisionStatus +

+

+(Appears on: +Revision) +

+

+

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

+

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+serviceName
+ +string + +
+(Optional) +

ServiceName holds the name of a core Kubernetes Service resource that +load balances over the pods backing this Revision. When the Revision +is Active, this service would be an appropriate ingress target for +targeting the revision.

+
+conditions
+ + +github.com/knative/pkg/apis/duck/v1alpha1.Conditions + + +
+(Optional) +

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

+
+observedGeneration
+ +int64 + +
+(Optional) +

ObservedGeneration is the ‘Generation’ of the Configuration that +was last processed by the controller. The observed generation is updated +even if the controller failed to process the spec and create the Revision.

+
+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.

+
+imageDigest
+ +string + +
+(Optional) +

ImageDigest holds the resolved digest for the image specified +within .Spec.Container.Image. The digest is resolved during the creation +of Revision. This field holds the digest value regardless of whether +a tag or digest was originally specified in the Container object. It +may be empty if the image comes from a registry listed to skip resolution.

+
+

RevisionTemplateSpec +

+

+(Appears on: +ConfigurationSpec) +

+

+

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
+ + +Kubernetes meta/v1.ObjectMeta + + +
+(Optional) +Refer to the Kubernetes API documentation for the fields of the +metadata field. +
+spec
+ + +RevisionSpec + + +
+(Optional) +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+generation
+ +int64 + +
+(Optional) +

TODO: Generation does not work correctly with CRD. They are scrubbed +by the APIserver (https://github.com/kubernetes/kubernetes/issues/58778) +So, we add Generation here. Once that gets fixed, remove this and use +ObjectMeta.Generation instead.

+
+servingState
+ + +DeprecatedRevisionServingStateType + + +
+(Optional) +

DeprecatedServingState holds a value describing the desired state the Kubernetes +resources should be in for this Revision. +Users must not specify this when creating a revision. These values are no longer +updated by the system.

+
+concurrencyModel
+ + +RevisionRequestConcurrencyModelType + + +
+(Optional) +

ConcurrencyModel specifies the desired concurrency model +(Single or Multi) for the +Revision. Defaults to Multi. +Deprecated in favor of ContainerConcurrency.

+
+containerConcurrency
+ + +RevisionContainerConcurrencyType + + +
+(Optional) +

ContainerConcurrency specifies the maximum allowed +in-flight (concurrent) requests per container of the Revision. +Defaults to 0 which means unlimited concurrency. +This field replaces ConcurrencyModel. A value of 1 +is equivalent to Single and 0 is equivalent to Multi.

+
+serviceAccountName
+ +string + +
+(Optional) +

ServiceAccountName holds the name of the Kubernetes service account +as which the underlying K8s resources should be run. If unspecified +this will default to the “default” service account for the namespace +in which the Revision exists. +This may be used to provide access to private container images by +following: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/#add-imagepullsecrets-to-a-service-account +TODO(ZhiminXiang): verify the corresponding service account exists.

+
+buildName
+ +string + +
+(Optional) +

BuildName optionally holds the name of the Build responsible for +producing the container image for its Revision. +DEPRECATED: Use BuildRef instead.

+
+buildRef
+ + +Kubernetes core/v1.ObjectReference + + +
+(Optional) +

BuildRef holds the reference to the build (if there is one) responsible +for producing the container image for this Revision. Otherwise, nil

+
+container
+ + +Kubernetes core/v1.Container + + +
+(Optional) +

Container defines the unit of execution for this Revision. +In the context of a Revision, we disallow a number of the fields of +this Container, including: name, resources, ports, and volumeMounts. +TODO(mattmoor): Link to the runtime contract tracked by: +https://github.com/knative/serving/issues/627

+
+
+

RouteSpec +

+

+(Appears on: +Route) +

+

+

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

+

+ + + + + + + + + + + + + + + + + +
FieldDescription
+generation
+ +int64 + +
+(Optional) +

TODO: Generation does not work correctly with CRD. They are scrubbed +by the APIserver (https://github.com/kubernetes/kubernetes/issues/58778) +So, we add Generation here. Once that gets fixed, remove this and use +ObjectMeta.Generation instead.

+
+traffic
+ + +[]TrafficTarget + + +
+(Optional) +

Traffic specifies how to distribute traffic over a collection of Knative Serving Revisions and Configurations.

+
+

RouteStatus +

+

+(Appears on: +Route) +

+

+

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

+

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+domain
+ +string + +
+(Optional) +

Domain holds the top-level domain that will distribute traffic over the provided targets. +It generally has the form {route-name}.{route-namespace}.{cluster-level-suffix}

+
+domainInternal
+ +string + +
+(Optional) +

DomainInternal holds the top-level domain that will distribute traffic over the provided +targets from inside the cluster. It generally has the form +{route-name}.{route-namespace}.svc.cluster.local +DEPRECATED: Use Address instead.

+
+address
+ + +github.com/knative/pkg/apis/duck/v1alpha1.Addressable + + +
+(Optional) +

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

+
+traffic
+ + +[]TrafficTarget + + +
+(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.

+
+conditions
+ + +github.com/knative/pkg/apis/duck/v1alpha1.Conditions + + +
+(Optional) +

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

+
+observedGeneration
+ +int64 + +
+(Optional) +

ObservedGeneration is the ‘Generation’ of the Configuration that +was last processed by the controller. The observed generation is updated +even if the controller failed to process the spec and create the Revision.

+
+

RunLatestType +

+

+(Appears on: +ServiceSpec) +

+

+

RunLatestType contains the options for always having a route to the latest configuration. See +ServiceSpec for more details.

+

+ + + + + + + + + + + + + +
FieldDescription
+configuration
+ + +ConfigurationSpec + + +
+(Optional) +

The configuration for this service.

+
+

ServiceSpec +

+

+(Appears on: +Service) +

+

+

ServiceSpec represents the configuration for the Service object. Exactly one +of its members (other than Generation) must be specified. Services can either +track the latest ready revision of a configuration or be pinned to a specific +revision.

+

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+generation
+ +int64 + +
+(Optional) +

TODO: Generation does not work correctly with CRD. They are scrubbed +by the APIserver (https://github.com/kubernetes/kubernetes/issues/58778) +So, we add Generation here. Once that gets fixed, remove this and use +ObjectMeta.Generation instead.

+
+runLatest
+ + +RunLatestType + + +
+(Optional) +

RunLatest defines a simple Service. It will automatically +configure a route that keeps the latest ready revision +from the supplied configuration running.

+
+pinned
+ + +PinnedType + + +
+(Optional) +

Pins this service to a specific revision name. The revision must +be owned by the configuration provided. +PinnedType is DEPRECATED in favor of ReleaseType

+
+manual
+ + +ManualType + + +
+(Optional) +

Manual mode enables users to start managing the underlying Route and Configuration +resources directly. This advanced usage is intended as a path for users to graduate +from the limited capabilities of Service to the full power of Route.

+
+release
+ + +ReleaseType + + +
+(Optional) +

Release enables gradual promotion of new revisions by allowing traffic +to be split between two revisions. This type replaces the deprecated Pinned type.

+
+

ServiceStatus +

+

+(Appears on: +Service) +

+

+

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+conditions
+ + +github.com/knative/pkg/apis/duck/v1alpha1.Conditions + + +
+(Optional) +
+domain
+ +string + +
+(Optional) +

From RouteStatus. +Domain holds the top-level domain that will distribute traffic over the provided targets. +It generally has the form {route-name}.{route-namespace}.{cluster-level-suffix}

+
+domainInternal
+ +string + +
+(Optional) +

From RouteStatus. +DomainInternal holds the top-level domain that will distribute traffic over the provided +targets from inside the cluster. It generally has the form +{route-name}.{route-namespace}.svc.cluster.local +DEPRECATED: Use Address instead.

+
+address
+ + +github.com/knative/pkg/apis/duck/v1alpha1.Addressable + + +
+(Optional) +

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

+
+traffic
+ + +[]TrafficTarget + + +
+(Optional) +

From RouteStatus. +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.

+
+latestReadyRevisionName
+ +string + +
+(Optional) +

From ConfigurationStatus. +LatestReadyRevisionName holds the name of the latest Revision stamped out +from this Service’s Configuration that has had its “Ready” condition become “True”.

+
+latestCreatedRevisionName
+ +string + +
+(Optional) +

From ConfigurationStatus. +LatestCreatedRevisionName is the last revision that was created from this Service’s +Configuration. It might not be ready yet, for that use LatestReadyRevisionName.

+
+observedGeneration
+ +int64 + +
+(Optional) +

ObservedGeneration is the ‘Generation’ of the Service that +was last processed by the controller.

+
+

TrafficTarget +

+

+(Appears on: +RouteSpec, +RouteStatus, +ServiceStatus) +

+

+

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

+

+ + + + + + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+name
+ +string + +
+(Optional) +

Name is optionally used to expose a dedicated hostname for referencing this +target exclusively. It has the form: {name}.${route.status.domain}

+
+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.

+
+percent
+ +int + +
+

Percent specifies percent of the traffic to this Revision or Configuration. +This defaults to zero if unspecified.

+
+
+

+Generated with gen-crd-api-reference-docs +on git commit 5cbee406. +