mina-kubernetes 2.2.3 → 2.2.4

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4b7a41b6c828e694f7f34d0a6b83b3f968efdeed4933c119841234a7e8ae53cf
4
- data.tar.gz: 19c70439dff8af06ec903ab246d4c18b12264cc187ca0f9b9d4841d38f8d80f8
3
+ metadata.gz: f827c6cd9bd3a95016a4a551824566ec4bb7d1d40e0477458a237381171d6341
4
+ data.tar.gz: 8a81174a1c647b9ff55e8081b4b2a4e4cbea834a78fd6839192935f6c5a7b62e
5
5
  SHA512:
6
- metadata.gz: b5a625f268be5d1babd3322c7dc1781e5bf30e6ec5737b8459e5ee9f811fa720c85cafab6937c7d9a0dbcf1705c5299196cc8251cf16d609f548842df6d8dc93
7
- data.tar.gz: 1a16eea518ee1f5ec2a0405053a8a76b0c4cdd4652da431e1e76183b49eb58dafaa937d7ff747dc9f71c8fa2833b79c1e8f4b8f0840abe06ec90b66af5d2f017
6
+ metadata.gz: 61bd2dd21d29ccff1c57850d614a1c2957f62180d551b363fc03fd15fbac92462f24e2712f8c1b5575c4341e8cf49cd1cee82ff81d35b586997ef892e96426a0
7
+ data.tar.gz: 1228cb9ff013d0a90d822cb4854cbf4d485a4f7a3323479d092b9149bea197a49b49b58e6d58c90c6a0d5200bb8eac696f721a7e60b0f4cc1e5beecce8a2c496
@@ -1,3 +1,9 @@
1
+ ## 2.2.4
2
+
3
+ *Fixes*
4
+
5
+ - run custom command within given namespace instead of `default`
6
+
1
7
  ## 2.2.1 to 2.2.3
2
8
 
3
9
  *Fixes*
@@ -21,14 +21,14 @@ namespace :kubernetes do
21
21
  desc "Spins up temporary pod with image and opens remote interactive bash"
22
22
  set_tag_from_branch_commit unless fetch(:image_tag)
23
23
  wait_until_image_ready(fetch(:image_tag))
24
- run_terminal_command("bash")
24
+ run_command("bash")
25
25
  end
26
26
 
27
27
  task :command do
28
28
  desc "Spins up temporary pod with image and runs given command in interactive shell, passing given environment variable"
29
29
  set_tag_from_branch_commit unless fetch(:image_tag)
30
30
  wait_until_image_ready(fetch(:image_tag))
31
- run_terminal_command(fetch(:command), env_hash_arg)
31
+ run_command(fetch(:command), env_hash_arg)
32
32
  end
33
33
 
34
34
  task :delete do
@@ -81,11 +81,11 @@ def image_available?(commit)
81
81
  system("docker manifest inspect #{fetch(:image_repo)}:#{commit} > /dev/null") == true
82
82
  end
83
83
 
84
- def run_terminal_command(command, env_hash = {})
84
+ def run_command(command, env_hash = {})
85
85
  env = env_hash.collect{|k,v| "--env #{k}=#{v}" }.join(" ")
86
86
  label = command.downcase.gsub(" ", "-").gsub(":", "-")
87
87
  # using system instead of mina's command so tty opens successfully
88
- system "kubectl run #{label}-#{SecureRandom.hex(4)} --rm -i --tty --restart=Never --context=#{fetch(:kubernetes_context)} --image #{fetch(:image_repo)}:#{fetch(:image_tag)} #{env} -- #{command}"
88
+ system "kubectl run #{label}-#{SecureRandom.hex(4)} --rm -i --tty --restart=Never --context=#{fetch(:kubernetes_context)} --namespace=#{fetch(:namespace)} --image #{fetch(:image_repo)}:#{fetch(:image_tag)} #{env} -- #{command}"
89
89
  end
90
90
 
91
91
  def apply_kubernetes_resources(options)
@@ -1,5 +1,5 @@
1
1
  module Mina
2
2
  module Kubernetes
3
- VERSION = "2.2.3"
3
+ VERSION = "2.2.4"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mina-kubernetes
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.3
4
+ version: 2.2.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Antoine Sabourin
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-11-29 00:00:00.000000000 Z
11
+ date: 2020-01-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -141,7 +141,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
141
141
  - !ruby/object:Gem::Version
142
142
  version: '0'
143
143
  requirements: []
144
- rubygems_version: 3.0.6
144
+ rubygems_version: 3.0.3
145
145
  signing_key:
146
146
  specification_version: 4
147
147
  summary: Mina plugin to streamline deployment of resources to Kubernetes cluster