File tree 1 file changed +9
-4
lines changed
1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -406,10 +406,6 @@ def create(
406
406
"service_network_range" : service_network_range ,
407
407
"pod_dns_domain" : pod_dns_domain ,
408
408
"addons" : addons ,
409
- "persistent_storage" : {
410
- "local" : persistent_storage_local ,
411
- "nimble_csi" : persistent_storage_nimble_csi ,
412
- },
413
409
"k8shosts_config" : [c .to_dict () for c in k8shosts_config ],
414
410
}
415
411
if description is not None :
@@ -423,6 +419,15 @@ def create(
423
419
if datafabric :
424
420
data ["datafabric" ] = True
425
421
data ["datafabric_name" ] = datafabric_name
422
+ if len (addons ) == 0 :
423
+ # TODO persistent storage was deprecated in 5.x?
424
+ # check server version rather than addons
425
+ data ["persistent_storage" ] = (
426
+ {
427
+ "local" : persistent_storage_local ,
428
+ "nimble_csi" : persistent_storage_nimble_csi ,
429
+ },
430
+ )
426
431
427
432
response = self .client ._request (
428
433
url = "/api/v2/k8scluster" ,
You can’t perform that action at this time.
0 commit comments