feat(front): add front app build command and minio support

- Add new command "front" with flags for replica count and vendor
- Implement front app build logic in maker.AppFront method
- Add minio to make command list
- Add minio and minio-init images to image list
- Change EMQX dependency path to "dependency/emqx"
- Update app OEM logic to use model.GetVendor for vendor info
- Fix app OEM download and rename logic with updated vendor fields
- Modify nginx deployment manifest to allow configurable replicas
- Update user app mysql address to mysql-cluster-mysql-master.db-mysql:3306
- Add server_license_init.conf generation script for configmap upsert
- Clean and reformat imports across several files
- Remove unused package files for make.mysql.go, make.redis.go, make.longhorn.go
This commit is contained in:
zhaoyupeng
2025-11-27 17:35:01 +08:00
parent fdad0eb36c
commit 38def02bf4
21 changed files with 532 additions and 41 deletions

View File

@@ -1,17 +1,17 @@
package maker
import (
"context"
"fmt"
"os"
"path/filepath"
"strings"
"context"
"fmt"
"os"
"path/filepath"
"strings"
"gitea.loveuer.com/yizhisec/pkg3/logger"
"github.com/samber/lo"
"yizhisec.com/hsv2/forge/pkg/downloader"
"yizhisec.com/hsv2/forge/pkg/extractor"
"yizhisec.com/hsv2/forge/pkg/tool/random"
"gitea.loveuer.com/yizhisec/pkg3/logger"
"github.com/samber/lo"
"yizhisec.com/hsv2/forge/pkg/downloader"
"yizhisec.com/hsv2/forge/pkg/extractor"
"yizhisec.com/hsv2/forge/pkg/tool/random"
)
type ConfigMapOpt func(*configMapOpt)
@@ -85,6 +85,11 @@ EEuYRYXDouPJ1F//rYraSoJ4mtaipB6z1A==
-----END EC PRIVATE KEY-----`
upsert = `#!/bin/bash
# Generate server_license_init.conf
uuid=$(cat /proc/sys/kernel/random/uuid)
now=$(date +%s)
echo "{\"uuid\": \"$uuid\", \"install_time\": $now}" > ./server_license_init.conf
kubectl create configmap config-token --namespace hsv2 --from-file=token=./token --dry-run=client -o yaml | kubectl apply -f -
kubectl create configmap config-license-init --namespace hsv2 --from-file=server_license_init.conf=./server_license_init.conf --dry-run=client -o yaml | kubectl apply -f -
kubectl create configmap config-oem-data --namespace hsv2 --from-file=data.json=./oem_data.json --dry-run=client -o yaml | kubectl apply -f -
@@ -100,7 +105,7 @@ kubectl create configmap ssl-web-crt --namespace hsv2 --from-file=web.server.crt
var (
err error
dir = filepath.Join(m.workdir, "configmap")
dir = filepath.Join(m.workdir, "configmap")
vendorUrlMap = map[string]string{
"standard": "https://artifactory.yizhisec.com/artifactory/yizhisec-release/oem/release/2.1.0-std/oem.tar.gz",
"elink": "https://artifactory.yizhisec.com/artifactory/yizhisec-release/oem/release/2.1.0-std/oem_csgElink.tar.gz",