chore: 完善个模块打包

This commit is contained in:
zhaoyupeng
2026-01-07 18:55:22 +08:00
parent eb87d6fbed
commit aafe60ee35
29 changed files with 851 additions and 287 deletions

View File

@@ -33,16 +33,16 @@ server {
client_max_body_size 50M;
location /api/v2_2 {
proxy_pass http://u-api-service;
}
location /api/v1/pkg/archive {
proxy_pass http://u-api-service/api/v2_2/client/download/check;
proxy_pass http://client-win-service.hsv2/api/v2_2/_client/win/check.json;
}
location /api/v1/version {
proxy_pass http://u-api-service/api/v2_2/client/version;
location /api/v1/pkg/config/setup {
proxy_pass http://app-helper-service.hsv2/api/v2_2/_client/win/config/setup.json;
}
location /api/v2_2/_client/win {
proxy_pass http://app-helper-service.hsv2;
}
location /api/ {
@@ -148,24 +148,25 @@ server {
client_max_body_size 50M;
location /api/v2_2 {
proxy_pass http://u-api-service;
}
location /api/v1/pkg/archive {
proxy_pass http://u-api-service/api/v2_2/client/download/check;
location /api/v1/pkg/config/setup {
proxy_pass http://app-helper-service.hsv2/api/v2_2/_client/win/config/setup.json;
}
location /api/v1/pkg/archive/version {
proxy_pass http://u-api-service/api/v2_2/client/version;
proxy_pass http://app-helper-service.hsv2/api/v2_2/_client/win/old/version.json;
}
location /api/v1/version {
proxy_pass http://u-api-service/api/v2_2/client/version;
location /api/v1/pkg/archive {
proxy_pass http://client-win-service.hsv2/api/v2_2/_client/win/check.json;
}
location /static/config/rc.json {
proxy_pass http://u-api-service/api/v2_2/client/rc/json?os=win;
proxy_pass http://client-win-service.hsv2/api/v2_2/_client/win/rc.json;
}
location /api/v2_2/_client/win {
proxy_pass http://app-helper-service.hsv2;
}
# location = /api/v1/version {

View File

@@ -32,19 +32,27 @@ server {
}
location /api/my/sys/client/installer {
proxy_pass http://u-api-service/api/v2_2/client/download/list;
proxy_pass http://app-helper-service.hsv2/api/v2_2/client/download/list;
}
location /api/system/version {
proxy_pass http://u-api-service/api/v2_2/system/version;
proxy_pass http://app-helper-service.hsv2/api/v2_2/system/version;
}
location /api/v2_2/client {
proxy_pass http://u-api-service;
location /api/v2_2/system/elink {
proxy_pass http://app-helper-service.hsv2;
}
location /api/v2_2/system {
proxy_pass http://u-api-service;
location /api/v2_2/_client/win {
proxy_pass http://app-helper-service.hsv2;
}
location /api/v2_2/_client/mac{
proxy_pass http://client-mac-service;
}
location /api/v2_2/_client/linux{
proxy_pass http://client-linux-service;
}
location / {
@@ -71,13 +79,16 @@ server {
server_tokens off;
location /api/system/version {
proxy_pass http://u-api-service/api/v2_2/system/version;
proxy_pass http://app-helper-service/api/v2_2/system/version;
}
location /oem {
proxy_pass http://oem-service;
}
location /api/v2_2/system/elink {
proxy_pass http://app-helper-service.hsv2;
}
# location /wm/ {
# alias /data/wm/;
@@ -97,6 +108,18 @@ server {
proxy_read_timeout 300s;
}
location /api/v2_2/_client/win {
proxy_pass http://app-helper-service.hsv2;
}
location /api/v2_2/_client/mac{
proxy_pass http://client-mac-service;
}
location /api/v2_2/_client/linux{
proxy_pass http://client-linux-service;
}
include /etc/nginx/common/common.conf;
location /ws {

View File

@@ -71,6 +71,9 @@ var (
//go:embed yaml/app.nginx.yaml
YAMLAppNGINX string
//go:embed yaml/app.helper.yaml
YAMLAppHelper string
//go:embed yaml/client.pkg.yaml
YAMLClientPKG string

View File

@@ -0,0 +1,87 @@
apiVersion: v1
kind: ServiceAccount
metadata:
name: app-helper-sa
namespace: hsv2
---
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: app-helper-role
namespace: hsv2
rules:
- apiGroups: ["apps"]
resources: ["deployments", "deployments/status"]
verbs: ["get", "list", "watch"]
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: app-helper-rolebinding
namespace: hsv2
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: app-helper-role
subjects:
- kind: ServiceAccount
name: app-helper-sa
namespace: hsv2
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: app-helper-deployment
namespace: hsv2
spec:
replicas: %d
selector:
matchLabels:
app: app-helper
template:
metadata:
labels:
app: app-helper
spec:
serviceAccountName: app-helper-sa
topologySpreadConstraints:
- maxSkew: 1
topologyKey: kubernetes.io/hostname
whenUnsatisfiable: ScheduleAnyway
labelSelector:
matchLabels:
app: app-helper
containers:
- name: app-helper
image: hub.yizhisec.com/hsv2/app/helper:%s
imagePullPolicy: IfNotPresent
command:
- app_helper
- --debug
- --redis-host
- "redis-master.db-redis"
- --redis-password
- "HybridScope0xRed1s."
ports:
- containerPort: 80
volumeMounts:
- name: config-version
mountPath: /app/version
volumes:
- name: config-version
configMap:
name: config-version
---
apiVersion: v1
kind: Service
metadata:
name: app-helper-service
namespace: hsv2
spec:
selector:
app: app-helper
ports:
- protocol: TCP
port: 80
targetPort: 80
type: ClusterIP