mirror of
https://github.com/bitnami/charts.git
synced 2026-03-09 15:38:00 +08:00
MySQL: Add non-root support and fix replication bug
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
name: mysql
|
||||
version: 1.1.3
|
||||
version: 2.0.0
|
||||
appVersion: 5.7.22-debian-9
|
||||
description: Chart to create a Highly available MySQL cluster
|
||||
keywords:
|
||||
|
||||
@@ -20,6 +20,11 @@ spec:
|
||||
component: "master"
|
||||
release: "{{ .Release.Name }}"
|
||||
spec:
|
||||
{{- if .Values.securityContext.enabled }}
|
||||
securityContext:
|
||||
fsGroup: {{ .Values.securityContext.fsGroup }}
|
||||
runAsUser: {{ .Values.securityContext.runAsUser }}
|
||||
{{- end }}
|
||||
{{- if eq .Values.master.antiAffinity "hard" }}
|
||||
affinity:
|
||||
podAntiAffinity:
|
||||
|
||||
@@ -21,6 +21,11 @@ spec:
|
||||
component: "slave"
|
||||
release: "{{ .Release.Name }}"
|
||||
spec:
|
||||
{{- if .Values.securityContext.enabled }}
|
||||
securityContext:
|
||||
fsGroup: {{ .Values.securityContext.fsGroup }}
|
||||
runAsUser: {{ .Values.securityContext.runAsUser }}
|
||||
{{- end }}
|
||||
{{- if eq .Values.slave.antiAffinity "hard" }}
|
||||
affinity:
|
||||
podAntiAffinity:
|
||||
@@ -77,7 +82,7 @@ spec:
|
||||
value: "3306"
|
||||
- name: MYSQL_MASTER_USER
|
||||
value: "root"
|
||||
- name: MYSQL_MASTER_PASSWORD
|
||||
- name: MYSQL_MASTER_ROOT_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: {{ template "fullname" . }}
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
##
|
||||
image:
|
||||
registry: docker.io
|
||||
repository: bitnami/mariadb
|
||||
repository: bitnami/mysql
|
||||
tag: 5.7.22-debian-9
|
||||
## Specify a imagePullPolicy
|
||||
## Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent'
|
||||
@@ -22,6 +22,14 @@ service:
|
||||
type: ClusterIP
|
||||
port: 3306
|
||||
|
||||
## Pod Security Context
|
||||
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/
|
||||
##
|
||||
securityContext:
|
||||
enabled: true
|
||||
fsGroup: 1001
|
||||
runAsUser: 1001
|
||||
|
||||
root:
|
||||
## MySQL admin password
|
||||
## ref: https://github.com/bitnami/bitnami-docker-mysql#setting-the-root-password-on-first-run
|
||||
|
||||
@@ -23,6 +23,14 @@ service:
|
||||
type: ClusterIP
|
||||
port: 3306
|
||||
|
||||
## Pod Security Context
|
||||
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/
|
||||
##
|
||||
securityContext:
|
||||
enabled: true
|
||||
fsGroup: 1001
|
||||
runAsUser: 1001
|
||||
|
||||
root:
|
||||
## MySQL admin password
|
||||
## ref: https://github.com/bitnami/bitnami-docker-mysql#setting-the-root-password-on-first-run
|
||||
|
||||
Reference in New Issue
Block a user