Breaking changes:
-
Replace Zap logger with Golang's logger: Previously an external log library was used, now the native golang library configured to have json format is used. disable-trace flag is no longer supported.
-
Replace flag
disable-services-creationbyservices-creationwith default value oftrue
Features:
-
Manage a Kubernetes Service for standby nodes: Previously, only the service that pointed to the primary node was created, now a service that points to the standby nodes is also created.
-
Implement a wrapper manager for the
runcommand: The code structure of the run command has been changed to a more friendly approach, now the command creates a watcher and runs it checking for system signals (SIGTERM and SIGINT). -
Rearrange code logic for the shake of maintenance
Fixes:
-
Ignore duplicated primary nodes: Previously, if more than one primary was found, pg-selector would update the labels equally. Now it logs an error and does not update the labels.
Context: this is necessary because if more than one primary is found, it means that the replication manager has not been able to properly promote the other pod to primary, and therefore a manual action is required so that there is only one primary again. While this manual action is being executed, the service of the created primary is required to only point to one primary node, so that there are no inconsistencies in the data when writing to two primary nodes.
-
Avoid crashing on well-known situations: Previously the main loop would crash when some errors occurred, now it just logs the error and continues to the next sync time wait. The application crash should only happen in unexpected cases or due to configuration failure.
Contributors:
@sebastocorp