stax-helm 0.0.11 → 0.0.12
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/lib/stax/helm/runcmd.rb +4 -0
- data/lib/stax/helm/version.rb +1 -1
- 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: 3909b351d090d040c868d10944e88a1701d66bba982d32692a278cd15fe3ebce
|
|
4
|
+
data.tar.gz: 51bc19ccc238fff367b62128862836088efbdebff095536816f3432f2112a526
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 49dd63da8e6ce484a620c5f71f73929bf0be858cb793e7b7ad6e596e8c102dacce8d0995e086f22e372ab6695ed79a54eedfcb45b38c9a3b604a22f452e829ab
|
|
7
|
+
data.tar.gz: 433e7b094f0baf03fc2a1690c6da212af9335dbcd8ccccfc31456db5b7c4c519394fe783856cf833f79722984647cd8e666949f47e1bb363e2fa3cf3f97ef001
|
data/lib/stax/helm/runcmd.rb
CHANGED
|
@@ -54,6 +54,7 @@ module Stax
|
|
|
54
54
|
desc 'runcmd [CMD]', 'run dedicated interactive container'
|
|
55
55
|
method_option :sleep, type: :string, default: '1h', description: 'kill container after time'
|
|
56
56
|
method_option :keep, type: :boolean, default: false, description: 'do not delete job'
|
|
57
|
+
method_option :ttl, type: :numeric, default: 30, description: 'secs to keep job after pod terminates'
|
|
57
58
|
def runcmd(*cmd)
|
|
58
59
|
## use default if not set
|
|
59
60
|
cmd = Array(helm_run_cmd) if cmd.empty?
|
|
@@ -79,6 +80,9 @@ module Stax
|
|
|
79
80
|
## add container to Job template
|
|
80
81
|
template[:spec][:template][:spec][:containers] = [ spec ]
|
|
81
82
|
|
|
83
|
+
## add ttl to Job so it will be cleaned up after Pod terminates
|
|
84
|
+
template[:spec][:ttlSecondsAfterFinished] = options[:ttl]
|
|
85
|
+
|
|
82
86
|
## get service account and add to template
|
|
83
87
|
service_account = deployment.dig('spec', 'template', 'spec', 'serviceAccountName')
|
|
84
88
|
template[:spec][:template][:spec][:serviceAccountName] = service_account if service_account
|
data/lib/stax/helm/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: stax-helm
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.12
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Richard Lister
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2021-09-
|
|
11
|
+
date: 2021-09-25 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|