underpost 2.8.6 → 2.8.7
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/.vscode/extensions.json +3 -2
- package/.vscode/settings.json +2 -0
- package/CHANGELOG.md +24 -4
- package/Dockerfile +9 -10
- package/README.md +39 -2
- package/bin/build.js +2 -2
- package/bin/deploy.js +1337 -131
- package/bin/file.js +8 -0
- package/bin/index.js +1 -218
- package/cli.md +451 -0
- package/docker-compose.yml +1 -1
- package/jsdoc.json +1 -1
- package/manifests/calico-custom-resources.yaml +25 -0
- package/manifests/deployment/adminer/deployment.yaml +32 -0
- package/manifests/deployment/adminer/kustomization.yaml +7 -0
- package/manifests/deployment/adminer/service.yaml +13 -0
- package/manifests/deployment/fastapi/backend-deployment.yml +120 -0
- package/manifests/deployment/fastapi/backend-service.yml +19 -0
- package/manifests/deployment/fastapi/frontend-deployment.yml +54 -0
- package/manifests/deployment/fastapi/frontend-service.yml +15 -0
- package/manifests/deployment/kafka/deployment.yaml +69 -0
- package/manifests/kubeadm-calico-config.yaml +119 -0
- package/manifests/mongodb-4.4/service-deployment.yaml +1 -1
- package/manifests/postgresql/configmap.yaml +9 -0
- package/manifests/postgresql/kustomization.yaml +10 -0
- package/manifests/postgresql/pv.yaml +15 -0
- package/manifests/postgresql/pvc.yaml +13 -0
- package/manifests/postgresql/service.yaml +10 -0
- package/manifests/postgresql/statefulset.yaml +37 -0
- package/manifests/valkey/statefulset.yaml +6 -4
- package/package.json +3 -9
- package/src/api/default/default.service.js +1 -1
- package/src/api/user/user.service.js +14 -11
- package/src/cli/cluster.js +207 -20
- package/src/cli/cron.js +39 -8
- package/src/cli/db.js +20 -10
- package/src/cli/deploy.js +254 -85
- package/src/cli/env.js +9 -3
- package/src/cli/fs.js +21 -9
- package/src/cli/image.js +42 -124
- package/src/cli/index.js +312 -0
- package/src/cli/monitor.js +236 -0
- package/src/cli/repository.js +5 -2
- package/src/client/components/core/Account.js +28 -24
- package/src/client/components/core/Blockchain.js +1 -1
- package/src/client/components/core/CalendarCore.js +14 -84
- package/src/client/components/core/CommonJs.js +2 -1
- package/src/client/components/core/Css.js +0 -1
- package/src/client/components/core/CssCore.js +10 -2
- package/src/client/components/core/Docs.js +1 -1
- package/src/client/components/core/EventsUI.js +3 -3
- package/src/client/components/core/FileExplorer.js +86 -78
- package/src/client/components/core/JoyStick.js +2 -2
- package/src/client/components/core/LoadingAnimation.js +1 -17
- package/src/client/components/core/LogIn.js +3 -3
- package/src/client/components/core/LogOut.js +1 -1
- package/src/client/components/core/Modal.js +14 -8
- package/src/client/components/core/Panel.js +19 -61
- package/src/client/components/core/PanelForm.js +13 -22
- package/src/client/components/core/Recover.js +3 -3
- package/src/client/components/core/RichText.js +1 -11
- package/src/client/components/core/Router.js +3 -1
- package/src/client/components/core/SignUp.js +2 -2
- package/src/client/components/default/RoutesDefault.js +3 -2
- package/src/client/services/default/default.management.js +45 -38
- package/src/client/ssr/Render.js +2 -0
- package/src/index.js +18 -2
- package/src/mailer/MailerProvider.js +3 -0
- package/src/runtime/lampp/Dockerfile +65 -0
- package/src/server/client-build.js +13 -0
- package/src/server/conf.js +93 -1
- package/src/server/dns.js +56 -18
- package/src/server/json-schema.js +77 -0
- package/src/server/network.js +7 -122
- package/src/server/peer.js +2 -2
- package/src/server/proxy.js +4 -4
- package/src/server/runtime.js +24 -11
- package/src/server/start.js +122 -0
- package/src/server/valkey.js +25 -11
package/jsdoc.json
CHANGED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# This section includes base Calico installation configuration.
|
|
2
|
+
# For more information, see: https://projectcalico.docs.tigera.io/master/reference/installation/api#operator.tigera.io/v1.Installation
|
|
3
|
+
apiVersion: operator.tigera.io/v1
|
|
4
|
+
kind: Installation
|
|
5
|
+
metadata:
|
|
6
|
+
name: default
|
|
7
|
+
spec:
|
|
8
|
+
# Configures Calico networking.
|
|
9
|
+
calicoNetwork:
|
|
10
|
+
# Note: The ipPools section cannot be modified post-install.
|
|
11
|
+
ipPools:
|
|
12
|
+
- blockSize: 26
|
|
13
|
+
cidr: 192.168.0.0/16
|
|
14
|
+
encapsulation: VXLANCrossSubnet
|
|
15
|
+
natOutgoing: Enabled
|
|
16
|
+
nodeSelector: all()
|
|
17
|
+
|
|
18
|
+
---
|
|
19
|
+
# This section configures the Calico API server.
|
|
20
|
+
# For more information, see: https://projectcalico.docs.tigera.io/master/reference/installation/api#operator.tigera.io/v1.APIServer
|
|
21
|
+
apiVersion: operator.tigera.io/v1
|
|
22
|
+
kind: APIServer
|
|
23
|
+
metadata:
|
|
24
|
+
name: default
|
|
25
|
+
spec: {}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
apiVersion: apps/v1
|
|
2
|
+
kind: Deployment
|
|
3
|
+
metadata:
|
|
4
|
+
name: adminer
|
|
5
|
+
labels:
|
|
6
|
+
app: adminer
|
|
7
|
+
group: db
|
|
8
|
+
spec:
|
|
9
|
+
replicas: 1
|
|
10
|
+
selector:
|
|
11
|
+
matchLabels:
|
|
12
|
+
app: adminer
|
|
13
|
+
template:
|
|
14
|
+
metadata:
|
|
15
|
+
labels:
|
|
16
|
+
app: adminer
|
|
17
|
+
group: db
|
|
18
|
+
spec:
|
|
19
|
+
containers:
|
|
20
|
+
- name: adminer
|
|
21
|
+
image: adminer:4.7.6-standalone
|
|
22
|
+
ports:
|
|
23
|
+
- containerPort: 8080
|
|
24
|
+
env:
|
|
25
|
+
- name: ADMINER_DESIGN
|
|
26
|
+
value: pepa-linha
|
|
27
|
+
- name: ADMINER_DEFAULT_SERVER
|
|
28
|
+
value: postgres
|
|
29
|
+
resources:
|
|
30
|
+
limits:
|
|
31
|
+
memory: '256Mi'
|
|
32
|
+
cpu: '500m'
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
apiVersion: apps/v1
|
|
2
|
+
kind: Deployment
|
|
3
|
+
metadata:
|
|
4
|
+
name: fastapi-backend
|
|
5
|
+
labels:
|
|
6
|
+
app: fastapi-backend
|
|
7
|
+
spec:
|
|
8
|
+
replicas: 2
|
|
9
|
+
selector:
|
|
10
|
+
matchLabels:
|
|
11
|
+
app: fastapi-backend
|
|
12
|
+
template:
|
|
13
|
+
metadata:
|
|
14
|
+
labels:
|
|
15
|
+
app: fastapi-backend
|
|
16
|
+
spec:
|
|
17
|
+
containers:
|
|
18
|
+
- name: fastapi-backend-container
|
|
19
|
+
image: localhost/fastapi-backend:latest
|
|
20
|
+
imagePullPolicy: IfNotPresent
|
|
21
|
+
|
|
22
|
+
ports:
|
|
23
|
+
- containerPort: 8000
|
|
24
|
+
name: http-api
|
|
25
|
+
|
|
26
|
+
env:
|
|
27
|
+
- name: POSTGRES_SERVER
|
|
28
|
+
value: postgres-service
|
|
29
|
+
- name: POSTGRES_PORT
|
|
30
|
+
value: '5432'
|
|
31
|
+
- name: POSTGRES_DB
|
|
32
|
+
valueFrom:
|
|
33
|
+
secretKeyRef:
|
|
34
|
+
name: fastapi-postgres-credentials
|
|
35
|
+
key: POSTGRES_DB
|
|
36
|
+
- name: POSTGRES_USER
|
|
37
|
+
valueFrom:
|
|
38
|
+
secretKeyRef:
|
|
39
|
+
name: fastapi-postgres-credentials
|
|
40
|
+
key: POSTGRES_USER
|
|
41
|
+
- name: POSTGRES_PASSWORD
|
|
42
|
+
valueFrom:
|
|
43
|
+
secretKeyRef:
|
|
44
|
+
name: fastapi-postgres-credentials
|
|
45
|
+
key: POSTGRES_PASSWORD
|
|
46
|
+
|
|
47
|
+
- name: PROJECT_NAME
|
|
48
|
+
value: 'Full Stack FastAPI Project'
|
|
49
|
+
- name: STACK_NAME
|
|
50
|
+
value: 'full-stack-fastapi-project'
|
|
51
|
+
|
|
52
|
+
- name: BACKEND_CORS_ORIGINS
|
|
53
|
+
value: 'http://localhost,http://localhost:5173,https://localhost,https://localhost:5173'
|
|
54
|
+
- name: SECRET_KEY
|
|
55
|
+
valueFrom:
|
|
56
|
+
secretKeyRef:
|
|
57
|
+
name: fastapi-backend-config-secret
|
|
58
|
+
key: SECRET_KEY
|
|
59
|
+
- name: FIRST_SUPERUSER
|
|
60
|
+
valueFrom:
|
|
61
|
+
secretKeyRef:
|
|
62
|
+
name: fastapi-backend-config-secret
|
|
63
|
+
key: FIRST_SUPERUSER
|
|
64
|
+
- name: FIRST_SUPERUSER_PASSWORD
|
|
65
|
+
valueFrom:
|
|
66
|
+
secretKeyRef:
|
|
67
|
+
name: fastapi-backend-config-secret
|
|
68
|
+
key: FIRST_SUPERUSER_PASSWORD
|
|
69
|
+
- name: USERS_OPEN_REGISTRATION
|
|
70
|
+
value: 'True'
|
|
71
|
+
|
|
72
|
+
# - name: SMTP_HOST
|
|
73
|
+
# valueFrom:
|
|
74
|
+
# secretKeyRef:
|
|
75
|
+
# name: fastapi-backend-config-secret
|
|
76
|
+
# key: SMTP_HOST
|
|
77
|
+
# - name: SMTP_USER
|
|
78
|
+
# valueFrom:
|
|
79
|
+
# secretKeyRef:
|
|
80
|
+
# name: fastapi-backend-config-secret
|
|
81
|
+
# key: SMTP_USER
|
|
82
|
+
# - name: SMTP_PASSWORD
|
|
83
|
+
# valueFrom:
|
|
84
|
+
# secretKeyRef:
|
|
85
|
+
# name: fastapi-backend-config-secret
|
|
86
|
+
# key: SMTP_PASSWORD
|
|
87
|
+
- name: EMAILS_FROM_EMAIL
|
|
88
|
+
value: 'info@example.com'
|
|
89
|
+
- name: SMTP_TLS
|
|
90
|
+
value: 'True'
|
|
91
|
+
- name: SMTP_SSL
|
|
92
|
+
value: 'False'
|
|
93
|
+
- name: SMTP_PORT
|
|
94
|
+
value: '587'
|
|
95
|
+
|
|
96
|
+
livenessProbe:
|
|
97
|
+
httpGet:
|
|
98
|
+
path: /docs
|
|
99
|
+
port: 8000
|
|
100
|
+
initialDelaySeconds: 30
|
|
101
|
+
periodSeconds: 20
|
|
102
|
+
timeoutSeconds: 10
|
|
103
|
+
failureThreshold: 3
|
|
104
|
+
|
|
105
|
+
readinessProbe:
|
|
106
|
+
httpGet:
|
|
107
|
+
path: /docs
|
|
108
|
+
port: 8000
|
|
109
|
+
initialDelaySeconds: 30
|
|
110
|
+
periodSeconds: 20
|
|
111
|
+
timeoutSeconds: 10
|
|
112
|
+
failureThreshold: 3
|
|
113
|
+
|
|
114
|
+
resources:
|
|
115
|
+
requests:
|
|
116
|
+
cpu: 200m
|
|
117
|
+
memory: 256Mi
|
|
118
|
+
limits:
|
|
119
|
+
cpu: 1000m
|
|
120
|
+
memory: 1Gi
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
apiVersion: v1
|
|
2
|
+
kind: Service
|
|
3
|
+
metadata:
|
|
4
|
+
name: fastapi-backend-service
|
|
5
|
+
labels:
|
|
6
|
+
app: fastapi-backend
|
|
7
|
+
spec:
|
|
8
|
+
selector:
|
|
9
|
+
app: fastapi-backend
|
|
10
|
+
ports:
|
|
11
|
+
- name: 'tcp-8000'
|
|
12
|
+
protocol: TCP
|
|
13
|
+
port: 8000
|
|
14
|
+
targetPort: 8000
|
|
15
|
+
- name: 'udp-8000'
|
|
16
|
+
protocol: UDP
|
|
17
|
+
port: 8000
|
|
18
|
+
targetPort: 8000
|
|
19
|
+
type: ClusterIP
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
apiVersion: apps/v1
|
|
2
|
+
kind: Deployment
|
|
3
|
+
metadata:
|
|
4
|
+
name: react-frontend
|
|
5
|
+
labels:
|
|
6
|
+
app: react-frontend
|
|
7
|
+
spec:
|
|
8
|
+
replicas: 2
|
|
9
|
+
selector:
|
|
10
|
+
matchLabels:
|
|
11
|
+
app: react-frontend
|
|
12
|
+
template:
|
|
13
|
+
metadata:
|
|
14
|
+
labels:
|
|
15
|
+
app: react-frontend
|
|
16
|
+
spec:
|
|
17
|
+
containers:
|
|
18
|
+
- name: react-frontend-container
|
|
19
|
+
image: localhost/fastapi-frontend:latest
|
|
20
|
+
imagePullPolicy: IfNotPresent
|
|
21
|
+
|
|
22
|
+
ports:
|
|
23
|
+
- containerPort: 80
|
|
24
|
+
name: http-web
|
|
25
|
+
|
|
26
|
+
env:
|
|
27
|
+
- name: VITE_FASTAPI_URL
|
|
28
|
+
value: '/api'
|
|
29
|
+
|
|
30
|
+
livenessProbe:
|
|
31
|
+
httpGet:
|
|
32
|
+
path: /
|
|
33
|
+
port: 80
|
|
34
|
+
initialDelaySeconds: 5
|
|
35
|
+
periodSeconds: 10
|
|
36
|
+
timeoutSeconds: 3
|
|
37
|
+
failureThreshold: 3
|
|
38
|
+
|
|
39
|
+
readinessProbe:
|
|
40
|
+
httpGet:
|
|
41
|
+
path: /
|
|
42
|
+
port: 80
|
|
43
|
+
initialDelaySeconds: 3
|
|
44
|
+
periodSeconds: 5
|
|
45
|
+
timeoutSeconds: 3
|
|
46
|
+
failureThreshold: 3
|
|
47
|
+
|
|
48
|
+
resources:
|
|
49
|
+
requests:
|
|
50
|
+
cpu: 100m
|
|
51
|
+
memory: 128Mi
|
|
52
|
+
limits:
|
|
53
|
+
cpu: 500m
|
|
54
|
+
memory: 512Mi
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
apiVersion: apps/v1
|
|
2
|
+
kind: StatefulSet
|
|
3
|
+
metadata:
|
|
4
|
+
name: kafka
|
|
5
|
+
namespace: kafka
|
|
6
|
+
labels:
|
|
7
|
+
app: kafka-app
|
|
8
|
+
spec:
|
|
9
|
+
serviceName: kafka-svc
|
|
10
|
+
replicas: 3
|
|
11
|
+
selector:
|
|
12
|
+
matchLabels:
|
|
13
|
+
app: kafka-app
|
|
14
|
+
template:
|
|
15
|
+
metadata:
|
|
16
|
+
labels:
|
|
17
|
+
app: kafka-app
|
|
18
|
+
spec:
|
|
19
|
+
containers:
|
|
20
|
+
- name: kafka-container
|
|
21
|
+
image: doughgle/kafka-kraft
|
|
22
|
+
ports:
|
|
23
|
+
- containerPort: 9092
|
|
24
|
+
- containerPort: 9093
|
|
25
|
+
env:
|
|
26
|
+
- name: REPLICAS
|
|
27
|
+
value: '3'
|
|
28
|
+
- name: SERVICE
|
|
29
|
+
value: kafka-svc
|
|
30
|
+
- name: NAMESPACE
|
|
31
|
+
value: kafka
|
|
32
|
+
- name: SHARE_DIR
|
|
33
|
+
value: /mnt/kafka
|
|
34
|
+
- name: CLUSTER_ID
|
|
35
|
+
value: bXktY2x1c3Rlci0xMjM0NQ==
|
|
36
|
+
- name: DEFAULT_REPLICATION_FACTOR
|
|
37
|
+
value: '3'
|
|
38
|
+
- name: DEFAULT_MIN_INSYNC_REPLICAS
|
|
39
|
+
value: '2'
|
|
40
|
+
volumeMounts:
|
|
41
|
+
- name: data
|
|
42
|
+
mountPath: /mnt/kafka
|
|
43
|
+
volumeClaimTemplates:
|
|
44
|
+
- metadata:
|
|
45
|
+
name: data
|
|
46
|
+
spec:
|
|
47
|
+
accessModes:
|
|
48
|
+
- 'ReadWriteOnce'
|
|
49
|
+
resources:
|
|
50
|
+
requests:
|
|
51
|
+
storage: '1Gi'
|
|
52
|
+
---
|
|
53
|
+
apiVersion: v1
|
|
54
|
+
kind: Service
|
|
55
|
+
metadata:
|
|
56
|
+
name: kafka-svc
|
|
57
|
+
namespace: kafka
|
|
58
|
+
labels:
|
|
59
|
+
app: kafka-app
|
|
60
|
+
spec:
|
|
61
|
+
type: NodePort
|
|
62
|
+
ports:
|
|
63
|
+
- name: '9092'
|
|
64
|
+
port: 9092
|
|
65
|
+
protocol: TCP
|
|
66
|
+
targetPort: 9092
|
|
67
|
+
nodePort: 30092
|
|
68
|
+
selector:
|
|
69
|
+
app: kafka-app
|
|
@@ -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,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,37 @@
|
|
|
1
|
+
apiVersion: apps/v1
|
|
2
|
+
kind: StatefulSet
|
|
3
|
+
metadata:
|
|
4
|
+
name: postgres
|
|
5
|
+
spec:
|
|
6
|
+
serviceName: postgres
|
|
7
|
+
replicas: 3
|
|
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,14 @@ 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
|
-
image:
|
|
22
|
+
image: valkey/valkey:latest
|
|
23
|
+
# Ensure you pull only if not present (Never will error if missing)
|
|
24
|
+
imagePullPolicy: Never
|
|
21
25
|
env:
|
|
22
26
|
- name: TZ
|
|
23
27
|
value: Europe/Zurich
|
|
@@ -35,5 +39,3 @@ spec:
|
|
|
35
39
|
failureThreshold: 2
|
|
36
40
|
periodSeconds: 30
|
|
37
41
|
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.
|
|
5
|
+
"version": "2.8.7",
|
|
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",
|
|
@@ -69,7 +70,6 @@
|
|
|
69
70
|
"cors": "^2.8.5",
|
|
70
71
|
"d3": "^7.9.0",
|
|
71
72
|
"dotenv": "^16.3.1",
|
|
72
|
-
"easy-json-schema": "^0.0.2-beta",
|
|
73
73
|
"easymde": "^2.18.0",
|
|
74
74
|
"env-cmd": "^10.1.0",
|
|
75
75
|
"express": "^4.18.2",
|
|
@@ -119,13 +119,7 @@
|
|
|
119
119
|
"vanilla-jsoneditor": "^2.3.2",
|
|
120
120
|
"winston": "^3.11.0"
|
|
121
121
|
},
|
|
122
|
-
"devDependencies": {
|
|
123
|
-
"clean-jsdoc-theme": "^4.3.0",
|
|
124
|
-
"easy-json-schema": "^0.0.2-beta",
|
|
125
|
-
"mocha": "^10.8.2",
|
|
126
|
-
"plantuml": "^0.0.2",
|
|
127
|
-
"swagger-autogen": "^2.23.7"
|
|
128
|
-
},
|
|
122
|
+
"devDependencies": {},
|
|
129
123
|
"publishConfig": {
|
|
130
124
|
"provenance": true,
|
|
131
125
|
"access": "public",
|
|
@@ -24,7 +24,7 @@ const DefaultService = {
|
|
|
24
24
|
/** @type {import('./default.model.js').DefaultModel} */
|
|
25
25
|
const Default = DataBaseProvider.instance[`${options.host}${options.path}`].mongoose.models.Default;
|
|
26
26
|
if (req.params.id) return await Default.findByIdAndDelete(req.params.id);
|
|
27
|
-
else return await
|
|
27
|
+
else return await Default.deleteMany();
|
|
28
28
|
},
|
|
29
29
|
};
|
|
30
30
|
|