underpost 2.8.1 → 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.
Files changed (145) hide show
  1. package/.dockerignore +1 -0
  2. package/.github/workflows/ghpkg.yml +19 -49
  3. package/.github/workflows/npmpkg.yml +67 -0
  4. package/.github/workflows/publish.yml +5 -5
  5. package/.github/workflows/pwa-microservices-template.page.yml +12 -4
  6. package/.github/workflows/pwa-microservices-template.test.yml +2 -2
  7. package/.vscode/extensions.json +18 -71
  8. package/.vscode/settings.json +20 -3
  9. package/AUTHORS.md +16 -5
  10. package/CHANGELOG.md +123 -3
  11. package/Dockerfile +27 -70
  12. package/README.md +39 -29
  13. package/bin/build.js +186 -0
  14. package/bin/db.js +2 -24
  15. package/bin/deploy.js +1467 -236
  16. package/bin/file.js +67 -16
  17. package/bin/hwt.js +0 -10
  18. package/bin/index.js +1 -77
  19. package/bin/ssl.js +19 -11
  20. package/bin/util.js +9 -104
  21. package/bin/vs.js +26 -2
  22. package/cli.md +451 -0
  23. package/conf.js +29 -138
  24. package/docker-compose.yml +1 -1
  25. package/jsdoc.json +1 -1
  26. package/manifests/calico-custom-resources.yaml +25 -0
  27. package/manifests/deployment/adminer/deployment.yaml +32 -0
  28. package/manifests/deployment/adminer/kustomization.yaml +7 -0
  29. package/manifests/deployment/adminer/service.yaml +13 -0
  30. package/manifests/deployment/fastapi/backend-deployment.yml +120 -0
  31. package/manifests/deployment/fastapi/backend-service.yml +19 -0
  32. package/manifests/deployment/fastapi/frontend-deployment.yml +54 -0
  33. package/manifests/deployment/fastapi/frontend-service.yml +15 -0
  34. package/manifests/deployment/kafka/deployment.yaml +69 -0
  35. package/manifests/deployment/mongo-express/deployment.yaml +60 -0
  36. package/manifests/deployment/phpmyadmin/deployment.yaml +54 -0
  37. package/manifests/kind-config-dev.yaml +12 -0
  38. package/manifests/kind-config.yaml +12 -0
  39. package/manifests/kubeadm-calico-config.yaml +119 -0
  40. package/manifests/letsencrypt-prod.yaml +15 -0
  41. package/manifests/mariadb/config.yaml +10 -0
  42. package/manifests/mariadb/kustomization.yaml +9 -0
  43. package/manifests/mariadb/pv.yaml +12 -0
  44. package/manifests/mariadb/pvc.yaml +10 -0
  45. package/manifests/mariadb/secret.yaml +8 -0
  46. package/manifests/mariadb/service.yaml +10 -0
  47. package/manifests/mariadb/statefulset.yaml +55 -0
  48. package/manifests/mongodb/backup-access.yaml +16 -0
  49. package/manifests/mongodb/backup-cronjob.yaml +42 -0
  50. package/manifests/mongodb/backup-pv-pvc.yaml +22 -0
  51. package/manifests/mongodb/configmap.yaml +26 -0
  52. package/manifests/mongodb/headless-service.yaml +10 -0
  53. package/manifests/mongodb/kustomization.yaml +11 -0
  54. package/manifests/mongodb/pv-pvc.yaml +23 -0
  55. package/manifests/mongodb/statefulset.yaml +125 -0
  56. package/manifests/mongodb-4.4/kustomization.yaml +7 -0
  57. package/manifests/mongodb-4.4/pv-pvc.yaml +23 -0
  58. package/manifests/mongodb-4.4/service-deployment.yaml +63 -0
  59. package/manifests/postgresql/configmap.yaml +9 -0
  60. package/manifests/postgresql/kustomization.yaml +10 -0
  61. package/manifests/postgresql/pv.yaml +15 -0
  62. package/manifests/postgresql/pvc.yaml +13 -0
  63. package/manifests/postgresql/service.yaml +10 -0
  64. package/manifests/postgresql/statefulset.yaml +37 -0
  65. package/manifests/valkey/kustomization.yaml +7 -0
  66. package/manifests/valkey/service.yaml +17 -0
  67. package/manifests/valkey/statefulset.yaml +41 -0
  68. package/package.json +127 -136
  69. package/src/api/core/core.service.js +1 -1
  70. package/src/api/default/default.service.js +1 -1
  71. package/src/api/user/user.model.js +16 -3
  72. package/src/api/user/user.service.js +15 -12
  73. package/src/cli/cluster.js +389 -0
  74. package/src/cli/cron.js +121 -0
  75. package/src/cli/db.js +222 -0
  76. package/src/cli/deploy.js +487 -0
  77. package/src/cli/env.js +58 -0
  78. package/src/cli/fs.js +161 -0
  79. package/src/cli/image.js +66 -0
  80. package/src/cli/index.js +312 -0
  81. package/src/cli/monitor.js +236 -0
  82. package/src/cli/repository.js +128 -0
  83. package/src/cli/script.js +53 -0
  84. package/src/cli/secrets.js +37 -0
  85. package/src/cli/test.js +118 -0
  86. package/src/client/components/core/Account.js +28 -24
  87. package/src/client/components/core/Auth.js +22 -4
  88. package/src/client/components/core/Blockchain.js +1 -1
  89. package/src/client/components/core/CalendarCore.js +128 -121
  90. package/src/client/components/core/CommonJs.js +283 -19
  91. package/src/client/components/core/CssCore.js +16 -4
  92. package/src/client/components/core/Docs.js +1 -2
  93. package/src/client/components/core/DropDown.js +5 -1
  94. package/src/client/components/core/EventsUI.js +3 -3
  95. package/src/client/components/core/FileExplorer.js +86 -78
  96. package/src/client/components/core/Input.js +22 -6
  97. package/src/client/components/core/JoyStick.js +2 -2
  98. package/src/client/components/core/LoadingAnimation.js +3 -12
  99. package/src/client/components/core/LogIn.js +3 -3
  100. package/src/client/components/core/LogOut.js +1 -1
  101. package/src/client/components/core/Modal.js +54 -20
  102. package/src/client/components/core/Panel.js +109 -90
  103. package/src/client/components/core/PanelForm.js +23 -30
  104. package/src/client/components/core/Recover.js +3 -3
  105. package/src/client/components/core/RichText.js +1 -11
  106. package/src/client/components/core/Router.js +3 -1
  107. package/src/client/components/core/Scroll.js +1 -0
  108. package/src/client/components/core/SignUp.js +2 -2
  109. package/src/client/components/core/Translate.js +47 -9
  110. package/src/client/components/core/Validator.js +9 -1
  111. package/src/client/components/core/VanillaJs.js +0 -9
  112. package/src/client/components/core/Worker.js +34 -31
  113. package/src/client/components/default/RoutesDefault.js +3 -2
  114. package/src/client/services/core/core.service.js +15 -10
  115. package/src/client/services/default/default.management.js +46 -37
  116. package/src/client/ssr/Render.js +6 -1
  117. package/src/client/ssr/body/CacheControl.js +2 -3
  118. package/src/client/sw/default.sw.js +3 -3
  119. package/src/db/mongo/MongooseDB.js +29 -1
  120. package/src/index.js +101 -19
  121. package/src/mailer/MailerProvider.js +3 -0
  122. package/src/runtime/lampp/Dockerfile +65 -0
  123. package/src/runtime/lampp/Lampp.js +1 -13
  124. package/src/runtime/xampp/Xampp.js +0 -13
  125. package/src/server/auth.js +3 -3
  126. package/src/server/backup.js +49 -93
  127. package/src/server/client-build.js +49 -46
  128. package/src/server/client-formatted.js +6 -3
  129. package/src/server/conf.js +297 -55
  130. package/src/server/dns.js +75 -62
  131. package/src/server/downloader.js +0 -8
  132. package/src/server/json-schema.js +77 -0
  133. package/src/server/logger.js +15 -10
  134. package/src/server/network.js +20 -161
  135. package/src/server/peer.js +2 -2
  136. package/src/server/process.js +25 -2
  137. package/src/server/proxy.js +7 -29
  138. package/src/server/runtime.js +53 -40
  139. package/src/server/ssl.js +1 -1
  140. package/src/server/start.js +122 -0
  141. package/src/server/valkey.js +27 -11
  142. package/test/api.test.js +0 -8
  143. package/src/dns.js +0 -22
  144. package/src/server/prompt-optimizer.js +0 -28
  145. package/startup.js +0 -11
@@ -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,7 @@
1
+ ---
2
+ # kubectl apply -k manifests/deployment/adminer/.
3
+ apiVersion: kustomize.config.k8s.io/v1beta1
4
+ kind: Kustomization
5
+ resources:
6
+ - deployment.yaml
7
+ - service.yaml
@@ -0,0 +1,13 @@
1
+ apiVersion: v1
2
+ kind: Service
3
+ metadata:
4
+ name: adminer
5
+ labels:
6
+ group: db
7
+ spec:
8
+ type: ClusterIP
9
+ selector:
10
+ app: adminer
11
+ ports:
12
+ - port: 8080
13
+ targetPort: 8080
@@ -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,15 @@
1
+ apiVersion: v1
2
+ kind: Service
3
+ metadata:
4
+ name: react-frontend-service
5
+ labels:
6
+ app: react-frontend
7
+ spec:
8
+ selector:
9
+ app: react-frontend
10
+ ports:
11
+ - protocol: TCP
12
+ port: 80
13
+ targetPort: 80
14
+ name: http-web
15
+ type: ClusterIP
@@ -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,60 @@
1
+ apiVersion: apps/v1
2
+ kind: Deployment
3
+ metadata:
4
+ name: mongo-express
5
+ labels:
6
+ app: mongo-express
7
+ spec:
8
+ replicas: 1
9
+ selector:
10
+ matchLabels:
11
+ app: mongo-express
12
+ template:
13
+ metadata:
14
+ labels:
15
+ app: mongo-express
16
+ spec:
17
+ containers:
18
+ - name: mongo-express
19
+ image: mongo-express
20
+ ports:
21
+ - containerPort: 8081
22
+ env:
23
+ - name: ME_CONFIG_MONGODB_ADMINUSERNAME
24
+ valueFrom:
25
+ secretKeyRef:
26
+ name: mongodb-secret
27
+ key: username
28
+ - name: ME_CONFIG_MONGODB_ADMINPASSWORD
29
+ valueFrom:
30
+ secretKeyRef:
31
+ name: mongodb-secret
32
+ key: password
33
+ - name: ME_CONFIG_BASICAUTH_USERNAME
34
+ valueFrom:
35
+ secretKeyRef:
36
+ name: mongodb-secret
37
+ key: username
38
+ - name: ME_CONFIG_BASICAUTH_PASSWORD
39
+ valueFrom:
40
+ secretKeyRef:
41
+ name: mongodb-secret
42
+ key: password
43
+ - name: ME_CONFIG_MONGODB_SERVER
44
+ value: 'mongodb-0.mongodb-service'
45
+ - name: ME_CONFIG_MONGODB_ENABLE_ADMIN
46
+ value: 'true'
47
+ - name: ME_CONFIG_MONGODB_PORT
48
+ value: '27017'
49
+ ---
50
+ apiVersion: v1
51
+ kind: Service
52
+ metadata:
53
+ name: mongo-express-service
54
+ spec:
55
+ selector:
56
+ app: mongo-express
57
+ ports:
58
+ - protocol: TCP
59
+ port: 8081
60
+ targetPort: 8081
@@ -0,0 +1,54 @@
1
+ apiVersion: apps/v1
2
+ kind: Deployment
3
+ metadata:
4
+ name: phpmyadmin-deployment
5
+ labels:
6
+ app: phpmyadmin
7
+ spec:
8
+ replicas: 1
9
+ selector:
10
+ matchLabels:
11
+ app: phpmyadmin
12
+ template:
13
+ metadata:
14
+ labels:
15
+ app: phpmyadmin
16
+ spec:
17
+ containers:
18
+ - name: phpmyadmin
19
+ image: phpmyadmin/phpmyadmin
20
+ ports:
21
+ - containerPort: 80
22
+ env:
23
+ - name: PMA_HOST
24
+ value: 'mariadb'
25
+ - name: PMA_PORT
26
+ value: '3306'
27
+ - name: PMA_USER
28
+ valueFrom:
29
+ secretKeyRef:
30
+ name: mariadb-secret
31
+ key: username
32
+ - name: PMA_PASSWORD
33
+ valueFrom:
34
+ secretKeyRef:
35
+ name: mariadb-secret
36
+ key: password
37
+ - name: UPLOAD_LIMIT
38
+ value: '300M'
39
+ - name: PMA_ARBITRARY
40
+ value: '1'
41
+ ---
42
+ apiVersion: v1
43
+ kind: Service
44
+ metadata:
45
+ name: phpmyadmin-service
46
+ spec:
47
+ type: NodePort
48
+ selector:
49
+ app: phpmyadmin
50
+ ports:
51
+ - protocol: TCP
52
+ nodePort: 31008
53
+ port: 80
54
+ targetPort: 80
@@ -0,0 +1,12 @@
1
+ kind: Cluster
2
+ apiVersion: kind.x-k8s.io/v1alpha4
3
+ nodes:
4
+ - role: control-plane
5
+ - role: worker
6
+ # extraPortMappings:
7
+ # - containerPort: 80
8
+ # hostPort: 80
9
+ # listenAddress: '0.0.0.0'
10
+ # - containerPort: 443
11
+ # hostPort: 443
12
+ # listenAddress: '0.0.0.0'
@@ -0,0 +1,12 @@
1
+ kind: Cluster
2
+ apiVersion: kind.x-k8s.io/v1alpha4
3
+ nodes:
4
+ - role: control-plane
5
+ - role: worker
6
+ extraPortMappings:
7
+ - containerPort: 80
8
+ hostPort: 80
9
+ listenAddress: '0.0.0.0'
10
+ - containerPort: 443
11
+ hostPort: 443
12
+ listenAddress: '0.0.0.0'
@@ -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
+ apiVersion: cert-manager.io/v1
2
+ kind: ClusterIssuer
3
+ metadata:
4
+ name: letsencrypt-prod
5
+ namespace: cert-manager
6
+ spec:
7
+ acme:
8
+ email: development@underpost.net
9
+ privateKeySecretRef:
10
+ name: letsencrypt-prod
11
+ server: https://acme-v02.api.letsencrypt.org/directory
12
+ solvers:
13
+ - http01:
14
+ ingress:
15
+ class: contour
@@ -0,0 +1,10 @@
1
+ apiVersion: v1
2
+ kind: ConfigMap
3
+ metadata:
4
+ name: mariadb-config
5
+ data:
6
+ my.cnf: | # bind-address=0.0.0.0
7
+ [mysqld]
8
+ default_storage_engine=InnoDB
9
+ innodb_file_per_table=1
10
+ max_connections=1000
@@ -0,0 +1,9 @@
1
+ ---
2
+ # kubectl apply -k mariadb/.
3
+ apiVersion: kustomize.config.k8s.io/v1beta1
4
+ kind: Kustomization
5
+ resources:
6
+ - pv.yaml
7
+ - pvc.yaml
8
+ - statefulset.yaml
9
+ - service.yaml
@@ -0,0 +1,12 @@
1
+ apiVersion: v1
2
+ kind: PersistentVolume
3
+ metadata:
4
+ name: mariadb-pv
5
+ spec:
6
+ capacity:
7
+ storage: 1Gi
8
+ volumeMode: Filesystem
9
+ accessModes:
10
+ - ReadWriteOnce
11
+ hostPath:
12
+ path: /data/mariadb
@@ -0,0 +1,10 @@
1
+ apiVersion: v1
2
+ kind: PersistentVolumeClaim
3
+ metadata:
4
+ name: mariadb-pvc
5
+ spec:
6
+ accessModes:
7
+ - ReadWriteOnce
8
+ resources:
9
+ requests:
10
+ storage: 1Gi
@@ -0,0 +1,8 @@
1
+ apiVersion: v1
2
+ kind: Secret
3
+ metadata:
4
+ name: mariadb-secret
5
+ type: Opaque
6
+ data:
7
+ password:
8
+ username: