underpost 2.8.71 → 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.
@@ -5,15 +5,48 @@
5
5
  "codeium.codeium",
6
6
  "eamodio.gitlens",
7
7
  "esbenp.prettier-vscode",
8
+ "formulahendry.code-runner",
8
9
  "foxundermoon.shell-format",
10
+ "github.codespaces",
9
11
  "github.vscode-github-actions",
10
12
  "golang.go",
11
13
  "google.geminicodeassist",
14
+ "gruntfuggly.todo-tree",
15
+ "mechatroner.rainbow-csv",
16
+ "mindaro-dev.file-downloader",
17
+ "mindaro.mindaro",
18
+ "ms-azuretools.vscode-containers",
19
+ "ms-azuretools.vscode-docker",
20
+ "ms-kubernetes-tools.vscode-kubernetes-tools",
12
21
  "ms-python.black-formatter",
13
22
  "ms-python.debugpy",
14
23
  "ms-python.python",
15
24
  "ms-python.vscode-pylance",
25
+ "oderwat.indent-rainbow",
26
+ "pleiades.java-extension-pack-jdk",
27
+ "ravioshankar.scala-gurus",
28
+ "redhat.java",
29
+ "redhat.vscode-xml",
30
+ "redhat.vscode-yaml",
31
+ "ritwickdey.liveserver",
32
+ "scala-lang.scala",
33
+ "scala-lang.scala-snippets",
34
+ "scalameta.metals",
35
+ "shardulm94.trailing-spaces",
16
36
  "streetsidesoftware.code-spell-checker",
17
- "tobermory.es6-string-html"
37
+ "tamasfe.even-better-toml",
38
+ "tobermory.es6-string-html",
39
+ "visualstudioexptteam.intellicode-api-usage-examples",
40
+ "visualstudioexptteam.vscodeintellicode",
41
+ "vmware.vscode-boot-dev-pack",
42
+ "vmware.vscode-spring-boot",
43
+ "vscjava.vscode-gradle",
44
+ "vscjava.vscode-java-debug",
45
+ "vscjava.vscode-java-dependency",
46
+ "vscjava.vscode-java-pack",
47
+ "vscjava.vscode-java-test",
48
+ "vscjava.vscode-maven",
49
+ "vscjava.vscode-spring-boot-dashboard",
50
+ "vscjava.vscode-spring-initializr"
18
51
  ]
19
52
  }
package/README.md CHANGED
@@ -68,7 +68,7 @@ Run dev client server
68
68
  npm run dev
69
69
  ```
70
70
  <!-- -->
71
- ## underpost ci/cd cli v2.8.71
71
+ ## underpost ci/cd cli v2.8.75
72
72
 
73
73
  ### Usage: `underpost [options] [command]`
74
74
  ```
package/bin/deploy.js CHANGED
@@ -816,8 +816,8 @@ try {
816
816
  shellExec(`node bin/deploy update-dependencies`);
817
817
  shellExec(`auto-changelog`);
818
818
  shellExec(`node bin/build dd`);
819
- shellExec(`node bin deploy --build-manifest --sync --info-router --replicas 1 dd`);
820
- shellExec(`node bin deploy --build-manifest --sync --info-router --replicas 1 dd production`);
819
+ shellExec(`node bin deploy --kubeadm --build-manifest --sync --info-router --replicas 1 dd`);
820
+ shellExec(`node bin deploy --kubeadm --build-manifest --sync --info-router --replicas 1 dd production`);
821
821
  break;
822
822
  }
823
823
 
@@ -1000,6 +1000,8 @@ EOF`);
1000
1000
  shellExec(`sudo chmod 700 ~/.ssh/`);
1001
1001
  shellExec(`sudo chmod 600 ~/.ssh/authorized_keys`);
1002
1002
  shellExec(`sudo chmod 644 ~/.ssh/known_hosts`);
1003
+ shellExec(`sudo chmod 600 ~/.ssh/id_rsa`);
1004
+ shellExec(`sudo chmod 600 /etc/ssh/ssh_host_ed25519_key`);
1003
1005
  shellExec(`chown -R ${user}:${user} ~/.ssh`);
1004
1006
 
1005
1007
  shellExec(`ufw allow ${port}/tcp`);
@@ -2218,7 +2220,7 @@ EOF`);
2218
2220
  const args = [
2219
2221
  `node bin dockerfile-image-build --path ${path}/backend/`,
2220
2222
  `--image-name=${imageName} --image-path=${path}`,
2221
- `--podman-save --kind-load --no-cache`,
2223
+ `--podman-save --${process.argv.includes('kubeadm') ? 'kubeadm' : 'kind'}-load --no-cache`,
2222
2224
  ];
2223
2225
  shellExec(args.join(' '));
2224
2226
  }
@@ -2230,7 +2232,7 @@ EOF`);
2230
2232
  const args = [
2231
2233
  `node bin dockerfile-image-build --path ${path}/frontend/`,
2232
2234
  `--image-name=${imageName} --image-path=${path}`,
2233
- `--podman-save --kind-load --no-cache`,
2235
+ `--podman-save --${process.argv.includes('kubeadm') ? 'kubeadm' : 'kind'}-load --no-cache`,
2234
2236
  ];
2235
2237
  shellExec(args.join(' '));
2236
2238
  }
@@ -2268,6 +2270,10 @@ EOF`);
2268
2270
  }
2269
2271
 
2270
2272
  case 'conda': {
2273
+ // set -e
2274
+ // ENV_NAME="${1:-cuda_env}"
2275
+ // eval "$(conda shell.bash hook)"
2276
+ // conda activate "${ENV_NAME}"
2271
2277
  shellExec(
2272
2278
  `export PATH="/root/miniconda3/bin:$PATH" && conda init && conda config --set auto_activate_base false`,
2273
2279
  );
@@ -2279,7 +2285,10 @@ EOF`);
2279
2285
  // https://medium.com/@martin.hodges/deploying-kafka-on-a-kind-kubernetes-cluster-for-development-and-testing-purposes-ed7adefe03cb
2280
2286
  const imageName = `doughgle/kafka-kraft`;
2281
2287
  shellExec(`docker pull ${imageName}`);
2282
- shellExec(`kind load docker-image ${imageName}`);
2288
+ if (!process.argv.includes('kubeadm'))
2289
+ shellExec(
2290
+ `${process.argv.includes('kubeadm') ? `ctr -n k8s.io images import` : `kind load docker-image`} ${imageName}`,
2291
+ );
2283
2292
  shellExec(`kubectl create namespace kafka`);
2284
2293
  shellExec(`kubectl apply -f ./manifests/deployment/kafka/deployment.yaml`);
2285
2294
  // kubectl logs kafka-0 -n kafka | grep STARTED
@@ -2294,6 +2303,108 @@ EOF`);
2294
2303
  // kafka-console-consumer.sh --bootstrap-server kafka-svc:9092 --topic my-topic
2295
2304
  break;
2296
2305
  }
2306
+
2307
+ case 'nvidia-gpu-operator': {
2308
+ // https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/install-guide.html
2309
+ shellExec(`curl -s -L https://nvidia.github.io/libnvidia-container/stable/rpm/nvidia-container-toolkit.repo | \
2310
+ sudo tee /etc/yum.repos.d/nvidia-container-toolkit.repo`);
2311
+
2312
+ const NVIDIA_CONTAINER_TOOLKIT_VERSION = '1.17.8-1';
2313
+
2314
+ shellExec(`sudo dnf install -y \
2315
+ nvidia-container-toolkit-${NVIDIA_CONTAINER_TOOLKIT_VERSION} \
2316
+ nvidia-container-toolkit-base-${NVIDIA_CONTAINER_TOOLKIT_VERSION} \
2317
+ libnvidia-container-tools-${NVIDIA_CONTAINER_TOOLKIT_VERSION} \
2318
+ libnvidia-container1-${NVIDIA_CONTAINER_TOOLKIT_VERSION}`);
2319
+
2320
+ // https://docs.nvidia.com/datacenter/cloud-native/gpu-operator/latest/getting-started.html
2321
+
2322
+ shellExec(`kubectl create ns gpu-operator`);
2323
+ shellExec(`kubectl label --overwrite ns gpu-operator pod-security.kubernetes.io/enforce=privileged`);
2324
+
2325
+ shellExec(`helm repo add nvidia https://helm.ngc.nvidia.com/nvidia \
2326
+ && helm repo update`);
2327
+
2328
+ // shellExec(`helm install --wait --generate-name \
2329
+ // -n gpu-operator --create-namespace \
2330
+ // nvidia/gpu-operator \
2331
+ // --version=v25.3.1 \
2332
+ // --set toolkit.version=v1.16.1-ubi8`);
2333
+
2334
+ shellExec(`helm install --wait --generate-name \
2335
+ -n gpu-operator --create-namespace \
2336
+ nvidia/gpu-operator \
2337
+ --version=v25.3.1 \
2338
+ --set driver.enabled=false \
2339
+ --set driver.repository=nvcr.io/nvidia \
2340
+ --set cdi.enabled=true \
2341
+ --set cdi.default=true \
2342
+ --set toolkit.env[0].name=CONTAINERD_CONFIG \
2343
+ --set toolkit.env[0].value=/etc/containerd/config.toml \
2344
+ --set toolkit.env[1].name=CONTAINERD_SOCKET \
2345
+ --set toolkit.env[1].value=/run/containerd/containerd.sock \
2346
+ --set toolkit.env[2].name=CONTAINERD_RUNTIME_CLASS \
2347
+ --set toolkit.env[2].value=nvidia \
2348
+ --set-string toolkit.env[3].name=CONTAINERD_SET_AS_DEFAULT \
2349
+ --set-string toolkit.env[3].value=true`);
2350
+
2351
+ // Check gpu drivers
2352
+ shellExec(
2353
+ `break;kubectl get nodes -o json | jq '.items[].metadata.labels | keys | any(startswith("feature.node.kubernetes.io"))'`,
2354
+ );
2355
+ break;
2356
+ }
2357
+
2358
+ case 'kubeflow-spark-operator': {
2359
+ // Use case:
2360
+ // Data Processing Pipelines: Used for ETL tasks where Spark can handle large data volumes efficiently.
2361
+ // Real-Time Analytics: Processing data from streaming sources (e.g., Kafka) for real-time analytics.
2362
+ // Machine Learning and Data Science: Training and deploying machine learning models at scale using Spark MLlib.
2363
+
2364
+ shellExec(`helm repo add spark-operator https://kubeflow.github.io/spark-operator`);
2365
+ shellExec(`helm install spark-operator spark-operator/spark-operator \
2366
+ --namespace spark-operator \
2367
+ --create-namespace \
2368
+ --wait`);
2369
+
2370
+ const image = `spark:3.5.3`;
2371
+ shellExec(`sudo docker pull ${image}`);
2372
+ if (!process.argv.includes('kubeadm'))
2373
+ shellExec(
2374
+ `sudo ${
2375
+ process.argv.includes('kubeadm') ? `ctr -n k8s.io images import` : `kind load docker-image`
2376
+ } ${image}`,
2377
+ );
2378
+ shellExec(`kubectl apply -f ./manifests/deployment/spark/spark-pi-py.yaml`);
2379
+
2380
+ // Check the status of the Spark job:
2381
+ // kubectl get sparkapplications.sparkoperator.k8s.io -n default
2382
+ // kubectl get sparkapplication
2383
+
2384
+ // Check case log:
2385
+ // kubectl logs -f spark-pi-python-driver
2386
+ // kubectl logs -f spark-pi-python-driver | grep Pi
2387
+ // kubectl describe sparkapplication spark-gpu-test
2388
+
2389
+ // Uninstall:
2390
+ // kubectl delete sparkapplications.sparkoperator.k8s.io spark-pi-python -n default
2391
+ // helm delete spark-operator -n spark-operator
2392
+
2393
+ // Gpu plugins:
2394
+ // https://github.com/NVIDIA/spark-rapids
2395
+ // RAPIDS Accelerator
2396
+ break;
2397
+ }
2398
+
2399
+ case 'sbt': {
2400
+ // https://www.scala-sbt.org/1.x/docs/Installing-sbt-on-Linux.html
2401
+
2402
+ // sudo rm -f /etc/yum.repos.d/bintray-rpm.repo
2403
+ // curl -L https://www.scala-sbt.org/sbt-rpm.repo > sbt-rpm.repo
2404
+ // sudo mv sbt-rpm.repo /etc/yum.repos.d/
2405
+ // sudo yum install sbt
2406
+ break;
2407
+ }
2297
2408
  }
2298
2409
  } catch (error) {
2299
2410
  logger.error(error, error.stack);
package/cli.md CHANGED
@@ -1,4 +1,4 @@
1
- ## underpost ci/cd cli v2.8.71
1
+ ## underpost ci/cd cli v2.8.75
2
2
 
3
3
  ### Usage: `underpost [options] [command]`
4
4
  ```
@@ -203,9 +203,11 @@ Options:
203
203
  --valkey Init with valkey service
204
204
  --contour Init with project contour base HTTPProxy and envoy
205
205
  --cert-manager Init with letsencrypt-prod ClusterIssuer
206
+ --dedicated-gpu Init with dedicated gpu base resources env
206
207
  --info Get all kinds objects deployed
207
208
  --full Init with all statefulsets and services available
208
209
  --ns-use <ns-name> Switches current context to namespace
210
+ --kubeadm Init with kubeadm controlplane management
209
211
  --dev init with dev cluster
210
212
  --list-pods Display list pods information
211
213
  --info-capacity display current total machine capacity info
@@ -282,6 +284,7 @@ Options:
282
284
  --dockerfile-name [dockerfile-name] set Dockerfile name
283
285
  --podman-save Export tar file from podman
284
286
  --kind-load Import tar image to Kind cluster
287
+ --kubeadm-load Import tar image to Kubeadm cluster
285
288
  --secrets Dockerfile env secrets
286
289
  --secrets-path [secrets-path] Dockerfile custom path env secrets
287
290
  --no-cache Build without using cache
@@ -58,7 +58,7 @@ services:
58
58
  cpus: '0.25'
59
59
  memory: 20M
60
60
  labels: # labels in Compose file instead of Dockerfile
61
- engine.version: '2.8.71'
61
+ engine.version: '2.8.75'
62
62
  networks:
63
63
  - load-balancer
64
64
 
@@ -9,5 +9,5 @@ spec:
9
9
  selector:
10
10
  app: adminer
11
11
  ports:
12
- - port: 8080
12
+ - port: 8079
13
13
  targetPort: 8080
@@ -0,0 +1,21 @@
1
+ apiVersion: sparkoperator.k8s.io/v1beta2
2
+ kind: SparkApplication
3
+ metadata:
4
+ name: spark-pi-python
5
+ namespace: default
6
+ spec:
7
+ type: Python
8
+ pythonVersion: '3'
9
+ mode: cluster
10
+ image: spark:3.5.3
11
+ imagePullPolicy: IfNotPresent
12
+ mainApplicationFile: local:///opt/spark/examples/src/main/python/pi.py
13
+ sparkVersion: 3.5.3
14
+ driver:
15
+ cores: 1
16
+ memory: 512m
17
+ serviceAccount: spark-operator-spark
18
+ executor:
19
+ instances: 1
20
+ cores: 1
21
+ memory: 512m
@@ -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
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.71",
5
+ "version": "2.8.75",
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",
@@ -3,6 +3,7 @@ import { loggerFactory } from '../server/logger.js';
3
3
  import { shellExec } from '../server/process.js';
4
4
  import UnderpostDeploy from './deploy.js';
5
5
  import UnderpostTest from './test.js';
6
+ import os from 'os';
6
7
 
7
8
  const logger = loggerFactory(import.meta);
8
9
 
@@ -27,10 +28,12 @@ class UnderpostCluster {
27
28
  infoCapacityPod: false,
28
29
  istio: false,
29
30
  pullImage: false,
31
+ dedicatedGpu: false,
32
+ kubeadm: false,
30
33
  },
31
34
  ) {
32
35
  // sudo dnf update
33
- // 1) Install kind, kubeadm, docker, podman
36
+ // 1) Install kind, kubeadm, docker, podman, helm
34
37
  // 2) Check kubectl, kubelet, containerd.io
35
38
  // 3) Install Nvidia drivers from Rocky Linux docs
36
39
  // 4) Install LXD with MAAS from Rocky Linux docs
@@ -38,7 +41,8 @@ class UnderpostCluster {
38
41
  const npmRoot = getNpmRootPath();
39
42
  const underpostRoot = options?.dev === true ? '.' : `${npmRoot}/underpost`;
40
43
  if (options.infoCapacityPod === true) return logger.info('', UnderpostDeploy.API.resourcesFactory());
41
- if (options.infoCapacity === true) return logger.info('', UnderpostCluster.API.getResourcesCapacity());
44
+ if (options.infoCapacity === true)
45
+ return logger.info('', UnderpostCluster.API.getResourcesCapacity(options.kubeadm));
42
46
  if (options.reset === true) return await UnderpostCluster.API.reset();
43
47
  if (options.listPods === true) return console.table(UnderpostDeploy.API.get(podName ?? undefined));
44
48
 
@@ -66,6 +70,7 @@ class UnderpostCluster {
66
70
  shellExec(
67
71
  `kubectl get pods --all-namespaces -o=jsonpath='{range .items[*]}{"\\n"}{.metadata.name}{":\\t"}{range .spec.containers[*]}{.image}{", "}{end}{end}'`,
68
72
  );
73
+ shellExec(`sudo crictl images`);
69
74
  console.log();
70
75
  logger.info('contour -------------------------------------------------');
71
76
  for (const _k of ['Cluster', 'HTTPProxy', 'ClusterIssuer', 'Certificate']) {
@@ -106,23 +111,44 @@ class UnderpostCluster {
106
111
  // shellExec(
107
112
  // `wget https://raw.githubusercontent.com/projectcalico/calico/v3.25.0/manifests/custom-resources.yaml`,
108
113
  // );
109
- shellExec(`sudo kubectl apply -f ./manifests/kubeadm-calico-config.yaml`);
114
+ shellExec(`sudo kubectl apply -f ${underpostRoot}/manifests/kubeadm-calico-config.yaml`);
110
115
  shellExec(`sudo systemctl restart containerd`);
116
+ const nodeName = os.hostname();
117
+ shellExec(`kubectl taint nodes ${nodeName} node-role.kubernetes.io/control-plane:NoSchedule-`);
111
118
  } else {
112
119
  shellExec(`sudo systemctl restart containerd`);
113
- shellExec(
114
- `cd ${underpostRoot}/manifests && kind create cluster --config kind-config${
115
- options?.dev === true ? '-dev' : ''
116
- }.yaml`,
117
- );
120
+ if (options.full === true || options.dedicatedGpu === true) {
121
+ // https://kubernetes.io/docs/tasks/manage-gpus/scheduling-gpus/
122
+ shellExec(`cd ${underpostRoot}/manifests && kind create cluster --config kind-config-cuda.yaml`);
123
+ } else {
124
+ shellExec(
125
+ `cd ${underpostRoot}/manifests && kind create cluster --config kind-config${
126
+ options?.dev === true ? '-dev' : ''
127
+ }.yaml`,
128
+ );
129
+ }
118
130
  shellExec(`sudo chown $(id -u):$(id -g) $HOME/.kube/config**`);
119
131
  }
120
132
  } else logger.warn('Cluster already initialized');
121
133
 
134
+ // shellExec(`sudo kubectl apply -f ${underpostRoot}/manifests/kubelet-config.yaml`);
135
+
136
+ if (options.full === true || options.dedicatedGpu === true) {
137
+ shellExec(`node ${underpostRoot}/bin/deploy nvidia-gpu-operator`);
138
+ shellExec(
139
+ `node ${underpostRoot}/bin/deploy kubeflow-spark-operator${options.kubeadm === true ? ' kubeadm' : ''}`,
140
+ );
141
+ }
142
+
122
143
  if (options.full === true || options.valkey === true) {
123
144
  if (options.pullImage === true) {
124
145
  shellExec(`docker pull valkey/valkey`);
125
- shellExec(`sudo kind load docker-image valkey/valkey:latest`);
146
+ if (!options.kubeadm)
147
+ shellExec(
148
+ `sudo ${
149
+ options.kubeadm === true ? `ctr -n k8s.io images import` : `kind load docker-image`
150
+ } valkey/valkey:latest`,
151
+ );
126
152
  }
127
153
  shellExec(`kubectl delete statefulset service-valkey`);
128
154
  shellExec(`kubectl apply -k ${underpostRoot}/manifests/valkey`);
@@ -140,17 +166,27 @@ class UnderpostCluster {
140
166
  if (options.full === true || options.postgresql === true) {
141
167
  if (options.pullImage === true) {
142
168
  shellExec(`docker pull postgres:latest`);
143
- shellExec(`sudo kind load docker-image postgres:latest`);
169
+ if (!options.kubeadm)
170
+ shellExec(
171
+ `sudo ${
172
+ options.kubeadm === true ? `ctr -n k8s.io images import` : `kind load docker-image`
173
+ } docker-image postgres:latest`,
174
+ );
144
175
  }
145
176
  shellExec(
146
177
  `sudo kubectl create secret generic postgres-secret --from-file=password=/home/dd/engine/engine-private/postgresql-password`,
147
178
  );
148
- shellExec(`kubectl apply -k ./manifests/postgresql`);
179
+ shellExec(`kubectl apply -k ${underpostRoot}/manifests/postgresql`);
149
180
  }
150
181
  if (options.mongodb4 === true) {
151
182
  if (options.pullImage === true) {
152
183
  shellExec(`docker pull mongo:4.4`);
153
- shellExec(`sudo kind load docker-image mongo:4.4`);
184
+ if (!options.kubeadm)
185
+ shellExec(
186
+ `sudo ${
187
+ options.kubeadm === true ? `ctr -n k8s.io images import` : `kind load docker-image`
188
+ } docker-image mongo:4.4`,
189
+ );
154
190
  }
155
191
  shellExec(`kubectl apply -k ${underpostRoot}/manifests/mongodb-4.4`);
156
192
 
@@ -342,10 +378,10 @@ class UnderpostCluster {
342
378
 
343
379
  // Step 14: Remove the 'kind' Docker network.
344
380
  // This cleans up any network bridges or configurations specifically created by Kind.
345
- shellExec(`docker network rm kind`);
381
+ // shellExec(`docker network rm kind`);
346
382
  },
347
383
 
348
- getResourcesCapacity() {
384
+ getResourcesCapacity(kubeadm = false) {
349
385
  const resources = {};
350
386
  const info = false
351
387
  ? `Capacity:
@@ -362,10 +398,15 @@ Allocatable:
362
398
  hugepages-2Mi: 0
363
399
  memory: 11914720Ki
364
400
  pods: `
365
- : shellExec(`kubectl describe node kind-worker | grep -E '(Allocatable:|Capacity:)' -A 6`, {
366
- stdout: true,
367
- silent: true,
368
- });
401
+ : shellExec(
402
+ `kubectl describe node ${
403
+ kubeadm === true ? os.hostname() : 'kind-worker'
404
+ } | grep -E '(Allocatable:|Capacity:)' -A 6`,
405
+ {
406
+ stdout: true,
407
+ silent: true,
408
+ },
409
+ );
369
410
  info
370
411
  .split('Allocatable:')[1]
371
412
  .split('\n')
package/src/cli/deploy.js CHANGED
@@ -269,6 +269,8 @@ kubectl get ippools -o yaml
269
269
  kubectl get node <node-name> -o jsonpath='{.spec.podCIDR}'
270
270
  kubectl patch ippool default-ipv4-ippool --type='json' -p='[{"op": "replace", "path": "/spec/cidr", "value": "10.244.0.0/16"}]'
271
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
272
274
  `);
273
275
  if (deployList === 'dd' && fs.existsSync(`./engine-private/deploy/dd.router`))
274
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 { path, imageName, imagePath, dockerfileName, podmanSave, secrets, secretsPath, kindLoad, noCache } =
32
- options;
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 });
@@ -59,6 +70,7 @@ class UnderpostImage {
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
@@ -30,7 +30,7 @@ class Underpost {
30
30
  * @type {String}
31
31
  * @memberof Underpost
32
32
  */
33
- static version = 'v2.8.71';
33
+ static version = 'v2.8.75';
34
34
  /**
35
35
  * Repository cli API
36
36
  * @static
@@ -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: {}