From de27cdeef0c8ed8e0c3236d047c62ce352476d03 Mon Sep 17 00:00:00 2001 From: chenzhiguo5 Date: Wed, 16 Oct 2024 21:02:08 +0800 Subject: [PATCH] Synchronization URL support configuration --- charts/joylive-injector/Chart.yaml | 2 +- charts/joylive-injector/config/config.yaml | 22 +++++++++++-------- .../joylive-injector/templates/configmap.yaml | 6 +++-- .../templates/deployment.yaml | 2 ++ 4 files changed, 20 insertions(+), 12 deletions(-) diff --git a/charts/joylive-injector/Chart.yaml b/charts/joylive-injector/Chart.yaml index ee32dd3..aa6eec3 100644 --- a/charts/joylive-injector/Chart.yaml +++ b/charts/joylive-injector/Chart.yaml @@ -15,7 +15,7 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 1.3.0 +version: 1.3.1 keywords: - joylive diff --git a/charts/joylive-injector/config/config.yaml b/charts/joylive-injector/config/config.yaml index d06df16..d053c5a 100644 --- a/charts/joylive-injector/config/config.yaml +++ b/charts/joylive-injector/config/config.yaml @@ -56,8 +56,8 @@ agent: profile: null sync: liveSpace: - type: ${CONFIG_LIVE_SPACE_API_TYPE:file} # [file,multilive] - url: ${CONFIG_LIVE_SPACE_API_URL:http://api.live.local:9090/v1} + type: ${CONFIG_LIVE_SPACE_API_TYPE:{{ .Values.sync.liveSpace.type }}} # [file,multilive] + url: ${CONFIG_LIVE_SPACE_API_URL:{{ .Values.sync.liveSpace.url }}} #spacesUrl: ${CONFIG_LIVE_SPACE_API_URL}/workspaces #spaceUrl: ${CONFIG_LIVE_SPACE_API_URL}/workspaces/${space_id}/version/${space_version} #serviceUrl: ${CONFIG_LIVE_SPACE_API_URL}/services/${service_name}/version/${service_version} @@ -71,9 +71,12 @@ agent: laneSpace: type: file microservice: - type: ${CONFIG_SERVICE_API_TYPE:file} - url: ${CONFIG_SERVICE_API_URL:http://api.jmsf.local:8080/v1} + type: ${CONFIG_SERVICE_API_TYPE:{{ .Values.sync.microservice.type }}} + url: ${CONFIG_SERVICE_API_URL:{{ .Values.sync.microservice.url }}} headers: ${CONFIG_SERVICE_API_HEADERS} + interval: 5000 + timeout: 3000 + initialTimeout: 20000 watchdog: enabled: true delay: 5000 @@ -98,9 +101,6 @@ agent: enabled: ${CONFIG_REGISTRY_ENABLED:true} flowcontrol: enabled: ${CONFIG_FLOW_CONTROL_ENABLED:true} - loadbalance: ${CONFIG_LOADBALANCE_ENABLED:true} - sticky: ${CONFIG_STICKY_ENABLED:false} - limit: ${CONFIG_LIMIT_ENABLED:true} localhost: ${CONFIG_LOCALHOST_ENABLED:false} virtual: ${CONFIG_VIRTUAL_ENABLED:false} protect: @@ -119,6 +119,7 @@ agent: initializeTimeout: ${CONFIG_POLICY_INITIALIZE_TIMEOUT:10000} service: warmups: ${CONFIG_WARMUP_SERVICES:} + systemPaths: ${CONFIG_SYSTEM_HTTP_PATHS} concurrencyLimiter: type: Resilience4j cleanInterval: 30000 @@ -133,12 +134,15 @@ agent: expireTime: 60000 live: topics: ${CONFIG_LIVE_TOPICS} - modifyMQGroupEnabled: ${CONFIG_LIVE_MODIFY_MQ_GROUP:true} + modifyMQGroupEnabled: ${CONFIG_LIVE_MODIFY_MQ_GROUP:false} lane: topics: ${CONFIG_LANE_TOPICS} - modifyMQGroupEnabled: ${CONFIG_LANE_MODIFY_MQ_GROUP:true} + modifyMQGroupEnabled: ${CONFIG_LANE_MODIFY_MQ_GROUP:false} router: virtual: ${CONFIG_VIRTUAL_SIZE:500} + spring: + discovery: + disables: ${CONFIG_SPRING_DISCOVERY_DISABLES} phevos: groupExpression: ${unit}-${cell}-${group} transmission: diff --git a/charts/joylive-injector/templates/configmap.yaml b/charts/joylive-injector/templates/configmap.yaml index 2f4772e..ded1165 100644 --- a/charts/joylive-injector/templates/configmap.yaml +++ b/charts/joylive-injector/templates/configmap.yaml @@ -6,8 +6,10 @@ metadata: labels: {{ include "joylive-injector.selectorLabels" . | nindent 4 }} data: {{- $root := . }} - {{- range $path, $_ := .Files.Glob "config/*" }} + {{- range $path, $_ := $root.Files.Glob "config/*" }} {{- $fileName := base $path }} {{ $fileName }}: | -{{ $.Files.Get $path | indent 4 }} +{{- $fileContent := $root.Files.Get $path }} +{{- $parsedContent := tpl $fileContent $root }} +{{ $parsedContent | indent 4 -}} {{- end }} \ No newline at end of file diff --git a/charts/joylive-injector/templates/deployment.yaml b/charts/joylive-injector/templates/deployment.yaml index 94ae26b..d81aef0 100644 --- a/charts/joylive-injector/templates/deployment.yaml +++ b/charts/joylive-injector/templates/deployment.yaml @@ -42,6 +42,8 @@ spec: path: /readyz periodSeconds: 10 initialDelaySeconds: 5 + resources: + {{- toYaml .Values.resources | nindent 12 }} volumeMounts: {{- toYaml .Values.VolumeMounts | nindent 12 }} {{- with .Values.imagePullSecrets }}