Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions class/defaults.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ parameters:
monitor_user: maxscale
service_pwd: ?{vaultkv:${cluster:tenant}/${cluster:name}/${_instance}/service_pwd}
monitor_pwd: ?{vaultkv:${cluster:tenant}/${cluster:name}/${_instance}/monitor_pwd}
master_failure_mode: fail_instantly
master_reconnection: false
replicas: 2
affinity: {}
images:
Expand Down
2 changes: 2 additions & 0 deletions component/main.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,8 @@ local deployment = kube.Deployment('maxscale') {
SERVICE_PWD: kube.SecretKeyRef(secret, 'service_pwd'),
MONITOR_USER: params.monitor_user,
MONITOR_PWD: kube.SecretKeyRef(secret, 'monitor_pwd'),
MASTER_FAILURE_MODE: params.master_failure_mode,
MASTER_RECONNECTION: params.master_reconnection,
}),
ports_+: {
masteronly: { containerPort: 3306 },
Expand Down
25 changes: 2 additions & 23 deletions configs/maxscale.cnf
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ router=readwritesplit
servers=db1,db2,db3
type=service
user=$SERVICE_USER
master_failure_mode=$MASTER_FAILURE_MODE
master_reconnection=$MASTER_RECONNECTION

[ReadWriteSplit-Listener]
address=$READ_WRITE_LISTEN_ADDRESS
Expand Down Expand Up @@ -63,26 +65,3 @@ address=$DB3_ADDRESS
port=$DB3_PORT
protocol=MariaDBBackend
priority=3

#[MaxInfo]
#type=service
#router=maxinfo
#user=monitor
#password=$SERVICE_PWD
#
#[MaxInfo-JSON-Listener]
#type=listener
#service=MaxInfo
#protocol=HTTPD
#port=8003
#
#[CLI]
#type=service
#router=cli
#
#[CLI-Listener]
#type=listener
#service=CLI
#protocol=maxscaled
#socket=default

17 changes: 17 additions & 0 deletions docs/modules/ROOT/pages/references/parameters.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,23 @@ default:: `?{vaultkv:${cluster:tenant}/${cluster:name}/maxscale/service_pwd}`
type:: string
default:: `?{vaultkv:${cluster:tenant}/${cluster:name}/maxscale/monitor_pwd}`

== `master_failure_mode`

Controls behavior of the readwritesplit router module on master failure, see [upstream documentation](https://mariadb.com/kb/en/mariadb-maxscale-6-readwritesplit/#master_failure_mode).

[horizontal]
type:: string
default:: `fail_instantly`

== `master_reconnection`

Whether the readwritesplit router module allows the master server to change mid-session, see [upstream documentation](https://mariadb.com/kb/en/mariadb-maxscale-6-readwritesplit/#master_reconnection).

[horizontal]
type:: boolean
default:: `false`


= Pod Affinity Parameters

By default, `affinity` is set to `{}` so the pods get no specific affinity. You can override this freely to [choose any pod affinity rules](https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/).
Expand Down
2 changes: 2 additions & 0 deletions tests/defaults.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ parameters:
monitor_user: maxscale-testmonitor
service_pwd: ?{vaultkv:${cluster:tenant}/${cluster:name}/${_instance}/service_pwd}
monitor_pwd: ?{vaultkv:${cluster:tenant}/${cluster:name}/${_instance}/monitor_pwd}
master_failure_mode: fail_instantly
master_reconnection: false
resources:
limits:
memory: 512Mi
Expand Down