Fix: log all pvc info
parent
70c81dfbe9
commit
2718db7a0f
|
|
@ -1715,7 +1715,7 @@ class KubernetesStorage {
|
||||||
static getPVCPhase(kubeClient, name, namespace) {
|
static getPVCPhase(kubeClient, name, namespace) {
|
||||||
var _a;
|
var _a;
|
||||||
return __awaiter(this, void 0, void 0, function* () {
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
return (_a = (yield kubeClient.readNamespacedPersistentVolumeClaimStatus(name, namespace)).body.status) === null || _a === void 0 ? void 0 : _a.phase;
|
return (_a = (yield kubeClient.readNamespacedPersistentVolumeClaim(name, namespace)).body.status) === null || _a === void 0 ? void 0 : _a.phase;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
static watchPersistentVolumeClaimUntilBoundToContainer(kubeClient, name, namespace) {
|
static watchPersistentVolumeClaimUntilBoundToContainer(kubeClient, name, namespace) {
|
||||||
|
|
@ -1748,10 +1748,7 @@ 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 Claim created`);
|
||||||
yield new Promise((resolve) => setTimeout(resolve, 100000));
|
|
||||||
// await this.watchPersistentVolumeClaimUntilBoundToContainer(kubeClient, pvcName, namespace);
|
|
||||||
core.info(JSON.stringify((yield kubeClient.listPersistentVolume(namespace)).body, undefined, 4));
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -5,7 +5,7 @@ import BuildParameters from '../build-parameters';
|
||||||
|
|
||||||
class KubernetesStorage {
|
class KubernetesStorage {
|
||||||
public static async getPVCPhase(kubeClient: k8s.CoreV1Api, name: string, namespace: string) {
|
public static async getPVCPhase(kubeClient: k8s.CoreV1Api, name: string, namespace: string) {
|
||||||
return (await kubeClient.readNamespacedPersistentVolumeClaimStatus(name, namespace)).body.status?.phase;
|
return (await kubeClient.readNamespacedPersistentVolumeClaim(name, namespace)).body.status?.phase;
|
||||||
}
|
}
|
||||||
public static async watchPersistentVolumeClaimUntilBoundToContainer(
|
public static async watchPersistentVolumeClaimUntilBoundToContainer(
|
||||||
kubeClient: k8s.CoreV1Api,
|
kubeClient: k8s.CoreV1Api,
|
||||||
|
|
@ -44,10 +44,7 @@ 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 Claim created`);
|
||||||
await new Promise((resolve) => setTimeout(resolve, 100000));
|
|
||||||
// await this.watchPersistentVolumeClaimUntilBoundToContainer(kubeClient, pvcName, namespace);
|
|
||||||
core.info(JSON.stringify((await kubeClient.listPersistentVolume(namespace)).body, undefined, 4));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue