underpost 3.2.70 → 3.2.90
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/publish.ci.yml +3 -3
- package/.github/workflows/release.cd.yml +1 -1
- package/CHANGELOG.md +1358 -1038
- package/CLI-HELP.md +39 -16
- package/README.md +3 -3
- package/bin/build.js +10 -4
- package/bin/deploy.js +18 -16
- package/docker-compose.yml +1 -1
- package/manifests/cronjobs/dd-cron/dd-cron-backup.yaml +1 -1
- package/manifests/cronjobs/dd-cron/dd-cron-dns.yaml +1 -1
- package/manifests/deployment/dd-default-development/deployment.yaml +2 -2
- package/manifests/deployment/playwright/deployment.yaml +1 -1
- package/manifests/mongodb/kustomization.yaml +4 -1
- package/manifests/mongodb/statefulset.yaml +4 -0
- package/manifests/mongodb/storage-class.yaml +9 -2
- package/package.json +20 -20
- package/scripts/nat-iptables.sh +10 -4
- package/scripts/test-monitor.sh +4 -3
- package/src/api/core/core.controller.js +4 -65
- package/src/api/core/core.router.js +8 -14
- package/src/api/default/default.controller.js +2 -70
- package/src/api/default/default.router.js +7 -17
- package/src/api/document/document.controller.js +5 -77
- package/src/api/document/document.router.js +9 -13
- package/src/api/file/file.controller.js +9 -53
- package/src/api/file/file.router.js +14 -6
- package/src/api/test/test.controller.js +8 -53
- package/src/api/test/test.router.js +1 -4
- package/src/cli/cluster.js +771 -66
- package/src/cli/db.js +6 -4
- package/src/cli/deploy.js +1715 -168
- package/src/cli/docker-compose.js +19 -24
- package/src/cli/fs.js +0 -1
- package/src/cli/image.js +40 -13
- package/src/cli/index.js +129 -35
- package/src/cli/ipfs.js +82 -11
- package/src/cli/monitor.js +1 -1
- package/src/cli/release.js +4 -0
- package/src/cli/repository.js +14 -3
- package/src/cli/run.js +2253 -439
- package/src/cli/secrets.js +969 -0
- package/src/cli/ssh.js +38 -39
- package/src/client/components/core/Modal.js +38 -4
- package/src/client-builder/client-build.js +94 -11
- package/src/client-builder/ssr.js +27 -73
- package/src/db/mongo/MongoBootstrap.js +295 -54
- package/src/db/mongo/MongooseDB.js +47 -32
- package/src/index.js +1 -1
- package/src/server/conf.js +1307 -6
- package/src/server/cri.js +70 -0
- package/src/server/downloader.js +3 -3
- package/src/server/middlewares.js +152 -0
- package/src/server/underpost-gateway.js +1073 -0
- package/src/server/underpost-ingress.js +364 -0
- package/test/cluster-instances.test.js +435 -0
- package/test/deploy-node-placement.test.js +45 -0
- package/test/instance-traffic-plan.test.js +710 -0
- package/test/sops-secret-store.test.js +612 -0
- package/test/underpost-gateway.test.js +469 -0
- package/test/underpost-ingress.test.js +253 -0
package/src/cli/repository.js
CHANGED
|
@@ -21,6 +21,7 @@ import {
|
|
|
21
21
|
getDataDeploy,
|
|
22
22
|
buildReplicaId,
|
|
23
23
|
writeEnv,
|
|
24
|
+
readConfInstances,
|
|
24
25
|
} from '../server/conf.js';
|
|
25
26
|
import { buildClient, unzipClientBuild, mergeClientBuildZip } from '../client-builder/client-build.js';
|
|
26
27
|
import { DefaultConf } from '../../conf.js';
|
|
@@ -145,6 +146,14 @@ class UnderpostRepository {
|
|
|
145
146
|
) {
|
|
146
147
|
if (!repoPath) repoPath = '.';
|
|
147
148
|
|
|
149
|
+
if (options.initRepo) {
|
|
150
|
+
Underpost.repo.initLocalRepo({
|
|
151
|
+
path: repoPath,
|
|
152
|
+
origin: typeof options.initRepo === 'string' ? options.initRepo : undefined,
|
|
153
|
+
});
|
|
154
|
+
return;
|
|
155
|
+
}
|
|
156
|
+
|
|
148
157
|
if (options.hasChanges) {
|
|
149
158
|
const status = shellExec(`cd ${repoPath} && git status --porcelain`, {
|
|
150
159
|
stdout: true,
|
|
@@ -1697,7 +1706,7 @@ Prevent build private config repo.`,
|
|
|
1697
1706
|
}
|
|
1698
1707
|
|
|
1699
1708
|
// Resolve the active blue/green traffic colour so we target the correct pod
|
|
1700
|
-
const traffic = Underpost.deploy.getCurrentTraffic(deployId, { namespace });
|
|
1709
|
+
const traffic = Underpost.deploy.getCurrentTraffic(deployId, { namespace, env });
|
|
1701
1710
|
if (!traffic) {
|
|
1702
1711
|
logger.warn(`backupPodRepositories: could not resolve current traffic for ${deployId} — skipping`);
|
|
1703
1712
|
return;
|
|
@@ -1854,8 +1863,10 @@ Prevent build private config repo.`,
|
|
|
1854
1863
|
const confPath = `./engine-private/conf/${deployId}/conf.instances.json`;
|
|
1855
1864
|
if (!fs.existsSync(confPath)) continue;
|
|
1856
1865
|
try {
|
|
1857
|
-
|
|
1858
|
-
|
|
1866
|
+
// readConfInstances returns the bare array of entries. The template
|
|
1867
|
+
// entries carry runtime + metadata.repository, so the un-expanded list
|
|
1868
|
+
// is enough here (no need to expand variants).
|
|
1869
|
+
const match = readConfInstances(deployId).find((i) => i && i.runtime === runtime);
|
|
1859
1870
|
if (match && match.metadata && match.metadata.repository) {
|
|
1860
1871
|
logger.info(`[resolveInstanceRepo] resolved from ${confPath}`, {
|
|
1861
1872
|
runtime,
|