Skip to content

Commit

Permalink
Added MaxScale sample
Browse files Browse the repository at this point in the history
  • Loading branch information
mmontes11 committed Feb 7, 2024
1 parent a0b8362 commit d5c67ca
Show file tree
Hide file tree
Showing 3 changed files with 78 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,7 @@ metadata:
capabilities: Deep Insights
categories: Database
containerImage: ghcr.io/mariadb-operator/mariadb-operator-helm:0.24.0
createdAt: "2024-01-11T09:22:19Z"
createdAt: "2024-02-07T18:24:00Z"
description: Run and operate MariaDB in a cloud native way
operators.operatorframework.io/builder: operator-sdk-v1.26.0
operators.operatorframework.io/project_layout: helm.sdk.operatorframework.io/v1
Expand Down
1 change: 1 addition & 0 deletions config/samples/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ resources:
- mariadb_v1alpha1_database.yaml
- mariadb_v1alpha1_grant.yaml
- mariadb_v1alpha1_mariadb.yaml
- mariadb_v1alpha1_maxscale.yaml
- mariadb_v1alpha1_restore.yaml
- mariadb_v1alpha1_sqljob.yaml
- mariadb_v1alpha1_user.yaml
Expand Down
76 changes: 76 additions & 0 deletions config/samples/mariadb_v1alpha1_maxscale.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
apiVersion: mariadb.mmontes.io/v1alpha1
kind: MaxScale
metadata:
name: maxscale-galera
spec:
replicas: 3

mariaDbRef:
name: mariadb-galera

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:
port: 3306
protocol: MariaDBProtocol
params:
connection_metadata: "tx_isolation=auto"
- 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:
interval: 2s
cooperativeMonitoring: majority_of_all
params:
disable_master_failback: "false"
available_when_donor: "false"
disable_master_role_setting: "false"

admin:
port: 8989
guiEnabled: true

config:
sync:
database: mysql
interval: 5s
timeout: 10s

auth:
generate: true
adminUsername: mariadb-operator
adminPasswordSecretKeyRef:
name: maxscale
key: password

kubernetesService:
type: LoadBalancer
annotations:
metallb.universe.tf/loadBalancerIPs: 172.18.0.224

connection:
secretName: mxs-galera-conn
port: 3306

requeueInterval: 10s

0 comments on commit d5c67ca

Please sign in to comment.