underpost 2.89.35 → 2.89.44

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.
Files changed (44) hide show
  1. package/README.md +4 -2
  2. package/bin/deploy.js +22 -15
  3. package/cli.md +23 -2
  4. package/manifests/deployment/dd-default-development/deployment.yaml +2 -2
  5. package/manifests/deployment/dd-test-development/deployment.yaml +10 -6
  6. package/manifests/deployment/dd-test-development/proxy.yaml +2 -0
  7. package/manifests/deployment/kafka/deployment.yaml +0 -2
  8. package/manifests/deployment/spark/spark-pi-py.yaml +0 -1
  9. package/manifests/deployment/tensorflow/tf-gpu-test.yaml +0 -2
  10. package/manifests/envoy-service-nodeport.yaml +0 -1
  11. package/manifests/kubeadm-calico-config.yaml +10 -115
  12. package/manifests/letsencrypt-prod.yaml +0 -1
  13. package/manifests/mariadb/statefulset.yaml +1 -1
  14. package/manifests/mongodb/statefulset.yaml +11 -11
  15. package/manifests/mongodb-4.4/service-deployment.yaml +1 -3
  16. package/manifests/mysql/pv-pvc.yaml +1 -1
  17. package/manifests/mysql/statefulset.yaml +1 -1
  18. package/manifests/valkey/service.yaml +0 -1
  19. package/manifests/valkey/statefulset.yaml +2 -3
  20. package/package.json +1 -1
  21. package/scripts/device-scan.sh +43 -21
  22. package/scripts/rpmfusion-ffmpeg-setup.sh +1 -0
  23. package/src/api/user/user.model.js +10 -1
  24. package/src/cli/cluster.js +51 -26
  25. package/src/cli/deploy.js +73 -39
  26. package/src/cli/index.js +22 -1
  27. package/src/cli/monitor.js +9 -5
  28. package/src/cli/repository.js +1 -1
  29. package/src/cli/run.js +38 -21
  30. package/src/client/components/core/Logger.js +1 -1
  31. package/src/client/components/core/Modal.js +5 -0
  32. package/src/client/components/core/ObjectLayerEngineModal.js +334 -71
  33. package/src/client/components/core/ObjectLayerEngineViewer.js +170 -403
  34. package/src/client/components/core/Router.js +10 -1
  35. package/src/client/services/default/default.management.js +25 -5
  36. package/src/index.js +1 -1
  37. package/src/server/client-build.js +5 -4
  38. package/src/server/conf.js +1 -1
  39. package/src/server/start.js +1 -1
  40. package/manifests/kubelet-config.yaml +0 -65
  41. package/manifests/mongodb/backup-access.yaml +0 -16
  42. package/manifests/mongodb/backup-cronjob.yaml +0 -42
  43. package/manifests/mongodb/backup-pv-pvc.yaml +0 -22
  44. package/manifests/mongodb/configmap.yaml +0 -26
@@ -189,7 +189,16 @@ const Router = function (options = { Routes: () => {}, e: new PopStateEvent() })
189
189
  */
190
190
  const LoadRouter = function (RouterInstance) {
191
191
  Router(RouterInstance);
192
- window.onpopstate = (e) => Router({ ...RouterInstance, e });
192
+ window.onpopstate = (e) => {
193
+ Router({ ...RouterInstance, e });
194
+ // Notify query params listeners on browser back/forward navigation
195
+ const updatedParams = getQueryParams();
196
+ for (const listenerId in queryParamsChangeListeners) {
197
+ if (Object.hasOwnProperty.call(queryParamsChangeListeners, listenerId)) {
198
+ queryParamsChangeListeners[listenerId](updatedParams);
199
+ }
200
+ }
201
+ };
193
202
  };
194
203
 
195
204
  /**
@@ -52,12 +52,32 @@ const columnDefFormatter = (obj, columnDefs, customFormat) => {
52
52
 
53
53
  const DefaultManagement = {
54
54
  Tokens: {},
55
- loadTable: async function (id, options = { reload: true }) {
55
+ loadTable: async function (id, options = { reload: true, force: true }) {
56
56
  const { serviceId, columnDefs, customFormat } = this.Tokens[id];
57
+
58
+ let _page = this.Tokens[id].page;
59
+ let _limit = this.Tokens[id].limit;
60
+ let _id = this.Tokens[id].serviceOptions?.get?.id ?? undefined;
61
+ if (!options.force && this.Tokens[id].lastOptions) {
62
+ if (
63
+ _page === this.Tokens[id].lastOptions.page &&
64
+ _limit === this.Tokens[id].lastOptions.limit &&
65
+ _id === this.Tokens[id].lastOptions.id
66
+ ) {
67
+ logger.warn(`DefaultManagement loadTable ${serviceId} - Skipping load, options unchanged`);
68
+ return;
69
+ }
70
+ }
71
+ this.Tokens[id].lastOptions = {
72
+ page: _page,
73
+ limit: _limit,
74
+ id: _id,
75
+ };
76
+
57
77
  const result = await this.Tokens[id].ServiceProvider.get({
58
- page: this.Tokens[id].page,
59
- limit: this.Tokens[id].limit,
60
- id: this.Tokens[id].serviceOptions?.get?.id ?? undefined,
78
+ page: _page,
79
+ limit: _limit,
80
+ id: _id,
61
81
  });
62
82
  if (result.status === 'success') {
63
83
  const { data, total, page, totalPages } = result.data;
@@ -331,7 +351,7 @@ const DefaultManagement = {
331
351
  EventsUI.onClick(`.management-table-btn-reload-${id}`, async () => {
332
352
  try {
333
353
  // Reload data from server
334
- await DefaultManagement.loadTable(id);
354
+ await DefaultManagement.loadTable(id, { force: true, reload: true });
335
355
 
336
356
  // Other option: Refresh cells to update UI
337
357
  // DefaultManagement.refreshTable(id);
package/src/index.js CHANGED
@@ -35,7 +35,7 @@ class Underpost {
35
35
  * @type {String}
36
36
  * @memberof Underpost
37
37
  */
38
- static version = 'v2.89.35';
38
+ static version = 'v2.89.44';
39
39
  /**
40
40
  * Repository cli API
41
41
  * @static
@@ -84,11 +84,12 @@ const copyNonExistingFiles = (src, dest) => {
84
84
  * @param {Object} options - Options for the build process.
85
85
  * @param {Array} options.liveClientBuildPaths - List of paths to build incrementally.
86
86
  * @param {Array} options.instances - List of instances to build.
87
+ * @param {boolean} options.buildZip - Whether to create zip files of the builds.
87
88
  * @returns {Promise<void>} - Promise that resolves when the build is complete.
88
89
  * @throws {Error} - If the build fails.
89
90
  * @memberof clientBuild
90
91
  */
91
- const buildClient = async (options = { liveClientBuildPaths: [], instances: [] }) => {
92
+ const buildClient = async (options = { liveClientBuildPaths: [], instances: [], buildZip: false }) => {
92
93
  const logger = loggerFactory(import.meta);
93
94
  const confClient = JSON.parse(fs.readFileSync(`./conf/conf.client.json`, 'utf8'));
94
95
  const confServer = JSON.parse(fs.readFileSync(`./conf/conf.server.json`, 'utf8'));
@@ -266,7 +267,7 @@ const buildClient = async (options = { liveClientBuildPaths: [], instances: [] }
266
267
  const rootClientPath = directory ? directory : `${publicPath}/${host}${path}`;
267
268
  const port = newInstance(currentPort);
268
269
  const publicClientId = publicRef ? publicRef : client;
269
- const fullBuildEnabled = !process.argv.includes('l') && !confServer[host][path].liteBuild && !enableLiveRebuild;
270
+ const fullBuildEnabled = !confServer[host][path].liteBuild && !enableLiveRebuild;
270
271
  // const baseHost = process.env.NODE_ENV === 'production' ? `https://${host}` : `http://localhost:${port}`;
271
272
  const baseHost = process.env.NODE_ENV === 'production' ? `https://${host}` : ``;
272
273
  // ''; // process.env.NODE_ENV === 'production' ? `https://${host}` : ``;
@@ -625,7 +626,7 @@ Sitemap: https://${host}${path === '/' ? '' : path}/sitemap.xml`,
625
626
  );
626
627
  }
627
628
 
628
- if (fullBuildEnabled && !enableLiveRebuild && !process.argv.includes('l') && docsBuild) {
629
+ if (fullBuildEnabled && !enableLiveRebuild && docsBuild) {
629
630
  await buildDocs({
630
631
  host,
631
632
  path,
@@ -716,7 +717,7 @@ ${fs.readFileSync(`${rootClientPath}/sw.js`, 'utf8')}`,
716
717
  );
717
718
  }
718
719
  }
719
- if (!enableLiveRebuild && process.argv.includes('zip')) {
720
+ if (!enableLiveRebuild && options.buildZip) {
720
721
  logger.warn('build zip', rootClientPath);
721
722
 
722
723
  if (!fs.existsSync('./build')) fs.mkdirSync('./build');
@@ -1192,7 +1192,7 @@ const Cmd = {
1192
1192
  * @returns {string} - The build command.
1193
1193
  * @memberof Cmd
1194
1194
  */
1195
- build: (deployId) => `node bin/deploy build-full-client ${deployId}${process.argv.includes('l') ? ' l' : ''}`,
1195
+ build: (deployId) => `node bin/deploy build-full-client ${deployId}`,
1196
1196
  /**
1197
1197
  * @method conf
1198
1198
  * @description Configures the deploy.
@@ -133,7 +133,7 @@ class UnderpostStartUp {
133
133
  const repoName = `engine-${deployId.split('-')[1]}`;
134
134
  shellExec(`cd ${buildBasePath} && underpost clone ${process.env.GITHUB_USERNAME}/${repoName}`);
135
135
  shellExec(`mkdir -p ${buildBasePath}/engine`);
136
- shellExec(`cd ${buildBasePath} && sudo cp -a ./${repoName}/* ./engine`);
136
+ shellExec(`cd ${buildBasePath} && sudo cp -a ./${repoName}/. ./engine`);
137
137
  shellExec(`cd ${buildBasePath} && sudo rm -rf ./${repoName}`);
138
138
  shellExec(`cd ${buildBasePath}/engine && underpost clone ${process.env.GITHUB_USERNAME}/${repoName}-private`);
139
139
  shellExec(`cd ${buildBasePath}/engine && sudo mv ./${repoName}-private ./engine-private`);
@@ -1,65 +0,0 @@
1
- apiVersion: v1
2
- data:
3
- kubelet: |
4
- apiVersion: kubelet.config.k8s.io/v1beta1
5
- authentication:
6
- anonymous:
7
- enabled: false
8
- webhook:
9
- cacheTTL: 0s
10
- enabled: true
11
- x509:
12
- clientCAFile: /etc/kubernetes/pki/ca.crt
13
- authorization:
14
- mode: Webhook
15
- webhook:
16
- cacheAuthorizedTTL: 0s
17
- cacheUnauthorizedTTL: 0s
18
- cgroupDriver: systemd
19
- clusterDNS:
20
- - 10.96.0.10
21
- clusterDomain: cluster.local
22
- containerRuntimeEndpoint: unix:///run/containerd/containerd.sock
23
- cpuManagerReconcilePeriod: 0s
24
- crashLoopBackOff: {}
25
- evictionHard:
26
- imagefs.available: "5%" # Adjusted for more tolerance
27
- memory.available: "100Mi"
28
- nodefs.available: "5%" # Adjusted for more tolerance
29
- nodefs.inodesFree: "5%"
30
- evictionPressureTransitionPeriod: 0s
31
- fileCheckFrequency: 0s
32
- healthzBindAddress: 127.0.0.1
33
- healthzPort: 10248
34
- httpCheckFrequency: 0s
35
- imageMaximumGCAge: 0s
36
- imageMinimumGCAge: 0s
37
- kind: KubeletConfiguration
38
- logging:
39
- flushFrequency: 0
40
- options:
41
- json:
42
- infoBufferSize: "0"
43
- text:
44
- infoBufferSize: "0"
45
- verbosity: 0
46
- memorySwap: {}
47
- nodeStatusReportFrequency: 0s
48
- nodeStatusUpdateFrequency: 0s
49
- rotateCertificates: true
50
- runtimeRequestTimeout: 0s
51
- shutdownGracePeriod: 0s
52
- shutdownGracePeriodCriticalPods: 0s
53
- staticPodPath: /etc/kubernetes/manifests
54
- streamingConnectionIdleTimeout: 0s
55
- syncFrequency: 0s
56
- volumeStatsAggPeriod: 0s
57
- kind: ConfigMap
58
- metadata:
59
- annotations:
60
- kubeadm.kubernetes.io/component-config.hash: sha256:26488e9fc7c5cb5fdda9996cda2e6651a9af5febce07ea02de11bd3ef3f49e9c
61
- creationTimestamp: "2025-06-30T12:42:00Z"
62
- name: kubelet-config
63
- namespace: kube-system
64
- resourceVersion: "204"
65
- uid: a85321a8-f3e0-40fa-8e4e-9d33b8842e7a
@@ -1,16 +0,0 @@
1
- apiVersion: v1
2
- kind: Pod
3
- metadata:
4
- name: backup-access
5
- spec:
6
- containers:
7
- - name: busybox
8
- image: busybox
9
- command: ['sh', '-c', 'sleep 3600']
10
- volumeMounts:
11
- - name: backup-storage
12
- mountPath: /backup
13
- volumes:
14
- - name: backup-storage
15
- persistentVolumeClaim:
16
- claimName: backup-pvc
@@ -1,42 +0,0 @@
1
- apiVersion: batch/v1
2
- kind: CronJob
3
- metadata:
4
- name: mongodb-backup
5
- spec:
6
- schedule: '*/5 * * * *' # Runs backup every five minutes
7
- jobTemplate:
8
- spec:
9
- template:
10
- spec:
11
- containers:
12
- - name: mongodump
13
- image: docker.io/library/mongo:latest
14
- command:
15
- - sh
16
- - -c
17
- - |
18
- # Perform backup
19
- mongodump --host=mongodb-service --port=27017 --out=/backup/$(date +\%Y-\%m-\%dT\%H-\%M-\%S)
20
- # Remove backups older than 7 days
21
- find /backup -type d -mtime +7 -exec rm -rf {} +
22
- volumeMounts:
23
- - name: backup-storage
24
- mountPath: /backup
25
- restartPolicy: Never
26
- volumes:
27
- - name: backup-storage
28
- persistentVolumeClaim:
29
- claimName: backup-pvc
30
- # mongodump -u $MONGO_INITDB_ROOT_USERNAME -p $MONGO_INITDB_ROOT_PASSWORD --host=mongodb-service --port=27017 --out=/backup/$(date +\%Y-\%m-\%dT\%H-\%M-\%S)
31
-
32
- # env:
33
- # - name: MONGO_INITDB_ROOT_USERNAME
34
- # valueFrom:
35
- # secretKeyRef:
36
- # name: mongodb-secret
37
- # key: username
38
- # - name: MONGO_INITDB_ROOT_PASSWORD
39
- # valueFrom:
40
- # secretKeyRef:
41
- # name: mongodb-secret
42
- # key: password
@@ -1,22 +0,0 @@
1
- apiVersion: v1
2
- kind: PersistentVolume
3
- metadata:
4
- name: backup-pv
5
- spec:
6
- capacity:
7
- storage: 5Gi
8
- accessModes:
9
- - ReadWriteOnce
10
- hostPath:
11
- path: /mnt/backup
12
- ---
13
- apiVersion: v1
14
- kind: PersistentVolumeClaim
15
- metadata:
16
- name: backup-pvc
17
- spec:
18
- accessModes:
19
- - ReadWriteOnce
20
- resources:
21
- requests:
22
- storage: 5Gi
@@ -1,26 +0,0 @@
1
- # origin conf: /etc/mongod.conf
2
- apiVersion: v1
3
- kind: ConfigMap
4
- metadata:
5
- name: mongodb-config-file
6
- namespace: default
7
- data:
8
- mongod.conf: |
9
- storage:
10
- dbPath: /data/db
11
- systemLog:
12
- destination: file
13
- logAppend: true
14
- path: /var/log/mongodb/mongod.log
15
- replication:
16
- replSetName: rs0
17
- net:
18
- bindIp: 127.0.0.1
19
- port: 27017
20
- processManagement:
21
- fork: true
22
- setParameter:
23
- enableLocalhostAuthBypass: false
24
- security:
25
- authorization: enabled
26
- keyFile: /etc/mongodb-keyfile