dapp 0.30.8 → 0.30.9

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: 2516a75d4f8a58101009d26d6a7b1526fc6781922d17e780d9522a0c47472648
4
- data.tar.gz: be39799ce50347f59aa7bfe6737b8a01ccc074ae0c6bed61c638b74ab1f2ee3a
3
+ metadata.gz: b7d8d5655f96b83f1c72d7295dbe45bbf6ca740aa56952cac758f448732ed9bb
4
+ data.tar.gz: d8260992885dc604ff06671b5858a6abb7132a4c82449043fff4f8949fb228a5
5
5
  SHA512:
6
- metadata.gz: aa056b818a6413520a99749d9a6e8a98c9cd46b004dfc74e56ee19d0af5f20080b21e84541340599aac5291e78aed01fc27b40ab81c021892db59f11fb1243fe
7
- data.tar.gz: 74969729bea3665b355c89046391fc6329bf81a4b98b9346780f8d09d18d1beee850227fdb6a8d37506a50249fc016a7eaa43e30a6b220f691e538466eaca571
6
+ metadata.gz: 43e531034f25aa6f968180a5becf7b684c84039f70e6a237b04914863f6d498cb07c45182abf7354d5d705bdef073bcd36bc746a49762211cc2fa0755efb7f17
7
+ data.tar.gz: 593d56d59b4ff0d59621bac06d87c2438b8e876ea85e6b36194b90f7bb0e77c80774faa8424d6a0d38606f8aaa842fe8f3068bae8b6289ef296e9a47d70e6c59
@@ -180,59 +180,65 @@ module Dapp
180
180
  # pod items[] spec containers[] image
181
181
  def pod_images(client)
182
182
  client.pod_list['items'].map do |item|
183
- item['spec']['containers'].map{ |cont| cont['image'] }
183
+ images_from_pod_spec(item)
184
184
  end
185
185
  end
186
186
 
187
187
  # cronjob items[] spec jobTemplate spec template spec containers[] image
188
188
  def cronjob_images(client)
189
189
  client.cronjob_list['items'].map do |item|
190
- item['spec']['jobTemplate']['spec']['template']['spec']['containers'].map{ |cont| cont['image'] }
190
+ images_from_pod_spec(item['spec']['jobTemplate']['spec']['template'])
191
191
  end
192
192
  end
193
193
 
194
194
  # daemonsets items[] spec template spec containers[] image
195
195
  def daemonset_images(client)
196
196
  client.daemonset_list['items'].map do |item|
197
- item['spec']['template']['spec']['containers'].map{ |cont| cont['image'] }
197
+ images_from_pod_spec(item['spec']['template'])
198
198
  end
199
199
  end
200
200
 
201
201
  # deployment items[] spec template spec containers[] image
202
202
  def deployment_images(client)
203
203
  client.deployment_list['items'].map do |item|
204
- item['spec']['template']['spec']['containers'].map{ |cont| cont['image'] }
204
+ images_from_pod_spec(item['spec']['template'])
205
205
  end
206
206
  end
207
207
 
208
208
  # job items[] spec template spec containers[] image
209
209
  def job_images(client)
210
210
  client.job_list['items'].map do |item|
211
- item['spec']['template']['spec']['containers'].map{ |cont| cont['image'] }
211
+ images_from_pod_spec(item['spec']['template'])
212
212
  end
213
213
  end
214
214
 
215
215
  # replicasets items[] spec template spec containers[] image
216
216
  def replicaset_images(client)
217
217
  client.replicaset_list['items'].map do |item|
218
- item['spec']['template']['spec']['containers'].map{ |cont| cont['image'] }
218
+ images_from_pod_spec(item['spec']['template'])
219
219
  end
220
220
  end
221
221
 
222
222
  # replicasets items[] spec template spec containers[] image
223
223
  def statefulset_images(client)
224
224
  client.statefulset_list['items'].map do |item|
225
- item['spec']['template']['spec']['containers'].map{ |cont| cont['image'] }
225
+ images_from_pod_spec(item['spec']['template'])
226
226
  end
227
227
  end
228
228
 
229
229
  # replicationcontroller items[] spec template spec containers[] image
230
230
  def replicationcontroller_images(client)
231
231
  client.replicationcontroller_list['items'].map do |item|
232
- item['spec']['template']['spec']['containers'].map{ |cont| cont['image'] }
232
+ images_from_pod_spec(item['spec']['template'])
233
233
  end
234
234
  end
235
235
 
236
+ def images_from_pod_spec(pod_spec)
237
+ containers = Array(pod_spec['spec']['containers'])
238
+ initContainers = Array(pod_spec['spec']['initContainers'])
239
+ (containers + initContainers).map { |cont| cont['image'] }
240
+ end
241
+
236
242
  def without_kube?
237
243
  !!options[:without_kube]
238
244
  end
@@ -1,4 +1,4 @@
1
1
  module Dapp
2
- VERSION = "0.30.8"
2
+ VERSION = "0.30.9"
3
3
  BUILD_CACHE_VERSION = 30
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.30.8
4
+ version: 0.30.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dmitry Stolyarov
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-01-31 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