dapp 0.32.8 → 0.32.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: 1d1b5d0ebdabe6d51b8df5119eacf92d563a1d0d7dd6448e02478be668737a40
4
- data.tar.gz: 6a0e31582b9c58048fd4e42705a6fa2cca486734793d44de0370f31eb0ed8c12
3
+ metadata.gz: 84bcab09003b5bcb58dec3ff3c2f9e3c3f5f966f5a4cd0f7f45445002272dea0
4
+ data.tar.gz: 527b07b2fbd2cd2806f5cff2df657f2e2b2f1e628c346bd32c6f4501360375b1
5
5
  SHA512:
6
- metadata.gz: 78424178f65f10b738dfe9c4ff5c6049d3fcb08268f2597d12547bcf2dc67cb2f02901d8d563e132ecdef8b80924bba42a17419404019ea7c77cff1b467d6c6d
7
- data.tar.gz: 4cf3f50a9120eb284746e279927bec7ef1931cf1cb70116b84c02b6937c37f7b5e108e9fce39d6af319c8f44ec6f73379cd9a3aad548d6dca1f18cf4ac8743f0
6
+ metadata.gz: a4e134481c0ded1e4f4ff83014184893766647f727f5ff6364b3ecd299ba4e4092964cd32b6f2b18f96501507a534b7c24ac955f3c903003dc95024831a9644f
7
+ data.tar.gz: 2a0afc03f24a5d010f527711903db5d2114ac3aa223a7f5c9c9c13a27056d2b261191b71ce3d73e0674e7f4d7b9144d7f43305530aff6972a43a29cbb431d2fe
@@ -225,59 +225,65 @@ module Dapp
225
225
  # pod items[] spec containers[] image
226
226
  def pod_images(client)
227
227
  client.pod_list['items'].map do |item|
228
- item['spec']['containers'].map{ |cont| cont['image'] }
228
+ images_from_pod_spec(item)
229
229
  end
230
230
  end
231
231
 
232
232
  # cronjob items[] spec jobTemplate spec template spec containers[] image
233
233
  def cronjob_images(client)
234
234
  client.cronjob_list['items'].map do |item|
235
- item['spec']['jobTemplate']['spec']['template']['spec']['containers'].map{ |cont| cont['image'] }
235
+ images_from_pod_spec(item['spec']['jobTemplate']['spec']['template'])
236
236
  end
237
237
  end
238
238
 
239
239
  # daemonsets items[] spec template spec containers[] image
240
240
  def daemonset_images(client)
241
241
  client.daemonset_list['items'].map do |item|
242
- item['spec']['template']['spec']['containers'].map{ |cont| cont['image'] }
242
+ images_from_pod_spec(item['spec']['template'])
243
243
  end
244
244
  end
245
245
 
246
246
  # deployment items[] spec template spec containers[] image
247
247
  def deployment_images(client)
248
248
  client.deployment_list['items'].map do |item|
249
- item['spec']['template']['spec']['containers'].map{ |cont| cont['image'] }
249
+ images_from_pod_spec(item['spec']['template'])
250
250
  end
251
251
  end
252
252
 
253
253
  # job items[] spec template spec containers[] image
254
254
  def job_images(client)
255
255
  client.job_list['items'].map do |item|
256
- item['spec']['template']['spec']['containers'].map{ |cont| cont['image'] }
256
+ images_from_pod_spec(item['spec']['template'])
257
257
  end
258
258
  end
259
259
 
260
260
  # replicasets items[] spec template spec containers[] image
261
261
  def replicaset_images(client)
262
262
  client.replicaset_list['items'].map do |item|
263
- item['spec']['template']['spec']['containers'].map{ |cont| cont['image'] }
263
+ images_from_pod_spec(item['spec']['template'])
264
264
  end
265
265
  end
266
266
 
267
267
  # replicasets items[] spec template spec containers[] image
268
268
  def statefulset_images(client)
269
269
  client.statefulset_list['items'].map do |item|
270
- item['spec']['template']['spec']['containers'].map{ |cont| cont['image'] }
270
+ images_from_pod_spec(item['spec']['template'])
271
271
  end
272
272
  end
273
273
 
274
274
  # replicationcontroller items[] spec template spec containers[] image
275
275
  def replicationcontroller_images(client)
276
276
  client.replicationcontroller_list['items'].map do |item|
277
- item['spec']['template']['spec']['containers'].map{ |cont| cont['image'] }
277
+ images_from_pod_spec(item['spec']['template'])
278
278
  end
279
279
  end
280
280
 
281
+ def images_from_pod_spec(pod_spec)
282
+ containers = Array(pod_spec['spec']['containers'])
283
+ initContainers = Array(pod_spec['spec']['initContainers'])
284
+ (containers + initContainers).map { |cont| cont['image'] }
285
+ end
286
+
281
287
  def without_kube?
282
288
  !!options[:without_kube]
283
289
  end
data/lib/dapp/version.rb CHANGED
@@ -1,4 +1,4 @@
1
1
  module Dapp
2
- VERSION = "0.32.8"
2
+ VERSION = "0.32.9"
3
3
  BUILD_CACHE_VERSION = 31
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.32.8
4
+ version: 0.32.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