class Google::Apis::RunV1alpha1::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.

Attributes

args[RW]

(Optional) 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 Corresponds to the JSON property `args` @return [Array<String>]

command[RW]

Corresponds to the JSON property `command` @return [Array<String>]

env[RW]

(Optional) List of environment variables to set in the container. Corresponds to the JSON property `env` @return [Array<Google::Apis::RunV1alpha1::EnvVar>]

env_from[RW]

(Optional) 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. Corresponds to the JSON property `envFrom` @return [Array<Google::Apis::RunV1alpha1::EnvFromSource>]

image[RW]

Only supports containers from Google Container Registry or Artifact Registry URL of the Container image. More info: kubernetes.io/docs/concepts/ containers/images Corresponds to the JSON property `image` @return [String]

image_pull_policy[RW]

(Optional) Image pull policy. One of Always, Never, IfNotPresent. Defaults to Always if :latest tag is specified, or IfNotPresent otherwise. More info: kubernetes.io/docs/concepts/containers/images#updating-images Corresponds to the JSON property `imagePullPolicy` @return [String]

liveness_probe[RW]

Not supported by Cloud Run Probe describes a health check to be performed against a container to determine whether it is alive or ready to receive traffic. Corresponds to the JSON property `livenessProbe` @return [Google::Apis::RunV1alpha1::Probe]

name[RW]

(Optional) Name of the container specified as a DNS_LABEL. Currently unused in Cloud Run. More info: kubernetes.io/docs/concepts/overview/working- with-objects/names/#dns-label-names Corresponds to the JSON property `name` @return [String]

ports[RW]

(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. Corresponds to the JSON property `ports` @return [Array<Google::Apis::RunV1alpha1::ContainerPort>]

readiness_probe[RW]

Not supported by Cloud Run Probe describes a health check to be performed against a container to determine whether it is alive or ready to receive traffic. Corresponds to the JSON property `readinessProbe` @return [Google::Apis::RunV1alpha1::Probe]

resources[RW]

ResourceRequirements describes the compute resource requirements. Corresponds to the JSON property `resources` @return [Google::Apis::RunV1alpha1::ResourceRequirements]

security_context[RW]

Not supported by Cloud Run 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. Corresponds to the JSON property `securityContext` @return [Google::Apis::RunV1alpha1::SecurityContext]

startup_probe[RW]

Not supported by Cloud Run Probe describes a health check to be performed against a container to determine whether it is alive or ready to receive traffic. Corresponds to the JSON property `startupProbe` @return [Google::Apis::RunV1alpha1::Probe]

termination_message_path[RW]

(Optional) 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. Corresponds to the JSON property `terminationMessagePath` @return [String]

termination_message_policy[RW]

(Optional) 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. Corresponds to the JSON property `terminationMessagePolicy` @return [String]

volume_mounts[RW]

(Optional) Volume to mount into the container's filesystem. Only supports SecretVolumeSources. Pod volumes to mount into the container's filesystem. Corresponds to the JSON property `volumeMounts` @return [Array<Google::Apis::RunV1alpha1::VolumeMount>]

working_dir[RW]

(Optional) Container's working directory. If not specified, the container runtime's default will be used, which might be configured in the container image. Corresponds to the JSON property `workingDir` @return [String]

Public Class Methods

new(**args) click to toggle source
# File lib/google/apis/run_v1alpha1/classes.rb, line 283
def initialize(**args)
   update!(**args)
end

Public Instance Methods

update!(**args) click to toggle source

Update properties of this object

# File lib/google/apis/run_v1alpha1/classes.rb, line 288
def update!(**args)
  @args = args[:args] if args.key?(:args)
  @command = args[:command] if args.key?(:command)
  @env = args[:env] if args.key?(:env)
  @env_from = args[:env_from] if args.key?(:env_from)
  @image = args[:image] if args.key?(:image)
  @image_pull_policy = args[:image_pull_policy] if args.key?(:image_pull_policy)
  @liveness_probe = args[:liveness_probe] if args.key?(:liveness_probe)
  @name = args[:name] if args.key?(:name)
  @ports = args[:ports] if args.key?(:ports)
  @readiness_probe = args[:readiness_probe] if args.key?(:readiness_probe)
  @resources = args[:resources] if args.key?(:resources)
  @security_context = args[:security_context] if args.key?(:security_context)
  @startup_probe = args[:startup_probe] if args.key?(:startup_probe)
  @termination_message_path = args[:termination_message_path] if args.key?(:termination_message_path)
  @termination_message_policy = args[:termination_message_policy] if args.key?(:termination_message_policy)
  @volume_mounts = args[:volume_mounts] if args.key?(:volume_mounts)
  @working_dir = args[:working_dir] if args.key?(:working_dir)
end