Merge pull request #359 from growse/patch-1

This commit is contained in:
Travis Glenn Hansen 2024-03-13 22:18:16 -06:00 committed by GitHub
commit 6198edfa1a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 2 deletions

View File

@ -127,6 +127,7 @@ async function main() {
for (let csiVolume of csiVolumes) {
let volume_id = csiVolume.volume.volume_id;
let volume_context = JSON.stringify(csiVolume.volume.volume_context) || "Unknown";
//console.log(`processing csi volume ${volume_id}`);
let k8sVolume = k8sVolumes.find((i_k8sVolume) => {
let volume_handle = _.get(i_k8sVolume, "spec.csi.volumeHandle", null);
@ -134,7 +135,7 @@ async function main() {
});
if (!k8sVolume) {
console.log(`volume ${volume_id} is NOT in k8s`);
console.log(`volume ${volume_id} (${volume_context}) is NOT in k8s`);
if (process.env.DRY_RUN == "1") {
continue;
}
@ -159,7 +160,7 @@ async function main() {
console.log(`skipping delete of csi volume ${volume_id}`);
}
} else {
console.log(`volume ${volume_id} is in k8s`);
console.log(`volume ${volume_id} (${volume_context}) is in k8s`);
}
}