Updated configuration docs

This commit is contained in:
mmontes11
2024-08-28 10:27:00 +02:00
parent 40c0e97467
commit c6b58a8e77

View File

@ -8,10 +8,10 @@ This documentation aims to provide guidance on various configuration aspects acr
## Table of contents
<!-- toc -->
- [my.cnf](#mycnf)
- [Timezones](#timezones)
- [Passwords](#passwords)
- [External resources](#external-resources)
- [Probes](#probes)
- [TimeZones](#timezones)
<!-- /toc -->
## my.cnf
@ -52,6 +52,41 @@ spec:
To ensure your configuration changes take effect, the operator triggers a [rolling update](./UPDATES.md) whenever the `myCnf` field or a `ConfigMap` is updated. For the operator to detect changes in a `ConfigMap`, it must be labeled with `k8s.mariadb.com/watch`. Refer to the [external resources](#external-resources) section for further detail.
## Timezones
By default, MariaDB does not load timezone data on startup for performance reasons and defaults the timezone to `SYSTEM`, obtaining the timezone information from the environment where it runs. See the [MariaDB docs](https://mariadb.com/kb/en/time-zones/) for further information.
You can explicitly configure a timezone in your `MariaDB` instance by setting the `timeZone` field:
```yaml
apiVersion: k8s.mariadb.com/v1alpha1
kind: MariaDB
metadata:
name: mariadb-galera
spec:
timeZone: "UTC"
```
This setting is immutable and implies loading the timezone data on startup.
In regards to `Backup` and `SqlJob` resources, which get reconciled into `CronJobs`, you can also define a `timeZone` associated with their cron expression:
```yaml
apiVersion: k8s.mariadb.com/v1alpha1
kind: Backup
metadata:
name: backup-scheduled
spec:
mariaDbRef:
name: mariadb
schedule:
cron: "*/1 * * * *"
suspend: false
timeZone: "UTC"
```
If `timeZone` is not provided, the local timezone will be used, as described in the [Kubernetes docs](https://kubernetes.io/docs/concepts/workloads/controllers/cron-jobs/#time-zones).
## Passwords
Some CRs require passwords provided as `Secret` references to function properly. For instance, the root password for a `MariaDB` resource:
@ -163,38 +198,3 @@ spec:
```
There isn't an universally correct default value for these thresholds, so we recommend determining your own based on factors like the compute resources, network, storage, and other aspects of the environment where your `MariaDB` and `MaxScale` instances are running.
## TimeZones
By default, MariaDB does not load timezone data on startup for performance reasons and defaults the timezone to `SYSTEM`, obtaining the timezone information from the environment where it runs. See the [MariaDB docs](https://mariadb.com/kb/en/time-zones/) for further information.
You can explicitly configure a timezone in your `MariaDB` instance by setting the `timeZone` field:
```yaml
apiVersion: k8s.mariadb.com/v1alpha1
kind: MariaDB
metadata:
name: mariadb-galera
spec:
timeZone: "UTC"
```
This setting is immutable and implies loading the timezone data on startup.
In regards to `Backup` and `SqlJob` resources, which get reconciled into `CronJobs`, you can also define a `timeZone` associated with their cron expression:
```yaml
apiVersion: k8s.mariadb.com/v1alpha1
kind: Backup
metadata:
name: backup-scheduled
spec:
mariaDbRef:
name: mariadb
schedule:
cron: "*/1 * * * *"
suspend: false
timeZone: "UTC"
```
If `timeZone` is not provided, the local timezone will be used, as described in the [Kubernetes docs](https://kubernetes.io/docs/concepts/workloads/controllers/cron-jobs/#time-zones).