fix pre-commit
This commit is contained in:
parent
0fef1998ae
commit
6474cfaf6a
@ -26,7 +26,7 @@ index c7180147a5f..941de79da45 100644
|
|||||||
+++ plugins/chart_releases_linux/resources.py
|
+++ plugins/chart_releases_linux/resources.py
|
||||||
@@ -158,13 +158,13 @@ async def retrieve_pv_pvc_mapping_internal(self, chart_release):
|
@@ -158,13 +158,13 @@ async def retrieve_pv_pvc_mapping_internal(self, chart_release):
|
||||||
}
|
}
|
||||||
|
|
||||||
for pv in chart_release['resources']['persistent_volumes']:
|
for pv in chart_release['resources']['persistent_volumes']:
|
||||||
- claim_name = pv['spec'].get('claim_ref', {}).get('name')
|
- claim_name = pv['spec'].get('claim_ref', {}).get('name')
|
||||||
+ claim_name = pv['spec'].get('claimRef', {}).get('name')
|
+ claim_name = pv['spec'].get('claimRef', {}).get('name')
|
||||||
@ -51,7 +51,7 @@ index c7180147a5f..941de79da45 100644
|
|||||||
+ 'zv_details': zfs_volumes[csi_spec['volumeHandle']],
|
+ 'zv_details': zfs_volumes[csi_spec['volumeHandle']],
|
||||||
}
|
}
|
||||||
return mapping
|
return mapping
|
||||||
|
|
||||||
@@ -247,11 +247,11 @@ async def get_workload_storage_details(self):
|
@@ -247,11 +247,11 @@ async def get_workload_storage_details(self):
|
||||||
# because of chart release reclaim policy being retain
|
# because of chart release reclaim policy being retain
|
||||||
for pv in await self.middleware.call(
|
for pv in await self.middleware.call(
|
||||||
@ -81,7 +81,7 @@ index 117dab3a79c..e9525150278 100644
|
|||||||
- for owner_reference in filter(lambda o: o.get('uid'), r['metadata']['owner_references'] or []):
|
- for owner_reference in filter(lambda o: o.get('uid'), r['metadata']['owner_references'] or []):
|
||||||
+ for owner_reference in filter(lambda o: o.get('uid'), r['metadata']['ownerReferences'] or []):
|
+ for owner_reference in filter(lambda o: o.get('uid'), r['metadata']['ownerReferences'] or []):
|
||||||
mapping[key][owner_reference['uid']][r['metadata']['uid']] = r
|
mapping[key][owner_reference['uid']][r['metadata']['uid']] = r
|
||||||
|
|
||||||
pod_mapping = defaultdict(list)
|
pod_mapping = defaultdict(list)
|
||||||
diff --git plugins/kubernetes_linux/restore.py plugins/kubernetes_linux/restore.py
|
diff --git plugins/kubernetes_linux/restore.py plugins/kubernetes_linux/restore.py
|
||||||
index 4897e3f8b7a..ec13a332b6e 100644
|
index 4897e3f8b7a..ec13a332b6e 100644
|
||||||
@ -90,7 +90,7 @@ index 4897e3f8b7a..ec13a332b6e 100644
|
|||||||
@@ -218,7 +218,11 @@ def restore_backup(self, job, backup_name, options):
|
@@ -218,7 +218,11 @@ def restore_backup(self, job, backup_name, options):
|
||||||
failed_pv_restores.append(f'Unable to create ZFS Volume for {pvc!r} PVC: {e}')
|
failed_pv_restores.append(f'Unable to create ZFS Volume for {pvc!r} PVC: {e}')
|
||||||
continue
|
continue
|
||||||
|
|
||||||
+ # We need to safely access claim_ref vollume attribute keys as with k8s client api re-write
|
+ # We need to safely access claim_ref vollume attribute keys as with k8s client api re-write
|
||||||
+ # camel casing which was done by kubernetes asyncio package is not happening anymore
|
+ # camel casing which was done by kubernetes asyncio package is not happening anymore
|
||||||
pv_spec = pv['pv_details']['spec']
|
pv_spec = pv['pv_details']['spec']
|
||||||
@ -122,4 +122,4 @@ index 4897e3f8b7a..ec13a332b6e 100644
|
|||||||
+ 'storageClassName': pv_spec.get('storage_class_name') or pv_spec['storageClassName'],
|
+ 'storageClassName': pv_spec.get('storage_class_name') or pv_spec['storageClassName'],
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
|
@ -13,4 +13,4 @@ if [ "$(cli -m csv -c 'system version' | awk -F '-' '{print $3}')" == "22.12.0"
|
|||||||
patchv22120
|
patchv22120
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
export -f hotpatch
|
export -f hotpatch
|
||||||
|
Loading…
Reference in New Issue
Block a user