kubernetes_helper 1.19.0 → 1.19.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +2 -0
- data/lib/kubernetes_helper/version.rb +1 -1
- data/lib/templates/_cronjobs_pod.yml +1 -0
- data/lib/templates/_job_liveness.yml +5 -2
- data/lib/templates/_jobs_pod.yml +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e72fcd92010ce2e1144a926d617c13985b39941ff58e177f24eb8b68828bd572
|
4
|
+
data.tar.gz: f0798e685be4fde2efefd86e3869e05449c871a766686537db3085f7d6cb40d9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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)
|
@@ -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 (
|
2
|
+
<% if (locals[:services] || []).any? %>
|
3
3
|
livenessProbe: &liveness_probe
|
4
4
|
exec:
|
5
5
|
command: [ /bin/sh, -c,
|
6
|
-
'if [ $(ps -ef | grep "<%=
|
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 %>
|
data/lib/templates/_jobs_pod.yml
CHANGED
@@ -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 %>
|