Browse Source

[Fix-10103][k8s]Fix k8s Change DataSource Error (#10128)

3.1.0-release
旺阳 2 years ago committed by GitHub
parent
commit
de5507fb19
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      dolphinscheduler-tools/src/main/bin/upgrade-schema.sh
  2. 9
      dolphinscheduler-tools/src/main/resources/application.yaml
  3. 10
      dolphinscheduler-worker/src/main/resources/application.yaml

6
dolphinscheduler-tools/src/main/bin/upgrade-schema.sh

@ -19,13 +19,11 @@
BIN_DIR=$(dirname $0)
DOLPHINSCHEDULER_HOME=${DOLPHINSCHEDULER_HOME:-$(cd $BIN_DIR/../..; pwd)}
if [ "$DOCKER" != "true" ]; then
source "$DOLPHINSCHEDULER_HOME/bin/env/dolphinscheduler_env.sh"
fi
source "$DOLPHINSCHEDULER_HOME/bin/env/dolphinscheduler_env.sh"
JAVA_OPTS=${JAVA_OPTS:-"-server -Duser.timezone=${SPRING_JACKSON_TIME_ZONE} -Xms1g -Xmx1g -Xmn512m -XX:+PrintGCDetails -Xloggc:gc.log -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=dump.hprof"}
java $JAVA_OPTS \
-cp "$DOLPHINSCHEDULER_HOME/tools/conf":"$DOLPHINSCHEDULER_HOME/tools/libs/*":"$DOLPHINSCHEDULER_HOME/tools/sql" \
-Dspring.profiles.active=upgrade \
-Dspring.profiles.active=upgrade,${DATABASE} \
org.apache.dolphinscheduler.tools.datasource.UpgradeDolphinScheduler

9
dolphinscheduler-tools/src/main/resources/application.yaml

@ -43,4 +43,11 @@ spring:
on-profile: mysql
datasource:
driver-class-name: com.mysql.jdbc.Driver
url: jdbc:mysql://127.0.0.1:3306/dolphinscheduler?useUnicode=true&characterEncoding=UTF-8
---
spring:
config:
activate:
on-profile: postgresql
datasource:
driver-class-name: org.postgresql.Driver

10
dolphinscheduler-worker/src/main/resources/application.yaml

@ -89,3 +89,13 @@ management:
metrics:
enabled: true
# Override by profile
---
spring:
config:
activate:
on-profile: mysql
datasource:
driver-class-name: com.mysql.jdbc.Driver

Loading…
Cancel
Save