kubernetes-health 3.12.1 → 3.13.0
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9c2c9b60a7289355e669d7ea209ff49a09dbd0cd143f8d394d3920173cebfa49
|
4
|
+
data.tar.gz: cbfbb6a989ab515505601151c611400c4bda12f7dcbd62e2afba95a3b0ac119c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9805d34deec7b9bab3e8f6fa25c17f71e701d7972797c737358f72ee086a0a7748e1b9953e05584cc9b4df45bb021749d6adfc7930ab950c5765d7be853a4500
|
7
|
+
data.tar.gz: 46c1e70a5bd9f613d4b523f4aa36e9663ae83d4967b61f870484a7b5c3c8bc2b4c595abea5f3bca84dffc9897955caa0c4a35dea2c120bf59ece5c4bff9a0621
|
data/README.md
CHANGED
@@ -2,6 +2,6 @@ require 'kubernetes/health/rack_on_sidekiq'
|
|
2
2
|
|
3
3
|
if Kubernetes::Health::Config.enable_rack_on_sidekiq && Kubernetes::Health::SidekiqOptionsResolver[:concurrency].positive?
|
4
4
|
Thread.new do
|
5
|
-
Rack::Handler::WEBrick.run Kubernetes::Health::RackOnSidekiq.new,
|
5
|
+
Rack::Handler::WEBrick.run Kubernetes::Health::RackOnSidekiq.new, Port: Kubernetes::Health::Config.metrics_port
|
6
6
|
end
|
7
|
-
end
|
7
|
+
end
|
@@ -4,7 +4,7 @@ require "kubernetes/health/rack_on_rake"
|
|
4
4
|
namespace :kubernetes_health do
|
5
5
|
task :rack_on_rake do
|
6
6
|
Thread.new do
|
7
|
-
Rack::Handler::WEBrick.run Kubernetes::Health::RackOnRake.new,
|
7
|
+
Rack::Handler::WEBrick.run Kubernetes::Health::RackOnRake.new, Port: Kubernetes::Health::Config.metrics_port
|
8
8
|
end
|
9
9
|
end
|
10
10
|
end
|
data/lib/puma/kubernetes/app.rb
CHANGED
@@ -54,11 +54,13 @@ module Puma
|
|
54
54
|
end
|
55
55
|
|
56
56
|
def generate_extended_puma_stats
|
57
|
-
|
58
|
-
|
59
|
-
|
57
|
+
begin
|
58
|
+
puma_stats = @launcher.stats
|
59
|
+
rescue NoMethodError
|
60
|
+
puma_stats = {}
|
61
|
+
end
|
60
62
|
# On puma <= 4 puma_stats is a String
|
61
|
-
puma_stats = JSON.parse(puma_stats, symbolize_names: true)
|
63
|
+
puma_stats = JSON.parse(puma_stats, symbolize_names: true) if puma_stats.is_a?(String)
|
62
64
|
# Including usage stats.
|
63
65
|
puma_stats = merge_worker_status(puma_stats) if puma_stats[:worker_status].present?
|
64
66
|
puma_stats[:usage] = (1 - puma_stats[:pool_capacity].to_f / puma_stats[:max_threads]).round(2) if puma_stats[:pool_capacity].present?
|
@@ -87,6 +89,8 @@ module Puma
|
|
87
89
|
end
|
88
90
|
|
89
91
|
def puma_already_started?(extended_puma_stats)
|
92
|
+
return false if extended_puma_stats.empty?
|
93
|
+
|
90
94
|
if extended_puma_stats[:booted_workers].present?
|
91
95
|
# Cluster Mode
|
92
96
|
extended_puma_stats[:booted_workers].positive?
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: kubernetes-health
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.
|
4
|
+
version: 3.13.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Wagner Caixeta
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-06-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -169,7 +169,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
169
169
|
- !ruby/object:Gem::Version
|
170
170
|
version: '0'
|
171
171
|
requirements: []
|
172
|
-
rubygems_version: 3.5.
|
172
|
+
rubygems_version: 3.5.7
|
173
173
|
signing_key:
|
174
174
|
specification_version: 4
|
175
175
|
summary: This gem allows kubernetes monitoring your app while it is running migrates
|