Class: Google::Apis::RunV1::Probe

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

Overview

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.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ Probe

Returns a new instance of Probe.



2447
2448
2449
# File 'lib/google/apis/run_v1/classes.rb', line 2447

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

Instance Attribute Details

#execGoogle::Apis::RunV1::ExecAction

Not supported by Cloud Run ExecAction describes a "run in container" action. Corresponds to the JSON property exec



2398
2399
2400
# File 'lib/google/apis/run_v1/classes.rb', line 2398

def exec
  @exec
end

#failure_thresholdFixnum

(Optional) Minimum consecutive failures for the probe to be considered failed after having succeeded. Defaults to 3. Minimum value is 1. Corresponds to the JSON property failureThreshold

Returns:

  • (Fixnum)


2404
2405
2406
# File 'lib/google/apis/run_v1/classes.rb', line 2404

def failure_threshold
  @failure_threshold
end

#http_getGoogle::Apis::RunV1::HttpGetAction

Not supported by Cloud Run HTTPGetAction describes an action based on HTTP Get requests. Corresponds to the JSON property httpGet



2410
2411
2412
# File 'lib/google/apis/run_v1/classes.rb', line 2410

def http_get
  @http_get
end

#initial_delay_secondsFixnum

(Optional) 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 Corresponds to the JSON property initialDelaySeconds

Returns:

  • (Fixnum)


2417
2418
2419
# File 'lib/google/apis/run_v1/classes.rb', line 2417

def initial_delay_seconds
  @initial_delay_seconds
end

#period_secondsFixnum

(Optional) How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1. Maximum value is 3600. Must be greater or equal than timeout_seconds. Corresponds to the JSON property periodSeconds

Returns:

  • (Fixnum)


2424
2425
2426
# File 'lib/google/apis/run_v1/classes.rb', line 2424

def period_seconds
  @period_seconds
end

#success_thresholdFixnum

(Optional) Minimum consecutive successes for the probe to be considered successful after having failed. Defaults to 1. Must be 1 for liveness and startup Probes. Corresponds to the JSON property successThreshold

Returns:

  • (Fixnum)


2431
2432
2433
# File 'lib/google/apis/run_v1/classes.rb', line 2431

def success_threshold
  @success_threshold
end

#tcp_socketGoogle::Apis::RunV1::TcpSocketAction

Not supported by Cloud Run TCPSocketAction describes an action based on opening a socket Corresponds to the JSON property tcpSocket



2437
2438
2439
# File 'lib/google/apis/run_v1/classes.rb', line 2437

def tcp_socket
  @tcp_socket
end

#timeout_secondsFixnum

(Optional) Number of seconds after which the probe times out. Defaults to 1 second. Minimum value is 1. Maximum value is 3600. Must be smaller than period_seconds. More info: https://kubernetes.io/docs/concepts/workloads/pods/ pod-lifecycle#container-probes Corresponds to the JSON property timeoutSeconds

Returns:

  • (Fixnum)


2445
2446
2447
# File 'lib/google/apis/run_v1/classes.rb', line 2445

def timeout_seconds
  @timeout_seconds
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
# File 'lib/google/apis/run_v1/classes.rb', line 2452

def update!(**args)
  @exec = args[:exec] if args.key?(:exec)
  @failure_threshold = args[:failure_threshold] if args.key?(:failure_threshold)
  @http_get = args[:http_get] if args.key?(:http_get)
  @initial_delay_seconds = args[:initial_delay_seconds] if args.key?(:initial_delay_seconds)
  @period_seconds = args[:period_seconds] if args.key?(:period_seconds)
  @success_threshold = args[:success_threshold] if args.key?(:success_threshold)
  @tcp_socket = args[:tcp_socket] if args.key?(:tcp_socket)
  @timeout_seconds = args[:timeout_seconds] if args.key?(:timeout_seconds)
end