Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: update mariadb to the latest stable release #638

Merged
merged 1 commit into from
Dec 22, 2024
Merged
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
17 changes: 15 additions & 2 deletions base-kustomize/mariadb-cluster/base/mariadb-backup.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,25 @@ spec:
namespace: openstack
schedule:
cron: "0 0 * * *"
serviceAccountName: backup
compression: gzip
storage:
persistentVolumeClaim:
resources:
requests:
storage: 1Gi
accessModes:
- ReadWriteOnce
securityContext:
runAsUser: 0
args:
- --single-transaction
- --all-databases
- --verbose
resources:
requests:
cpu: 100m
memory: 128Mi
limits:
cpu: 300m
memory: 512Mi
affinity:
antiAffinityEnabled: true
3 changes: 2 additions & 1 deletion base-kustomize/mariadb-cluster/base/mariadb-replication.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ spec:
generate: false
username: mariadb
database: mariadb
image: mariadb:10.11.7
image: docker-registry1.mariadb.com/library/mariadb:11.4.3

affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
Expand Down
15 changes: 12 additions & 3 deletions bin/install-mariadb-operator.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
#!/bin/bash
# shellcheck disable=SC2124,SC2145,SC2294

export VERSION="${VERSION:-0.36.0}"

# Default parameter value
CLUSTER_NAME=${1:-cluster.local}
export CLUSTER_NAME=${CLUSTER_NAME:-cluster.local}

# Directory to check for YAML files
CONFIG_DIR="/etc/genestack/helm-configs/mariadb-operator"
Expand All @@ -27,12 +29,19 @@ if [ "${CLUSTER_NAME}" != "cluster.local" ]; then
fi
fi

# Add the mariadb-operator helm repository
helm repo add mariadb-operator https://helm.mariadb.com/mariadb-operator
helm repo update

# Install the CRDs that match the version defined
helm upgrade --install mariadb-operator-crds mariadb-operator/mariadb-operator-crds --version "${VERSION}"

# Helm command setup
HELM_CMD="helm upgrade --install mariadb-operator mariadb-operator --repo https://mariadb-operator.github.io/mariadb-operator \
HELM_CMD="helm upgrade --install mariadb-operator mariadb-operator \
--namespace=mariadb-system \
--create-namespace \
--timeout 120m \
--version 0.28.1 \
--version ${VERSION} \
--post-renderer /etc/genestack/kustomize/kustomize.sh \
--post-renderer-args mariadb-operator/overlay \
-f /opt/genestack/base-helm-configs/mariadb-operator/mariadb-operator-helm-overrides.yaml"
Expand Down
Loading