kubernetes_helper 1.19.0 → 1.19.1

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: 3d37444885845a0d47f9824c6b9e220f278ae7db62de9cc7d3222d3ea91da753
4
- data.tar.gz: 64834c2950efa2394c032adfacdd13b8dcb392d7a5346a6101fb7c7c04e30c92
3
+ metadata.gz: e72fcd92010ce2e1144a926d617c13985b39941ff58e177f24eb8b68828bd572
4
+ data.tar.gz: f0798e685be4fde2efefd86e3869e05449c871a766686537db3085f7d6cb40d9
5
5
  SHA512:
6
- metadata.gz: aa17228790e2b026d284272ae7312d9a241d00646be1fb904b863fec037c266d95e853932d3d4c62147db54e9b167d30a89191f50d8d7ae5da74605b963f7100
7
- data.tar.gz: 65a3991a40379500a37789b37af86c258d472d627a48e95f108366050ff9300f7cc4851981e3723092074dbe161d2366935022df629447117a6cce0e7d137609
6
+ metadata.gz: fe823997d5ea50090e1389b1224cd78d9819f2c3f9c64e34451d1902aa1985b0a563f6768be1c873fcc63cc89ef06ea7494f756e2042984eb8d431f9fced8f16
7
+ data.tar.gz: ed8f9612237443578f3c6f862107e1e23639458290e2389409014f001734e6e71198c5b0abde07990d53ed6c4ee408ba3ea9abf4b409669103080cddded2eda1
data/README.md CHANGED
@@ -49,6 +49,7 @@ Configuration and customization can be done for multiple environments and at any
49
49
  - `deployment.logs_resources` (Hash, optional): Configure depending on the app requirements. Default: `{ cpu: { max: '200m', min: '50m' }, mem: { max: '200Mi', min: '50Mi' } }`
50
50
 
51
51
  ### Application deployment.yml for jobs or services without internet interaction (Optional)
52
+ Ideal to run sidekiq or similar jobs without internet connection. (TODO)
52
53
  - `deployment.job_apps[].name` (String, optional): Job deployment name (Note: Underscores are not accepted). Sample: `my-app-job`. Note: This deployment is created only if this value is present
53
54
  - `deployment.job_apps[].command` (String, optional): Bash command to be used for job container. Sample: `bundle exec sidekiq`
54
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,6 +57,7 @@ Configuration and customization can be done for multiple environments and at any
56
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' } }`
57
58
 
58
59
  ### Required settings for Cronjob apps (Note: Cronjobs do not support `sidekiq_alive_gem` and `services`)
60
+ Ideal to asasas (TODO)
59
61
  - `deployment.job_apps[].schedule` (String): Cron schedule. Sample: `*/5 * * * *`
60
62
  - `deployment.job_apps[].kind` (String, default `Deployment`): Kind of job application [`Deployment` or `CronJob`]
61
63
  - `deployment.job_apps[].concurrency_policy` (String, default `Forbid`): [Documentation](https://kubernetes.io/docs/tasks/job/automated-tasks-with-cron-jobs/#concurrency-policy)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module KubernetesHelper
4
- VERSION = '1.19.0'
4
+ VERSION = '1.19.1'
5
5
  end
@@ -22,6 +22,7 @@
22
22
  <% if locals[:job_app][:resources] %>
23
23
  <%= include_template "_resources.yml", locals[:job_app][:resources].merge(tab: 2) %>
24
24
  <% end %>
25
+ ports: [ ]
25
26
  livenessProbe: null
26
27
  readinessProbe: null
27
28
  <%= include_template "_container_extra_settings.yml", { pod: 'job', pod_name: locals[:job_app][:name], tab: 2 } %>
@@ -1,12 +1,15 @@
1
1
  ports: [ ]
2
- <% if (deployment.job_services || []).any? %>
2
+ <% if (locals[:services] || []).any? %>
3
3
  livenessProbe: &liveness_probe
4
4
  exec:
5
5
  command: [ /bin/sh, -c,
6
- 'if [ $(ps -ef | grep "<%= deployment.job_services.join("\\|") %>" | grep -v "grep" | wc -l) -lt <%= deployment.job_services.count %> ]; then
6
+ 'if [ $(ps -ef | grep "<%= locals[:services].join("\\|") %>" | grep -v "grep" | wc -l) -lt <%= locals[:services].count %> ]; then
7
7
  echo "Some required services are not running"; exit 1;
8
8
  fi' ]
9
9
  initialDelaySeconds: 120
10
10
  periodSeconds: 30
11
11
  readinessProbe: *liveness_probe
12
+ <% else %>
13
+ livenessProbe: null
14
+ readinessProbe: null
12
15
  <% end %>
@@ -30,7 +30,7 @@
30
30
  <% if locals[:job_app][:sidekiq_alive_gem] %>
31
31
  <%= include_template "_sidekiq_alive_gem.yml" %>
32
32
  <% else %>
33
- <%= include_template "_job_liveness.yml" %>
33
+ <%= include_template "_job_liveness.yml", { services: locals[:job_app][:services] } %>
34
34
  <% end %>
35
35
 
36
36
  <% if deployment.cloud_secret_name %>
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kubernetes_helper
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.19.0
4
+ version: 1.19.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - owen2345