[agent-deploy] - bug fix
This commit is contained in:
@@ -2,6 +2,7 @@ package c_app
|
||||
|
||||
import (
|
||||
"github.com/go-playground/validator/v10"
|
||||
"os"
|
||||
"wdd.io/agent-common/logger"
|
||||
"wdd.io/agent-operator/deploy/z_dep"
|
||||
)
|
||||
@@ -23,7 +24,7 @@ type CmiiFrontendConfig struct {
|
||||
AppName string `json:"app_name,omitempty" validate:"required"`
|
||||
ImageTag string `json:"image_tag,omitempty" validate:"required"`
|
||||
Replicas string `json:"replicas,omitempty" validate:"required" default:"1"`
|
||||
ShortName string `json:"short_name,omitempty"`
|
||||
ShortName string `json:"short_name,omitempty" validate:"required"`
|
||||
ClientId string
|
||||
}
|
||||
|
||||
@@ -132,7 +133,11 @@ func IngressDeploy(commonEnv *z_dep.CommonEnvironmentConfig) bool {
|
||||
return true
|
||||
}
|
||||
|
||||
func SrsDeploy(commonEnv *z_dep.CommonEnvironmentConfig) bool {
|
||||
|
||||
func SRSDeploy(commonEnv *z_dep.CommonEnvironmentConfig) bool {
|
||||
os.Remove(SRSApplyFilePath)
|
||||
return commonEnv.ParseCommonEnvToApplyFile(CmiiSrsTemplate, SRSApplyFilePath)
|
||||
}
|
||||
|
||||
func FrontendDefaultNginxDeploy(commonEnv *z_dep.CommonEnvironmentConfig) bool {
|
||||
return commonEnv.ParseCommonEnvToApplyFile(CmiiFrontendDefaultNginxConfTemplate, FrontendApplyFilePath)
|
||||
}
|
||||
|
||||
@@ -22,6 +22,9 @@ var FrontendShortNameMaps = map[string]string{
|
||||
"cmii-uav-platform-share": "share",
|
||||
"cmii-uav-platform-splice": "splice",
|
||||
"cmii-uav-platform-traffic": "traffic",
|
||||
"cmii-uav-platform-threedsimulation": "threedsimulation",
|
||||
"cmii-uav-platform-jiangsuwenlv": "jiangsuwenlv",
|
||||
"cmii-uav-platform-qinghaitourism": "qinghaitourism",
|
||||
}
|
||||
|
||||
var FrontendClientIdMaps = map[string]string{
|
||||
@@ -50,4 +53,5 @@ var FrontendClientIdMaps = map[string]string{
|
||||
"cmii-uav-platform-threedsimulation": "empty",
|
||||
"cmii-uav-platform-visualization": "empty",
|
||||
"cmii-uav-platform-traffic": "APP_Jc8i2wOQ1t73QEJS",
|
||||
"cmii-uav-platform-jiangsuwenlv": "empty",
|
||||
}
|
||||
|
||||
@@ -48,7 +48,7 @@ spec:
|
||||
- name: APPLICATION_NAME
|
||||
value: {{ .AppName }}
|
||||
- name: CUST_JAVA_OPTS
|
||||
value: "-Xms500m -Xmx1500m -Dlog4j2.formatMsgNoLookups=true"
|
||||
value: "-Xms200m -Xmx1500m -Dlog4j2.formatMsgNoLookups=true"
|
||||
- name: NACOS_REGISTRY
|
||||
value: "helm-nacos:8848"
|
||||
- name: NACOS_DISCOVERY_IP
|
||||
@@ -72,11 +72,11 @@ spec:
|
||||
containerPort: 8080
|
||||
protocol: TCP
|
||||
resources:
|
||||
limits: .
|
||||
limits:
|
||||
memory: 2Gi
|
||||
cpu: "2"
|
||||
requests:
|
||||
memory: 1Gi
|
||||
memory: 200Mi
|
||||
cpu: 200m
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
@@ -109,7 +109,7 @@ spec:
|
||||
successThreshold: 1
|
||||
failureThreshold: 5
|
||||
volumeMounts:
|
||||
- name: glusterfs-backend-log-volume
|
||||
- name: nfs-backend-log-volume
|
||||
mountPath: /cmii/logs
|
||||
readOnly: false
|
||||
subPath: {{ .Namespace }}/{{ .AppName }}
|
||||
@@ -120,9 +120,9 @@ spec:
|
||||
subPath: {{ .Namespace }}/{{ .AppName }}
|
||||
{{- end }}
|
||||
volumes:
|
||||
- name: glusterfs-backend-log-volume
|
||||
- name: nfs-backend-log-volume
|
||||
persistentVolumeClaim:
|
||||
claimName: glusterfs-backend-log-pvc
|
||||
claimName: nfs-backend-log-pvc
|
||||
{{- if .NeedPvcCache }}
|
||||
- name: data-cache-volume
|
||||
persistentVolumeClaim:
|
||||
|
||||
@@ -52,9 +52,6 @@ spec:
|
||||
- name: nginx-conf
|
||||
mountPath: /usr/local/nginx/conf/nginx.conf
|
||||
subPath: nginx.conf
|
||||
- name: default-nginx-conf
|
||||
mountPath: /etc/nginx/conf.d/default.conf
|
||||
subPath: default.conf
|
||||
- name: tenant-prefix
|
||||
subPath: ingress-config.js
|
||||
mountPath: /home/cmii-platform/dist/ingress-config.js
|
||||
@@ -65,12 +62,6 @@ spec:
|
||||
items:
|
||||
- key: nginx.conf
|
||||
path: nginx.conf
|
||||
- name: default-nginx-conf
|
||||
configMap:
|
||||
name: default-nginx-cm
|
||||
items:
|
||||
- key: default.conf
|
||||
path: default.conf
|
||||
- name: tenant-prefix
|
||||
configMap:
|
||||
name: tenant-prefix-{{ .ShortName }}
|
||||
|
||||
@@ -7,9 +7,9 @@ metadata:
|
||||
name: helm-live-srs-cm
|
||||
namespace: {{ .Namespace }}
|
||||
labels:
|
||||
cmii.app: live-srs
|
||||
cmii.app: live-srs
|
||||
cmii.type: live
|
||||
octopus.control: wdd
|
||||
octopus.control: wdd
|
||||
app.kubernetes.io/managed-by: octopus
|
||||
helm.sh/chart: cmlc-live-srs-rtc-2.0.0
|
||||
data:
|
||||
@@ -95,7 +95,7 @@ metadata:
|
||||
name: helm-live-srs-svc-exporter
|
||||
namespace: {{ .Namespace }}
|
||||
labels:
|
||||
octopus.control: wdd
|
||||
octopus.control: wdd
|
||||
app.kubernetes.io/managed-by: octopus
|
||||
spec:
|
||||
ports:
|
||||
@@ -137,7 +137,7 @@ metadata:
|
||||
name: helm-live-srs-svc
|
||||
namespace: {{ .Namespace }}
|
||||
labels:
|
||||
octopus.control: wdd
|
||||
octopus.control: wdd
|
||||
app.kubernetes.io/managed-by: octopus
|
||||
spec:
|
||||
ports:
|
||||
@@ -181,7 +181,7 @@ metadata:
|
||||
name: helm-live-srs-rtc
|
||||
namespace: {{ .Namespace }}
|
||||
labels:
|
||||
octopus.control: wdd
|
||||
octopus.control: wdd
|
||||
app.kubernetes.io/managed-by: octopus
|
||||
cmii.app: live-srs
|
||||
cmii.type: live
|
||||
@@ -407,7 +407,7 @@ metadata:
|
||||
name: helm-live-op-svc-v2
|
||||
namespace: {{ .Namespace }}
|
||||
labels:
|
||||
octopus.control: wdd
|
||||
octopus.control: wdd
|
||||
app.kubernetes.io/managed-by: octopus
|
||||
spec:
|
||||
ports:
|
||||
@@ -426,7 +426,7 @@ metadata:
|
||||
name: helm-live-op-svc
|
||||
namespace: {{ .Namespace }}
|
||||
labels:
|
||||
octopus.control: wdd
|
||||
octopus.control: wdd
|
||||
app.kubernetes.io/managed-by: octopus
|
||||
spec:
|
||||
ports:
|
||||
@@ -444,7 +444,7 @@ metadata:
|
||||
name: helm-live-op-cm-v2
|
||||
namespace: {{ .Namespace }}
|
||||
labels:
|
||||
octopus.control: wdd
|
||||
octopus.control: wdd
|
||||
app.kubernetes.io/managed-by: octopus
|
||||
cmii.app: live-engine
|
||||
cmii.type: live
|
||||
|
||||
@@ -4,11 +4,11 @@ const CmiiFrontendConfigMapTemplate = `
|
||||
kind: ConfigMap
|
||||
apiVersion: v1
|
||||
metadata:
|
||||
name: {{ .AppName }}
|
||||
name: tenant-prefix-{{ .ShortName }}
|
||||
namespace: {{ .Namespace }}
|
||||
data:
|
||||
ingress-config.js: |-
|
||||
var GlobalIngressConfig = {
|
||||
var __GlobalIngressConfig = {
|
||||
TenantEnvironment: "{{ .TenantEnv }}",
|
||||
CloudHOST: "{{ .WebIP }}:{{ .WebPort }}",
|
||||
ApplicationShortName: "{{ .ShortName }}",
|
||||
@@ -31,7 +31,6 @@ data:
|
||||
|
||||
events {
|
||||
worker_connections 1024;
|
||||
use_epoll on;
|
||||
}
|
||||
http {
|
||||
include mime.types;
|
||||
|
||||
Reference in New Issue
Block a user