You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@inlong.apache.org by he...@apache.org on 2022/08/17 02:12:44 UTC
[inlong] branch master updated: [INLONG-5527][Docker] Add configmap.yaml for MySQL to add some custom configuration (#5528)
This is an automated email from the ASF dual-hosted git repository.
healchow pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/inlong.git
The following commit(s) were added to refs/heads/master by this push:
new c5e1c21e7 [INLONG-5527][Docker] Add configmap.yaml for MySQL to add some custom configuration (#5528)
c5e1c21e7 is described below
commit c5e1c21e79aed208363846f511d822eefefef1ed
Author: Lucas <10...@users.noreply.github.com>
AuthorDate: Wed Aug 17 10:12:40 2022 +0800
[INLONG-5527][Docker] Add configmap.yaml for MySQL to add some custom configuration (#5528)
---
docker/kubernetes/templates/mysql-configmap.yaml | 32 ++++++++++++++++++++++
docker/kubernetes/templates/mysql-statefulset.yaml | 10 +++++++
2 files changed, 42 insertions(+)
diff --git a/docker/kubernetes/templates/mysql-configmap.yaml b/docker/kubernetes/templates/mysql-configmap.yaml
new file mode 100644
index 000000000..496a74deb
--- /dev/null
+++ b/docker/kubernetes/templates/mysql-configmap.yaml
@@ -0,0 +1,32 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+{{- if .Values.components.mysql }}
+{{- if not .Values.external.mysql.enabled }}
+apiVersion: v1
+kind: ConfigMap
+metadata:
+ name: {{ template "inlong.fullname" . }}-{{ .Values.mysql.component }}
+ namespace: {{ .Release.Namespace }}
+ labels:
+ component: {{ .Values.mysql.component }}
+data:
+ custom.cnf: |-
+ [mysqld]
+ default_authentication_plugin=mysql_native_password
+{{- end }}
+{{- end }}
diff --git a/docker/kubernetes/templates/mysql-statefulset.yaml b/docker/kubernetes/templates/mysql-statefulset.yaml
index c4713f8f3..b10cebdc5 100644
--- a/docker/kubernetes/templates/mysql-statefulset.yaml
+++ b/docker/kubernetes/templates/mysql-statefulset.yaml
@@ -80,6 +80,9 @@ spec:
mountPath: /var/lib/mysql
- name: sql
mountPath: /docker-entrypoint-initdb.d
+ - name: config
+ mountPath: /etc/mysql/conf.d/custom.cnf
+ subPath: custom.cnf
volumes:
- name: data
{{- if .Values.mysql.volumes.persistence }}
@@ -95,6 +98,13 @@ spec:
{{- else }}
emptyDir: {}
{{- end }}
+ - name: config
+ configMap:
+ name: {{ template "inlong.fullname" . }}-{{ .Values.mysql.component }}
+ items:
+ - key: custom.cnf
+ path: custom.cnf
+ defaultMode: 420
restartPolicy: Always
{{- end }}
{{- end }}