diff --git a/dbm-ui/backend/ticket/builders/mysql/mysql_force_import_sqlfile.py b/dbm-ui/backend/ticket/builders/mysql/mysql_force_import_sqlfile.py index b653706991..f59a4adbc9 100644 --- a/dbm-ui/backend/ticket/builders/mysql/mysql_force_import_sqlfile.py +++ b/dbm-ui/backend/ticket/builders/mysql/mysql_force_import_sqlfile.py @@ -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导入根据执行模式可分为三种执行流程: diff --git a/helm-charts/bk-dbm/charts/dbm/templates/_helpers.tpl b/helm-charts/bk-dbm/charts/dbm/templates/_helpers.tpl index 9b7f9b7179..8fcb0bdee4 100644 --- a/helm-charts/bk-dbm/charts/dbm/templates/_helpers.tpl +++ b/helm-charts/bk-dbm/charts/dbm/templates/_helpers.tpl @@ -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 diff --git a/helm-charts/bk-dbm/charts/dbm/templates/jobs/medium-init-job.yaml b/helm-charts/bk-dbm/charts/dbm/templates/jobs/medium-init-job.yaml index bae5ba725f..e42159b996 100644 --- a/helm-charts/bk-dbm/charts/dbm/templates/jobs/medium-init-job.yaml +++ b/helm-charts/bk-dbm/charts/dbm/templates/jobs/medium-init-job.yaml @@ -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: diff --git a/helm-charts/bk-dbm/values.yaml b/helm-charts/bk-dbm/values.yaml index ab708a90e6..c36cfe3e88 100644 --- a/helm-charts/bk-dbm/values.yaml +++ b/helm-charts/bk-dbm/values.yaml @@ -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: