diff options
Diffstat (limited to 'app/services/pod_logs/base_service.rb')
-rw-r--r-- | app/services/pod_logs/base_service.rb | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/app/services/pod_logs/base_service.rb b/app/services/pod_logs/base_service.rb index 668ee6b88a8..d94d4e92eb6 100644 --- a/app/services/pod_logs/base_service.rb +++ b/app/services/pod_logs/base_service.rb @@ -10,8 +10,6 @@ module PodLogs CACHE_KEY_GET_POD_LOG = 'get_pod_log' K8S_NAME_MAX_LENGTH = 253 - SUCCESS_RETURN_KEYS = %i(status logs pod_name container_name pods).freeze - def id cluster.id end @@ -49,6 +47,10 @@ module PodLogs %w(pod_name container_name) end + def success_return_keys + %i(status logs pod_name container_name pods) + end + def check_arguments(result) return error(_('Cluster does not exist')) if cluster.nil? return error(_('Namespace is empty')) if namespace.blank? @@ -122,7 +124,7 @@ module PodLogs end def filter_return_keys(result) - result.slice(*SUCCESS_RETURN_KEYS) + result.slice(*success_return_keys) end def filter_params(params) |