From 4a465e46a60cb37bd151f882aa1135b7704cb801 Mon Sep 17 00:00:00 2001 From: outductor Date: Sun, 19 Nov 2023 09:33:13 +0900 Subject: [PATCH] no replica for now --- .../mariadb/mariadb.yaml | 21 +++++++++- .../seichi-minecraft/mariadb/mariadb.yaml | 41 ------------------- 2 files changed, 19 insertions(+), 43 deletions(-) diff --git a/seichi-onp-k8s/manifests/seichi-kubernetes/apps/seichi-debug-minecraft/mariadb/mariadb.yaml b/seichi-onp-k8s/manifests/seichi-kubernetes/apps/seichi-debug-minecraft/mariadb/mariadb.yaml index 49aa23579..def0f07da 100644 --- a/seichi-onp-k8s/manifests/seichi-kubernetes/apps/seichi-debug-minecraft/mariadb/mariadb.yaml +++ b/seichi-onp-k8s/manifests/seichi-kubernetes/apps/seichi-debug-minecraft/mariadb/mariadb.yaml @@ -29,8 +29,25 @@ spec: accessModes: - ReadWriteOnce - service: - type: ClusterIP + livenessProbe: + exec: + command: + - bash + - -c + - mysql -u root -p"${MARIADB_ROOT_PASSWORD}" -e "SELECT 1;" + initialDelaySeconds: 20 + periodSeconds: 10 + timeoutSeconds: 5 + + readinessProbe: + exec: + command: + - bash + - -c + - mysql -u root -p"${MARIADB_ROOT_PASSWORD}" -e "SELECT 1;" + initialDelaySeconds: 20 + periodSeconds: 10 + timeoutSeconds: 5 metrics: exporter: diff --git a/seichi-onp-k8s/manifests/seichi-kubernetes/apps/seichi-minecraft/mariadb/mariadb.yaml b/seichi-onp-k8s/manifests/seichi-kubernetes/apps/seichi-minecraft/mariadb/mariadb.yaml index ce83924a4..524e251b3 100644 --- a/seichi-onp-k8s/manifests/seichi-kubernetes/apps/seichi-minecraft/mariadb/mariadb.yaml +++ b/seichi-onp-k8s/manifests/seichi-kubernetes/apps/seichi-minecraft/mariadb/mariadb.yaml @@ -21,47 +21,6 @@ spec: port: 3306 - replicas: 3 - - replication: - enabled: true - primary: - podIndex: 0 - automaticFailover: true - replica: - waitPoint: AfterSync - connectionTimeout: 10s - connectionRetries: 10 - syncTimeout: 10s - - primaryService: - type: ClusterIP - primaryConnection: - secretName: primary-mariadb-conn - secretTemplate: - key: dsn - - affinity: - podAntiAffinity: - requiredDuringSchedulingIgnoredDuringExecution: - - topologyKey: "kubernetes.io/hostname" - - tolerations: - - key: "mariadb.mmontes.io/ha" - operator: "Exists" - effect: "NoSchedule" - - podDisruptionBudget: - minAvailable: "66%" - - myCnf: | - [mysqld] - bind-address=0.0.0.0 - default_storage_engine=InnoDB - binlog_format=row - innodb_autoinc_lock_mode=2 - max_allowed_packet=256M - volumeClaimTemplate: resources: requests: