underpost 2.8.652 → 2.8.781

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 (51) hide show
  1. package/.vscode/extensions.json +37 -2
  2. package/.vscode/settings.json +2 -0
  3. package/CHANGELOG.md +24 -4
  4. package/README.md +5 -4
  5. package/bin/deploy.js +1455 -144
  6. package/cli.md +57 -14
  7. package/docker-compose.yml +1 -1
  8. package/manifests/deployment/adminer/deployment.yaml +32 -0
  9. package/manifests/deployment/adminer/kustomization.yaml +7 -0
  10. package/manifests/deployment/adminer/service.yaml +13 -0
  11. package/manifests/deployment/fastapi/backend-deployment.yml +120 -0
  12. package/manifests/deployment/fastapi/backend-service.yml +19 -0
  13. package/manifests/deployment/fastapi/frontend-deployment.yml +54 -0
  14. package/manifests/deployment/fastapi/frontend-service.yml +15 -0
  15. package/manifests/deployment/fastapi/initial_data.sh +56 -0
  16. package/manifests/deployment/kafka/deployment.yaml +69 -0
  17. package/manifests/deployment/spark/spark-pi-py.yaml +21 -0
  18. package/manifests/envoy-service-nodeport.yaml +23 -0
  19. package/manifests/kubeadm-calico-config.yaml +119 -0
  20. package/manifests/kubelet-config.yaml +65 -0
  21. package/manifests/mongodb/kustomization.yaml +1 -1
  22. package/manifests/mongodb/statefulset.yaml +12 -11
  23. package/manifests/mongodb/storage-class.yaml +9 -0
  24. package/manifests/mongodb-4.4/service-deployment.yaml +1 -1
  25. package/manifests/mysql/kustomization.yaml +7 -0
  26. package/manifests/mysql/pv-pvc.yaml +27 -0
  27. package/manifests/mysql/statefulset.yaml +55 -0
  28. package/manifests/postgresql/configmap.yaml +9 -0
  29. package/manifests/postgresql/kustomization.yaml +10 -0
  30. package/manifests/postgresql/pv.yaml +15 -0
  31. package/manifests/postgresql/pvc.yaml +13 -0
  32. package/manifests/postgresql/service.yaml +10 -0
  33. package/manifests/postgresql/statefulset.yaml +37 -0
  34. package/manifests/valkey/statefulset.yaml +4 -3
  35. package/package.json +2 -1
  36. package/src/cli/cluster.js +281 -27
  37. package/src/cli/deploy.js +81 -15
  38. package/src/cli/fs.js +14 -3
  39. package/src/cli/image.js +34 -7
  40. package/src/cli/index.js +36 -1
  41. package/src/cli/lxd.js +19 -0
  42. package/src/cli/monitor.js +75 -30
  43. package/src/cli/repository.js +9 -6
  44. package/src/client/components/core/JoyStick.js +2 -2
  45. package/src/client/components/core/Modal.js +1 -0
  46. package/src/index.js +1 -1
  47. package/src/runtime/lampp/Dockerfile +1 -1
  48. package/src/server/conf.js +5 -1
  49. package/src/server/dns.js +47 -17
  50. package/src/server/runtime.js +2 -0
  51. package/src/server/start.js +0 -1
@@ -0,0 +1,119 @@
1
+ # This consolidated YAML file contains configurations for:
2
+ # 1. Calico Installation (Installation and APIServer resources)
3
+ # 2. A permissive Egress NetworkPolicy for the 'default' namespace
4
+ #
5
+ # These are standard Kubernetes resources that can be applied directly using 'kubectl apply'.
6
+ # The kubeadm-specific ClusterConfiguration and InitConfiguration have been removed
7
+ # as they are only processed by the 'kubeadm init' command, not 'kubectl apply'.
8
+
9
+ # --- Calico Installation: Base configuration for Calico ---
10
+ # For more information, see: https://projectcalico.docs.tigera.io/master/reference/installation/api#operator.tigera.io/v1.Installation
11
+ apiVersion: operator.tigera.io/v1
12
+ kind: Installation
13
+ metadata:
14
+ name: default
15
+ spec:
16
+ # Configures Calico networking.
17
+ calicoNetwork:
18
+ # Note: The ipPools section cannot be modified post-install.
19
+ ipPools:
20
+ - blockSize: 26
21
+ cidr: 192.168.0.0/16
22
+ encapsulation: VXLANCrossSubnet
23
+ natOutgoing: Enabled
24
+ nodeSelector: all()
25
+
26
+ ---
27
+ # This section configures the Calico API server.
28
+ # For more information, see: https://projectcalico.docs.tigera.io/master/reference/installation/api#operator.tigera.io/v1.APIServer
29
+ apiVersion: operator.tigera.io/v1
30
+ kind: APIServer
31
+ metadata:
32
+ name: default
33
+ spec: {}
34
+
35
+ ---
36
+ # This consolidated NetworkPolicy file ensures that all pods in the specified namespaces
37
+ # have unrestricted egress (outbound) access.
38
+ # This is useful for troubleshooting or for environments where strict egress control
39
+ # is not immediately required for these system/default namespaces.
40
+
41
+ ---
42
+ # Policy for the 'default' namespace
43
+ apiVersion: networking.k8s.io/v1
44
+ kind: NetworkPolicy
45
+ metadata:
46
+ name: allow-all-egress-default-namespace
47
+ namespace: default # This policy applies to the 'default' namespace
48
+ spec:
49
+ podSelector: {} # Selects all pods in this namespace
50
+ policyTypes:
51
+ - Egress
52
+ egress:
53
+ - to:
54
+ - ipBlock:
55
+ cidr: 0.0.0.0/0 # Allows traffic to any IPv4 address
56
+
57
+ ---
58
+ # Policy for the 'kube-system' namespace
59
+ apiVersion: networking.k8s.io/v1
60
+ kind: NetworkPolicy
61
+ metadata:
62
+ name: allow-all-egress-kube-system-namespace
63
+ namespace: kube-system # This policy applies to the 'kube-system' namespace
64
+ spec:
65
+ podSelector: {} # Selects all pods in this namespace
66
+ policyTypes:
67
+ - Egress
68
+ egress:
69
+ - to:
70
+ - ipBlock:
71
+ cidr: 0.0.0.0/0 # Allows traffic to any IPv4 address
72
+
73
+ ---
74
+ # Policy for the 'kube-node-lease' namespace
75
+ apiVersion: networking.k8s.io/v1
76
+ kind: NetworkPolicy
77
+ metadata:
78
+ name: allow-all-egress-kube-node-lease-namespace
79
+ namespace: kube-node-lease # This policy applies to the 'kube-node-lease' namespace
80
+ spec:
81
+ podSelector: {} # Selects all pods in this namespace
82
+ policyTypes:
83
+ - Egress
84
+ egress:
85
+ - to:
86
+ - ipBlock:
87
+ cidr: 0.0.0.0/0 # Allows traffic to any IPv4 address
88
+
89
+ ---
90
+ # Policy for the 'kube-public' namespace
91
+ apiVersion: networking.k8s.io/v1
92
+ kind: NetworkPolicy
93
+ metadata:
94
+ name: allow-all-egress-kube-public-namespace
95
+ namespace: kube-public # This policy applies to the 'kube-public' namespace
96
+ spec:
97
+ podSelector: {} # Selects all pods in this namespace
98
+ policyTypes:
99
+ - Egress
100
+ egress:
101
+ - to:
102
+ - ipBlock:
103
+ cidr: 0.0.0.0/0 # Allows traffic to any IPv4 address
104
+
105
+ ---
106
+ # Policy for the 'tigera-operator' namespace
107
+ apiVersion: networking.k8s.io/v1
108
+ kind: NetworkPolicy
109
+ metadata:
110
+ name: allow-all-egress-tigera-operator-namespace
111
+ namespace: tigera-operator # This policy applies to the 'tigera-operator' namespace
112
+ spec:
113
+ podSelector: {} # Selects all pods in this namespace
114
+ policyTypes:
115
+ - Egress
116
+ egress:
117
+ - to:
118
+ - ipBlock:
119
+ cidr: 0.0.0.0/0 # Allows traffic to any IPv4 address
@@ -0,0 +1,65 @@
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
@@ -6,6 +6,6 @@ resources:
6
6
  - pv-pvc.yaml
7
7
  - headless-service.yaml
8
8
  - statefulset.yaml
9
- - backup-pv-pvc.yaml
9
+ # - backup-pv-pvc.yaml
10
10
  # - backup-cronjob.yaml
11
11
  # - backup-access.yaml
@@ -3,7 +3,7 @@ kind: StatefulSet
3
3
  metadata:
4
4
  name: mongodb # Specifies the name of the statefulset
5
5
  spec:
6
- serviceName: 'mongodb-service' # Specifies the service to use
6
+ serviceName: "mongodb-service" # Specifies the service to use
7
7
  replicas: 2
8
8
  selector:
9
9
  matchLabels:
@@ -18,8 +18,8 @@ spec:
18
18
  image: docker.io/library/mongo:latest
19
19
  command:
20
20
  - mongod
21
- - '--replSet'
22
- - 'rs0'
21
+ - "--replSet"
22
+ - "rs0"
23
23
  # - '--config'
24
24
  # - '-f'
25
25
  # - '/etc/mongod.conf'
@@ -35,9 +35,9 @@ spec:
35
35
  # - '--setParameter'
36
36
  # - 'authenticationMechanisms=SCRAM-SHA-1'
37
37
  # - '--fork'
38
- - '--logpath'
39
- - '/var/log/mongodb/mongod.log'
40
- - '--bind_ip_all'
38
+ - "--logpath"
39
+ - "/var/log/mongodb/mongod.log"
40
+ - "--bind_ip_all"
41
41
  # command: ['sh', '-c']
42
42
  # args:
43
43
  # - |
@@ -99,11 +99,11 @@ spec:
99
99
  key: password
100
100
  resources:
101
101
  requests:
102
- cpu: '100m'
103
- memory: '256Mi'
102
+ cpu: "100m"
103
+ memory: "256Mi"
104
104
  limits:
105
- cpu: '500m'
106
- memory: '512Mi'
105
+ cpu: "500m"
106
+ memory: "512Mi"
107
107
  volumes:
108
108
  - name: keyfile
109
109
  secret:
@@ -119,7 +119,8 @@ spec:
119
119
  - metadata:
120
120
  name: mongodb-storage
121
121
  spec:
122
- accessModes: ['ReadWriteOnce']
122
+ accessModes: ["ReadWriteOnce"]
123
+ storageClassName: mongodb-storage-class
123
124
  resources:
124
125
  requests:
125
126
  storage: 5Gi
@@ -0,0 +1,9 @@
1
+ apiVersion: storage.k8s.io/v1
2
+ kind: StorageClass
3
+ metadata:
4
+ name: mongodb-storage-class
5
+ annotations:
6
+ storageclass.kubernetes.io/is-default-class: "false"
7
+ provisioner: rancher.io/local-path
8
+ reclaimPolicy: Retain
9
+ volumeBindingMode: WaitForFirstConsumer
@@ -16,7 +16,7 @@ spec:
16
16
  hostname: mongo
17
17
  containers:
18
18
  - name: mongodb
19
- image: docker.io/library/mongo:4.4
19
+ image: mongo:4.4
20
20
  command: ['mongod', '--replSet', 'rs0', '--bind_ip_all']
21
21
  # -- bash
22
22
  # mongo
@@ -0,0 +1,7 @@
1
+ ---
2
+ # kubectl apply -k core/.
3
+ apiVersion: kustomize.config.k8s.io/v1beta1
4
+ kind: Kustomization
5
+ resources:
6
+ - pv-pvc.yaml
7
+ - statefulset.yaml
@@ -0,0 +1,27 @@
1
+ # pv-pvc.yaml
2
+ apiVersion: v1
3
+ kind: PersistentVolume
4
+ metadata:
5
+ name: mysql-pv
6
+ labels:
7
+ type: local
8
+ spec:
9
+ storageClassName: manual
10
+ capacity:
11
+ storage: 20Gi
12
+ accessModes:
13
+ - ReadWriteOnce
14
+ hostPath:
15
+ path: "/mnt/data"
16
+ ---
17
+ apiVersion: v1
18
+ kind: PersistentVolumeClaim
19
+ metadata:
20
+ name: mysql-pv-claim
21
+ spec:
22
+ storageClassName: manual
23
+ accessModes:
24
+ - ReadWriteOnce
25
+ resources:
26
+ requests:
27
+ storage: 20Gi
@@ -0,0 +1,55 @@
1
+ apiVersion: v1
2
+ kind: Service
3
+ metadata:
4
+ name: mysql
5
+ labels:
6
+ app: mysql
7
+ spec:
8
+ ports:
9
+ - port: 3306
10
+ name: mysql
11
+ selector:
12
+ app: mysql
13
+ clusterIP: None
14
+ ---
15
+ apiVersion: apps/v1
16
+ kind: StatefulSet
17
+ metadata:
18
+ name: mysql
19
+ spec:
20
+ serviceName: "mysql"
21
+ selector:
22
+ matchLabels:
23
+ app: mysql
24
+ replicas: 1
25
+ template:
26
+ metadata:
27
+ labels:
28
+ app: mysql
29
+ spec:
30
+ containers:
31
+ - image: mysql:9
32
+ name: mysql
33
+ env:
34
+ - name: MYSQL_ROOT_PASSWORD
35
+ valueFrom:
36
+ secretKeyRef:
37
+ name: mysql-secret
38
+ key: password
39
+ ports:
40
+ - containerPort: 3306
41
+ name: mysql
42
+ volumeMounts:
43
+ - name: mysql-persistent-storage
44
+ mountPath: /var/lib/mysql
45
+ subPath: mysql
46
+ volumeClaimTemplates:
47
+ - metadata:
48
+ name: mysql-persistent-storage
49
+ spec:
50
+ storageClassName: manual
51
+ accessModes:
52
+ - ReadWriteOnce
53
+ resources:
54
+ requests:
55
+ storage: 20Gi
@@ -0,0 +1,9 @@
1
+ apiVersion: v1
2
+ kind: ConfigMap
3
+ metadata:
4
+ name: postgres-config
5
+ labels:
6
+ app: postgres
7
+ data:
8
+ POSTGRES_DB: postgresdb
9
+ POSTGRES_USER: admin
@@ -0,0 +1,10 @@
1
+ ---
2
+ # kubectl apply -k postgresql/.
3
+ apiVersion: kustomize.config.k8s.io/v1beta1
4
+ kind: Kustomization
5
+ resources:
6
+ - pv.yaml
7
+ - pvc.yaml
8
+ - configmap.yaml
9
+ - statefulset.yaml
10
+ - service.yaml
@@ -0,0 +1,15 @@
1
+ kind: PersistentVolume
2
+ apiVersion: v1
3
+ metadata:
4
+ name: postgres-pv-volume
5
+ labels:
6
+ type: local
7
+ app: postgres
8
+ spec:
9
+ storageClassName: manual
10
+ capacity:
11
+ storage: 5Gi
12
+ accessModes:
13
+ - ReadWriteMany
14
+ hostPath:
15
+ path: '/mnt/data'
@@ -0,0 +1,13 @@
1
+ kind: PersistentVolumeClaim
2
+ apiVersion: v1
3
+ metadata:
4
+ name: postgres-pv-claim
5
+ labels:
6
+ app: postgres
7
+ spec:
8
+ storageClassName: manual
9
+ accessModes:
10
+ - ReadWriteMany
11
+ resources:
12
+ requests:
13
+ storage: 5Gi
@@ -0,0 +1,10 @@
1
+ apiVersion: v1
2
+ kind: Service
3
+ metadata:
4
+ name: postgres-service
5
+ spec:
6
+ clusterIP: None
7
+ selector:
8
+ app: postgres
9
+ ports:
10
+ - port: 5432
@@ -0,0 +1,37 @@
1
+ apiVersion: apps/v1
2
+ kind: StatefulSet
3
+ metadata:
4
+ name: postgres
5
+ spec:
6
+ serviceName: postgres
7
+ replicas: 1
8
+ selector:
9
+ matchLabels:
10
+ app: postgres
11
+ template:
12
+ metadata:
13
+ labels:
14
+ app: postgres
15
+ spec:
16
+ containers:
17
+ - name: postgres
18
+ image: postgres:latest
19
+ imagePullPolicy: Never
20
+ ports:
21
+ - containerPort: 5432
22
+ envFrom:
23
+ - configMapRef:
24
+ name: postgres-config
25
+ env:
26
+ - name: POSTGRES_PASSWORD
27
+ valueFrom:
28
+ secretKeyRef:
29
+ name: postgres-secret
30
+ key: password
31
+ volumeMounts:
32
+ - mountPath: /var/lib/postgresql/data
33
+ name: postgredb
34
+ volumes:
35
+ - name: postgredb
36
+ persistentVolumeClaim:
37
+ claimName: postgres-pv-claim
@@ -1,4 +1,3 @@
1
- ---
2
1
  apiVersion: apps/v1
3
2
  kind: StatefulSet
4
3
  metadata:
@@ -15,9 +14,13 @@ spec:
15
14
  labels:
16
15
  app: service-valkey
17
16
  spec:
17
+ # Prevent automatic token mounting if you're not using the default ServiceAccount
18
+ automountServiceAccountToken: false
19
+
18
20
  containers:
19
21
  - name: service-valkey
20
22
  image: docker.io/valkey/valkey:latest
23
+ imagePullPolicy: IfNotPresent
21
24
  env:
22
25
  - name: TZ
23
26
  value: Europe/Zurich
@@ -35,5 +38,3 @@ spec:
35
38
  failureThreshold: 2
36
39
  periodSeconds: 30
37
40
  timeoutSeconds: 5
38
- restartPolicy: Always
39
- automountServiceAccountToken: false
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "type": "module",
3
3
  "main": "src/index.js",
4
4
  "name": "underpost",
5
- "version": "2.8.652",
5
+ "version": "2.8.781",
6
6
  "description": "pwa api rest template",
7
7
  "scripts": {
8
8
  "start": "env-cmd -f .env.production node --max-old-space-size=8192 src/server",
@@ -11,6 +11,7 @@
11
11
  "dev": "env-cmd -f .env.development node src/client.dev default",
12
12
  "dev-img": "env-cmd -f .env.development node src/server",
13
13
  "prod-img": "env-cmd -f .env.production node src/server",
14
+ "monitor": "pm2 start bin/deploy.js --name monitor -- monitor",
14
15
  "dev-api": "env-cmd -f .env.development nodemon --watch src --ignore src/client src/api",
15
16
  "dev-client": "env-cmd -f .env.development node src/client.dev",
16
17
  "proxy": "node src/proxy proxy",