catch setup resource errors
parent
aa15eda155
commit
4384dbfb25
|
|
@ -1411,6 +1411,7 @@ class KubernetesCleanupCronJob {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
static createCleanupCronJob(kubeClientBatch, name, namespace) {
|
static createCleanupCronJob(kubeClientBatch, name, namespace) {
|
||||||
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
try {
|
try {
|
||||||
const batchJob = new client_node_1.V1beta1CronJob();
|
const batchJob = new client_node_1.V1beta1CronJob();
|
||||||
batchJob.kind = 'CronJob';
|
batchJob.kind = 'CronJob';
|
||||||
|
|
@ -1448,11 +1449,12 @@ class KubernetesCleanupCronJob {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
kubeClientBatch.createNamespacedCronJob(namespace, batchJob);
|
yield kubeClientBatch.createNamespacedCronJob(namespace, batchJob);
|
||||||
}
|
}
|
||||||
catch (error) {
|
catch (error) {
|
||||||
throw error;
|
throw error;
|
||||||
}
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
exports.default = KubernetesCleanupCronJob;
|
exports.default = KubernetesCleanupCronJob;
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -4,7 +4,7 @@ class KubernetesCleanupCronJob {
|
||||||
static async cleanup(api: BatchV1beta1Api, name: string, namespace: string) {
|
static async cleanup(api: BatchV1beta1Api, name: string, namespace: string) {
|
||||||
await api.deleteNamespacedCronJob('name', namespace);
|
await api.deleteNamespacedCronJob('name', namespace);
|
||||||
}
|
}
|
||||||
static createCleanupCronJob(kubeClientBatch: BatchV1beta1Api, name: string, namespace: string) {
|
static async createCleanupCronJob(kubeClientBatch: BatchV1beta1Api, name: string, namespace: string) {
|
||||||
try {
|
try {
|
||||||
const batchJob = new V1beta1CronJob();
|
const batchJob = new V1beta1CronJob();
|
||||||
batchJob.kind = 'CronJob';
|
batchJob.kind = 'CronJob';
|
||||||
|
|
@ -43,7 +43,7 @@ class KubernetesCleanupCronJob {
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
kubeClientBatch.createNamespacedCronJob(namespace, batchJob);
|
await kubeClientBatch.createNamespacedCronJob(namespace, batchJob);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
throw error;
|
throw error;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue