Class: Google::Apis::CloudbuildV2::Sidecar

Inherits:
Object
  • Object
show all
Includes:
Google::Apis::Core::Hashable, Google::Apis::Core::JsonObjectSupport
Defined in:
lib/google/apis/cloudbuild_v2/classes.rb,
lib/google/apis/cloudbuild_v2/representations.rb,
lib/google/apis/cloudbuild_v2/representations.rb

Overview

Sidecars run alongside the Task's step containers.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ Sidecar

Returns a new instance of Sidecar.



2576
2577
2578
# File 'lib/google/apis/cloudbuild_v2/classes.rb', line 2576

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#argsArray<String>

Arguments to the entrypoint. Corresponds to the JSON property args

Returns:

  • (Array<String>)


2528
2529
2530
# File 'lib/google/apis/cloudbuild_v2/classes.rb', line 2528

def args
  @args
end

#commandArray<String>

Entrypoint array. Corresponds to the JSON property command

Returns:

  • (Array<String>)


2533
2534
2535
# File 'lib/google/apis/cloudbuild_v2/classes.rb', line 2533

def command
  @command
end

#envArray<Google::Apis::CloudbuildV2::EnvVar>

List of environment variables to set in the container. Corresponds to the JSON property env



2538
2539
2540
# File 'lib/google/apis/cloudbuild_v2/classes.rb', line 2538

def env
  @env
end

#imageString

Docker image name. Corresponds to the JSON property image

Returns:

  • (String)


2543
2544
2545
# File 'lib/google/apis/cloudbuild_v2/classes.rb', line 2543

def image
  @image
end

#nameString

Name of the Sidecar. Corresponds to the JSON property name

Returns:

  • (String)


2548
2549
2550
# File 'lib/google/apis/cloudbuild_v2/classes.rb', line 2548

def name
  @name
end

#readiness_probeGoogle::Apis::CloudbuildV2::Probe

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



2554
2555
2556
# File 'lib/google/apis/cloudbuild_v2/classes.rb', line 2554

def readiness_probe
  @readiness_probe
end

#scriptString

The contents of an executable file to execute. Corresponds to the JSON property script

Returns:

  • (String)


2559
2560
2561
# File 'lib/google/apis/cloudbuild_v2/classes.rb', line 2559

def script
  @script
end

#security_contextGoogle::Apis::CloudbuildV2::SecurityContext

Security options the container should be run with. Corresponds to the JSON property securityContext



2564
2565
2566
# File 'lib/google/apis/cloudbuild_v2/classes.rb', line 2564

def security_context
  @security_context
end

#volume_mountsArray<Google::Apis::CloudbuildV2::VolumeMount>

Pod volumes to mount into the container's filesystem. Corresponds to the JSON property volumeMounts



2569
2570
2571
# File 'lib/google/apis/cloudbuild_v2/classes.rb', line 2569

def volume_mounts
  @volume_mounts
end

#working_dirString

Container's working directory. Corresponds to the JSON property workingDir

Returns:

  • (String)


2574
2575
2576
# File 'lib/google/apis/cloudbuild_v2/classes.rb', line 2574

def working_dir
  @working_dir
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
# File 'lib/google/apis/cloudbuild_v2/classes.rb', line 2581

def update!(**args)
  @args = args[:args] if args.key?(:args)
  @command = args[:command] if args.key?(:command)
  @env = args[:env] if args.key?(:env)
  @image = args[:image] if args.key?(:image)
  @name = args[:name] if args.key?(:name)
  @readiness_probe = args[:readiness_probe] if args.key?(:readiness_probe)
  @script = args[:script] if args.key?(:script)
  @security_context = args[:security_context] if args.key?(:security_context)
  @volume_mounts = args[:volume_mounts] if args.key?(:volume_mounts)
  @working_dir = args[:working_dir] if args.key?(:working_dir)
end