Skip to content

Commit

Permalink
fix(backend): 固定安装包版本 #6641
Browse files Browse the repository at this point in the history
  • Loading branch information
iSecloud authored and zhangzhw8 committed Sep 3, 2024
1 parent de00f97 commit 0765695
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,13 @@ def patch_ticket_detail(self):
self.ticket.update_details(execute_sql_files=list(set(execute_sql_files)), path=upload_sql_path)
super().patch_ticket_detail()

@property
def need_itsm(self):
# 自动执行不需要审批
if self.ticket.details["ticket_mode"]["mode"] == SQLExecuteTicketMode.AUTO.value:
return False
return super().need_itsm

def init_ticket_flows(self):
"""
sql导入根据执行模式可分为三种执行流程:
Expand Down
7 changes: 4 additions & 3 deletions helm-charts/bk-dbm/charts/dbm/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -182,10 +182,11 @@ initContainers:
{{- end }}

{{- define "dbm.initContainerMediumInstall" -}}
{{- $root := first . -}}
{{- $db_type := last . -}}
{{- $root := index . 0 -}}
{{- $db_type := index . 1 -}}
{{- $tag := index . 2 -}}
- name: dbm-medium-install-{{ $db_type }}
image: "{{ $root.Values.global.imageRegistry | default $root.Values.dbmedium.installImage.registry }}/{{ $root.Values.dbmedium.installImage.repository }}-{{ $db_type }}:{{ $root.Values.dbmedium.installImage.tag | default $root.Chart.AppVersion }}"
image: "{{ $root.Values.global.imageRegistry | default $root.Values.dbmedium.installImage.registry }}/{{ $root.Values.dbmedium.installImage.repository }}-{{ $db_type }}:{{ $tag }}"
imagePullPolicy: {{ $root.Values.dbmedium.installImage.pullPolicy }}
volumeMounts:
- mountPath: /install
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ spec:
restartPolicy: Never
initContainers:
{{- include "dbm.initContainersWaitForSaaS" . | nindent 8 }}
{{- range $db_type, $enable := .Values.dbmedium.installEnable }}
{{- if $enable -}}
{{- include "dbm.initContainerMediumInstall" (list $ $db_type) | nindent 8 }}
{{- range $db_type, $config := .Values.dbmedium.installEnable }}
{{- if $config.enable -}}
{{- include "dbm.initContainerMediumInstall" (list $ $db_type $config.tag) | nindent 8 }}
{{- end }}
{{- end }}
containers:
Expand Down
25 changes: 15 additions & 10 deletions helm-charts/bk-dbm/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -180,16 +180,21 @@ dbm:
pullPolicy: IfNotPresent
tag: ""
installEnable:
mysql: false
es: false
kafka: false
hdfs: false
pulsar: false
influxdb: false
redis: false
mongodb: false
riak: false
sqlserver: false
mysql:
enable: false
tag: 1.0.0
es:
enable: false
tag: 1.0.0
kafka:
enable: false
tag: 1.0.0
hdfs:
enable: false
tag: 1.0.0
redis:
enable: false
tag: 1.0.0

# bk-dbconfig values
dbconfig:
Expand Down

0 comments on commit 0765695

Please sign in to comment.