Releases: CrunchyData/postgres-operator
4.0.1
This is a minor release for the Postgres Operator and includes the following:
- This release updates the version of PostgreSQL.
- Added validation error if --autofail flag is set and user attempts to perform a manual failover.
- Fixed an issue with --delete-data hanging when a cluster was created with --pgool.
- Fixed an issue with pgo.yaml pgbackrest default not being used when creating a cluster.
- Shorten -backrest-shared-repo pvc name to -pgbr-repo as in some cases generated name was over the size limit and causes issues.
3.5.4
4.0.0
Crunchy Data is pleased to release PostgreSQL Operator 4.0.0
Crunchy PostgreSQL Operator extends Kubernetes to support the creation, configuration and management of PostgreSQL clusters at scale. When combined with the Crunchy PostgreSQL Container Suite, the Crunchy PostgreSQL Operator provides an open source software solution for PostgreSQL scaling, high-availability, disaster recovery, monitoring, and more.
The Crunchy PostgreSQL Operator 4.0.0 supports the Crunchy PostgreSQL Container Suite version 2.4.0+. Prior versions of the Crunchy PostgreSQL Container Suite are not supported by the Crunchy PostgreSQL Operator 4.0.0.
Key user facing features added to the Crunchy PostgreSQL Operator 4.0.0 include:
-- Support for deploying the Crunchy PostgreSQL Operator into it's own namespace,
-- Support for deploying PostgreSQL Clusters into multiple namespaces being watched by a single Crunchy PostgreSQL Operator
-- Support for the ability to perform pgbackrest backups to Amazon S3
-- Inclusion of Ansible installation playbooks for eased installation
-- Crunchy PostgreSQL Operator 4.0.0 supports the Operator Lifecycle Management (OLM) and will be made available the operatorhub.io catalog shortly.
-- Updates and enhancements to the Crunchy PostgreSQL Operator documentation
This release incorporates significant changes relative to the PostgreSQL Operator 3.5.x.
In particular, the changes to how namespaces are supported are material. For additional information, please see the Installation and Design documentation for details on how namespaces are supported and configured:
Instructions for upgrading from PostgreSQL Operator version 3.5.x to 4.0.0 can be found in the documentation here:
https://access.crunchydata.com/documentation/postgres-operator/4.0.0/upgrade/
The Crunchy PostgreSQL Operator 4.0.0 does not yet provide a helm chart based installation. Crunchy Data is evaluating inclusion of a helm chart for subsequent releases and welcomes feedback on the desirability of helm chart based installations.
Additional changes and features incorporated within Crunchy PostgreSQL Operator 4.0.0 include:
-- Revised RBAC rules to better support OLM
-- Revised default configuration to better support OLM
-- Configuration files under conf/postgres-operator/cluster/1 were moved to conf/postgres-operator
-- Namespaces were added to server side pgouser file to indicate to which namespaces a pgo user has access
-- A default deployment/install of the Operator was changed to better reflect how multiple namespaces are supported, see the Installation documentation for details
-- Removed the -n shorthand flag for the --no-prompt flag, -n is now the shorthand for the --namespace flag to better match kubectl flags
-- pgo.yaml - removed Pgo.LSPVCTemplate and Pgo.LoadTemplate settings, these have moved to the normal configuration location
-- Removed the volume pgo-config references within the deployment.json, this means that the various Operator containers do not mount the pgo-config ConfigMap directly any longer, instead it is looked for upon initialization internally, if found, it is used for Operator configuration as normal, if not found, the default baked-in version of configuration is used, this supports OLM and an easier more automatic means of deploying the Operator where a user just wants to test it out before doing significant configuration customization (e.g. OLM/Openshift console deployment)
-- pgo-apiserver TLS keys now detected at runtime and not mounted, if a pgo.tls Secret is not found, a self-signed TLS credential will be generated and the Secret created by the Operator
-- CRD group names has changed from client-go.k8s.io to crunchydata.com to be consistent with OLM standards and better identify PostgreSQL Operator resources
-- Environment variables were renamed to standardize using PGO as the prefix instead of some which were CO
-- Updated Deployment version from v1beta1 to v1
-- pgo show namespace command which shows the namespaces currently being watched by the operator and which ones are accessible from your pgo user account
-- Namespace command line flag for pgo commands to specify which namespace to inspect or create resources into, this flag value overrides the PGO_NAMESPACE environment variable if set by the pgo CLI user
-- pgo benchmark command lets you create and view pgbench reports default 'baked-in' configuration, see Design documentation for details
-- Default installer supports installing Operator multiple times on a single Kubernetes cluster
-- New pgo ls command, lets you list files inside the postgres container
-- pgbasebackup backup paths are now maintained in the pgbackup CRD for a given PG cluster, this allows users to view historical backup-paths using the pgo show backup command.
-- pgbasebackup was refactored to be more in line with pgbackrest and pgdump commands.
-- Additional validation added to backup-opts to ensure the options are valid with the type of backup being performed.
-- Added liveness and readiness probes to the Operator deployment example
-- Changed pgo CLI to look at PGOUSER environment variable first in order of searching for the credentials file
-- Removed the primary=true/false label as its redundant
-- Removed the pgpool and pgbouncer labels from the Postgres Pods, stored in the pgcluster CRD instead.
-- quickstart.sh script was removed
-- Removed the pgupgrade CRD, pgo show upgrade and pgo delete upgrade commands.
-- PGOUSERNAME and PGOUSERPASS environment variables support added for pgo CLI for use cases where storing username and password in a file is not possible or preferable
-- Changes to REST API including:
-- REST API change: /clusters/{name} GET changes to /showclusters POST
-- REST API change: /policies/{name} GET changes to /showpolices POST
-- REST API change: /pvc/{name} GET changes to /showpvc POST
-- REST API change: /deleteclusters/{name} GET changes to /deleteclusters POST
-- REST API change: /deletepolicies/{name} GET changes to /deletepolicies POST
-- REST API change: /clusters/test/{name} GET changes to /testclusters POST
-- Changes to pgo syntax including:
-- pgo show cluster all command syntax is changed to pgo show cluster --all
-- pgo show policy all command syntax is changed to pgo show policy --all
-- pgo show pvc all command syntax is changed to pgo show pvc --all
-- pgo delete cluster all command syntax is changed to pgo delete cluser --all
-- pgo delete policy all command syntax is changed to pgo delete policy --all
-- pgo test all command syntax is changed to pgo test --all
3.5.3
This release provides the following updates:
PostgreSQL minor version updates
pgBackrest version updated from 2.10 to 2.13
Bug fix for replicas not connecting back to the Primary after fail-over if both Primaries get started at the same time.
3.5.2
This is a bug fix release which addressed the following issues:
- bug fixes related to deleting clusters and their PVCs when a user selects --delete-data
- fixed a bug where xlog PVCs were being allocated for backrest enabled clusters, xlog PVCs are not used when backrest is enabled on a cluster
- fixed labels when displaying pgo show cluster
- fixed pgbouncer with backrest restore bug
- reduced privaleges required in the rbac.yaml
- fixed content-type returned in the REST API.
- fixed pgo show pvc errors on second call in GKE
#120 - Create Cluster: --pgbouncer using wrong user
#469 - make pgbouncer credential configurable
#536 - Returns success response but no cluster created
#571 - Hardcoded database, pgbouncer.ini
Documentation updates
Release 3.5.1
This was mostly a bug fix release and includes the following:
- added a SCALE permission to pgorole to secure the scale and scaledown API calls
- fixed a bug where the pgtask for autofail was not being recreated after an initial failover, this would cause the 2nd autofailover to not proceed
- fixed a bug in autofail toggling where if you created a cluster with autofail not set, then set autofail=true, the pgtask for autofail was not being created, so autofail would not work on that cluster
- fixed a bug in node affinity logic where replicas were not getting the correct node affinity rule applied when a user specifies --node-label when creating a cluster
- added a --ccp-image flag to pgo create command that lets you use an alternative container image, for example, you can specify --ccp-image=crunchy-postgres-gis to create a cluster using the PostGIS version of the postgres container image (new feature)
- TLS 1.1 made the minimum version
- added pgdump and pgrestore CLI commands (new feature)
- added --node-label flag to pgo restore command (new feature)
- this release is dependent on the pgbackrest version found in the Postgres container image, 2.3.1, pgbackrest requires versions to match between the Postgres container and the Operator containers, this version of pgbackrest is now 2.10
- fixed a bug where the restored cluster was using the default primary storage config instead of one used when the original primary was created when a user specifies the storage-config command flagj
- updated the Postgres version packages used within the Operator containers to match the most recent PG 11 version used in the crunchy-containers project
Release 3.5.0
#490 - failover label refactor - this change lets the failover work faster by not requiring a bounce of the PG pods within a PG cluster, see the documentation for details on this change and the impact on existing operator deployments
#481 - make replacing a replica as part of a fail-over a configurable setting in pgo.yaml and on the command line when creating a cluster
#494 - create a storage configuration setting specifically for xlog volumes, the setting is names XlogStorage within the pgo.yaml file.
#495 - support for label matching in storage configurations, this for example will let you specify different
PV types to match on to support multiple zones when using NFS.
#499 - create an autofail 'toggle', pgo update cluster --autofail=true|false is a new command that sets the autofail flag on the pgcluster CRD to enable or disable autofailover logic on a set of clusters.
#500 - fixed bug in pgbackrest restore job to accept PITR target time option, users will pass in --backup-opts="--type=time" --pitr-target="2018-12-12 14:45:58 EST" into the pgo restore command if they want to restore to a given point in time.
#506 - fixed a bug where the Postgres Port was not being able to be overrode when set in pgo.yaml
#521 - added pgbackrest shared repository architecture - with this change, a PG cluster that has pgbackrest enabled will cause a pgbackrest repository to be created as a Deployment configured to act as the pgbackrest repository for the whole Postgres cluster, this change only will work with crunchy containers version 2.3.0 and
is not backward compatible with prior crunchy container versions, see the Documentation Design section for
more details on how this integration is implemented
#505 - added an option to specify in pgo.yaml a new setting, PreferredFailoverNode, which is a selector that determines which nodes to use as 'preferred' when a fail over happens.
Notes on this version:
- server.crt and server.key are no longer included by default in the repo, instead these are generated when you run the install-rbac.sh script upon installation
- pgo-backrest-repo is a new container which holds the pgbackrest shared repository used when you deploy a PG cluster with --pgbackrest, keys are generated for pgbackrest repositories when you run install-rbac.sh upon Operator installation
- pgo-backrest-repo storage is configured via pgo.yaml setting BackrestStorage
- with this Operator version, the crunchy-postgres container image version 2.3.0 is required for pgbackrest integration within the Operator, you will need to upgrade to this latest version of crunchy-postgres for existing and all new PG clusters created by the Operator.
- documentation for the Operator was completely revised with this version
- pgo API keys are now generated when you run the install-rbac.sh script, before this release the server.key and server.crt keys were pre-generated and included into the github repository, running this script is only required
once or unless you want to re-generate the API keys - pgbackrest integration with this release requires sshd keys to be generated, these keys are generated when you run the install-rbac.sh script and only need to be run one time
Breaking changes were made this release, you will want to review these changes here:
https://crunchydata.github.io/postgres-operator/3.5.0/upgrade/
Release 3.4.0
NOTE: new pgbackrest functionality in the 3.4.0 release will only work with crunchy-containers >= v2.2.0,
users are encouraged to upgrade their crunchy-containers to version 2.2.0.
This release adds the following:
- #404 NodePort as a service type when specifying --service-type on the pgo command line or within the pgo.yaml
- #396 - password length flag added to pgo create user command
- #405 - backups CRD specifies secret name instead of password and username for backup jobs
- #392 - add ability to specify container resource limits for helper containers, pgpool, and pgbouncer containers via pgo.yaml settings
- #338 - integration with crunchy-schedule, a cron scheduler that lets you schedule backups, integrated within the pgo CLI, the crunchy-scheduler is also now created when deploying the postgres-operator in the deploy.sh script, NOTE for pgbackrest schedules you are required to run a manual pgbackrest backup prior to creating a schedule, this only applies to pgbackrest backups and this requirement will be removed in the 3.5 release.
- #425 - changed df command to report each Pod's pgdata PVC information, cleaned up CLI output
- implemented the beta version of pgbackrest integration. This new integration is not compatible with the prior pgbackrest integration and only works with crunchy-postgres v2.2.0 or greater. See the upgrade notes for more details.
- #341 - added --backup-opts support for passing pgbasebackup options when performing pgbasebackup backups
- #420 - added workflow ID concept to create cluster command, introduces 'pgo show workflow'
Release 3.3.0
This release includes the following:
- #317 - created new pgo scaledown verb to replace previous scale down command line usage
- #344 - fixed a bug where credential secrets were getting removed even if --delete-data was not specified by the user, this would cause an issue when users recreated a cluster with the same name as the prior cluster
- #268 - added missing configuration settings to the output of pgo show config
- #350 - pgbackrest volumes and data are now deleted when you run pgo delete cluster xxx --delete-data --delete-backups
- fixed a bug in pgbackrest restore where the wrong pvc name was being used causing restores not to work on block storage file systems
- #277 - add PrimaryNodeLabel and ReplicaNodeLabel fields to pgo.yaml, when set, these take effect for clusters and replicas being created, if not set, then normal behavior is used, users can still override these with command line flag (--node-label), by default they are not set in the sample pgo.yaml file.
- #262 #177 - add a command flag to backup to support pgbackrest command options like compression and incremental backups
- #349 - added error logic to pgo backup command when backrest backup is requested and when user adds a --storage-config flag which doesn't make sense with a backrest backup, also removed the prompt from the pgo CLI for doing backups.
- migrated to dep for golang dependency mgmt, removed godep
- #335 - cleaned up shorthand flag codes in pgo CLI, only a few common flags include shorthand syntax after this change
- #152 - pgo create pgpool mycluster command created to allow the addition of a pgpool to an existing cluster, likewise, pgo delete pgpool mycluster command is there to allow you to remove a pgpool
- #156 - add ability to reconfigure pgpool if a user credential changes for a managed user.
- #343 - added pgbouncer support, thanks @scrummyin 👍
- add pgo delete label command, removing this capability from pgo label command
Release 3.2.0
This release includes:
- removal of CCP_IMAGE_PREFIX and CO_IMAGE_PREFIX and CO_IMAGE_TAG environment variables from the deployment.yaml file and Helm chart equvalent, instead these values will be pulled from the pgo.yaml configuraiton file mounted by both the apiserver and operator containers, see the upgrade notes for details
- #162 - added the MatchLabels attribute to the storage configuration as an optional attribute in the pgo.yaml file, when specified, it will cause a label selector to be added to the PVC of form "name=mycluster"
- #186 - added a --ccp-image-tag command line flag to the pgo scale command which allows you to specify a specific postgres image tag to be used for the scaled replicas which can now be different than the primary image
- #188 - added the pgo reload command which will cause a pg_ctl reload command to be executed on a list of matching PG databases
- added ExternalIP for Services into the 'pgo show cluster' API response to support LoadBalancer service types
- #276 - added "--service-type" command flag for creating a cluster and for scaling it, this will let users override ClusterIP with LoadBalancer in this release. The service type can be globally set in the pgo.yaml file as well.
- #274 - documented upgrade requirement for upgrading clusters from 2.6 to 3.2 releases, applies to already created clusters.
- #284 - added 'pgo show user' command, this replaces the '--show-secrets' flag on the 'pgo show cluster' command, a new permission named SHOW_SECRETS_PERM was added. pgo roles need this permission in order to see user secrets with this change.
- #283 - added API fields to support pgo-ui and also improve the pgo CLI output.
- #290 - added pgo-version label to clusters to keep track of what pgo version was used to create a cluster
- #288 - added ready status check into the pgo test command to avoid hanging at the command line when a pod is not ready
- #271 - updated command documentation
- #203 - validate pgouser roles at startup time, apiserver will not start with invalid roles after this change
- #263 - add pgo.yaml global flag for autofail, when set, will apply auto failover checks on all created clusters
- #201 - added scale down ability to pgo scale command, with this command you can selectively delete replicas
- moved the MetricsFlag in the pgo.yaml to to the Cluster section instead of the Pgo section to be more consistent with the sections of the configuration file
- #272 - added pgbadger command line flag and pgo.yaml flag, when set, will cause a crunchy-pgbadger container sidecar to be added to the database pods.
- initial ALPHA pgbackrest integration, further work will be done to support pgbackrest in future versions of the Postgres Operator, this is a trial to get feedback, future releases will build upon this initial functionality, see the Design Docs and Command Docs for more details on how this integration works
- deprecate the storage types 'existing' and 'emptydir', these are no longer very useful and will be removed in the upcoming release. This will leave 'create' and 'dynamic' as the supported storage types.
- includes updated Postgres packages in the Operator containers that require Postgres
- added changes into the collect.json template for metrics collection to support crunchy-containers 2.1.0 which introduced a new version of pgmonitor, grafana (metrics). This change requires you to upgrade to the crunchy-collect 2.1.0 container.
- updated the configuration to use the crunchy container suite 2.1.0 release as the default images