From 96dd61601920d03c5c48f18f883f41d79ca06d95 Mon Sep 17 00:00:00 2001 From: zhangmz Date: Fri, 17 May 2024 11:27:53 +0800 Subject: [PATCH 1/4] fixed logback.xml -> logback-spring.xml --- .../streampark-console-config/logback.xml | 146 ------------------ 1 file changed, 146 deletions(-) delete mode 100644 helm/streampark/conf/streampark-console-config/logback.xml diff --git a/helm/streampark/conf/streampark-console-config/logback.xml b/helm/streampark/conf/streampark-console-config/logback.xml deleted file mode 100644 index c7daf7a0e7..0000000000 --- a/helm/streampark/conf/streampark-console-config/logback.xml +++ /dev/null @@ -1,146 +0,0 @@ - - - - StreamPark - - - value="%d{yyyy-MM-dd HH:mm:ss} | %highlight(%-5level) | %boldYellow(%thread) | %boldGreen(%logger):%L] %msg%n"/> - - - - - - ${COLOR_PATTERN} - UTF-8 - - - - - - INFO - DENY - ACCEPT - - ${LOG_HOME}/info.log - - ${LOG_HOME}/info.%d{yyyy-MM-dd}_%i.log - ${LOG_MAX_HISTORY} - 50MB - 1GB - - - ${LOG_PATTERN} - UTF-8 - - - - - - ERROR - ACCEPT - DENY - - ${LOG_HOME}/error.log - - ${LOG_HOME}/error.%d{yyyy-MM-dd}_%i.log - ${LOG_MAX_HISTORY} - 50MB - 1GB - - - ${LOG_PATTERN} - UTF-8 - - - - - - WARN - ACCEPT - DENY - - ${LOG_HOME}/warn.log - - ${LOG_HOME}/warn.%d{yyyy-MM-dd}_%i.log - ${LOG_MAX_HISTORY} - 50MB - 1GB - - - ${LOG_PATTERN} - UTF-8 - - - - - - DEBUG - ACCEPT - DENY - - ${LOG_HOME}/debug.log - - ${LOG_HOME}/debug.%d{yyyy-MM-dd}_%i.log - ${LOG_MAX_HISTORY} - 50MB - 1GB - - - ${LOG_PATTERN} - UTF-8 - - - - - - TRACE - ACCEPT - DENY - - ${LOG_HOME}/trace.log - - ${LOG_HOME}/trace.%d{yyyy-MM-dd}_%i.log - ${LOG_MAX_HISTORY} - 50MB - 1GB - - - ${LOG_PATTERN} - UTF-8 - - - - - - - - - - - - - - - - - - - - From 676bb48ffc8c633ac8a6017d031832bec8767ad1 Mon Sep 17 00:00:00 2001 From: zhangmz Date: Fri, 17 May 2024 11:30:26 +0800 Subject: [PATCH 2/4] fixed logback.xml -> logback-spring.xml --- .../logback-spring.xml | 146 ++++++++++++++++++ 1 file changed, 146 insertions(+) create mode 100644 helm/streampark/conf/streampark-console-config/logback-spring.xml diff --git a/helm/streampark/conf/streampark-console-config/logback-spring.xml b/helm/streampark/conf/streampark-console-config/logback-spring.xml new file mode 100644 index 0000000000..c7daf7a0e7 --- /dev/null +++ b/helm/streampark/conf/streampark-console-config/logback-spring.xml @@ -0,0 +1,146 @@ + + + + StreamPark + + + value="%d{yyyy-MM-dd HH:mm:ss} | %highlight(%-5level) | %boldYellow(%thread) | %boldGreen(%logger):%L] %msg%n"/> + + + + + + ${COLOR_PATTERN} + UTF-8 + + + + + + INFO + DENY + ACCEPT + + ${LOG_HOME}/info.log + + ${LOG_HOME}/info.%d{yyyy-MM-dd}_%i.log + ${LOG_MAX_HISTORY} + 50MB + 1GB + + + ${LOG_PATTERN} + UTF-8 + + + + + + ERROR + ACCEPT + DENY + + ${LOG_HOME}/error.log + + ${LOG_HOME}/error.%d{yyyy-MM-dd}_%i.log + ${LOG_MAX_HISTORY} + 50MB + 1GB + + + ${LOG_PATTERN} + UTF-8 + + + + + + WARN + ACCEPT + DENY + + ${LOG_HOME}/warn.log + + ${LOG_HOME}/warn.%d{yyyy-MM-dd}_%i.log + ${LOG_MAX_HISTORY} + 50MB + 1GB + + + ${LOG_PATTERN} + UTF-8 + + + + + + DEBUG + ACCEPT + DENY + + ${LOG_HOME}/debug.log + + ${LOG_HOME}/debug.%d{yyyy-MM-dd}_%i.log + ${LOG_MAX_HISTORY} + 50MB + 1GB + + + ${LOG_PATTERN} + UTF-8 + + + + + + TRACE + ACCEPT + DENY + + ${LOG_HOME}/trace.log + + ${LOG_HOME}/trace.%d{yyyy-MM-dd}_%i.log + ${LOG_MAX_HISTORY} + 50MB + 1GB + + + ${LOG_PATTERN} + UTF-8 + + + + + + + + + + + + + + + + + + + + From 33baa0ce0f7048cc0675e1276ee35a265c2abc0f Mon Sep 17 00:00:00 2001 From: zhangmz Date: Fri, 17 May 2024 16:22:01 +0800 Subject: [PATCH 3/4] modify livenessProbe & readinessProbe use httpGet modify volumeMounts streampark-default-config-volume mountPath /usr/local/service/streampark/conf > /streampark/conf --- helm/streampark/templates/streampark.yml | 20 +++++++++++++++----- helm/streampark/values.yaml | 8 ++++++-- 2 files changed, 21 insertions(+), 7 deletions(-) diff --git a/helm/streampark/templates/streampark.yml b/helm/streampark/templates/streampark.yml index 0a465be6ad..1888f2f567 100755 --- a/helm/streampark/templates/streampark.yml +++ b/helm/streampark/templates/streampark.yml @@ -63,8 +63,13 @@ spec: command: ["bash","-c","bash ./bin/streampark.sh start_docker"] {{- if .Values.spec.livenessProbe.enabled }} livenessProbe: - exec: - command: [ "curl", "-s", "http://localhost:10000/actuator/health/liveness" ] + httpGet: + {{- if .Values.spec.livenessProbe.containerPort }} + port: {{ .Values.spec.livenessProbe.containerPort }} + {{- else }} + port: {{ .Values.spec.containerPort }} + {{- end }} + path: {{ .Values.spec.livenessProbe.livenessPath }} initialDelaySeconds: {{ .Values.spec.livenessProbe.initialDelaySeconds }} periodSeconds: {{ .Values.spec.livenessProbe.periodSeconds }} timeoutSeconds: {{ .Values.spec.livenessProbe.timeoutSeconds }} @@ -73,8 +78,13 @@ spec: {{- end }} {{- if .Values.spec.readinessProbe.enabled }} readinessProbe: - exec: - command: [ "curl", "-s", "http://localhost:10000/actuator/health/readiness" ] + httpGet: + {{- if .Values.spec.livenessProbe.containerPort }} + port: {{ .Values.spec.readinessProbe.containerPort }} + {{- else }} + port: {{ .Values.spec.containerPort }} + {{- end }} + path: {{ .Values.spec.readinessProbe.readinessPath }} initialDelaySeconds: {{ .Values.spec.readinessProbe.initialDelaySeconds }} periodSeconds: {{ .Values.spec.readinessProbe.periodSeconds }} timeoutSeconds: {{ .Values.spec.readinessProbe.timeoutSeconds }} @@ -83,7 +93,7 @@ spec: {{- end }} volumeMounts: - name: streampark-default-config-volume - mountPath: /usr/local/service/streampark/conf + mountPath: /streampark/conf resources: {{- toYaml .Values.spec.resources | nindent 12 }} volumes: diff --git a/helm/streampark/values.yaml b/helm/streampark/values.yaml index 59d61b745a..b0b64473cf 100644 --- a/helm/streampark/values.yaml +++ b/helm/streampark/values.yaml @@ -87,7 +87,9 @@ spec: ## More info: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/ livenessProbe: enabled: true - initialDelaySeconds: "90" + containerPort: 10000 + livenessPath: "/actuator/health/liveness" + initialDelaySeconds: "45" periodSeconds: "30" timeoutSeconds: "20" failureThreshold: "3" @@ -97,7 +99,9 @@ spec: ## More info: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/ readinessProbe: enabled: true - initialDelaySeconds: "90" + containerPort: 10000 + readinessPath: "/actuator/health/liveness" + initialDelaySeconds: "45" periodSeconds: "30" timeoutSeconds: "20" failureThreshold: "3" From 71f47ea4c48d2d82146d1845f53b60d2a4032c83 Mon Sep 17 00:00:00 2001 From: zhangmz Date: Fri, 17 May 2024 16:24:15 +0800 Subject: [PATCH 4/4] fixed readinessProbe Values.spec.livenessProbe.containerPort > Values.spec.readinessProbe.containerPort --- helm/streampark/templates/streampark.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/helm/streampark/templates/streampark.yml b/helm/streampark/templates/streampark.yml index 1888f2f567..9be7ba0dfc 100755 --- a/helm/streampark/templates/streampark.yml +++ b/helm/streampark/templates/streampark.yml @@ -79,7 +79,7 @@ spec: {{- if .Values.spec.readinessProbe.enabled }} readinessProbe: httpGet: - {{- if .Values.spec.livenessProbe.containerPort }} + {{- if .Values.spec.readinessProbe.containerPort }} port: {{ .Values.spec.readinessProbe.containerPort }} {{- else }} port: {{ .Values.spec.containerPort }}