From 32b67f3d4c2e9deac8a87cd337ae61c2290123f8 Mon Sep 17 00:00:00 2001 From: xuriwuyun Date: Fri, 25 Oct 2024 15:45:16 +0800 Subject: [PATCH] update --- addons-cluster/apecloud-mysql/templates/cluster.yaml | 4 ---- addons/apecloud-mysql/config/mysql8-config.tpl | 7 +++---- addons/apecloud-mysql/templates/_helpers.tpl | 1 + addons/apecloud-mysql/templates/cmpv.yaml | 9 ++++++--- 4 files changed, 10 insertions(+), 11 deletions(-) diff --git a/addons-cluster/apecloud-mysql/templates/cluster.yaml b/addons-cluster/apecloud-mysql/templates/cluster.yaml index 79d382fe6..95fc2792d 100644 --- a/addons-cluster/apecloud-mysql/templates/cluster.yaml +++ b/addons-cluster/apecloud-mysql/templates/cluster.yaml @@ -12,7 +12,6 @@ metadata: {{- end }} spec: terminationPolicy: {{ .Values.extra.terminationPolicy }} - {{- include "kblib.affinity" . | indent 2 }} clusterDef: apecloud-mysql # ref clusterdefinition.name topology: {{ include "apecloud-mysql-cluster.topology" . }} componentSpecs: @@ -23,9 +22,6 @@ spec: {{ include "apecloud-mysql-cluster.serviceRef" . | indent 8 }} {{- end }} replicas: {{ include "apecloud-mysql-cluster.replicas" . }} - enabledLogs: - - slow - - error {{- include "kblib.componentResources" . | indent 6 }} {{- include "kblib.componentStorages" . | indent 6 }} {{- if and (eq .Values.mode "raftGroup") .Values.proxyEnabled }} diff --git a/addons/apecloud-mysql/config/mysql8-config.tpl b/addons/apecloud-mysql/config/mysql8-config.tpl index fa47d5b79..7c1138a02 100644 --- a/addons/apecloud-mysql/config/mysql8-config.tpl +++ b/addons/apecloud-mysql/config/mysql8-config.tpl @@ -100,15 +100,14 @@ log_statements_unsafe_for_binlog=OFF log_error_verbosity=2 log_output=FILE log_error=/data/mysql/log/mysqld-error.log -{{- if hasKey $.component "enabledLogs" }} -{{- if mustHas "slow" $.component.enabledLogs }} + slow_query_log=ON long_query_time=5 slow_query_log_file=/data/mysql/log/mysqld-slowquery.log -{{- end }} +general_log_file=/data/mysql/log/mysqld.log +{{- if hasKey $.component "enabledLogs" }} {{- if mustHas "general" $.component.enabledLogs }} general_log=ON -general_log_file=/data/mysql/log/mysqld.log {{- end }} {{- end }} {{ end }} diff --git a/addons/apecloud-mysql/templates/_helpers.tpl b/addons/apecloud-mysql/templates/_helpers.tpl index ab2212115..98084101e 100644 --- a/addons/apecloud-mysql/templates/_helpers.tpl +++ b/addons/apecloud-mysql/templates/_helpers.tpl @@ -165,6 +165,7 @@ lifecycleActions: accountProvision: exec: container: mysql + image: {{ .Values.image.registry | default "docker.io" }}/{{ .Values.image.repository }}:8.0.30-5.beta3.20240330.g94d1caf.15 command: - bash - -c diff --git a/addons/apecloud-mysql/templates/cmpv.yaml b/addons/apecloud-mysql/templates/cmpv.yaml index 7015dd8ad..524072c02 100644 --- a/addons/apecloud-mysql/templates/cmpv.yaml +++ b/addons/apecloud-mysql/templates/cmpv.yaml @@ -15,7 +15,8 @@ spec: vtablet: {{ .Values.wesqlscale.image.registry | default ( .Values.image.registry | default "docker.io" ) }}/{{ .Values.wesqlscale.image.repository }}:0.2.7 compatibilityRules: - releases: [apecloud-mysql-8.0.30] - compDefs: [apecloud-mysql] + compDefs: + - {{ include "apecloud-mysql.cmpdNameApecloudMySQLPrefix" . }} --- apiVersion: apps.kubeblocks.io/v1 kind: ComponentVersion @@ -35,6 +36,8 @@ spec: vtgate: *wescale compatibilityRules: - releases: [wescale-ctrl-0.2.7] - compDefs: [wescale-ctrl] + compDefs: + - {{ include "apecloud-mysql.cmpdNameWescaleCtrlPrefix" . }} - releases: [wescale-0.2.7] - compDefs: [wescale] + compDefs: + - {{ include "apecloud-mysql.cmpdNameWescalePrefix" . }}