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 +4 -4
- data/lib/fog/kubevirt/compute/models/pvcs.rb +8 -4
- data/lib/fog/kubevirt/compute/models/servers.rb +1 -0
- data/lib/fog/kubevirt/compute/models/vm_base.rb +1 -1
- data/lib/fog/kubevirt/compute/models/vm_parser.rb +4 -2
- data/lib/fog/kubevirt/compute/models/vminstance.rb +1 -1
- data/lib/fog/kubevirt/compute/requests/create_pvc.rb +1 -1
- data/lib/fog/kubevirt/compute/requests/get_server.rb +3 -1
- data/lib/fog/kubevirt/compute/requests/get_vm.rb +13 -1
- data/lib/fog/kubevirt/compute/requests/list_servers.rb +7 -2
- data/lib/fog/kubevirt/compute/requests/list_vms.rb +7 -2
- data/lib/fog/kubevirt/version.rb +1 -1
- data/spec/create_vm_spec.rb +31 -2
- data/spec/fixtures/kubevirt/pvc/pvcs_crud.yml +33 -33
- data/spec/fixtures/kubevirt/pvc/pvcs_no_selector_crud.yml +362 -0
- data/spec/fixtures/kubevirt/vm/vm_create_multi.yml +2268 -71
- data/spec/fixtures/kubevirt/vm/vm_create_single.yml +179 -49
- data/spec/pvcs_v1alpha2_spec.rb +46 -3
- data/spec/vm_parse.rb +17 -0
- metadata +6 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ad474ce450c83ef40e7a0b38ca808893443a774f
|
4
|
+
data.tar.gz: a45d0c1342ba6d83ff2f61aa2def546a68401277
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
|
56
|
-
|
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]
|
@@ -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
|
-
|
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],
|
@@ -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
|
-
|
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
|
-
|
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
|
data/lib/fog/kubevirt/version.rb
CHANGED
data/spec/create_vm_spec.rb
CHANGED
@@ -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 =
|
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 =
|
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
|
-
-
|
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:
|
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
|
-
-
|
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:
|
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
|
-
- '
|
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
|
-
-
|
94
|
+
- Thu, 11 Apr 2019 14:12:22 GMT
|
95
95
|
Content-Length:
|
96
|
-
- '
|
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":"
|
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:
|
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
|
-
-
|
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:
|
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
|
-
-
|
158
|
+
- Thu, 11 Apr 2019 14:12:22 GMT
|
159
159
|
Content-Length:
|
160
|
-
- '
|
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":"
|
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:
|
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
|
-
-
|
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:
|
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
|
-
-
|
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":"
|
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:
|
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
|
-
-
|
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:
|
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
|
-
-
|
286
|
+
- Thu, 11 Apr 2019 14:12:22 GMT
|
287
287
|
Content-Length:
|
288
|
-
- '
|
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":"
|
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:
|
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
|
-
-
|
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:
|
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
|
-
-
|
352
|
+
- Thu, 11 Apr 2019 14:12:22 GMT
|
353
353
|
Content-Length:
|
354
|
-
- '
|
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":"
|
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:
|
361
|
+
recorded_at: Thu, 11 Apr 2019 14:12:22 GMT
|
362
362
|
recorded_with: VCR 4.0.0
|