Class: Google::Apis::RunV1alpha1::Probe

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

Overview

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.



1579
1580
1581
# File 'lib/google/apis/run_v1alpha1/classes.rb', line 1579

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

Instance Attribute Details

#failure_thresholdFixnum

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

Returns:

  • (Fixnum)


1545
1546
1547
# File 'lib/google/apis/run_v1alpha1/classes.rb', line 1545

def failure_threshold
  @failure_threshold
end

#handlerGoogle::Apis::RunV1alpha1::Handler

Handler defines a specific action that should be taken Corresponds to the JSON property handler



1550
1551
1552
# File 'lib/google/apis/run_v1alpha1/classes.rb', line 1550

def handler
  @handler
end

#initial_delay_secondsFixnum

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 +optional Corresponds to the JSON property initialDelaySeconds

Returns:

  • (Fixnum)


1557
1558
1559
# File 'lib/google/apis/run_v1alpha1/classes.rb', line 1557

def initial_delay_seconds
  @initial_delay_seconds
end

#period_secondsFixnum

How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1. +optional Corresponds to the JSON property periodSeconds

Returns:

  • (Fixnum)


1563
1564
1565
# File 'lib/google/apis/run_v1alpha1/classes.rb', line 1563

def period_seconds
  @period_seconds
end

#success_thresholdFixnum

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. + optional Corresponds to the JSON property successThreshold

Returns:

  • (Fixnum)


1570
1571
1572
# File 'lib/google/apis/run_v1alpha1/classes.rb', line 1570

def success_threshold
  @success_threshold
end

#timeout_secondsFixnum

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 +optional Corresponds to the JSON property timeoutSeconds

Returns:

  • (Fixnum)


1577
1578
1579
# File 'lib/google/apis/run_v1alpha1/classes.rb', line 1577

def timeout_seconds
  @timeout_seconds
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1584
1585
1586
1587
1588
1589
1590
1591
# File 'lib/google/apis/run_v1alpha1/classes.rb', line 1584

def update!(**args)
  @failure_threshold = args[:failure_threshold] if args.key?(:failure_threshold)
  @handler = args[:handler] if args.key?(:handler)
  @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)
  @timeout_seconds = args[:timeout_seconds] if args.key?(:timeout_seconds)
end