Fix: log all pvc info

pull/273/head
Frostebite 2021-06-18 21:49:18 +01:00
parent 0149cf79f2
commit 525f1345bb
3 changed files with 29 additions and 26 deletions

10
dist/index.js vendored
View File

@ -1723,11 +1723,6 @@ class KubernetesStorage {
yield async_wait_until_1.default(() => __awaiter(this, void 0, void 0, function* () { return (yield this.getPVCPhase(kubeClient, name, namespace)) !== 'Pending'; }), { yield async_wait_until_1.default(() => __awaiter(this, void 0, void 0, function* () { return (yield this.getPVCPhase(kubeClient, name, namespace)) !== 'Pending'; }), {
timeout: 500000, timeout: 500000,
}); });
core.info(JSON.stringify((yield kubeClient.readNamespacedPersistentVolumeClaimStatus(name, namespace)).body, undefined, 4));
const pvc = (yield kubeClient.readNamespacedPersistentVolumeClaim(name, namespace)).body;
core.info(JSON.stringify(pvc, undefined, 4));
core.info(JSON.stringify((yield kubeClient.readNamespacedPersistentVolumeClaim(name, namespace)).body, undefined, 4));
core.info(JSON.stringify((yield kubeClient.replaceNamespacedPersistentVolumeClaimStatus(name, namespace, pvc)).body, undefined, 4));
}); });
} }
static createPersistentVolumeClaim(buildParameters, pvcName, kubeClient, namespace) { static createPersistentVolumeClaim(buildParameters, pvcName, kubeClient, namespace) {
@ -1754,6 +1749,11 @@ class KubernetesStorage {
}; };
yield kubeClient.createNamespacedPersistentVolumeClaim(namespace, pvc); yield kubeClient.createNamespacedPersistentVolumeClaim(namespace, pvc);
core.info(`Persistent Volume created, ${yield KubernetesStorage.getPVCPhase(kubeClient, pvcName, namespace)}`); core.info(`Persistent Volume created, ${yield KubernetesStorage.getPVCPhase(kubeClient, pvcName, namespace)}`);
yield new Promise((resolve) => setTimeout(resolve, 10000));
core.info(JSON.stringify((yield kubeClient.readNamespacedPersistentVolumeClaimStatus(pvcName, namespace)).body, undefined, 4));
core.info(JSON.stringify(pvc, undefined, 4));
core.info(JSON.stringify((yield kubeClient.readNamespacedPersistentVolumeClaim(pvcName, namespace)).body, undefined, 4));
core.info(JSON.stringify((yield kubeClient.replaceNamespacedPersistentVolumeClaimStatus(pvcName, namespace, pvc)).body, undefined, 4));
}); });
} }
} }

2
dist/index.js.map vendored

File diff suppressed because one or more lines are too long

View File

@ -15,26 +15,6 @@ class KubernetesStorage {
await waitUntil(async () => (await this.getPVCPhase(kubeClient, name, namespace)) !== 'Pending', { await waitUntil(async () => (await this.getPVCPhase(kubeClient, name, namespace)) !== 'Pending', {
timeout: 500000, timeout: 500000,
}); });
core.info(
JSON.stringify((await kubeClient.readNamespacedPersistentVolumeClaimStatus(name, namespace)).body, undefined, 4),
);
const pvc = (await kubeClient.readNamespacedPersistentVolumeClaim(name, namespace)).body;
core.info(JSON.stringify(pvc, undefined, 4));
core.info(
JSON.stringify((await kubeClient.readNamespacedPersistentVolumeClaim(name, namespace)).body, undefined, 4),
);
core.info(
JSON.stringify(
(await kubeClient.replaceNamespacedPersistentVolumeClaimStatus(name, namespace, pvc)).body,
undefined,
4,
),
);
} }
public static async createPersistentVolumeClaim( public static async createPersistentVolumeClaim(
@ -65,6 +45,29 @@ class KubernetesStorage {
}; };
await kubeClient.createNamespacedPersistentVolumeClaim(namespace, pvc); await kubeClient.createNamespacedPersistentVolumeClaim(namespace, pvc);
core.info(`Persistent Volume created, ${await KubernetesStorage.getPVCPhase(kubeClient, pvcName, namespace)}`); core.info(`Persistent Volume created, ${await KubernetesStorage.getPVCPhase(kubeClient, pvcName, namespace)}`);
await new Promise((resolve) => setTimeout(resolve, 10000));
core.info(
JSON.stringify(
(await kubeClient.readNamespacedPersistentVolumeClaimStatus(pvcName, namespace)).body,
undefined,
4,
),
);
core.info(JSON.stringify(pvc, undefined, 4));
core.info(
JSON.stringify((await kubeClient.readNamespacedPersistentVolumeClaim(pvcName, namespace)).body, undefined, 4),
);
core.info(
JSON.stringify(
(await kubeClient.replaceNamespacedPersistentVolumeClaimStatus(pvcName, namespace, pvc)).body,
undefined,
4,
),
);
} }
} }