Code Review
/
oom.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
[COMMON] Make MariaDB compatible with Kubernetes v1.17
[oom.git]
/
kubernetes
/
common
/
mariadb-galera
/
templates
/
statefulset.yaml
diff --git
a/kubernetes/common/mariadb-galera/templates/statefulset.yaml
b/kubernetes/common/mariadb-galera/templates/statefulset.yaml
index
7157e33
..
47d1e0e
100644
(file)
--- a/
kubernetes/common/mariadb-galera/templates/statefulset.yaml
+++ b/
kubernetes/common/mariadb-galera/templates/statefulset.yaml
@@
-14,7
+14,7
@@
# limitations under the License.
*/}}
# limitations under the License.
*/}}
-apiVersion: apps/v1
beta1
+apiVersion: apps/v1
kind: StatefulSet
metadata:
name: {{ include "common.fullname" . }}
kind: StatefulSet
metadata:
name: {{ include "common.fullname" . }}
@@
-27,6
+27,9
@@
metadata:
spec:
serviceName: {{ .Values.service.name }}
replicas: {{ .Values.replicaCount }}
spec:
serviceName: {{ .Values.service.name }}
replicas: {{ .Values.replicaCount }}
+ selector:
+ matchLabels:
+ app: {{ include "common.fullname" . }}
template:
metadata:
labels:
template:
metadata:
labels:
@@
-47,6
+50,10
@@
spec:
configMap:
name: {{ include "common.fullname" . }}-external-config
{{- end}}
configMap:
name: {{ include "common.fullname" . }}-external-config
{{- end}}
+ - name: init-script
+ configMap:
+ name: {{ include "common.fullname" . }}
+ defaultMode: 0755
- name: localtime
hostPath:
path: /etc/localtime
- name: localtime
hostPath:
path: /etc/localtime
@@
-104,6
+111,9
@@
spec:
- mountPath: /etc/localtime
name: localtime
readOnly: true
- mountPath: /etc/localtime
name: localtime
readOnly: true
+ - mountPath: /usr/share/container-scripts/mysql/configure-mysql.sh
+ subPath: configure-mysql.sh
+ name: init-script
{{- if .Values.persistence.enabled }}
- mountPath: /var/lib/mysql
name: {{ include "common.fullname" . }}-data
{{- if .Values.persistence.enabled }}
- mountPath: /var/lib/mysql
name: {{ include "common.fullname" . }}-data