-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
With the release of the mariadb operator v0.25.0 maxscale was introduced to resolve issues with multi-master deployments, enhance scale, and make better use of nodes in the environment. This change creates the maxscale resources and converts our standard deployment systems to use maxscale as the point of ingress. Specific feature we're interested in > point to an existing MaxScale instance. Doing this will delegate tasks such as primary failover to MaxScale. Docs: https://github.com/mariadb-operator/mariadb-operator/blob/main/docs/MAXSCALE.md Related: https://github.com/mariadb-operator/mariadb-operator/releases/tag/v0.0.26 Signed-off-by: Kevin Carter <[email protected]>
- Loading branch information
Showing
19 changed files
with
179 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
resources: | ||
- mariadb-configmap.yaml | ||
- mariadb-maxscale.yaml | ||
- mariadb-galera.yaml | ||
- mariadb-backup.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,132 @@ | ||
apiVersion: k8s.mariadb.com/v1alpha1 | ||
kind: MaxScale | ||
metadata: | ||
name: maxscale-galera | ||
spec: | ||
replicas: 3 | ||
|
||
mariaDbRef: | ||
name: mariadb-galera | ||
namespace: openstack | ||
|
||
services: | ||
- name: rw-router | ||
router: readwritesplit | ||
params: | ||
transaction_replay: "true" | ||
transaction_replay_attempts: "10" | ||
transaction_replay_timeout: "5s" | ||
max_slave_connections: "255" | ||
max_replication_lag: "3s" | ||
master_accept_reads: "true" | ||
listener: | ||
name: rw-listener | ||
port: 3306 | ||
protocol: MariaDBProtocol | ||
params: | ||
connection_metadata: "tx_isolation=auto" | ||
suspend: false | ||
suspend: false | ||
- name: rconn-master-router | ||
router: readconnroute | ||
params: | ||
router_options: "master" | ||
max_replication_lag: "3s" | ||
master_accept_reads: "true" | ||
listener: | ||
port: 3307 | ||
- name: rconn-slave-router | ||
router: readconnroute | ||
params: | ||
router_options: "slave" | ||
max_replication_lag: "3s" | ||
listener: | ||
port: 3308 | ||
|
||
monitor: | ||
name: mariadb-monitor | ||
module: galeramon | ||
interval: 2s | ||
cooperativeMonitoring: majority_of_all | ||
params: | ||
disable_master_failback: "false" | ||
available_when_donor: "false" | ||
disable_master_role_setting: "false" | ||
suspend: false | ||
|
||
admin: | ||
port: 8989 | ||
guiEnabled: true | ||
|
||
config: | ||
params: | ||
log_info: "true" | ||
volumeClaimTemplate: | ||
resources: | ||
requests: | ||
storage: 100Mi | ||
accessModes: | ||
- ReadWriteOnce | ||
storageClassName: general | ||
sync: | ||
database: mysql | ||
interval: 5s | ||
timeout: 10s | ||
|
||
auth: | ||
generate: true | ||
adminUsername: mariadb-operator | ||
adminPasswordSecretKeyRef: | ||
name: maxscale | ||
key: password | ||
deleteDefaultAdmin: true | ||
clientUsername: maxscale-galera-client | ||
clientPasswordSecretKeyRef: | ||
name: maxscale | ||
key: password | ||
clientMaxConnections: 1024 | ||
serverUsername: maxscale-galera-server | ||
serverPasswordSecretKeyRef: | ||
name: maxscale | ||
key: password | ||
serverMaxConnections: 1024 | ||
monitorUsername: maxscale-galera-monitor | ||
monitorPasswordSecretKeyRef: | ||
name: maxscale | ||
key: password | ||
monitorMaxConnections: 128 | ||
syncUsername: maxscale-galera-sync | ||
syncPasswordSecretKeyRef: | ||
name: maxscale | ||
key: password | ||
syncMaxConnections: 128 | ||
|
||
securityContext: | ||
allowPrivilegeEscalation: false | ||
|
||
updateStrategy: | ||
type: RollingUpdate | ||
|
||
kubernetesService: | ||
type: LoadBalancer | ||
annotations: | ||
metallb.universe.tf/address-pool: primary | ||
|
||
connection: | ||
secretName: mxs-galera-conn | ||
port: 3306 | ||
|
||
resources: | ||
requests: | ||
memory: 128Mi | ||
|
||
affinity: | ||
enableAntiAffinity: true | ||
|
||
tolerations: | ||
- key: "k8s.mariadb.com/ha" | ||
operator: "Exists" | ||
effect: "NoSchedule" | ||
|
||
podDisruptionBudget: | ||
maxUnavailable: 33% |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters