Skip to content

Commit

Permalink
feat(backend): 配置优雅退出时间 #8977
Browse files Browse the repository at this point in the history
  • Loading branch information
iSecloud committed Jan 13, 2025
1 parent 4eef615 commit 9a02e93
Show file tree
Hide file tree
Showing 9 changed files with 12 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,15 @@
export DRS_WEBCONSOLE_PASSWORD="{{drs_webconsole_password}}"
export DRS_PORT={{drs_port}}
export DRS_LOG_JSON=true # 是否使用 json 格式日志
export DRS_LOG_CONSOLE=true # 是否在 stdout 打印日志
export DRS_LOG_CONSOLE=false # 是否在 stdout 打印日志
export DRS_LOG_DEBUG=true # 启用 debug 日志级别
export DRS_KEY_FILE="/home/mysql/db-remote-service/server.key"
# 容器环境不要使用
export DRS_TMYSQLPARSER_BIN="tmysqlparse"
export DRS_LOG_FILE=test.log # 是否在文件打印日志, 文件路径
export DRS_LOG_FILE_ROTATE_SIZE=10 # rotate 大小, MB
export DRS_LOG_FILE_ROTATE_SIZE=20 # rotate 大小, MB
export DRS_LOG_FILE_MAX_BACKUP=5 # 旧日志保留数
export DRS_LOG_FILE_MAX_AGE=5 # 过期天数
export DRS_CA_FILE=/home/mysql/db-remote-service/server.crt
Expand Down
Binary file modified dbm-ui/backend/ticket/exclusive_ticket.xlsx
Binary file not shown.
1 change: 0 additions & 1 deletion dbm-ui/backend/ticket/flow_manager/manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@

from django.db import transaction

from backend import env
from backend.core import notify
from backend.ticket import constants
from backend.ticket.constants import FLOW_FINISHED_STATUS, FlowType, TicketStatus
Expand Down
6 changes: 3 additions & 3 deletions helm-charts/bk-dbm/Chart.lock
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ dependencies:
version: 7.9.8
- name: dbm
repository: file://charts/dbm
version: 0.1.44
version: 0.1.45
- name: dbconfig
repository: file://charts/dbconfig
version: 0.1.13
Expand Down Expand Up @@ -65,5 +65,5 @@ dependencies:
- name: db-dbha
repository: file://charts/db-dbha
version: 0.1.0
digest: sha256:293e4133fc64f236159a34fdbc0ab61a732ef1fa5f7b76fa91c3de18d1c59d48
generated: "2024-09-25T19:33:01.490734+08:00"
digest: sha256:4569713d2f5d7645e6e9e6a33424e0a6ea226da1623acddcea7ee55c5e5af43e
generated: "2025-01-09T10:17:34.916203+08:00"
2 changes: 1 addition & 1 deletion helm-charts/bk-dbm/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ dependencies:
- condition: dbm.enabled
name: dbm
repository: file://charts/dbm
version: 0.1.44
version: 0.1.45
- condition: dbconfig.enabled
name: dbconfig
repository: file://charts/dbconfig
Expand Down
2 changes: 1 addition & 1 deletion helm-charts/bk-dbm/charts/dbm/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ appVersion: 1.5.0-alpha.1556
description: A Helm chart for dbm
name: dbm
type: application
version: 0.1.44
version: 0.1.45
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ spec:
serviceAccountName: {{ include "dbm.serviceAccountName" . }}
securityContext:
{{- toYaml .Values.podSecurityContext | nindent 8 }}
terminationGracePeriodSeconds: {{ .Values.terminationGracePeriodSeconds.worker }}
containers:
- name: "{{ .Chart.Name }}-celery"
securityContext:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ spec:
serviceAccountName: {{ include "dbm.serviceAccountName" . }}
securityContext:
{{- toYaml .Values.podSecurityContext | nindent 8 }}
terminationGracePeriodSeconds: {{ .Values.terminationGracePeriodSeconds.worker }}
containers:
- name: "{{ .Chart.Name }}-celery-pipeline"
securityContext:
Expand Down
3 changes: 3 additions & 0 deletions helm-charts/bk-dbm/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,9 @@ dbm:
# Overrides the image tag whose default is the chart appVersion.
tag: ""

terminationGracePeriodSeconds:
worker: 60

serviceAccount:
# Specifies whether a service account should be created
create: true
Expand Down

0 comments on commit 9a02e93

Please sign in to comment.