File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -406,10 +406,6 @@ def create(
406406 "service_network_range" : service_network_range ,
407407 "pod_dns_domain" : pod_dns_domain ,
408408 "addons" : addons ,
409- "persistent_storage" : {
410- "local" : persistent_storage_local ,
411- "nimble_csi" : persistent_storage_nimble_csi ,
412- },
413409 "k8shosts_config" : [c .to_dict () for c in k8shosts_config ],
414410 }
415411 if description is not None :
@@ -423,6 +419,15 @@ def create(
423419 if datafabric :
424420 data ["datafabric" ] = True
425421 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+ )
426431
427432 response = self .client ._request (
428433 url = "/api/v2/k8scluster" ,
You can’t perform that action at this time.
0 commit comments