All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- Add
KeepAfterDeletein.Spec.VolumeSpecto keep pvc after mysql cluster been deleted.
MysqlDatabaseMysqlUserAdd delete policy- Add
PtHeartbeatResourcesin.Spec.PodSpecto allow the user specifying resources for pt-heartbeat. - Set
MysqlCluter.Spec.BackupScheduleto empty string to disable recurrent backups - Add support for backing up to HDFS
- Set default MySQL server version to
5.7.35 - Bump Orchestrator to
3.2.6 - Change policy/v1beta1 to policy/v1
- Add RBAC permissions when deploying on OpenShift
- Remove PodSecurityPolicy
- Bump
golang.org/x/netto 0.8 (fix: CVE-2022-41723, CVE-2022-27664, CVE-2021-33194) - Orchestrator can't properly update or migrate when it more than one
- Operator service account have no access to update mysqlbackups/status
- Recurrent backup remote delete policy can not update according to the
cluster.Spec.BackupRemoteDeletePolicy - When the operator is restarted, it will process the Pod list once to prevent the state of the pod from being changed automatically because it is not updated (especially if the PVC is full).
orchestrator.secretNameis ignored in helm charts
- Bump https://github.com/bitpoke/build to 0.7.1
- Fix the app version in the published Helm charts
- If you want to save mysql backup to AWS S3,
AWS_ACCESS_KEY_IDandAWS_SECRET_ACCESS_KEYwere the only options, but now you can useAWS_SESSION_TOKENorAWS_ROLE_ARNandAWS_WEB_IDENTITY_TOKEN_FILE - Add
orchestrator.persistence.selector.matchLabelsandorchestrator.persistence.annotationsfor persistence depolyment with constraints - Add
orchestrator.persistence.fsGroupWorkaroundEnabledfor persistent volume provisioners wich don't support fsGroup in security context (fixes #615) - Add
appSecretLabels,appSecretAnnotations,backupSecretLabels,backupSecretAnnotationsto provide custom labels and annotations to created app and backup secrets - Update rclone to
v1.57.0 - For s3, enable the no_check_bucket option for rclone
- Allow setting metrics and health checking listening addresses
- Allow setting pod security context when deploying with Helm
- Use distroless as base image for orchestrator container
- Use networking.k8s.io/v1 instead of extensions/v1beta1 for ingress
- Use
Service.spec.publishNotReadyAddressesinstead ofservice.alpha.kubernetes.io/tolerate-unready-endpoints - Use git-semver for setting versions
- Gracefull shutdown is enabled by default
- Removed support for Helm 2
- Make sure orchestrator can find its templates #741
- Workaround CRD generation with
preserveUnknownFields=falsekubernetes-sigs/controller-tools#476
- Workaround CRD generation with
preserveUnknownFields=falsekubernetes-sigs/controller-tools#476
- If you want to save mysql backup to AWS S3,
AWS_ACCESS_KEY_IDandAWS_SECRET_ACCESS_KEYwere the only options, but now you can useAWS_SESSION_TOKENorAWS_ROLE_ARNandAWS_WEB_IDENTITY_TOKEN_FILE
- Update rclone to
v1.57.0
- Make sure orchestrator can find its templates #741
- Add
orchestrator.persistence.fsGroupWorkaroundEnabledfor persistent volume provisioners wich don't support fsGroup in security context (fixes #615)
- Allow setting pod security context when deploying with Helm
- Use distroless as base image for orchestrator container
- Add
imageandmysqlVersionoptions to MysqlCluster chart. This bumps the chart version to0.3.1 - Add
backupAffinity,backupNodeSelector,backupPriorityClassName,backupTolerationsto.Spec.PodSpecto allow specifying custom scheduling constraints for backup jobs. - Add the ability to set the
imagePullSecretsfor the operator statefulset. - Add Google Drive via service account as backup option.
- Add
initBucketURLandinitBucketSecretNameoptions to MysqlCluster chart. This bumps the chart version to0.3.0 - Add an example of how initContainers can be used to fix hostPath permissions.
- Add a lifecycle preStop hook for the
mysqlcontainer. Before killing the master MySQL process, it triggers agraceful-master-takeover-autocommand in Orchestrator. This is disabled by default, to enable it setgracefulShutdown.enabled=truein chart values or set the controller command argumentfailover-before-shutdowntotrue. - Add
mysqlLifecycleto.Spec.PodSpecto allow overriding the default lifecycle hook for themysqlcontainer. - Add
backupCompressCommandandbackupDecompressCommandto allow using different compressors/decompressors when backing up or restoring. - Add support for MySQL version 8.0
- Add
go modulescache - Support cron timezone
- Only add
binlog-space-limitforperconaimage - Make user-defined InitContainer take the precedence
- Set timeout of 15s on connection between the operator and Orchestrator
- Bump controller-util dependency to 0.3.0 which fixes some updates on pod spec.
- Removed
NO_AUTO_VALUE_ON_ZEROfromsql-modeto be inline with MySQL default value - Remove use go module instead of dep
- Update k8s client to
v0.21.2 - Update kubebuilder (to
v2.3.1) along with controller-runtime (tov0.9.2) and controller-gen - Update rclone to
v1.53.1 - Update
Orchestratorversion fromv3.1.2tov3.2.3 - Set default MySQL server version to
5.7.31 - Generate CRDs with controller-gen
v0.5.0 - Update
getOrdinalFromHostnameandIsFirstPodInSet - Use
klogfor logging - Use https://github.com/bitpoke/build for building the project
- Fix insufficient permissions during startup
- Fix the
xtrabackup--tables-excludecannot take effect - Fix the pod unable to connect
Orchestrator - Fix pod labels diff of map
- Fixed backup cleanup job bug (#577)
- Fix Kubebuilder path in Makefile.
- Fix #632 lifeCycle preStop script is not copied to given directory.
- Fix #637 mysqlbackup status is not updated correctly.
- Fix #647 custom conf can't overwrite the default conf
- Fix #627 let Orchestrator do the failover
- Fix #694 the error caused by backing up without waiting for master to be created.
- Added a
ServiceMonitorto the operator chart that scrapes all MySQL instances. - Added a test suite for RunCloneCommand logic, along with a mock backup server.
- Added checks for service availability when cloning.
- Added "fail fast" logic when unexpected errors occur during cloning/download.
- Added
dataDircleanup code so that interrupted cloning does not leave dataDir in an inconsistent state. - Added e2e test demonstrating cloning failure when PVC is removed and pod recreated.
- Add
MetricsExporterExtraArgsfield on MySQLCluster resource that allows to specify command line arguments to pass to MySQL metrics exporter. - Allow using custom secret for app credentials in
mysql-clusterchart. - Add
XbstreamExtraArgsfield on MySQLCluster resource that allows to specify extra command line arguments to xbstream. - Add
XtrabackupExtraArgs,XtrabackupPrepareExtraArgs,XtrabackupTargetDirto parametrize xtrabackup. - Add
RcloneExtraArgsto parametrize rclone command. - Add
InitFileExtraSQLto insert custom init SQL queries that will be run at MySQL initialization. - Add
VolumesandVolumesMountsin.Spec.PodSpecto allow the user specifying custom volume mounts. - Add
InitContainersandContainersin.Spec.PodSpecto allow the user specifying custom containers. - Add
MetricsExporterResourcesandMySQLOperatorSidecarResroucesin.Spec.PodSpecto allow the user specifying resources for thos sidecars containers. - Add command line flag to configure number of workers for orchestrator controller.
- Add livenessProbe to controller
- #422 adds the
SidecarServerPortto theMasterServiceand introduces one new service, HealthyReplicasService, so that we can try to clone from replicas first, then fall back to master. - Changed the connect timeout from the default of 30s to 5s so that an empty k8s service will not cause cloning attempts to hang unnecessarily for 30s.
- Update documentation structure and formatting.
- Update Orchestrator version to v3.1.4
- Update orchestrator base image to
alpine:3.11. - Update FailoverInProgress condition to false when both Replicas and ReadyNodes are 0.
- Fall back to current master, not pod 0, when no healthy replicas found for backup candidate.
- Change the
mysql-operatorchart to be helm v3 compatible while keeping backward compatibility. - Change logging: change
clusterlogging field tokey; normalize logging and more details; output Stackdrive compatible format. - Decrease
MASTER_CONNECT_RETRYinterval from 10 to 1 second. - Deprecate
TmpfsSizebecause can be handled usingExtraVolumesandExtraMySQLVolumesMounts. - Update cron documentation
- Set InnoDB buffer parameter:
innodb_buffer_pool_instancestomin(resources.limit.cpu, floor(innodb_buffer_pool_size/1G))(see #502) - Change default resource requests/limits for
sidecarcontainer: requested=10m/32Mi, limit=the same as.spec.podSpec.resources.limit - Change default resource requests/limits for
exportercontainer: requested=10m/32Mi, limit=100m/128Mi - Change default resource requests/limits for
heartbeatcontainer: requested=10m/32Mi, limit=100m/64Mi - If
extra_portis defined in the cluster spec, metrics exporter will use it to connect to MySQL providing thatextra_max_connectionsis larger than the default1. If MySQL server runs out of available connections, usingextra_portallows the exporter to continue collecting MySQL metrics. - Change the default number of workers for orchestrator controller from 1 to 10.
- Update and fix e2e tests
- Fix double date string in backup path
- Fix double date string in bakup path
- Copy the nodeSelector as-is in the statefulset (fixes #454)
- Fix flakines in ReadOnly cluster condition (fixes #434)
- Fix rounding in computing
innodb-buffer-pool-size(fixes #501) - rclone extra arguments are now properly passed to the backup job.
0.3.8 - 2020-01-22
- Fixed
TmpfsSizetype in CRD
0.3.7 - 2020-01-22
- Add support for mounting a tmpfs into /tmp. Add
TmpfsSizefield on the cluster
0.3.6 - 2020-01-08
- Update
mysql-clusterchart to support settingbackupScheduleJobsHistoryLimit
- Increase size of
valuecolumn insys.operatortable (see #447) (fixes #446) - Determine master logic: prevent to follow infinit loops
- Use custom server offset (
MyServerIDOffset) when deciding to clone from bucket
0.3.5 - 2019-11-28
- Update Orchestrator version to v3.1.2
- Update Go lang to 1.13.4
- Don't require
backupSecretNameif not set. Fixes delete on remove when using workload identity
0.3.4 - 2019-11-04
- Update
mysql-clusterchart to support custom server id offset
- During failover don't interfere with readdable/wriatable master (fixes #411)
- Imorove logging
0.3.3 - 2019-10-03
- Allow server id offset to be set via
MySQLClusterresource by addingMyServerIDOffsetfield
- Make app credentials optional for mysql-cluster chart
- Don't create user with empty password (fixes #385)
- Fix wrong enviroment for
mysqlcontainer - Fix pt-kill client configure file prefix
0.3.2 - 2019-07-26
- Update docs structure on presslabs.com/docs/mysql-operator/
- Set limit on mysql
mysql-init-onlycontainer the same as on themysqlcontainer (fixes #371) - Don't limit memory on sidecars containers
0.3.1 - 2019-07-17
- Upgrade path from version
v0.2.x(#369) - Changes the default leader election id from
controller-leader-election-helpertomysql-operator-leader-election(#368)
0.3.0 - 2019-07-08
- add a new cluster condition
FailoverInProgressthat marks the cluster during a failover - set orchestrator related events on the cluster:
OrcFailureDetection,OrcPostUnsuccessfulFailover,OrcPostMasterFailover,OrcPostIntermediateMasterFailover - new command line flag
--mysql-versions-to-imageto allow user to specify image for a mysql version - add print column in mysqlcluster CRD:
Ready,Replicas,Age - allow specifying more PodSpec on MySQL cluster (9b6b46f)
- add a node controller for MySQL configuration (1950812)
- add "standard" labels on services created by the operator (#299)
- merge Orchestrator chart with the mysql-operator chart. Now instead of deployment it uses a statefulset
- nodes are removed from cluster status at scale down
- use init container for MySQL initialization (#342)
- enhance Backup Job Pod for Workload Identity (#366)
- refactor of how the information flow works: from k8s -> Operator -> Orchestrator; the sidecar container does not connect to Orchestrator anymore.
- rename of
initBackupURItoinitBackupURL(a3c6556) - use of Percona CentOS based images (#254)
- don't run as
rootuser in containers (#291) - rename orchestrator finalizer (to block cluster deletion while it's registered into Orchestrator)
from
OrchestratorFinalizertomysql.presslabs.org/registered-in-orchestrator(bfe4646) - improvement of
getBackupCandidatefunction (9ce4e68) - configure MySQL using
init-file(beb41ce, e5823cb) - rename
AWS_SECRET_KEYfield from bucket/backup secret toAWS_SECRET_ACCESS_KEY(#301) - use an internal status table to store the MySQL status (181909f)
- use a common headless service for all MySQL nodes to reduce the host-name length (#246)
- cleanup of deprecated fields:
bucketURIand top-levelMySQLCluster.spec.volumeSpecPVC specification (d909ab9, df80b28)
- fix readiness probe for MySQL container
- fix remote storage delete bug
- fix mysqlbackup deletion failure when cluster is not found
- fix #350 where no backups were created when one fails
- fix #107, the orchestrator RAFT issue