kubernetes-health 3.12.4 → 3.14.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/LICENSE +24 -0
- data/README.md +1 -1
- data/config/initializers/enable_rack_on_sidekiq.rb +8 -2
- data/lib/kubernetes/health/rack_on_rake.rake +1 -1
- data/lib/kubernetes/health/rack_on_sidekiq.rb +1 -3
- data/lib/kubernetes/health/version.rb +1 -1
- data/lib/kubernetes/health.rb +5 -5
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e3575c8bb4c8e379dff9f4f91e1b5ebcc19b144438dc75a1fa1c387370361299
|
4
|
+
data.tar.gz: 30bb81065ee295ed152e43469bd88b5c992b79275ff672358a7684c7724dd12d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: beb7dfc5ebe610fb016ed5fa0c7520ee1a2cf6ecdfb34e68632756a63fb78f4dc771bdb7a16c363e8daf80487b44eb2e7fcd9c94bd3619902a7b010b0c812b4b
|
7
|
+
data.tar.gz: a86a7586248bc15dcc64c88f257816c6e40a6bcd76b31b4674a5b86bb50bf9df3926201279579c7a606dcd83d23402e14cfa13281e7ed9e70bd0c0243fd78d68
|
data/LICENSE
ADDED
@@ -0,0 +1,24 @@
|
|
1
|
+
This is free and unencumbered software released into the public domain.
|
2
|
+
|
3
|
+
Anyone is free to copy, modify, publish, use, compile, sell, or
|
4
|
+
distribute this software, either in source code form or as a compiled
|
5
|
+
binary, for any purpose, commercial or non-commercial, and by any
|
6
|
+
means.
|
7
|
+
|
8
|
+
In jurisdictions that recognize copyright laws, the author or authors
|
9
|
+
of this software dedicate any and all copyright interest in the
|
10
|
+
software to the public domain. We make this dedication for the benefit
|
11
|
+
of the public at large and to the detriment of our heirs and
|
12
|
+
successors. We intend this dedication to be an overt act of
|
13
|
+
relinquishment in perpetuity of all present and future rights to this
|
14
|
+
software under copyright law.
|
15
|
+
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
19
|
+
IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
20
|
+
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
21
|
+
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
22
|
+
OTHER DEALINGS IN THE SOFTWARE.
|
23
|
+
|
24
|
+
For more information, please refer to <https://unlicense.org>
|
data/README.md
CHANGED
@@ -1,7 +1,13 @@
|
|
1
1
|
require 'kubernetes/health/rack_on_sidekiq'
|
2
|
+
begin
|
3
|
+
require 'rackup'
|
4
|
+
rescue LoadError
|
5
|
+
# ignore
|
6
|
+
end
|
2
7
|
|
3
8
|
if Kubernetes::Health::Config.enable_rack_on_sidekiq && Kubernetes::Health::SidekiqOptionsResolver[:concurrency].positive?
|
4
9
|
Thread.new do
|
5
|
-
|
10
|
+
server = defined?(Rackup::Handler::WEBrick) ? Rackup::Handler::WEBrick : Rack::Handler::WEBrick
|
11
|
+
server.run Kubernetes::Health::RackOnSidekiq.new, Port: Kubernetes::Health::Config.metrics_port
|
6
12
|
end
|
7
|
-
end
|
13
|
+
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
|
@@ -5,7 +5,6 @@ require 'prometheus/client/formats/text'
|
|
5
5
|
module Kubernetes
|
6
6
|
module Health
|
7
7
|
class RackOnSidekiq
|
8
|
-
|
9
8
|
def call(env)
|
10
9
|
req = ::Rack::Request.new(env)
|
11
10
|
content = ''
|
@@ -53,7 +52,6 @@ module Kubernetes
|
|
53
52
|
stats[:sidekiq_usage] = (stats[:sidekiq_busy] / stats[:sidekiq_capacity].to_f).round(2)
|
54
53
|
stats
|
55
54
|
end
|
56
|
-
|
57
55
|
end
|
58
56
|
end
|
59
|
-
end
|
57
|
+
end
|
data/lib/kubernetes/health.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
|
-
require
|
2
|
-
require
|
3
|
-
require
|
4
|
-
require
|
5
|
-
require
|
1
|
+
require 'kubernetes/health/config'
|
2
|
+
require 'kubernetes/health/sidekiq_options_resolver'
|
3
|
+
require 'kubernetes/health/version'
|
4
|
+
require 'kubernetes/health/engine'
|
5
|
+
require 'kubernetes/health/railtie'
|
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.14.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-09-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -129,6 +129,7 @@ files:
|
|
129
129
|
- ".rspec"
|
130
130
|
- ".travis.yml"
|
131
131
|
- Gemfile
|
132
|
+
- LICENSE
|
132
133
|
- README.md
|
133
134
|
- Rakefile
|
134
135
|
- app/controllers/kubernetes/health_controller.rb
|
@@ -169,7 +170,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
169
170
|
- !ruby/object:Gem::Version
|
170
171
|
version: '0'
|
171
172
|
requirements: []
|
172
|
-
rubygems_version: 3.
|
173
|
+
rubygems_version: 3.1.4
|
173
174
|
signing_key:
|
174
175
|
specification_version: 4
|
175
176
|
summary: This gem allows kubernetes monitoring your app while it is running migrates
|