fog-kubevirt 1.2.0 → 1.2.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9d1fc639c608aa3c0bd89f32e9add52b726df21a
4
- data.tar.gz: e4ac9e0849cd5804cb3bf21c0ba0dc31652bf8d0
3
+ metadata.gz: ad474ce450c83ef40e7a0b38ca808893443a774f
4
+ data.tar.gz: a45d0c1342ba6d83ff2f61aa2def546a68401277
5
5
  SHA512:
6
- metadata.gz: d84beb7ef3b1ed0a1c88ecfa08e064a85dbb4d9ae3ac3f60f81f7be8c9fc6415ada3a70d732f4def3ffc5a689fd1eba569e1322410a9a8c532b7d4bbe11d7a06
7
- data.tar.gz: fa71d52ada8bbf8a397646c32a5b22c656cd40f0c8c4d44abc6396b4055163ed10896a5865cc105317149fdd8dd66c4a18f30caecc466d1713cfe369f8fb024b
6
+ metadata.gz: 9ee62b253c3db993f8ec5ce4c634fcba86df64b0ae08d89c19dd95b3c1acc6d9e1c738423cd76e039a81683777723cc8c9027cc04e9f0a8bfb04ba837e6f1696
7
+ data.tar.gz: e0e42f5d0e4b4eaa569931de9bb4c9cb19bfb5b7d1b92205b8c874298a8838a8cc5a3b48931c3f1fceed65d0dfd8261cd1a60358963295f3db00ace856875260
@@ -45,15 +45,19 @@ module Fog
45
45
  },
46
46
  :spec => {
47
47
  :storageClassName => args[:storage_class],
48
- :resources => {},
49
- :selector => {},
48
+ :resources => {}
50
49
  }
51
50
  }
52
51
 
53
52
  pvc[:spec][:resources].merge!(:requests => args[:requests]) if args[:requests]
54
53
  pvc[:spec][:resources].merge!(:limits => args[:limits]) if args[:limits]
55
- pvc[:spec][:selector].merge!(:matchLabels => args[:match_labels]) if args[:match_labels]
56
- pvc[:spec][:selector].merge!(:matchExpressions => args[:match_expressions]) if args[:match_expressions]
54
+
55
+ if args[:match_labels] || args[:match_expressions]
56
+ pvc[:spec][:selector] = {}
57
+ pvc[:spec][:selector].merge!(:matchLabels => args[:match_labels]) if args[:match_labels]
58
+ pvc[:spec][:selector].merge!(:matchExpressions => args[:match_expressions]) if args[:match_expressions]
59
+ end
60
+
57
61
  pvc[:spec][:accessModes] = args[:access_modes] if args[:access_modes]
58
62
  pvc[:spec][:volumeMode] = args[:volume_mode] if args[:volume_mode]
59
63
  pvc[:spec][:volumeName] = args[:volume_name] if args[:volume_name]
@@ -9,6 +9,7 @@ module Fog
9
9
 
10
10
  model Fog::Kubevirt::Compute::Server
11
11
 
12
+ # filters[Hash] - if contains ':pvcs' set to true will popoulate pvcs for vms
12
13
  def all(filters = {})
13
14
  servers = service.list_servers(filters)
14
15
  @kind = servers.kind
@@ -43,7 +43,7 @@ module Fog
43
43
  :disks => disks,
44
44
  :volumes => parse_volumes(spec[:volumes], disks),
45
45
  :status => object[:spec][:running].to_s == "true" ? "running" : "stopped",
46
- :interfaces => parse_interfaces(domain[:devices][:interfaces]),
46
+ :interfaces => parse_interfaces(domain[:devices][:interfaces], object[:status].nil? ? [] : object[:status][:interfaces]),
47
47
  :networks => parse_networks(spec[:networks]),
48
48
  :machine_type => domain.dig(:machine, :type)
49
49
  }
@@ -12,13 +12,15 @@ module Fog
12
12
  #
13
13
  # @param object [Hash] A hash with raw interfaces data.
14
14
  #
15
- def parse_interfaces(object)
15
+ def parse_interfaces(object, object_status)
16
16
  return {} if object.nil?
17
17
  nics = []
18
18
  object.each do |iface|
19
19
  nic = VmNic.new
20
20
  nic.name = iface[:name]
21
- nic.mac_address = iface[:macAddress]
21
+ status_iface = object_status.find { |hash| hash[:name] == iface[:name] }
22
+ # get mac address from status and use device definition if not available
23
+ nic.mac_address = !status_iface.nil? && status_iface.key?(:mac) ? status_iface[:mac] : iface[:macAddress]
22
24
  nic.type = 'bridge' if iface.keys.include?(:bridge)
23
25
  nic.type = 'slirp' if iface.keys.include?(:slirp)
24
26
  nics << nic
@@ -40,7 +40,7 @@ module Fog
40
40
  :memory => domain[:resources][:requests][:memory],
41
41
  :disks => disks,
42
42
  :volumes => parse_volumes(spec[:volumes], disks),
43
- :interfaces => parse_interfaces(domain[:devices][:interfaces]),
43
+ :interfaces => parse_interfaces(domain[:devices][:interfaces], status[:interfaces]),
44
44
  :networks => parse_networks(spec[:networks]),
45
45
  :ip_address => status.dig(:interfaces, 0, :ipAddress),
46
46
  :node_name => status[:nodeName],
@@ -95,7 +95,7 @@ module Fog
95
95
  :dataSource=>nil}
96
96
  result.status={:phase=>"Pending"}
97
97
  result
98
- end
98
+ end
99
99
  end
100
100
  end
101
101
  end
@@ -5,7 +5,9 @@ module Fog
5
5
  def get_server(name)
6
6
  vm = get_raw_vm(name)
7
7
  populate_runtime_info(vm)
8
- Server.parse vm
8
+ server = Server.parse vm
9
+ populate_pvcs_for_vm(server)
10
+ server
9
11
  end
10
12
 
11
13
  # Updates a given VM raw entity with vm instance info if exists
@@ -3,7 +3,19 @@ module Fog
3
3
  class Compute
4
4
  class Real
5
5
  def get_vm(name)
6
- Vm.parse get_raw_vm(name)
6
+ vm = Vm.parse get_raw_vm(name)
7
+ populate_pvcs_for_vm(vm)
8
+ vm
9
+ end
10
+
11
+ def populate_pvcs_for_vm(vm)
12
+ vm[:volumes].each do |vol|
13
+ begin
14
+ vol.pvc = pvcs.get(vol.info) if vol.type == 'persistentVolumeClaim'
15
+ rescue
16
+ # there is an option that the PVC does not exist
17
+ end
18
+ end
7
19
  end
8
20
 
9
21
  def get_raw_vm(name)
@@ -5,12 +5,17 @@ module Fog
5
5
  module Kubevirt
6
6
  class Compute
7
7
  class Real
8
- def list_servers(_filters = {})
8
+ # filters[Hash] - if contains ':pvcs' set to true will popoulate pvcs for vms
9
+ def list_servers(filters = {})
9
10
  vms = kubevirt_client.get_virtual_machines(namespace: @namespace)
10
11
  entities = vms.map do |kubevirt_obj|
11
12
  vm_obj = object_to_hash(kubevirt_obj)
12
13
  populate_runtime_info(vm_obj)
13
- Server.parse vm_obj
14
+ server = Server.parse vm_obj
15
+ if filters[:pvcs]
16
+ populate_pvcs_for_vm(server)
17
+ end
18
+ server
14
19
  end
15
20
  EntityCollection.new(vms.kind, vms.resourceVersion, entities)
16
21
  end
@@ -4,10 +4,15 @@ module Fog
4
4
  module Kubevirt
5
5
  class Compute
6
6
  class Real
7
- def list_vms(_filters = {})
7
+ # filters[Hash] - if contains ':pvcs' set to true will popoulate pvcs for vms
8
+ def list_vms(filters = {})
8
9
  vms = kubevirt_client.get_virtual_machines(namespace: @namespace)
9
10
  entities = vms.map do |kubevirt_obj|
10
- Vm.parse object_to_hash(kubevirt_obj)
11
+ vm = Vm.parse object_to_hash(kubevirt_obj)
12
+ if filters[:pvcs]
13
+ populate_pvcs_for_vm(vm)
14
+ end
15
+ vm
11
16
  end
12
17
  EntityCollection.new(vms.kind, vms.resourceVersion, entities)
13
18
  end
@@ -1,5 +1,5 @@
1
1
  module Fog
2
2
  module Kubevirt
3
- VERSION = '1.2.0'
3
+ VERSION = '1.2.1'
4
4
  end
5
5
  end
@@ -19,6 +19,8 @@ describe Fog::Compute do
19
19
  vm_name = 'test'
20
20
  cpus = 1
21
21
  memory_size = 64
22
+ pvc1 = 'mypvc1'
23
+ pvc2 = 'mypvc2'
22
24
 
23
25
  # PVCs should already be created
24
26
  volume1 = Fog::Kubevirt::Compute::Volume.new
@@ -26,14 +28,14 @@ describe Fog::Compute do
26
28
  volume1.name = 'test-disk-01'
27
29
  volume1.boot_order = 1
28
30
  volume1.bus = 'virtio'
29
- volume1.info = 'mypvc1'
31
+ volume1.info = pvc1
30
32
 
31
33
  volume2 = Fog::Kubevirt::Compute::Volume.new
32
34
  volume2.type = 'persistentVolumeClaim'
33
35
  volume2.name = 'test-disk-02'
34
36
  volume2.boot_order = 2
35
37
  volume2.bus = 'virtio'
36
- volume2.info = 'mypvc2'
38
+ volume2.info = pvc2
37
39
 
38
40
  volume3 = Fog::Kubevirt::Compute::Volume.new
39
41
  volume3.type = 'hostDisk'
@@ -45,6 +47,8 @@ describe Fog::Compute do
45
47
  :type => 'DiskOrCreate'
46
48
  }
47
49
 
50
+ create_pvc(@service, pvc1)
51
+ create_pvc(@service, pvc2)
48
52
  @service.vms.create(vm_name: vm_name, cpus: cpus, memory_size: memory_size, volumes: [volume1, volume2, volume3])
49
53
 
50
54
  vm = @service.vms.get(vm_name)
@@ -56,7 +60,17 @@ describe Fog::Compute do
56
60
  # verify first claim values
57
61
  volume = volumes.select { |v| v.name == 'test-disk-01' }.first
58
62
  refute_nil(volume)
63
+ refute_nil(volume.pvc)
59
64
  assert_equal(volume.name, 'test-disk-01')
65
+ assert_equal(volume.pvc.name, pvc1)
66
+ assert_equal(volume.type, 'persistentVolumeClaim')
67
+
68
+ # verify second claim values
69
+ volume = volumes.select { |v| v.name == 'test-disk-02' }.first
70
+ refute_nil(volume)
71
+ refute_nil(volume.pvc)
72
+ assert_equal(volume.pvc.name, pvc2)
73
+ assert_equal(volume.name, 'test-disk-02')
60
74
  assert_equal(volume.type, 'persistentVolumeClaim')
61
75
 
62
76
  # verify third claim values
@@ -66,10 +80,25 @@ describe Fog::Compute do
66
80
  assert_equal(volume.type, 'hostDisk')
67
81
  ensure
68
82
  @service.vms.delete(vm_name) if vm
83
+ @service.pvcs.delete(pvc1)
84
+ @service.pvcs.delete(pvc2)
69
85
  end
70
86
  end
71
87
  end
72
88
 
89
+ def create_pvc(service, name)
90
+ namespace = 'default'
91
+ access_modes = [ 'ReadWriteOnce' ]
92
+ storage_class = 'local-storage'
93
+ requests = { storage: "1Gi" }
94
+
95
+ service.pvcs.create(name: name,
96
+ namespace: namespace,
97
+ access_modes: access_modes,
98
+ storage_class: storage_class,
99
+ requests: requests)
100
+ end
101
+
73
102
  it 'creates vm with single pvc' do
74
103
  VCR.use_cassette("vm_create_single") do
75
104
  begin
@@ -21,7 +21,7 @@ http_interactions:
21
21
  Content-Type:
22
22
  - application/json
23
23
  Date:
24
- - Sun, 24 Mar 2019 20:18:17 GMT
24
+ - Thu, 11 Apr 2019 14:12:22 GMT
25
25
  Content-Length:
26
26
  - '137'
27
27
  body:
@@ -30,7 +30,7 @@ http_interactions:
30
30
 
31
31
  '
32
32
  http_version:
33
- recorded_at: Sun, 24 Mar 2019 20:18:17 GMT
33
+ recorded_at: Thu, 11 Apr 2019 14:12:22 GMT
34
34
  - request:
35
35
  method: get
36
36
  uri: https://10.8.254.82:8443/api/v1
@@ -54,7 +54,7 @@ http_interactions:
54
54
  Content-Type:
55
55
  - application/json
56
56
  Date:
57
- - Sun, 24 Mar 2019 20:18:17 GMT
57
+ - Thu, 11 Apr 2019 14:12:22 GMT
58
58
  Transfer-Encoding:
59
59
  - chunked
60
60
  body:
@@ -63,13 +63,13 @@ http_interactions:
63
63
 
64
64
  '
65
65
  http_version:
66
- recorded_at: Sun, 24 Mar 2019 20:18:17 GMT
66
+ recorded_at: Thu, 11 Apr 2019 14:12:22 GMT
67
67
  - request:
68
68
  method: post
69
69
  uri: https://10.8.254.82:8443/api/v1/namespaces/default/persistentvolumeclaims
70
70
  body:
71
71
  encoding: UTF-8
72
- string: '{"apiVersion":"v1","kind":"PersistentVolumeClaim","metadata":{"name":"my-local-storage-pvc","namespace":"default"},"spec":{"storageClassName":"manual","resources":{"requests":{"storage":"2Gi"},"limits":{"storage":"3Gi"}},"selector":{"matchLabels":{},"matchExpressions":[]},"accessModes":["ReadWriteOnce"],"volumeMode":"Filesystem","volumeName":"my-local-storage"}}'
72
+ string: '{"apiVersion":"v1","kind":"PersistentVolumeClaim","metadata":{"name":"my-local-storage-pvc","namespace":"default"},"spec":{"storageClassName":"manual","resources":{"requests":{"storage":"2Gi"},"limits":{"storage":"3Gi"}},"selector":{"matchLabels":{"component":"test"},"matchExpressions":[{"key":"tier","operator":"In","values":["dev"]}]},"accessModes":["ReadWriteOnce"],"volumeMode":"Filesystem","volumeName":"my-local-storage"}}'
73
73
  headers:
74
74
  Accept:
75
75
  - "*/*"
@@ -82,7 +82,7 @@ http_interactions:
82
82
  Authorization:
83
83
  - Bearer eyJhbGciOiJSUzI1NiIsImtpZCI6IiJ9.eyJpc3MiOiJrdWJlcm5ldGVzL3NlcnZpY2VhY2NvdW50Iiwia3ViZXJuZXRlcy5pby9zZXJ2aWNlYWNjb3VudC9uYW1lc3BhY2UiOiJkZWZhdWx0Iiwia3ViZXJuZXRlcy5pby9zZXJ2aWNlYWNjb3VudC9zZWNyZXQubmFtZSI6ImZvcmVtYW4tYWNjb3VudC10b2tlbi1yY3ByMiIsImt1YmVybmV0ZXMuaW8vc2VydmljZWFjY291bnQvc2VydmljZS1hY2NvdW50Lm5hbWUiOiJmb3JlbWFuLWFjY291bnQiLCJrdWJlcm5ldGVzLmlvL3NlcnZpY2VhY2NvdW50L3NlcnZpY2UtYWNjb3VudC51aWQiOiI1OGY3NTc4NC0yMjUyLTExZTktYjU1NS01MjU0MDA3ZDM1M2QiLCJzdWIiOiJzeXN0ZW06c2VydmljZWFjY291bnQ6ZGVmYXVsdDpmb3JlbWFuLWFjY291bnQifQ.UDzZu0_mLkJZvgeGE-lgKJOXtwWGt6WoNuEpm8k7VK61_bQFavEsETRUrGar68cebUPdUTWFoFlVStcQXoQoS0PUvqNPmznBcHDUW5Jw7pKaLHUhsqQkOoNzDD4eGcl1KDoagL1E-CkTglcYiMYHM9yykxnK58jyP3HF1rsDLG-c8N-T3bK_tLQ__eqKwPJ7R3RHuCg3M5FX1mH86wuaEsOPW3KW7tlGQpP5hj33-97KMp4GgH3pZMTLgo1JDwGT2GXPW12V7juE18KEvvot6q5S0Akl85Vp_5NCxNANRG9YCsSnUiB1opHBqfTxIO1ykSYHfg2IkuovQh68HDNV5A
84
84
  Content-Length:
85
- - '364'
85
+ - '429'
86
86
  response:
87
87
  status:
88
88
  code: 201
@@ -91,16 +91,16 @@ http_interactions:
91
91
  Content-Type:
92
92
  - application/json
93
93
  Date:
94
- - Sun, 24 Mar 2019 20:18:17 GMT
94
+ - Thu, 11 Apr 2019 14:12:22 GMT
95
95
  Content-Length:
96
- - '574'
96
+ - '677'
97
97
  body:
98
98
  encoding: UTF-8
99
- string: '{"kind":"PersistentVolumeClaim","apiVersion":"v1","metadata":{"name":"my-local-storage-pvc","namespace":"default","selfLink":"/api/v1/namespaces/default/persistentvolumeclaims/my-local-storage-pvc","uid":"f616f5ab-4e71-11e9-8e8c-5254007d353d","resourceVersion":"3258448","creationTimestamp":"2019-03-24T20:18:17Z"},"spec":{"accessModes":["ReadWriteOnce"],"selector":{},"resources":{"limits":{"storage":"3Gi"},"requests":{"storage":"2Gi"}},"volumeName":"my-local-storage","storageClassName":"manual","volumeMode":"Filesystem","dataSource":null},"status":{"phase":"Pending"}}
99
+ string: '{"kind":"PersistentVolumeClaim","apiVersion":"v1","metadata":{"name":"my-local-storage-pvc","namespace":"default","selfLink":"/api/v1/namespaces/default/persistentvolumeclaims/my-local-storage-pvc","uid":"d31aef1f-5c63-11e9-8e5e-5254007d353d","resourceVersion":"4640056","creationTimestamp":"2019-04-11T14:12:22Z"},"spec":{"accessModes":["ReadWriteOnce"],"selector":{"matchLabels":{"component":"test"},"matchExpressions":[{"key":"tier","operator":"In","values":["dev"]}]},"resources":{"limits":{"storage":"3Gi"},"requests":{"storage":"2Gi"}},"volumeName":"my-local-storage","storageClassName":"manual","volumeMode":"Filesystem","dataSource":null},"status":{"phase":"Pending"}}
100
100
 
101
101
  '
102
102
  http_version:
103
- recorded_at: Sun, 24 Mar 2019 20:18:17 GMT
103
+ recorded_at: Thu, 11 Apr 2019 14:12:22 GMT
104
104
  - request:
105
105
  method: get
106
106
  uri: https://10.8.254.82:8443/api
@@ -122,7 +122,7 @@ http_interactions:
122
122
  Content-Type:
123
123
  - application/json
124
124
  Date:
125
- - Sun, 24 Mar 2019 20:18:17 GMT
125
+ - Thu, 11 Apr 2019 14:12:22 GMT
126
126
  Content-Length:
127
127
  - '137'
128
128
  body:
@@ -131,7 +131,7 @@ http_interactions:
131
131
 
132
132
  '
133
133
  http_version:
134
- recorded_at: Sun, 24 Mar 2019 20:18:17 GMT
134
+ recorded_at: Thu, 11 Apr 2019 14:12:22 GMT
135
135
  - request:
136
136
  method: get
137
137
  uri: https://10.8.254.82:8443/api/v1/namespaces/default/persistentvolumeclaims/my-local-storage-pvc
@@ -155,16 +155,16 @@ http_interactions:
155
155
  Content-Type:
156
156
  - application/json
157
157
  Date:
158
- - Sun, 24 Mar 2019 20:18:17 GMT
158
+ - Thu, 11 Apr 2019 14:12:22 GMT
159
159
  Content-Length:
160
- - '620'
160
+ - '723'
161
161
  body:
162
162
  encoding: UTF-8
163
- string: '{"kind":"PersistentVolumeClaim","apiVersion":"v1","metadata":{"name":"my-local-storage-pvc","namespace":"default","selfLink":"/api/v1/namespaces/default/persistentvolumeclaims/my-local-storage-pvc","uid":"f616f5ab-4e71-11e9-8e8c-5254007d353d","resourceVersion":"3258449","creationTimestamp":"2019-03-24T20:18:17Z","finalizers":["kubernetes.io/pvc-protection"]},"spec":{"accessModes":["ReadWriteOnce"],"selector":{},"resources":{"limits":{"storage":"3Gi"},"requests":{"storage":"2Gi"}},"volumeName":"my-local-storage","storageClassName":"manual","volumeMode":"Filesystem","dataSource":null},"status":{"phase":"Pending"}}
163
+ string: '{"kind":"PersistentVolumeClaim","apiVersion":"v1","metadata":{"name":"my-local-storage-pvc","namespace":"default","selfLink":"/api/v1/namespaces/default/persistentvolumeclaims/my-local-storage-pvc","uid":"d31aef1f-5c63-11e9-8e5e-5254007d353d","resourceVersion":"4640057","creationTimestamp":"2019-04-11T14:12:22Z","finalizers":["kubernetes.io/pvc-protection"]},"spec":{"accessModes":["ReadWriteOnce"],"selector":{"matchLabels":{"component":"test"},"matchExpressions":[{"key":"tier","operator":"In","values":["dev"]}]},"resources":{"limits":{"storage":"3Gi"},"requests":{"storage":"2Gi"}},"volumeName":"my-local-storage","storageClassName":"manual","volumeMode":"Filesystem","dataSource":null},"status":{"phase":"Pending"}}
164
164
 
165
165
  '
166
166
  http_version:
167
- recorded_at: Sun, 24 Mar 2019 20:18:17 GMT
167
+ recorded_at: Thu, 11 Apr 2019 14:12:22 GMT
168
168
  - request:
169
169
  method: get
170
170
  uri: https://10.8.254.82:8443/api
@@ -186,7 +186,7 @@ http_interactions:
186
186
  Content-Type:
187
187
  - application/json
188
188
  Date:
189
- - Sun, 24 Mar 2019 20:18:17 GMT
189
+ - Thu, 11 Apr 2019 14:12:22 GMT
190
190
  Content-Length:
191
191
  - '137'
192
192
  body:
@@ -195,7 +195,7 @@ http_interactions:
195
195
 
196
196
  '
197
197
  http_version:
198
- recorded_at: Sun, 24 Mar 2019 20:18:17 GMT
198
+ recorded_at: Thu, 11 Apr 2019 14:12:22 GMT
199
199
  - request:
200
200
  method: get
201
201
  uri: https://10.8.254.82:8443/api/v1/namespaces/default/persistentvolumeclaims
@@ -219,16 +219,16 @@ http_interactions:
219
219
  Content-Type:
220
220
  - application/json
221
221
  Date:
222
- - Sun, 24 Mar 2019 20:18:17 GMT
222
+ - Thu, 11 Apr 2019 14:12:22 GMT
223
223
  Transfer-Encoding:
224
224
  - chunked
225
225
  body:
226
226
  encoding: UTF-8
227
- string: '{"kind":"PersistentVolumeClaimList","apiVersion":"v1","metadata":{"selfLink":"/api/v1/namespaces/default/persistentvolumeclaims","resourceVersion":"3258451"},"items":[{"metadata":{"name":"example-local-claim","namespace":"default","selfLink":"/api/v1/namespaces/default/persistentvolumeclaims/example-local-claim","uid":"9dff5ace-4aee-11e9-8999-5254007d353d","resourceVersion":"2657730","creationTimestamp":"2019-03-20T09:00:32Z","annotations":{"pv.kubernetes.io/bind-completed":"yes","pv.kubernetes.io/bound-by-controller":"yes"},"finalizers":["kubernetes.io/pvc-protection"]},"spec":{"accessModes":["ReadWriteOnce"],"resources":{"requests":{"storage":"5Gi"}},"volumeName":"example-local-pv","storageClassName":"local-storage","volumeMode":"Filesystem","dataSource":null},"status":{"phase":"Bound","accessModes":["ReadWriteOnce"],"capacity":{"storage":"10Gi"}}},{"metadata":{"name":"my-local-storage-pvc","namespace":"default","selfLink":"/api/v1/namespaces/default/persistentvolumeclaims/my-local-storage-pvc","uid":"f616f5ab-4e71-11e9-8e8c-5254007d353d","resourceVersion":"3258449","creationTimestamp":"2019-03-24T20:18:17Z","finalizers":["kubernetes.io/pvc-protection"]},"spec":{"accessModes":["ReadWriteOnce"],"selector":{},"resources":{"limits":{"storage":"3Gi"},"requests":{"storage":"2Gi"}},"volumeName":"my-local-storage","storageClassName":"manual","volumeMode":"Filesystem","dataSource":null},"status":{"phase":"Pending"}},{"metadata":{"name":"task-pvc-1","namespace":"default","selfLink":"/api/v1/namespaces/default/persistentvolumeclaims/task-pvc-1","uid":"dcae2a60-2271-11e9-94df-5254007d353d","resourceVersion":"24786","creationTimestamp":"2019-01-27T20:26:44Z","annotations":{"pv.kubernetes.io/bind-completed":"yes"},"finalizers":["kubernetes.io/pvc-protection"]},"spec":{"accessModes":["ReadWriteOnce"],"resources":{"requests":{"storage":"1Gi"}},"volumeName":"task-pv-volume1","storageClassName":"manual","volumeMode":"Filesystem","dataSource":null},"status":{"phase":"Bound","accessModes":["ReadWriteOnce"],"capacity":{"storage":"10Gi"}}},{"metadata":{"name":"task-pvc-2","namespace":"default","selfLink":"/api/v1/namespaces/default/persistentvolumeclaims/task-pvc-2","uid":"de51baab-2271-11e9-94df-5254007d353d","resourceVersion":"24769","creationTimestamp":"2019-01-27T20:26:46Z","annotations":{"pv.kubernetes.io/bind-completed":"yes"},"finalizers":["kubernetes.io/pvc-protection"]},"spec":{"accessModes":["ReadWriteOnce"],"resources":{"requests":{"storage":"2Gi"}},"volumeName":"task-pv-volume2","storageClassName":"manual","volumeMode":"Filesystem","dataSource":null},"status":{"phase":"Bound","accessModes":["ReadWriteOnce"],"capacity":{"storage":"10Gi"}}},{"metadata":{"name":"task-pvc-3","namespace":"default","selfLink":"/api/v1/namespaces/default/persistentvolumeclaims/task-pvc-3","uid":"dff6a5e1-2271-11e9-94df-5254007d353d","resourceVersion":"24784","creationTimestamp":"2019-01-27T20:26:49Z","annotations":{"pv.kubernetes.io/bind-completed":"yes"},"finalizers":["kubernetes.io/pvc-protection"]},"spec":{"accessModes":["ReadWriteOnce"],"resources":{"requests":{"storage":"3Gi"}},"volumeName":"task-pv-volume3","storageClassName":"manual","volumeMode":"Filesystem","dataSource":null},"status":{"phase":"Bound","accessModes":["ReadWriteOnce"],"capacity":{"storage":"10Gi"}}},{"metadata":{"name":"task-pvc-4","namespace":"default","selfLink":"/api/v1/namespaces/default/persistentvolumeclaims/task-pvc-4","uid":"e1be5a89-2271-11e9-94df-5254007d353d","resourceVersion":"24824","creationTimestamp":"2019-01-27T20:26:52Z","annotations":{"pv.kubernetes.io/bind-completed":"yes"},"finalizers":["kubernetes.io/pvc-protection"]},"spec":{"accessModes":["ReadWriteOnce"],"resources":{"requests":{"storage":"4Gi"}},"volumeName":"task-pv-volume4","storageClassName":"manual","volumeMode":"Filesystem","dataSource":null},"status":{"phase":"Bound","accessModes":["ReadWriteOnce"],"capacity":{"storage":"10Gi"}}},{"metadata":{"name":"task-pvc-5","namespace":"default","selfLink":"/api/v1/namespaces/default/persistentvolumeclaims/task-pvc-5","uid":"e34e0a43-2271-11e9-94df-5254007d353d","resourceVersion":"24826","creationTimestamp":"2019-01-27T20:26:55Z","annotations":{"pv.kubernetes.io/bind-completed":"yes"},"finalizers":["kubernetes.io/pvc-protection"]},"spec":{"accessModes":["ReadWriteOnce"],"resources":{"requests":{"storage":"5Gi"}},"volumeName":"task-pv-volume5","storageClassName":"manual","volumeMode":"Filesystem","dataSource":null},"status":{"phase":"Bound","accessModes":["ReadWriteOnce"],"capacity":{"storage":"10Gi"}}}]}
227
+ string: '{"kind":"PersistentVolumeClaimList","apiVersion":"v1","metadata":{"selfLink":"/api/v1/namespaces/default/persistentvolumeclaims","resourceVersion":"4640057"},"items":[{"metadata":{"name":"devin-remis-example-com-claim-1","namespace":"default","selfLink":"/api/v1/namespaces/default/persistentvolumeclaims/devin-remis-example-com-claim-1","uid":"5f1ec8a1-57b1-11e9-b51c-5254007d353d","resourceVersion":"4236770","creationTimestamp":"2019-04-05T14:44:52Z","annotations":{"pv.kubernetes.io/bind-completed":"yes","pv.kubernetes.io/bound-by-controller":"yes"},"finalizers":["kubernetes.io/pvc-protection"]},"spec":{"accessModes":["ReadWriteOnce"],"selector":{},"resources":{"requests":{"storage":"4G"}},"volumeName":"example-local-pv-1","storageClassName":"local-storage","volumeMode":"Filesystem","dataSource":null},"status":{"phase":"Bound","accessModes":["ReadWriteOnce"],"capacity":{"storage":"10Gi"}}},{"metadata":{"name":"devin-remis-example-com-claim-2","namespace":"default","selfLink":"/api/v1/namespaces/default/persistentvolumeclaims/devin-remis-example-com-claim-2","uid":"5f20c6ee-57b1-11e9-b51c-5254007d353d","resourceVersion":"4236767","creationTimestamp":"2019-04-05T14:44:52Z","annotations":{"pv.kubernetes.io/bind-completed":"yes","pv.kubernetes.io/bound-by-controller":"yes"},"finalizers":["kubernetes.io/pvc-protection"]},"spec":{"accessModes":["ReadWriteOnce"],"selector":{},"resources":{"requests":{"storage":"2G"}},"volumeName":"local-pv-5","storageClassName":"local-storage","volumeMode":"Filesystem","dataSource":null},"status":{"phase":"Bound","accessModes":["ReadWriteOnce"],"capacity":{"storage":"10Gi"}}},{"metadata":{"name":"example-local-claim-with-nil-selector","namespace":"default","selfLink":"/api/v1/namespaces/default/persistentvolumeclaims/example-local-claim-with-nil-selector","uid":"af6adaba-5a40-11e9-b51c-5254007d353d","resourceVersion":"4446907","creationTimestamp":"2019-04-08T20:55:47Z","finalizers":["kubernetes.io/pvc-protection"]},"spec":{"accessModes":["ReadWriteOnce"],"resources":{"requests":{"storage":"5Gi"}},"storageClassName":"local-storage","volumeMode":"Filesystem","dataSource":null},"status":{"phase":"Pending"}},{"metadata":{"name":"example-local-claim-with-selector","namespace":"default","selfLink":"/api/v1/namespaces/default/persistentvolumeclaims/example-local-claim-with-selector","uid":"692af35f-5a40-11e9-b51c-5254007d353d","resourceVersion":"4446684","creationTimestamp":"2019-04-08T20:53:50Z","finalizers":["kubernetes.io/pvc-protection"]},"spec":{"accessModes":["ReadWriteOnce"],"selector":{},"resources":{"requests":{"storage":"5Gi"}},"storageClassName":"local-storage","volumeMode":"Filesystem","dataSource":null},"status":{"phase":"Pending"}},{"metadata":{"name":"example-no-selector","namespace":"default","selfLink":"/api/v1/namespaces/default/persistentvolumeclaims/example-no-selector","uid":"3d898e9e-5a40-11e9-b51c-5254007d353d","resourceVersion":"4447659","creationTimestamp":"2019-04-08T20:52:36Z","annotations":{"pv.kubernetes.io/bind-completed":"yes","pv.kubernetes.io/bound-by-controller":"yes"},"finalizers":["kubernetes.io/pvc-protection"]},"spec":{"accessModes":["ReadWriteOnce"],"resources":{"requests":{"storage":"5Gi"}},"volumeName":"example-local-pv-x","storageClassName":"local-storage","volumeMode":"Filesystem","dataSource":null},"status":{"phase":"Bound","accessModes":["ReadWriteOnce"],"capacity":{"storage":"10Gi"}}},{"metadata":{"name":"my-local-storage-pvc","namespace":"default","selfLink":"/api/v1/namespaces/default/persistentvolumeclaims/my-local-storage-pvc","uid":"d31aef1f-5c63-11e9-8e5e-5254007d353d","resourceVersion":"4640057","creationTimestamp":"2019-04-11T14:12:22Z","finalizers":["kubernetes.io/pvc-protection"]},"spec":{"accessModes":["ReadWriteOnce"],"selector":{"matchLabels":{"component":"test"},"matchExpressions":[{"key":"tier","operator":"In","values":["dev"]}]},"resources":{"limits":{"storage":"3Gi"},"requests":{"storage":"2Gi"}},"volumeName":"my-local-storage","storageClassName":"manual","volumeMode":"Filesystem","dataSource":null},"status":{"phase":"Pending"}},{"metadata":{"name":"pvc-no-selector","namespace":"default","selfLink":"/api/v1/namespaces/default/persistentvolumeclaims/pvc-no-selector","uid":"d0cb64c1-5b4c-11e9-847b-5254007d353d","resourceVersion":"4516669","creationTimestamp":"2019-04-10T04:55:09Z","annotations":{"pv.kubernetes.io/bind-completed":"yes","pv.kubernetes.io/bound-by-controller":"yes"},"finalizers":["kubernetes.io/pvc-protection"]},"spec":{"accessModes":["ReadWriteOnce"],"selector":{},"resources":{"requests":{"storage":"5Gi"}},"volumeName":"local-pv-1","storageClassName":"local-storage","volumeMode":"Filesystem","dataSource":null},"status":{"phase":"Bound","accessModes":["ReadWriteOnce"],"capacity":{"storage":"10Gi"}}},{"metadata":{"name":"task-pvc-1","namespace":"default","selfLink":"/api/v1/namespaces/default/persistentvolumeclaims/task-pvc-1","uid":"dcae2a60-2271-11e9-94df-5254007d353d","resourceVersion":"24786","creationTimestamp":"2019-01-27T20:26:44Z","annotations":{"pv.kubernetes.io/bind-completed":"yes"},"finalizers":["kubernetes.io/pvc-protection"]},"spec":{"accessModes":["ReadWriteOnce"],"resources":{"requests":{"storage":"1Gi"}},"volumeName":"task-pv-volume1","storageClassName":"manual","volumeMode":"Filesystem","dataSource":null},"status":{"phase":"Bound","accessModes":["ReadWriteOnce"],"capacity":{"storage":"10Gi"}}},{"metadata":{"name":"task-pvc-2","namespace":"default","selfLink":"/api/v1/namespaces/default/persistentvolumeclaims/task-pvc-2","uid":"de51baab-2271-11e9-94df-5254007d353d","resourceVersion":"24769","creationTimestamp":"2019-01-27T20:26:46Z","annotations":{"pv.kubernetes.io/bind-completed":"yes"},"finalizers":["kubernetes.io/pvc-protection"]},"spec":{"accessModes":["ReadWriteOnce"],"resources":{"requests":{"storage":"2Gi"}},"volumeName":"task-pv-volume2","storageClassName":"manual","volumeMode":"Filesystem","dataSource":null},"status":{"phase":"Bound","accessModes":["ReadWriteOnce"],"capacity":{"storage":"10Gi"}}},{"metadata":{"name":"task-pvc-3","namespace":"default","selfLink":"/api/v1/namespaces/default/persistentvolumeclaims/task-pvc-3","uid":"dff6a5e1-2271-11e9-94df-5254007d353d","resourceVersion":"24784","creationTimestamp":"2019-01-27T20:26:49Z","annotations":{"pv.kubernetes.io/bind-completed":"yes"},"finalizers":["kubernetes.io/pvc-protection"]},"spec":{"accessModes":["ReadWriteOnce"],"resources":{"requests":{"storage":"3Gi"}},"volumeName":"task-pv-volume3","storageClassName":"manual","volumeMode":"Filesystem","dataSource":null},"status":{"phase":"Bound","accessModes":["ReadWriteOnce"],"capacity":{"storage":"10Gi"}}},{"metadata":{"name":"task-pvc-4","namespace":"default","selfLink":"/api/v1/namespaces/default/persistentvolumeclaims/task-pvc-4","uid":"e1be5a89-2271-11e9-94df-5254007d353d","resourceVersion":"24824","creationTimestamp":"2019-01-27T20:26:52Z","annotations":{"pv.kubernetes.io/bind-completed":"yes"},"finalizers":["kubernetes.io/pvc-protection"]},"spec":{"accessModes":["ReadWriteOnce"],"resources":{"requests":{"storage":"4Gi"}},"volumeName":"task-pv-volume4","storageClassName":"manual","volumeMode":"Filesystem","dataSource":null},"status":{"phase":"Bound","accessModes":["ReadWriteOnce"],"capacity":{"storage":"10Gi"}}},{"metadata":{"name":"task-pvc-5","namespace":"default","selfLink":"/api/v1/namespaces/default/persistentvolumeclaims/task-pvc-5","uid":"e34e0a43-2271-11e9-94df-5254007d353d","resourceVersion":"24826","creationTimestamp":"2019-01-27T20:26:55Z","annotations":{"pv.kubernetes.io/bind-completed":"yes"},"finalizers":["kubernetes.io/pvc-protection"]},"spec":{"accessModes":["ReadWriteOnce"],"resources":{"requests":{"storage":"5Gi"}},"volumeName":"task-pv-volume5","storageClassName":"manual","volumeMode":"Filesystem","dataSource":null},"status":{"phase":"Bound","accessModes":["ReadWriteOnce"],"capacity":{"storage":"10Gi"}}}]}
228
228
 
229
229
  '
230
230
  http_version:
231
- recorded_at: Sun, 24 Mar 2019 20:18:17 GMT
231
+ recorded_at: Thu, 11 Apr 2019 14:12:22 GMT
232
232
  - request:
233
233
  method: get
234
234
  uri: https://10.8.254.82:8443/api
@@ -250,7 +250,7 @@ http_interactions:
250
250
  Content-Type:
251
251
  - application/json
252
252
  Date:
253
- - Sun, 24 Mar 2019 20:18:17 GMT
253
+ - Thu, 11 Apr 2019 14:12:22 GMT
254
254
  Content-Length:
255
255
  - '137'
256
256
  body:
@@ -259,7 +259,7 @@ http_interactions:
259
259
 
260
260
  '
261
261
  http_version:
262
- recorded_at: Sun, 24 Mar 2019 20:18:17 GMT
262
+ recorded_at: Thu, 11 Apr 2019 14:12:22 GMT
263
263
  - request:
264
264
  method: get
265
265
  uri: https://10.8.254.82:8443/api/v1/namespaces/default/persistentvolumeclaims/my-local-storage-pvc
@@ -283,16 +283,16 @@ http_interactions:
283
283
  Content-Type:
284
284
  - application/json
285
285
  Date:
286
- - Sun, 24 Mar 2019 20:18:17 GMT
286
+ - Thu, 11 Apr 2019 14:12:22 GMT
287
287
  Content-Length:
288
- - '620'
288
+ - '723'
289
289
  body:
290
290
  encoding: UTF-8
291
- string: '{"kind":"PersistentVolumeClaim","apiVersion":"v1","metadata":{"name":"my-local-storage-pvc","namespace":"default","selfLink":"/api/v1/namespaces/default/persistentvolumeclaims/my-local-storage-pvc","uid":"f616f5ab-4e71-11e9-8e8c-5254007d353d","resourceVersion":"3258449","creationTimestamp":"2019-03-24T20:18:17Z","finalizers":["kubernetes.io/pvc-protection"]},"spec":{"accessModes":["ReadWriteOnce"],"selector":{},"resources":{"limits":{"storage":"3Gi"},"requests":{"storage":"2Gi"}},"volumeName":"my-local-storage","storageClassName":"manual","volumeMode":"Filesystem","dataSource":null},"status":{"phase":"Pending"}}
291
+ string: '{"kind":"PersistentVolumeClaim","apiVersion":"v1","metadata":{"name":"my-local-storage-pvc","namespace":"default","selfLink":"/api/v1/namespaces/default/persistentvolumeclaims/my-local-storage-pvc","uid":"d31aef1f-5c63-11e9-8e5e-5254007d353d","resourceVersion":"4640057","creationTimestamp":"2019-04-11T14:12:22Z","finalizers":["kubernetes.io/pvc-protection"]},"spec":{"accessModes":["ReadWriteOnce"],"selector":{"matchLabels":{"component":"test"},"matchExpressions":[{"key":"tier","operator":"In","values":["dev"]}]},"resources":{"limits":{"storage":"3Gi"},"requests":{"storage":"2Gi"}},"volumeName":"my-local-storage","storageClassName":"manual","volumeMode":"Filesystem","dataSource":null},"status":{"phase":"Pending"}}
292
292
 
293
293
  '
294
294
  http_version:
295
- recorded_at: Sun, 24 Mar 2019 20:18:17 GMT
295
+ recorded_at: Thu, 11 Apr 2019 14:12:22 GMT
296
296
  - request:
297
297
  method: get
298
298
  uri: https://10.8.254.82:8443/api
@@ -314,7 +314,7 @@ http_interactions:
314
314
  Content-Type:
315
315
  - application/json
316
316
  Date:
317
- - Sun, 24 Mar 2019 20:18:17 GMT
317
+ - Thu, 11 Apr 2019 14:12:22 GMT
318
318
  Content-Length:
319
319
  - '137'
320
320
  body:
@@ -323,7 +323,7 @@ http_interactions:
323
323
 
324
324
  '
325
325
  http_version:
326
- recorded_at: Sun, 24 Mar 2019 20:18:17 GMT
326
+ recorded_at: Thu, 11 Apr 2019 14:12:22 GMT
327
327
  - request:
328
328
  method: delete
329
329
  uri: https://10.8.254.82:8443/api/v1/namespaces/default/persistentvolumeclaims/my-local-storage-pvc
@@ -349,14 +349,14 @@ http_interactions:
349
349
  Content-Type:
350
350
  - application/json
351
351
  Date:
352
- - Sun, 24 Mar 2019 20:18:17 GMT
352
+ - Thu, 11 Apr 2019 14:12:22 GMT
353
353
  Content-Length:
354
- - '694'
354
+ - '797'
355
355
  body:
356
356
  encoding: UTF-8
357
- string: '{"kind":"PersistentVolumeClaim","apiVersion":"v1","metadata":{"name":"my-local-storage-pvc","namespace":"default","selfLink":"/api/v1/namespaces/default/persistentvolumeclaims/my-local-storage-pvc","uid":"f616f5ab-4e71-11e9-8e8c-5254007d353d","resourceVersion":"3258452","creationTimestamp":"2019-03-24T20:18:17Z","deletionTimestamp":"2019-03-24T20:18:17Z","deletionGracePeriodSeconds":0,"finalizers":["kubernetes.io/pvc-protection"]},"spec":{"accessModes":["ReadWriteOnce"],"selector":{},"resources":{"limits":{"storage":"3Gi"},"requests":{"storage":"2Gi"}},"volumeName":"my-local-storage","storageClassName":"manual","volumeMode":"Filesystem","dataSource":null},"status":{"phase":"Pending"}}
357
+ string: '{"kind":"PersistentVolumeClaim","apiVersion":"v1","metadata":{"name":"my-local-storage-pvc","namespace":"default","selfLink":"/api/v1/namespaces/default/persistentvolumeclaims/my-local-storage-pvc","uid":"d31aef1f-5c63-11e9-8e5e-5254007d353d","resourceVersion":"4640058","creationTimestamp":"2019-04-11T14:12:22Z","deletionTimestamp":"2019-04-11T14:12:22Z","deletionGracePeriodSeconds":0,"finalizers":["kubernetes.io/pvc-protection"]},"spec":{"accessModes":["ReadWriteOnce"],"selector":{"matchLabels":{"component":"test"},"matchExpressions":[{"key":"tier","operator":"In","values":["dev"]}]},"resources":{"limits":{"storage":"3Gi"},"requests":{"storage":"2Gi"}},"volumeName":"my-local-storage","storageClassName":"manual","volumeMode":"Filesystem","dataSource":null},"status":{"phase":"Pending"}}
358
358
 
359
359
  '
360
360
  http_version:
361
- recorded_at: Sun, 24 Mar 2019 20:18:17 GMT
361
+ recorded_at: Thu, 11 Apr 2019 14:12:22 GMT
362
362
  recorded_with: VCR 4.0.0