dapp 0.35.43 → 0.35.44

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: 6a5ddc9fb88e7e0a57c6c72af2ac06256d957010054db2c6a9946e0bd6370e8e
4
- data.tar.gz: 63740e105c70bb0e11fd0790a249e3f1bcb511bea16fa3acfa45260e98b70329
3
+ metadata.gz: 99b222c87131f22b52c73a39dd0d70fc2ae726738037ff9a0261820ad3c38712
4
+ data.tar.gz: 48780641e9255822e3c524c60953c16b97517787b0c7989ef108ab59d44a2ba0
5
5
  SHA512:
6
- metadata.gz: c97fc980df42476346bec2f7cb700e6f7276b8e2f3cac21b7653415ed3813f6a65b3e63949b9a07ebf2784aaf29e23acad7041c370375414acea4c203f9e57be
7
- data.tar.gz: 1afcb6c3f29fdb6c7c13e2a14ec414096f9aa0e4a8974c2de3f22e89ad640a0db6ec943729adf224f4fc9eb92a5b0f766fffa55e976cb90579c7c02da8f46646
6
+ metadata.gz: 18f48701ebb7a647d643baf6579d36940149518fab7c056153e8283febd513fb650a977988fedd12020b949eff0063f074427fc021a37705df49a5d87e8fc946
7
+ data.tar.gz: c2ed1618a395fba88cb769e2f97474aac96655b85b6e93685e578f67b682d32fce5d4f8f471949b76ccd3674fe16db048f395da13b63ac60abda9288ac144f83
@@ -74,59 +74,65 @@ module Dapp
74
74
  # pod items[] spec containers[] image
75
75
  def pod_images(client)
76
76
  client.pod_list['items'].map do |item|
77
- item['spec']['containers'].map{ |cont| cont['image'] }
77
+ images_from_pod_spec(item)
78
78
  end
79
79
  end
80
80
 
81
81
  # cronjob items[] spec jobTemplate spec template spec containers[] image
82
82
  def cronjob_images(client)
83
83
  client.cronjob_list['items'].map do |item|
84
- item['spec']['jobTemplate']['spec']['template']['spec']['containers'].map{ |cont| cont['image'] }
84
+ images_from_pod_spec(item['spec']['jobTemplate']['spec']['template'])
85
85
  end
86
86
  end
87
87
 
88
88
  # daemonsets items[] spec template spec containers[] image
89
89
  def daemonset_images(client)
90
90
  client.daemonset_list['items'].map do |item|
91
- item['spec']['template']['spec']['containers'].map{ |cont| cont['image'] }
91
+ images_from_pod_spec(item['spec']['template'])
92
92
  end
93
93
  end
94
94
 
95
95
  # deployment items[] spec template spec containers[] image
96
96
  def deployment_images(client)
97
97
  client.deployment_list['items'].map do |item|
98
- item['spec']['template']['spec']['containers'].map{ |cont| cont['image'] }
98
+ images_from_pod_spec(item['spec']['template'])
99
99
  end
100
100
  end
101
101
 
102
102
  # job items[] spec template spec containers[] image
103
103
  def job_images(client)
104
104
  client.job_list['items'].map do |item|
105
- item['spec']['template']['spec']['containers'].map{ |cont| cont['image'] }
105
+ images_from_pod_spec(item['spec']['template'])
106
106
  end
107
107
  end
108
108
 
109
109
  # replicasets items[] spec template spec containers[] image
110
110
  def replicaset_images(client)
111
111
  client.replicaset_list['items'].map do |item|
112
- item['spec']['template']['spec']['containers'].map{ |cont| cont['image'] }
112
+ images_from_pod_spec(item['spec']['template'])
113
113
  end
114
114
  end
115
115
 
116
116
  # replicasets items[] spec template spec containers[] image
117
117
  def statefulset_images(client)
118
118
  client.statefulset_list['items'].map do |item|
119
- item['spec']['template']['spec']['containers'].map{ |cont| cont['image'] }
119
+ images_from_pod_spec(item['spec']['template'])
120
120
  end
121
121
  end
122
122
 
123
123
  # replicationcontroller items[] spec template spec containers[] image
124
124
  def replicationcontroller_images(client)
125
125
  client.replicationcontroller_list['items'].map do |item|
126
- item['spec']['template']['spec']['containers'].map{ |cont| cont['image'] }
126
+ images_from_pod_spec(item['spec']['template'])
127
127
  end
128
128
  end
129
129
 
130
+ def images_from_pod_spec(pod_spec)
131
+ containers = Array(pod_spec['spec']['containers'])
132
+ initContainers = Array(pod_spec['spec']['initContainers'])
133
+ (containers + initContainers).map { |cont| cont['image'] }
134
+ end
135
+
130
136
  def without_kube?
131
137
  !!options[:without_kube]
132
138
  end
@@ -1,4 +1,4 @@
1
1
  module Dapp
2
- VERSION = "0.35.43"
2
+ VERSION = "0.35.44"
3
3
  BUILD_CACHE_VERSION = 33
4
4
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dapp
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.35.43
4
+ version: 0.35.44
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dmitry Stolyarov
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-12-04 00:00:00.000000000 Z
11
+ date: 2019-02-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: mixlib-shellout
@@ -742,7 +742,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
742
742
  version: 2.5.0
743
743
  requirements: []
744
744
  rubyforge_project:
745
- rubygems_version: 2.7.7
745
+ rubygems_version: 2.7.6
746
746
  signing_key:
747
747
  specification_version: 4
748
748
  summary: Build docker packaged apps using chef or shell