fix condition for null params from kraken-hub

This commit is contained in:
Alejandro Gullón
2021-12-09 11:50:02 -05:00
committed by Naga Ravi Chaitanya Elluri
parent 01f1075eb3
commit 8af0d86c12
+2 -1
View File
@@ -69,9 +69,10 @@ pvc_name: '%s'\npod_name: '%s'\nnamespace: '%s'\ntarget_fill_percentage: '%s%%'\
for entry in volumes_list_json:
if len(entry["persistentVolumeClaim"]["claimName"]) > 0:
volume_name = entry["name"]
pvc_name = entry["persistentVolumeClaim"]["claimName"] if pvc_name else pvc_name
pvc_name = entry["persistentVolumeClaim"]["claimName"]
break
logging.info("Volume name: %s" % volume_name)
logging.info("PVC name: %s" % pvc_name)
# Get container name and mount path
command = 'kubectl get pods %s -n %s -o json | jq -r ".spec.containers"' % (