Skip to content

Commit

Permalink
Re-write mysql readme
Browse files Browse the repository at this point in the history
Signed-off-by: Anisur Rahman <[email protected]>
  • Loading branch information
anisurrahman75 committed Dec 12, 2024
1 parent d7610d6 commit 805234c
Showing 1 changed file with 92 additions and 4 deletions.
96 changes: 92 additions & 4 deletions docs/addons/mysql/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,103 @@ This guide will give you an overview of which MySQL versions are supported and h

## Supported MySQL Versions

KubeStash has the following addon versions for MySQL:
**Backup Versions**

{{< versionlist "mysql">}}
To find the supported MySQL versions for backup operations in your Kubernetes cluster, you can inspect the `.spec.availableVersions` field of the `mysql-backup` function.

Let's check the supported versions for backup:

```bash
$ kubectl get functions.addons.kubestash.com mysql-backup -o yaml
apiVersion: addons.kubestash.com/v1alpha1
kind: Function
metadata:
annotations:
meta.helm.sh/release-name: kubedb
meta.helm.sh/release-namespace: kubedb
creationTimestamp: "2024-12-11T06:05:43Z"
generation: 1
labels:
app.kubernetes.io/instance: kubedb
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/name: kubedb-kubestash-catalog
app.kubernetes.io/version: v2024.11.18
helm.sh/chart: kubedb-kubestash-catalog-v2024.11.18
name: mysql-backup
resourceVersion: "86023"
uid: f3b159ba-2f7d-4a6b-bc14-d7e992685632
spec:
args:
- backup
- --namespace=${namespace:=default}
- --backupsession=${backupSession:=}
- --enable-cache=${enableCache:=}
- --scratch-dir=${scratchDir:=}
- --wait-timeout=${waitTimeout:=300}
- --mysql-args=${args:=}
- --db-version=${dbVersion:=}
- --databases=${databases:=}
availableVersions:
- 5.7.25
- 8.0.3
- 8.0.21
image: ghcr.io/kubedb/mysql-restic-plugin:v0.12.0_${DB_VERSION}
```

Here,
- `spec.availableVersions` specifies the version list which are supported for backup.


**Restore Versions**

To find the supported MySQL versions for restore operations in your Kubernetes cluster, you can inspect the `.spec.availableVersions` field of the `mysql-restore` function.

Let's check the supported versions for restore:

```bash
$ kubectl get functions.addons.kubestash.com mysql-restore -o yaml
apiVersion: addons.kubestash.com/v1alpha1
kind: Function
metadata:
annotations:
meta.helm.sh/release-name: kubedb
meta.helm.sh/release-namespace: kubedb
creationTimestamp: "2024-12-11T06:05:43Z"
generation: 1
labels:
app.kubernetes.io/instance: kubedb
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/name: kubedb-kubestash-catalog
app.kubernetes.io/version: v2024.11.18
helm.sh/chart: kubedb-kubestash-catalog-v2024.11.18
name: mysql-restore
resourceVersion: "85997"
uid: 94a1e91f-3f2c-4274-a454-0aefdb351eca
spec:
args:
- restore
- --namespace=${namespace:=default}
- --restoresession=${restoreSession:=}
- --snapshot=${snapshot:=}
- --enable-cache=${enableCache:=}
- --scratch-dir=${scratchDir:=}
- --wait-timeout=${waitTimeout:=300}
- --mysql-args=${args:=}
- --db-version=${dbVersion:=}
availableVersions:
- 5.7.25
- 8.0.3
- 8.0.21
image: ghcr.io/kubedb/mysql-restic-plugin:v0.12.0_${DB_VERSION}
```

Here,
- `spec.availableVersions` specifies the version list which are supported for restore.

Here, the addon follows `M.M.P` versioning scheme where `M.M.P` (Major.Minor.Patch) represents the respective database version.

## Addon Version Compatibility

Any addon with matching major version with the database version should be able to take backup of that database. For example, MySQL addon with version `8.x.x` should be able take backup of any MySQL of `8.x.x` series. However, this might not be true for some versions. In that case, we will have separate addon for that version.
Any database version with a major version matching the supported MySQL versions should generally be able to back up the database. For instance, if the function supports the `8.x.x` version, it should work with any MySQL database within the `8.x.x` series. However, there may be exceptions where certain versions are incompatible. In such cases, use the specific version name that is explicitly supported.

## Documentation Overview

Expand Down

0 comments on commit 805234c

Please sign in to comment.