RevisionSpec

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

JSON representation
{
  "containerConcurrency": number,
  "timeoutSeconds": number,
  "serviceAccountName": string,
  "containers": [
    {
      object (Container)
    }
  ],
  "volumes": [
    {
      object (Volume)
    }
  ]
}
Fields
containerConcurrency

number

(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

number

TimeoutSeconds holds the max duration the instance is allowed for responding to a request. Not currently used by Cloud Run.

serviceAccountName

string

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[]

object (Container)

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[]

object (Volume)

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 (EnvVar)
    }
  ],
  "resources": {
    object (ResourceRequirements)
  },
  "workingDir": string,
  "ports": [
    {
      object (ContainerPort)
    }
  ],
  "envFrom": [
    {
      object (EnvFromSource)
    }
  ],
  "volumeMounts": [
    {
      object (VolumeMount)
    }
  ],
  "livenessProbe": {
    object (Probe)
  },
  "readinessProbe": {
    object (Probe)
  },
  "terminationMessagePath": string,
  "terminationMessagePolicy": string,
  "imagePullPolicy": string,
  "securityContext": {
    object (SecurityContext)
  }
}
Fields
name

string

(Optional)

Name of the container specified as a DNS_LABEL.

image

string

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[]

string

args[]

string

(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. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell

env[]

object (EnvVar)

(Optional)

Cloud Run fully managed: supported

Cloud Run for Anthos: supported

List of environment variables to set in the container. Cannot be updated.

resources

object (ResourceRequirements)

(Optional)

Cloud Run fully managed: supported

Cloud Run for Anthos: supported

Compute Resources required by this container. Cannot be updated. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources

workingDir

string

(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. Cannot be updated.

ports[]

object (ContainerPort)

(Optional)

Cloud Run fully managed: not supported

Cloud Run for Anthos: supported

List of ports to expose from the container. Exposing a port here gives the system additional information about the network connections a container uses, but is primarily informational. Not specifying a port here DOES NOT prevent that port from being exposed. Any port which is listening on the default "0.0.0.0" address inside a container will be accessible from the network. Cannot be updated.

envFrom[]

object (EnvFromSource)

(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[]

object (VolumeMount)

(Optional)

Cloud Run fully managed: not supported

Cloud Run for Anthos: supported

Pod volumes to mount into the container's filesystem. Cannot be updated.

livenessProbe

object (Probe)

(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. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes

readinessProbe

object (Probe)

(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. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes

terminationMessagePath

string

(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. Cannot be updated.

terminationMessagePolicy

string

(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

string

(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. Cannot be updated. More info: https://kubernetes.io/docs/concepts/containers/images#updating-images

securityContext

object (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 (EnvVarSource)
  }
}
Fields
name

string

Name of the environment variable. Must be a C_IDENTIFIER.

value

string

(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

object (EnvVarSource)

(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 (ConfigMapKeySelector)
  },
  "secretKeyRef": {
    object (SecretKeySelector)
  }
}
Fields
configMapKeyRef

object (ConfigMapKeySelector)

(Optional)

Cloud Run fully managed: not supported

Cloud Run for Anthos: supported

Selects a key of a ConfigMap.

secretKeyRef

object (SecretKeySelector)

(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 (LocalObjectReference)
  },
  "key": string,
  "optional": boolean,
  "name": string
}
Fields
localObjectReference
(deprecated)

object (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

string

Cloud Run fully managed: not supported

Cloud Run for Anthos: supported

The key to select.

optional

boolean

(Optional)

Cloud Run fully managed: not supported

Cloud Run for Anthos: supported

Specify whether the ConfigMap or its key must be defined

name

string

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

string

(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 (LocalObjectReference)
  },
  "key": string,
  "optional": boolean,
  "name": string
}
Fields
localObjectReference
(deprecated)

object (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

string

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

boolean

(Optional)

Cloud Run fully managed: not supported

Cloud Run for Anthos: supported

Specify whether the Secret or its key must be defined

name

string

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

map (key: string, value: string)

(Optional)

Cloud Run fully managed: Only memory and CPU are supported. Note: The only supported value for CPU is '1'.

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 "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.

requests

map (key: string, value: string)

(Optional)

Cloud Run fully managed: Only memory and CPU are supported. Note: The only supported value for CPU is '1'.

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 "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.

ContainerPort

Cloud Run fully managed: not supported

Cloud Run for Anthos: supported

ContainerPort represents a network port in a single container.

JSON representation
{
  "name": string,
  "containerPort": number,
  "protocol": string
}
Fields
name

string

(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

number

(Optional)

Cloud Run fully managed: not supported

Cloud Run for Anthos: supported

Number of port to expose on the pod's IP address. This must be a valid port number, 0 < x < 65536.

protocol

string

(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 (ConfigMapEnvSource)
  },
  "secretRef": {
    object (SecretEnvSource)
  }
}
Fields
prefix

string

(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

object (ConfigMapEnvSource)

(Optional)

Cloud Run fully managed: not supported

Cloud Run for Anthos: supported

The ConfigMap to select from

secretRef

object (SecretEnvSource)

(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 (LocalObjectReference)
  },
  "optional": boolean,
  "name": string
}
Fields
localObjectReference
(deprecated)

object (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

boolean

(Optional)

Cloud Run fully managed: not supported

Cloud Run for Anthos: supported

Specify whether the ConfigMap must be defined

name

string

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 (LocalObjectReference)
  },
  "optional": boolean,
  "name": string
}
Fields
localObjectReference
(deprecated)

object (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

boolean

(Optional)

Cloud Run fully managed: not supported

Cloud Run for Anthos: supported

Specify whether the Secret must be defined

name

string

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

string

Cloud Run fully managed: not supported

Cloud Run for Anthos: supported

This must match the Name of a Volume.

readOnly

boolean

(Optional)

Cloud Run fully managed: not supported

Cloud Run for Anthos: supported

Only true is accepted. Defaults to true.

mountPath

string

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

string

(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
{
  "handler": {
    object (Handler)
  },
  "initialDelaySeconds": number,
  "timeoutSeconds": number,
  "periodSeconds": number,
  "successThreshold": number,
  "failureThreshold": number
}
Fields
handler

object (Handler)

Cloud Run fully managed: not supported

Cloud Run for Anthos: supported

The action taken to determine the health of a container

initialDelaySeconds

number

(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

number

(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

number

(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

number

(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

number

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

Handler

Cloud Run fully managed: not supported

Cloud Run for Anthos: supported

Handler defines a specific action that should be taken

JSON representation
{
  "exec": {
    object (ExecAction)
  },
  "httpGet": {
    object (HTTPGetAction)
  },
  "tcpSocket": {
    object (TCPSocketAction)
  }
}
Fields
exec

object (ExecAction)

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

httpGet

object (HTTPGetAction)

(Optional)

Cloud Run fully managed: not supported

Cloud Run for Anthos: supported

HTTPGet specifies the http request to perform.

tcpSocket

object (TCPSocketAction)

(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

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

string

(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 (HTTPHeader)
    }
  ]
}
Fields
path

string

(Optional)

Cloud Run fully managed: not supported

Cloud Run for Anthos: supported

Path to access on the HTTP server.

host

string

(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

string

(Optional)

Cloud Run fully managed: not supported

Cloud Run for Anthos: supported

Scheme to use for connecting to the host. Defaults to HTTP.

httpHeaders[]

object (HTTPHeader)

(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

string

Cloud Run fully managed: not supported

Cloud Run for Anthos: supported

The header field name

value

string

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": {
    object (IntOrString)
  },
  "host": string
}
Fields
port

object (IntOrString)

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.

host

string

(Optional)

Cloud Run fully managed: not supported

Cloud Run for Anthos: supported

Optional: Host name to connect to, defaults to the pod IP.

IntOrString

IntOrString is a type that can hold an int32 or a string. When used in JSON or YAML marshalling and unmarshalling, it produces or consumes the inner type. This allows you to have, for example, a JSON field that can accept a name or number.

JSON representation
{
  "type": number,
  "intVal": number,
  "strVal": string
}
Fields
type

number

The type of the value.

intVal

number

The int value.

strVal

string

The string value.

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": number
}
Fields
runAsUser

number

(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 (SecretVolumeSource)
  },
  "configMap": {
    object (ConfigMapVolumeSource)
  }
}
Fields
name

string

Cloud Run fully managed: not supported

Cloud Run for Anthos: supported

Volume's name.

secret

object (SecretVolumeSource)

Cloud Run fully managed: not supported

Cloud Run for Anthos: supported

configMap

object (ConfigMapVolumeSource)

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 (KeyToPath)
    }
  ],
  "defaultMode": number,
  "optional": boolean
}
Fields
secretName

string

Cloud Run fully managed: not supported

Cloud Run for Anthos: supported

Name of the secret in the container's namespace to use.

items[]

object (KeyToPath)

(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

number

(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

boolean

(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": number
}
Fields
key

string

Cloud Run fully managed: not supported

Cloud Run for Anthos: supported

The key to project.

path

string

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

number

(Optional)

Cloud Run fully managed: not supported

Cloud Run for Anthos: supported

Mode bits to use on this file, must be a value between 0 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 (KeyToPath)
    }
  ],
  "defaultMode": number,
  "optional": boolean
}
Fields
name

string

Cloud Run fully managed: not supported

Cloud Run for Anthos: supported

Name of the config.

items[]

object (KeyToPath)

(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

number

(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

boolean

(Optional)

Cloud Run fully managed: not supported

Cloud Run for Anthos: supported

Specify whether the Secret or its keys must be defined.

Was this page helpful? Let us know how we did:

Send feedback about...