Class: Krane::PodSetBase
Constant Summary
KubernetesResource::DEBUG_RESOURCE_NOT_FOUND_MESSAGE, KubernetesResource::DISABLED_EVENT_INFO_MESSAGE, KubernetesResource::DISABLED_LOG_INFO_MESSAGE, KubernetesResource::DISABLE_FETCHING_EVENT_INFO, KubernetesResource::DISABLE_FETCHING_LOG_INFO, KubernetesResource::GLOBAL, KubernetesResource::LAST_APPLIED_ANNOTATION, KubernetesResource::LOG_LINE_COUNT, KubernetesResource::SENSITIVE_TEMPLATE_CONTENT, KubernetesResource::SERVER_DRY_RUNNABLE, KubernetesResource::SERVER_DRY_RUN_DISABLED_ERROR, KubernetesResource::STANDARD_TIMEOUT_MESSAGE, KubernetesResource::TIMEOUT, KubernetesResource::TIMEOUT_OVERRIDE_ANNOTATION, KubernetesResource::TIMEOUT_OVERRIDE_ANNOTATION_DEPRECATED, KubernetesResource::TIMEOUT_OVERRIDE_ANNOTATION_SUFFIX, KubernetesResource::UNUSUAL_FAILURE_MESSAGE
Instance Attribute Summary
#context, #deploy_started_at, #global, #name, #namespace, #type
Instance Method Summary
collapse
#<=>, #after_sync, build, class_for_kind, #current_generation, #debug_message, #deploy_failed?, #deploy_method, #deploy_started?, #deploy_succeeded?, #deploy_timed_out?, #disappeared?, #exists?, #file_path, #global?, #has_warnings?, #id, #initialize, kind, #kubectl_resource_type, #observed_generation, #pretty_status, #pretty_timeout_type, #report_status_to_statsd, #sensitive_template_content?, #server_dry_run_validated?, #server_dry_runnable_resource?, #status, #sync, #sync_debug_info, #terminating?, timeout, #timeout, #timeout_override, #to_kubeclient_resource, #use_generated_name, #uses_generate_name?, #validate_definition, #validation_error_msg, #validation_failed?, #validation_warning_msg
Instance Method Details
#failure_message ⇒ Object
6
7
8
|
# File 'lib/krane/kubernetes_resource/pod_set_base.rb', line 6
def failure_message
pods.map(&:failure_message).compact.uniq.join("\n")
end
|
#fetch_debug_logs ⇒ Object
21
22
23
24
25
26
27
28
29
30
31
|
# File 'lib/krane/kubernetes_resource/pod_set_base.rb', line 21
def fetch_debug_logs
logs = Krane::RemoteLogs.new(
logger: @logger,
parent_id: id,
container_names: container_names,
namespace: @namespace,
context: @context
)
logs.sync
logs
end
|
#fetch_events(kubectl) ⇒ Object
14
15
16
17
18
19
|
# File 'lib/krane/kubernetes_resource/pod_set_base.rb', line 14
def fetch_events(kubectl)
own_events = super
return own_events unless pods.present?
most_useful_pod = pods.find(&:deploy_failed?) || pods.find(&:deploy_timed_out?) || pods.first
own_events.merge(most_useful_pod.fetch_events(kubectl))
end
|
#print_debug_logs? ⇒ Boolean
33
34
35
|
# File 'lib/krane/kubernetes_resource/pod_set_base.rb', line 33
def print_debug_logs?
pods.present? end
|
#timeout_message ⇒ Object
10
11
12
|
# File 'lib/krane/kubernetes_resource/pod_set_base.rb', line 10
def timeout_message
pods.map(&:timeout_message).compact.uniq.join("\n")
end
|