skip existing database statefulset on runtime apply

This commit is contained in:
2026-07-02 16:12:56 +09:00
parent 2729e95a5b
commit 3dea5f4e5c
+9 -1
View File
@@ -1312,8 +1312,9 @@ export class AppsService {
}) {
const name = sanitizeK8sName(input.componentName);
const values = getDatabaseValues(input.appKey, input.variables);
const statefulSetExists = await this.statefulSetExists(input.namespace, name);
input.logs.push(`[database] ${name} service/statefulset`);
input.logs.push(`[database] ${name} secret/service`);
appendOutput(
input.logs,
await this.applyK8sManifest(createPostgresSecretManifest({
@@ -1329,6 +1330,13 @@ export class AppsService {
name,
})),
);
if (statefulSetExists) {
input.logs.push(`[skip] statefulset/${name} already exists`);
return;
}
input.logs.push(`[create] statefulset/${name}`);
appendOutput(
input.logs,
await this.applyK8sManifest(createPostgresStatefulSetManifest({