underpost 2.8.67 → 2.8.75
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 +34 -1
- package/README.md +1 -1
- package/bin/deploy.js +284 -3
- package/cli.md +4 -1
- package/docker-compose.yml +1 -1
- package/manifests/deployment/adminer/service.yaml +1 -1
- 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/fastapi/initial_data.sh +56 -0
- package/manifests/deployment/kafka/deployment.yaml +69 -0
- package/manifests/deployment/spark/spark-pi-py.yaml +21 -0
- package/manifests/kubeadm-calico-config.yaml +119 -0
- package/manifests/kubelet-config.yaml +65 -0
- package/manifests/postgresql/statefulset.yaml +1 -1
- package/package.json +1 -1
- package/src/cli/cluster.js +164 -37
- package/src/cli/deploy.js +15 -0
- package/src/cli/image.js +15 -3
- package/src/cli/index.js +3 -0
- package/src/index.js +1 -1
- package/manifests/calico-custom-resources.yaml +0 -25
package/src/cli/deploy.js
CHANGED
|
@@ -256,6 +256,21 @@ kubectl scale statefulsets <stateful-set-name> --replicas=<new-replicas>
|
|
|
256
256
|
kubectl get pods -w
|
|
257
257
|
kubectl patch statefulset service-valkey --type='json' -p='[{"op": "replace", "path": "/spec/template/spec/containers/0/image", "value":"valkey/valkey:latest"}]'
|
|
258
258
|
kubectl patch statefulset service-valkey -p '{"spec":{"template":{"spec":{"containers":[{"name":"service-valkey","imagePullPolicy":"Never"}]}}}}'
|
|
259
|
+
kubectl logs -f <pod-name>
|
|
260
|
+
kubectl describe pod <pod-name>
|
|
261
|
+
kubectl exec -it <pod-name> -- bash
|
|
262
|
+
kubectl exec -it <pod-name> -- sh
|
|
263
|
+
docker exec -it kind-control-plane bash
|
|
264
|
+
curl -4 -v google.com
|
|
265
|
+
kubectl taint nodes <node-name> node-role.kubernetes.io/control-plane:NoSchedule-
|
|
266
|
+
kubectl run test-pod --image=busybox:latest --restart=Never -- /bin/sh -c "while true; do sleep 30; done;"
|
|
267
|
+
kubectl run test-pod --image=alpine/curl:latest --restart=Never -- sh -c "sleep infinity"
|
|
268
|
+
kubectl get ippools -o yaml
|
|
269
|
+
kubectl get node <node-name> -o jsonpath='{.spec.podCIDR}'
|
|
270
|
+
kubectl patch ippool default-ipv4-ippool --type='json' -p='[{"op": "replace", "path": "/spec/cidr", "value": "10.244.0.0/16"}]'
|
|
271
|
+
kubectl patch ippool default-ipv4-ippool --type='json' -p='[{"op": "replace", "path": "/spec/cidr", "value": "192.168.0.0/24"}]'
|
|
272
|
+
sudo podman run --rm localhost/<image-name>:<image-version> <command>
|
|
273
|
+
kubectl get configmap kubelet-config -n kube-system -o yaml > kubelet-config.yaml
|
|
259
274
|
`);
|
|
260
275
|
if (deployList === 'dd' && fs.existsSync(`./engine-private/deploy/dd.router`))
|
|
261
276
|
deployList = fs.readFileSync(`./engine-private/deploy/dd.router`, 'utf8');
|
package/src/cli/image.js
CHANGED
|
@@ -23,13 +23,24 @@ class UnderpostImage {
|
|
|
23
23
|
dockerfileName: '',
|
|
24
24
|
podmanSave: false,
|
|
25
25
|
kindLoad: false,
|
|
26
|
+
kubeadmLoad: false,
|
|
26
27
|
secrets: false,
|
|
27
28
|
secretsPath: '',
|
|
28
29
|
noCache: false,
|
|
29
30
|
},
|
|
30
31
|
) {
|
|
31
|
-
const {
|
|
32
|
-
|
|
32
|
+
const {
|
|
33
|
+
path,
|
|
34
|
+
imageName,
|
|
35
|
+
imagePath,
|
|
36
|
+
dockerfileName,
|
|
37
|
+
podmanSave,
|
|
38
|
+
secrets,
|
|
39
|
+
secretsPath,
|
|
40
|
+
kindLoad,
|
|
41
|
+
noCache,
|
|
42
|
+
kubeadmLoad,
|
|
43
|
+
} = options;
|
|
33
44
|
const podManImg = `localhost/${imageName}`;
|
|
34
45
|
if (imagePath && typeof imagePath === 'string' && !fs.existsSync(imagePath))
|
|
35
46
|
fs.mkdirSync(imagePath, { recursive: true });
|
|
@@ -54,11 +65,12 @@ class UnderpostImage {
|
|
|
54
65
|
shellExec(
|
|
55
66
|
`cd ${path}${secretsInput}&& sudo podman build -f ./${
|
|
56
67
|
dockerfileName && typeof dockerfileName === 'string' ? dockerfileName : 'Dockerfile'
|
|
57
|
-
} -t ${imageName} --pull=never --cap-add=CAP_AUDIT_WRITE${cache}${secretDockerInput}`,
|
|
68
|
+
} -t ${imageName} --pull=never --cap-add=CAP_AUDIT_WRITE${cache}${secretDockerInput} --network host`,
|
|
58
69
|
);
|
|
59
70
|
|
|
60
71
|
if (podmanSave === true) shellExec(`podman save -o ${tarFile} ${podManImg}`);
|
|
61
72
|
if (kindLoad === true) shellExec(`sudo kind load image-archive ${tarFile}`);
|
|
73
|
+
if (kubeadmLoad === true) shellExec(`sudo ctr -n k8s.io images import ${tarFile}`);
|
|
62
74
|
},
|
|
63
75
|
},
|
|
64
76
|
};
|
package/src/cli/index.js
CHANGED
|
@@ -96,9 +96,11 @@ program
|
|
|
96
96
|
.option('--valkey', 'Init with valkey service')
|
|
97
97
|
.option('--contour', 'Init with project contour base HTTPProxy and envoy')
|
|
98
98
|
.option('--cert-manager', 'Init with letsencrypt-prod ClusterIssuer')
|
|
99
|
+
.option('--dedicated-gpu', 'Init with dedicated gpu base resources env')
|
|
99
100
|
.option('--info', 'Get all kinds objects deployed')
|
|
100
101
|
.option('--full', 'Init with all statefulsets and services available')
|
|
101
102
|
.option('--ns-use <ns-name>', 'Switches current context to namespace')
|
|
103
|
+
.option('--kubeadm', 'Init with kubeadm controlplane management')
|
|
102
104
|
.option('--dev', 'init with dev cluster')
|
|
103
105
|
.option('--list-pods', 'Display list pods information')
|
|
104
106
|
.option('--info-capacity', 'display current total machine capacity info')
|
|
@@ -154,6 +156,7 @@ program
|
|
|
154
156
|
.option('--dockerfile-name [dockerfile-name]', 'set Dockerfile name')
|
|
155
157
|
.option('--podman-save', 'Export tar file from podman')
|
|
156
158
|
.option('--kind-load', 'Import tar image to Kind cluster')
|
|
159
|
+
.option('--kubeadm-load', 'Import tar image to Kubeadm cluster')
|
|
157
160
|
.option('--secrets', 'Dockerfile env secrets')
|
|
158
161
|
.option('--secrets-path [secrets-path]', 'Dockerfile custom path env secrets')
|
|
159
162
|
.option('--no-cache', 'Build without using cache')
|
package/src/index.js
CHANGED
|
@@ -1,25 +0,0 @@
|
|
|
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: {}
|