kubernetes_helper 1.20.1 → 1.20.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -0
- data/lib/kubernetes_helper/version.rb +1 -1
- data/lib/kubernetes_helper.rb +2 -1
- data/lib/templates/_jobs_pod.yml +7 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3c37c83c9ede6fe5f9dc67a2ae7d859290bb7d40f8801aa9c5a1481d3cc51666
|
4
|
+
data.tar.gz: 5e6c15ae2245fbcad4a80369a7718f6643a5fe10db415c01174247686ee4bb7e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a8dfa0eec07574b5b8452a1c1075d98e857d85df6de095765c1910826d41a5c171fb95c39a71acbf6fff025ceff2f1ba50fe3ea4f14071d0de5e16f83728a6a7
|
7
|
+
data.tar.gz: 5ca3c54401bc67fc0aedf4a8152b652b3e26682c82bb200a3743af29ad6b97c9b668ec2add1d48aa845c908fd99f734d02d1699a15b3a32e72b3a6e67511e3a5
|
data/README.md
CHANGED
@@ -55,6 +55,7 @@ Ideal to run sidekiq or similar jobs as a service without interacting via HTTP.
|
|
55
55
|
- `deployment.job_apps[].sidekiq_alive_gem` (Boolean, default false): If true will add liveness checker settings using `sidekiq_alive_gem` (`sidekiq_alive` gem needs to be present in your Gemfile)
|
56
56
|
- `deployment.job_apps[].services` (Array, Optional): List of linux service names that are required for a healthy job container. Sample: `['sidekiq', 'cron']`. Note: This will be ignored if `sidekiq_alive_gem` was defined.
|
57
57
|
- `deployment.job_apps[].resources` (Hash, optional): Configure depending on the job app requirements. Sample: `{ cpu: { max: '1', min: '500m' }, mem: { max: '1Gi', min: '500Mi' } }`
|
58
|
+
- `deployment.job_apps[].rolling_update` (Boolean, default false): Uses `rollingUpdate` strategy instead of `recreate` (https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#rolling-update-deployment)
|
58
59
|
Sample:
|
59
60
|
```ruby
|
60
61
|
{
|
data/lib/kubernetes_helper.rb
CHANGED
@@ -86,7 +86,8 @@ module KubernetesHelper
|
|
86
86
|
command: settings[:deployment][:job_command],
|
87
87
|
services: settings[:deployment][:job_services],
|
88
88
|
resources: settings[:deployment][:job_resources],
|
89
|
-
sidekiq_alive_gem: settings[:deployment][:job_sidekiq_alive_gem]
|
89
|
+
sidekiq_alive_gem: settings[:deployment][:job_sidekiq_alive_gem],
|
90
|
+
rolling_update: settings[:deployment][:job_rolling_update]
|
90
91
|
}
|
91
92
|
]
|
92
93
|
end
|
data/lib/templates/_jobs_pod.yml
CHANGED
@@ -8,7 +8,14 @@
|
|
8
8
|
matchLabels:
|
9
9
|
name: *job_app_name
|
10
10
|
strategy:
|
11
|
+
<% if locals[:job_app][:rolling_update] %>
|
12
|
+
type: RollingUpdate
|
13
|
+
rollingUpdate:
|
14
|
+
maxSurge: 1
|
15
|
+
maxUnavailable: 0
|
16
|
+
<% else %>
|
11
17
|
type: Recreate
|
18
|
+
<% end %>
|
12
19
|
minReadySeconds: 10
|
13
20
|
template:
|
14
21
|
metadata:
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: kubernetes_helper
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.20.
|
4
|
+
version: 1.20.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- owen2345
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-08-
|
11
|
+
date: 2022-08-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: erb
|