- JSON representation
- Container
- EnvVar
- EnvVarSource
- ConfigMapKeySelector
- LocalObjectReference
- SecretKeySelector
- ResourceRequirements
- ContainerPort
- EnvFromSource
- ConfigMapEnvSource
- SecretEnvSource
- VolumeMount
- Probe
- ExecAction
- HTTPGetAction
- HTTPHeader
- TCPSocketAction
- SecurityContext
- Volume
- SecretVolumeSource
- KeyToPath
- ConfigMapVolumeSource
RevisionSpec holds the desired state of the Revision (from the client).
JSON representation | |
---|---|
{ "containerConcurrency": integer, "timeoutSeconds": integer, "serviceAccountName": string, "containers": [ { object ( |
Fields | |
---|---|
containerConcurrency |
(Optional) ContainerConcurrency specifies the maximum allowed in-flight (concurrent) requests per container instance of the Revision. Cloud Run fully managed: supported, defaults to 80 Cloud Run for Anthos: supported, defaults to 0, which means concurrency to the application is not limited, and the system decides the target concurrency for the autoscaler. |
timeoutSeconds |
TimeoutSeconds holds the max duration the instance is allowed for responding to a request. Cloud Run fully managed: defaults to 300 seconds (5 minutes). Maximum allowed value is 900 seconds (15 minutes). Cloud Run for Anthos: defaults to 300 seconds (5 minutes). Maximum allowed value is configurable by the cluster operator. |
serviceAccountName |
Email address of the IAM service account associated with the revision of the service. The service account represents the identity of the running revision, and determines what permissions the revision has. If not provided, the revision will use the project's default service account. |
containers[] |
Containers holds the single container that defines the unit of execution for this Revision. In the context of a Revision, we disallow a number of fields on this Container, including: name and lifecycle. In Cloud Run, only a single container may be provided. The runtime contract is documented here: https://github.com/knative/serving/blob/master/docs/runtime-contract.md |
volumes[] |
|
Container
A single application container. This specifies both the container to run, the command to run in the container and the arguments to supply to it. Note that additional arguments may be supplied by the system to the container at runtime.
JSON representation | |
---|---|
{ "name": string, "image": string, "command": [ string ], "args": [ string ], "env": [ { object ( |
Fields | |
---|---|
name |
(Optional) Name of the container specified as a DNS_LABEL. |
image |
Cloud Run fully managed: only supports containers from Google Container Registry Cloud Run for Anthos: supported URL of the Container image. More info: https://kubernetes.io/docs/concepts/containers/images |
command[] |
|
args[] |
(Optional) Cloud Run fully managed: supported Cloud Run for Anthos: supported Arguments to the entrypoint. The docker image's CMD is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell |
env[] |
(Optional) Cloud Run fully managed: supported Cloud Run for Anthos: supported List of environment variables to set in the container. |
resources |
(Optional) Cloud Run fully managed: supported Cloud Run for Anthos: supported Compute Resources required by this container. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources |
workingDir |
(Optional) Cloud Run fully managed: not supported Cloud Run for Anthos: supported Container's working directory. If not specified, the container runtime's default will be used, which might be configured in the container image. |
ports[] |
(Optional) List of ports to expose from the container. Only a single port can be specified. The specified ports must be listening on all interfaces (0.0.0.0) within the container to be accessible. If omitted, a port number will be chosen and passed to the container through the PORT environment variable for the container to listen on. |
envFrom[] |
(Optional) Cloud Run fully managed: not supported Cloud Run for Anthos: supported List of sources to populate environment variables in the container. The keys defined within a source must be a C_IDENTIFIER. All invalid keys will be reported as an event when the container is starting. When a key exists in multiple sources, the value associated with the last source will take precedence. Values defined by an Env with a duplicate key will take precedence. Cannot be updated. |
volumeMounts[] |
(Optional) Cloud Run fully managed: not supported Cloud Run for Anthos: supported Pod volumes to mount into the container's filesystem. |
livenessProbe |
(Optional) Cloud Run fully managed: not supported Cloud Run for Anthos: supported Periodic probe of container liveness. Container will be restarted if the probe fails. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes |
readinessProbe |
(Optional) Cloud Run fully managed: not supported Cloud Run for Anthos: supported Periodic probe of container service readiness. Container will be removed from service endpoints if the probe fails. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes |
terminationMessagePath |
(Optional) Cloud Run fully managed: not supported Cloud Run for Anthos: supported Path at which the file to which the container's termination message will be written is mounted into the container's filesystem. Message written is intended to be brief final status, such as an assertion failure message. Will be truncated by the node if greater than 4096 bytes. The total message length across all containers will be limited to 12kb. Defaults to /dev/termination-log. |
terminationMessagePolicy |
(Optional) Cloud Run fully managed: not supported Cloud Run for Anthos: supported Indicate how the termination message should be populated. File will use the contents of terminationMessagePath to populate the container status message on both success and failure. FallbackToLogsOnError will use the last chunk of container log output if the termination message file is empty and the container exited with an error. The log output is limited to 2048 bytes or 80 lines, whichever is smaller. Defaults to File. Cannot be updated. |
imagePullPolicy |
(Optional) Cloud Run fully managed: not supported Cloud Run for Anthos: supported Image pull policy. One of Always, Never, IfNotPresent. Defaults to Always if :latest tag is specified, or IfNotPresent otherwise. More info: https://kubernetes.io/docs/concepts/containers/images#updating-images |
securityContext |
(Optional) Cloud Run fully managed: not supported Cloud Run for Anthos: supported Security options the pod should run with. More info: https://kubernetes.io/docs/concepts/policy/security-context/ More info: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ |
EnvVar
EnvVar represents an environment variable present in a Container.
JSON representation | |
---|---|
{
"name": string,
"value": string,
"valueFrom": {
object ( |
Fields | |
---|---|
name |
Name of the environment variable. Must be a C_IDENTIFIER. |
value |
(Optional) Variable references $(VAR_NAME) are expanded using the previous defined environment variables in the container and any route environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to "". |
valueFrom |
(Optional) Cloud Run fully managed: not supported Cloud Run for Anthos: supported Source for the environment variable's value. Cannot be used if value is not empty. |
EnvVarSource
Cloud Run fully managed: not supported
Cloud Run for Anthos: supported
EnvVarSource represents a source for the value of an EnvVar.
JSON representation | |
---|---|
{ "configMapKeyRef": { object ( |
Fields | |
---|---|
configMapKeyRef |
(Optional) Cloud Run fully managed: not supported Cloud Run for Anthos: supported Selects a key of a ConfigMap. |
secretKeyRef |
(Optional) Cloud Run fully managed: not supported Cloud Run for Anthos: supported Selects a key of a secret in the pod's namespace |
ConfigMapKeySelector
Cloud Run fully managed: not supported
Cloud Run for Anthos: supported
Selects a key from a ConfigMap.
JSON representation | |
---|---|
{
"localObjectReference": {
object ( |
Fields | |
---|---|
localObjectReference |
This field should not be used directly as it is meant to be inlined directly into the message. Use the "name" field instead. |
key |
Cloud Run fully managed: not supported Cloud Run for Anthos: supported The key to select. |
optional |
(Optional) Cloud Run fully managed: not supported Cloud Run for Anthos: supported Specify whether the ConfigMap or its key must be defined |
name |
Cloud Run fully managed: not supported Cloud Run for Anthos: supported The ConfigMap to select from. |
LocalObjectReference
Cloud Run fully managed: not supported
Cloud Run for Anthos: supported
LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace.
JSON representation | |
---|---|
{ "name": string } |
Fields | |
---|---|
name |
(Optional) Cloud Run fully managed: not supported Cloud Run for Anthos: supported Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names |
SecretKeySelector
Cloud Run fully managed: not supported
Cloud Run for Anthos: supported
SecretKeySelector selects a key of a Secret.
JSON representation | |
---|---|
{
"localObjectReference": {
object ( |
Fields | |
---|---|
localObjectReference |
This field should not be used directly as it is meant to be inlined directly into the message. Use the "name" field instead. |
key |
Cloud Run fully managed: not supported Cloud Run for Anthos: supported The key of the secret to select from. Must be a valid secret key. |
optional |
(Optional) Cloud Run fully managed: not supported Cloud Run for Anthos: supported Specify whether the Secret or its key must be defined |
name |
Cloud Run fully managed: not supported Cloud Run for Anthos: supported The name of the secret in the pod's namespace to select from. |
ResourceRequirements
ResourceRequirements describes the compute resource requirements.
JSON representation | |
---|---|
{ "limits": { string: string, ... }, "requests": { string: string, ... } } |
Fields | |
---|---|
limits |
(Optional) Cloud Run fully managed: Only memory and CPU are supported. Note: The only supported values for CPU are '1', '2', and '4'. Setting 4 CPU requires at least 2Gi of memory. Cloud Run for Anthos: supported Limits describes the maximum amount of compute resources allowed. The values of the map is string form of the 'quantity' k8s type: https://github.com/kubernetes/kubernetes/blob/master/staging/src/k8s.io/apimachinery/pkg/api/resource/quantity.go An object containing a list of |
requests |
(Optional) Cloud Run fully managed: Only memory and CPU are supported. Note: The only supported values for CPU are '1' and '2'. Cloud Run for Anthos: supported Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value. The values of the map is string form of the 'quantity' k8s type: https://github.com/kubernetes/kubernetes/blob/master/staging/src/k8s.io/apimachinery/pkg/api/resource/quantity.go An object containing a list of |
ContainerPort
ContainerPort represents a network port in a single container.
JSON representation | |
---|---|
{ "name": string, "containerPort": integer, "protocol": string } |
Fields | |
---|---|
name |
(Optional) Cloud Run fully managed: not supported Cloud Run for Anthos: supported If specified, used to specify which protocol to use. Allowed values are "http1" and "h2c". |
containerPort |
(Optional) Port number the container listens on. This must be a valid port number, 0 < x < 65536. |
protocol |
(Optional) Cloud Run fully managed: not supported Cloud Run for Anthos: supported Protocol for port. Must be "TCP". Defaults to "TCP". |
EnvFromSource
Cloud Run fully managed: not supported
Cloud Run for Anthos: supported
EnvFromSource represents the source of a set of ConfigMaps
JSON representation | |
---|---|
{ "prefix": string, "configMapRef": { object ( |
Fields | |
---|---|
prefix |
(Optional) Cloud Run fully managed: not supported Cloud Run for Anthos: supported An optional identifier to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER. |
configMapRef |
(Optional) Cloud Run fully managed: not supported Cloud Run for Anthos: supported The ConfigMap to select from |
secretRef |
(Optional) Cloud Run fully managed: not supported Cloud Run for Anthos: supported The Secret to select from |
ConfigMapEnvSource
Cloud Run fully managed: not supported
Cloud Run for Anthos: supported
ConfigMapEnvSource selects a ConfigMap to populate the environment variables with.
The contents of the target ConfigMap's Data field will represent the key-value pairs as environment variables.
JSON representation | |
---|---|
{
"localObjectReference": {
object ( |
Fields | |
---|---|
localObjectReference |
This field should not be used directly as it is meant to be inlined directly into the message. Use the "name" field instead. |
optional |
(Optional) Cloud Run fully managed: not supported Cloud Run for Anthos: supported Specify whether the ConfigMap must be defined |
name |
Cloud Run fully managed: not supported Cloud Run for Anthos: supported The ConfigMap to select from. |
SecretEnvSource
Cloud Run fully managed: not supported
Cloud Run for Anthos: supported
SecretEnvSource selects a Secret to populate the environment variables with.
The contents of the target Secret's Data field will represent the key-value pairs as environment variables.
JSON representation | |
---|---|
{
"localObjectReference": {
object ( |
Fields | |
---|---|
localObjectReference |
This field should not be used directly as it is meant to be inlined directly into the message. Use the "name" field instead. |
optional |
(Optional) Cloud Run fully managed: not supported Cloud Run for Anthos: supported Specify whether the Secret must be defined |
name |
Cloud Run fully managed: not supported Cloud Run for Anthos: supported The Secret to select from. |
VolumeMount
Cloud Run fully managed: not supported
Cloud Run for Anthos: supported
VolumeMount describes a mounting of a Volume within a container.
JSON representation | |
---|---|
{ "name": string, "readOnly": boolean, "mountPath": string, "subPath": string } |
Fields | |
---|---|
name |
Cloud Run fully managed: not supported Cloud Run for Anthos: supported This must match the Name of a Volume. |
readOnly |
(Optional) Cloud Run fully managed: not supported Cloud Run for Anthos: supported Only true is accepted. Defaults to true. |
mountPath |
Cloud Run fully managed: not supported Cloud Run for Anthos: supported Path within the container at which the volume should be mounted. Must not contain ':'. |
subPath |
(Optional) Cloud Run fully managed: not supported Cloud Run for Anthos: supported Path within the volume from which the container's volume should be mounted. Defaults to "" (volume's root). |
Probe
Cloud Run fully managed: not supported
Cloud Run for Anthos: supported
Probe describes a health check to be performed against a container to determine whether it is alive or ready to receive traffic.
JSON representation | |
---|---|
{ "initialDelaySeconds": integer, "timeoutSeconds": integer, "periodSeconds": integer, "successThreshold": integer, "failureThreshold": integer, "exec": { object ( |
Fields | |
---|---|
initialDelaySeconds |
(Optional) Cloud Run fully managed: not supported Cloud Run for Anthos: supported Number of seconds after the container has started before liveness probes are initiated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes |
timeoutSeconds |
(Optional) Cloud Run fully managed: not supported Cloud Run for Anthos: supported Number of seconds after which the probe times out. Defaults to 1 second. Minimum value is 1. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes |
periodSeconds |
(Optional) Cloud Run fully managed: not supported Cloud Run for Anthos: supported How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1. |
successThreshold |
(Optional) Cloud Run fully managed: not supported Cloud Run for Anthos: supported Minimum consecutive successes for the probe to be considered successful after having failed. Defaults to 1. Must be 1 for liveness. Minimum value is 1. |
failureThreshold |
(Optional) Cloud Run fully managed: not supported Cloud Run for Anthos: supported Minimum consecutive failures for the probe to be considered failed after having succeeded. Defaults to 3. Minimum value is 1. |
exec |
(Optional) Cloud Run fully managed: not supported Cloud Run for Anthos: supported One and only one of the following should be specified. Exec specifies the action to take. A field inlined from the Handler message. |
httpGet |
(Optional) Cloud Run fully managed: not supported Cloud Run for Anthos: supported HTTPGet specifies the http request to perform. A field inlined from the Handler message. |
tcpSocket |
(Optional) Cloud Run fully managed: not supported Cloud Run for Anthos: supported TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported A field inlined from the Handler message. |
ExecAction
Cloud Run fully managed: not supported
Cloud Run for Anthos: supported
ExecAction describes a "run in container" action.
JSON representation | |
---|---|
{ "command": [ string ] } |
Fields | |
---|---|
command[] |
(Optional) Cloud Run fully managed: not supported Cloud Run for Anthos: supported Command is the command line to execute inside the container, the working directory for the command is root ('/') in the container's filesystem. The command is simply exec'd, it is not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use a shell, you need to explicitly call out to that shell. Exit status of 0 is treated as live/healthy and non-zero is unhealthy. |
HTTPGetAction
Cloud Run fully managed: not supported
Cloud Run for Anthos: supported
HTTPGetAction describes an action based on HTTP Get requests.
JSON representation | |
---|---|
{
"path": string,
"host": string,
"scheme": string,
"httpHeaders": [
{
object ( |
Fields | |
---|---|
path |
(Optional) Cloud Run fully managed: not supported Cloud Run for Anthos: supported Path to access on the HTTP server. |
host |
(Optional) Cloud Run fully managed: not supported Cloud Run for Anthos: supported Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. |
scheme |
(Optional) Cloud Run fully managed: not supported Cloud Run for Anthos: supported Scheme to use for connecting to the host. Defaults to HTTP. |
httpHeaders[] |
(Optional) Cloud Run fully managed: not supported Cloud Run for Anthos: supported Custom headers to set in the request. HTTP allows repeated headers. |
HTTPHeader
Cloud Run fully managed: not supported
Cloud Run for Anthos: supported
HTTPHeader describes a custom header to be used in HTTP probes
JSON representation | |
---|---|
{ "name": string, "value": string } |
Fields | |
---|---|
name |
Cloud Run fully managed: not supported Cloud Run for Anthos: supported The header field name |
value |
Cloud Run fully managed: not supported Cloud Run for Anthos: supported The header field value |
TCPSocketAction
Cloud Run fully managed: not supported
Cloud Run for Anthos: supported
TCPSocketAction describes an action based on opening a socket
JSON representation | |
---|---|
{ "port": integer, "host": string } |
Fields | |
---|---|
port |
Cloud Run fully managed: not supported Cloud Run for Anthos: supported Number or name of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. This field is currently limited to integer types only because of proto's inability to properly support the IntOrString golang type. |
host |
(Optional) Cloud Run fully managed: not supported Cloud Run for Anthos: supported Optional: Host name to connect to, defaults to the pod IP. |
SecurityContext
Cloud Run fully managed: not supported
Cloud Run for Anthos: supported
SecurityContext holds security configuration that will be applied to a container. Some fields are present in both SecurityContext and PodSecurityContext. When both are set, the values in SecurityContext take precedence.
JSON representation | |
---|---|
{ "runAsUser": integer } |
Fields | |
---|---|
runAsUser |
(Optional) Cloud Run fully managed: not supported Cloud Run for Anthos: supported The UID to run the entrypoint of the container process. Defaults to user specified in image metadata if unspecified. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. |
Volume
Cloud Run fully managed: not supported
Cloud Run for Anthos: supported
Volume represents a named volume in a container.
JSON representation | |
---|---|
{ "name": string, "secret": { object ( |
Fields | |
---|---|
name |
Cloud Run fully managed: not supported Cloud Run for Anthos: supported Volume's name. |
secret |
Cloud Run fully managed: not supported Cloud Run for Anthos: supported |
configMap |
Cloud Run fully managed: not supported Cloud Run for Anthos: supported |
SecretVolumeSource
Cloud Run fully managed: not supported
Cloud Run for Anthos: supported
The contents of the target Secret's Data field will be presented in a volume as files using the keys in the Data field as the file names.
JSON representation | |
---|---|
{
"secretName": string,
"items": [
{
object ( |
Fields | |
---|---|
secretName |
Cloud Run fully managed: not supported Cloud Run for Anthos: supported Name of the secret in the container's namespace to use. |
items[] |
(Optional) Cloud Run fully managed: not supported Cloud Run for Anthos: supported If unspecified, each key-value pair in the Data field of the referenced Secret will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the Secret, the volume setup will error unless it is marked optional. |
defaultMode |
(Optional) Cloud Run fully managed: not supported Cloud Run for Anthos: supported Mode bits to use on created files by default. Must be a value between 0000 and 0777. Defaults to 0644. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set. NOTE: This is an integer representation of the mode bits. So, the integer value should look exactly as the chmod numeric notation, i.e. Unix chmod "777" (a=rwx) should have the integer value 777. |
optional |
(Optional) Cloud Run fully managed: not supported Cloud Run for Anthos: supported Specify whether the Secret or its keys must be defined. |
KeyToPath
Cloud Run fully managed: not supported
Cloud Run for Anthos: supported
Maps a string key to a path within a volume.
JSON representation | |
---|---|
{ "key": string, "path": string, "mode": integer } |
Fields | |
---|---|
key |
Cloud Run fully managed: not supported Cloud Run for Anthos: supported The key to project. |
path |
Cloud Run fully managed: not supported Cloud Run for Anthos: supported The relative path of the file to map the key to. May not be an absolute path. May not contain the path element '..'. May not start with the string '..'. |
mode |
(Optional) Cloud Run fully managed: not supported Cloud Run for Anthos: supported Mode bits to use on this file, must be a value between 0000 and 0777. If not specified, the volume defaultMode will be used. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set. |
ConfigMapVolumeSource
Cloud Run fully managed: not supported
Cloud Run for Anthos: supported
Adapts a ConfigMap into a volume. The contents of the target ConfigMap's Data field will be presented in a volume as files using the keys in the Data field as the file names, unless the items element is populated with specific mappings of keys to paths.
JSON representation | |
---|---|
{
"name": string,
"items": [
{
object ( |
Fields | |
---|---|
name |
Cloud Run fully managed: not supported Cloud Run for Anthos: supported Name of the config. |
items[] |
(Optional) Cloud Run fully managed: not supported Cloud Run for Anthos: supported If unspecified, each key-value pair in the Data field of the referenced Secret will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the Secret, the volume setup will error unless it is marked optional. |
defaultMode |
(Optional) Cloud Run fully managed: not supported Cloud Run for Anthos: supported Mode bits to use on created files by default. Must be a value between 0 and 0777. Defaults to 0644. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set. |
optional |
(Optional) Cloud Run fully managed: not supported Cloud Run for Anthos: supported Specify whether the Secret or its keys must be defined. |