Skip to content

Commit

Permalink
fix: update our galera cluster manifest to run the latest stable
Browse files Browse the repository at this point in the history
This change is updating the mariadb-galera manifest to use the latest images
and system config. This is being done to help resolve some of the deadlock
issues being experienced when the cluster is under load.

This change also brings in a LOT of fixes into the operator, which should
help make our platform run better, generally.

All of the CRD references have been updated to use the stable release of the
operator, version 0.26.0.

Signed-off-by: Kevin Carter <[email protected]>
  • Loading branch information
cloudnull committed Mar 7, 2024
1 parent e9120db commit 94db186
Show file tree
Hide file tree
Showing 15 changed files with 93 additions and 71 deletions.
6 changes: 3 additions & 3 deletions kustomize/cinder/base/cinder-mariadb-database.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
apiVersion: mariadb.mmontes.io/v1alpha1
apiVersion: k8s.mariadb.com/v1alpha1
kind: Database
metadata:
name: cinder
Expand All @@ -13,7 +13,7 @@ spec:
collate: utf8_general_ci
retryInterval: 5s
---
apiVersion: mariadb.mmontes.io/v1alpha1
apiVersion: k8s.mariadb.com/v1alpha1
kind: User
metadata:
name: cinder
Expand All @@ -31,7 +31,7 @@ spec:
host: "%"
retryInterval: 5s
---
apiVersion: mariadb.mmontes.io/v1alpha1
apiVersion: k8s.mariadb.com/v1alpha1
kind: Grant
metadata:
name: cinder-grant
Expand Down
6 changes: 3 additions & 3 deletions kustomize/glance/base/glance-mariadb-database.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
apiVersion: mariadb.mmontes.io/v1alpha1
apiVersion: k8s.mariadb.com/v1alpha1
kind: Database
metadata:
name: glance
Expand All @@ -13,7 +13,7 @@ spec:
collate: utf8_general_ci
retryInterval: 5s
---
apiVersion: mariadb.mmontes.io/v1alpha1
apiVersion: k8s.mariadb.com/v1alpha1
kind: User
metadata:
name: glance
Expand All @@ -31,7 +31,7 @@ spec:
host: "%"
retryInterval: 5s
---
apiVersion: mariadb.mmontes.io/v1alpha1
apiVersion: k8s.mariadb.com/v1alpha1
kind: Grant
metadata:
name: glance-grant
Expand Down
6 changes: 3 additions & 3 deletions kustomize/heat/base/heat-mariadb-database.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
apiVersion: mariadb.mmontes.io/v1alpha1
apiVersion: k8s.mariadb.com/v1alpha1
kind: Database
metadata:
name: heat
Expand All @@ -13,7 +13,7 @@ spec:
collate: utf8_general_ci
retryInterval: 5s
---
apiVersion: mariadb.mmontes.io/v1alpha1
apiVersion: k8s.mariadb.com/v1alpha1
kind: User
metadata:
name: heat
Expand All @@ -31,7 +31,7 @@ spec:
host: "%"
retryInterval: 5s
---
apiVersion: mariadb.mmontes.io/v1alpha1
apiVersion: k8s.mariadb.com/v1alpha1
kind: Grant
metadata:
name: heat-grant
Expand Down
6 changes: 3 additions & 3 deletions kustomize/horizon/base/horizon-mariadb-database.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
apiVersion: mariadb.mmontes.io/v1alpha1
apiVersion: k8s.mariadb.com/v1alpha1
kind: Database
metadata:
name: horizon
Expand All @@ -13,7 +13,7 @@ spec:
collate: utf8_general_ci
retryInterval: 5s
---
apiVersion: mariadb.mmontes.io/v1alpha1
apiVersion: k8s.mariadb.com/v1alpha1
kind: User
metadata:
name: horizon
Expand All @@ -31,7 +31,7 @@ spec:
host: "%"
retryInterval: 5s
---
apiVersion: mariadb.mmontes.io/v1alpha1
apiVersion: k8s.mariadb.com/v1alpha1
kind: Grant
metadata:
name: horizon-grant
Expand Down
6 changes: 3 additions & 3 deletions kustomize/keystone/base/keystone-mariadb-database.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
apiVersion: mariadb.mmontes.io/v1alpha1
apiVersion: k8s.mariadb.com/v1alpha1
kind: Database
metadata:
name: keystone
Expand All @@ -13,7 +13,7 @@ spec:
collate: utf8_general_ci
retryInterval: 5s
---
apiVersion: mariadb.mmontes.io/v1alpha1
apiVersion: k8s.mariadb.com/v1alpha1
kind: User
metadata:
name: keystone
Expand All @@ -31,7 +31,7 @@ spec:
host: "%"
retryInterval: 5s
---
apiVersion: mariadb.mmontes.io/v1alpha1
apiVersion: k8s.mariadb.com/v1alpha1
kind: Grant
metadata:
name: keystone-grant
Expand Down
2 changes: 1 addition & 1 deletion kustomize/mariadb-cluster/base/mariadb-backup.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: mariadb.mmontes.io/v1alpha1
apiVersion: k8s.mariadb.com/v1alpha1
kind: Backup
metadata:
name: mariadb-backup
Expand Down
88 changes: 55 additions & 33 deletions kustomize/mariadb-cluster/base/mariadb-galera.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: mariadb.mmontes.io/v1alpha1
apiVersion: k8s.mariadb.com/v1alpha1
kind: MariaDB
metadata:
name: mariadb-galera
Expand All @@ -7,47 +7,75 @@ spec:
rootPasswordSecretKeyRef:
name: mariadb
key: root-password

database: mariadb
username: mariadb
passwordSecretKeyRef:
name: mariadb
key: password

image: mariadb:11.0.3
database: mariadb

port: 3306
storage:
size: 1Gi
storageClassName: general
resizeInUseVolumes: true
waitForVolumeResize: true
volumeClaimTemplate:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 1Gi
storageClassName: general

replicas: 3
podSecurityContext:
runAsUser: 0

# point to an existing MaxScale instance. Doing this will delegate tasks such as primary failover to MaxScale.
# maxScaleRef:
# name: maxscale

# provision a MaxScale instance and set 'spec.maxScaleRef' automatically.
maxScale:
enabled: false

kubernetesService:
type: LoadBalancer
annotations:
metallb.universe.tf/address-pool: primary

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

galera:
enabled: true
primary:
podIndex: 0
automaticFailover: true
sst: mariabackup
replicaThreads: 4
availableWhenDonor: false
galeraLibPath: /usr/lib/galera/libgalera_smm.so
replicaThreads: 1
agent:
image: ghcr.io/mariadb-operator/agent:v0.0.3
image: ghcr.io/mariadb-operator/mariadb-operator:v0.0.26
port: 5555
kubernetesAuth:
enabled: true
gracefulShutdownTimeout: 5s
gracefulShutdownTimeout: 1s
recovery:
enabled: true
clusterHealthyTimeout: 3m
minClusterSize: 50%
clusterHealthyTimeout: 30s
clusterBootstrapTimeout: 10m
podRecoveryTimeout: 5m
podSyncTimeout: 5m
podRecoveryTimeout: 3m
podSyncTimeout: 3m
initContainer:
image: ghcr.io/mariadb-operator/init:v0.0.6
volumeClaimTemplate:
resources:
requests:
storage: 10Gi
accessModes:
- ReadWriteOnce
image: ghcr.io/mariadb-operator/mariadb-operator:v0.0.26
config:
reuseStorageVolume: false
volumeClaimTemplate:
resources:
requests:
storage: 300Mi
accessModes:
- ReadWriteOnce

service:
type: LoadBalancer
Expand Down Expand Up @@ -77,17 +105,15 @@ spec:
key: dsn

affinity:
podAntiAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- topologyKey: "kubernetes.io/hostname"
enableAntiAffinity: true

tolerations:
- key: "mariadb.mmontes.io/ha"
- key: "k8s.mariadb.com/ha"
operator: "Exists"
effect: "NoSchedule"

podDisruptionBudget:
maxUnavailable: 66%
maxUnavailable: 33%

updateStrategy:
type: RollingUpdate
Expand All @@ -109,9 +135,5 @@ spec:
limits:
memory: 16Gi

volumeClaimTemplate:
resources:
requests:
storage: 10Gi
accessModes:
- ReadWriteOnce
metrics:
enabled: true
2 changes: 1 addition & 1 deletion kustomize/mariadb-operator/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@ helmCharts:
certManager:
enabled: true
includeCRDs: true
version: 0.24.0
version: 0.26.0
namespace: mariadb-system
6 changes: 3 additions & 3 deletions kustomize/neutron/base/neutron-mariadb-database.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
apiVersion: mariadb.mmontes.io/v1alpha1
apiVersion: k8s.mariadb.com/v1alpha1
kind: Database
metadata:
name: neutron
Expand All @@ -13,7 +13,7 @@ spec:
collate: utf8_general_ci
retryInterval: 5s
---
apiVersion: mariadb.mmontes.io/v1alpha1
apiVersion: k8s.mariadb.com/v1alpha1
kind: User
metadata:
name: neutron
Expand All @@ -31,7 +31,7 @@ spec:
host: "%"
retryInterval: 5s
---
apiVersion: mariadb.mmontes.io/v1alpha1
apiVersion: k8s.mariadb.com/v1alpha1
kind: Grant
metadata:
name: neutron-grant
Expand Down
14 changes: 7 additions & 7 deletions kustomize/nova/base/nova-mariadb-database.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
apiVersion: mariadb.mmontes.io/v1alpha1
apiVersion: k8s.mariadb.com/v1alpha1
kind: Database
metadata:
name: nova
Expand All @@ -13,7 +13,7 @@ spec:
collate: utf8_general_ci
retryInterval: 5s
---
apiVersion: mariadb.mmontes.io/v1alpha1
apiVersion: k8s.mariadb.com/v1alpha1
kind: Database
metadata:
name: nova-api
Expand All @@ -28,7 +28,7 @@ spec:
collate: utf8_general_ci
retryInterval: 5s
---
apiVersion: mariadb.mmontes.io/v1alpha1
apiVersion: k8s.mariadb.com/v1alpha1
kind: Database
metadata:
name: nova-cell0
Expand All @@ -43,7 +43,7 @@ spec:
collate: utf8_general_ci
retryInterval: 5s
---
apiVersion: mariadb.mmontes.io/v1alpha1
apiVersion: k8s.mariadb.com/v1alpha1
kind: User
metadata:
name: nova
Expand All @@ -61,7 +61,7 @@ spec:
host: "%"
retryInterval: 5s
---
apiVersion: mariadb.mmontes.io/v1alpha1
apiVersion: k8s.mariadb.com/v1alpha1
kind: Grant
metadata:
name: nova-grant
Expand All @@ -78,7 +78,7 @@ spec:
host: "%"
retryInterval: 5s
---
apiVersion: mariadb.mmontes.io/v1alpha1
apiVersion: k8s.mariadb.com/v1alpha1
kind: Grant
metadata:
name: nova-api-grant
Expand All @@ -95,7 +95,7 @@ spec:
host: "%"
retryInterval: 5s
---
apiVersion: mariadb.mmontes.io/v1alpha1
apiVersion: k8s.mariadb.com/v1alpha1
kind: Grant
metadata:
name: nova-cell0-grant
Expand Down
6 changes: 3 additions & 3 deletions kustomize/octavia/base/octavia-mariadb-database.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
apiVersion: mariadb.mmontes.io/v1alpha1
apiVersion: k8s.mariadb.com/v1alpha1
kind: Database
metadata:
name: octavia
Expand All @@ -13,7 +13,7 @@ spec:
collate: utf8_general_ci
retryInterval: 5s
---
apiVersion: mariadb.mmontes.io/v1alpha1
apiVersion: k8s.mariadb.com/v1alpha1
kind: User
metadata:
name: octavia
Expand All @@ -31,7 +31,7 @@ spec:
host: "%"
retryInterval: 5s
---
apiVersion: mariadb.mmontes.io/v1alpha1
apiVersion: k8s.mariadb.com/v1alpha1
kind: Grant
metadata:
name: octavia-grant
Expand Down
Loading

0 comments on commit 94db186

Please sign in to comment.