[](https://goreportcard.com/report/github.com/CrunchyData/postgres-operator)
-# Run your own production-grade PostgreSQL-as-a-Service on Kubernetes!
+# Run Cloud Native PostgreSQL on Kubernetes with PGO: The Postgres Operator from Crunchy Data!
-The [Crunchy PostgreSQL Operator][documentation] automates and simplifies deploying and managing
-open source PostgreSQL clusters on Kubernetes and other Kubernetes-enabled Platforms by providing
-the essential features you need to keep your PostgreSQL clusters up and running, including:
+[PGO][documentation], the [Postgres Operator][documentation] developed by
+[Crunchy Data](https://crunchydata.com/) and included in [Crunchy PostgreSQL for Kubernetes](https://www.crunchydata.com/products/crunchy-postgresql-for-kubernetes/), automates and simplifies deploying and managing open source
+PostgreSQL clusters on Kubernetes.
-#### PostgreSQL Cluster [Provisioning][provisioning]
+Whether you need to get a simple Postgres cluster up and running, need to deploy
+a high availability, fault tolerant cluster in production, or are running your
+own database-as-a-service, the PostgreSQL Operator provides the essential
+features you need to keep your cloud native Postgres clusters healthy, including:
+
+#### Postgres Cluster [Provisioning][provisioning]
[Create, Scale, & Delete PostgreSQL clusters with ease][provisioning], while fully customizing your
Pods and PostgreSQL configuration!
@@ -33,7 +38,7 @@ Set how long you want your backups retained for. Works great with very large dat
#### TLS
Secure communication between your applications and data servers by [enabling TLS for your PostgreSQL servers][pgo-task-tls],
-including the ability to enforce that all of your connections to use TLS.
+including the ability to enforce all of your connections to use TLS.
#### [Monitoring][monitoring]
@@ -76,16 +81,22 @@ the S3 protocol. The PostgreSQL Operator can backup, restore, and create new clu
#### Multi-Namespace Support
-You can control how the PostgreSQL Operator leverages [Kubernetes Namespaces][k8s-namespaces] with several different deployment models:
+You can control how PGO, the Postgres Operator, leverages [Kubernetes Namespaces][k8s-namespaces] with several different deployment models:
-- Deploy the PostgreSQL Operator and all PostgreSQL clusters to the same namespace
-- Deploy the PostgreSQL Operator to one namespaces, and all PostgreSQL clusters to a different namespace
-- Deploy the PostgreSQL Operator to one namespace, and have your PostgreSQL clusters managed across multiple namespaces
-- Dynamically add and remove namespaces managed by the PostgreSQL Operator using the `pgo create namespace` and `pgo delete namespace` commands
+- Deploy PGO and all PostgreSQL clusters to the same namespace
+- Deploy PGO to one namespaces, and all PostgreSQL clusters to a different
+namespace
+- Deploy PGO to one namespace, and have your PostgreSQL clusters managed across
+multiple namespaces
+- Dynamically add and remove namespaces managed by the PostgreSQL Operator using
+the `pgo` client to run `pgo create namespace` and `pgo delete namespace`
#### Full Customizability
-The Crunchy PostgreSQL Operator makes it easy to get your own PostgreSQL-as-a-Service up and running on Kubernetes-enabled platforms, but we know that there are further customizations that you can make. As such, the Crunchy PostgreSQL Operator allows you to further customize your deployments, including:
+The Postgres Operator (PGO) makes it easy to get Postgres up and running on
+Kubernetes-enabled platforms, but we know that there are further customizations
+that you can make. As such, PGO allows you to further customize your
+deployments, including:
- Selecting different storage classes for your primary, replica, and backup storage
- Select your own container resources class for each PostgreSQL cluster deployment; differentiate between resources applied for primary and replica clusters!
@@ -94,7 +105,6 @@ The Crunchy PostgreSQL Operator makes it easy to get your own PostgreSQL-as-a-Se
- Bring your own trusted certificate authority (CA) for use with the Operator API server
- Override your PostgreSQL configuration for each cluster
-
[disaster-recovery]: https://access.crunchydata.com/documentation/postgres-operator/latest/architecture/disaster-recovery/
[disaster-recovery-s3]: https://access.crunchydata.com/documentation/postgres-operator/latest/architecture/disaster-recovery/#using-s3
[disaster-recovery-scheduling]: https://access.crunchydata.com/documentation/postgres-operator/latest/architecture/disaster-recovery/#scheduling-backups
@@ -117,51 +127,62 @@ The Crunchy PostgreSQL Operator makes it easy to get your own PostgreSQL-as-a-Se
## Deployment Requirements
-The PostgreSQL Operator is validated for deployment on Kubernetes, OpenShift, and VMware Enterprise PKS clusters. Some form of storage is required, NFS, hostPath, and Storage Classes are currently supported.
+PGO, the Postgres Operator, is validated for deployment on Kubernetes,
+OpenShift, GKE, Anthos, AKS, EKS, and VMware Tanzu clusters. PGO is cloud native
+and storage agnostic, working with a wide variety of storage classes, hostPath,
+and NFS.
-The PostgreSQL Operator includes various components that get deployed to your
-Kubernetes cluster as shown in the following diagram and detailed
-in the Design section of the documentation for the version you are running.
+PGO includes various components that get deployed to your Kubernetes cluster as
+shown in the following diagram and detailed in the Design section of the
+documentation for the version you are running.

-The PostgreSQL Operator is developed and tested on CentOS and RHEL linux platforms but is known to run on other Linux variants.
+PGO is developed and tested on CentOS and RHEL linux platforms but is known to
+run on other Linux variants.
### Supported Platforms
-The Crunchy PostgreSQL Operator is tested on the following Platforms:
+PGO, the Postgres Operator, is Kubernetes-native and maintains backwards
+compatibility to Kubernetes 1.11 and is tested is tested against the following
+platforms:
- Kubernetes 1.13+
- OpenShift 3.11+
- Google Kubernetes Engine (GKE), including Anthos
- Amazon EKS
-- VMware Enterprise PKS 1.3+
-
-### Storage
+- Microsoft AKS
+- VMware Tanzu
-The Crunchy PostgreSQL Operator is tested with a variety of different types of Kubernetes storage and Storage Classes, including:
+This list only includes the platforms that the Postgres Operator is specifically
+tested on as part of the release process: PGO works on other Kubernetes
+distributions as well.
-- Google Compute Engine persistent volumes
-- HostPath
-- NFS
-- Rook
-- StorageOS
+### Storage
-and more.
+PGO, the Postgres Operator, is tested with a variety of different types of
+Kubernetes storage and Storage Classes, as well as hostPath and NFS.
-We know there are a variety of different types of [Storage Classes](https://kubernetes.io/docs/concepts/storage/storage-classes/) available for Kubernetes and we do our best to test each one, but due to the breadth of this area we are unable to verify PostgreSQL Operator functionality in each one. With that said, the PostgreSQL Operator is designed to be storage class agnostic and has been demonstrated to work with additional Storage Classes.
+We know there are a variety of different types of [Storage Classes](https://kubernetes.io/docs/concepts/storage/storage-classes/)
+available for Kubernetes and we do our best to test each one, but due to the
+breadth of this area we are unable to verify Postgres Operator functionality in
+each one. With that said, the PostgreSQL Operator is designed to be storage
+class agnostic and has been demonstrated to work with additional Storage
+Classes.
## Installation
-### PostgreSQL Operator Installation
+### Postgres Operator (PGO) Installation
-The PostgreSQL Operator provides a few different methods for installation based on your use case.
+PGO provides a few different methods for installation methods to get up and
+running with cloud native Postgres.
-Based on your storage settings in your Kubernetes environment, you may be able to start as quickly as:
+Based on your storage settings in your Kubernetes environment, you may be able
+to start as quickly as:
```shell
kubectl create namespace pgo
-kubectl apply -f https://raw.githubusercontent.com/CrunchyData/postgres-operator/v4.5.0/installers/kubectl/postgres-operator.yml
+kubectl apply -f https://raw.githubusercontent.com/CrunchyData/postgres-operator/v4.5.9/installers/kubectl/postgres-operator.yml
```
Otherwise, we highly recommend following the instructions from our [Quickstart](https://access.crunchydata.com/documentation/postgres-operator/latest/quickstart/).
@@ -176,7 +197,7 @@ Installations methods include:
### `pgo` Client Installation
-If you have the PostgreSQL Operator installed in your environment, and are interested in installation of the client interface, please start here:
+If you have the Postgres Operator installed in your environment, and are interested in installation of the client interface, please start here:
- [pgo Client Install](https://access.crunchydata.com/documentation/postgres-operator/latest/installation/pgo-client/)
@@ -189,6 +210,7 @@ There is also a `pgo-client` container if you wish to deploy the client directly
- [PostgreSQL](https://www.postgresql.org)
- [PostgreSQL Contrib Modules](https://www.postgresql.org/docs/current/contrib.html)
- [PL/Python + PL/Python 3](https://www.postgresql.org/docs/current/plpython.html)
+ - [PL/Perl](https://www.postgresql.org/docs/current/plperl.html)
- [pgAudit](https://www.pgaudit.org/)
- [pgAudit Analyze](https://github.com/pgaudit/pgaudit_analyze)
- [pgnodemx](https://github.com/CrunchyData/pgnodemx)
@@ -222,16 +244,24 @@ Additional containers that are not directly integrated with the PostgreSQL Opera
For more information about which versions of the PostgreSQL Operator include which components, please visit the [compatibility](https://access.crunchydata.com/documentation/postgres-operator/latest/configuration/compatibility/) section of the documentation.
-## Using the PostgreSQL Operator
+## Using the PostgreSQL Operator (PGO)
+
+If you are new to PGO, you can follow along the [tutorial](https://access.crunchydata.com/documentation/postgres-operator/latest/tutorial/)
+to learn how to install the PostgreSQL Operator and how to use many of its
+features!
+
+- [PostgreSQL Operator Tutorial](https://access.crunchydata.com/documentation/postgres-operator/latest/tutorial/)
-If you have the PostgreSQL and Client Interface installed in your environment and are interested in guidance on the use of the Crunchy PostgreSQL Operator, please start here:
+If you have the PostgreSQL and client interface installed in your environment
+and are interested in guidance on the use of the Crunchy PostgreSQL Operator,
+please start here:
-- [PostgreSQL Operator Documentation](https://access.crunchydata.com/documentation/postgres-operator/)
+- [PostgreSQL Operator (PGO) Documentation](https://access.crunchydata.com/documentation/postgres-operator/)
- [`pgo` Client User Guide](https://access.crunchydata.com/documentation/postgres-operator/latest/pgo-client/)
## Contributing to the Project
-Want to contribute to the PostgreSQL Operator project? Great! We've put together
+Want to contribute to the PGO Project? Great! We've put together
as set of contributing guidelines that you can review here:
- [Contributing Guidelines](CONTRIBUTING.md)
@@ -264,7 +294,7 @@ For other information, please visit the [Support](https://access.crunchydata.com
## Documentation
For additional information regarding design, configuration and operation of the
-PostgreSQL Operator, pleases see the [Official Project Documentation][documentation].
+PostgreSQL Operator (PGO), please see the [Official Project Documentation][documentation].
If you are looking for the [nightly builds of the documentation](https://crunchydata.github.io/postgres-operator/latest/), you can view them at:
@@ -275,3 +305,18 @@ https://crunchydata.github.io/postgres-operator/latest/
## Past Versions
Documentation for previous releases can be found at the [Crunchy Data Access Portal](https://access.crunchydata.com/documentation/)
+
+## Releases
+
+When a PGO general availability (GA) release occurs, the container images are
+distributed on the following platforms in order:
+
+- [Crunchy Data Customer Portal](https://access.crunchydata.com/)
+- [Crunchy Data Developer Portal](https://www.crunchydata.com/developers)
+- [DockerHub](https://hub.docker.com/u/crunchydata)
+
+The image rollout can occur over the course of several days.
+
+To stay up-to-date on when releases are made available in the [Crunchy Data Developer Portal](https://www.crunchydata.com/developers), please sign up for the [Crunchy Data Developer Program Newsletter](https://www.crunchydata.com/developers/newsletter)
+
+The PGO Postgres Operator project source code is available subject to the [Apache 2.0 license](LICENSE.md) with the PGO logo and branding assets covered by [our trademark guidelines](docs/static/logos/TRADEMARKS.md).
diff --git a/apiserver.go b/apiserver.go
index 2c3858bb63..49ec61657a 100644
--- a/apiserver.go
+++ b/apiserver.go
@@ -1,7 +1,7 @@
package main
/*
- Copyright 2017 - 2020 Crunchy Data Solutions, Inc.
+ Copyright 2017 - 2022 Crunchy Data Solutions, Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
diff --git a/bin/crunchy-postgres-exporter/common_lib.sh b/bin/crunchy-postgres-exporter/common_lib.sh
index 283352062b..5dd828322c 100755
--- a/bin/crunchy-postgres-exporter/common_lib.sh
+++ b/bin/crunchy-postgres-exporter/common_lib.sh
@@ -1,6 +1,6 @@
#!/bin/bash
-# Copyright 2018 - 2020 Crunchy Data Solutions, Inc.
+# Copyright 2018 - 2022 Crunchy Data Solutions, Inc.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
diff --git a/bin/crunchy-postgres-exporter/start.sh b/bin/crunchy-postgres-exporter/start.sh
index f8e02e4094..b98bf56bdd 100755
--- a/bin/crunchy-postgres-exporter/start.sh
+++ b/bin/crunchy-postgres-exporter/start.sh
@@ -1,6 +1,6 @@
#!/bin/bash
-# Copyright 2017 - 2020 Crunchy Data Solutions, Inc.
+# Copyright 2017 - 2022 Crunchy Data Solutions, Inc.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
@@ -144,6 +144,12 @@ else
else
echo_err "Custom Query file queries_pg95.yml does not exist (it should).."
fi
+ if [[ -f ${CONFIG_DIR?}/queries_pg_stat_statements_pg95.yml ]]
+ then
+ cat ${CONFIG_DIR?}/queries_pg_stat_statements_pg95.yml >> /tmp/queries.yml
+ else
+ echo_warn "Custom Query file queries_pg_stat_statements_pg95.yml not loaded."
+ fi
elif (( ${VERSION?} >= 90600 )) && (( ${VERSION?} < 100000 ))
then
if [[ -f ${CONFIG_DIR?}/queries_pg96.yml ]]
@@ -152,6 +158,12 @@ else
else
echo_err "Custom Query file queries_pg96.yml does not exist (it should).."
fi
+ if [[ -f ${CONFIG_DIR?}/queries_pg_stat_statements_pg96.yml ]]
+ then
+ cat ${CONFIG_DIR?}/queries_pg_stat_statements_pg96.yml >> /tmp/queries.yml
+ else
+ echo_warn "Custom Query file queries_pg_stat_statements_pg96.yml not loaded."
+ fi
elif (( ${VERSION?} >= 100000 )) && (( ${VERSION?} < 110000 ))
then
if [[ -f ${CONFIG_DIR?}/queries_pg10.yml ]]
@@ -160,6 +172,12 @@ else
else
echo_err "Custom Query file queries_pg10.yml does not exist (it should).."
fi
+ if [[ -f ${CONFIG_DIR?}/queries_pg_stat_statements_pg10.yml ]]
+ then
+ cat ${CONFIG_DIR?}/queries_pg_stat_statements_pg10.yml >> /tmp/queries.yml
+ else
+ echo_warn "Custom Query file queries_pg_stat_statements_pg10.yml not loaded."
+ fi
elif (( ${VERSION?} >= 110000 )) && (( ${VERSION?} < 120000 ))
then
if [[ -f ${CONFIG_DIR?}/queries_pg11.yml ]]
@@ -168,6 +186,12 @@ else
else
echo_err "Custom Query file queries_pg11.yml does not exist (it should).."
fi
+ if [[ -f ${CONFIG_DIR?}/queries_pg_stat_statements_pg11.yml ]]
+ then
+ cat ${CONFIG_DIR?}/queries_pg_stat_statements_pg11.yml >> /tmp/queries.yml
+ else
+ echo_warn "Custom Query file queries_pg_stat_statements_pg11.yml not loaded."
+ fi
elif (( ${VERSION?} >= 120000 )) && (( ${VERSION?} < 130000 ))
then
if [[ -f ${CONFIG_DIR?}/queries_pg12.yml ]]
@@ -176,13 +200,25 @@ else
else
echo_err "Custom Query file queries_pg12.yml does not exist (it should).."
fi
+ if [[ -f ${CONFIG_DIR?}/queries_pg_stat_statements_pg12.yml ]]
+ then
+ cat ${CONFIG_DIR?}/queries_pg_stat_statements_pg12.yml >> /tmp/queries.yml
+ else
+ echo_warn "Custom Query file queries_pg_stat_statements_pg12.yml not loaded."
+ fi
elif (( ${VERSION?} >= 130000 ))
then
if [[ -f ${CONFIG_DIR?}/queries_pg13.yml ]]
then
cat ${CONFIG_DIR?}/queries_pg13.yml >> /tmp/queries.yml
else
- echo_err "Custom Query file queries_pg12.yml does not exist (it should).."
+ echo_err "Custom Query file queries_pg13.yml does not exist (it should).."
+ fi
+ if [[ -f ${CONFIG_DIR?}/queries_pg_stat_statements_pg13.yml ]]
+ then
+ cat ${CONFIG_DIR?}/queries_pg_stat_statements_pg13.yml >> /tmp/queries.yml
+ else
+ echo_warn "Custom Query file queries_pg_stat_statements_pg13.yml not loaded."
fi
else
echo_err "Unknown or unsupported version of PostgreSQL. Exiting.."
@@ -190,7 +226,7 @@ else
fi
fi
-sed -i "s/#PGBACKREST_INFO_THROTTLE_MINUTES#/${PGBACKREST_INFO_THROTTLE_MINUTES:-10}/g" /tmp/queries.yml
+sed -i -e "s/#PGBACKREST_INFO_THROTTLE_MINUTES#/${PGBACKREST_INFO_THROTTLE_MINUTES:-10}/g" -e "s/#PG_STAT_STATEMENTS_LIMIT#/${PG_STAT_STATEMENTS_LIMIT:-20}/g" /tmp/queries.yml
PG_OPTIONS="--extend.query-path=${QUERY_DIR?}/queries.yml --web.listen-address=:${POSTGRES_EXPORTER_PORT}"
diff --git a/bin/get-deps.sh b/bin/get-deps.sh
index a0fddd048e..fa199dca13 100755
--- a/bin/get-deps.sh
+++ b/bin/get-deps.sh
@@ -1,6 +1,6 @@
#!/bin/bash -e
-# Copyright 2017 - 2020 Crunchy Data Solutions, Inc.
+# Copyright 2017 - 2022 Crunchy Data Solutions, Inc.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
diff --git a/bin/get-pgmonitor.sh b/bin/get-pgmonitor.sh
index 6bfb720b3e..5bf97d1475 100755
--- a/bin/get-pgmonitor.sh
+++ b/bin/get-pgmonitor.sh
@@ -1,6 +1,6 @@
#!/bin/bash -e
-# Copyright 2017 - 2020 Crunchy Data Solutions, Inc.
+# Copyright 2017 - 2022 Crunchy Data Solutions, Inc.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
@@ -14,7 +14,7 @@
# limitations under the License.
echo "Getting pgMonitor..."
-PGMONITOR_COMMIT='v4.4-RC6'
+PGMONITOR_COMMIT='4.4-1'
# pgMonitor Setup
if [[ -d ${PGOROOT?}/tools/pgmonitor ]]
diff --git a/bin/license_aggregator.sh b/bin/license_aggregator.sh
new file mode 100755
index 0000000000..0405891d38
--- /dev/null
+++ b/bin/license_aggregator.sh
@@ -0,0 +1,39 @@
+#!/bin/bash
+
+# Copyright 2021 - 2022 Crunchy Data Solutions, Inc.
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Inputs / outputs
+SCAN_DIR=${PGOROOT:-~/go/src/github.com/crunchydata/postgres-operator}/vendor
+OUT_DIR=licenses
+
+# Fail on error
+set -e
+
+# Clean up before we start our work
+rm -rf $OUT_DIR/*/
+
+# Get any file in the vendor directory with the word "license" in it. Note that we'll also keep its path
+myLicenses=$(find $SCAN_DIR -type f | grep -i license)
+for licensefile in $myLicenses
+do
+ # make a new license directory matching the same vendor structure
+ licensedir=$(dirname $licensefile)
+ newlicensedir=$(echo $licensedir | sed "s:$SCAN_DIR:$OUT_DIR:" | sed 's:@[0-9a-zA-Z.\\-]*/:/:' | sed 's:@[0-9a-zA-Z.\\-]*::')
+ mkdir -p $newlicensedir
+ # And, copy over the license
+ cp -f $licensefile $newlicensedir
+done
+
+sudo chmod -R 755 licenses
+sudo chmod 0644 licenses/LICENSE.txt
diff --git a/bin/pgo-backrest-repo-sync/pgo-backrest-repo-sync.sh b/bin/pgo-backrest-repo-sync/pgo-backrest-repo-sync.sh
index 53e98e3a2e..2eabeedc6e 100644
--- a/bin/pgo-backrest-repo-sync/pgo-backrest-repo-sync.sh
+++ b/bin/pgo-backrest-repo-sync/pgo-backrest-repo-sync.sh
@@ -1,6 +1,6 @@
#!/bin/bash -x
-# Copyright 2019 - 2020 Crunchy Data Solutions, Inc.
+# Copyright 2019 - 2022 Crunchy Data Solutions, Inc.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
diff --git a/bin/pgo-backrest-repo/pgo-backrest-repo.sh b/bin/pgo-backrest-repo/pgo-backrest-repo.sh
index 25fdec5f69..c470a68210 100755
--- a/bin/pgo-backrest-repo/pgo-backrest-repo.sh
+++ b/bin/pgo-backrest-repo/pgo-backrest-repo.sh
@@ -1,6 +1,6 @@
#!/bin/bash
-# Copyright 2019 - 2020 Crunchy Data Solutions, Inc.
+# Copyright 2019 - 2022 Crunchy Data Solutions, Inc.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
diff --git a/bin/pgo-backrest-restore/pgo-backrest-restore.sh b/bin/pgo-backrest-restore/pgo-backrest-restore.sh
index 89f3888fff..8d250ea842 100755
--- a/bin/pgo-backrest-restore/pgo-backrest-restore.sh
+++ b/bin/pgo-backrest-restore/pgo-backrest-restore.sh
@@ -1,6 +1,6 @@
#!/bin/bash -x
-# Copyright 2019 - 2020 Crunchy Data Solutions, Inc.
+# Copyright 2019 - 2022 Crunchy Data Solutions, Inc.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
diff --git a/bin/pgo-backrest/pgo-backrest.sh b/bin/pgo-backrest/pgo-backrest.sh
index fda20af57c..f87aadf4df 100755
--- a/bin/pgo-backrest/pgo-backrest.sh
+++ b/bin/pgo-backrest/pgo-backrest.sh
@@ -1,6 +1,6 @@
#!/bin/sh
-# Copyright 2018 - 2020 Crunchy Data Solutions, Inc.
+# Copyright 2018 - 2022 Crunchy Data Solutions, Inc.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
diff --git a/bin/pgo-event/pgo-event.sh b/bin/pgo-event/pgo-event.sh
index cddcb2e708..7e16d5f3f1 100755
--- a/bin/pgo-event/pgo-event.sh
+++ b/bin/pgo-event/pgo-event.sh
@@ -1,6 +1,6 @@
#!/bin/bash -x
-# Copyright 2019 - 2020 Crunchy Data Solutions, Inc.
+# Copyright 2019 - 2022 Crunchy Data Solutions, Inc.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
diff --git a/bin/pgo-rmdata/start.sh b/bin/pgo-rmdata/start.sh
index 95a4903289..bf9dd9f9c2 100755
--- a/bin/pgo-rmdata/start.sh
+++ b/bin/pgo-rmdata/start.sh
@@ -1,6 +1,6 @@
#!/bin/bash -x
-# Copyright 2018 - 2020 Crunchy Data Solutions, Inc.
+# Copyright 2018 - 2022 Crunchy Data Solutions, Inc.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
diff --git a/bin/pgo-scheduler/start.sh b/bin/pgo-scheduler/start.sh
index 4a32cf8bc3..758a25bbd3 100755
--- a/bin/pgo-scheduler/start.sh
+++ b/bin/pgo-scheduler/start.sh
@@ -1,6 +1,6 @@
#!/bin/bash
-# Copyright 2019 - 2020 Crunchy Data Solutions, Inc.
+# Copyright 2019 - 2022 Crunchy Data Solutions, Inc.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
diff --git a/bin/pgo-sqlrunner/start.sh b/bin/pgo-sqlrunner/start.sh
index 0b2eb6d417..8a272855f1 100755
--- a/bin/pgo-sqlrunner/start.sh
+++ b/bin/pgo-sqlrunner/start.sh
@@ -1,6 +1,6 @@
#!/bin/bash
-# Copyright 2019 - 2020 Crunchy Data Solutions, Inc.
+# Copyright 2019 - 2022 Crunchy Data Solutions, Inc.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
diff --git a/bin/pre-pull-crunchy-containers.sh b/bin/pre-pull-crunchy-containers.sh
index 5a7031f8e9..2726b2e02d 100755
--- a/bin/pre-pull-crunchy-containers.sh
+++ b/bin/pre-pull-crunchy-containers.sh
@@ -1,6 +1,6 @@
#!/bin/bash
-# Copyright 2018 - 2020 Crunchy Data Solutions, Inc.
+# Copyright 2018 - 2022 Crunchy Data Solutions, Inc.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
diff --git a/bin/pull-from-gcr.sh b/bin/pull-from-gcr.sh
index ad25336aab..e747b434c2 100755
--- a/bin/pull-from-gcr.sh
+++ b/bin/pull-from-gcr.sh
@@ -1,6 +1,6 @@
#!/bin/bash
-# Copyright 2018 - 2020 Crunchy Data Solutions, Inc.
+# Copyright 2018 - 2022 Crunchy Data Solutions, Inc.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
diff --git a/bin/push-ccp-to-gcr.sh b/bin/push-ccp-to-gcr.sh
index 3b9de84ed0..2c6123a0c2 100755
--- a/bin/push-ccp-to-gcr.sh
+++ b/bin/push-ccp-to-gcr.sh
@@ -1,6 +1,6 @@
#!/bin/bash
-# Copyright 2019 - 2020 Crunchy Data Solutions, Inc.
+# Copyright 2019 - 2022 Crunchy Data Solutions, Inc.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
@@ -16,7 +16,7 @@
GCR_IMAGE_PREFIX=gcr.io/crunchy-dev-test
CCP_IMAGE_PREFIX=crunchydata
-CCP_IMAGE_TAG=centos7-12.4-4.5.0
+CCP_IMAGE_TAG=ubi8-12.13-4.5.9
IMAGES=(
crunchy-prometheus
diff --git a/bin/push-to-gcr.sh b/bin/push-to-gcr.sh
index f8293d9159..931511bdd7 100755
--- a/bin/push-to-gcr.sh
+++ b/bin/push-to-gcr.sh
@@ -1,6 +1,6 @@
#!/bin/bash
-# Copyright 2018 - 2020 Crunchy Data Solutions, Inc.
+# Copyright 2018 - 2022 Crunchy Data Solutions, Inc.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
diff --git a/bin/uid_daemon.sh b/bin/uid_daemon.sh
index 83d8aca5e2..58f8fd7505 100755
--- a/bin/uid_daemon.sh
+++ b/bin/uid_daemon.sh
@@ -1,6 +1,6 @@
#!/usr/bin/bash
-# Copyright 2020 Crunchy Data Solutions, Inc.
+# Copyright 2020 - 2022 Crunchy Data Solutions, Inc.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
diff --git a/bin/upgrade-secret.sh b/bin/upgrade-secret.sh
index ee93af1377..b52b751727 100755
--- a/bin/upgrade-secret.sh
+++ b/bin/upgrade-secret.sh
@@ -1,6 +1,6 @@
#!/bin/bash
-# Copyright 2018 - 2020 Crunchy Data Solutions, Inc.
+# Copyright 2018 - 2022 Crunchy Data Solutions, Inc.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
diff --git a/build/pgo-apiserver/Dockerfile b/build/pgo-apiserver/Dockerfile
index a2ec3c3b3a..505ea1b4a9 100644
--- a/build/pgo-apiserver/Dockerfile
+++ b/build/pgo-apiserver/Dockerfile
@@ -5,6 +5,10 @@ ARG PGVERSION
ARG BACKREST_VERSION
FROM ${PREFIX}/pgo-base:${BASEOS}-${BASEVER}
+ARG BASEOS
+ARG PACKAGER
+ARG PGVERSION
+
LABEL name="pgo-apiserver" \
summary="Crunchy PostgreSQL Operator - Apiserver" \
description="Crunchy PostgreSQL Operator - Apiserver"
diff --git a/build/pgo-base/Dockerfile b/build/pgo-base/Dockerfile
index e9a80bea5c..d852c3855b 100644
--- a/build/pgo-base/Dockerfile
+++ b/build/pgo-base/Dockerfile
@@ -21,7 +21,6 @@ LABEL vendor="Crunchy Data" \
io.openshift.tags="postgresql,postgres,sql,nosql,crunchy" \
io.k8s.description="Trusted open source PostgreSQL-as-a-Service"
-COPY redhat/licenses /licenses
COPY redhat/atomic/help.1 /help.1
COPY redhat/atomic/help.md /help.md
COPY licenses /licenses
diff --git a/build/pgo-deployer/Dockerfile b/build/pgo-deployer/Dockerfile
index c2000eaa87..5cddb35651 100644
--- a/build/pgo-deployer/Dockerfile
+++ b/build/pgo-deployer/Dockerfile
@@ -4,7 +4,6 @@ ARG PREFIX
FROM ${PREFIX}/pgo-base:${BASEOS}-${BASEVER}
ARG BASEOS
-ARG ANSIBLE_VERSION
ARG PACKAGER
ARG DFSET
@@ -18,11 +17,10 @@ RUN if [ "$DFSET" = "centos" ] ; then \
${PACKAGER} install -y epel-release \
&& ${PACKAGER} -y install \
--setopt=skip_missing_names_on_install=False \
- kubectl \
- ansible-${ANSIBLE_VERSION} \
+ kubectl-1.24* \
+ ansible \
which \
gettext \
- openssl \
&& ${PACKAGER} -y clean all ; \
fi
@@ -33,10 +31,9 @@ RUN if [ "$BASEOS" = "rhel7" ] ; then \
--setopt=skip_missing_names_on_install=False \
--enablerepo='rhel-7-server-ose-4.4-rpms' \
openshift-clients \
- ansible-${ANSIBLE_VERSION} \
+ ansible \
which \
gettext \
- openssl \
&& ${PACKAGER} -y clean all --enablerepo='rhel-7-server-ose-4.4-rpms' ; \
fi
@@ -47,10 +44,9 @@ RUN if [ "$BASEOS" = "ubi7" ] ; then \
--setopt=skip_missing_names_on_install=False \
--enablerepo='rhel-7-server-ose-4.4-rpms' \
openshift-clients \
- ansible-${ANSIBLE_VERSION} \
+ ansible \
which \
gettext \
- openssl \
&& ${PACKAGER} -y clean all --enablerepo='rhel-7-server-ose-4.4-rpms' ; \
fi
@@ -61,15 +57,16 @@ RUN if [ "$BASEOS" = "ubi8" ] ; then \
--setopt=skip_missing_names_on_install=False \
--enablerepo='rhocp-4.5-for-rhel-8-x86_64-rpms' \
openshift-clients \
- ansible-${ANSIBLE_VERSION} \
+ ansible \
which \
gettext \
- openssl \
+ python39-jmespath \
&& ${PACKAGER} -y clean all --enablerepo='rhocp-4.5-for-rhel-8-x86_64-rpms' ; \
fi
COPY installers/ansible /ansible/postgres-operator
COPY installers/metrics/ansible /ansible/metrics
+ADD tools/pgmonitor /tmp/.pgo/metrics/pgmonitor
COPY installers/image/bin/pgo-deploy.sh /pgo-deploy.sh
COPY bin/uid_daemon.sh /uid_daemon.sh
@@ -78,6 +75,7 @@ ENV HOME="/tmp"
RUN chmod g=u /etc/passwd
RUN chmod g=u /uid_daemon.sh
+RUN chown -R 2:2 /tmp/.pgo
ENTRYPOINT ["/uid_daemon.sh"]
diff --git a/build/pgo-scheduler/Dockerfile b/build/pgo-scheduler/Dockerfile
index 49e3700e4e..ab1788a2ff 100644
--- a/build/pgo-scheduler/Dockerfile
+++ b/build/pgo-scheduler/Dockerfile
@@ -3,6 +3,7 @@ ARG BASEVER
ARG PREFIX
FROM ${PREFIX}/pgo-base:${BASEOS}-${BASEVER}
+ARG BASEOS
ARG PGVERSION
ARG BACKREST_VERSION
ARG PACKAGER
@@ -30,6 +31,13 @@ RUN if [ "$DFSET" = "rhel" ] ; then \
&& chown -R 2:2 /opt/cpm /pgo-config ; \
fi
+RUN if [ "$BASEOS" = "ubi8" ]; then \
+ ${PACKAGER} -y install \
+ findutils \
+ procps \
+ && ${PACKAGER} -y clean all ; \
+fi
+
ADD bin/pgo-scheduler /opt/cpm/bin
ADD installers/ansible/roles/pgo-operator/files/pgo-configs /default-pgo-config
ADD conf/postgres-operator/pgo.yaml /default-pgo-config/pgo.yaml
diff --git a/build/postgres-operator/Dockerfile b/build/postgres-operator/Dockerfile
index d88621d73f..dd9895987e 100644
--- a/build/postgres-operator/Dockerfile
+++ b/build/postgres-operator/Dockerfile
@@ -28,6 +28,7 @@ RUN if [ "$DFSET" = "rhel" ] ; then \
fi
ADD bin/postgres-operator /usr/local/bin
+ADD installers/ansible/roles/pgo-operator/files/pgo-backrest-repo /default-pgo-backrest-repo
ADD installers/ansible/roles/pgo-operator/files/pgo-configs /default-pgo-config
ADD conf/postgres-operator/pgo.yaml /default-pgo-config/pgo.yaml
diff --git a/conf/postgres-operator/pgo.yaml b/conf/postgres-operator/pgo.yaml
index ff5c97ec7f..040bb5e8bf 100644
--- a/conf/postgres-operator/pgo.yaml
+++ b/conf/postgres-operator/pgo.yaml
@@ -2,7 +2,7 @@ Cluster:
CCPImagePrefix: registry.developers.crunchydata.com/crunchydata
Metrics: false
Badger: false
- CCPImageTag: centos7-12.4-4.5.0
+ CCPImageTag: ubi8-12.13-4.5.9
Port: 5432
PGBadgerPort: 10000
ExporterPort: 9187
@@ -82,4 +82,4 @@ Storage:
Pgo:
Audit: false
PGOImagePrefix: registry.developers.crunchydata.com/crunchydata
- PGOImageTag: centos7-4.5.0
+ PGOImageTag: ubi8-4.5.9
diff --git a/crunchy_logo.png b/crunchy_logo.png
deleted file mode 100644
index 2fbf3352c1..0000000000
Binary files a/crunchy_logo.png and /dev/null differ
diff --git a/deploy/add-targeted-namespace-reconcile-rbac.sh b/deploy/add-targeted-namespace-reconcile-rbac.sh
index 8438c10912..66eddb96a0 100755
--- a/deploy/add-targeted-namespace-reconcile-rbac.sh
+++ b/deploy/add-targeted-namespace-reconcile-rbac.sh
@@ -1,6 +1,6 @@
#!/bin/bash
-# Copyright 2020 Crunchy Data Solutions, Inc.
+# Copyright 2020 - 2022 Crunchy Data Solutions, Inc.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
diff --git a/deploy/add-targeted-namespace.sh b/deploy/add-targeted-namespace.sh
index af088314d9..9d9b0e58d2 100755
--- a/deploy/add-targeted-namespace.sh
+++ b/deploy/add-targeted-namespace.sh
@@ -1,6 +1,6 @@
#!/bin/bash
-# Copyright 2019 - 2020 Crunchy Data Solutions, Inc.
+# Copyright 2019 - 2022 Crunchy Data Solutions, Inc.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
diff --git a/deploy/cleannamespaces.sh b/deploy/cleannamespaces.sh
index 66cd693863..3ad11e8766 100755
--- a/deploy/cleannamespaces.sh
+++ b/deploy/cleannamespaces.sh
@@ -1,6 +1,6 @@
#!/bin/bash
-# Copyright 2019 - 2020 Crunchy Data Solutions, Inc.
+# Copyright 2019 - 2022 Crunchy Data Solutions, Inc.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
diff --git a/deploy/cleanup-rbac.sh b/deploy/cleanup-rbac.sh
index 50f52bbc5f..61e07e13b4 100755
--- a/deploy/cleanup-rbac.sh
+++ b/deploy/cleanup-rbac.sh
@@ -1,6 +1,6 @@
#!/bin/bash
-# Copyright 2018 - 2020 Crunchy Data Solutions, Inc.
+# Copyright 2018 - 2022 Crunchy Data Solutions, Inc.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
diff --git a/deploy/cleanup.sh b/deploy/cleanup.sh
index afe13f98c7..0068cb0fd7 100755
--- a/deploy/cleanup.sh
+++ b/deploy/cleanup.sh
@@ -1,5 +1,5 @@
#!/bin/bash
-# Copyright 2017 - 2020 Crunchy Data Solutions, Inc.
+# Copyright 2017 - 2022 Crunchy Data Solutions, Inc.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
diff --git a/deploy/cluster-role-bindings.yaml b/deploy/cluster-role-bindings.yaml
index be7d75bb2f..1f6f9a2b35 100644
--- a/deploy/cluster-role-bindings.yaml
+++ b/deploy/cluster-role-bindings.yaml
@@ -3,6 +3,8 @@ apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: pgo-cluster-role
+ labels:
+ vendor: crunchydata
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
diff --git a/deploy/cluster-roles-readonly.yaml b/deploy/cluster-roles-readonly.yaml
index 773e6cd07e..900e83d434 100644
--- a/deploy/cluster-roles-readonly.yaml
+++ b/deploy/cluster-roles-readonly.yaml
@@ -2,6 +2,8 @@ kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: pgo-cluster-role
+ labels:
+ vendor: crunchydata
rules:
- apiGroups:
- ''
diff --git a/deploy/cluster-roles.yaml b/deploy/cluster-roles.yaml
index cb0bb85b41..e2a90137c4 100644
--- a/deploy/cluster-roles.yaml
+++ b/deploy/cluster-roles.yaml
@@ -3,6 +3,8 @@ kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: pgo-cluster-role
+ labels:
+ vendor: crunchydata
rules:
- apiGroups:
- ''
@@ -41,8 +43,6 @@ rules:
- endpoints
- pods
- pods/exec
- - pods/log
- - replicasets
- secrets
- services
- persistentvolumeclaims
@@ -55,10 +55,19 @@ rules:
- update
- delete
- deletecollection
+ - apiGroups:
+ - ''
+ resources:
+ - pods/log
+ verbs:
+ - get
+ - list
+ - watch
- apiGroups:
- apps
resources:
- deployments
+ - replicasets
verbs:
- get
- list
diff --git a/deploy/deploy.sh b/deploy/deploy.sh
index 823671c7d9..e2abc5c25c 100755
--- a/deploy/deploy.sh
+++ b/deploy/deploy.sh
@@ -1,5 +1,5 @@
#!/bin/bash
-# Copyright 2017 - 2020 Crunchy Data Solutions, Inc.
+# Copyright 2017 - 2022 Crunchy Data Solutions, Inc.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
@@ -46,12 +46,14 @@ fi
pgbackrest_aws_s3_key=$(awsKeySecret "aws-s3-key")
pgbackrest_aws_s3_key_secret=$(awsKeySecret "aws-s3-key-secret")
-$PGO_CMD --namespace=$PGO_OPERATOR_NAMESPACE create secret generic pgo-backrest-repo-config \
- --from-file=config=${PGO_CONF_DIR}/pgo-backrest-repo/config \
- --from-file=sshd_config=${PGO_CONF_DIR}/pgo-backrest-repo/sshd_config \
- --from-file=aws-s3-ca.crt=${PGO_CONF_DIR}/pgo-backrest-repo/aws-s3-ca.crt \
- --from-literal=aws-s3-key="${pgbackrest_aws_s3_key}" \
- --from-literal=aws-s3-key-secret="${pgbackrest_aws_s3_key_secret}"
+if [[ ! -z $pgbackrest_aws_s3_key ]] || [[ ! -z $pgbackrest_aws_s3_key_secret ]]
+then
+ $PGO_CMD --namespace=$PGO_OPERATOR_NAMESPACE create secret generic pgo-backrest-repo-config \
+ --from-literal=aws-s3-key="${pgbackrest_aws_s3_key}" \
+ --from-literal=aws-s3-key-secret="${pgbackrest_aws_s3_key_secret}"
+ $PGO_CMD --namespace=$PGO_OPERATOR_NAMESPACE label secret pgo-backrest-repo-config \
+ vendor=crunchydata
+fi
#
# credentials for pgo-apiserver TLS REST API
@@ -63,11 +65,12 @@ then
fi
$PGO_CMD --namespace=$PGO_OPERATOR_NAMESPACE create secret tls pgo.tls --key=${PGOROOT}/conf/postgres-operator/server.key --cert=${PGOROOT}/conf/postgres-operator/server.crt
+$PGO_CMD --namespace=$PGO_OPERATOR_NAMESPACE label secret pgo.tls vendor=crunchydata
$PGO_CMD --namespace=$PGO_OPERATOR_NAMESPACE create configmap pgo-config \
--from-file=${PGOROOT}/conf/postgres-operator/pgo.yaml \
--from-file=${PGO_CONF_DIR}/pgo-configs
-
+$PGO_CMD --namespace=$PGO_OPERATOR_NAMESPACE label configmap pgo-config vendor=crunchydata
#
# check if custom port value is set, otherwise set default values
diff --git a/deploy/gen-api-keys.sh b/deploy/gen-api-keys.sh
index 8aece10000..62b37982c0 100755
--- a/deploy/gen-api-keys.sh
+++ b/deploy/gen-api-keys.sh
@@ -1,6 +1,6 @@
#!/bin/bash
-# Copyright 2019 - 2020 Crunchy Data Solutions, Inc.
+# Copyright 2019 - 2022 Crunchy Data Solutions, Inc.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
diff --git a/deploy/install-bootstrap-creds.sh b/deploy/install-bootstrap-creds.sh
index 1b446824d3..28c249b42a 100755
--- a/deploy/install-bootstrap-creds.sh
+++ b/deploy/install-bootstrap-creds.sh
@@ -1,6 +1,6 @@
#!/bin/bash
-# Copyright 2019 - 2020 Crunchy Data Solutions, Inc.
+# Copyright 2019 - 2022 Crunchy Data Solutions, Inc.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
@@ -17,9 +17,9 @@ set -eu
# fill out these variables if you want to change the
# default pgo bootstrap user and role
-PGOADMIN_USERNAME=admin
-PGOADMIN_PASSWORD=examplepassword
-PGOADMIN_ROLENAME=pgoadmin
+PGOADMIN_USERNAME="${PGOADMIN_USERNAME:-admin}"
+PGOADMIN_PASSWORD="${PGOADMIN_PASSWORD:-examplepassword}"
+PGOADMIN_ROLENAME="${PGOADMIN_ROLENAME:-pgoadmin}"
PGOADMIN_PERMS="*"
diff --git a/deploy/install-rbac.sh b/deploy/install-rbac.sh
index d96532d9f1..9c1b900ca7 100755
--- a/deploy/install-rbac.sh
+++ b/deploy/install-rbac.sh
@@ -1,6 +1,6 @@
#!/bin/bash
-# Copyright 2018 - 2020 Crunchy Data Solutions, Inc.
+# Copyright 2018 - 2022 Crunchy Data Solutions, Inc.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
diff --git a/deploy/local-namespace-rbac.yaml b/deploy/local-namespace-rbac.yaml
index d74f947653..29277675c6 100644
--- a/deploy/local-namespace-rbac.yaml
+++ b/deploy/local-namespace-rbac.yaml
@@ -3,6 +3,8 @@ kind: Role
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: pgo-local-ns
+ labels:
+ vendor: crunchydata
rules:
- apiGroups:
- ''
@@ -28,6 +30,8 @@ apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: pgo-local-ns
+ labels:
+ vendor: crunchydata
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
@@ -41,6 +45,8 @@ apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: pgo-target-role-binding
+ labels:
+ vendor: crunchydata
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
diff --git a/deploy/remove-crd.sh b/deploy/remove-crd.sh
index 764645264f..3d2182c739 100755
--- a/deploy/remove-crd.sh
+++ b/deploy/remove-crd.sh
@@ -1,5 +1,5 @@
#!/bin/bash
-# Copyright 2017 - 2020 Crunchy Data Solutions, Inc.
+# Copyright 2017 - 2022 Crunchy Data Solutions, Inc.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
diff --git a/deploy/role-bindings.yaml b/deploy/role-bindings.yaml
index b8f21c2391..916858e8ed 100644
--- a/deploy/role-bindings.yaml
+++ b/deploy/role-bindings.yaml
@@ -4,6 +4,8 @@ kind: RoleBinding
metadata:
name: pgo-role
namespace: "$PGO_OPERATOR_NAMESPACE"
+ labels:
+ vendor: crunchydata
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
diff --git a/deploy/roles.yaml b/deploy/roles.yaml
index 899551f6a1..e800165f15 100644
--- a/deploy/roles.yaml
+++ b/deploy/roles.yaml
@@ -4,6 +4,8 @@ apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: pgo-role
namespace: "$PGO_OPERATOR_NAMESPACE"
+ labels:
+ vendor: crunchydata
rules:
- apiGroups:
- ''
diff --git a/deploy/service-accounts.yaml b/deploy/service-accounts.yaml
index f631c8e06b..d48909d647 100644
--- a/deploy/service-accounts.yaml
+++ b/deploy/service-accounts.yaml
@@ -4,3 +4,5 @@ kind: ServiceAccount
metadata:
name: postgres-operator
namespace: $PGO_OPERATOR_NAMESPACE
+ labels:
+ vendor: crunchydata
diff --git a/deploy/service.json b/deploy/service.json
index f026f5d7d5..97b76e4bc9 100644
--- a/deploy/service.json
+++ b/deploy/service.json
@@ -4,7 +4,8 @@
"metadata": {
"name": "postgres-operator",
"labels": {
- "name": "postgres-operator"
+ "name": "postgres-operator",
+ "vendor": "crunchydata"
}
},
"spec": {
diff --git a/deploy/setupnamespaces.sh b/deploy/setupnamespaces.sh
index 9d2188a56f..50f5e874a6 100755
--- a/deploy/setupnamespaces.sh
+++ b/deploy/setupnamespaces.sh
@@ -1,6 +1,6 @@
#!/bin/bash
-# Copyright 2019 - 2020 Crunchy Data Solutions, Inc.
+# Copyright 2019 - 2022 Crunchy Data Solutions, Inc.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
diff --git a/deploy/show-crd.sh b/deploy/show-crd.sh
index 7f40285c5d..6af0001e7c 100755
--- a/deploy/show-crd.sh
+++ b/deploy/show-crd.sh
@@ -1,5 +1,5 @@
#!/bin/bash
-# Copyright 2017 - 2020 Crunchy Data Solutions, Inc.
+# Copyright 2017 - 2022 Crunchy Data Solutions, Inc.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
diff --git a/deploy/upgrade-creds.sh b/deploy/upgrade-creds.sh
index ddc0953df7..1b1024202a 100755
--- a/deploy/upgrade-creds.sh
+++ b/deploy/upgrade-creds.sh
@@ -1,6 +1,6 @@
#!/bin/bash
-# Copyright 2019 - 2020 Crunchy Data Solutions, Inc.
+# Copyright 2019 - 2022 Crunchy Data Solutions, Inc.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
diff --git a/deploy/upgrade-pgo.sh b/deploy/upgrade-pgo.sh
index 66f61639eb..7f332c0340 100755
--- a/deploy/upgrade-pgo.sh
+++ b/deploy/upgrade-pgo.sh
@@ -1,6 +1,6 @@
#!/bin/bash
-# Copyright 2020 Crunchy Data Solutions, Inc.
+# Copyright 2020 - 2022 Crunchy Data Solutions, Inc.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
diff --git a/docs/config.toml b/docs/config.toml
index 48ef2d760d..9a64427568 100644
--- a/docs/config.toml
+++ b/docs/config.toml
@@ -2,7 +2,7 @@ baseURL= ""
languageCode = "en-us"
DefaultContentLanguage = "en"
-title = "Crunchy PostgreSQL Operator Documentation"
+title = "PGO: PostgreSQL Operator from Crunchy Data Documentation"
theme = "crunchy-hugo-theme"
pygmentsCodeFences = true
pygmentsStyle = "monokailight"
@@ -25,16 +25,14 @@ disableNavChevron = false # set true to hide next/prev chevron, default is false
highlightClientSide = false # set true to use highlight.pack.js instead of the default hugo chroma highlighter
menushortcutsnewtab = true # set true to open shortcuts links to a new tab/window
enableGitInfo = true
-operatorVersion = "4.5.0"
-postgresVersion = "12.4"
-postgresVersion13 = "13.0"
-postgresVersion12 = "12.4"
-postgresVersion11 = "11.9"
-postgresVersion10 = "10.14"
-postgresVersion96 = "9.6.19"
-postgresVersion95 = "9.5.23"
+operatorVersion = "4.5.9"
+postgresVersion = "13.9"
+postgresVersion13 = "13.9"
+postgresVersion12 = "12.13"
+postgresVersion11 = "11.18"
+postgresVersion10 = "10.23"
postgisVersion = "3.0"
-centosBase = "centos7"
+ubiBase = "ubi8"
[outputs]
home = [ "HTML", "RSS", "JSON"]
diff --git a/docs/content/Configuration/compatibility.md b/docs/content/Configuration/compatibility.md
index b805ef9c08..1780ebad7b 100644
--- a/docs/content/Configuration/compatibility.md
+++ b/docs/content/Configuration/compatibility.md
@@ -12,7 +12,60 @@ version dependencies between the two projects. Below are the operator releases a
| Operator Release | Container Release | Postgres | PgBackrest Version
|:----------|:-------------|:------------|:--------------
-| 4.5.0 | 4.5.0 | 12.4 | 2.29 |
+| 4.5.9 | 4.5.9 | 13.9 | 2.29 |
+|||12.13|2.29|
+|||11.18|2.29|
+|||10.23|2.29|
+||||
+| 4.5.8 | 4.5.8 | 13.8 | 2.29 |
+|||12.12|2.29|
+|||11.17|2.29|
+|||10.22|2.29|
+||||
+| 4.5.7 | 4.5.7 | 13.7 | 2.29 |
+|||12.11|2.29|
+|||11.16|2.29|
+|||10.21|2.29|
+||||
+| 4.5.6 | 4.5.6 | 13.6 | 2.29 |
+|||12.10|2.29|
+|||11.15|2.29|
+|||10.20|2.29|
+||||
+| 4.5.5 | 4.5.5 | 13.5 | 2.29 |
+|||12.9|2.29|
+|||11.14|2.29|
+|||10.19|2.29|
+|||9.6.24|2.29|
+||||
+| 4.5.4 | 4.5.4 | 13.4 | 2.29 |
+|||12.8|2.29|
+|||11.13|2.29|
+|||10.18|2.29|
+|||9.6.23|2.29|
+||||
+| 4.5.3 | 4.5.3 | 13.3 | 2.29 |
+|||12.7|2.29|
+|||11.12|2.29|
+|||10.17|2.29|
+|||9.6.22|2.29|
+||||
+| 4.5.2 | 4.5.2 | 13.2 | 2.29 |
+|||12.6|2.29|
+|||11.11|2.29|
+|||10.16|2.29|
+|||9.6.21|2.29|
+|||9.5.25|2.29|
+||||
+| 4.5.1 | 4.5.1 | 13.1 | 2.29 |
+|||12.5|2.29|
+|||11.10|2.29|
+|||10.15|2.29|
+|||9.6.20|2.29|
+|||9.5.24|2.29|
+||||
+| 4.5.0 | 4.5.0 | 13.0 | 2.29 |
+|||12.4|2.29|
|||11.9|2.29|
|||10.14|2.29|
|||9.6.19|2.29|
diff --git a/docs/content/Configuration/configuration.md b/docs/content/Configuration/configuration.md
index e85823a865..e6bae33be9 100644
--- a/docs/content/Configuration/configuration.md
+++ b/docs/content/Configuration/configuration.md
@@ -16,9 +16,9 @@ The configuration files used by the Operator are found in 2 places:
* the pgo-config ConfigMap in the namespace the Operator is running in
* or, a copy of the configuration files are also included by default into the Operator container images themselves to support a very simplistic deployment of the Operator
-If the pgo-config ConfigMap is not found by the Operator, it will use
-the configuration files that are included in the Operator container
-images.
+If the `pgo-config` ConfigMap is not found by the Operator, it will create a
+`pgo-config` ConfigMap using the configuration files that are included in the
+Operator container.
## conf/postgres-operator/pgo.yaml
The *pgo.yaml* file sets many different Operator configuration settings and is described in the [pgo.yaml configuration]({{< ref "pgo-yaml-configuration.md" >}}) documentation section.
diff --git a/docs/content/Configuration/pgo-yaml-configuration.md b/docs/content/Configuration/pgo-yaml-configuration.md
index c1b6a894e1..46f944e309 100644
--- a/docs/content/Configuration/pgo-yaml-configuration.md
+++ b/docs/content/Configuration/pgo-yaml-configuration.md
@@ -16,7 +16,7 @@ The *pgo.yaml* file is broken into major sections as described below:
|---|---|
|BasicAuth | If set to `"true"` will enable Basic Authentication. If set to `"false"`, will allow a valid Operator user to successfully authenticate regardless of the value of the password provided for Basic Authentication. Defaults to `"true".`
|CCPImagePrefix |newly created containers will be based on this image prefix (e.g. crunchydata), update this if you require a custom image prefix
-|CCPImageTag |newly created containers will be based on this image version (e.g. {{< param centosBase >}}-{{< param postgresVersion >}}-{{< param operatorVersion >}}), unless you override it using the --ccp-image-tag command line flag
+|CCPImageTag |newly created containers will be based on this image version (e.g. {{< param ubiBase >}}-{{< param postgresVersion >}}-{{< param operatorVersion >}}), unless you override it using the --ccp-image-tag command line flag
|Port | the PostgreSQL port to use for new containers (e.g. 5432)
|PGBadgerPort | the port used to connect to pgbadger (e.g. 10000)
|ExporterPort | the port used to connect to postgres exporter (e.g. 9187)
@@ -45,9 +45,9 @@ The *pgo.yaml* file is broken into major sections as described below:
| Setting|Definition |
|---|---|
|PrimaryStorage |required, the value of the storage configuration to use for the primary PostgreSQL deployment
-|BackupStorage |required, the value of the storage configuration to use for backups, including the storage for pgbackrest repo volumes
|ReplicaStorage |required, the value of the storage configuration to use for the replica PostgreSQL deployments
-|BackrestStorage |required, the value of the storage configuration to use for the pgbackrest shared repository deployment created when a user specifies pgbackrest to be enabled on a cluster
+|BackrestStorage |required, the value of the storage configuration to use for the pgBackRest repository.
+|BackupStorage |required, the value of the storage configuration to use for backups generated by `pg_dump`.
|WALStorage | optional, the value of the storage configuration to use for PostgreSQL Write Ahead Log
|StorageClass | optional, for a dynamic storage type, you can specify the storage class used for storage provisioning (e.g. standard, gold, fast)
|AccessMode |the access mode for new PVCs (e.g. ReadWriteMany, ReadWriteOnce, ReadOnlyMany). See below for descriptions of these.
diff --git a/docs/content/Security/configure-postgres-operator-rbac.md b/docs/content/Security/configure-postgres-operator-rbac.md
index de70e2b480..5e8b72f648 100644
--- a/docs/content/Security/configure-postgres-operator-rbac.md
+++ b/docs/content/Security/configure-postgres-operator-rbac.md
@@ -73,6 +73,7 @@ The following list shows the current complete list of possible pgo permissions t
|DfCluster | allow *pgo df*|
|Label | allow *pgo label*|
|Reload | allow *pgo reload*|
+|Restart | allow *pgo restart*|
|Restore | allow *pgo restore*|
|RestoreDump | allow *pgo restore* for pgdumps|
|ShowBackup | allow *pgo show backup*|
diff --git a/docs/content/Upgrade/automatedupgrade.md b/docs/content/Upgrade/automatedupgrade.md
index 31480bc07e..72184ced6a 100644
--- a/docs/content/Upgrade/automatedupgrade.md
+++ b/docs/content/Upgrade/automatedupgrade.md
@@ -127,7 +127,7 @@ pgo upgrade mycluster
If you are using the PostGIS-enabled image (i.e. `crunchy-postgres-gis-ha`) or any other custom images, you will need to add the `--ccp-image-tag`:
```
-pgo upgrade --ccp-image-tag={{< param centosBase >}}-{{< param postgresVersion >}}-{{< param postgisVersion >}}-{{< param operatorVersion >}} mygiscluster
+pgo upgrade --ccp-image-tag={{< param ubiBase >}}-{{< param postgresVersion >}}-{{< param postgisVersion >}}-{{< param operatorVersion >}} mygiscluster
```
Where `{{< param postgresVersion >}}` is the PostgreSQL version, `{{< param postgisVersion >}}` is the PostGIS version and `{{< param operatorVersion >}}` is the PostgreSQL Operator version.
Please note, no tag validation will be performed and additional steps may be required to upgrade your PostGIS extension implementation. For more information on PostGIS upgrade considerations, please see
diff --git a/docs/content/Upgrade/manual/upgrade35.md b/docs/content/Upgrade/manual/upgrade35.md
index cb7ec25138..261fbf6e89 100644
--- a/docs/content/Upgrade/manual/upgrade35.md
+++ b/docs/content/Upgrade/manual/upgrade35.md
@@ -17,7 +17,7 @@ A major change to this container is that the PostgreSQL process is now managed b
When creating your new clusters using version {{< param operatorVersion >}} of the PostgreSQL Operator, the `pgo create cluster` command will automatically use the new `crunchy-postgres-ha` image if the image is unspecified. If you are creating a PostGIS enabled cluster, please be sure to use the updated image name and image tag, as with the command:
```
-pgo create cluster mygiscluster --ccp-image=crunchy-postgres-gis-ha --ccp-image-tag={{< param centosBase >}}-{{< param postgresVersion >}}-{{< param postgisVersion >}}-{{< param operatorVersion >}}
+pgo create cluster mygiscluster --ccp-image=crunchy-postgres-gis-ha --ccp-image-tag={{< param ubiBase >}}-{{< param postgresVersion >}}-{{< param postgisVersion >}}-{{< param operatorVersion >}}
```
Where `{{< param postgresVersion >}}` is the PostgreSQL version, `{{< param postgisVersion >}}` is the PostGIS version and `{{< param operatorVersion >}}` is the PostgreSQL Operator version.
Please note, no tag validation will be performed and additional steps may be required to upgrade your PostGIS extension implementation. For more information on PostGIS upgrade considerations, please see
diff --git a/docs/content/Upgrade/manual/upgrade4.md b/docs/content/Upgrade/manual/upgrade4.md
index da11f86f15..0c2d34baba 100644
--- a/docs/content/Upgrade/manual/upgrade4.md
+++ b/docs/content/Upgrade/manual/upgrade4.md
@@ -19,7 +19,7 @@ A major change to this container is that the PostgreSQL process is now managed b
When creating your new clusters using version {{< param operatorVersion >}} of the PostgreSQL Operator, the `pgo create cluster` command will automatically use the new `crunchy-postgres-ha` image if the image is unspecified. If you are creating a PostGIS enabled cluster, please be sure to use the updated image name and image tag, as with the command:
```
-pgo create cluster mygiscluster --ccp-image=crunchy-postgres-gis-ha --ccp-image-tag={{< param centosBase >}}-{{< param postgresVersion >}}-{{< param postgisVersion >}}-{{< param operatorVersion >}}
+pgo create cluster mygiscluster --ccp-image=crunchy-postgres-gis-ha --ccp-image-tag={{< param ubiBase >}}-{{< param postgresVersion >}}-{{< param postgisVersion >}}-{{< param operatorVersion >}}
```
Where `{{< param postgresVersion >}}` is the PostgreSQL version, `{{< param postgisVersion >}}` is the PostGIS version and `{{< param operatorVersion >}}` is the PostgreSQL Operator version.
Please note, no tag validation will be performed and additional steps may be required to upgrade your PostGIS extension implementation. For more information on PostGIS upgrade considerations, please see
@@ -58,7 +58,7 @@ For example, given the following output:
```
$ pgo show cluster mycluster
-cluster : mycluster (crunchy-postgres:centos7-11.5-2.4.2)
+cluster : mycluster (crunchy-postgres:ubi8-11.5-2.4.2)
pod : mycluster-7bbf54d785-pk5dq (Running) on kubernetes1 (1/1) (replica)
pvc : mycluster
pod : mycluster-ypvq-5b9b8d645-nvlb6 (Running) on kubernetes1 (1/1) (primary)
@@ -223,7 +223,7 @@ For example, given the following output:
```
$ pgo show cluster mycluster
-cluster : mycluster (crunchy-postgres:centos7-11.5-2.4.2)
+cluster : mycluster (crunchy-postgres:centos8-11.5-2.4.2)
pod : mycluster-7bbf54d785-pk5dq (Running) on kubernetes1 (1/1) (replica)
pvc : mycluster
pod : mycluster-ypvq-5b9b8d645-nvlb6 (Running) on kubernetes1 (1/1) (primary)
diff --git a/docs/content/_index.md b/docs/content/_index.md
index f83a7c49e1..59564e4991 100644
--- a/docs/content/_index.md
+++ b/docs/content/_index.md
@@ -1,20 +1,30 @@
---
-title: "Crunchy PostgreSQL Operator"
+title: "PGO: The Postgres Operator from Crunchy Data"
date:
draft: false
---
-# Crunchy PostgreSQL Operator
+# PGO: The Postgres Operator from Crunchy Data
-
+
-## Run your own production-grade PostgreSQL-as-a-Service on Kubernetes!
+## Run [Cloud Native PostgreSQL on Kubernetes](https://www.crunchydata.com/products/crunchy-postgresql-for-kubernetes/) with PGO: The [Postgres Operator](https://github.com/CrunchyData/postgres-operator) from [Crunchy Data](https://www.crunchydata.com/)!
Latest Release: {{< param operatorVersion >}}
-The [Crunchy PostgreSQL Operator](https://www.crunchydata.com/developers/download-postgres/containers/postgres-operator) automates and simplifies deploying and managing open source PostgreSQL clusters on Kubernetes and other Kubernetes-enabled Platforms by providing the essential features you need to keep your PostgreSQL clusters up and running, including:
+[PGO](https://www.crunchydata.com/developers/download-postgres/containers/postgres-operator),
+the [Postgres Operator](https://github.com/CrunchyData/postgres-operator)
+developed by [Crunchy Data](https://crunchydata.com/) and included in
+[Crunchy PostgreSQL for Kubernetes](https://www.crunchydata.com/products/crunchy-postgresql-for-kubernetes/),
+automates and simplifies deploying and managing open source PostgreSQL clusters
+on Kubernetes.
-#### PostgreSQL Cluster [Provisioning]({{< relref "/architecture/provisioning.md" >}})
+Whether you need to get a simple Postgres cluster up and running, need to deploy
+a high availability, fault tolerant cluster in production, or are running your
+own database-as-a-service, the PostgreSQL Operator provides the essential
+features you need to keep your cloud native Postgres clusters healthy, including:
+
+#### Postgres Cluster [Provisioning]({{< relref "/architecture/provisioning.md" >}})
[Create, Scale, & Delete PostgreSQL clusters with ease](/architecture/provisioning/), while fully customizing your Pods and PostgreSQL configuration!
@@ -30,7 +40,7 @@ Backups and restores leverage the open source [pgBackRest](https://www.pgbackres
#### TLS
-Secure communication between your applications and data servers by [enabling TLS for your PostgreSQL servers](/pgo-client/common-tasks/#enable-tls), including the ability to enforce that all of your connections to use TLS.
+Secure communication between your applications and data servers by [enabling TLS for your PostgreSQL servers](/pgo-client/common-tasks/#enable-tls), including the ability to enforce all of your connections to use TLS.
#### [Monitoring]({{< relref "/architecture/monitoring.md" >}})
@@ -72,16 +82,22 @@ Choose the type of backup (full, incremental, differential) and [how frequently
#### Multi-Namespace Support
-You can control how the PostgreSQL Operator leverages [Kubernetes Namespaces](https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/) with several different deployment models:
+You can control how PGO, the Postgres Operator, leverages [Kubernetes Namespaces](https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/) with several different deployment models:
-- Deploy the PostgreSQL Operator and all PostgreSQL clusters to the same namespace
-- Deploy the PostgreSQL Operator to one namespaces, and all PostgreSQL clusters to a different namespace
-- Deploy the PostgreSQL Operator to one namespace, and have your PostgreSQL clusters managed acrossed multiple namespaces
-- Dynamically add and remove namespaces managed by the PostgreSQL Operator using the `pgo create namespace` and `pgo delete namespace` commands
+- Deploy PGO and all PostgreSQL clusters to the same namespace
+- Deploy PGO to one namespaces, and all PostgreSQL clusters to a different
+namespace
+- Deploy PGO to one namespace, and have your PostgreSQL clusters managed across
+multiple namespaces
+- Dynamically add and remove namespaces managed by the PostgreSQL Operator using
+the `pgo` client to run `pgo create namespace` and `pgo delete namespace`
#### Full Customizability
-The Crunchy PostgreSQL Operator makes it easy to get your own PostgreSQL-as-a-Service up and running on Kubernetes-enabled platforms, but we know that there are further customizations that you can make. As such, the Crunchy PostgreSQL Operator allows you to further customize your deployments, including:
+The Postgres Operator (PGO) makes it easy to get Postgres up and running on
+Kubernetes-enabled platforms, but we know that there are further customizations
+that you can make. As such, PGO allows you to further customize your
+deployments, including:
- Selecting different storage classes for your primary, replica, and backup storage
- Select your own container resources class for each PostgreSQL cluster deployment; differentiate between resources applied for primary and replica clusters!
@@ -104,6 +120,7 @@ The Crunchy PostgreSQL Operator extends Kubernetes to provide a higher-level abs
- [PostgreSQL](https://www.postgresql.org)
- [PostgreSQL Contrib Modules](https://www.postgresql.org/docs/current/contrib.html)
- [PL/Python + PL/Python 3](https://www.postgresql.org/docs/current/plpython.html)
+ - [PL/Perl](https://www.postgresql.org/docs/current/plperl.html)
- [pgAudit](https://www.pgaudit.org/)
- [pgAudit Analyze](https://github.com/pgaudit/pgaudit_analyze)
- [pgnodemx](https://github.com/CrunchyData/pgnodemx)
@@ -139,24 +156,31 @@ For more information about which versions of the PostgreSQL Operator include whi
# Supported Platforms
-The Crunchy PostgreSQL Operator is tested on the following Platforms:
+PGO, the Postgres Operator, is Kubernetes-native and maintains backwards
+compatibility to Kubernetes 1.11 and is tested is tested against the following
+platforms:
- Kubernetes 1.13+
- OpenShift 3.11+
- Google Kubernetes Engine (GKE), including Anthos
- Amazon EKS
-- VMware Enterprise PKS 1.3+
+- Microsoft AKS
+- VMware Tanzu
-## Storage
+This list only includes the platforms that the Postgres Operator is specifically
+tested on as part of the release process: PGO works on other Kubernetes
+distributions as well.
-The Crunchy PostgreSQL Operator is tested with a variety of different types of Kubernetes storage and Storage Classes, including:
+## Storage
-- Rook
-- StorageOS
-- Google Compute Engine persistent volumes
-- NFS
-- HostPath
+PGO, the Postgres Operator, is tested with a variety of different types of
+Kubernetes storage and Storage Classes, as well as hostPath and NFS.
-and more. We have had reports of people using the PostgreSQL Operator with other [Storage Classes](https://kubernetes.io/docs/concepts/storage/storage-classes/) as well.
+We know there are a variety of different types of [Storage Classes](https://kubernetes.io/docs/concepts/storage/storage-classes/)
+available for Kubernetes and we do our best to test each one, but due to the
+breadth of this area we are unable to verify Postgres Operator functionality in
+each one. With that said, the PostgreSQL Operator is designed to be storage
+class agnostic and has been demonstrated to work with additional Storage
+Classes.
-We know there are a variety of different types of [Storage Classes](https://kubernetes.io/docs/concepts/storage/storage-classes/) available for Kubernetes and we do our best to test each one, but due to the breadth of this area we are unable to verify PostgreSQL Operator functionality in each one. With that said, the PostgreSQL Operator is designed to be storage class agnostic and has been demonstrated to work with additional Storage Classes. Storage is a rapidly evolving field in Kubernetes and we will continue to adapt the PostgreSQL Operator to modern Kubernetes storage standards.
+The PGO Postgres Operator project source code is available subject to the [Apache 2.0 license](https://raw.githubusercontent.com/CrunchyData/postgres-operator/master/LICENSE.md) with the PGO logo and branding assets covered by [our trademark guidelines](/logos/TRADEMARKS.md).
diff --git a/docs/content/advanced/crunchy-postgres-exporter.md b/docs/content/advanced/crunchy-postgres-exporter.md
index b9b2a3ba09..f864a22b5a 100644
--- a/docs/content/advanced/crunchy-postgres-exporter.md
+++ b/docs/content/advanced/crunchy-postgres-exporter.md
@@ -23,9 +23,9 @@ can be specified for the API to collect. For an example of a queries.yml file, s
The crunchy-postgres-exporter Docker image contains the following packages (versions vary depending on PostgreSQL version):
-* PostgreSQL ({{< param postgresVersion13 >}}, {{< param postgresVersion12 >}}, {{< param postgresVersion11 >}}, {{< param postgresVersion10 >}}, {{< param postgresVersion96 >}} and {{< param postgresVersion95 >}})
-* CentOS7 - publicly available
-* UBI7 - customers only
+* PostgreSQL ({{< param postgresVersion13 >}}, {{< param postgresVersion12 >}}, {{< param postgresVersion11 >}}, and {{< param postgresVersion10 >}}
+* CentOS 7, UBI 8 - publicly available
+* UBI 7, 8 - customers only
* [PostgreSQL Exporter](https://github.com/wrouesnel/postgres_exporter)
## Environment Variables
diff --git a/docs/content/architecture/disaster-recovery.md b/docs/content/architecture/disaster-recovery.md
index deee66dcc5..7833661e07 100644
--- a/docs/content/architecture/disaster-recovery.md
+++ b/docs/content/architecture/disaster-recovery.md
@@ -196,7 +196,7 @@ to re-enable autofail if you would like your PostgreSQL cluster to be
highly-available. You can re-enable autofail with this command:
```shell
-pgo update cluster hacluster --autofail=true
+pgo update cluster hacluster --enable-autofail
```
## Scheduling Backups
diff --git a/docs/content/architecture/high-availability/_index.md b/docs/content/architecture/high-availability/_index.md
index c5f05eaf96..aa1908f3a5 100644
--- a/docs/content/architecture/high-availability/_index.md
+++ b/docs/content/architecture/high-availability/_index.md
@@ -219,6 +219,30 @@ number of nodes are available to support this configuration, certain deployments
will fail, since it will not be possible for Kubernetes to successfully schedule
the pods for each deployment.
+It is possible to fine tune the pod anti-affinity rules further, specifically,
+set different affinity rules for the PostgreSQL, pgBackRest, and pgBouncer
+Deployments. These can be handled by the following flags on [`pgo create cluster`]({{< relref "pgo-client/reference/pgo_create_cluster.md">}}):
+
+- `--pod-anti-affinity`: Sets the pod anti-affinity rules for all the managed
+Deployments in the cluster (PostgreSQL, pgBackRest, pgBouncer)
+- `--pod-anti-affinity-pgbackrest`: Sets the pod anti-affinity rules for _only_
+the pgBackRest Deployment. This takes precedence over the value of
+`--pod-anti-affinity`.
+- `--pod-anti-affinity-pgbouncer`: Sets the pod anti-affinity rules for _only_
+the pgBouncer Deployment. This takes precedence over the value of
+`--pod-anti-affinity`.
+
+For example, to use `required` pod anti-affinity between PostgreSQL instances
+but use only `preferred` anti-affinity for pgBackRest and pgBouncer, you could
+use the following command:
+
+```
+pgo create cluster hippo --replicas=2 --pgbouncer \
+ --pod-anti-affinity=required \
+ --pod-anti-affinity=preferred \
+ --pod-anti-afinity=preferred
+```
+
## Synchronous Replication: Guarding Against Transactions Loss
Clusters managed by the Crunchy PostgreSQL Operator can be deployed with
diff --git a/docs/content/architecture/high-availability/multi-cluster-kubernetes.md b/docs/content/architecture/high-availability/multi-cluster-kubernetes.md
index c6043adba4..1a507bbfb9 100644
--- a/docs/content/architecture/high-availability/multi-cluster-kubernetes.md
+++ b/docs/content/architecture/high-availability/multi-cluster-kubernetes.md
@@ -93,6 +93,14 @@ that matches that of the active cluster it is replicating.
- `--pgbackrest-s3-endpoint`: The S3 endpoint to use
- `--pgbackrest-s3-region`: The S3 region to use
+If you do not want to set the user credentials, you can retrieve them at a later
+time by using the [`pgo show user`]({{< relref "/pgo-client/reference/pgo_show_user.md" >}})
+command with the `--show-system-accounts` flag, e.g.
+
+```
+pgo show user --show-system-accounts hippo
+```
+
With respect to the credentials, it should be noted that when the standby
cluster is being created within the same Kubernetes cluster AND it has access to
the Kubernetes Secret created for the active cluster, one can use the
@@ -182,6 +190,9 @@ pgo create cluster hippo-standby --standby --pgbouncer --replica-count=2 \
--password=opensourcehippo
```
+(If you are unsure of your credentials, you can use
+`pgo show user hippo --show-system-accounts` to retrieve them).
+
Note the use of the `--pgbackrest-repo-path` flag as it points to the name of
the pgBackRest repository that is used for the original `hippo` cluster.
@@ -208,14 +219,14 @@ command.
```
pgo show cluster hippo
-cluster : standby (crunchy-postgres-ha:{{< param centosBase >}}-{{< param postgresVersion >}}-{{< param operatorVersion >}})
+cluster : standby (crunchy-postgres-ha:{{< param ubiBase >}}-{{< param postgresVersion >}}-{{< param operatorVersion >}})
standby : true
```
## Promoting a Standby Cluster
There comes a time where a standby cluster needs to be promoted to an active
cluster. Promoting a standby cluster means that a PostgreSQL instance within
-it will become a priary and start accepting both reads and writes. This has the
+it will become a primary and start accepting both reads and writes. This has the
net effect of pushing WAL (transaction archives) to the pgBackRest repository,
so we need to take a few steps first to ensure we don't accidentally create a
split-brain scenario.
diff --git a/docs/content/architecture/namespace.md b/docs/content/architecture/namespace.md
index f6b4265723..1a551a8b91 100644
--- a/docs/content/architecture/namespace.md
+++ b/docs/content/architecture/namespace.md
@@ -34,8 +34,8 @@ settings.
Enables full dynamic namespace capabilities, in which the Operator can create, delete and update
any namespaces within a Kubernetes cluster. With `dynamic` mode enabled, the PostgreSQL Operator
-can respond to namespace events in a Kubernetes cluster, such as when a namespace is created, and
-take an appropriate action, such as adding the PostgreSQL Operator controllers for the newly
+can respond to namespace events in a Kubernetes cluster, such as when a namespace is created, and
+take an appropriate action, such as adding the PostgreSQL Operator controllers for the newly
created namespace.
The following defines the namespace permissions required for the `dynamic` mode to be enabled:
@@ -62,8 +62,8 @@ rules:
### `readonly`
-In `readonly` mode, the PostgreSQL Operator is still able to listen to namespace events within a
-Kubernetes cluster, but it can no longer modify (create, update, delete) namespaces. For example,
+In `readonly` mode, the PostgreSQL Operator is still able to listen to namespace events within a
+Kubernetes cluster, but it can no longer modify (create, update, delete) namespaces. For example,
if a Kubernetes administrator creates a namespace, the PostgreSQL Operator can respond and create
controllers for that namespace.
@@ -95,7 +95,7 @@ Operator is unable to dynamically respond to namespace events in the cluster, i
target namespaces are deleted or new target namespaces need to be added, the PostgreSQL Operator
will need to be re-deployed.
-Please note that it is important to redeploy the PostgreSQL Operator following the deletion of a
+Please note that it is important to redeploy the PostgreSQL Operator following the deletion of a
target namespace to ensure it no longer attempts to listen for events in that namespace.
The `disabled` mode is enabled the when the PostgreSQL Operator has not been assigned namespace
@@ -103,22 +103,22 @@ permissions.
## RBAC Reconciliation
-By default, the PostgreSQL Operator will attempt to reconcile RBAC resources (ServiceAccounts,
+By default, the PostgreSQL Operator will attempt to reconcile RBAC resources (ServiceAccounts,
Roles and RoleBindings) within each namespace configured for the PostgreSQL Operator installation.
This allows the PostgreSQL Operator to create, update and delete the various RBAC resources it
requires in order to properly create and manage PostgreSQL clusters within each targeted namespace
(this includes self-healing RBAC resources as needed if removed and/or misconfigured).
In order for RBAC reconciliation to function properly, the PostgreSQL Operator ServiceAccount must
-be assigned a certain set of permissions. While the PostgreSQL Operator is not concerned with
+be assigned a certain set of permissions. While the PostgreSQL Operator is not concerned with
exactly how it has been assigned the permissions required to reconcile RBAC in each target
-namespace, the various [installation methods]({{< relref "installation" >}}) supported by the
+namespace, the various [installation methods]({{< relref "installation" >}}) supported by the
PostgreSQL Operator install a recommended set permissions based on the specific Namespace Operating
Mode enabled (see section [Namespace Operating Modes]({{< relref "#namespace-operating-modes" >}})
above for more information regarding the various Namespace Operating Modes available).
-The following section defines the recommended set of permissions that should be assigned to the
-PostgreSQL Operator ServiceAccount in order to ensure proper RBAC reconciliation based on the
+The following section defines the recommended set of permissions that should be assigned to the
+PostgreSQL Operator ServiceAccount in order to ensure proper RBAC reconciliation based on the
specific Namespace Operating Mode enabled. Please note that each PostgreSQL Operator installation
method handles the initial configuration and setup of the permissions shown below based on the
Namespace Operating Mode configured during installation.
@@ -127,7 +127,7 @@ Namespace Operating Mode configured during installation.
When using the `dynamic` Namespace Operating Mode, it is recommended that the PostgreSQL Operator
ServiceAccount be granted permissions to manage RBAC inside any namespace in the Kubernetes cluster
-via a ClusterRole. This allows for a fully-hands off approach to managing RBAC within each
+via a ClusterRole. This allows for a fully-hands off approach to managing RBAC within each
targeted namespace space. In other words, as namespaces are added and removed post-installation of
the PostgreSQL Operator (e.g. using `pgo create namespace` or `pgo delete namespace`), the Operator
is able to automatically reconcile RBAC in those namespaces without the need for any external
@@ -170,8 +170,6 @@ rules:
- endpoints
- pods
- pods/exec
- - pods/log
- - replicasets
- secrets
- services
- persistentvolumeclaims
@@ -184,10 +182,19 @@ rules:
- update
- delete
- deletecollection
+ - apiGroups:
+ - ''
+ resources:
+ - pods/log
+ verbs:
+ - get
+ - list
+ - watch
- apiGroups:
- apps
resources:
- deployments
+ - replicasets
verbs:
- get
- list
@@ -230,7 +237,7 @@ rules:
### `readonly` & `disabled` Namespace Operating Modes
-When using the `readonly` or `disabled` Namespace Operating Modes, it is recommended that the
+When using the `readonly` or `disabled` Namespace Operating Modes, it is recommended that the
PostgreSQL Operator ServiceAccount be granted permissions to manage RBAC inside of any configured
namespaces using local Roles within each targeted namespace. This means that as new namespaces
are added and removed post-installation of the PostgreSQL Operator, an administrator must manually
diff --git a/docs/content/contributing/developer-setup.md b/docs/content/contributing/developer-setup.md
index 113139e607..30413da4dd 100644
--- a/docs/content/contributing/developer-setup.md
+++ b/docs/content/contributing/developer-setup.md
@@ -24,7 +24,7 @@ Variable | Example | Description
`GOPATH` | $HOME/odev | Golang project directory
`PGOROOT` | $GOPATH/src/github.com/crunchydata/postgres-operator | Operator repository location
`PGO_CONF_DIR` | $PGOROOT/installers/ansible/roles/pgo-operator/files | Operator Config Template Directory
-`PGO_BASEOS` | {{< param centosBase >}} | Base OS for container images
+`PGO_BASEOS` | {{< param ubiBase >}} | Base OS for container images
`PGO_CMD` | kubectl | Cluster management tool executable
`PGO_IMAGE_PREFIX` | crunchydata | Container image prefix
`PGO_OPERATOR_NAMESPACE` | pgo | Kubernetes namespace for the operator
diff --git a/docs/content/custom-resources/_index.md b/docs/content/custom-resources/_index.md
index e27adfd3e6..58290f8acc 100644
--- a/docs/content/custom-resources/_index.md
+++ b/docs/content/custom-resources/_index.md
@@ -35,291 +35,219 @@ need to interface through the [`pgo` client]({{< relref "/pgo-client/_index.md"
The following sections will describe the functionality that is available today
when manipulating the PostgreSQL Operator Custom Resources directly.
-## PostgreSQL Operator Custom Resource Definitions
-
-There are several PostgreSQL Operator Custom Resource Definitions (CRDs) that
-are installed in order for the PostgreSQL Operator to successfully function:
-
-- `pgclusters.crunchydata.com`: Stores information required to manage a
-PostgreSQL cluster. This includes things like the cluster name, what storage and
-resource classes to use, which version of PostgreSQL to run, information about
-how to maintain a high-availability cluster, etc.
-- `pgreplicas.crunchydata.com`: Stores information required to manage the
-replicas within a PostgreSQL cluster. This includes things like the number of
-replicas, what storage and resource classes to use, special affinity rules, etc.
-- `pgtasks.crunchydata.com`: A general purpose CRD that accepts a type of task
-that is needed to run against a cluster (e.g. take a backup) and tracks the
-state of said task through its workflow.
-- `pgpolicies.crunchydata.com`: Stores a reference to a SQL file that can be
-executed against a PostgreSQL cluster. In the past, this was used to manage RLS
-policies on PostgreSQL clusters.
-
-Below takes an in depth look for what each attribute does in a Custom Resource
-Definition, and how they can be used in the creation and update workflow.
-
-### Glossary
-
-- `create`: if an attribute is listed as `create`, it means it can affect what
-happens when a new Custom Resource is created.
-- `update`: if an attribute is listed as `update`, it means it can affect the
-Custom Resource, and by extension the objects it manages, when the attribute is
-updated.
-
-### `pgclusters.crunchydata.com`
-
-The `pgclusters.crunchydata.com` Custom Resource Definition is the fundamental
-definition of a PostgreSQL cluster. Most attributes only affect the deployment
-of a PostgreSQL cluster at the time the PostgreSQL cluster is created. Some
-attributes can be modified during the lifetime of the PostgreSQL cluster and
-make changes, as described below.
-
-#### Specification (`Spec`)
-
-| Attribute | Action | Description |
-|-----------|--------|-------------|
-| Annotations | `create`, `update` | Specify Kubernetes [Annotations](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/) that can be applied to the different deployments managed by the PostgreSQL Operator (PostgreSQL, pgBackRest, pgBouncer). For more information, please see the "Annotations Specification" below. |
-| BackrestConfig | `create` | Optional references to pgBackRest configuration files
-| BackrestLimits | `create`, `update` | Specify the container resource limits that the pgBackRest repository should use. Follows the [Kubernetes definitions of resource limits](https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/#resource-requests-and-limits-of-pod-and-container). |
-| BackrestResources | `create`, `update` | Specify the container resource requests that the pgBackRest repository should use. Follows the [Kubernetes definitions of resource requests](https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/#resource-requests-and-limits-of-pod-and-container). |
-| BackrestS3Bucket | `create` | An optional parameter that specifies a S3 bucket that pgBackRest should use. |
-| BackrestS3Endpoint | `create` | An optional parameter that specifies the S3 endpoint pgBackRest should use. |
-| BackrestS3Region | `create` | An optional parameter that specifies a cloud region that pgBackRest should use. |
-| BackrestS3URIStyle | `create` | An optional parameter that specifies if pgBackRest should use the `path` or `host` S3 URI style. |
-| BackrestS3VerifyTLS | `create` | An optional parameter that specifies if pgBackRest should verify the TLS endpoint. |
-| BackrestStorage | `create` | A specification that gives information about the storage attributes for the pgBackRest repository, which stores backups and archives, of the PostgreSQL cluster. For details, please see the `Storage Specification` section below. This is required. |
-| CCPImage | `create` | The name of the PostgreSQL container image to use, e.g. `crunchy-postgres-ha` or `crunchy-postgres-ha-gis`. |
-| CCPImagePrefix | `create` | If provided, the image prefix (or registry) of the PostgreSQL container image, e.g. `registry.developers.crunchydata.com/crunchydata`. The default is to use the image prefix set in the PostgreSQL Operator configuration. |
-| CCPImageTag | `create` | The tag of the PostgreSQL container image to use, e.g. `{{< param centosBase >}}-{{< param postgresVersion >}}-{{< param operatorVersion >}}`. |
-| CollectSecretName | `create` | An optional attribute unless `crunchy-postgres-exporter` is specified in the `UserLabels`; contains the name of a Kubernetes Secret that contains the credentials for a PostgreSQL user that is used for metrics collection, and is created when the PostgreSQL cluster is first bootstrapped. For more information, please see `User Secret Specification`.|
-| ClusterName | `create` | The name of the PostgreSQL cluster, e.g. `hippo`. This is used to group PostgreSQL instances (primary, replicas) together. |
-| CustomConfig | `create` | If specified, references a custom ConfigMap to use when bootstrapping a PostgreSQL cluster. For the shape of this file, please see the section on [Custom Configuration]({{< relref "/advanced/custom-configuration.md" >}}) |
-| Database | `create` | The name of a database that the PostgreSQL user can log into after the PostgreSQL cluster is created. |
-| ExporterLimits | `create`, `update` | Specify the container resource limits that the `crunchy-postgres-exporter` sidecar uses when it is deployed with a PostgreSQL instance. Follows the [Kubernetes definitions of resource limits](https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/#resource-requests-and-limits-of-pod-and-container). |
-| ExporterPort | `create` | If the `"crunchy-postgres-exporter"` label is set in `UserLabels`, then this specifies the port that the metrics sidecar runs on (e.g. `9187`) |
-| ExporterResources | `create`, `update` | Specify the container resource requests that the `crunchy-postgres-exporter` sidecar uses when it is deployed with a PostgreSQL instance. Follows the [Kubernetes definitions of resource requests](https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/#resource-requests-and-limits-of-pod-and-container). |
-| Limits | `create`, `update` | Specify the container resource limits that the PostgreSQL cluster should use. Follows the [Kubernetes definitions of resource limits](https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/#resource-requests-and-limits-of-pod-and-container). |
-| Name | `create` | The name of the PostgreSQL instance that is the primary. On creation, this should be set to be the same as `ClusterName`. |
-| Namespace | `create` | The Kubernetes Namespace that the PostgreSQL cluster is deployed in. |
-| PGBadgerPort | `create` | If the `"crunchy-pgbadger"` label is set in `UserLabels`, then this specifies the port that the pgBadger sidecar runs on (e.g. `10000`) |
-| PGDataSource | `create` | Used to indicate if a PostgreSQL cluster should bootstrap its data from a pgBackRest repository. This uses the PostgreSQL Data Source Specification, described below. |
-| PGOImagePrefix | `create` | If provided, the image prefix (or registry) of any PostgreSQL Operator images that are used for jobs, e.g. `registry.developers.crunchydata.com/crunchydata`. The default is to use the image prefix set in the PostgreSQL Operator configuration. |
-| PgBouncer | `create`, `update` | If specified, defines the attributes to use for the pgBouncer connection pooling deployment that can be used in conjunction with this PostgreSQL cluster. Please see the specification defined below. |
-| PodAntiAffinity | `create` | A required section. Sets the [pod anti-affinity rules]({{< relref "/architecture/high-availability/_index.md#how-the-crunchy-postgresql-operator-uses-pod-anti-affinity" >}}) for the PostgreSQL cluster and associated deployments. Please see the `Pod Anti-Affinity Specification` section below. |
-| Policies | `create` | If provided, a comma-separated list referring to `pgpolicies.crunchydata.com.Spec.Name` that should be run once the PostgreSQL primary is first initialized. |
-| Port | `create` | The port that PostgreSQL will run on, e.g. `5432`. |
-| PrimaryStorage | `create` | A specification that gives information about the storage attributes for the primary instance in the PostgreSQL cluster. For details, please see the `Storage Specification` section below. This is required. |
-| RootSecretName | `create` | The name of a Kubernetes Secret that contains the credentials for a PostgreSQL _replication user_ that is created when the PostgreSQL cluster is first bootstrapped. For more information, please see `User Secret Specification`.|
-| ReplicaStorage | `create` | A specification that gives information about the storage attributes for any replicas in the PostgreSQL cluster. For details, please see the `Storage Specification` section below. This will likely be changed in the future based on the nature of the high-availability system, but presently it is still required that you set it. It is recommended you use similar settings to that of `PrimaryStorage`. |
-| Replicas | `create` | The number of replicas to create after a PostgreSQL primary is first initialized. This only works on create; to scale a cluster after it is initialized, please use the [`pgo scale`]({{< relref "/pgo-client/reference/pgo_scale.md" >}}) command. |
-| Resources | `create`, `update` | Specify the container resource requests that the PostgreSQL cluster should use. Follows the [Kubernetes definitions of resource requests](https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/#resource-requests-and-limits-of-pod-and-container). |
-| RootSecretName | `create` | The name of a Kubernetes Secret that contains the credentials for a PostgreSQL superuser that is created when the PostgreSQL cluster is first bootstrapped. For more information, please see `User Secret Specification`.|
-| SyncReplication | `create` | If set to `true`, specifies the PostgreSQL cluster to use [synchronous replication]({{< relref "/architecture/high-availability/_index.md#how-the-crunchy-postgresql-operator-uses-pod-anti-affinity#synchronous-replication-guarding-against-transactions-loss" >}}).|
-| User | `create` | The name of the PostgreSQL user that is created when the PostgreSQL cluster is first created. |
-| UserLabels | `create` | A set of key-value string pairs that are used as a sort of "catch-all" for things that really should be modeled in the CRD. These values do get copied to the actually CR labels. If you want to set up metrics collection or pgBadger, you would specify `"crunchy-postgres-exporter": "true"` and `"crunchy-pgbadger": "true"` here, respectively. However, this structure does need to be set, so just follow whatever is in the example. |
-| UserSecretName | `create` | The name of a Kubernetes Secret that contains the credentials for a standard PostgreSQL user that is created when the PostgreSQL cluster is first bootstrapped. For more information, please see `User Secret Specification`.|
-| TablespaceMounts | `create`,`update` | Lists any tablespaces that are attached to the PostgreSQL cluster. Tablespaces can be added at a later time by updating the `TablespaceMounts` entry, but they cannot be removed. Stores a map of information, with the key being the name of the tablespace, and the value being a Storage Specification, defined below. |
-| TLS | `create` | Defines the attributes for enabling TLS for a PostgreSQL cluster. See TLS Specification below. |
-| TLSOnly | `create` | If set to true, requires client connections to use only TLS to connect to the PostgreSQL database. |
-| Standby | `create`, `update` | If set to true, indicates that the PostgreSQL cluster is a "standby" cluster, i.e. is in read-only mode entirely. Please see [Kubernetes Multi-Cluster Deployments]({{< relref "/architecture/high-availability/multi-cluster-kubernetes.md" >}}) for more information. |
-| Shutdown | `create`, `update` | If set to true, indicates that a PostgreSQL cluster should shutdown. If set to false, indicates that a PostgreSQL cluster should be up and running. |
-
-##### Storage Specification
-
-The storage specification is a spec that defines attributes about the storage to
-be used for a particular function of a PostgreSQL cluster (e.g. a primary
-instance or for the pgBackRest backup repository). The below describes each
-attribute and how it works.
-
-| Attribute | Action | Description |
-|-----------|--------|-------------|
-| AccessMode| `create` | The name of the Kubernetes Persistent Volume [Access Mode](https://kubernetes.io/docs/concepts/storage/persistent-volumes/#access-modes) to use. |
-| MatchLabels | `create` | Only used with `StorageType` of `create`, used to match a particular subset of provisioned Persistent Volumes. |
-| Name | `create` | Only needed for `PrimaryStorage` in `pgclusters.crunchydata.com`.Used to identify the name of the PostgreSQL cluster. Should match `ClusterName`. |
-| Size | `create` | The size of the [Persistent Volume Claim](https://kubernetes.io/docs/concepts/storage/persistent-volumes/#persistentvolumeclaims) (PVC). Must use a Kubernetes resource value, e.g. `20Gi`. |
-| StorageClass | `create` | The name of the Kubernetes [StorageClass](https://kubernetes.io/docs/concepts/storage/storage-classes/) to use. |
-| StorageType | `create` | Set to `create` if storage is provisioned (e.g. using `hostpath`). Set to `dynamic` if using a dynamic storage provisioner, e.g. via a `StorageClass`. |
-| SupplementalGroups | `create` | If provided, a comma-separated list of group IDs to use in case it is needed to interface with a particular storage system. Typically used with NFS or hostpath storage. |
-
-##### Pod Anti-Affinity Specification
-
-Sets the [pod anti-affinity]({{< relref "/architecture/high-availability/_index.md#how-the-crunchy-postgresql-operator-uses-pod-anti-affinity" >}})
-for the PostgreSQL cluster and associated deployments. Each attribute can
-contain one of the following values:
-
-- `required`
-- `preferred` (which is also the recommended default)
-- `disabled`
-
-For a detailed explanation for how this works. Please see the [high-availability]({{< relref "/architecture/high-availability/_index.md#how-the-crunchy-postgresql-operator-uses-pod-anti-affinity" >}})
-documentation.
-
-| Attribute | Action | Description |
-|-----------|--------|-------------|
-| Default | `create` | The default pod anti-affinity to use for all Pods managed in a given PostgreSQL cluster. |
-| PgBackRest | `create` | If set to a value that differs from `Default`, specifies the pod anti-affinity to use for just the pgBackRest repository. |
-| PgBouncer | `create` | If set to a value that differs from `Default`, specifies the pod anti-affinity to use for just the pgBouncer Pods. |
-
-##### PostgreSQL Data Source Specification
+## Custom Resource Workflows
-This specification is used when one wants to bootstrap the data in a PostgreSQL
-cluster from a pgBackRest repository. This can be a pgBackRest repository that
-is attached to an active PostgreSQL cluster or is kept around to be used for
-spawning new PostgreSQL clusters.
+### Create a PostgreSQL Cluster
-| Attribute | Action | Description |
-|-----------|--------|-------------|
-| RestoreFrom | `create` | The name of a PostgreSQL cluster, active or former, that will be used for bootstrapping the data of a new PostgreSQL cluster. |
-| RestoreOpts | `create` | Additional pgBackRest [restore options](https://pgbackrest.org/command.html#command-restore) that can be used as part of the bootstrapping operation, for example, point-in-time-recovery options. |
+The fundamental workflow for interfacing with a PostgreSQL Operator Custom
+Resource Definition is for creating a PostgreSQL cluster. However, this is also
+one of the most complicated workflows to go through, as there are several
+Kubernetes objects that need to be created prior to using this method. These
+include:
-##### TLS Specification
+- Secrets
+ - Information for setting up a pgBackRest repository
+ - PostgreSQL superuser bootstrap credentials
+ - PostgreSQL replication user bootstrap credentials
+ - PostgresQL standard user bootstrap credentials
-The TLS specification makes a reference to the various secrets that are required
-to enable TLS in a PostgreSQL cluster. For more information on how these secrets
-should be structured, please see [Enabling TLS in a PostgreSQL Cluster]({{< relref "/pgo-client/common-tasks.md#enable-tls" >}}).
+Additionally, if you want to add some of the other sidecars, you may need to
+create additional secrets.
-| Attribute | Action | Description |
-|-----------|--------|-------------|
-| CASecret | `create` | A reference to the name of a Kubernetes Secret that specifies a certificate authority for the PostgreSQL cluster to trust. |
-| ReplicationTLSSecret | `create` | A reference to the name of a Kubernetes TLS Secret that contains a keypair for authenticating the replication user. Must be used with `CASecret` and `TLSSecret`. |
-| TLSSecret | `create` | A reference to the name of a Kubernetes TLS Secret that contains a keypair that is used for the PostgreSQL instance to identify itself and perform TLS communications with PostgreSQL clients. Must be used with `CASecret`. |
+The following guide goes through how to create a PostgreSQL cluster called
+`hippo` by creating a new custom resource.
-##### pgBouncer Specification
+#### Step 1: Creating the PostgreSQL User Secrets
-The pgBouncer specification defines how a pgBouncer deployment can be deployed
-alongside the PostgreSQL cluster. pgBouncer is a PostgreSQL connection pooler
-that can also help manage connection state, and is helpful to deploy alongside
-a PostgreSQL cluster to help with failover scenarios too.
+As mentioned above, there are a minimum of three PostgreSQL user accounts that
+you must create in order to bootstrap a PostgreSQL cluster. These are:
-| Attribute | Action | Description |
-|-----------|--------|-------------|
-| Limits | `create`, `update` | Specify the container resource limits that the pgBouncer Pods should use. Follows the [Kubernetes definitions of resource limits](https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/#resource-requests-and-limits-of-pod-and-container). |
-| Replicas | `create`, `update` | The number of pgBouncer instances to deploy. Must be set to at least `1` to deploy pgBouncer. Setting to `0` removes an existing pgBouncer deployment for the PostgreSQL cluster. |
-| Resources | `create`, `update` | Specify the container resource requests that the pgBouncer Pods should use. Follows the [Kubernetes definitions of resource requests](https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/#resource-requests-and-limits-of-pod-and-container). |
+- A PostgreSQL superuser
+- A replication user
+- A standard PostgreSQL user
-##### Annotations Specification
+The below code will help you set up these Secrets.
-The `pgcluster.crunchydata.com` specification contains a block that allows for
-custom [Annotations](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/)
-to be applied to the Deployments that are managed by the PostgreSQL Operator,
-including:
+```
+# this variable is the name of the cluster being created
+pgo_cluster_name=hippo
+# this variable is the namespace the cluster is being deployed into
+cluster_namespace=pgo
-- PostgreSQL
-- pgBackRest
-- pgBouncer
+# this is the superuser secret
+kubectl create secret generic -n "${cluster_namespace}" "${pgo_cluster_name}-postgres-secret" \
+ --from-literal=username=postgres \
+ --from-literal=password=Supersecurepassword*
-This also includes the option to apply Annotations globally across the three
-different deployment groups.
+# this is the replication user secret
+kubectl create secret generic -n "${cluster_namespace}" "${pgo_cluster_name}-primaryuser-secret" \
+ --from-literal=username=primaryuser \
+ --from-literal=password=Anothersecurepassword*
-| Attribute | Action | Description |
-|-----------|--------|-------------|
-| Backrest | `create`, `update` | Specify annotations that are only applied to the pgBackRest deployments |
-| Global | `create`, `update` | Specify annotations that are applied to the PostgreSQL, pgBackRest, and pgBouncer deployments |
-| PgBouncer | `create`, `update` | Specify annotations that are only applied to the pgBouncer deployments |
-| Postgres | `create`, `update` | Specify annotations that are only applied to the PostgreSQL deployments |
+# this is the standard user secret
+kubectl create secret generic -n "${cluster_namespace}" "${pgo_cluster_name}-hippo-secret" \
+ --from-literal=username=hippo \
+ --from-literal=password=Moresecurepassword*
-### `pgreplicas.crunchydata.com`
-The `pgreplicas.crunchydata.com` Custom Resource Definition contains information
-pertaning to the structure of PostgreSQL replicas associated within a PostgreSQL
-cluster. All of the attributes only affect the replica when it is created.
+kubectl label secrets -n "${cluster_namespace}" "${pgo_cluster_name}-postgres-secret" "pg-cluster=${pgo_cluster_name}"
+kubectl label secrets -n "${cluster_namespace}" "${pgo_cluster_name}-primaryuser-secret" "pg-cluster=${pgo_cluster_name}"
+kubectl label secrets -n "${cluster_namespace}" "${pgo_cluster_name}-hippo-secret" "pg-cluster=${pgo_cluster_name}"
+```
-#### Specification (`Spec`)
+#### Step 2: Create the PostgreSQL Cluster
-| Attribute | Action | Description |
-|-----------|--------|-------------|
-| ClusterName | `create` | The name of the PostgreSQL cluster, e.g. `hippo`. This is used to group PostgreSQL instances (primary, replicas) together. |
-| Name | `create` | The name of this PostgreSQL replica. It should be unique within a `ClusterName`. |
-| Namespace | `create` | The Kubernetes Namespace that the PostgreSQL cluster is deployed in. |
-| ReplicaStorage | `create` | A specification that gives information about the storage attributes for any replicas in the PostgreSQL cluster. For details, please see the `Storage Specification` section in the `pgclusters.crunchydata.com` description. This will likely be changed in the future based on the nature of the high-availability system, but presently it is still required that you set it. It is recommended you use similar settings to that of `PrimaryStorage`. |
-| UserLabels | `create` | A set of key-value string pairs that are used as a sort of "catch-all" for things that really should be modeled in the CRD. These values do get copied to the actually CR labels. If you want to set up metrics collection, you would specify `"crunchy-postgres-exporter": "true"` here. This also allows for node selector pinning using `NodeLabelKey` and `NodeLabelValue`. However, this structure does need to be set, so just follow whatever is in the example. |
+With the Secrets in place. It is now time to create the PostgreSQL cluster.
-## Custom Resource Workflows
+The below manifest references the Secrets created in the previous step to add a
+custom resource to the `pgclusters.crunchydata.com` custom resource definition.
-### Create a PostgreSQL Cluster
+**NOTE**: You will need to modify the storage sections to match your storage
+configuration.
-The fundamental workflow for interfacing with a PostgreSQL Operator Custom
-Resource Definition is for creating a PostgreSQL cluster. However, this is also
-one of the most complicated workflows to go through, as there are several
-Kubernetes objects that need to be created prior to using this method. These
-include:
+```
+# this variable is the name of the cluster being created
+export pgo_cluster_name=hippo
+# this variable is the namespace the cluster is being deployed into
+export cluster_namespace=pgo
-- Secrets
- - Information for setting up a pgBackRest repository
- - PostgreSQL superuser bootstrap credentials
- - PostgreSQL replication user bootstrap credentials
- - PostgresQL standard user bootstrap credentials
+cat <<-EOF > "${pgo_cluster_name}-pgcluster.yaml"
+apiVersion: crunchydata.com/v1
+kind: Pgcluster
+metadata:
+ annotations:
+ current-primary: ${pgo_cluster_name}
+ labels:
+ autofail: "true"
+ crunchy-pgbadger: "false"
+ crunchy-pgha-scope: ${pgo_cluster_name}
+ crunchy-postgres-exporter: "false"
+ deployment-name: ${pgo_cluster_name}
+ name: ${pgo_cluster_name}
+ pg-cluster: ${pgo_cluster_name}
+ pg-pod-anti-affinity: ""
+ pgo-backrest: "true"
+ pgo-version: {{< param operatorVersion >}}
+ pgouser: admin
+ name: ${pgo_cluster_name}
+ namespace: ${cluster_namespace}
+spec:
+ BackrestStorage:
+ accessmode: ReadWriteMany
+ matchLabels: ""
+ name: ""
+ size: 1G
+ storageclass: ""
+ storagetype: create
+ supplementalgroups: ""
+ PrimaryStorage:
+ accessmode: ReadWriteMany
+ matchLabels: ""
+ name: ${pgo_cluster_name}
+ size: 1G
+ storageclass: ""
+ storagetype: create
+ supplementalgroups: ""
+ ReplicaStorage:
+ accessmode: ReadWriteMany
+ matchLabels: ""
+ name: ""
+ size: 1G
+ storageclass: ""
+ storagetype: create
+ supplementalgroups: ""
+ annotations:
+ backrestLimits: {}
+ backrestRepoPath: ""
+ backrestResources:
+ memory: 48Mi
+ backrestS3Bucket: ""
+ backrestS3Endpoint: ""
+ backrestS3Region: ""
+ backrestS3URIStyle: ""
+ backrestS3VerifyTLS: ""
+ ccpimage: crunchy-postgres-ha
+ ccpimageprefix: registry.developers.crunchydata.com/crunchydata
+ ccpimagetag: {{< param ubiBase >}}-{{< param postgresVersion >}}-{{< param operatorVersion >}}
+ clustername: ${pgo_cluster_name}
+ customconfig: ""
+ database: ${pgo_cluster_name}
+ exporterport: "9187"
+ limits: {}
+ name: ${pgo_cluster_name}
+ namespace: ${cluster_namespace}
+ pgBouncer:
+ limits: {}
+ replicas: 0
+ pgDataSource:
+ restoreFrom: ""
+ restoreOpts: ""
+ pgbadgerport: "10000"
+ pgoimageprefix: registry.developers.crunchydata.com/crunchydata
+ podAntiAffinity:
+ default: preferred
+ pgBackRest: preferred
+ pgBouncer: preferred
+ policies: ""
+ port: "5432"
+ primarysecretname: ${pgo_cluster_name}-primaryuser-secret
+ replicas: "0"
+ rootsecretname: ${pgo_cluster_name}-postgres-secret
+ shutdown: false
+ standby: false
+ tablespaceMounts: {}
+ tls:
+ caSecret: ""
+ replicationTLSSecret: ""
+ tlsSecret: ""
+ tlsOnly: false
+ user: hippo
+ userlabels:
+ crunchy-postgres-exporter: "false"
+ pg-pod-anti-affinity: ""
+ pgo-version: {{< param operatorVersion >}}
+ usersecretname: ${pgo_cluster_name}-hippo-secret
+EOF
-Additionally, if you want to add some of the other sidecars, you may need to
-create additional secrets.
+kubectl apply -f "${pgo_cluster_name}-pgcluster.yaml"
+```
-The following guide goes through how to create a PostgreSQL cluster called
-`hippo` by creating a new custom resource.
+### Create a PostgreSQL Cluster With Backups in S3
-#### Step 1: Create the pgBackRest Secret
+A frequent use case is to create a PostgreSQL cluster with S3 or a S3-like
+storage system for storing backups. This requires adding a Secret that contains
+the S3 key and key secret for your account, and adding some additional
+information into the custom resource.
-pgBackRest is a fundamental part of a PostgreSQL deployment with the PostgreSQL
-Operator: not only is it a backup and archive repository, but it also helps with
-operations such as self-healing. A PostgreSQL instance a pgBackRest communicate
-using ssh, and as such, we need to generate a unique ssh keypair for
-communication for each PostgreSQL cluster we deploy.
+#### Step 1: Create the pgBackRest S3 Secrets
-In this example, we generate a ssh keypair using ED25519 keys, but if your
-environment requires it, you can also use RSA keys.
+As mentioned above, it is necessary to create a Secret containing the S3 key and
+key secret that will allow a user to create backups in S3.
-In your working directory, run the following commands:
+The below code will help you set up this Secret.
-
+```
# this variable is the name of the cluster being created
-export pgo_cluster_name=hippo
+pgo_cluster_name=hippo
# this variable is the namespace the cluster is being deployed into
-export cluster_namespace=pgo
-
-# generate a SSH public/private keypair for use by pgBackRest
-ssh-keygen -t ed25519 -N '' -f "${pgo_cluster_name}-key"
-
-# base64 encoded the keys for the generation of the Kubernetes secret, and place
-# them into variables temporarily
-public_key_temp=$(cat "${pgo_cluster_name}-key.pub" | base64)
-private_key_temp=$(cat "${pgo_cluster_name}-key" | base64)
-export pgbackrest_public_key="${public_key_temp//[$'\n']}" pgbackrest_private_key="${private_key_temp//[$'\n']}"
-
-# create the backrest-repo-config example file and substitute in the newly
-# created keys
-#
-# (Note: that the "config" / "sshd_config" entries contain configuration to
-# ensure that PostgreSQL instances are able to communicate with the pgBackRest
-# repository, which houses backups and archives, and vice versa. Most of the
-# settings follow the sshd defaults, with a few overrides. Edit at your own
-# discretion.)
-cat <<-EOF > "${pgo_cluster_name}-backrest-repo-config.yaml"
-apiVersion: v1
-kind: Secret
-type: Opaque
-metadata:
- labels:
- pg-cluster: ${pgo_cluster_name}
- pgo-backrest-repo: "true"
- name: ${pgo_cluster_name}-backrest-repo-config
- namespace: ${cluster_namespace}
-data:
- authorized_keys: ${pgbackrest_public_key}
- id_ed25519: ${pgbackrest_private_key}
- ssh_host_ed25519_key: ${pgbackrest_private_key}
- config: SG9zdCAqClN0cmljdEhvc3RLZXlDaGVja2luZyBubwpJZGVudGl0eUZpbGUgL3RtcC9pZF9lZDI1NTE5ClBvcnQgMjAyMgpVc2VyIHBnYmFja3Jlc3QK
- sshd_config: IwkkT3BlbkJTRDogc3NoZF9jb25maWcsdiAxLjEwMCAyMDE2LzA4LzE1IDEyOjMyOjA0IG5hZGR5IEV4cCAkCgojIFRoaXMgaXMgdGhlIHNzaGQgc2VydmVyIHN5c3RlbS13aWRlIGNvbmZpZ3VyYXRpb24gZmlsZS4gIFNlZQojIHNzaGRfY29uZmlnKDUpIGZvciBtb3JlIGluZm9ybWF0aW9uLgoKIyBUaGlzIHNzaGQgd2FzIGNvbXBpbGVkIHdpdGggUEFUSD0vdXNyL2xvY2FsL2JpbjovdXNyL2JpbgoKIyBUaGUgc3RyYXRlZ3kgdXNlZCBmb3Igb3B0aW9ucyBpbiB0aGUgZGVmYXVsdCBzc2hkX2NvbmZpZyBzaGlwcGVkIHdpdGgKIyBPcGVuU1NIIGlzIHRvIHNwZWNpZnkgb3B0aW9ucyB3aXRoIHRoZWlyIGRlZmF1bHQgdmFsdWUgd2hlcmUKIyBwb3NzaWJsZSwgYnV0IGxlYXZlIHRoZW0gY29tbWVudGVkLiAgVW5jb21tZW50ZWQgb3B0aW9ucyBvdmVycmlkZSB0aGUKIyBkZWZhdWx0IHZhbHVlLgoKIyBJZiB5b3Ugd2FudCB0byBjaGFuZ2UgdGhlIHBvcnQgb24gYSBTRUxpbnV4IHN5c3RlbSwgeW91IGhhdmUgdG8gdGVsbAojIFNFTGludXggYWJvdXQgdGhpcyBjaGFuZ2UuCiMgc2VtYW5hZ2UgcG9ydCAtYSAtdCBzc2hfcG9ydF90IC1wIHRjcCAjUE9SVE5VTUJFUgojClBvcnQgMjAyMgojQWRkcmVzc0ZhbWlseSBhbnkKI0xpc3RlbkFkZHJlc3MgMC4wLjAuMAojTGlzdGVuQWRkcmVzcyA6OgoKSG9zdEtleSAvc3NoZC9zc2hfaG9zdF9lZDI1NTE5X2tleQoKIyBDaXBoZXJzIGFuZCBrZXlpbmcKI1Jla2V5TGltaXQgZGVmYXVsdCBub25lCgojIExvZ2dpbmcKI1N5c2xvZ0ZhY2lsaXR5IEFVVEgKU3lzbG9nRmFjaWxpdHkgQVVUSFBSSVYKI0xvZ0xldmVsIElORk8KCiMgQXV0aGVudGljYXRpb246CgojTG9naW5HcmFjZVRpbWUgMm0KUGVybWl0Um9vdExvZ2luIG5vClN0cmljdE1vZGVzIG5vCiNNYXhBdXRoVHJpZXMgNgojTWF4U2Vzc2lvbnMgMTAKClB1YmtleUF1dGhlbnRpY2F0aW9uIHllcwoKIyBUaGUgZGVmYXVsdCBpcyB0byBjaGVjayBib3RoIC5zc2gvYXV0aG9yaXplZF9rZXlzIGFuZCAuc3NoL2F1dGhvcml6ZWRfa2V5czIKIyBidXQgdGhpcyBpcyBvdmVycmlkZGVuIHNvIGluc3RhbGxhdGlvbnMgd2lsbCBvbmx5IGNoZWNrIC5zc2gvYXV0aG9yaXplZF9rZXlzCiNBdXRob3JpemVkS2V5c0ZpbGUJL3BnY29uZi9hdXRob3JpemVkX2tleXMKQXV0aG9yaXplZEtleXNGaWxlCS9zc2hkL2F1dGhvcml6ZWRfa2V5cwoKI0F1dGhvcml6ZWRQcmluY2lwYWxzRmlsZSBub25lCgojQXV0aG9yaXplZEtleXNDb21tYW5kIG5vbmUKI0F1dGhvcml6ZWRLZXlzQ29tbWFuZFVzZXIgbm9ib2R5CgojIEZvciB0aGlzIHRvIHdvcmsgeW91IHdpbGwgYWxzbyBuZWVkIGhvc3Qga2V5cyBpbiAvZXRjL3NzaC9zc2hfa25vd25faG9zdHMKI0hvc3RiYXNlZEF1dGhlbnRpY2F0aW9uIG5vCiMgQ2hhbmdlIHRvIHllcyBpZiB5b3UgZG9uJ3QgdHJ1c3Qgfi8uc3NoL2tub3duX2hvc3RzIGZvcgojIEhvc3RiYXNlZEF1dGhlbnRpY2F0aW9uCiNJZ25vcmVVc2VyS25vd25Ib3N0cyBubwojIERvbid0IHJlYWQgdGhlIHVzZXIncyB+Ly5yaG9zdHMgYW5kIH4vLnNob3N0cyBmaWxlcwojSWdub3JlUmhvc3RzIHllcwoKIyBUbyBkaXNhYmxlIHR1bm5lbGVkIGNsZWFyIHRleHQgcGFzc3dvcmRzLCBjaGFuZ2UgdG8gbm8gaGVyZSEKI1Bhc3N3b3JkQXV0aGVudGljYXRpb24geWVzCiNQZXJtaXRFbXB0eVBhc3N3b3JkcyBubwpQYXNzd29yZEF1dGhlbnRpY2F0aW9uIG5vCgojIENoYW5nZSB0byBubyB0byBkaXNhYmxlIHMva2V5IHBhc3N3b3JkcwpDaGFsbGVuZ2VSZXNwb25zZUF1dGhlbnRpY2F0aW9uIHllcwojQ2hhbGxlbmdlUmVzcG9uc2VBdXRoZW50aWNhdGlvbiBubwoKIyBLZXJiZXJvcyBvcHRpb25zCiNLZXJiZXJvc0F1dGhlbnRpY2F0aW9uIG5vCiNLZXJiZXJvc09yTG9jYWxQYXNzd2QgeWVzCiNLZXJiZXJvc1RpY2tldENsZWFudXAgeWVzCiNLZXJiZXJvc0dldEFGU1Rva2VuIG5vCiNLZXJiZXJvc1VzZUt1c2Vyb2sgeWVzCgojIEdTU0FQSSBvcHRpb25zCiNHU1NBUElBdXRoZW50aWNhdGlvbiB5ZXMKI0dTU0FQSUNsZWFudXBDcmVkZW50aWFscyBubwojR1NTQVBJU3RyaWN0QWNjZXB0b3JDaGVjayB5ZXMKI0dTU0FQSUtleUV4Y2hhbmdlIG5vCiNHU1NBUElFbmFibGVrNXVzZXJzIG5vCgojIFNldCB0aGlzIHRvICd5ZXMnIHRvIGVuYWJsZSBQQU0gYXV0aGVudGljYXRpb24sIGFjY291bnQgcHJvY2Vzc2luZywKIyBhbmQgc2Vzc2lvbiBwcm9jZXNzaW5nLiBJZiB0aGlzIGlzIGVuYWJsZWQsIFBBTSBhdXRoZW50aWNhdGlvbiB3aWxsCiMgYmUgYWxsb3dlZCB0aHJvdWdoIHRoZSBDaGFsbGVuZ2VSZXNwb25zZUF1dGhlbnRpY2F0aW9uIGFuZAojIFBhc3N3b3JkQXV0aGVudGljYXRpb24uICBEZXBlbmRpbmcgb24geW91ciBQQU0gY29uZmlndXJhdGlvbiwKIyBQQU0gYXV0aGVudGljYXRpb24gdmlhIENoYWxsZW5nZVJlc3BvbnNlQXV0aGVudGljYXRpb24gbWF5IGJ5cGFzcwojIHRoZSBzZXR0aW5nIG9mICJQZXJtaXRSb290TG9naW4gd2l0aG91dC1wYXNzd29yZCIuCiMgSWYgeW91IGp1c3Qgd2FudCB0aGUgUEFNIGFjY291bnQgYW5kIHNlc3Npb24gY2hlY2tzIHRvIHJ1biB3aXRob3V0CiMgUEFNIGF1dGhlbnRpY2F0aW9uLCB0aGVuIGVuYWJsZSB0aGlzIGJ1dCBzZXQgUGFzc3dvcmRBdXRoZW50aWNhdGlvbgojIGFuZCBDaGFsbGVuZ2VSZXNwb25zZUF1dGhlbnRpY2F0aW9uIHRvICdubycuCiMgV0FSTklORzogJ1VzZVBBTSBubycgaXMgbm90IHN1cHBvcnRlZCBpbiBSZWQgSGF0IEVudGVycHJpc2UgTGludXggYW5kIG1heSBjYXVzZSBzZXZlcmFsCiMgcHJvYmxlbXMuClVzZVBBTSB5ZXMKCiNBbGxvd0FnZW50Rm9yd2FyZGluZyB5ZXMKI0FsbG93VGNwRm9yd2FyZGluZyB5ZXMKI0dhdGV3YXlQb3J0cyBubwpYMTFGb3J3YXJkaW5nIHllcwojWDExRGlzcGxheU9mZnNldCAxMAojWDExVXNlTG9jYWxob3N0IHllcwojUGVybWl0VFRZIHllcwojUHJpbnRNb3RkIHllcwojUHJpbnRMYXN0TG9nIHllcwojVENQS2VlcEFsaXZlIHllcwojVXNlTG9naW4gbm8KI1Blcm1pdFVzZXJFbnZpcm9ubWVudCBubwojQ29tcHJlc3Npb24gZGVsYXllZAojQ2xpZW50QWxpdmVJbnRlcnZhbCAwCiNDbGllbnRBbGl2ZUNvdW50TWF4IDMKI1Nob3dQYXRjaExldmVsIG5vCiNVc2VETlMgeWVzCiNQaWRGaWxlIC92YXIvcnVuL3NzaGQucGlkCiNNYXhTdGFydHVwcyAxMDozMDoxMDAKI1Blcm1pdFR1bm5lbCBubwojQ2hyb290RGlyZWN0b3J5IG5vbmUKI1ZlcnNpb25BZGRlbmR1bSBub25lCgojIG5vIGRlZmF1bHQgYmFubmVyIHBhdGgKI0Jhbm5lciBub25lCgojIEFjY2VwdCBsb2NhbGUtcmVsYXRlZCBlbnZpcm9ubWVudCB2YXJpYWJsZXMKQWNjZXB0RW52IExBTkcgTENfQ1RZUEUgTENfTlVNRVJJQyBMQ19USU1FIExDX0NPTExBVEUgTENfTU9ORVRBUlkgTENfTUVTU0FHRVMKQWNjZXB0RW52IExDX1BBUEVSIExDX05BTUUgTENfQUREUkVTUyBMQ19URUxFUEhPTkUgTENfTUVBU1VSRU1FTlQKQWNjZXB0RW52IExDX0lERU5USUZJQ0FUSU9OIExDX0FMTCBMQU5HVUFHRQpBY2NlcHRFbnYgWE1PRElGSUVSUwoKIyBvdmVycmlkZSBkZWZhdWx0IG9mIG5vIHN1YnN5c3RlbXMKU3Vic3lzdGVtCXNmdHAJL3Vzci9saWJleGVjL29wZW5zc2gvc2Z0cC1zZXJ2ZXIKCiMgRXhhbXBsZSBvZiBvdmVycmlkaW5nIHNldHRpbmdzIG9uIGEgcGVyLXVzZXIgYmFzaXMKI01hdGNoIFVzZXIgYW5vbmN2cwojCVgxMUZvcndhcmRpbmcgbm8KIwlBbGxvd1RjcEZvcndhcmRpbmcgbm8KIwlQZXJtaXRUVFkgbm8KIwlGb3JjZUNvbW1hbmQgY3ZzIHNlcnZlcgo=
-EOF
+cluster_namespace=pgo
+# the following variables are your S3 key and key secret
+backrest_s3_key=yours3key
+backrest_s3_key_secret=yours3keysecret
-# remove the pgBackRest ssh keypair from the shell session
-unset pgbackrest_public_key pgbackrest_private_key
+kubectl -n "${cluster_namespace}" create secret generic "${pgo_cluster_name}-backrest-repo-config" \
+ --from-literal="aws-s3-key=${backrest_s3_key}" \
+ --from-literal="aws-s3-key-secret=${backrest_s3_key_secret}"
-# create the pgBackRest secret
-kubectl apply -f "${pgo_cluster_name}-backrest-repo-config.yaml"
-
+unset backrest_s3_key
+unset backrest_s3_key_secret
+```
#### Step 2: Creating the PostgreSQL User Secrets
-As mentioned above, there are a minimum of three PostgreSQL user accounts that
-you must create in order to bootstrap a PostgreSQL cluster. These are:
+Similar to the basic create cluster example, there are a minimum of three
+PostgreSQL user accounts that you must create in order to bootstrap a PostgreSQL
+cluster. These are:
- A PostgreSQL superuser
- A replication user
@@ -360,15 +288,18 @@ With the Secrets in place. It is now time to create the PostgreSQL cluster.
The below manifest references the Secrets created in the previous step to add a
custom resource to the `pgclusters.crunchydata.com` custom resource definition.
-
-**NOTE**: You will need to modify the storage sections to match your storage
-configuration.
+There are some additions in this example specifically for storing backups in S3.
```
# this variable is the name of the cluster being created
export pgo_cluster_name=hippo
# this variable is the namespace the cluster is being deployed into
export cluster_namespace=pgo
+# the following variables store the information for your S3 cluster. You may
+# need to adjust them for your actual settings
+export backrest_s3_bucket=your-bucket
+export backrest_s3_endpoint=s3.region-name.amazonaws.com
+export backrest_s3_region=region-name
cat <<-EOF > "${pgo_cluster_name}-pgcluster.yaml"
apiVersion: crunchydata.com/v1
@@ -378,6 +309,7 @@ metadata:
current-primary: ${pgo_cluster_name}
labels:
autofail: "true"
+ backrest-storage-type: "s3"
crunchy-pgbadger: "false"
crunchy-pgha-scope: ${pgo_cluster_name}
crunchy-postgres-exporter: "false"
@@ -397,7 +329,7 @@ spec:
name: ""
size: 1G
storageclass: ""
- storagetype: create
+ storagetype: dynamic
supplementalgroups: ""
PrimaryStorage:
accessmode: ReadWriteMany
@@ -405,7 +337,7 @@ spec:
name: ${pgo_cluster_name}
size: 1G
storageclass: ""
- storagetype: create
+ storagetype: dynamic
supplementalgroups: ""
ReplicaStorage:
accessmode: ReadWriteMany
@@ -413,21 +345,21 @@ spec:
name: ""
size: 1G
storageclass: ""
- storagetype: create
+ storagetype: dynamic
supplementalgroups: ""
annotations:
backrestLimits: {}
backrestRepoPath: ""
backrestResources:
memory: 48Mi
- backrestS3Bucket: ""
- backrestS3Endpoint: ""
- backrestS3Region: ""
+ backrestS3Bucket: ${backrest_s3_bucket}
+ backrestS3Endpoint: ${backrest_s3_endpoint}
+ backrestS3Region: ${backrest_s3_region}
backrestS3URIStyle: ""
backrestS3VerifyTLS: ""
ccpimage: crunchy-postgres-ha
ccpimageprefix: registry.developers.crunchydata.com/crunchydata
- ccpimagetag: {{< param centosBase >}}-{{< param postgresVersion >}}-{{< param operatorVersion >}}
+ ccpimagetag: {{< param ubiBase >}}-{{< param postgresVersion >}}-{{< param operatorVersion >}}
clustername: ${pgo_cluster_name}
customconfig: ""
database: ${pgo_cluster_name}
@@ -462,6 +394,7 @@ spec:
tlsOnly: false
user: hippo
userlabels:
+ backrest-storage-type: "s3"
crunchy-postgres-exporter: "false"
pg-pod-anti-affinity: ""
pgo-version: {{< param operatorVersion >}}
@@ -690,3 +623,201 @@ spec:
Save your edits, and in a short period of time, you should see these annotations
applied to the managed Deployments.
+
+## PostgreSQL Operator Custom Resource Definitions
+
+There are several PostgreSQL Operator Custom Resource Definitions (CRDs) that
+are installed in order for the PostgreSQL Operator to successfully function:
+
+- `pgclusters.crunchydata.com`: Stores information required to manage a
+PostgreSQL cluster. This includes things like the cluster name, what storage and
+resource classes to use, which version of PostgreSQL to run, information about
+how to maintain a high-availability cluster, etc.
+- `pgreplicas.crunchydata.com`: Stores information required to manage the
+replicas within a PostgreSQL cluster. This includes things like the number of
+replicas, what storage and resource classes to use, special affinity rules, etc.
+- `pgtasks.crunchydata.com`: A general purpose CRD that accepts a type of task
+that is needed to run against a cluster (e.g. take a backup) and tracks the
+state of said task through its workflow.
+- `pgpolicies.crunchydata.com`: Stores a reference to a SQL file that can be
+executed against a PostgreSQL cluster. In the past, this was used to manage RLS
+policies on PostgreSQL clusters.
+
+Below takes an in depth look for what each attribute does in a Custom Resource
+Definition, and how they can be used in the creation and update workflow.
+
+### Glossary
+
+- `create`: if an attribute is listed as `create`, it means it can affect what
+happens when a new Custom Resource is created.
+- `update`: if an attribute is listed as `update`, it means it can affect the
+Custom Resource, and by extension the objects it manages, when the attribute is
+updated.
+
+### `pgclusters.crunchydata.com`
+
+The `pgclusters.crunchydata.com` Custom Resource Definition is the fundamental
+definition of a PostgreSQL cluster. Most attributes only affect the deployment
+of a PostgreSQL cluster at the time the PostgreSQL cluster is created. Some
+attributes can be modified during the lifetime of the PostgreSQL cluster and
+make changes, as described below.
+
+#### Specification (`Spec`)
+
+| Attribute | Action | Description |
+|-----------|--------|-------------|
+| Annotations | `create`, `update` | Specify Kubernetes [Annotations](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/) that can be applied to the different deployments managed by the PostgreSQL Operator (PostgreSQL, pgBackRest, pgBouncer). For more information, please see the "Annotations Specification" below. |
+| BackrestConfig | `create` | Optional references to pgBackRest configuration files
+| BackrestLimits | `create`, `update` | Specify the container resource limits that the pgBackRest repository should use. Follows the [Kubernetes definitions of resource limits](https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/#resource-requests-and-limits-of-pod-and-container). |
+| BackrestResources | `create`, `update` | Specify the container resource requests that the pgBackRest repository should use. Follows the [Kubernetes definitions of resource requests](https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/#resource-requests-and-limits-of-pod-and-container). |
+| BackrestS3Bucket | `create` | An optional parameter that specifies a S3 bucket that pgBackRest should use. |
+| BackrestS3Endpoint | `create` | An optional parameter that specifies the S3 endpoint pgBackRest should use. |
+| BackrestS3Region | `create` | An optional parameter that specifies a cloud region that pgBackRest should use. |
+| BackrestS3URIStyle | `create` | An optional parameter that specifies if pgBackRest should use the `path` or `host` S3 URI style. |
+| BackrestS3VerifyTLS | `create` | An optional parameter that specifies if pgBackRest should verify the TLS endpoint. |
+| BackrestStorage | `create` | A specification that gives information about the storage attributes for the pgBackRest repository, which stores backups and archives, of the PostgreSQL cluster. For details, please see the `Storage Specification` section below. This is required. |
+| CCPImage | `create` | The name of the PostgreSQL container image to use, e.g. `crunchy-postgres-ha` or `crunchy-postgres-ha-gis`. |
+| CCPImagePrefix | `create` | If provided, the image prefix (or registry) of the PostgreSQL container image, e.g. `registry.developers.crunchydata.com/crunchydata`. The default is to use the image prefix set in the PostgreSQL Operator configuration. |
+| CCPImageTag | `create` | The tag of the PostgreSQL container image to use, e.g. `{{< param ubiBase >}}-{{< param postgresVersion >}}-{{< param operatorVersion >}}`. |
+| CollectSecretName | `create` | An optional attribute unless `crunchy-postgres-exporter` is specified in the `UserLabels`; contains the name of a Kubernetes Secret that contains the credentials for a PostgreSQL user that is used for metrics collection, and is created when the PostgreSQL cluster is first bootstrapped. For more information, please see `User Secret Specification`.|
+| ClusterName | `create` | The name of the PostgreSQL cluster, e.g. `hippo`. This is used to group PostgreSQL instances (primary, replicas) together. |
+| CustomConfig | `create` | If specified, references a custom ConfigMap to use when bootstrapping a PostgreSQL cluster. For the shape of this file, please see the section on [Custom Configuration]({{< relref "/advanced/custom-configuration.md" >}}) |
+| Database | `create` | The name of a database that the PostgreSQL user can log into after the PostgreSQL cluster is created. |
+| ExporterLimits | `create`, `update` | Specify the container resource limits that the `crunchy-postgres-exporter` sidecar uses when it is deployed with a PostgreSQL instance. Follows the [Kubernetes definitions of resource limits](https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/#resource-requests-and-limits-of-pod-and-container). |
+| ExporterPort | `create` | If the `"crunchy-postgres-exporter"` label is set in `UserLabels`, then this specifies the port that the metrics sidecar runs on (e.g. `9187`) |
+| ExporterResources | `create`, `update` | Specify the container resource requests that the `crunchy-postgres-exporter` sidecar uses when it is deployed with a PostgreSQL instance. Follows the [Kubernetes definitions of resource requests](https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/#resource-requests-and-limits-of-pod-and-container). |
+| Limits | `create`, `update` | Specify the container resource limits that the PostgreSQL cluster should use. Follows the [Kubernetes definitions of resource limits](https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/#resource-requests-and-limits-of-pod-and-container). |
+| Name | `create` | The name of the PostgreSQL instance that is the primary. On creation, this should be set to be the same as `ClusterName`. |
+| Namespace | `create` | The Kubernetes Namespace that the PostgreSQL cluster is deployed in. |
+| PGBadgerPort | `create` | If the `"crunchy-pgbadger"` label is set in `UserLabels`, then this specifies the port that the pgBadger sidecar runs on (e.g. `10000`) |
+| PGDataSource | `create` | Used to indicate if a PostgreSQL cluster should bootstrap its data from a pgBackRest repository. This uses the PostgreSQL Data Source Specification, described below. |
+| PGOImagePrefix | `create` | If provided, the image prefix (or registry) of any PostgreSQL Operator images that are used for jobs, e.g. `registry.developers.crunchydata.com/crunchydata`. The default is to use the image prefix set in the PostgreSQL Operator configuration. |
+| PgBouncer | `create`, `update` | If specified, defines the attributes to use for the pgBouncer connection pooling deployment that can be used in conjunction with this PostgreSQL cluster. Please see the specification defined below. |
+| PodAntiAffinity | `create` | A required section. Sets the [pod anti-affinity rules]({{< relref "/architecture/high-availability/_index.md#how-the-crunchy-postgresql-operator-uses-pod-anti-affinity" >}}) for the PostgreSQL cluster and associated deployments. Please see the `Pod Anti-Affinity Specification` section below. |
+| Policies | `create` | If provided, a comma-separated list referring to `pgpolicies.crunchydata.com.Spec.Name` that should be run once the PostgreSQL primary is first initialized. |
+| Port | `create` | The port that PostgreSQL will run on, e.g. `5432`. |
+| PrimaryStorage | `create` | A specification that gives information about the storage attributes for the primary instance in the PostgreSQL cluster. For details, please see the `Storage Specification` section below. This is required. |
+| RootSecretName | `create` | The name of a Kubernetes Secret that contains the credentials for a PostgreSQL _replication user_ that is created when the PostgreSQL cluster is first bootstrapped. For more information, please see `User Secret Specification`.|
+| ReplicaStorage | `create` | A specification that gives information about the storage attributes for any replicas in the PostgreSQL cluster. For details, please see the `Storage Specification` section below. This will likely be changed in the future based on the nature of the high-availability system, but presently it is still required that you set it. It is recommended you use similar settings to that of `PrimaryStorage`. |
+| Replicas | `create` | The number of replicas to create after a PostgreSQL primary is first initialized. This only works on create; to scale a cluster after it is initialized, please use the [`pgo scale`]({{< relref "/pgo-client/reference/pgo_scale.md" >}}) command. |
+| Resources | `create`, `update` | Specify the container resource requests that the PostgreSQL cluster should use. Follows the [Kubernetes definitions of resource requests](https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/#resource-requests-and-limits-of-pod-and-container). |
+| RootSecretName | `create` | The name of a Kubernetes Secret that contains the credentials for a PostgreSQL superuser that is created when the PostgreSQL cluster is first bootstrapped. For more information, please see `User Secret Specification`.|
+| SyncReplication | `create` | If set to `true`, specifies the PostgreSQL cluster to use [synchronous replication]({{< relref "/architecture/high-availability/_index.md#how-the-crunchy-postgresql-operator-uses-pod-anti-affinity#synchronous-replication-guarding-against-transactions-loss" >}}).|
+| User | `create` | The name of the PostgreSQL user that is created when the PostgreSQL cluster is first created. |
+| UserLabels | `create` | A set of key-value string pairs that are used as a sort of "catch-all" for things that really should be modeled in the CRD. These values do get copied to the actually CR labels. If you want to set up metrics collection or pgBadger, you would specify `"crunchy-postgres-exporter": "true"` and `"crunchy-pgbadger": "true"` here, respectively. However, this structure does need to be set, so just follow whatever is in the example. |
+| UserSecretName | `create` | The name of a Kubernetes Secret that contains the credentials for a standard PostgreSQL user that is created when the PostgreSQL cluster is first bootstrapped. For more information, please see `User Secret Specification`.|
+| TablespaceMounts | `create`,`update` | Lists any tablespaces that are attached to the PostgreSQL cluster. Tablespaces can be added at a later time by updating the `TablespaceMounts` entry, but they cannot be removed. Stores a map of information, with the key being the name of the tablespace, and the value being a Storage Specification, defined below. |
+| TLS | `create` | Defines the attributes for enabling TLS for a PostgreSQL cluster. See TLS Specification below. |
+| TLSOnly | `create` | If set to true, requires client connections to use only TLS to connect to the PostgreSQL database. |
+| Standby | `create`, `update` | If set to true, indicates that the PostgreSQL cluster is a "standby" cluster, i.e. is in read-only mode entirely. Please see [Kubernetes Multi-Cluster Deployments]({{< relref "/architecture/high-availability/multi-cluster-kubernetes.md" >}}) for more information. |
+| Shutdown | `create`, `update` | If set to true, indicates that a PostgreSQL cluster should shutdown. If set to false, indicates that a PostgreSQL cluster should be up and running. |
+
+##### Storage Specification
+
+The storage specification is a spec that defines attributes about the storage to
+be used for a particular function of a PostgreSQL cluster (e.g. a primary
+instance or for the pgBackRest backup repository). The below describes each
+attribute and how it works.
+
+| Attribute | Action | Description |
+|-----------|--------|-------------|
+| AccessMode| `create` | The name of the Kubernetes Persistent Volume [Access Mode](https://kubernetes.io/docs/concepts/storage/persistent-volumes/#access-modes) to use. |
+| MatchLabels | `create` | Only used with `StorageType` of `create`, used to match a particular subset of provisioned Persistent Volumes. |
+| Name | `create` | Only needed for `PrimaryStorage` in `pgclusters.crunchydata.com`.Used to identify the name of the PostgreSQL cluster. Should match `ClusterName`. |
+| Size | `create` | The size of the [Persistent Volume Claim](https://kubernetes.io/docs/concepts/storage/persistent-volumes/#persistentvolumeclaims) (PVC). Must use a Kubernetes resource value, e.g. `20Gi`. |
+| StorageClass | `create` | The name of the Kubernetes [StorageClass](https://kubernetes.io/docs/concepts/storage/storage-classes/) to use. |
+| StorageType | `create` | Set to `create` if storage is provisioned (e.g. using `hostpath`). Set to `dynamic` if using a dynamic storage provisioner, e.g. via a `StorageClass`. |
+| SupplementalGroups | `create` | If provided, a comma-separated list of group IDs to use in case it is needed to interface with a particular storage system. Typically used with NFS or hostpath storage. |
+
+##### Pod Anti-Affinity Specification
+
+Sets the [pod anti-affinity]({{< relref "/architecture/high-availability/_index.md#how-the-crunchy-postgresql-operator-uses-pod-anti-affinity" >}})
+for the PostgreSQL cluster and associated deployments. Each attribute can
+contain one of the following values:
+
+- `required`
+- `preferred` (which is also the recommended default)
+- `disabled`
+
+For a detailed explanation for how this works. Please see the [high-availability]({{< relref "/architecture/high-availability/_index.md#how-the-crunchy-postgresql-operator-uses-pod-anti-affinity" >}})
+documentation.
+
+| Attribute | Action | Description |
+|-----------|--------|-------------|
+| Default | `create` | The default pod anti-affinity to use for all Pods managed in a given PostgreSQL cluster. |
+| PgBackRest | `create` | If set to a value that differs from `Default`, specifies the pod anti-affinity to use for just the pgBackRest repository. |
+| PgBouncer | `create` | If set to a value that differs from `Default`, specifies the pod anti-affinity to use for just the pgBouncer Pods. |
+
+##### PostgreSQL Data Source Specification
+
+This specification is used when one wants to bootstrap the data in a PostgreSQL
+cluster from a pgBackRest repository. This can be a pgBackRest repository that
+is attached to an active PostgreSQL cluster or is kept around to be used for
+spawning new PostgreSQL clusters.
+
+| Attribute | Action | Description |
+|-----------|--------|-------------|
+| RestoreFrom | `create` | The name of a PostgreSQL cluster, active or former, that will be used for bootstrapping the data of a new PostgreSQL cluster. |
+| RestoreOpts | `create` | Additional pgBackRest [restore options](https://pgbackrest.org/command.html#command-restore) that can be used as part of the bootstrapping operation, for example, point-in-time-recovery options. |
+
+##### TLS Specification
+
+The TLS specification makes a reference to the various secrets that are required
+to enable TLS in a PostgreSQL cluster. For more information on how these secrets
+should be structured, please see [Enabling TLS in a PostgreSQL Cluster]({{< relref "/pgo-client/common-tasks.md#enable-tls" >}}).
+
+| Attribute | Action | Description |
+|-----------|--------|-------------|
+| CASecret | `create` | A reference to the name of a Kubernetes Secret that specifies a certificate authority for the PostgreSQL cluster to trust. |
+| ReplicationTLSSecret | `create` | A reference to the name of a Kubernetes TLS Secret that contains a keypair for authenticating the replication user. Must be used with `CASecret` and `TLSSecret`. |
+| TLSSecret | `create` | A reference to the name of a Kubernetes TLS Secret that contains a keypair that is used for the PostgreSQL instance to identify itself and perform TLS communications with PostgreSQL clients. Must be used with `CASecret`. |
+
+##### pgBouncer Specification
+
+The pgBouncer specification defines how a pgBouncer deployment can be deployed
+alongside the PostgreSQL cluster. pgBouncer is a PostgreSQL connection pooler
+that can also help manage connection state, and is helpful to deploy alongside
+a PostgreSQL cluster to help with failover scenarios too.
+
+| Attribute | Action | Description |
+|-----------|--------|-------------|
+| Limits | `create`, `update` | Specify the container resource limits that the pgBouncer Pods should use. Follows the [Kubernetes definitions of resource limits](https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/#resource-requests-and-limits-of-pod-and-container). |
+| Replicas | `create`, `update` | The number of pgBouncer instances to deploy. Must be set to at least `1` to deploy pgBouncer. Setting to `0` removes an existing pgBouncer deployment for the PostgreSQL cluster. |
+| Resources | `create`, `update` | Specify the container resource requests that the pgBouncer Pods should use. Follows the [Kubernetes definitions of resource requests](https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/#resource-requests-and-limits-of-pod-and-container). |
+
+##### Annotations Specification
+
+The `pgcluster.crunchydata.com` specification contains a block that allows for
+custom [Annotations](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/)
+to be applied to the Deployments that are managed by the PostgreSQL Operator,
+including:
+
+- PostgreSQL
+- pgBackRest
+- pgBouncer
+
+This also includes the option to apply Annotations globally across the three
+different deployment groups.
+
+| Attribute | Action | Description |
+|-----------|--------|-------------|
+| Backrest | `create`, `update` | Specify annotations that are only applied to the pgBackRest deployments |
+| Global | `create`, `update` | Specify annotations that are applied to the PostgreSQL, pgBackRest, and pgBouncer deployments |
+| PgBouncer | `create`, `update` | Specify annotations that are only applied to the pgBouncer deployments |
+| Postgres | `create`, `update` | Specify annotations that are only applied to the PostgreSQL deployments |
+
+### `pgreplicas.crunchydata.com`
+
+The `pgreplicas.crunchydata.com` Custom Resource Definition contains information
+pertaning to the structure of PostgreSQL replicas associated within a PostgreSQL
+cluster. All of the attributes only affect the replica when it is created.
+
+#### Specification (`Spec`)
+
+| Attribute | Action | Description |
+|-----------|--------|-------------|
+| ClusterName | `create` | The name of the PostgreSQL cluster, e.g. `hippo`. This is used to group PostgreSQL instances (primary, replicas) together. |
+| Name | `create` | The name of this PostgreSQL replica. It should be unique within a `ClusterName`. |
+| Namespace | `create` | The Kubernetes Namespace that the PostgreSQL cluster is deployed in. |
+| ReplicaStorage | `create` | A specification that gives information about the storage attributes for any replicas in the PostgreSQL cluster. For details, please see the `Storage Specification` section in the `pgclusters.crunchydata.com` description. This will likely be changed in the future based on the nature of the high-availability system, but presently it is still required that you set it. It is recommended you use similar settings to that of `PrimaryStorage`. |
+| UserLabels | `create` | A set of key-value string pairs that are used as a sort of "catch-all" for things that really should be modeled in the CRD. These values do get copied to the actually CR labels. If you want to set up metrics collection, you would specify `"crunchy-postgres-exporter": "true"` here. This also allows for node selector pinning using `NodeLabelKey` and `NodeLabelValue`. However, this structure does need to be set, so just follow whatever is in the example. |
diff --git a/docs/content/installation/_index.md b/docs/content/installation/_index.md
index 909561ce46..036a080a4e 100644
--- a/docs/content/installation/_index.md
+++ b/docs/content/installation/_index.md
@@ -5,10 +5,10 @@ draft: false
weight: 40
---
-There are several different ways to install and deploy the [PostgreSQL Operator](https://www.crunchydata.com/developers/download-postgres/containers/postgres-operator)
+There are several different ways to install and deploy the [PGO, the Postgres Operator](https://www.crunchydata.com/developers/download-postgres/containers/postgres-operator)
based upon your use case.
-For the vast majority of use cases, we recommend using the [PostgreSQL Operator Installer]({{< relref "/installation/postgres-operator.md" >}}),
+For the vast majority of use cases, we recommend using the [Postgres Operator Installer]({{< relref "/installation/postgres-operator.md" >}}),
which uses the `pgo-deployer` container to set up all of the objects required to
run the PostgreSQL Operator.
diff --git a/docs/content/installation/configuration.md b/docs/content/installation/configuration.md
index 1a09b4afaa..64ca97aaac 100644
--- a/docs/content/installation/configuration.md
+++ b/docs/content/installation/configuration.md
@@ -5,9 +5,9 @@ draft: false
weight: 40
---
-# PostgreSQL Operator Installer Configuration
+# PGO Installer Configuration
-When installing the PostgreSQL Operator you have many configuration options, these
+When installing PGO, the Postgres Operator you have many configuration options, these
options are listed in this section.
## General Configuration
@@ -31,7 +31,7 @@ Operator.
| `ccp_image_prefix` | registry.developers.crunchydata.com/crunchydata | **Required** | Configures the image prefix used when creating containers from Crunchy Container Suite. |
| `ccp_image_pull_secret` | | | Name of a Secret containing credentials for container image registries. |
| `ccp_image_pull_secret_manifest` | | | Provide a path to the Secret manifest to be installed in each namespace. (optional) |
-| `ccp_image_tag` | {{< param centosBase >}}-{{< param postgresVersion >}}-{{< param operatorVersion >}} | **Required** | Configures the image tag (version) used when creating containers from Crunchy Container Suite. |
+| `ccp_image_tag` | {{< param ubiBase >}}-{{< param postgresVersion >}}-{{< param operatorVersion >}} | **Required** | Configures the image tag (version) used when creating containers from Crunchy Container Suite. |
| `create_rbac` | true | **Required** | Set to true if the installer should create the RBAC resources required to run the PostgreSQL Operator. |
| `crunchy_debug` | false | | Set to configure Operator to use debugging mode. Note: this can cause sensitive data such as passwords to appear in Operator logs. |
| `db_name` | | | Set to a value to configure the default database name on all newly created clusters. By default, the PostgreSQL Operator will set it to the name of the cluster that is being created. |
@@ -53,12 +53,12 @@ Operator.
| `namespace_mode` | dynamic | | Determines which namespace permissions are assigned to the PostgreSQL Operator using a ClusterRole. Options: `dynamic`, `readonly`, and `disabled` |
| `pgbadgerport` | 10000 | **Required** | Set to configure the default port used to connect to pgbadger. |
| `pgo_add_os_ca_store` | false | **Required** | When true, includes system default certificate authorities. |
-| `pgo_admin_password` | examplepassword | **Required** | Configures the pgo administrator password. |
+| `pgo_admin_password` | examplepassword | | Configures the pgo administrator password. When blank, a random password is generated. |
| `pgo_admin_perms` | * | **Required** | Sets the access control rules provided by the PostgreSQL Operator RBAC resources for the PostgreSQL Operator administrative account that is created by this installer. Defaults to allowing all of the permissions, which is represented with the * |
| `pgo_admin_role_name` | pgoadmin | **Required** | Sets the name of the PostgreSQL Operator role that is utilized for administrative operations performed by the PostgreSQL Operator. |
| `pgo_admin_username` | admin | **Required** | Configures the pgo administrator username. |
| `pgo_apiserver_port` | 8443 | | Set to configure the port used by the Crunchy PostgreSQL Operator apiserver. |
-| `pgo_apiserver_url` | https://postgres-operator | | Sets the `pgo_apiserver_url` for the `pgo-client` deployment. |
+| `pgo_apiserver_url` | https://postgres-operator | | Sets the `pgo_apiserver_url` for the `pgo-client` deployment. Note that the URL should **not** end in a `/`. |
| `pgo_client_cert_secret` | pgo.tls | | Sets the secret that the `pgo-client` will use when connecting to the PostgreSQL Operator. |
| `pgo_client_container_install` | false | | Run the `pgo-client` deployment with the PostgreSQL Operator. |
| `pgo_client_install` | true | | Enable to download the `pgo` client binary as part of the Ansible install |
@@ -69,7 +69,7 @@ Operator.
| `pgo_image_prefix` | registry.developers.crunchydata.com/crunchydata | **Required** | Configures the image prefix used when creating containers for the Crunchy PostgreSQL Operator (apiserver, operator, scheduler..etc). |
| `pgo_image_pull_secret` | | | Name of a Secret containing credentials for container image registries. |
| `pgo_image_pull_secret_manifest` | | | Provide a path to the Secret manifest to be installed in each namespace. (optional) |
-| `pgo_image_tag` | {{< param centosBase >}}-{{< param operatorVersion >}} | **Required** | Configures the image tag used when creating containers for the Crunchy PostgreSQL Operator (apiserver, operator, scheduler..etc) |
+| `pgo_image_tag` | {{< param ubiBase >}}-{{< param operatorVersion >}} | **Required** | Configures the image tag used when creating containers for the Crunchy PostgreSQL Operator (apiserver, operator, scheduler..etc) |
| `pgo_installation_name` | devtest | **Required** | The name of the PGO installation. |
| `pgo_noauth_routes` | | | Configures URL routes with mTLS and HTTP BasicAuth disabled. |
| `pgo_operator_namespace` | pgo | **Required** | Set to configure the namespace where Operator will be deployed. |
@@ -135,8 +135,8 @@ other storage classes in production deployments.
| Name | Default | Required | Description |
|------|---------|----------|-------------|
-| `backrest_storage` | hostpathstorage | **Required** | Set the value of the storage configuration to use for the pgbackrest shared repository deployment created when a user specifies pgbackrest to be enabled on a cluster. |
-| `backup_storage` | hostpathstorage | **Required** | Set the value of the storage configuration to use for backups, including the storage for pgbackrest repo volumes. |
+| `backrest_storage` | hostpathstorage | **Required** | Set the value of the storage configuration to use for the pgBackRest repository. |
+| `backup_storage` | hostpathstorage | **Required** | required, the value of the storage configuration to use for backups generated by `pg_dump`. |
| `primary_storage` | hostpathstorage | **Required** | Set to configure which storage definition to use when creating volumes used by PostgreSQL primaries on all newly created clusters. |
| `replica_storage` | hostpathstorage | **Required** | Set to configure which storage definition to use when creating volumes used by PostgreSQL replicas on all newly created clusters. |
| `wal_storage` | | | Set to configure which storage definition to use when creating volumes used for PostgreSQL Write-Ahead Log. |
diff --git a/docs/content/installation/metrics/metrics-configuration.md b/docs/content/installation/metrics/metrics-configuration.md
index 7d343480cf..d8a6bbf55f 100644
--- a/docs/content/installation/metrics/metrics-configuration.md
+++ b/docs/content/installation/metrics/metrics-configuration.md
@@ -25,7 +25,7 @@ These variables affect the general configuration of PostgreSQL Operator Monitori
| `create_rbac` | true | **Required** | Set to true if the installer should create the RBAC resources required to run the PostgreSQL Operator Monitoring infrastructure. |
| `db_port` | 5432 | **Required** | Set to configure the PostgreSQL port used by all PostgreSQL clusters. |
| `delete_metrics_namespace` | false | | Set to configure whether or not the metrics namespace (defined using variable `metrics_namespace`) is deleted when uninstalling the monitoring infrastructure. |
-| `disable_fsgroup` | false | | Set to `true` for deployments where you do not want to have the default PostgreSQL fsGroup (26) set. The typical usage is in OpenShift environments that have a `restricted` Security Context Constraints. |
+| `disable_fsgroup` | false | | Set to `true` for deployments where you do not want to have the default PostgreSQL fsGroup (26) set. The typical usage is in OpenShift environments that have a `restricted` Security Context Constraints. If you use the `anyuid` SCC, you would want to set this to `false`. The Postgres Operator will set this value appropriately by default, except for when using the `anyuid` SCC. |
| `grafana_admin_password` | admin | **Required** | Set to configure the login password for the Grafana administrator. |
| `grafana_admin_username` | admin | **Required** | Set to configure the login username for the Grafana administrator. |
| `grafana_install` | true | **Required** | Set to true to install Grafana to visualize metrics. |
@@ -108,7 +108,7 @@ and tag as needed to use the RedHat certified containers:
| `alertmanager_image_tag` | v0.21.0 | **Required** | Configures the image tag to use for the Alertmanager container. |
| `grafana_image_prefix` | grafana | **Required** | Configures the image prefix to use for the Grafana container.|
| `grafana_image_name` | grafana | **Required** | Configures the image name to use for the Grafana container. |
-| `grafana_image_tag` | 6.7.4 | **Required** | Configures the image tag to use for the Grafana container. |
+| `grafana_image_tag` | 6.7.5 | **Required** | Configures the image tag to use for the Grafana container. |
| `prometheus_image_prefix` | prom | **Required** | Configures the image prefix to use for the Prometheus container. |
| `prometheus_image_name` | promtheus | **Required** | Configures the image name to use for the Prometheus container. |
| `prometheus_image_tag` | v2.20.0 | **Required** | Configures the image tag to use for the Prometheus container. |
@@ -124,7 +124,7 @@ PostgreSQL Operator Monitoring infrastructure:
| Name | Default | Required | Description |
|------|---------|----------|-------------|
-| `pgo_image_prefix` | registry.developers.crunchydata.com/crunchydata | **Required** | Configures the image prefix used by the `pgo-deployer` container |
-| `pgo_image_tag` | {{< param centosBase >}}-{{< param operatorVersion >}} | **Required** | Configures the image tag used by the `pgo-deployer` container |
+| `pgo_image_prefix` | registry.developers.crunchydata.com/crunchydata | **Required** | Configures the image prefix used by the `pgo-deployer` container |
+| `pgo_image_tag` | {{< param ubiBase >}}-{{< param operatorVersion >}} | **Required** | Configures the image tag used by the `pgo-deployer` container |
-[k8s-service-type]: https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types
\ No newline at end of file
+[k8s-service-type]: https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types
diff --git a/docs/content/installation/metrics/other/ansible/_index.md b/docs/content/installation/metrics/other/ansible/_index.md
index cede0bb875..e48c6801dd 100644
--- a/docs/content/installation/metrics/other/ansible/_index.md
+++ b/docs/content/installation/metrics/other/ansible/_index.md
@@ -5,17 +5,17 @@ draft: false
weight: 10
---
-# Crunchy Data PostgreSQL Operator Monitoring Playbooks
+# PGO: Postgres Operator Monitoring Playbooks
-The Crunchy Data PostgreSQL Operator Monitoring Playbooks contain [Ansible](https://www.ansible.com/)
+PGO, the Postgres Operator from Crunchy Data, Monitoring Playbooks contain [Ansible](https://www.ansible.com/)
roles for installing and managing the [Crunchy Data PostgreSQL Operator Monitoring infrastructure]({{< relref "/installation/other/ansible/installing-operator.md" >}}).
## Features
The playbooks provided allow users to:
-* install PostgreSQL Operator Monitoring on Kubernetes and OpenShift
-* install PostgreSQL Operator from a Linux, Mac or Windows (Ubuntu subsystem) host
+* install PGO Monitoring on Kubernetes and OpenShift
+* install PGO from a Linux, Mac or Windows (Ubuntu subsystem) host
* support a variety of deployment models
## Resources
diff --git a/docs/content/installation/metrics/other/ansible/metrics-prerequisites.md b/docs/content/installation/metrics/other/ansible/metrics-prerequisites.md
index 1e9d31164d..116559ea30 100644
--- a/docs/content/installation/metrics/other/ansible/metrics-prerequisites.md
+++ b/docs/content/installation/metrics/other/ansible/metrics-prerequisites.md
@@ -62,7 +62,6 @@ if you are being using them for your environment. Both sets of variables cannot
be used at the same time. The unused variables should be left commented out or removed.
{{% /notice %}}
-
| Name | Default | Required | Description |
|-----------------------------------|-------------|----------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `kubernetes_context` | | **Required**, if deploying to Kubernetes |When deploying to Kubernetes, set to configure the context name of the kubeconfig to be used for authentication. |
@@ -83,10 +82,15 @@ kubectl config current-context
## Configuring - `values.yaml`
The `values.yaml` file contains all of the configuration parameters
-for deploying the PostgreSQL Operator Monitoring infrastructure.
+for deploying the PostgreSQL Operator Monitoring infrastructure.
The [example file](https://github.com/CrunchyData/postgres-operator/blob/v{{< param operatorVersion >}}/installers/metrics/ansible/values.yaml)
contains defaults that should work in most Kubernetes environments, but it may
require some customization.
+Note that in OpenShift and CodeReady Containers you will need to set the
+`disable_fsgroup` to `true` attribute to `true` if you are using the
+`restricted` Security Context Constraint (SCC). If you are using the `anyuid`
+SCC, you will need to set `disable_fsgroup` to `false`.
+
For a detailed description of each configuration parameter, please read the
[PostgreSQL Operator Installer Metrics Configuration Reference](<{{< relref "/installation/metrics/metrics-configuration.md">}}>)
diff --git a/docs/content/installation/metrics/other/helm-metrics.md b/docs/content/installation/metrics/other/helm-metrics.md
index fb94918003..e09a1ae5c8 100644
--- a/docs/content/installation/metrics/other/helm-metrics.md
+++ b/docs/content/installation/metrics/other/helm-metrics.md
@@ -57,10 +57,15 @@ file will be used to populate the configuation options in the ConfigMap.
### Configuration - `values.yaml`
The `values.yaml` file contains all of the configuration parameters for deploying
-the PostgreSQL Operator Monitoring infrastructure.
+the PostgreSQL Operator Monitoring infrastructure.
The [values.yaml file](https://github.com/CrunchyData/postgres-operator/blob/master/installers/metrics/helm/values.yaml)
contains the defaults that should work in most Kubernetes environments, but it may require some customization.
+Note that in OpenShift and CodeReady Containers you will need to set the
+`disable_fsgroup` to `true` attribute to `true` if you are using the
+`restricted` Security Context Constraint (SCC). If you are using the `anyuid`
+SCC, you will need to set `disable_fsgroup` to `false`.
+
For a detailed description of each configuration parameter, please read the
[PostgreSQL Operator Monitoring Installer Configuration Reference](<{{< relref "/installation/metrics/metrics-configuration.md">}}>)
@@ -81,11 +86,11 @@ upgrade and uninstall the PostgreSQL Operator.
## Upgrade and Uninstall
-Once install has be completed using Helm, it will also be used to upgrade and
+Once install has be completed using Helm, it will also be used to upgrade and
uninstall your PostgreSQL Operator.
{{% notice tip %}}
-The `name` and `namespace` in the following sections should match the options
+The `name` and `namespace` in the following sections should match the options
provided at install.
{{% /notice %}}
@@ -111,7 +116,7 @@ helm uninstall -n
## Debugging
-When the `pgo-deployer` job does not complete successfully, the resources that
+When the `pgo-deployer` job does not complete successfully, the resources that
are created and normally cleaned up by Helm will be left in your
Kubernetes cluster. This will allow you to use the failed job and its logs to
debug the issue. The following command will show the logs for the `pgo-deployer`
diff --git a/docs/content/installation/metrics/postgres-operator-metrics.md b/docs/content/installation/metrics/postgres-operator-metrics.md
index a077862ba9..2440ebfa66 100644
--- a/docs/content/installation/metrics/postgres-operator-metrics.md
+++ b/docs/content/installation/metrics/postgres-operator-metrics.md
@@ -18,6 +18,11 @@ kubectl create namespace pgo
kubectl apply -f https://raw.githubusercontent.com/CrunchyData/postgres-operator/v{{< param operatorVersion >}}/installers/metrics/kubectl/postgres-operator-metrics.yml
```
+Note that in OpenShift and CodeReady Containers you will need to set the
+`disable_fsgroup` to `true` attribute to `true` if you are using the
+`restricted` Security Context Constraint (SCC). If you are using the `anyuid`
+SCC, you will need to set `disable_fsgroup` to `false`.
+
However, we still advise that you read onward to see how to properly configure
the PostgreSQL Operator Monitoring infrastructure.
@@ -53,13 +58,13 @@ environmental requirements.
By default, the `pgo-deployer` uses a ServiceAccount called `pgo-metrics-deployer-sa`
that has a ClusterRoleBinding (`pgo-metrics-deployer-crb`) with several ClusterRole
permissions. This ClusterRole is needed for the initial configuration and deployment
-of the various applications comprising the monitoring infrastructure. This includes permissions
+of the various applications comprising the monitoring infrastructure. This includes permissions
to create:
* RBAC for use by Prometheus and/or Grafana
* The metrics namespace
-The required list of privileges are available in the
+The required list of privileges are available in the
[postgres-operator-metrics.yml](https://raw.githubusercontent.com/CrunchyData/postgres-operator/v{{< param operatorVersion >}}/installers/metrics/kubectl/postgres-operator-metrics.yml)
file:
@@ -95,6 +100,11 @@ for deploying PostgreSQL Operator Monitoring. The [example file](https://github.
contains defaults that should work in most Kubernetes environments, but it may
require some customization.
+Note that in OpenShift and CodeReady Containers you will need to set the
+`disable_fsgroup` to `true` attribute to `true` if you are using the
+`restricted` Security Context Constraint (SCC). If you are using the `anyuid`
+SCC, you will need to set `disable_fsgroup` to `false`.
+
For a detailed description of each configuration parameter, please read the
[PostgreSQL Operator Monitoring Installer Configuration Reference](<{{< relref "/installation/metrics/metrics-configuration.md">}}>)
@@ -103,7 +113,7 @@ For a detailed description of each configuration parameter, please read the
The deploy job can be used to perform different deployment actions for the
PostgreSQL Operator Monitoring infrastructure. When you run the job it will install
the monitoring infrastructure by default but you can change the deployment action to
-uninstall or update. The `DEPLOY_ACTION` environment variable in the `postgres-operator-metrics.yml`
+uninstall or update. The `DEPLOY_ACTION` environment variable in the `postgres-operator-metrics.yml`
file can be set to `install-metrics`, `update-metrics`, and `uninstall-metrics`.
### Image Pull Secrets
diff --git a/docs/content/installation/other/_index.md b/docs/content/installation/other/_index.md
index 54722b3e61..1dc5fd84b8 100644
--- a/docs/content/installation/other/_index.md
+++ b/docs/content/installation/other/_index.md
@@ -6,6 +6,6 @@ weight: 50
---
Though the years, we have built up several other methods for installing the
-PostgreSQL Operator. The next few sections provide some alternative ways of
+PGO. The next few sections provide some alternative ways of
deploying the PostgreSQL Operator. Some of these methods are deprecated and may
be removed in a future release.
diff --git a/docs/content/installation/other/ansible/_index.md b/docs/content/installation/other/ansible/_index.md
index 0cd09a034d..69a647511e 100644
--- a/docs/content/installation/other/ansible/_index.md
+++ b/docs/content/installation/other/ansible/_index.md
@@ -5,17 +5,17 @@ draft: false
weight: 100
---
-# Crunchy Data PostgreSQL Operator Playbooks
+# PGO: Postgres Operator Playbooks
-The Crunchy Data PostgreSQL Operator Playbooks contain [Ansible](https://www.ansible.com/)
+PGO, the Postgres Operator from Crunchy Data, Playbooks contain [Ansible](https://www.ansible.com/)
roles for installing and managing the [Crunchy Data PostgreSQL Operator]({{< relref "/installation/other/ansible/installing-operator.md" >}}).
## Features
The playbooks provided allow users to:
-* install PostgreSQL Operator on Kubernetes and OpenShift
-* install PostgreSQL Operator from a Linux, Mac or Windows (Ubuntu subsystem) host
+* install PGO on Kubernetes and OpenShift
+* install PGO from a Linux, Mac or Windows (Ubuntu subsystem) host
* generate TLS certificates required by the PostgreSQL Operator
* support a variety of deployment models
diff --git a/docs/content/installation/other/ansible/installing-operator.md b/docs/content/installation/other/ansible/installing-operator.md
index 8cc82d1448..520732ce72 100644
--- a/docs/content/installation/other/ansible/installing-operator.md
+++ b/docs/content/installation/other/ansible/installing-operator.md
@@ -56,38 +56,53 @@ oc get deployments -n
oc get pods -n
```
-## Configure Environment Variables
-
-After the Crunchy PostgreSQL Operator has successfully been installed we will need
-to configure local environment variables before using the `pgo` client.
+## Install the `pgo` Client
{{% notice info %}}
-
If TLS authentication was disabled during installation, please see the [TLS Configuration Page] ({{< relref "Configuration/tls.md" >}}) for additional configuration information.
-
{{% / notice %}}
-To configure the environment variables used by `pgo` run the following command:
+During or after the installation of PGO: the Postgres Operator, download the `pgo` client set up script. This will help set up your local environment for using the Postgres Operator:
-Note: `` should be replaced with the namespace the Crunchy PostgreSQL
-Operator was deployed to.
+```
+curl https://raw.githubusercontent.com/CrunchyData/postgres-operator/v{{< param operatorVersion >}}/installers/kubectl/client-setup.sh > client-setup.sh
+chmod +x client-setup.sh
+```
-```bash
-cat <> ~/.bashrc
-export PGOUSER="${HOME?}/.pgo//pgouser"
-export PGO_CA_CERT="${HOME?}/.pgo//client.crt"
-export PGO_CLIENT_CERT="${HOME?}/.pgo//client.crt"
-export PGO_CLIENT_KEY="${HOME?}/.pgo//client.key"
+When the Postgres Operator is done installing, run the client setup script:
+
+```
+./client-setup.sh
+```
+
+This will download the `pgo` client and provide instructions for how to easily use it in your environment. It will prompt you to add some environmental variables for you to set up in your session, which you can do with the following commands:
+
+```
+export PGOUSER="${HOME?}/.pgo/pgo/pgouser"
+export PGO_CA_CERT="${HOME?}/.pgo/pgo/client.crt"
+export PGO_CLIENT_CERT="${HOME?}/.pgo/pgo/client.crt"
+export PGO_CLIENT_KEY="${HOME?}/.pgo/pgo/client.key"
export PGO_APISERVER_URL='https://127.0.0.1:8443'
-EOF
+export PGO_NAMESPACE=pgo
```
-Apply those changes to the current session by running:
+If you wish to permanently add these variables to your environment, you can run the following:
+
+```
+cat <> ~/.bashrc
+export PGOUSER="${HOME?}/.pgo/pgo/pgouser"
+export PGO_CA_CERT="${HOME?}/.pgo/pgo/client.crt"
+export PGO_CLIENT_CERT="${HOME?}/.pgo/pgo/client.crt"
+export PGO_CLIENT_KEY="${HOME?}/.pgo/pgo/client.key"
+export PGO_APISERVER_URL='https://127.0.0.1:8443'
+export PGO_NAMESPACE=pgo
+EOF
-```bash
source ~/.bashrc
```
+**NOTE**: For macOS users, you must use `~/.bash_profile` instead of `~/.bashrc`
+
## Verify `pgo` Connection
In a separate terminal we need to setup a port forward to the Crunchy PostgreSQL
diff --git a/docs/content/installation/other/bash.md b/docs/content/installation/other/bash.md
index 52f4b5cdc6..e1994654f7 100644
--- a/docs/content/installation/other/bash.md
+++ b/docs/content/installation/other/bash.md
@@ -5,18 +5,18 @@ draft: false
weight: 100
---
-A full installation of the Operator includes the following steps:
+A full installation of PGO includes the following steps:
- create a project structure
- configure your environment variables
- - configure Operator templates
+ - configure PGO templates
- create security resources
- deploy the operator
- - install pgo CLI (end user command tool)
+ - install `pgo` client (end user command tool)
-Operator end-users are only required to install the pgo CLI client on their host and can skip the server-side installation steps. pgo CLI clients are provided for Linux, Mac, and Windows clients.
+PGO end-users are only required to install the `pgo` client on their host and can skip the server-side installation steps. `pgo` clients are provided for Linux, Mac, and Windows clients.
-The Operator can be deployed by multiple methods including:
+PGO can be deployed by multiple methods including:
* default installation
* Ansible playbook installation
@@ -25,7 +25,7 @@ The Operator can be deployed by multiple methods including:
## Default Installation - Create Project Structure
-The Operator follows a golang project structure, you can create a structure as follows on your local Linux host:
+PGO follows a golang project structure, you can create a structure as follows on your local Linux host:
mkdir -p $HOME/odev/src/github.com/crunchydata $HOME/odev/bin $HOME/odev/pkg
cd $HOME/odev/src/github.com/crunchydata
@@ -59,9 +59,9 @@ for Kubernetes events. This value is set as follows:
This means namespaces called *pgouser1* and *pgouser2* will be
created as part of the default installation.
-{{% notice warning %}}In Kubernetes versions prior to 1.12 (including Openshift up through 3.11), there is a limitation that requires an extra step during installation for the operator to function properly with watched namespaces. This limitation does not exist when using Kubernetes 1.12+. When a list of namespaces are provided through the NAMESPACE environment variable, the setupnamespaces.sh script handles the limitation properly in both the bash and ansible installation.
+{{% notice warning %}}In Kubernetes versions prior to 1.12 (including Openshift up through 3.11), there is a limitation that requires an extra step during installation for PGO to function properly with watched namespaces. This limitation does not exist when using Kubernetes 1.12+. When a list of namespaces are provided through the NAMESPACE environment variable, the setupnamespaces.sh script handles the limitation properly in both the bash and ansible installation.
-However, if the user wishes to add a new watched namespace after installation, where the user would normally use pgo create namespace to add the new namespace, they should instead run the add-targeted-namespace.sh script or they may give themselves cluster-admin privileges instead of having to run setupnamespaces.sh script. Again, this is only required when running on a Kubernetes distribution whose version is below 1.12. In Kubernetes version 1.12+ the pgo create namespace command works as expected.
+However, if the user wishes to add a new watched namespace after installation, where the user would normally use `pgo create namespace` to add the new namespace, they should instead run the add-targeted-namespace.sh script or they may give themselves cluster-admin privileges instead of having to run setupnamespaces.sh script. Again, this is only required when running on a Kubernetes distribution whose version is below 1.12. In Kubernetes version 1.12+ the pgo create namespace command works as expected.
{{% /notice %}}
@@ -83,13 +83,13 @@ Create the Operator namespaces using the Makefile target:
The [Design](/design) section of this documentation talks further about
the use of namespaces within the Operator.
-## Default Installation - Configure Operator Templates
+## Default Installation - Configure PGO Templates
-Within the Operator [*PGO_CONF_DIR*](/developer-setup/) directory are several configuration files and templates used by the Operator to determine the various resources that it deploys on your Kubernetes cluster, specifically the PostgreSQL clusters it deploys.
+Within PGO's [*PGO_CONF_DIR*](/developer-setup/) directory are several configuration files and templates used by PGO to determine the various resources that it deploys on your Kubernetes cluster, specifically the PostgreSQL clusters it deploys.
-When you install the Operator you must make choices as to what kind of storage the Operator has to work with for example. Storage varies with each installation. As an installer, you would modify these configuration templates used by the Operator to customize its behavior.
+When you install PGO you must make choices as to what kind of storage the Operator has to work with for example. Storage varies with each installation. As an installer, you would modify these configuration templates used by the Operator to customize its behavior.
-**Note**: when you want to make changes to these Operator templates and configuration files after your initial installation, you will need to re-deploy the Operator in order for it to pick up any future configuration changes.
+**Note**: when you want to make changes to these PGO templates and configuration files after your initial installation, you will need to re-deploy the Operator in order for it to pick up any future configuration changes.
Here are some common examples of configuration changes most installers would make:
@@ -110,12 +110,10 @@ Listed above are the *pgo.yaml* sections related to storage choices. *PrimarySt
This sort of configuration allows for a PostgreSQL primary and replica to use different storage if you want. Other storage settings like *AccessMode*, *Size*, *StorageType*, and *StorageClass* further define the storage configuration. Currently, NFS, HostPath, and Storage Classes are supported in the configuration.
-As part of the Operator installation, you will need to adjust these storage settings to suit your deployment requirements. For users wanting to try
+As part of PGO installation, you will need to adjust these storage settings to suit your deployment requirements. For users wanting to try
out the Operator on Google Kubernetes Engine you would make the
following change to the storage configuration in pgo.yaml:
-
-
For NFS Storage, it is assumed that there are sufficient Persistent Volumes (PV) created for the Operator to use when it creates Persistent Volume Claims (PVC). The creation of Persistent Volumes is something a Kubernetes cluster-admin user would typically provide before installing the Operator. There is an example script which can be used to create NFS Persistent Volumes located here:
./pv/create-nfs-pv.sh
@@ -135,11 +133,11 @@ Operator.
Other settings in *pgo.yaml* are described in the [pgo.yaml Configuration](/configuration/pgo-yaml-configuration) section of the documentation.
-## Operator Security
+## PGO Security
-The Operator implements its own RBAC (Role Based Access Controls) for authenticating Operator users access to the Operator REST API.
+PGO implements its own RBAC (Role Based Access Controls) for authenticating Operator users access to the PGO REST API.
-A default admin user is created when the operator is deployed. Create a .pgouser in your home directory and insert the text from below:
+A default admin user is created when PGO is deployed. Create a .pgouser in your home directory and insert the text from below:
```
admin:examplepassword
@@ -157,7 +155,7 @@ To create a unique administrator user on deployment of the operator edit this fi
$PGOROOT/deploy/install-bootstrap-creds.sh
```
-After installation users can create optional Operator users as follows:
+After installation users can create optional PGO users as follows:
```
pgo create pgouser someuser --pgouser-namespaces="pgouser1,pgouser2" --pgouser-password=somepassword --pgouser-roles="somerole,someotherrole"
@@ -166,13 +164,13 @@ pgo create pgouser someuser --pgouser-namespaces="pgouser1,pgouser2" --pgouser-p
Note, you can also store the pgouser file in alternate locations, see the
Security documentation for details.
-Operator security is discussed in the Security section [Security](/security) of the documentation.
+PGO security is further discussed in the section [Security]({{< relref "security/_index.md" >}}) section of the documentation.
Adjust these settings to meet your local requirements.
## Default Installation - Create Kubernetes RBAC Controls
-The Operator installation requires Kubernetes administrators to create Resources required by the Operator. These resources are only allowed to be created by a cluster-admin user. To install on Google Cloud, you will need a user
+PGO installation requires Kubernetes administrators to create Resources required by PGO. These resources are only allowed to be created by a cluster-admin user. To install on Google Cloud, you will need a user
account with cluster-admin privileges. If you own the GKE cluster you
are installing on, you can add cluster-admin role to your account as
follows:
@@ -185,9 +183,9 @@ Tor create the Kubernetes RBAC used by the Operator, run the following as a clus
make installrbac
-This set of Resources is created a single time unless a new Operator
+This set of Resources is created a single time unless a new PGO
release requires these Resources to be recreated. Note that when you
-run *make installrbac* the set of keys used by the Operator REST API and
+run *make installrbac* the set of keys used by the PGO REST API and
also the pgbackrest ssh keys are generated.
Verify the Operator Custom Resource Definitions are created as follows:
@@ -199,14 +197,15 @@ You should see the *pgclusters* CRD among the listed CRD resource types.
See the Security documentation for a description of the various RBAC
resources created and used by the Operator.
-## Default Installation - Deploy the Operator
+## Default Installation - Deploy PGO
+
At this point, you as a normal Kubernetes user should be able to deploy the Operator. To do this, run the following Makefile target:
make deployoperator
-This will cause any existing Operator to be removed first, then the configuration to be bundled into a ConfigMap, then the Operator Deployment to be created.
+This will cause any existing PGO installation to be removed first, then the configuration to be bundled into a ConfigMap, then the Operator Deployment to be created.
-This will create a postgres-operator Deployment and a postgres-operator Service.Operator administrators needing to make changes to the Operator
+This will create a postgres-operator Deployment and a postgres-operator Service.Operator administrators needing to make changes to the PGO
configuration would run this make target to pick up any changes to pgo.yaml,
pgo users/roles, or the Operator templates.
@@ -217,17 +216,20 @@ created using the default installation by running the following:
make cleannamespaces
-This will permanently delete each namespace the Operator installation
+This will permanently delete each namespace the PGO installation
created previously.
-## pgo CLI Installation
-Most users will work with the Operator using the *pgo* CLI tool. That tool is downloaded from the GitHub Releases page for the Operator (https://github.com/crunchydata/postgres-operator/releases). Crunchy Enterprise Customer can download the pgo binaries from https://access.crunchydata.com/ on the downloads page.
+## `pgo` client Installation
-The *pgo* client is provided in Mac, Windows, and Linux binary formats,
+Most users will work with the Operator using the `pgo` client. That tool is downloaded from the GitHub Releases page for the Operator (https://github.com/crunchydata/postgres-operator/releases). Crunchy Data customers can download the `pgo` binaries from https://access.crunchydata.com/ on the downloads page.
+
+The `pgo` client is provided in Mac, Windows, and Linux binary formats,
download the appropriate client to your local laptop or workstation to work
with a remote Operator.
+You can also use the `pgo-client` container.
+
{{% notice info %}}
If TLS authentication was disabled during installation, please see the [TLS Configuration Page] ({{< relref "Configuration/tls.md" >}}) for additional configuration information.
@@ -245,9 +247,9 @@ Prior to using *pgo*, users testing the Operator on a single host can specify th
pgo version
```
-That URL address needs to be reachable from your local *pgo* client host. Your Kubernetes administrator will likely need to create a network route, ingress, or LoadBalancer service to expose the Operator REST API to applications outside of the Kubernetes cluster. Your Kubernetes administrator might also allow you to run the Kubernetes port-forward command, contact your administrator for details.
+That URL address needs to be reachable from your local `pgo` client host. Your Kubernetes administrator will likely need to create a network route, ingress, or LoadBalancer service to expose the PGO REST API to applications outside of the Kubernetes cluster. Your Kubernetes administrator might also allow you to run the Kubernetes port-forward command, contact your administrator for details.
-Next, the *pgo* client needs to reference the keys used to secure the Operator REST API:
+Next, the `pgo` client needs to reference the keys used to secure the PGO REST API:
```
export PGO_CA_CERT=$PGOROOT/conf/postgres-operator/server.crt
@@ -259,7 +261,7 @@ You can also specify these keys on the command line as follows:
pgo version --pgo-ca-cert=$PGOROOT/conf/postgres-operator/server.crt --pgo-client-cert=$PGOROOT/conf/postgres-operator/server.crt --pgo-client-key=$PGOROOT/conf/postgres-operator/server.key
-{{% notice tip %}} if you are running the Operator on Google Cloud, you would open up another terminal and run *kubectl port-forward ...* to forward the Operator pod port 8443 to your localhost where you can access the Operator API from your local workstation.
+{{% notice tip %}} if you are running PGO on Google Cloud, you would open up another terminal and run *kubectl port-forward ...* to forward the Postgres Operator pod port 8443 to your localhost where you can access the PGO API from your local workstation.
{{% /notice %}}
At this point, you can test connectivity between your laptop or workstation and the Postgres Operator deployed on a Kubernetes cluster as follows:
@@ -270,7 +272,7 @@ You should get back a valid response showing the client and server version numbe
## Verify the Installation
-Now that you have deployed the Operator, you can verify that it is running correctly.
+Now that you have deployed PGO, you can verify that it is running correctly.
You should see a pod running that contains the Operator:
@@ -281,10 +283,10 @@ You should see a pod running that contains the Operator:
That pod should show 3 of 3 containers in *running* state and that the operator is installed into the *pgo* namespace.
-The sample environment script, examples/env.sh, if used creates some bash functions that you can use to view the Operator logs. This is useful in case you find one of the Operator containers not in a running status.
+The sample environment script, examples/env.sh, if used creates some bash functions that you can use to view the Postgres Operator logs. This is useful in case you find one of the PGO containers not in a running status.
-Using the pgo CLI, you can verify the versions of the client and server match as follows:
+Using the `pgo` client, you can verify the versions of the client and server match as follows:
pgo version
-This also tests connectivity between your pgo client host and the Operator server.
+This also tests connectivity between your `pgo` client host and Postgres Operator container.
diff --git a/docs/content/installation/other/google-cloud-marketplace.md b/docs/content/installation/other/google-cloud-marketplace.md
index 64fa52a684..78885dc7af 100644
--- a/docs/content/installation/other/google-cloud-marketplace.md
+++ b/docs/content/installation/other/google-cloud-marketplace.md
@@ -5,7 +5,7 @@ draft: false
weight: 200
---
-The PostgreSQL Operator is installed as part of [Crunchy PostgreSQL for GKE][gcm-listing]
+PGO: the PostgreSQL Operator from Crunchy Data is installed as part of [Crunchy PostgreSQL for GKE][gcm-listing]
that is available in the Google Cloud Marketplace.
[gcm-listing]: https://console.cloud.google.com/marketplace/details/crunchydata/crunchy-postgresql-operator
@@ -16,7 +16,6 @@ that is available in the Google Cloud Marketplace.
Install [Crunchy PostgreSQL for GKE][gcm-listing] to a Google Kubernetes Engine cluster using
Google Cloud Marketplace.
-
## Step 2: Verify Installation
Install `kubectl` using the `gcloud components` command of the [Google Cloud SDK][sdk-install] or
@@ -25,7 +24,7 @@ by following the [Kubernetes documentation][kubectl-install].
[kubectl-install]: https://kubernetes.io/docs/tasks/tools/install-kubectl/
[sdk-install]: https://cloud.google.com/sdk/docs/install
-Using the `gcloud` utility, ensure you are logged into the GKE cluster in which you installed the
+Using the `gcloud` utility, ensure you are logged into the GKE cluster in which you installed PGO, the
PostgreSQL Operator, and see that it is running in the namespace in which you installed it.
For example, in the `pgo` namespace:
@@ -44,7 +43,7 @@ pod/postgres-operator-56d6ccb97-tmz7m 4/4 Running 0 2m
```
-## Step 3: Install the PostgreSQL Operator User Keys
+## Step 3: Install the PGO User Keys
You will need to get TLS keys used to secure the Operator REST API. Again, in the `pgo` namespace:
@@ -54,9 +53,9 @@ kubectl -n pgo get secret pgo.tls -o 'go-template={{ index .data "tls.key" | bas
```
-## Step 4: Setup PostgreSQL Operator User
+## Step 4: Setup PGO User
-The PostgreSQL Operator implements its own role-based access control (RBAC) system for authenticating and authorization PostgreSQL Operator users access to its REST API. A default PostgreSQL Operator user (aka a "pgouser") is created as part of the marketplace installation (these credentials are set during the marketplace deployment workflow).
+PGO implements its own role-based access control (RBAC) system for authenticating and authorization PostgreSQL Operator users access to its REST API. A default PostgreSQL Operator user (aka a "pgouser") is created as part of the marketplace installation (these credentials are set during the marketplace deployment workflow).
Create the pgouser file in `${HOME?}/.pgo//pgouser` and insert the user and password you created on deployment of the PostgreSQL Operator via GCP Marketplace. For example, if you set up a user with the username of `username` and a password of `hippo`:
@@ -67,7 +66,7 @@ username:hippo
## Step 5: Setup Environment variables
-The PostgreSQL Operator Client uses several environmental variables to make it easier for interfacing with the PostgreSQL Operator.
+The `pgo` Client uses several environmental variables to make it easier for interfacing with the PGO, the Postgres Operator.
Set the environmental variables to use the key / certificate pair that you pulled in Step 3 was deployed via the marketplace. Using the previous examples, You can set up environment variables with the following command:
@@ -98,13 +97,13 @@ source ~/.bashrc
**NOTE**: For macOS users, you must use `~/.bash_profile` instead of `~/.bashrc`
-## Step 6: Install the PostgreSQL Operator Client `pgo`
+## Step 6: Install the `pgo` Client
-The [`pgo` client](/pgo-client/) provides a helpful command-line interface to perform key operations on a PostgreSQL Operator, such as creating a PostgreSQL cluster.
+The [`pgo` client](/pgo-client/) provides a helpful command-line interface to perform key operations on a PGO Deployment, such as creating a PostgreSQL cluster.
The `pgo` client can be downloaded from GitHub [Releases](https://github.com/crunchydata/postgres-operator/releases) (subscribers can download it from the [Crunchy Data Customer Portal](https://access.crunchydata.com)).
-Note that the `pgo` client's version must match the version of the PostgreSQL Operator that you have deployed. For example, if you have deployed version {{< param operatorVersion >}} of the PostgreSQL Operator, you must use the `pgo` for {{< param operatorVersion >}}.
+Note that the `pgo` client's version must match the deployed version of PGO. For example, if you have deployed version {{< param operatorVersion >}} of the PostgreSQL Operator, you must use the `pgo` for {{< param operatorVersion >}}.
Once you have download the `pgo` client, change the permissions on the file to be executable if need be as shown below:
@@ -112,9 +111,9 @@ Once you have download the `pgo` client, change the permissions on the file to b
chmod +x pgo
```
-## Step 7: Connect to the PostgreSQL Operator
+## Step 7: Connect to PGO
-Finally, let's see if we can connect to the PostgreSQL Operator from the `pgo` client. In order to communicate with the PostgreSQL Operator API server, you will first need to set up a [port forward](https://kubernetes.io/docs/tasks/access-application-cluster/port-forward-access-application-cluster/) to your local environment.
+Finally, let's see if we can connect to the Postgres Operator from the `pgo` client. In order to communicate with the PGO API server, you will first need to set up a [port forward](https://kubernetes.io/docs/tasks/access-application-cluster/port-forward-access-application-cluster/) to your local environment.
In a new console window, run the following command to set up a port forward:
@@ -137,7 +136,7 @@ pgo-apiserver version {{< param operatorVersion >}}
## Step 8: Create a Namespace
-We are almost there! You can optionally add a namespace that can be managed by the PostgreSQL Operator to watch and to deploy a PostgreSQL cluster into.
+We are almost there! You can optionally add a namespace that can be managed by PGO to watch and to deploy a PostgreSQL cluster into.
```shell
pgo create namespace wateringhole
@@ -194,4 +193,3 @@ cluster : hippo
```
The `pgo test` command provides you the basic information you need to connect to your PostgreSQL cluster from within your Kubernetes environment. For more detailed information, you can use `pgo show cluster -n wateringhole hippo`.
-
diff --git a/docs/content/installation/other/helm.md b/docs/content/installation/other/helm.md
index b4bab8ff26..43da7fd553 100644
--- a/docs/content/installation/other/helm.md
+++ b/docs/content/installation/other/helm.md
@@ -5,12 +5,13 @@ draft: false
weight: 100
---
-# The PostgreSQL Operator Helm Chart
+# PGO: The Postgres Operator Helm Chart
## Overview
-The PostgreSQL Operator comes with a container called `pgo-deployer` which
-handles a variety of lifecycle actions for the PostgreSQL Operator, including:
+PGO, the Postgres Operator from Crunchy Data, comes with a
+container called `pgo-deployer` which handles a variety of
+lifecycle actions for the PostgreSQL Operator, including:
- Installation
- Upgrading
@@ -178,11 +179,11 @@ pgo-apiserver version {{< param operatorVersion >}}
## Upgrade and Uninstall
-Once install has be completed using Helm, it will also be used to upgrade and
+Once install has be completed using Helm, it will also be used to upgrade and
uninstall your PostgreSQL Operator.
{{% notice tip %}}
-The `name` and `namespace` in the following sections should match the options
+The `name` and `namespace` in the following sections should match the options
provided at install.
{{% /notice %}}
@@ -208,7 +209,7 @@ helm uninstall -n
## Debugging
-When the `pgo-deployer` job does not complete successfully, the resources that
+When the `pgo-deployer` job does not complete successfully, the resources that
are created and normally cleaned up by Helm will be left in your
Kubernetes cluster. This will allow you to use the failed job and its logs to
debug the issue. The following command will show the logs for the `pgo-deployer`
diff --git a/docs/content/installation/other/operator-hub.md b/docs/content/installation/other/operator-hub.md
index 9b077ef073..f0fbdb0c52 100644
--- a/docs/content/installation/other/operator-hub.md
+++ b/docs/content/installation/other/operator-hub.md
@@ -6,7 +6,7 @@ weight: 200
---
If your Kubernetes cluster is already running the [Operator Lifecycle Manager][OLM],
-the PostgreSQL Operator can be installed as part of [Crunchy PostgreSQL for Kubernetes][hub-listing]
+then PGO, the Postgres Operator from Crunchy Data, can be installed as part of [Crunchy PostgreSQL for Kubernetes][hub-listing]
that is available in OperatorHub.io.
[hub-listing]: https://operatorhub.io/operator/postgresql
@@ -15,64 +15,23 @@ that is available in OperatorHub.io.
## Before You Begin
-There are a few manual steps that the cluster administrator must perform prior to installing the PostgreSQL Operator.
-At the very least, it must be provided with an initial configuration.
+There are some optional Secrets you can add before installing the PostgreSQL Operator into your cluster.
-First, make sure OLM and the OperatorHub.io catalog are installed by running
-`kubectl get CatalogSources --all-namespaces`. You should see something similar to the following:
+### Secrets (optional)
-```
-NAMESPACE NAME DISPLAY TYPE PUBLISHER
-olm operatorhubio-catalog Community Operators grpc OperatorHub.io
-```
-
-Take note of the name and namespace above, you will need them later on.
-
-Next, select a namespace in which to install the PostgreSQL Operator. PostgreSQL clusters will also be deployed here.
-If it does not exist, create it now.
-
-```
-export PGO_OPERATOR_NAMESPACE=pgo
-kubectl create namespace "$PGO_OPERATOR_NAMESPACE"
-```
-
-Next, clone the PostgreSQL Operator repository locally.
-
-```
-git clone -b v{{< param operatorVersion >}} https://github.com/CrunchyData/postgres-operator.git
-cd postgres-operator
-```
-
-### PostgreSQL Operator Configuration
-
-Edit `conf/postgres-operator/pgo.yaml` to configure the deployment. Look over all of the options and make any
-changes necessary for your environment. A full description of each option is available in the
-[`pgo.yaml` configuration guide]({{< relref "configuration/pgo-yaml-configuration.md" >}}).
-
-When the file is ready, upload the entire directory to the `pgo-config` ConfigMap.
-
-```
-kubectl -n "$PGO_OPERATOR_NAMESPACE" create configmap pgo-config \
- --from-file=./conf/postgres-operator
-```
-
-### Secrets
-
-Configure pgBackRest for your environment. If you do not plan to use AWS S3 to store backups, you can omit
-the `aws-s3` keys below.
+If you plan to use AWS S3 to store backups and would like to have the keys available for every backup, you can create a Secret as described below:
```
kubectl -n "$PGO_OPERATOR_NAMESPACE" create secret generic pgo-backrest-repo-config \
- --from-file=./installers/ansible/roles/pgo-operator/files/pgo-backrest-repo/config \
- --from-file=./installers/ansible/roles/pgo-operator/files/pgo-backrest-repo/sshd_config \
- --from-file=./installers/ansible/roles/pgo-operator/files/pgo-backrest-repo/aws-s3-ca.crt \
--from-literal=aws-s3-key="" \
--from-literal=aws-s3-key-secret=""
+kubectl -n "$PGO_OPERATOR_NAMESPACE" label secret pgo-backrest-repo-config \
+ vendor=crunchydata
```
### Certificates (optional)
-The PostgreSQL Operator has an API that uses TLS to communicate securely with clients. If you have
+PGO has an API that uses TLS to communicate securely with clients. If you have
a certificate bundle validated by your organization, you can install it now. If not, the API will
automatically generate and use a self-signed certificate.
@@ -82,9 +41,6 @@ kubectl -n "$PGO_OPERATOR_NAMESPACE" create secret tls pgo.tls \
--key=/path/to/server.key
```
-Once these resources are in place, the PostgreSQL Operator can be installed into the cluster.
-
-
## Installation
Create an `OperatorGroup` and a `Subscription` in your chosen namespace.
@@ -117,7 +73,7 @@ YAML
## After You Install
-Once the PostgreSQL Operator is installed in your Kubernetes cluster, you will need to do a few things
+Once PGO is installed in your Kubernetes cluster, you will need to do a few things
to use the [PostgreSQL Operator Client]({{< relref "/pgo-client/_index.md" >}}).
Install the first set of client credentials and download the `pgo` binary and client certificates.
@@ -127,7 +83,7 @@ PGO_CMD=kubectl ./deploy/install-bootstrap-creds.sh
PGO_CMD=kubectl ./installers/kubectl/client-setup.sh
```
-The client needs to be able to reach the PostgreSQL Operator API from outside the Kubernetes cluster.
+The client needs to be able to reach the PGO API from outside the Kubernetes cluster.
Create an external service or forward a port locally.
```
@@ -152,4 +108,3 @@ pgo version
# pgo client version {{< param operatorVersion >}}
# pgo-apiserver version {{< param operatorVersion >}}
```
-
diff --git a/docs/content/installation/pgo-client.md b/docs/content/installation/pgo-client.md
index 69dae759e1..6c584168df 100644
--- a/docs/content/installation/pgo-client.md
+++ b/docs/content/installation/pgo-client.md
@@ -1,5 +1,5 @@
---
-title: "Install `pgo` Client"
+title: "Install \"pgo\" Client"
date:
draft: false
weight: 30
@@ -8,23 +8,22 @@ weight: 30
# Install the PostgreSQL Operator (`pgo`) Client
The following will install and configure the `pgo` client on all systems. For the
-purpose of these instructions it's assumed that the Crunchy PostgreSQL Operator
-is already deployed.
+purpose of these instructions it's assumed that PGO: the Postgres Operator from Crunchy
+Data is already deployed.
## Prerequisites
* For Kubernetes deployments: [kubectl](https://kubernetes.io/docs/tasks/tools/install-kubectl/) configured to communicate with Kubernetes
* For OpenShift deployments: [oc](https://docs.openshift.com/container-platform/3.11/cli_reference/get_started_cli.html) configured to communicate with OpenShift
-To authenticate with the Crunchy PostgreSQL Operator API:
+To authenticate with the PGO API:
* Client CA Certificate
* Client TLS Certificate
* Client Key
* `pgouser` file containing `:`
-All of the requirements above should be obtained from an administrator who installed the Crunchy
-PostgreSQL Operator.
+All of the requirements above should be obtained from an administrator who installed PGO.
## Linux and macOS
@@ -288,5 +287,4 @@ properly by simply running the following:
pgo version
```
-If the above command outputs versions of both the client and API server, the Crunchy PostgreSQL
-Operator client has been installed successfully.
+If the above command outputs versions of both the client and API server, the `pgo` client has been installed successfully.
diff --git a/docs/content/installation/postgres-operator.md b/docs/content/installation/postgres-operator.md
index 0cbd542dd5..0a79ef9019 100644
--- a/docs/content/installation/postgres-operator.md
+++ b/docs/content/installation/postgres-operator.md
@@ -1,11 +1,11 @@
---
-title: Install the PostgreSQL Operator
+title: Install PGO the Postgres Operator
date:
draft: false
weight: 20
---
-# The PostgreSQL Operator Installer
+# PGO: Postgres Operator Installer
## Quickstart
@@ -23,8 +23,8 @@ the PostgreSQL Operator.
## Overview
-The PostgreSQL Operator comes with a container called `pgo-deployer` which
-handles a variety of lifecycle actions for the PostgreSQL Operator, including:
+PGO comes with a container called `pgo-deployer` which
+handles a variety of lifecycle actions for the Postgres Operator, including:
- Installation
- Upgrading
@@ -52,7 +52,7 @@ environmental requirements.
By default, the `pgo-deployer` uses a ServiceAccount called `pgo-deployer-sa`
that has a ClusterRoleBinding (`pgo-deployer-crb`) with several ClusterRole
permissions. This is required to create the [Custom Resource Definitions](https://kubernetes.io/docs/concepts/extend-kubernetes/api-extension/custom-resources/)
-that power the PostgreSQL Operator. While the PostgreSQL Operator itself can be
+that power PGO. While the Postgres Operator itself can be
scoped to a specific namespace, you will need to have `cluster-admin` for the
initial deployment, or privileges that allow you to install Custom Resource
Definitions. The required list of privileges are available in the [postgres-operator.yml](https://raw.githubusercontent.com/CrunchyData/postgres-operator/v{{< param operatorVersion >}}/installers/kubectl/postgres-operator.yml) file:
@@ -82,7 +82,7 @@ For example, to create the `pgo` namespace:
kubectl create namespace pgo
```
-The PostgreSQL Operator has the ability to manage PostgreSQL clusters across
+The Postgres Operator has the ability to manage PostgreSQL clusters across
multiple Kubernetes [Namespaces](https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/),
including the ability to add and remove Namespaces that it watches. Doing so
does require the PostgreSQL Operator to have elevated privileges, and as such,
@@ -120,7 +120,7 @@ PostgreSQL Operator cannot create the RBAC itself.
## Configuration - `postgres-operator.yml`
The `postgres-operator.yml` file contains all of the configuration parameters
-for deploying the PostgreSQL Operator. The [example file](https://github.com/CrunchyData/postgres-operator/blob/v{{< param operatorVersion >}}/installers/kubectl/postgres-operator.yml)
+for deploying PGO. The [example file](https://github.com/CrunchyData/postgres-operator/blob/v{{< param operatorVersion >}}/installers/kubectl/postgres-operator.yml)
contains defaults that should work in most Kubernetes environments, but it may
require some customization.
@@ -138,7 +138,7 @@ set to `install`, `update`, and `uninstall`.
### Image Pull Secrets
-If you are pulling the PostgreSQL Operator images from a private registry, you
+If you are pulling PGO images from a private registry, you
will need to setup an
[imagePullSecret](https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/)
with access to the registry. The image pull secret will need to be added to the
@@ -174,7 +174,7 @@ oc secrets link --for=pull --namespace=}})
for instructions on how to install the PostgreSQL Operator Monitoring infrastructure.
diff --git a/docs/content/installation/prerequisites.md b/docs/content/installation/prerequisites.md
index 2df54859d9..0a70756057 100644
--- a/docs/content/installation/prerequisites.md
+++ b/docs/content/installation/prerequisites.md
@@ -7,11 +7,11 @@ weight: 10
# Prerequisites
-The following is required prior to installing PostgreSQL Operator.
+The following is required prior to installing PGO.
## Environment
-The PostgreSQL Operator is tested in the following environments:
+PGO is tested in the following environments:
* Kubernetes v1.13+
* Red Hat OpenShift v3.11+
@@ -22,7 +22,7 @@ The PostgreSQL Operator is tested in the following environments:
#### IBM Cloud Pak Data
-If you install the PostgreSQL Operator, which comes with Crunchy
+If you install PGO, which comes with Crunchy
PostgreSQL for Kubernetes, on IBM Cloud Pak Data, please note the following
additional requirements:
@@ -33,14 +33,14 @@ additional requirements:
* Minimum Memory Requirements: 120MB
* Minimum Storage Requirements: 5MB
-**Note**: PostgreSQL clusters deployed by the PostgreSQL Operator with
+**Note**: PostgreSQL clusters deployed by PGO with
Crunchy PostgreSQL for Kubernetes are workload dependent. As such, users should
allocate enough resources for their PostgreSQL clusters.
## Client Interfaces
-The PostgreSQL Operator installer will install the [`pgo` client]({{< relref "/pgo-client/_index.md" >}}) interface
-to help with using the PostgreSQL Operator. However, it is also recommend that
+The Postgres Operator installer will install the [`pgo` client]({{< relref "/pgo-client/_index.md" >}}) interface
+to help with using PGO. However, it is also recommend that
you have access to [`kubectl`](https://kubernetes.io/docs/tasks/tools/install-kubectl/)
or [`oc`](https://www.okd.io/download.html) and are able to communicate with the
Kubernetes or OpenShift cluster that you are working with.
@@ -63,7 +63,7 @@ access to these ports.
### Application Ports
-The PostgreSQL Operator deploys different services to support a production
+PGO deploys different services to support a production
PostgreSQL environment. Below is a list of the applications and their default
Service ports.
diff --git a/docs/content/pgo-client/_index.md b/docs/content/pgo-client/_index.md
index 99c1040882..5be07b540d 100644
--- a/docs/content/pgo-client/_index.md
+++ b/docs/content/pgo-client/_index.md
@@ -6,11 +6,11 @@ weight: 50
---
The PostgreSQL Operator Client, aka `pgo`, is the most convenient way to
-interact with the PostgreSQL Operator. `pgo` provides many convenience methods
+interact with the Postgres Operator. `pgo` provides many convenience methods
for creating, managing, and deleting PostgreSQL clusters through a series of
simple commands. The `pgo` client interfaces with the API that is provided by
the PostgreSQL Operator and can leverage the RBAC and TLS systems that are
-provided by the PostgreSQL Operator
+provided by the PGO: PostgreSQL Operator.

@@ -134,7 +134,7 @@ There are several global flags available to the `pgo` client.
| Flag | Description |
| :-- | :-- |
-| `--apiserver-url` | The URL for the PostgreSQL Operator apiserver that will process the request from the pgo client. |
+| `--apiserver-url` | The URL for the PostgreSQL Operator apiserver that will process the request from the pgo client. Note that the URL should **not** end in a `/`. |
| `--debug` | Enable additional output for debugging. |
| `--disable-tls` | Disable TLS authentication to the Postgres Operator. |
| `--exclude-os-trust` | Exclude CA certs from OS default trust store. |
@@ -156,7 +156,7 @@ client.
| :-- | :-- |
| `EXCLUDE_OS_TRUST` | Exclude CA certs from OS default trust store. |
| `GENERATE_BASH_COMPLETION` | If set, will allow `pgo` to leverage "bash completion" to help complete commands as they are typed. |
-| `PGO_APISERVER_URL` | The URL for the PostgreSQL Operator apiserver that will process the request from the pgo client. |
+| `PGO_APISERVER_URL` | The URL for the PostgreSQL Operator apiserver that will process the request from the pgo client. Note that the URL should **not** end in a `/`. |
| `PGO_CA_CERT` | The CA certificate file path for authenticating to the PostgreSQL Operator apiserver. |
| `PGO_CLIENT_CERT` | The client certificate file path for authenticating to the PostgreSQL Operator apiserver. |
| `PGO_CLIENT_KEY` | The client key file path for authenticating to the PostgreSQL Operator apiserver. |
diff --git a/docs/content/pgo-client/common-tasks.md b/docs/content/pgo-client/common-tasks.md
index a2ea5d1efe..e339789ee0 100644
--- a/docs/content/pgo-client/common-tasks.md
+++ b/docs/content/pgo-client/common-tasks.md
@@ -107,7 +107,7 @@ which yields output similar to:
BasicAuth: ""
Cluster:
CCPImagePrefix: crunchydata
- CCPImageTag: {{< param centosBase >}}-{{< param postgresVersion >}}-{{< param operatorVersion >}}
+ CCPImageTag: {{< param ubiBase >}}-{{< param postgresVersion >}}-{{< param operatorVersion >}}
Policies: ""
Metrics: false
Badger: false
@@ -136,7 +136,7 @@ Cluster:
Pgo:
Audit: false
PGOImagePrefix: crunchydata
- PGOImageTag: {{< param centosBase >}}-{{< param operatorVersion >}}
+ PGOImageTag: {{< param ubiBase >}}-{{< param operatorVersion >}}
PrimaryStorage: nfsstorage
BackupStorage: nfsstorage
ReplicaStorage: nfsstorage
@@ -253,7 +253,7 @@ example below, the cluster will use PostgreSQL {{< param postgresVersion >}} and
```shell
pgo create cluster hagiscluster \
--ccp-image=crunchy-postgres-gis-ha \
- --ccp-image-tag={{< param centosBase >}}-{{< param postgresVersion >}}-{{< param postgisVersion >}}-{{< param operatorVersion >}}
+ --ccp-image-tag={{< param ubiBase >}}-{{< param postgresVersion >}}-{{< param postgisVersion >}}-{{< param operatorVersion >}}
```
#### Create a PostgreSQL Cluster with a Tablespace
@@ -378,7 +378,7 @@ pgo show cluster hacluster
which will yield output similar to:
```
-cluster : hacluster (crunchy-postgres-ha:{{< param centosBase >}}-{{< param postgresVersion >}}-{{< param operatorVersion >}})
+cluster : hacluster (crunchy-postgres-ha:{{< param ubiBase >}}-{{< param postgresVersion >}}-{{< param operatorVersion >}})
pod : hacluster-6dc6cfcfb9-f9knq (Running) on node01 (1/1) (primary)
pvc : hacluster
resources : CPU Limit= Memory Limit=, CPU Request= Memory Request=
@@ -699,7 +699,7 @@ high availability on the PostgreSQL cluster manually. You can re-enable high
availability by executing the following command:
```
-pgo update cluster hacluster --autofail=true
+pgo update cluster hacluster --enable-autofail
```
### Logical Backups (`pg_dump` / `pg_dumpall`)
@@ -1298,6 +1298,14 @@ pgo create cluster hippo-standby --standby --replica-count=2 \
--password=opensourcehippo
```
+If you are unsure of your user credentials form the original `hippo` cluster,
+you can retrieve them using the [`pgo show user`]({{< relref "/pgo-client/reference/pgo_show_user.md" >}})
+command with the `--show-system-accounts` flag:
+
+```
+pgo show user hippo --show-system-accounts
+```
+
The standby cluster will take a few moments to bootstrap, but it is now set up!
### Promoting a Standby Cluster
diff --git a/docs/content/pgo-client/reference/pgo_update.md b/docs/content/pgo-client/reference/pgo_update.md
index 669c841701..e4dca221ae 100644
--- a/docs/content/pgo-client/reference/pgo_update.md
+++ b/docs/content/pgo-client/reference/pgo_update.md
@@ -9,8 +9,8 @@ Update a pgouser, pgorole, or cluster
The update command allows you to update a pgouser, pgorole, or cluster. For example:
- pgo update cluster --selector=name=mycluster --autofail=false
- pgo update cluster --all --autofail=true
+ pgo update cluster --selector=name=mycluster --disable-autofail
+ pgo update cluster --all --enable-autofail
pgo update namespace mynamespace
pgo update pgbouncer mycluster --rotate-password
pgo update pgorole somerole --pgorole-permission="Cat"
diff --git a/docs/content/pgo-client/reference/pgo_update_cluster.md b/docs/content/pgo-client/reference/pgo_update_cluster.md
index 007c34b0fc..a907eab7be 100644
--- a/docs/content/pgo-client/reference/pgo_update_cluster.md
+++ b/docs/content/pgo-client/reference/pgo_update_cluster.md
@@ -9,7 +9,7 @@ Update a PostgreSQL cluster
Update a PostgreSQL cluster. For example:
- pgo update cluster mycluster --autofail=false
+ pgo update cluster mycluster --disable-autofail
pgo update cluster mycluster myothercluster --disable-autofail
pgo update cluster --selector=name=mycluster --disable-autofail
pgo update cluster --all --enable-autofail
diff --git a/docs/content/pgo-client/reference/pgo_upgrade.md b/docs/content/pgo-client/reference/pgo_upgrade.md
index 78d787f6f0..534790f189 100644
--- a/docs/content/pgo-client/reference/pgo_upgrade.md
+++ b/docs/content/pgo-client/reference/pgo_upgrade.md
@@ -7,10 +7,10 @@ Perform a cluster upgrade.
### Synopsis
-UPGRADE allows you to perform a comprehensive PGCluster upgrade
- (for use after performing a Postgres Operator upgrade).
+UPGRADE allows you to perform a comprehensive PGCluster upgrade
+ (for use after performing a Postgres Operator upgrade).
For example:
-
+
pgo upgrade mycluster
Upgrades the cluster for use with the upgraded Postgres Operator version.
@@ -24,12 +24,13 @@ pgo upgrade [flags]
--ccp-image-tag string The image tag to use for cluster creation. If specified, it overrides the default configuration setting and disables tag validation checking.
-h, --help help for upgrade
--ignore-validation Disables version checking against the image tags when performing an cluster upgrade.
+ --no-prompt No command line confirmation.
```
### Options inherited from parent commands
```
- --apiserver-url string The URL for the PostgreSQL Operator apiserver that will process the request from the pgo client.
+ --apiserver-url string The URL for the PostgreSQL Operator apiserver that will process the request from the pgo client. Note that the URL should **not** end in a '/'.
--debug Enable additional output for debugging.
--disable-tls Disable TLS authentication to the Postgres Operator.
--exclude-os-trust Exclude CA certs from OS default trust store
@@ -43,4 +44,4 @@ pgo upgrade [flags]
* [pgo](/pgo-client/reference/pgo/) - The pgo command line interface.
-###### Auto generated by spf13/cobra on 1-Oct-2020
+###### Auto generated by spf13/cobra on 20-Dec-2020
diff --git a/docs/content/quickstart/_index.md b/docs/content/quickstart/_index.md
index dd29d467be..3809578b77 100644
--- a/docs/content/quickstart/_index.md
+++ b/docs/content/quickstart/_index.md
@@ -5,26 +5,27 @@ draft: false
weight: 10
---
-# PostgreSQL Operator Quickstart
+# PGO: PostgreSQL Operator Quickstart
-Can't wait to try out the PostgreSQL Operator? Let us show you the quickest possible path to getting up and running.
+Can't wait to try out PGO, the Postgres Operator from Crunchy Data? Let us show
+you the quickest possible path to getting up and running.
-There are two paths to quickly get you up and running with the PostgreSQL Operator:
+There are two paths to quickly get you up and running with PGO:
-- [Installation via the PostgreSQL Operator Installer](#postgresql-operator-installer)
+- [Installation via the Postgres Operator Installer](#postgresql-operator-installer)
- Installation via a Marketplace
- Installation via [Operator Lifecycle Manager]({{< relref "/installation/other/operator-hub.md" >}})
- Installation via [Google Cloud Marketplace]({{< relref "/installation/other/google-cloud-marketplace.md" >}})
Marketplaces can help you get more quickly started in your environment as they provide a mostly automated process, but there are a few steps you will need to take to ensure you can fully utilize your PostgreSQL Operator environment. You can find out more information about how to get started with one of those installers in the [Installation]({{< relref "/installation/_index.md" >}}) section.
-# PostgreSQL Operator Installer
+# Postgres Operator Installer
Below will guide you through the steps for installing and using the PostgreSQL Operator using an installer that works with Ansible.
## Installation
-### Install the PostgreSQL Operator
+### Install PGO: the PostgreSQL Operator
On environments that have a [default storage class](https://kubernetes.io/docs/tasks/administer-cluster/change-default-storage-class/) set up (which is most modern Kubernetes environments), the below command should work:
@@ -39,14 +40,14 @@ If your install is unsuccessful, you may need to modify your configuration. Plea
### Install the `pgo` Client
-During or after the installation of the PostgreSQL Operator, download the `pgo` client set up script. This will help set up your local environment for using the PostgreSQL Operator:
+During or after the installation of PGO: the Postgres Operator, download the `pgo` client set up script. This will help set up your local environment for using the Postgres Operator:
```
curl https://raw.githubusercontent.com/CrunchyData/postgres-operator/v{{< param operatorVersion >}}/installers/kubectl/client-setup.sh > client-setup.sh
chmod +x client-setup.sh
```
-When the PostgreSQL Operator is done installing, run the client setup script:
+When the Postgres Operator is done installing, run the client setup script:
```
./client-setup.sh
@@ -83,9 +84,9 @@ source ~/.bashrc
### Post-Installation Setup
-Below are a few steps to check if the PostgreSQL Operator is up and running.
+Below are a few steps to check if PGO: the Postgres Operator is up and running.
-By default, the PostgreSQL Operator installs into a namespace called `pgo`. First, see that the Kubernetes Deployment of the Operator exists and is healthy:
+By default, PGO installs into a namespace called `pgo`. First, see that the Kubernetes Deployment of PGO exists and is healthy:
```
kubectl -n pgo get deployments
@@ -111,7 +112,7 @@ NAME READY STATUS RESTARTS AGE
postgres-operator-56d6ccb97-tmz7m 4/4 Running 0 2m
```
-Finally, let's see if we can connect to the PostgreSQL Operator from the `pgo` command-line client. The Ansible installer installs the `pgo` command line client into your environment, along with the username/password file that allows you to access the PostgreSQL Operator. In order to communicate with the PostgreSQL Operator API server, you will first need to set up a [port forward](https://kubernetes.io/docs/tasks/access-application-cluster/port-forward-access-application-cluster/) to your local environment.
+Finally, let's see if we can connect to the Postgres Operator from the `pgo` command-line client. The Ansible installer installs the `pgo` command line client into your environment, along with the username/password file that allows you to access the PostgreSQL Operator. In order to communicate with the PostgreSQL Operator API server, you will first need to set up a [port forward](https://kubernetes.io/docs/tasks/access-application-cluster/port-forward-access-application-cluster/) to your local environment.
In a new console window, run the following command to set up a port forward:
@@ -134,7 +135,7 @@ pgo-apiserver version {{< param operatorVersion >}}
## Create a PostgreSQL Cluster
-The quickstart installation method creates a namespace called `pgo` where the PostgreSQL Operator manages PostgreSQL clusters. Try creating a PostgreSQL cluster called `hippo`:
+The quickstart installation method creates a namespace called `pgo` where PGO, the Postgres Operator, manages PostgreSQL clusters. Try creating a PostgreSQL cluster called `hippo`:
```
pgo create cluster -n pgo hippo
@@ -155,7 +156,7 @@ created Pgcluster hippo
workflow id 1cd0d225-7cd4-4044-b269-aa7bedae219b
```
-This will create a PostgreSQL cluster named `hippo`. It may take a few moments for the cluster to be provisioned. You can see the status of this cluster using the [`pgo test`]({{< relref "pgo-client/reference/pgo_test.md" >}}) command:
+This will create a Postgres cluster named `hippo`. It may take a few moments for the cluster to be provisioned. You can see the status of this cluster using the [`pgo test`]({{< relref "pgo-client/reference/pgo_test.md" >}}) command:
```
pgo test -n pgo hippo
@@ -175,7 +176,7 @@ The `pgo test` command provides you the basic information you need to connect to
## Connect to a PostgreSQL Cluster
-By default, the PostgreSQL Operator creates a database inside the cluster with the same name of the cluster, in this case, `hippo`. Below demonstrates how we can connect to `hippo`.
+By default, PGO creates a database inside the cluster with the same name of the cluster, in this case, `hippo`. Below demonstrates how we can connect to `hippo`.
### How Users Work
@@ -193,7 +194,7 @@ CLUSTER USERNAME PASSWORD EXPIRES STATUS ERROR
hippo testuser datalake never ok
```
-To get the information about all PostgreSQL users that the PostgreSQL Operator is managing, you will need to use the `--show-system-accounts` flag:
+To get the information about all PostgreSQL users that PGO is managing, you will need to use the `--show-system-accounts` flag:
```
pgo show user -n pgo hippo --show-system-accounts
@@ -217,7 +218,7 @@ The `primaryuser` is the used for replication and [high availability]({{< relref
Let's see how we can connect to `hippo` using [`psql`](https://www.postgresql.org/docs/current/app-psql.html), the command-line tool for accessing PostgreSQL. Ensure you have [installed the `psql` client](https://www.crunchydata.com/developers/download-postgres/binaries/postgresql12).
-The PostgreSQL Operator creates a service with the same name as the cluster. See for yourself! Get a list of all of the Services available in the `pgo` namespace:
+PGO, the Postgres Operator, creates a service with the same name as the cluster. See for yourself! Get a list of all of the Services available in the `pgo` namespace:
```
kubectl -n pgo get svc
@@ -293,7 +294,7 @@ For more information, please see the section on [pgAdmin 4]({{< relref "architec
Some Kubernetes environments may require you to customize the configuration for the PostgreSQL Operator installer. The below provides a guide on the common parameters that require modification, though this may vary based on your installation. For a full reference, please visit the [Installation]({{< relref "/installation/_index.md" >}}) section.
-If you already attempted to install the PostgreSQL Operator and that failed, the easiest way to clean up that installation is to delete the [Namespace](https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/) that you attempted to install the PostgreSQL Operator into. **Note: This deletes all of the other objects in the Namespace, so please be sure this is OK!**
+If you already attempted to install PGO and that failed, the easiest way to clean up that installation is to delete the [Namespace](https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/) that you attempted to install the Postgres Operator into. **Note: This deletes all of the other objects in the Namespace, so please be sure this is OK!**
To delete the namespace, you can run the following command:
@@ -301,15 +302,15 @@ To delete the namespace, you can run the following command:
kubectl delete namespace pgo
```
-#### Get the PostgreSQL Operator Installer Manifest
+#### Get the Postgres Operator Installer Manifest
-You will need to download the PostgreSQL Operator Installer manifest to your environment, which you can do with the following command:
+You will need to download the Postgres Operator Installer manifest to your environment, which you can do with the following command:
```
curl https://raw.githubusercontent.com/CrunchyData/postgres-operator/v{{< param operatorVersion >}}/installers/kubectl/postgres-operator.yml > postgres-operator.yml
```
-#### Configure the PostgreSQL Operator Installer
+#### Configure the Postgres Operator Installer
There are many [configuration parameters]({{< relref "/installation/configuration.md">}}) to help you fine tune your installation, but there are a few that you may want to change to get the PostgreSQL Operator to run in your environment. Open up the `postgres-operator.yml` file and edit a few variables.
@@ -326,11 +327,11 @@ primary_storage: "nfsstorage"
replica_storage: "nfsstorage"
```
-If you are using either Openshift or CodeReady Containers and you have a `restricted` Security Context Constraint, you will need to set `disable_fsgroup` to `true` in order to deploy the PostgreSQL Operator.
+If you are using either OpenShift or CodeReady Containers and you have a `restricted` Security Context Constraint, you will need to set `disable_fsgroup` to `true` in order to deploy PGO.
For a full list of available storage types that can be used with this installation method, please review the [configuration parameters]({{< relref "/installation/configuration.md">}}).
-When you are done editing the file, you can install the PostgreSQL Operator by running the following commands:
+When you are done editing the file, you can install PGO by running the following commands:
```
kubectl create namespace pgo
diff --git a/docs/content/releases/4.5.1.md b/docs/content/releases/4.5.1.md
new file mode 100644
index 0000000000..eeed22c013
--- /dev/null
+++ b/docs/content/releases/4.5.1.md
@@ -0,0 +1,38 @@
+---
+title: "4.5.1"
+date:
+draft: false
+weight: 69
+---
+
+Crunchy Data announces the release of the PostgreSQL Operator 4.5.1 on November 13, 2020.
+
+The PostgreSQL Operator is released in conjunction with the [Crunchy Container Suite](https://github.com/CrunchyData/crunchy-containers/).
+
+PostgreSQL Operator 4.5.1 release includes the following software versions upgrades:
+
+- [PostgreSQL](https://www.postgresql.org) is now at versions 13.1, 12.5, 11.10, 10.15, 9.6.20, and 9.5.24.
+- [Patroni](https://patroni.readthedocs.io/) is now at version 2.0.1.
+- PL/Perl can now be used in the PostGIS-enabled containers.
+
+## Changes
+
+- Simplified creation of a PostgreSQL cluster from a `pgcluster` resource. A user no longer has to provide a pgBackRest repository Secret: the Postgres Operator will now automatically generate this.
+- The exposed ports for Services associated with a cluster is now available from the `pgo show cluster` command.
+- If the `pgo-config` ConfigMap is not created during the installation of the Postgres Operator, the Postgres Operator will generate one when it initializes.
+- Providing a value for `pgo_admin_password` in the installer is now optional. If no value is provided, the password for the initial administrative user is randomly generated.
+- Added an example for how to create a PostgreSQL cluster that uses S3 for pgBackRest backups via a custom resource.
+
+## Fixes
+
+- Fix readiness check for a standby leader. Previously, the standby leader would not report as ready, even though it was. Reported by Alec Rooney (@alrooney).
+- Proper determination if a `pgcluster` custom resource creation has been processed by its corresponding Postgres Operator controller. This prevents the custom resource from being run by the creation logic multiple times.
+- Prevent `initdb` (cluster reinitialization) from occurring if the PostgreSQL container cannot initialize while bootstrapping from an existing PGDATA directory.
+- Fix issue with UBI 8 / CentOS 8 when running a pgBackRest bootstrap or restore job, where duplicate "repo types" could be set. Specifically, the ensures the name of the repo type is set via the `PGBACKREST_REPO1_TYPE` environmental variable. Reported by Alec Rooney (@alrooney).
+- Ensure external WAL and Tablespace PVCs are fully recreated during a restore. Reported by (@aurelien43).
+- Ensure `pgo show backup` will work regardless of state of any of the PostgreSQL clusters. This pulls the information directly from the pgBackRest Pod itself. Reported by (@saltenhub).
+- Ensure that sidecars (e.g. metrics collection, pgAdmin 4, pgBouncer) are deployable when using the PostGIS-enabled PostgreSQL image. Reported by Jean-Denis Giguère (@jdenisgiguere).
+- Allow for special characters in pgBackRest environmental variables. Reported by (@SockenSalat).
+- Ensure password for the `pgbouncer` administrative user stays synchronized between an existing Kubernetes Secret and PostgreSQL should the pgBouncer be recreated.
+- When uninstalling an instance of the Postgres Operator in a Kubernetes cluster that has multiple instances of the Postgres Operator, ensure that only the requested instance to be uninstalled is the one that's uninstalled.
+- The logger no longer defaults to using a log level of `DEBUG`.
diff --git a/docs/content/releases/4.5.2.md b/docs/content/releases/4.5.2.md
new file mode 100644
index 0000000000..3914ef2b2d
--- /dev/null
+++ b/docs/content/releases/4.5.2.md
@@ -0,0 +1,54 @@
+---
+title: "4.5.2"
+date:
+draft: false
+weight: 68
+---
+
+Crunchy Data announces the release of the PostgreSQL Operator 4.5.2 on February 23, 2021.
+
+The PostgreSQL Operator is released in conjunction with the [Crunchy Container Suite](https://github.com/CrunchyData/crunchy-containers/).
+
+PostgreSQL Operator 4.5.2 release includes the following software versions upgrades:
+
+- [PostgreSQL](https://www.postgresql.org) is now at versions 13.2, 12.6, 11.11, 10.16, 9.6.21, and 9.5.25.
+- pgnodemx now uses version 1.0.3
+
+PostgreSQL Operator is tested against Kubernetes 1.17 - 1.20, OpenShift 3.11, OpenShift 4.4+, Google Kubernetes Engine (GKE), Amazon EKS, Microsoft AKS, and VMware Enterprise PKS 1.3+, and works on other Kubernetes distributions as well.
+
+## Changes
+
+- `crunchy-postgres-exporter` now exposes several pgMonitor metrics related to `pg_stat_statements`.
+- When using the `--restore-from` option on `pgo create cluster` to create a new PostgreSQL cluster, the cluster bootstrap Job is now automatically removed if it completes successfully.
+- PostgreSQL JIT compilation is explicitly disabled on new cluster creation. This prevents a memory leak that has been observed on queries coming from the metrics exporter.
+- The `--compress-type` flag is now supported for the backup options (`--backup-opts`) for pgBackRest backups with `pgo backup`. `none`, `gz`, `bz2`, and `lz4` are all supported. Presently `zst` is not supported.
+- The post-cluster creation pgBackRest tasks, i.e. creating a stanza and creating an initial backup, are now deleted by the Operator should they complete successfully. Besides good housekeeping, this provides a workaround for an OpenShift 3.11 bug that was causing the Operator to continuously issue pgBackRest backups during an OpenShift refresh cycle. Reported by Paul Heinen (@v3nturetheworld).
+- Add the `--no-prompt` flag to `pgo upgrade`. The mechanism to disable the prompt verification was already in place, but the flag was not exposed. Reported by (@devopsevd).
+- Removes certain characters that causes issues in shell environments from consideration when using the random password generator, which is used to create default passwords or with `--rotate-password`.
+- Allow for the `--link-map` attribute for a pgBackRest option, which can help with the restore of an existing cluster to a new cluster that adds an external WAL volume.
+
+## Fixes
+
+- Fix issue where `pgo test` would indicate every Service was a replica if the cluster name contained the word `replica` in it. Reported by Jose Joye (@jose-joye).
+- Do not consider Evicted Pods as part of `pgo test`. This eliminates a behavior where faux primaries are considered as part of `pgo test`. Reported by Dennis Jacobfeuerborn (@dennisjac).
+- Fix `pgo df` to not fail in the event it tries to execute a command within a dangling container from the bootstrap process when `pgo create cluster --restore-from` is used. Reported by Ignacio J.Ortega (@IJOL).
+- `pgo df` will now only attempt to execute in running Pods, i.e. it does not attempt to run in evicted Pods. Reported by (@kseswar).
+- Ensure the sync replication ConfigMap is removed when a cluster is deleted.
+- Fix crash in shutdown logic when attempting to shut down a cluster where no primaries exist. Reported by Jeffrey den Drijver (@JeffreyDD).
+- Fix syntax in recovery check command which could lead to failures when manually promoting a standby cluster. Reported by (@SockenSalat).
+- Fix potential race condition that could lead to a crash in the Operator boot when an error is issued around loading the `pgo-config` ConfigMap. Reported by Aleksander Roszig (@AleksanderRoszig).
+- Do not trigger a backup if a standby cluster fails over. Reported by (@aprilito1965).
+- Fix issue with `pgo backup` where it was unable to take a backup from a new primary after `pgo failover` was called. Reported by (@mesobreira).
+- On initialization, check that primary PostgreSQL Deployment is created before attempting to scale.
+- Ensure `archive_mode` is forced to `on` when performing using the "restore in place" method. This ensures that the timeline is correctly incremented post-restore, which could manifest itself with various types of WAL archive failures.
+- Ensure pgBouncer Secret is created when adding it to a standby cluster.
+- Generally improvements to initialization of a standby cluster.
+- Ensure proper label parsing based on Kubernetes rules and that it is consistently applied across all functionality that uses labels. Reported by José Joye (@jose-joye).
+- Remove legacy `defaultMode` setting on the volume instructions for the pgBackRest repo Secret as the `readOnly` setting is used on the mount itself. Reported by (@szhang1).
+- Only attempts to start scheduled backups in running pgBackRest repository Pods. Reported by Satria Sahputra (@satriashp).
+- Allow for `Restart` API server permission to be explicitly set. Reported by Aleksander Roszig (@AleksanderRoszig).
+- Update `pgo-target` permissions to match expectations for modern Kubernetes versions.
+- Support the substitution for the limit on the number of queries to include the the `pg_stat_statements` support of pgMonitor. Defaults to 20, which is the pgMonitor upstream value. Contributed by Steven Siahetiong (@ssiahetiong).
+- Major upgrade container now includes references for `pgnodemx`.
+- During a major upgrade, ensure permissions are correct on the old data directory before running `pg_upgrade`.
+- The metrics stack installer is fixed to work in environments that may not have connectivity to the Internet ("air gapped"). Reported by (@eliranw).
diff --git a/docs/content/releases/4.5.3.md b/docs/content/releases/4.5.3.md
new file mode 100644
index 0000000000..c50fe9e248
--- /dev/null
+++ b/docs/content/releases/4.5.3.md
@@ -0,0 +1,33 @@
+---
+title: "4.5.3"
+date:
+draft: false
+weight: 67
+---
+
+Crunchy Data announces the release of the PostgreSQL Operator 4.5.3 on June 2, 2021.
+
+The PostgreSQL Operator is released in conjunction with the [Crunchy Container Suite](https://github.com/CrunchyData/crunchy-containers/).
+
+PostgreSQL Operator 4.5.3 release includes the following software versions upgrades:
+
+- [PostgreSQL](https://www.postgresql.org) is at 13.3, 12.7, 11.12, 10.17, and 9.6.22.
+- [Patroni](https://patroni.readthedocs.io/) is now at version 2.0.2.
+- [pgBouncer](https://www.pgbouncer.org/) for CentOS 8 / UBI 8 is rebuilt to use the libc for its async DNS backend.
+
+## Changes
+
+- Revert setting "UsePAM" to "yes" by default as the bug fix in Docker that required that change was applied roughly one year ago.
+- Allow for the `PGOADMIN_USERNAME`, `PGOADMIN_PASSWORD`, `PGOADMIN_ROLENAME` credential bootstrap variables to be overriden as part of the OLM and development install process. Contributed by Mathieu Parent (@sathieu).
+- Update Helm installer to follow appropriate conventions. Contributed by Jakub Ráček (@kubaracek).
+
+## Fixes
+
+- Fix crash due to superfluous trailing whitespace when parsing `--backup-opts` in `pgo backup`. Reported by Samir Faci (@safaci2000).
+- Fix issue where metrics about pgBackRest backups could not be scraped if the backups were stored in a S3-like environment that requires the use of disabling TLS verification. Reported by (@lphan-clv) and (@dakine1111).
+- Fix issue where certain pgAdmin 4 functions did not work (e.g. taking a backup) due to `python` references in EL8 containers. Reported by (@douggutaby).
+- Fix how the pgAdmin 4 Service is identified in `pgo test`. Prior to this, it was identified as a "primary"; now it is "pgadmin".
+- Ensure a Postgres cluster shutdown can execute even if the `status` subresource of a `pgclusters.crunchydata.com` custom resource is missing.
+- Ensure major upgrades via `crunchy-upgrade` support PostgreSQL 12 and PostgreSQL 13. Reported by (@lbartnicki92).
+- Fix nonbreaking error message that occurs when `pgo-scheduler` container shuts down in the UBI 8 base container.
+- The `pgo-deployer` and Ansible installer will no longer create an initial TLS secret for the PGO apiserver. PGO apiserver has been able to self-create this for a long time, and PGO defers to that. This fixes an issue that occurred on newer builds where certificates generated by OpenSSL contained incomplete usage blocks, which could cause for these certificates to be properly outright rejected.
diff --git a/docs/content/releases/4.5.4.md b/docs/content/releases/4.5.4.md
new file mode 100644
index 0000000000..8f16f24a0b
--- /dev/null
+++ b/docs/content/releases/4.5.4.md
@@ -0,0 +1,25 @@
+---
+title: "4.5.4"
+date:
+draft: false
+weight: 66
+---
+
+Crunchy Data announces the release of PGO, the Postgres Operator 4.5.4.
+
+The PostgreSQL Operator is released in conjunction with the [Crunchy Container Suite](https://github.com/CrunchyData/crunchy-containers/).
+
+PostgreSQL Operator 4.5.4 release includes the following software versions upgrades:
+
+- [PostgreSQL](https://www.postgresql.org) is updated to 13.4, 12.8, 11.13, 10.18, and 9.6.23.
+- [pgaudit_analyze](https://github.com/pgaudit/pgaudit_analyze) is now at 1.0.8.
+- [set_user](https://github.com/pgaudit/set_user) is now at version 2.0.1.
+
+# Changes
+
+- Ensure `vendor` label is propagated to all PGO managed objects. Reported by @mdraijer.
+
+# Fixes
+
+- Allow backup configuration to be changed when a cluster is recreated. For example, allow backup configuration to change from `posix` to `s3` within a new cluster.
+- Ensure a SQL policy that contains writes can be applied to a Postgres cluster after a failover.
\ No newline at end of file
diff --git a/docs/content/releases/4.5.5.md b/docs/content/releases/4.5.5.md
new file mode 100644
index 0000000000..f5f6c0b823
--- /dev/null
+++ b/docs/content/releases/4.5.5.md
@@ -0,0 +1,26 @@
+---
+title: "4.5.5"
+date:
+draft: false
+weight: 65
+---
+
+Crunchy Data announces the release of PGO, the Postgres Operator 4.5.5.
+
+The PostgreSQL Operator is released in conjunction with the [Crunchy Container Suite](https://github.com/CrunchyData/crunchy-containers/).
+
+PostgreSQL Operator 4.5.5 release includes the following software versions upgrades:
+
+- [PostgreSQL](https://www.postgresql.org) versions 13.5, 12.9, 11.14, 10.19 and 9.6.24 are now available.
+- The [pgnodemx](https://github.com/CrunchyData/pgnodemx) extension is now at version 1.0.6.
+- [pgBouncer](https://www.pgbouncer.org/) is now at version 1.16.1
+
+## Changes
+
+- The default `pgo-backrest-repo-config` Secret can now be automatically generated by the Operator. This functionality was backpatched from v4.6 to help support the fix around automatically updating the AWS CA values.
+
+## Fixes
+
+- Ensure the `pgo create pgbouncer` command can set CPU and memory limits via `--cpu-limit` and `--memory-limit` respectively.
+- Update the `aws-s3-ca.crt` value to use the newer CAs provided by AWS. If a PostgreSQL cluster is using the old default CA, PGO will update the general one kept in the `pgo-backrest-repo-config` Secret and `pgo upgrade` will update it for a specific cluster.
+- Allow for the original primary instance to be scaled down after running `pgo upgrade`.
diff --git a/docs/content/releases/4.5.6.md b/docs/content/releases/4.5.6.md
new file mode 100644
index 0000000000..a166f188bf
--- /dev/null
+++ b/docs/content/releases/4.5.6.md
@@ -0,0 +1,18 @@
+---
+title: "4.5.6"
+date:
+draft: false
+weight: 64
+---
+
+Crunchy Data announces the release of PGO, the Postgres Operator 4.5.6.
+
+The PostgreSQL Operator is released in conjunction with the [Crunchy Container Suite](https://github.com/CrunchyData/crunchy-containers/).
+
+PostgreSQL Operator 4.5.6 release includes the following software versions upgrades:
+
+- [PostgreSQL](https://www.postgresql.org) versions 13.6, 12.10, 11.15 and 10.20 are now available.
+
+## Changes
+
+- The version of Go utilized to build `yq` is now aligned with all other Go binaries.
diff --git a/docs/content/releases/4.5.7.md b/docs/content/releases/4.5.7.md
new file mode 100644
index 0000000000..3e71bea796
--- /dev/null
+++ b/docs/content/releases/4.5.7.md
@@ -0,0 +1,17 @@
+---
+title: "4.5.7"
+date:
+draft: false
+weight: 63
+---
+
+Crunchy Data announces the release of PGO, the Postgres Operator 4.5.7.
+
+The PostgreSQL Operator is released in conjunction with the [Crunchy Container Suite](https://github.com/CrunchyData/crunchy-containers/).
+
+PostgreSQL Operator 4.5.7 release includes the following software versions upgrades:
+
+- [PostgreSQL](https://www.postgresql.org) versions 14.3, 13.7, 12.11, 11.16, and 10.21 are now available.
+- [PostGIS](http://postgis.net/) version 3.1.4 is now available.
+- The [pg_partman](https://github.com/pgpartman/pg_partman) extension is now at version 4.6.1.
+- The [TimescaleDB](https://github.com/timescale/timescaledb) extension is now at version 2.6.1.
diff --git a/docs/content/releases/4.5.8.md b/docs/content/releases/4.5.8.md
new file mode 100644
index 0000000000..3cc78e476f
--- /dev/null
+++ b/docs/content/releases/4.5.8.md
@@ -0,0 +1,17 @@
+---
+title: "4.5.8"
+date:
+draft: false
+weight: 62
+---
+
+Crunchy Data announces the release of PGO, the Postgres Operator 4.5.8.
+
+The PostgreSQL Operator is released in conjunction with the [Crunchy Container Suite](https://github.com/CrunchyData/crunchy-containers/).
+
+PostgreSQL Operator 4.5.8 release includes the following software versions upgrades:
+
+- [PostgreSQL](https://www.postgresql.org) versions 13.8, 12.12, 11.17, and 10.22 are now available.
+- [PgBouncer](https://www.pgbouncer.org/) is now at version 1.17.
+- The [pg_partman](https://github.com/pgpartman/pg_partman) extension is now at version 4.6.2.
+- The [TimescaleDB](https://github.com/timescale/timescaledb) extension is now at version 2.7.2.
\ No newline at end of file
diff --git a/docs/content/releases/4.5.9.md b/docs/content/releases/4.5.9.md
new file mode 100644
index 0000000000..85ec5d7952
--- /dev/null
+++ b/docs/content/releases/4.5.9.md
@@ -0,0 +1,16 @@
+---
+title: "4.5.9"
+date:
+draft: false
+weight: 61
+---
+
+Crunchy Data announces the release of PGO, the Postgres Operator 4.5.9.
+
+The PostgreSQL Operator is released in conjunction with the [Crunchy Container Suite](https://github.com/CrunchyData/crunchy-containers/).
+
+PostgreSQL Operator 4.5.9 release includes the following software versions upgrades:
+
+- [PostgreSQL](https://www.postgresql.org) versions 13.9, 12.13, 11.18, and 10.23 are now available.
+- The [pg_partman](https://github.com/pgpartman/pg_partman) extension is now at version 4.7.1.
+- The [TimescaleDB](https://github.com/timescale/timescaledb) extension is now at version 2.8.1.
diff --git a/docs/content/support/_index.md b/docs/content/support/_index.md
index a1cb419443..f8a974c84b 100644
--- a/docs/content/support/_index.md
+++ b/docs/content/support/_index.md
@@ -5,15 +5,15 @@ draft: false
weight: 110
---
-There are a few options available for community support of the [PostgreSQL Operator](https://github.com/CrunchyData/postgres-operator):
+There are a few options available for community support of the [PGO: the Postgres Operator](https://github.com/CrunchyData/postgres-operator):
-- **If you believe you have found a bug** or have a detailed feature request: please open [an issue on GitHub](https://github.com/CrunchyData/postgres-operator/issues/new/choose). The PostgreSQL Operator community and the Crunchy Data team behind the PostgreSQL Operator is generally active in responding to issues.
-- **For general questions or community support**: please join the PostgreSQL Operator community mailing list at [postgres-operator@crunchydata.com](mailto:postgres-operator@crunchydata.com),
+- **If you believe you have found a bug** or have a detailed feature request: please open [an issue on GitHub](https://github.com/CrunchyData/postgres-operator/issues/new/choose). The Postgres Operator community and the Crunchy Data team behind the PGO is generally active in responding to issues.
+- **For general questions or community support**: please join the [PostgreSQL Operator community mailing list](https://groups.google.com/a/crunchydata.com/forum/#!forum/postgres-operator/join) at [https://groups.google.com/a/crunchydata.com/forum/#!forum/postgres-operator/join](https://groups.google.com/a/crunchydata.com/forum/#!forum/postgres-operator/join),
In all cases, please be sure to provide as many details as possible in regards to your issue, including:
- Your Platform (e.g. Kubernetes vX.YY.Z)
-- Operator Version (e.g. {{< param centosBase >}}-{{< param operatorVersion >}})
+- Operator Version (e.g. {{< param ubiBase >}}-{{< param operatorVersion >}})
- A detailed description of the issue, as well as steps you took that lead up to the issue
- Any relevant logs
- Any additional information you can provide that you may find helpful
diff --git a/docs/content/tutorial/_index.md b/docs/content/tutorial/_index.md
index 2919cc6a25..0babd127dc 100644
--- a/docs/content/tutorial/_index.md
+++ b/docs/content/tutorial/_index.md
@@ -4,10 +4,10 @@ draft: false
weight: 15
---
-The PostgreSQL Operator provides functionality that lets you run your own database-as-a-service: from deploying PostgreSQL clusters with [high availability]({{< relref "architecture/high-availability/_index.md" >}}), to a [full stack monitoring]({{< relref "architecture/high-availability/_index.md" >}}) solution, essential [disaster recovery and backup tools]({{< relref "architecture/disaster-recovery.md" >}}), the ability to secure your cluster with TLS, and much more!
+PGO, the Postgres Operator, provides functionality that lets you run your own database-as-a-service: from deploying PostgreSQL clusters with [high availability]({{< relref "architecture/high-availability/_index.md" >}}), to a [full stack monitoring]({{< relref "architecture/high-availability/_index.md" >}}) solution, essential [disaster recovery and backup tools]({{< relref "architecture/disaster-recovery.md" >}}), the ability to secure your cluster with TLS, and much more!
What's more, you can manage your PostgreSQL clusters with the convenient [`pgo` client]({{< relref "pgo-client/_index.md" >}}) or by interfacing directly with the PostgreSQL Operator [custom resources]({{< relref "custom-resources/_index.md" >}}).
-Given the robustness of the PostgreSQL Operator, we think it's helpful to break down the functionality in this step-by-step tutorial. The tutorial covers the essential functions the PostgreSQL Operator can perform and covers many common basic and advanced use cases.
+Given the robustness of PGO, we think it's helpful to break down the functionality in this step-by-step tutorial. The tutorial covers the essential functions the Postgres Operator can perform and covers many common basic and advanced use cases.
So what are you waiting for? Let's [get started]({{< relref "tutorial/getting-started.md" >}})!
diff --git a/docs/content/tutorial/create-cluster.md b/docs/content/tutorial/create-cluster.md
index eeb798faf5..6db4090269 100644
--- a/docs/content/tutorial/create-cluster.md
+++ b/docs/content/tutorial/create-cluster.md
@@ -65,7 +65,7 @@ So what just happened? Let's break down what occurs during the create cluster pr
- Creating [persistent volume claims](https://kubernetes.io/docs/concepts/storage/persistent-volumes/) (PVCs) for the PostgreSQL instance and the pgBackRest repository.
- Creating [services](https://kubernetes.io/docs/concepts/services-networking/service/) that provide a stable network interface for connecting to the PostgreSQL instance and pgBackRest repository.
- Creating [deployments](https://kubernetes.io/docs/concepts/workloads/controllers/deployment/) that house each PostgreSQL instance and pgBackRest repository. Each of these is responsible for one Pod.
- - The PostgreSQL Pod, when it is started, provisions a PostgreSQL database and performs other bootstrapping functions, such as creating `testuer`.
+ - The PostgreSQL Pod, when it is started, provisions a PostgreSQL database and performs other bootstrapping functions, such as creating `testuser`.
- The pgBackRest Pod, when it is started, initializes a pgBackRest repository. Note that the pgBackRest repository is not yet ready to start taking backups, but will be after the next step!
3. When the PostgreSQL Operator detects that the PostgreSQL and pgBackRest deployments are up and running, it creates a Kubenretes Job to create a pgBackRest stanza. This is necessary as part of intializing the pgBackRest repository to accept backups from our PostgreSQL cluster.
@@ -120,6 +120,33 @@ Also ensure that you have enough persistent volumes available: your Kubernetes a
The most common occurrence of this is due to the Kubernetes network blocking SSH connections between Pods. Ensure that your Kubernetes networking layer allows for SSH connections over port 2022 in the Namespace that you are deploying your PostgreSQL clusters into.
+### PostgreSQL Pod reports "Authentication Failed for `ccp_monitoring`"
+
+This is a temporary error that occurs when a new PostgreSQL cluster is first
+initialized with the `--metrics` flag. The `crunchy-postgres-exporter` container
+within the PostgreSQL Pod may be ready before the container with PostgreSQL is
+ready. If a message in your logs further down displays a timestamp, e.g.:
+
+```
+ now
+-------------------------------
+2020-11-10 08:23:15.968196-05
+```
+
+Then the `ccp_monitoring` user is properly reconciled with the PostgreSQL
+cluster.
+
+If the error message does not go away, this could indicate a few things:
+
+- The PostgreSQL instance has not initialized. Check to ensure that PostgreSQL
+has successfully started.
+- The password for the `ccp_monitoring` user has changed. In this case you will
+need to update the Secret with the monitoring credentials.
+
+## Custom Resources
+
+You may also be curious about how to perform the same actions directly with [custom resources]({{< relref "custom-resources/_index.md" >}}). If that is the case, we encourage to skip ahead to the [Custom Resources]({{< relref "custom-resources/_index.md" >}}) section of the documentation.
+
## Next Steps
Once your cluster is created, the next step is to [connect to your PostgreSQL cluster]({{< relref "tutorial/connect-cluster.md" >}}). You can also [learn how to customize your PostgreSQL cluster]({{< relref "tutorial/customize-cluster.md" >}})!
diff --git a/docs/content/tutorial/customize-cluster.md b/docs/content/tutorial/customize-cluster.md
index e9be31c268..2fee92bb0a 100644
--- a/docs/content/tutorial/customize-cluster.md
+++ b/docs/content/tutorial/customize-cluster.md
@@ -184,6 +184,29 @@ There are many reasons why a PostgreSQL Pod may not be scheduled:
- **Node affinity rules cannot be satisfied**. If you assigned a node label, ensure that the Nodes with that label are available for scheduling. If they are, ensure that there are enough resources available.
- **Pod anti-affinity rules cannot be satisfied**. This most likely happens when [pod anti-affinity]({{< relref "architecture/high-availability/_index.md" >}}#how-the-crunchy-postgresql-operator-uses-pod-anti-affinity) is set to `required` and there are not enough Nodes available for scheduling. Consider adding more Nodes or relaxing your anti-affinity rules.
+### PostgreSQL Pod reports "Authentication Failed for `ccp_monitoring`"
+
+This is a temporary error that occurs when a new PostgreSQL cluster is first
+initialized with the `--metrics` flag. The `crunchy-postgres-exporter` container
+within the PostgreSQL Pod may be ready before the container with PostgreSQL is
+ready. If a message in your logs further down displays a timestamp, e.g.:
+
+```
+ now
+-------------------------------
+2020-11-10 08:23:15.968196-05
+```
+
+Then the `ccp_monitoring` user is properly reconciled with the PostgreSQL
+cluster.
+
+If the error message does not go away, this could indicate a few things:
+
+- The PostgreSQL instance has not initialized. Check to ensure that PostgreSQL
+has successfully started.
+- The password for the `ccp_monitoring` user has changed. In this case you will
+need to update the Secret with the monitoring credentials.
+
## Next Steps
As mentioned at the beginning, there are a lot more customizations that you can make to your PostgreSQL cluster, and we will cover those as the tutorial progresses! This section was to get you familiar with some of the most common customizations, and to explore how many options `pgo create cluster` has!
diff --git a/docs/content/tutorial/getting-started.md b/docs/content/tutorial/getting-started.md
index 8422487ed1..c02fd355a4 100644
--- a/docs/content/tutorial/getting-started.md
+++ b/docs/content/tutorial/getting-started.md
@@ -6,17 +6,17 @@ weight: 100
## Installation
-If you have not installed the PostgreSQL Operator yet, we recommend you take a look at our [quickstart]({{< relref "quickstart/_index.md" >}}) or the [installation]({{< relref "installation/_index.md" >}}) sections.
+If you have not installed PGO, the Postgres Operator, yet, we recommend you take a look at our [quickstart]({{< relref "quickstart/_index.md" >}}) or the [installation]({{< relref "installation/_index.md" >}}) sections.
### Customizing an Installation
-How to customize a PostgreSQL Operator installation is a lengthy topic. The details are covered in the [installation]({{< relref "installation/postgres-operator.md" >}}) section, as well as a list of all the [configuration variables]({{< relref "installation/configuration.md" >}}) available.
+How to customize a PGO installation is a lengthy topic. The details are covered in the [installation]({{< relref "installation/postgres-operator.md" >}}) section, as well as a list of all the [configuration variables]({{< relref "installation/configuration.md" >}}) available.
## Setup the `pgo` Client
-This tutorial will be using the [`pgo` client]({{< relref "pgo-client/_index.md" >}}) to interact with the PostgreSQL Operator. Please follow the instructions in the [quickstart]({{< relref "quickstart/_index.md" >}}) or the [installation]({{< relref "installation/pgo-client.md" >}}) sections for how to configure the `pgo` client.
+This tutorial will be using the [`pgo` client]({{< relref "pgo-client/_index.md" >}}) to interact with the Postgres Operator. Please follow the instructions in the [quickstart]({{< relref "quickstart/_index.md" >}}) or the [installation]({{< relref "installation/pgo-client.md" >}}) sections for how to configure the `pgo` client.
-The PostgreSQL Operator and `pgo` client are designed to work in a [multi-namespace deployment environment]({{< relref "architecture/namespace.md" >}}) and many `pgo` commands require that the namespace flag (`-n`) are passed into it. You can use the `PGO_NAMESPACE` environmental variable to set which namespace a `pgo` command can use. For example:
+The Postgres Operator and `pgo` client are designed to work in a [multi-namespace deployment environment]({{< relref "architecture/namespace.md" >}}) and many `pgo` commands require that the namespace flag (`-n`) are passed into it. You can use the `PGO_NAMESPACE` environmental variable to set which namespace a `pgo` command can use. For example:
```
export PGO_NAMESPACE=pgo
@@ -39,13 +39,13 @@ export PGO_NAMESPACE=pgo
## Next Steps
-Before proceeding, please make sure that your `pgo` client setup can communicate with your PostgreSQL Operator. In a separate terminal window, set up a port forward to your PostgreSQL Operator:
+Before proceeding, please make sure that your `pgo` client setup can communicate with your PGO Deployment. In a separate terminal window, set up a port forward to your PostgreSQL Operator:
```
kubectl port-forward -n pgo svc/postgres-operator 8443:8443
```
-The [`pgo version`]({{< relref "pgo-client/reference/pgo_version.md" >}}) command is a great way to check connectivity with the PostgreSQL Operator, as it is a very simple, safe operation. Try it out:
+The [`pgo version`]({{< relref "pgo-client/reference/pgo_version.md" >}}) command is a great way to check connectivity with the Postgres Operator, as it is a very simple, safe operation. Try it out:
```
pgo version
@@ -72,4 +72,4 @@ which yields results similar to:
pgo client version {{< param operatorVersion >}}
```
-Alright, we're now ready to start our journey with the PostgreSQL Operator!
+Alright, we're now ready to start our journey with PGO!
diff --git a/docs/content/tutorial/pgbouncer.md b/docs/content/tutorial/pgbouncer.md
index 89ba8ce993..4ca68f561a 100644
--- a/docs/content/tutorial/pgbouncer.md
+++ b/docs/content/tutorial/pgbouncer.md
@@ -116,7 +116,7 @@ PGPASSWORD=randompassword psql -h localhost -p 5432 -U pgbouncer pgbouncer
You should see something similar to this:
```
-psql (12.4, server 1.14.0/bouncer)
+psql (12.13, server 1.14.0/bouncer)
Type "help" for help.
pgbouncer=#
diff --git a/docs/layouts/partials/flex/body-aftercontent.html b/docs/layouts/partials/flex/body-aftercontent.html
new file mode 100644
index 0000000000..1ec038ea12
--- /dev/null
+++ b/docs/layouts/partials/flex/body-aftercontent.html
@@ -0,0 +1,44 @@
+
+ {{ partial "next-prev-page.html" . }}
+
+
+
+
+
+
+
+{{ partial "flex/scripts.html" . }}
diff --git a/docs/static/crunchy-logo.jpg b/docs/static/crunchy-logo.jpg
deleted file mode 100644
index 01f9c9b1a4..0000000000
Binary files a/docs/static/crunchy-logo.jpg and /dev/null differ
diff --git a/docs/static/logos/TRADEMARKS.md b/docs/static/logos/TRADEMARKS.md
new file mode 100644
index 0000000000..e97d80757d
--- /dev/null
+++ b/docs/static/logos/TRADEMARKS.md
@@ -0,0 +1,143 @@
+# PGO Trademark Guidelines
+
+## 1. Introduction
+
+This document - the "Policy" - outlines the policy of The PGO Project (the "Project") for the use of our trademarks.
+
+A trademark’s role is to assure consumers about the quality of the associated products or services. Because an open source license allows you to modify the copyrighted software, we cannot be sure your modified software will not mislead recipients if it is distributed under our trademarks. So, this Policy describes when you may or may not use our trademarks.
+
+In this Policy, we are not trying to limit the lawful use of our trademarks, but rather describe what we consider lawful use. Trademark law can be ambiguous, so we hope to clarify whether we will consider your use permitted or non-infringing.
+
+The following sections describe the trademarks this Policy covers, as well as trademark uses we permit. If you want to use our trademarks in ways this Policy doesn’t address, please see "Where to get further information" below for contact information. Any use that does not comply with this Policy, or for which we have not separately provided written permission, is not a use we have approved.
+
+## 2. We are committed to open source principles
+
+We want to encourage and facilitate community use of our trademarks in a way that ensures the trademarks are meaningful source and quality indicators for our software and the associated goods and services and continue to embody the high reputation of the software and its associated community. This Policy therefore balances our need to ensure our trademarks remain reliable quality indicators and our community members’ desire to be full Project participants.
+
+## 3. Trademarks subject to the Policy
+
+Our trademarks
+
+This Policy covers:
+
+### 3.1 Our word trademarks and service marks (the "Word Marks"):
+
+PGO
+
+### 3.2. Our logo (the "Logo"):
+
+
+
+### 3.3 And the unique visual styling of our website (the "Trade Dress").
+
+This Policy encompasses all Project trademarks and service marks, whether Word Marks, Logos or Trade Dress, which we collectively call the “Marks." We might not have registered some Marks, but this Policy covers our Marks regardless.
+
+## 4. Universal considerations for all uses
+
+Whenever you use a Mark, you must not mislead anyone, either directly or by omission, about what they are getting and from whom. The law reflects this requirement in two major ways described below: it prohibits creating a "likelihood of confusion," but allows for "nominative use."
+
+For example, you cannot say you are distributing PGO software when you're distributing a modified version of it, because you likely would confuse people, since they are not getting the same features and functionality they would get if they downloaded the software from us. You also cannot use our Logo on your website to suggest your website is an official website or we endorse your website.
+
+You can, though, say, for example, you like the PGO software, you are a PGO community participant, you are providing unmodified PGO software, or you wrote a book describing how to use the PGO software.
+
+This fundamental requirement - that it is always clear to people what they are getting and from whom - is reflected throughout this Policy. It should guide you if you are unsure about how you are using the Marks.
+
+In addition:
+
+You may not use the Marks in association with software use or distribution if you don’t comply with the license for the software.
+
+You may not use or register the Marks as part of your own trademark, service mark, domain name, company name, trade name, product name or service name.
+
+Trademark law does not allow you to use names or trademarks that are too similar to ours. You therefore may not use an obvious Mark variant or phonetic equivalent, foreign language equivalent, takeoff, or abbreviation for a similar or compatible product or service.
+
+You will not acquire rights in the Marks, and any goodwill you generate using the Marks inures solely to our benefit.
+## 5. Use for software
+
+See universal considerations for all uses, above, which also apply.
+
+### 5.1 Uses we consider non-infringing
+
+#### 5.1.1 Distributing unmodified source code or unmodified executable code we have compiled
+
+When you redistribute our unmodified software, you are not changing its quality or nature. Therefore, you may retain the Word Marks and Logos we have placed on the software, to identify your redistributed software whether you redistribute by optical media, memory stick or download of unmodified source and executable code. This only applies if you are redistributing official software from this Project that you have not changed. You can find the Logo files [here](/).
+
+#### 5.1.2 Distributing executable code you have compiled, or modified code
+
+You may use the Word Marks, but not the Logos, to describe the software’s origin, that is, that the code you are distributing is a modification of our software. You may say, for example, "this software is derived from the source code from the PGO Project."
+Of course, you can place your own trademarks or logos on software to which you have made substantive modifications, because by modifying the software, you have become the origin of the modified software.
+
+#### 5.1.3 Statements about compatibility, interoperability or derivation
+
+You may use the Word Marks, but not the Logos, to describe the relationship between your software and ours. You should use Our Mark after a verb or preposition that describes that relationship. So, you may say, for example, "Bob's plug-in for PGO," but may not say "Bob's PGO plug-in."
+
+#### 5.1.4 Using trademarks to show community affiliation
+
+This section discusses using our Marks for application themes, skins and personas. We discuss using our Marks on websites below.
+You may use the Word Marks and the Logos in themes, personas, or skins to show your Project support, provided the use is non-commercial and clearly decorative, as contrasted with a use that appears to be the branding for a website or application.
+
+### 5.2 Permitted uses
+
+#### 5.2.1 Distributing unmodified software
+
+You may use the Word Marks and Logos to distribute executable code if you make the code from official Project source code using the procedure for creating an executable found at [https://access.crunchydata.com/documentation/postgres-operator/latest/installation/](https://access.crunchydata.com/documentation/postgres-operator/latest/installation/).
+
+#### 5.3 Unpermitted uses we consider infringing
+
+We will likely consider it an infringement to use the Marks in software that combines our software with another software program. In addition to creating a single executable for both software programs, we would consider your software "combined" with ours if installing our software automatically installs yours. We would not consider your software "combined" with ours if it is on the same media but requires separate, independent action to install.
+
+## 6. Use for non-software goods and services
+
+See universal considerations for all uses, above, which also apply.
+
+### 6.1 Uses we consider non-infringing
+
+#### 6.1.1 Websites
+
+You may use the Word Marks and Logos on your webpage to show your Project support if:
+
+- Your own branding or naming is more prominent than any Project Marks;
+- The Logos hyperlink to the Project website: [https://github.com/CrunchyData/postgres-operator](https://github.com/CrunchyData/postgres-operator);
+- The site does not mislead customers into thinking your website, service, or product is our website, service, or product; and
+- The site clearly states the Project does not affiliate with or endorse you.
+
+#### 6.1.2 Publishing and presenting
+
+You can use the Word Marks in book and article titles, and the Logo in illustrations within a document, if the use does not suggest we published, endorse, or agree with your work.
+
+#### 6.1.3 Events
+
+You can use the Logo to promote the software and Project at events.
+
+### 6.2 Permitted uses
+
+#### 6.2.1 Meetups and user groups
+
+You can use the Word Marks as part of your meetup or user group name if:
+
+- The group’s main focus is the software;
+- Any software or services the group provides are without cost;
+- The group does not make a profit;
+- Any charge to attend meetings is only to cover the cost of the venue, food and drink.
+
+The universal considerations for all uses, above, still apply: specifically, you may not use or register the Marks as part of your own trademark, service mark, domain name, company name, trade name, product name or service name.
+
+### 6.3 Unpermitted uses we consider infringing
+
+We will likely consider it an infringement to use the Marks as part of a domain name or subdomain.
+We also would likely consider it an infringement to use the Marks on for-sale promotional goods.
+
+## 7 General Information
+
+### 7.1 Trademark legends
+
+If you are using our Marks in a way described in the sections entitled "Permitted uses," put the following notice at the foot of the page where you have used the Mark (or, if in a book, on the credits page), on packaging or labeling, and on advertising or marketing materials: "The PGO Project is a trademark of Crunchy Data Solutions, Inc., used with permission."
+
+### 7.2 What to do when you see abuse
+
+If you are aware of a confusing use or misuse of the Marks, we would appreciate you bringing it to our attention. Please contact us at [trademarks@crunchydata.com](mailto:trademarks@crunchydata.com) so we can investigate it further.
+
+### 7.3 Where to get further information
+
+If you have questions, wish to speak about using our Marks in ways the Policy doesn’t address, or see abuse of our Marks, please send an email to [trademarks@crunchydata.com](mailto:trademarks@crunchydata.com).
+
+We based these guidelines on the Model Trademark Guidelines, available at [http://www.modeltrademarkguidelines.org](http://www.modeltrademarkguidelines.org), used under a Creative Commons Attribution 3.0 Unported license: [https://creativecommons.org/licenses/by/3.0/deed.en_US](https://creativecommons.org/licenses/by/3.0/deed.en_US).
diff --git a/docs/static/logos/pgo.png b/docs/static/logos/pgo.png
new file mode 100644
index 0000000000..9d38c8f859
Binary files /dev/null and b/docs/static/logos/pgo.png differ
diff --git a/docs/static/logos/pgo.svg b/docs/static/logos/pgo.svg
new file mode 100644
index 0000000000..d72f9d7810
--- /dev/null
+++ b/docs/static/logos/pgo.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/examples/create-by-resource/fromcrd.json b/examples/create-by-resource/fromcrd.json
index 987ec53d55..b044941521 100644
--- a/examples/create-by-resource/fromcrd.json
+++ b/examples/create-by-resource/fromcrd.json
@@ -16,7 +16,7 @@
"pg-cluster": "fromcrd",
"pg-pod-anti-affinity": "",
"pgo-backrest": "true",
- "pgo-version": "4.5.0",
+ "pgo-version": "4.5.7",
"pgouser": "pgoadmin",
"primary": "true"
},
@@ -62,7 +62,7 @@
},
"backrestResources": {},
"ccpimage": "crunchy-postgres-ha",
- "ccpimagetag": "centos7-12.4-4.5.0",
+ "ccpimagetag": "ubi8-12.11-4.5.7",
"clustername": "fromcrd",
"customconfig": "",
"database": "userdb",
@@ -95,7 +95,7 @@
"userlabels": {
"crunchy-postgres-exporter": "false",
"pg-pod-anti-affinity": "",
- "pgo-version": "4.5.0",
+ "pgo-version": "4.5.7",
"pgouser": "pgoadmin",
"pgo-backrest": "true"
},
diff --git a/examples/create-by-resource/run.sh b/examples/create-by-resource/run.sh
index 1cdefdda77..271154f8f9 100755
--- a/examples/create-by-resource/run.sh
+++ b/examples/create-by-resource/run.sh
@@ -1,6 +1,6 @@
#!/bin/bash
-# Copyright 2019 - 2020 Crunchy Data Solutions, Inc.
+# Copyright 2019 - 2022 Crunchy Data Solutions, Inc.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
@@ -18,6 +18,8 @@
#########
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
+# PGO_CMD should either be "kubectl" or "oc" -- defaulting to kubectl
+PGO_CMD=${PGO_CMD:-kubectl}
# A namespace that exists in NAMESPACE env var - see examples/envs.sh
export NS=pgouser1
@@ -41,49 +43,10 @@ rm $DIR/fromcrd-key $DIR/fromcrd-key.pub
# EXAMPLE RUN #
###############
-# generate a SSH public/private keypair for use by pgBackRest
-ssh-keygen -t ed25519 -N '' -f $DIR/fromcrd-key
-
-# base64 encoded the keys for the generation of the Kube secret, and place
-# them into variables temporarily
-PUBLIC_KEY_TEMP=$(cat $DIR/fromcrd-key.pub | base64)
-PRIVATE_KEY_TEMP=$(cat $DIR/fromcrd-key | base64)
-
-export PUBLIC_KEY="${PUBLIC_KEY_TEMP//[$'\n']}"
-export PRIVATE_KEY="${PRIVATE_KEY_TEMP//[$'\n']}"
-
-unset PUBLIC_KEY_TEMP
-unset PRIVATE_KEY_TEMP
-
-# create the backrest-repo-config example file and substitute in the newly
-# created keys
-cat <<-EOF > $DIR/backrest-repo-config.yaml
-apiVersion: v1
-data:
- authorized_keys: ${PUBLIC_KEY}
- id_ed25519: ${PRIVATE_KEY}
- ssh_host_ed25519_key: ${PRIVATE_KEY}
- config: SG9zdCAqClN0cmljdEhvc3RLZXlDaGVja2luZyBubwpJZGVudGl0eUZpbGUgL3RtcC9pZF9lZDI1NTE5ClBvcnQgMjAyMgpVc2VyIHBnYmFja3Jlc3QK
- sshd_config: IwkkT3BlbkJTRDogc3NoZF9jb25maWcsdiAxLjEwMCAyMDE2LzA4LzE1IDEyOjMyOjA0IG5hZGR5IEV4cCAkCgojIFRoaXMgaXMgdGhlIHNzaGQgc2VydmVyIHN5c3RlbS13aWRlIGNvbmZpZ3VyYXRpb24gZmlsZS4gIFNlZQojIHNzaGRfY29uZmlnKDUpIGZvciBtb3JlIGluZm9ybWF0aW9uLgoKIyBUaGlzIHNzaGQgd2FzIGNvbXBpbGVkIHdpdGggUEFUSD0vdXNyL2xvY2FsL2JpbjovdXNyL2JpbgoKIyBUaGUgc3RyYXRlZ3kgdXNlZCBmb3Igb3B0aW9ucyBpbiB0aGUgZGVmYXVsdCBzc2hkX2NvbmZpZyBzaGlwcGVkIHdpdGgKIyBPcGVuU1NIIGlzIHRvIHNwZWNpZnkgb3B0aW9ucyB3aXRoIHRoZWlyIGRlZmF1bHQgdmFsdWUgd2hlcmUKIyBwb3NzaWJsZSwgYnV0IGxlYXZlIHRoZW0gY29tbWVudGVkLiAgVW5jb21tZW50ZWQgb3B0aW9ucyBvdmVycmlkZSB0aGUKIyBkZWZhdWx0IHZhbHVlLgoKIyBJZiB5b3Ugd2FudCB0byBjaGFuZ2UgdGhlIHBvcnQgb24gYSBTRUxpbnV4IHN5c3RlbSwgeW91IGhhdmUgdG8gdGVsbAojIFNFTGludXggYWJvdXQgdGhpcyBjaGFuZ2UuCiMgc2VtYW5hZ2UgcG9ydCAtYSAtdCBzc2hfcG9ydF90IC1wIHRjcCAjUE9SVE5VTUJFUgojClBvcnQgMjAyMgojQWRkcmVzc0ZhbWlseSBhbnkKI0xpc3RlbkFkZHJlc3MgMC4wLjAuMAojTGlzdGVuQWRkcmVzcyA6OgoKSG9zdEtleSAvc3NoZC9zc2hfaG9zdF9lZDI1NTE5X2tleQoKIyBDaXBoZXJzIGFuZCBrZXlpbmcKI1Jla2V5TGltaXQgZGVmYXVsdCBub25lCgojIExvZ2dpbmcKI1N5c2xvZ0ZhY2lsaXR5IEFVVEgKU3lzbG9nRmFjaWxpdHkgQVVUSFBSSVYKI0xvZ0xldmVsIElORk8KCiMgQXV0aGVudGljYXRpb246CgojTG9naW5HcmFjZVRpbWUgMm0KUGVybWl0Um9vdExvZ2luIG5vClN0cmljdE1vZGVzIG5vCiNNYXhBdXRoVHJpZXMgNgojTWF4U2Vzc2lvbnMgMTAKClB1YmtleUF1dGhlbnRpY2F0aW9uIHllcwoKIyBUaGUgZGVmYXVsdCBpcyB0byBjaGVjayBib3RoIC5zc2gvYXV0aG9yaXplZF9rZXlzIGFuZCAuc3NoL2F1dGhvcml6ZWRfa2V5czIKIyBidXQgdGhpcyBpcyBvdmVycmlkZGVuIHNvIGluc3RhbGxhdGlvbnMgd2lsbCBvbmx5IGNoZWNrIC5zc2gvYXV0aG9yaXplZF9rZXlzCkF1dGhvcml6ZWRLZXlzRmlsZQkvc3NoZC9hdXRob3JpemVkX2tleXMKCiNBdXRob3JpemVkUHJpbmNpcGFsc0ZpbGUgbm9uZQoKI0F1dGhvcml6ZWRLZXlzQ29tbWFuZCBub25lCiNBdXRob3JpemVkS2V5c0NvbW1hbmRVc2VyIG5vYm9keQoKIyBGb3IgdGhpcyB0byB3b3JrIHlvdSB3aWxsIGFsc28gbmVlZCBob3N0IGtleXMgaW4gL2V0Yy9zc2gvc3NoX2tub3duX2hvc3RzCiNIb3N0YmFzZWRBdXRoZW50aWNhdGlvbiBubwojIENoYW5nZSB0byB5ZXMgaWYgeW91IGRvbid0IHRydXN0IH4vLnNzaC9rbm93bl9ob3N0cyBmb3IKIyBIb3N0YmFzZWRBdXRoZW50aWNhdGlvbgojSWdub3JlVXNlcktub3duSG9zdHMgbm8KIyBEb24ndCByZWFkIHRoZSB1c2VyJ3Mgfi8ucmhvc3RzIGFuZCB+Ly5zaG9zdHMgZmlsZXMKI0lnbm9yZVJob3N0cyB5ZXMKCiMgVG8gZGlzYWJsZSB0dW5uZWxlZCBjbGVhciB0ZXh0IHBhc3N3b3JkcywgY2hhbmdlIHRvIG5vIGhlcmUhCiNQYXNzd29yZEF1dGhlbnRpY2F0aW9uIHllcwojUGVybWl0RW1wdHlQYXNzd29yZHMgbm8KUGFzc3dvcmRBdXRoZW50aWNhdGlvbiBubwoKIyBDaGFuZ2UgdG8gbm8gdG8gZGlzYWJsZSBzL2tleSBwYXNzd29yZHMKQ2hhbGxlbmdlUmVzcG9uc2VBdXRoZW50aWNhdGlvbiB5ZXMKI0NoYWxsZW5nZVJlc3BvbnNlQXV0aGVudGljYXRpb24gbm8KCiMgS2VyYmVyb3Mgb3B0aW9ucwojS2VyYmVyb3NBdXRoZW50aWNhdGlvbiBubwojS2VyYmVyb3NPckxvY2FsUGFzc3dkIHllcwojS2VyYmVyb3NUaWNrZXRDbGVhbnVwIHllcwojS2VyYmVyb3NHZXRBRlNUb2tlbiBubwojS2VyYmVyb3NVc2VLdXNlcm9rIHllcwoKIyBHU1NBUEkgb3B0aW9ucwojR1NTQVBJQXV0aGVudGljYXRpb24geWVzCiNHU1NBUElDbGVhbnVwQ3JlZGVudGlhbHMgbm8KI0dTU0FQSVN0cmljdEFjY2VwdG9yQ2hlY2sgeWVzCiNHU1NBUElLZXlFeGNoYW5nZSBubwojR1NTQVBJRW5hYmxlazV1c2VycyBubwoKIyBTZXQgdGhpcyB0byAneWVzJyB0byBlbmFibGUgUEFNIGF1dGhlbnRpY2F0aW9uLCBhY2NvdW50IHByb2Nlc3NpbmcsCiMgYW5kIHNlc3Npb24gcHJvY2Vzc2luZy4gSWYgdGhpcyBpcyBlbmFibGVkLCBQQU0gYXV0aGVudGljYXRpb24gd2lsbAojIGJlIGFsbG93ZWQgdGhyb3VnaCB0aGUgQ2hhbGxlbmdlUmVzcG9uc2VBdXRoZW50aWNhdGlvbiBhbmQKIyBQYXNzd29yZEF1dGhlbnRpY2F0aW9uLiAgRGVwZW5kaW5nIG9uIHlvdXIgUEFNIGNvbmZpZ3VyYXRpb24sCiMgUEFNIGF1dGhlbnRpY2F0aW9uIHZpYSBDaGFsbGVuZ2VSZXNwb25zZUF1dGhlbnRpY2F0aW9uIG1heSBieXBhc3MKIyB0aGUgc2V0dGluZyBvZiAiUGVybWl0Um9vdExvZ2luIHdpdGhvdXQtcGFzc3dvcmQiLgojIElmIHlvdSBqdXN0IHdhbnQgdGhlIFBBTSBhY2NvdW50IGFuZCBzZXNzaW9uIGNoZWNrcyB0byBydW4gd2l0aG91dAojIFBBTSBhdXRoZW50aWNhdGlvbiwgdGhlbiBlbmFibGUgdGhpcyBidXQgc2V0IFBhc3N3b3JkQXV0aGVudGljYXRpb24KIyBhbmQgQ2hhbGxlbmdlUmVzcG9uc2VBdXRoZW50aWNhdGlvbiB0byAnbm8nLgojIFdBUk5JTkc6ICdVc2VQQU0gbm8nIGlzIG5vdCBzdXBwb3J0ZWQgaW4gUmVkIEhhdCBFbnRlcnByaXNlIExpbnV4IGFuZCBtYXkgY2F1c2Ugc2V2ZXJhbAojIHByb2JsZW1zLgpVc2VQQU0geWVzIAoKI0FsbG93QWdlbnRGb3J3YXJkaW5nIHllcwojQWxsb3dUY3BGb3J3YXJkaW5nIHllcwojR2F0ZXdheVBvcnRzIG5vClgxMUZvcndhcmRpbmcgeWVzCiNYMTFEaXNwbGF5T2Zmc2V0IDEwCiNYMTFVc2VMb2NhbGhvc3QgeWVzCiNQZXJtaXRUVFkgeWVzCiNQcmludE1vdGQgeWVzCiNQcmludExhc3RMb2cgeWVzCiNUQ1BLZWVwQWxpdmUgeWVzCiNVc2VMb2dpbiBubwpVc2VQcml2aWxlZ2VTZXBhcmF0aW9uIG5vCiNQZXJtaXRVc2VyRW52aXJvbm1lbnQgbm8KI0NvbXByZXNzaW9uIGRlbGF5ZWQKI0NsaWVudEFsaXZlSW50ZXJ2YWwgMAojQ2xpZW50QWxpdmVDb3VudE1heCAzCiNTaG93UGF0Y2hMZXZlbCBubwojVXNlRE5TIHllcwojUGlkRmlsZSAvdmFyL3J1bi9zc2hkLnBpZAojTWF4U3RhcnR1cHMgMTA6MzA6MTAwCiNQZXJtaXRUdW5uZWwgbm8KI0Nocm9vdERpcmVjdG9yeSBub25lCiNWZXJzaW9uQWRkZW5kdW0gbm9uZQoKIyBubyBkZWZhdWx0IGJhbm5lciBwYXRoCiNCYW5uZXIgbm9uZQoKIyBBY2NlcHQgbG9jYWxlLXJlbGF0ZWQgZW52aXJvbm1lbnQgdmFyaWFibGVzCkFjY2VwdEVudiBMQU5HIExDX0NUWVBFIExDX05VTUVSSUMgTENfVElNRSBMQ19DT0xMQVRFIExDX01PTkVUQVJZIExDX01FU1NBR0VTCkFjY2VwdEVudiBMQ19QQVBFUiBMQ19OQU1FIExDX0FERFJFU1MgTENfVEVMRVBIT05FIExDX01FQVNVUkVNRU5UCkFjY2VwdEVudiBMQ19JREVOVElGSUNBVElPTiBMQ19BTEwgTEFOR1VBR0UKQWNjZXB0RW52IFhNT0RJRklFUlMKCiMgb3ZlcnJpZGUgZGVmYXVsdCBvZiBubyBzdWJzeXN0ZW1zClN1YnN5c3RlbQlzZnRwCS91c3IvbGliZXhlYy9vcGVuc3NoL3NmdHAtc2VydmVyCgojIEV4YW1wbGUgb2Ygb3ZlcnJpZGluZyBzZXR0aW5ncyBvbiBhIHBlci11c2VyIGJhc2lzCiNNYXRjaCBVc2VyIGFub25jdnMKIwlYMTFGb3J3YXJkaW5nIG5vCiMJQWxsb3dUY3BGb3J3YXJkaW5nIG5vCiMJUGVybWl0VFRZIG5vCiMJRm9yY2VDb21tYW5kIGN2cyBzZXJ2ZXI=
-kind: Secret
-metadata:
- labels:
- pg-cluster: fromcrd
- pgo-backrest-repo: "true"
- name: fromcrd-backrest-repo-config
- namespace: ${NS}
-type: Opaque
-EOF
-
-# unset the *_KEY environmental variables
-unset PUBLIC_KEY
-unset PRIVATE_KEY
-
# create the required postgres credentials for the fromcrd cluster
$PGO_CMD -n $NS create -f $DIR/postgres-secret.yaml
$PGO_CMD -n $NS create -f $DIR/primaryuser-secret.yaml
$PGO_CMD -n $NS create -f $DIR/testuser-secret.yaml
-$PGO_CMD -n $NS create -f $DIR/backrest-repo-config.yaml
# create the pgcluster CRD for the fromcrd cluster
$PGO_CMD -n $NS create -f $DIR/fromcrd.json
diff --git a/examples/custom-config/create.sh b/examples/custom-config/create.sh
index b0599f1b37..519ab0433e 100755
--- a/examples/custom-config/create.sh
+++ b/examples/custom-config/create.sh
@@ -1,6 +1,6 @@
#!/bin/bash
-# Copyright 2018 - 2020 Crunchy Data Solutions, Inc.
+# Copyright 2018 - 2022 Crunchy Data Solutions, Inc.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
@@ -28,11 +28,8 @@ function echo_info() {
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
-#Error if PGO_CMD not set
-if [[ -z ${PGO_CMD} ]]
-then
- echo_err "PGO_CMD is not set."
-fi
+# PGO_CMD should either be "kubectl" or "oc" -- defaulting to kubectl
+PGO_CMD=${PGO_CMD:-kubectl}
#Error is PGO_NAMESPACE not set
if [[ -z ${PGO_NAMESPACE} ]]
diff --git a/examples/custom-config/setup.sql b/examples/custom-config/setup.sql
index 206005eb8a..ca7510ff93 100644
--- a/examples/custom-config/setup.sql
+++ b/examples/custom-config/setup.sql
@@ -1,5 +1,5 @@
/*
- * Copyright 2017 - 2020 Crunchy Data Solutions, Inc.
+ * Copyright 2017 - 2022 Crunchy Data Solutions, Inc.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
diff --git a/examples/envs.sh b/examples/envs.sh
index 86bde3cde3..d30bb67261 100644
--- a/examples/envs.sh
+++ b/examples/envs.sh
@@ -22,8 +22,8 @@ export PGO_CONF_DIR=$PGOROOT/installers/ansible/roles/pgo-operator/files
# the version of the Operator you run is set by these vars
export PGO_IMAGE_PREFIX=registry.developers.crunchydata.com/crunchydata
-export PGO_BASEOS=centos7
-export PGO_VERSION=4.5.0
+export PGO_BASEOS=ubi8
+export PGO_VERSION=4.5.7
export PGO_IMAGE_TAG=$PGO_BASEOS-$PGO_VERSION
# for setting the pgo apiserver port, disabling TLS or not verifying TLS
diff --git a/examples/helm/README.md b/examples/helm/README.md
new file mode 100644
index 0000000000..6936a6ea86
--- /dev/null
+++ b/examples/helm/README.md
@@ -0,0 +1,79 @@
+# create-cluster
+
+This is a working example of how to create a cluster via the crd workflow
+using a [Helm](https://helm.sh/) chart.
+
+## Prerequisites
+
+### Postgres Operator
+
+This example assumes you have the Crunchy PostgreSQL Operator installed
+in a namespace called `pgo`.
+
+### Helm
+
+Helm will also need to be installed for this example to run
+
+## Documentation
+
+Please see the documentation for more guidance using custom resources:
+
+https://access.crunchydata.com/documentation/postgres-operator/latest/custom-resources/
+
+## Setup
+
+If you are running Postgres Operator 4.5.3 or later, you can skip the below
+step.
+
+### Before 4.5.3
+
+```
+cd postgres-operator/examples/helm/create-cluster
+
+mkdir certs
+cd certs
+
+# this variable is the name of the cluster being created
+export pgo_cluster_name=hippo
+
+# generate a SSH public/private keypair for use by pgBackRest
+ssh-keygen -t ed25519 -N '' -f "${pgo_cluster_name}-key"
+```
+
+## Running the Example
+
+For this example we will deploy the cluster into the `pgo` namespace where the
+Postgres Operator is installed and running.
+
+Return to the `create-cluster` directory:
+
+```
+cd postgres-operator/examples/helm/create-cluster
+```
+
+The following commands will allow you to execute a dry run first with debug
+if you want to verify everything is set correctly. Then after everything looks
+good run the install command with out the flags:
+
+```
+helm install --dry-run --debug postgres-operator-create-cluster . -n pgo
+helm install postgres-operator-create-cluster . -n pgo
+```
+
+## Verify
+
+Now you can your Hippo cluster has deployed into the pgo namespace by running
+these few commands:
+
+```
+kubectl get all -n pgo
+
+pgo test hippo -n pgo
+
+pgo show cluster hippo -n pgo
+```
+
+## NOTE
+
+As of operator version 4.5.0 when using helm uninstall you will have to manually
+clean up some left over artifacts after running the uninstall.
diff --git a/examples/helm/create-cluster/.helmignore b/examples/helm/create-cluster/.helmignore
new file mode 100644
index 0000000000..0e8a0eb36f
--- /dev/null
+++ b/examples/helm/create-cluster/.helmignore
@@ -0,0 +1,23 @@
+# Patterns to ignore when building packages.
+# This supports shell glob matching, relative path matching, and
+# negation (prefixed with !). Only one pattern per line.
+.DS_Store
+# Common VCS dirs
+.git/
+.gitignore
+.bzr/
+.bzrignore
+.hg/
+.hgignore
+.svn/
+# Common backup files
+*.swp
+*.bak
+*.tmp
+*.orig
+*~
+# Various IDEs
+.project
+.idea/
+*.tmproj
+.vscode/
diff --git a/examples/helm/create-cluster/Chart.yaml b/examples/helm/create-cluster/Chart.yaml
new file mode 100644
index 0000000000..5857415edb
--- /dev/null
+++ b/examples/helm/create-cluster/Chart.yaml
@@ -0,0 +1,23 @@
+apiVersion: v2
+name: crunchycrdcluster
+description: A Helm chart for Kubernetes
+
+# A chart can be either an 'application' or a 'library' chart.
+#
+# Application charts are a collection of templates that can be packaged into versioned archives
+# to be deployed.
+#
+# Library charts provide useful utilities or functions for the chart developer. They're included as
+# a dependency of application charts to inject those utilities and functions into the rendering
+# pipeline. Library charts do not define any templates and therefore cannot be deployed.
+type: application
+
+# This is the chart version. This version number should be incremented each time you make changes
+# to the chart and its templates, including the app version.
+# Versions are expected to follow Semantic Versioning (https://semver.org/)
+version: 0.1.0
+
+# This is the version number of the application being deployed. This version number should be
+# incremented each time you make changes to the application. Versions are not expected to
+# follow Semantic Versioning. They should reflect the version the application is using.
+appVersion: 1.16.0
diff --git a/examples/helm/create-cluster/templates/NOTES.txt b/examples/helm/create-cluster/templates/NOTES.txt
new file mode 100644
index 0000000000..542443a66e
--- /dev/null
+++ b/examples/helm/create-cluster/templates/NOTES.txt
@@ -0,0 +1,34 @@
+Thank you deploying a crunchy postgreSQL cluster v{{ .Chart.AppVersion }}!
+
+ ((((((((((((((((((((((
+ (((((((((((((%%%%%%%(((((((((((((((
+ (((((((((((%%% %%%%((((((((((((
+ (((((((((((%%( (((( ( %%%(((((((((((
+ (((((((((((((%% (( ,(( %%%(((((((((((
+ (((((((((((((((%% *%%/ %%%%%%%((((((((((
+ (((((((((((((((((((%%(( %%%%%%%%%%#(((((%%%%%%%%%%#((((((((((((
+ ((((((((((((((((((%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%((((((((((((((
+ *((((((((((((((((((((%%%%%% /%%%%%%%%%%%%%%%%%%%((((((((((((((((
+ (((((((((((((((((((((((%%%/ .%, %%%((((((((((((((((((,
+ ((((((((((((((((((((((% %#(((((((((((((((((
+(((((((((((((((%%%%%% #%(((((((((((((((((
+((((((((((((((%% %%(((((((((((((((,
+((((((((((((%%%#% % %%(((((((((((((((
+((((((((((((%. % % #((((((((((((((
+(((((((((((%% % %%* %(((((((((((((
+#(###(###(#%% %%% %% %%% #%%#(###(###(#
+###########%%%%% /%%%%%%%%%%%%% %% %%%%% ,%%#######
+###############%% %%%%%% %%% %%%%%%%% %%#####
+ ################%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% %%##
+ ################%% %%%%%%%%%%%%%%%%% %%%% %
+ ##############%# %% (%%%%%%% %%%%%%
+ #############% %%%%% %%%%%%%%%%%
+ ###########% %%%%%%%%%%% %%%%%%%%%
+ #########%% %% %%%%%%%%%%%%%%%#
+ ########%% %% %%%%%%%%%
+ ######%% %% %%%%%%
+ ####%%% %%%%% %
+ %% %%%%
+
+More information about the custom resource workflow the docs can be found here:
+https://access.crunchydata.com/documentation/postgres-operator/latest/custom-resources/
diff --git a/examples/helm/create-cluster/templates/_helpers.tpl b/examples/helm/create-cluster/templates/_helpers.tpl
new file mode 100644
index 0000000000..8ebe4c4d53
--- /dev/null
+++ b/examples/helm/create-cluster/templates/_helpers.tpl
@@ -0,0 +1,62 @@
+{{/*
+Expand the name of the chart.
+*/}}
+{{- define "crunchycrdcluster.name" -}}
+{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
+{{- end }}
+
+{{/*
+Create a default fully qualified app name.
+We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
+If release name contains chart name it will be used as a full name.
+*/}}
+{{- define "crunchycrdcluster.fullname" -}}
+{{- if .Values.fullnameOverride }}
+{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}
+{{- else }}
+{{- $name := default .Chart.Name .Values.nameOverride }}
+{{- if contains $name .Release.Name }}
+{{- .Release.Name | trunc 63 | trimSuffix "-" }}
+{{- else }}
+{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }}
+{{- end }}
+{{- end }}
+{{- end }}
+
+{{/*
+Create chart name and version as used by the chart label.
+*/}}
+{{- define "crunchycrdcluster.chart" -}}
+{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
+{{- end }}
+
+{{/*
+Common labels
+*/}}
+{{- define "crunchycrdcluster.labels" -}}
+helm.sh/chart: {{ include "crunchycrdcluster.chart" . }}
+{{ include "crunchycrdcluster.selectorLabels" . }}
+{{- if .Chart.AppVersion }}
+app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
+{{- end }}
+app.kubernetes.io/managed-by: {{ .Release.Service }}
+{{- end }}
+
+{{/*
+Selector labels
+*/}}
+{{- define "crunchycrdcluster.selectorLabels" -}}
+app.kubernetes.io/name: {{ include "crunchycrdcluster.name" . }}
+app.kubernetes.io/instance: {{ .Release.Name }}
+{{- end }}
+
+{{/*
+Create the name of the service account to use
+*/}}
+{{- define "crunchycrdcluster.serviceAccountName" -}}
+{{- if .Values.serviceAccount.create }}
+{{- default (include "crunchycrdcluster.fullname" .) .Values.serviceAccount.name }}
+{{- else }}
+{{- default "default" .Values.serviceAccount.name }}
+{{- end }}
+{{- end }}
diff --git a/examples/helm/create-cluster/templates/hippo-secret.yaml b/examples/helm/create-cluster/templates/hippo-secret.yaml
new file mode 100644
index 0000000000..8e922196e1
--- /dev/null
+++ b/examples/helm/create-cluster/templates/hippo-secret.yaml
@@ -0,0 +1,12 @@
+apiVersion: v1
+data:
+ password: {{ .Values.hipposecretpassword | b64enc }}
+ username: {{ .Values.hipposecretuser | b64enc }}
+kind: Secret
+metadata:
+ labels:
+ pg-cluster: {{ .Values.pgclustername }}
+ vendor: crunchydata
+ name: {{ .Values.pgclustername }}-hippo-secret
+ namespace: {{ .Values.namespace }}
+type: Opaque
diff --git a/examples/helm/create-cluster/templates/pgcluster.yaml b/examples/helm/create-cluster/templates/pgcluster.yaml
new file mode 100644
index 0000000000..2b29f4ce97
--- /dev/null
+++ b/examples/helm/create-cluster/templates/pgcluster.yaml
@@ -0,0 +1,95 @@
+apiVersion: crunchydata.com/v1
+kind: Pgcluster
+metadata:
+ annotations:
+ current-primary: {{ .Values.pgclustername }}
+ labels:
+ autofail: "true"
+ crunchy-pgbadger: "false"
+ crunchy-pgha-scope: {{ .Values.pgclustername }}
+ crunchy-postgres-exporter: "false"
+ deployment-name: {{ .Values.pgclustername }}
+ name: {{ .Values.pgclustername }}
+ pg-cluster: {{ .Values.pgclustername }}
+ pg-pod-anti-affinity: ""
+ pgo-backrest: "true"
+ pgo-version: 4.5.7
+ pgouser: admin
+ name: {{ .Values.pgclustername }}
+ namespace: {{ .Values.namespace }}
+spec:
+ BackrestStorage:
+ accessmode: ReadWriteOnce
+ matchLabels: ""
+ name: ""
+ size: 3G
+ storageclass: ""
+ storagetype: dynamic
+ supplementalgroups: ""
+ PrimaryStorage:
+ accessmode: ReadWriteOnce
+ matchLabels: ""
+ name: {{ .Values.pgclustername }}
+ size: 3G
+ storageclass: ""
+ storagetype: dynamic
+ supplementalgroups: ""
+ ReplicaStorage:
+ accessmode: ReadWriteOnce
+ matchLabels: ""
+ name: ""
+ size: 3G
+ storageclass: ""
+ storagetype: dynamic
+ supplementalgroups: ""
+ annotations:
+ backrestLimits: {}
+ backrestRepoPath: ""
+ backrestResources:
+ memory: 48Mi
+ backrestS3Bucket: ""
+ backrestS3Endpoint: ""
+ backrestS3Region: ""
+ backrestS3URIStyle: ""
+ backrestS3VerifyTLS: ""
+ ccpimage: {{ .Values.ccpimage }}
+ ccpimageprefix: {{ .Values.ccpimageprefix }}
+ ccpimagetag: {{ .Values.ccpimagetag }}
+ clustername: {{ .Values.pgclustername }}
+ customconfig: ""
+ database: {{ .Values.pgclustername }}
+ exporterport: "9187"
+ limits: {}
+ name: {{ .Values.pgclustername }}
+ namespace: {{ .Values.namespace }}
+ pgBouncer:
+ limits: {}
+ replicas: 0
+ pgDataSource:
+ restoreFrom: ""
+ restoreOpts: ""
+ pgbadgerport: "10000"
+ pgoimageprefix: {{ .Values.pgoimageprefix }}
+ podAntiAffinity:
+ default: preferred
+ pgBackRest: preferred
+ pgBouncer: preferred
+ policies: ""
+ port: "5432"
+ primarysecretname: {{ .Values.pgclustername }}-primaryuser-secret
+ replicas: "0"
+ rootsecretname: {{ .Values.pgclustername }}-postgres-secret
+ shutdown: false
+ standby: false
+ tablespaceMounts: {}
+ tls:
+ caSecret: ""
+ replicationTLSSecret: ""
+ tlsSecret: ""
+ tlsOnly: false
+ user: hippo
+ userlabels:
+ crunchy-postgres-exporter: "false"
+ pg-pod-anti-affinity: ""
+ pgo-version: {{ .Values.pgoversion }}
+ usersecretname: {{ .Values.pgclustername }}-hippo-secret
diff --git a/examples/helm/create-cluster/templates/postgres-secret.yaml b/examples/helm/create-cluster/templates/postgres-secret.yaml
new file mode 100644
index 0000000000..914da77e1c
--- /dev/null
+++ b/examples/helm/create-cluster/templates/postgres-secret.yaml
@@ -0,0 +1,12 @@
+apiVersion: v1
+data:
+ password: {{ .Values.postgressecretpassword | b64enc }}
+ username: {{ .Values.postgressecretuser | b64enc }}
+kind: Secret
+metadata:
+ labels:
+ pg-cluster: {{ .Values.pgclustername }}
+ vendor: crunchydata
+ name: {{ .Values.pgclustername }}-postgres-secret
+ namespace: {{ .Values.namespace }}
+type: Opaque
\ No newline at end of file
diff --git a/examples/helm/create-cluster/templates/primaryuser-secret.yaml b/examples/helm/create-cluster/templates/primaryuser-secret.yaml
new file mode 100644
index 0000000000..f4471b8fd2
--- /dev/null
+++ b/examples/helm/create-cluster/templates/primaryuser-secret.yaml
@@ -0,0 +1,12 @@
+apiVersion: v1
+data:
+ password: {{ .Values.primaryusersecretpassword | b64enc }}
+ username: {{ .Values.primaryusersecretuser | b64enc }}
+kind: Secret
+metadata:
+ labels:
+ pg-cluster: {{ .Values.pgclustername }}
+ vendor: crunchydata
+ name: {{ .Values.pgclustername }}-primaryuser-secret
+ namespace: {{ .Values.namespace }}
+type: Opaque
\ No newline at end of file
diff --git a/examples/helm/create-cluster/values.yaml b/examples/helm/create-cluster/values.yaml
new file mode 100644
index 0000000000..b6a8d32648
--- /dev/null
+++ b/examples/helm/create-cluster/values.yaml
@@ -0,0 +1,17 @@
+# Default values for pg_deployment in SDX.
+# This is a YAML-formatted file.
+# Declare variables to be passed into your templates.
+# The values is for the namespace and the postgresql cluster name
+ccpimage: crunchy-postgres-ha
+ccpimageprefix: registry.developers.crunchydata.com/crunchydata
+ccpimagetag: ubi8-12.11-4.5.7
+namespace: pgo
+pgclustername: hippo
+pgoimageprefix: registry.developers.crunchydata.com/crunchydata
+pgoversion: 4.5.7
+hipposecretuser: "hippo"
+hipposecretpassword: "Supersecurepassword*"
+postgressecretuser: "postgres"
+postgressecretpassword: "Anothersecurepassword*"
+primaryusersecretuser: "primaryuser"
+primaryusersecretpassword: "Moresecurepassword*"
\ No newline at end of file
diff --git a/hack/boilerplate.go.txt b/hack/boilerplate.go.txt
index 8aabc9a12b..22523257ce 100644
--- a/hack/boilerplate.go.txt
+++ b/hack/boilerplate.go.txt
@@ -1,5 +1,5 @@
/*
-Copyright 2020 Crunchy Data Solutions, Inc.
+Copyright 2020 - 2022 Crunchy Data Solutions, Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
diff --git a/hack/config_sync.sh b/hack/config_sync.sh
index cab45b023b..b7a7b95b95 100755
--- a/hack/config_sync.sh
+++ b/hack/config_sync.sh
@@ -1,6 +1,6 @@
#!/bin/bash
-# Copyright 2020 Crunchy Data Solutions, Inc.
+# Copyright 2020 - 2022 Crunchy Data Solutions, Inc.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
diff --git a/hack/update-codegen.sh b/hack/update-codegen.sh
index c9795398ae..f010b87f3a 100755
--- a/hack/update-codegen.sh
+++ b/hack/update-codegen.sh
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
-# Copyright 2020 Crunchy Data Solutions, Inc.
+# Copyright 2020 - 2022 Crunchy Data Solutions, Inc.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
diff --git a/hack/verify-codegen.sh b/hack/verify-codegen.sh
index c096654ca9..4c359a10bf 100755
--- a/hack/verify-codegen.sh
+++ b/hack/verify-codegen.sh
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
-# Copyright 2020 Crunchy Data Solutions, Inc.
+# Copyright 2020 - 2022 Crunchy Data Solutions, Inc.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
diff --git a/installers/ansible/README.md b/installers/ansible/README.md
index a9f0babd16..d6edeb160d 100644
--- a/installers/ansible/README.md
+++ b/installers/ansible/README.md
@@ -1,15 +1,15 @@
-# Crunchy Data PostgreSQL Operator Playbook
+# PGO: Postgres Operator Playbook
-
+
-Latest Release: 4.5.0
+Latest Release: 4.5.9
## General
-This repository contains Ansible Roles for deploying the Crunchy PostgreSQL Operator
-for Kubernetes and OpenShift.
+This repository contains Ansible Roles for deploying PGO: the Postgres Operator
+from [Crunchy Data](https://www.crunchydata.com) for Kubernetes and OpenShift.
See the [official documentation for more information](https://crunchydata.github.io/postgres-operator/stable/)
on installing Crunchy PostgreSQL Operator.
diff --git a/installers/ansible/roles/pgo-operator/files/crds/pgclusters-crd.yaml b/installers/ansible/roles/pgo-operator/files/crds/pgclusters-crd.yaml
index bea777b436..c6d414d74b 100644
--- a/installers/ansible/roles/pgo-operator/files/crds/pgclusters-crd.yaml
+++ b/installers/ansible/roles/pgo-operator/files/crds/pgclusters-crd.yaml
@@ -3,6 +3,8 @@ apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
name: pgclusters.crunchydata.com
+ labels:
+ vendor: crunchydata
spec:
group: crunchydata.com
names:
diff --git a/installers/ansible/roles/pgo-operator/files/crds/pgpolicies-crd.yaml b/installers/ansible/roles/pgo-operator/files/crds/pgpolicies-crd.yaml
index 32e0d2014c..73d84f0173 100644
--- a/installers/ansible/roles/pgo-operator/files/crds/pgpolicies-crd.yaml
+++ b/installers/ansible/roles/pgo-operator/files/crds/pgpolicies-crd.yaml
@@ -3,6 +3,8 @@ apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
name: pgpolicies.crunchydata.com
+ labels:
+ vendor: crunchydata
spec:
group: crunchydata.com
names:
diff --git a/installers/ansible/roles/pgo-operator/files/crds/pgreplicas-crd.yaml b/installers/ansible/roles/pgo-operator/files/crds/pgreplicas-crd.yaml
index 303f77f1ce..167474a41f 100644
--- a/installers/ansible/roles/pgo-operator/files/crds/pgreplicas-crd.yaml
+++ b/installers/ansible/roles/pgo-operator/files/crds/pgreplicas-crd.yaml
@@ -3,6 +3,8 @@ apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
name: pgreplicas.crunchydata.com
+ labels:
+ vendor: crunchydata
spec:
group: crunchydata.com
names:
diff --git a/installers/ansible/roles/pgo-operator/files/crds/pgtasks-crd.yaml b/installers/ansible/roles/pgo-operator/files/crds/pgtasks-crd.yaml
index 20fce21e7a..14ae07386d 100644
--- a/installers/ansible/roles/pgo-operator/files/crds/pgtasks-crd.yaml
+++ b/installers/ansible/roles/pgo-operator/files/crds/pgtasks-crd.yaml
@@ -3,6 +3,8 @@ apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
name: pgtasks.crunchydata.com
+ labels:
+ vendor: crunchydata
spec:
group: crunchydata.com
names:
diff --git a/installers/ansible/roles/pgo-operator/files/pgo-backrest-repo/aws-s3-ca.crt b/installers/ansible/roles/pgo-operator/files/pgo-backrest-repo/aws-s3-ca.crt
index 519028c63b..419c8de459 100644
--- a/installers/ansible/roles/pgo-operator/files/pgo-backrest-repo/aws-s3-ca.crt
+++ b/installers/ansible/roles/pgo-operator/files/pgo-backrest-repo/aws-s3-ca.crt
@@ -19,3 +19,127 @@ Epn3o0WC4zxe9Z2etciefC7IpJ5OCBRLbf1wbWsaY71k5h+3zvDyny67G7fyUIhz
ksLi4xaNmjICq44Y3ekQEe5+NauQrz4wlHrQMz2nZQ/1/I6eYs9HRCwBXbsdtTLS
R9I4LtD+gdwyah617jzV/OeBHRnDJELqYzmp
-----END CERTIFICATE-----
+-----BEGIN CERTIFICATE-----
+MIIDQTCCAimgAwIBAgITBmyfz5m/jAo54vB4ikPmljZbyjANBgkqhkiG9w0BAQsF
+ADA5MQswCQYDVQQGEwJVUzEPMA0GA1UEChMGQW1hem9uMRkwFwYDVQQDExBBbWF6
+b24gUm9vdCBDQSAxMB4XDTE1MDUyNjAwMDAwMFoXDTM4MDExNzAwMDAwMFowOTEL
+MAkGA1UEBhMCVVMxDzANBgNVBAoTBkFtYXpvbjEZMBcGA1UEAxMQQW1hem9uIFJv
+b3QgQ0EgMTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALJ4gHHKeNXj
+ca9HgFB0fW7Y14h29Jlo91ghYPl0hAEvrAIthtOgQ3pOsqTQNroBvo3bSMgHFzZM
+9O6II8c+6zf1tRn4SWiw3te5djgdYZ6k/oI2peVKVuRF4fn9tBb6dNqcmzU5L/qw
+IFAGbHrQgLKm+a/sRxmPUDgH3KKHOVj4utWp+UhnMJbulHheb4mjUcAwhmahRWa6
+VOujw5H5SNz/0egwLX0tdHA114gk957EWW67c4cX8jJGKLhD+rcdqsq08p8kDi1L
+93FcXmn/6pUCyziKrlA4b9v7LWIbxcceVOF34GfID5yHI9Y/QCB/IIDEgEw+OyQm
+jgSubJrIqg0CAwEAAaNCMEAwDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMC
+AYYwHQYDVR0OBBYEFIQYzIU07LwMlJQuCFmcx7IQTgoIMA0GCSqGSIb3DQEBCwUA
+A4IBAQCY8jdaQZChGsV2USggNiMOruYou6r4lK5IpDB/G/wkjUu0yKGX9rbxenDI
+U5PMCCjjmCXPI6T53iHTfIUJrU6adTrCC2qJeHZERxhlbI1Bjjt/msv0tadQ1wUs
+N+gDS63pYaACbvXy8MWy7Vu33PqUXHeeE6V/Uq2V8viTO96LXFvKWlJbYK8U90vv
+o/ufQJVtMVT8QtPHRh8jrdkPSHCa2XV4cdFyQzR1bldZwgJcJmApzyMZFo6IQ6XU
+5MsI+yMRQ+hDKXJioaldXgjUkK642M4UwtBV8ob2xJNDd2ZhwLnoQdeXeGADbkpy
+rqXRfboQnoZsG4q5WTP468SQvvG5
+-----END CERTIFICATE-----
+-----BEGIN CERTIFICATE-----
+MIIFQTCCAymgAwIBAgITBmyf0pY1hp8KD+WGePhbJruKNzANBgkqhkiG9w0BAQwF
+ADA5MQswCQYDVQQGEwJVUzEPMA0GA1UEChMGQW1hem9uMRkwFwYDVQQDExBBbWF6
+b24gUm9vdCBDQSAyMB4XDTE1MDUyNjAwMDAwMFoXDTQwMDUyNjAwMDAwMFowOTEL
+MAkGA1UEBhMCVVMxDzANBgNVBAoTBkFtYXpvbjEZMBcGA1UEAxMQQW1hem9uIFJv
+b3QgQ0EgMjCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAK2Wny2cSkxK
+gXlRmeyKy2tgURO8TW0G/LAIjd0ZEGrHJgw12MBvIITplLGbhQPDW9tK6Mj4kHbZ
+W0/jTOgGNk3Mmqw9DJArktQGGWCsN0R5hYGCrVo34A3MnaZMUnbqQ523BNFQ9lXg
+1dKmSYXpN+nKfq5clU1Imj+uIFptiJXZNLhSGkOQsL9sBbm2eLfq0OQ6PBJTYv9K
+8nu+NQWpEjTj82R0Yiw9AElaKP4yRLuH3WUnAnE72kr3H9rN9yFVkE8P7K6C4Z9r
+2UXTu/Bfh+08LDmG2j/e7HJV63mjrdvdfLC6HM783k81ds8P+HgfajZRRidhW+me
+z/CiVX18JYpvL7TFz4QuK/0NURBs+18bvBt+xa47mAExkv8LV/SasrlX6avvDXbR
+8O70zoan4G7ptGmh32n2M8ZpLpcTnqWHsFcQgTfJU7O7f/aS0ZzQGPSSbtqDT6Zj
+mUyl+17vIWR6IF9sZIUVyzfpYgwLKhbcAS4y2j5L9Z469hdAlO+ekQiG+r5jqFoz
+7Mt0Q5X5bGlSNscpb/xVA1wf+5+9R+vnSUeVC06JIglJ4PVhHvG/LopyboBZ/1c6
++XUyo05f7O0oYtlNc/LMgRdg7c3r3NunysV+Ar3yVAhU/bQtCSwXVEqY0VThUWcI
+0u1ufm8/0i2BWSlmy5A5lREedCf+3euvAgMBAAGjQjBAMA8GA1UdEwEB/wQFMAMB
+Af8wDgYDVR0PAQH/BAQDAgGGMB0GA1UdDgQWBBSwDPBMMPQFWAJI/TPlUq9LhONm
+UjANBgkqhkiG9w0BAQwFAAOCAgEAqqiAjw54o+Ci1M3m9Zh6O+oAA7CXDpO8Wqj2
+LIxyh6mx/H9z/WNxeKWHWc8w4Q0QshNabYL1auaAn6AFC2jkR2vHat+2/XcycuUY
++gn0oJMsXdKMdYV2ZZAMA3m3MSNjrXiDCYZohMr/+c8mmpJ5581LxedhpxfL86kS
+k5Nrp+gvU5LEYFiwzAJRGFuFjWJZY7attN6a+yb3ACfAXVU3dJnJUH/jWS5E4ywl
+7uxMMne0nxrpS10gxdr9HIcWxkPo1LsmmkVwXqkLN1PiRnsn/eBG8om3zEK2yygm
+btmlyTrIQRNg91CMFa6ybRoVGld45pIq2WWQgj9sAq+uEjonljYE1x2igGOpm/Hl
+urR8FLBOybEfdF849lHqm/osohHUqS0nGkWxr7JOcQ3AWEbWaQbLU8uz/mtBzUF+
+fUwPfHJ5elnNXkoOrJupmHN5fLT0zLm4BwyydFy4x2+IoZCn9Kr5v2c69BoVYh63
+n749sSmvZ6ES8lgQGVMDMBu4Gon2nL2XA46jCfMdiyHxtN/kHNGfZQIG6lzWE7OE
+76KlXIx3KadowGuuQNKotOrN8I1LOJwZmhsoVLiJkO/KdYE+HvJkJMcYr07/R54H
+9jVlpNMKVv/1F2Rs76giJUmTtt8AF9pYfl3uxRuw0dFfIRDH+fO6AgonB8Xx1sfT
+4PsJYGw=
+-----END CERTIFICATE-----
+-----BEGIN CERTIFICATE-----
+MIIBtjCCAVugAwIBAgITBmyf1XSXNmY/Owua2eiedgPySjAKBggqhkjOPQQDAjA5
+MQswCQYDVQQGEwJVUzEPMA0GA1UEChMGQW1hem9uMRkwFwYDVQQDExBBbWF6b24g
+Um9vdCBDQSAzMB4XDTE1MDUyNjAwMDAwMFoXDTQwMDUyNjAwMDAwMFowOTELMAkG
+A1UEBhMCVVMxDzANBgNVBAoTBkFtYXpvbjEZMBcGA1UEAxMQQW1hem9uIFJvb3Qg
+Q0EgMzBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABCmXp8ZBf8ANm+gBG1bG8lKl
+ui2yEujSLtf6ycXYqm0fc4E7O5hrOXwzpcVOho6AF2hiRVd9RFgdszflZwjrZt6j
+QjBAMA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgGGMB0GA1UdDgQWBBSr
+ttvXBp43rDCGB5Fwx5zEGbF4wDAKBggqhkjOPQQDAgNJADBGAiEA4IWSoxe3jfkr
+BqWTrBqYaGFy+uGh0PsceGCmQ5nFuMQCIQCcAu/xlJyzlvnrxir4tiz+OpAUFteM
+YyRIHN8wfdVoOw==
+-----END CERTIFICATE-----
+-----BEGIN CERTIFICATE-----
+MIIB8jCCAXigAwIBAgITBmyf18G7EEwpQ+Vxe3ssyBrBDjAKBggqhkjOPQQDAzA5
+MQswCQYDVQQGEwJVUzEPMA0GA1UEChMGQW1hem9uMRkwFwYDVQQDExBBbWF6b24g
+Um9vdCBDQSA0MB4XDTE1MDUyNjAwMDAwMFoXDTQwMDUyNjAwMDAwMFowOTELMAkG
+A1UEBhMCVVMxDzANBgNVBAoTBkFtYXpvbjEZMBcGA1UEAxMQQW1hem9uIFJvb3Qg
+Q0EgNDB2MBAGByqGSM49AgEGBSuBBAAiA2IABNKrijdPo1MN/sGKe0uoe0ZLY7Bi
+9i0b2whxIdIA6GO9mif78DluXeo9pcmBqqNbIJhFXRbb/egQbeOc4OO9X4Ri83Bk
+M6DLJC9wuoihKqB1+IGuYgbEgds5bimwHvouXKNCMEAwDwYDVR0TAQH/BAUwAwEB
+/zAOBgNVHQ8BAf8EBAMCAYYwHQYDVR0OBBYEFNPsxzplbszh2naaVvuc84ZtV+WB
+MAoGCCqGSM49BAMDA2gAMGUCMDqLIfG9fhGt0O9Yli/W651+kI0rz2ZVwyzjKKlw
+CkcO8DdZEv8tmZQoTipPNU0zWgIxAOp1AE47xDqUEpHJWEadIRNyp4iciuRMStuW
+1KyLa2tJElMzrdfkviT8tQp21KW8EA==
+-----END CERTIFICATE-----
+-----BEGIN CERTIFICATE-----
+MIID7zCCAtegAwIBAgIBADANBgkqhkiG9w0BAQsFADCBmDELMAkGA1UEBhMCVVMx
+EDAOBgNVBAgTB0FyaXpvbmExEzARBgNVBAcTClNjb3R0c2RhbGUxJTAjBgNVBAoT
+HFN0YXJmaWVsZCBUZWNobm9sb2dpZXMsIEluYy4xOzA5BgNVBAMTMlN0YXJmaWVs
+ZCBTZXJ2aWNlcyBSb290IENlcnRpZmljYXRlIEF1dGhvcml0eSAtIEcyMB4XDTA5
+MDkwMTAwMDAwMFoXDTM3MTIzMTIzNTk1OVowgZgxCzAJBgNVBAYTAlVTMRAwDgYD
+VQQIEwdBcml6b25hMRMwEQYDVQQHEwpTY290dHNkYWxlMSUwIwYDVQQKExxTdGFy
+ZmllbGQgVGVjaG5vbG9naWVzLCBJbmMuMTswOQYDVQQDEzJTdGFyZmllbGQgU2Vy
+dmljZXMgUm9vdCBDZXJ0aWZpY2F0ZSBBdXRob3JpdHkgLSBHMjCCASIwDQYJKoZI
+hvcNAQEBBQADggEPADCCAQoCggEBANUMOsQq+U7i9b4Zl1+OiFOxHz/Lz58gE20p
+OsgPfTz3a3Y4Y9k2YKibXlwAgLIvWX/2h/klQ4bnaRtSmpDhcePYLQ1Ob/bISdm2
+8xpWriu2dBTrz/sm4xq6HZYuajtYlIlHVv8loJNwU4PahHQUw2eeBGg6345AWh1K
+Ts9DkTvnVtYAcMtS7nt9rjrnvDH5RfbCYM8TWQIrgMw0R9+53pBlbQLPLJGmpufe
+hRhJfGZOozptqbXuNC66DQO4M99H67FrjSXZm86B0UVGMpZwh94CDklDhbZsc7tk
+6mFBrMnUVN+HL8cisibMn1lUaJ/8viovxFUcdUBgF4UCVTmLfwUCAwEAAaNCMEAw
+DwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAQYwHQYDVR0OBBYEFJxfAN+q
+AdcwKziIorhtSpzyEZGDMA0GCSqGSIb3DQEBCwUAA4IBAQBLNqaEd2ndOxmfZyMI
+bw5hyf2E3F/YNoHN2BtBLZ9g3ccaaNnRbobhiCPPE95Dz+I0swSdHynVv/heyNXB
+ve6SbzJ08pGCL72CQnqtKrcgfU28elUSwhXqvfdqlS5sdJ/PHLTyxQGjhdByPq1z
+qwubdQxtRbeOlKyWN7Wg0I8VRw7j6IPdj/3vQQF3zCepYoUz8jcI73HPdwbeyBkd
+iEDPfUYd/x7H4c7/I9vG+o1VTqkC50cRRj70/b17KSa7qWFiNyi2LSr2EIZkyXCn
+0q23KXB56jzaYyWf/Wi3MOxw+3WKt21gZ7IeyLnp2KhvAotnDU0mV3HaIPzBSlCN
+sSi6
+-----END CERTIFICATE-----
+-----BEGIN CERTIFICATE-----
+MIIEDzCCAvegAwIBAgIBADANBgkqhkiG9w0BAQUFADBoMQswCQYDVQQGEwJVUzEl
+MCMGA1UEChMcU3RhcmZpZWxkIFRlY2hub2xvZ2llcywgSW5jLjEyMDAGA1UECxMp
+U3RhcmZpZWxkIENsYXNzIDIgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkwHhcNMDQw
+NjI5MTczOTE2WhcNMzQwNjI5MTczOTE2WjBoMQswCQYDVQQGEwJVUzElMCMGA1UE
+ChMcU3RhcmZpZWxkIFRlY2hub2xvZ2llcywgSW5jLjEyMDAGA1UECxMpU3RhcmZp
+ZWxkIENsYXNzIDIgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkwggEgMA0GCSqGSIb3
+DQEBAQUAA4IBDQAwggEIAoIBAQC3Msj+6XGmBIWtDBFk385N78gDGIc/oav7PKaf
+8MOh2tTYbitTkPskpD6E8J7oX+zlJ0T1KKY/e97gKvDIr1MvnsoFAZMej2YcOadN
++lq2cwQlZut3f+dZxkqZJRRU6ybH838Z1TBwj6+wRir/resp7defqgSHo9T5iaU0
+X9tDkYI22WY8sbi5gv2cOj4QyDvvBmVmepsZGD3/cVE8MC5fvj13c7JdBmzDI1aa
+K4UmkhynArPkPw2vCHmCuDY96pzTNbO8acr1zJ3o/WSNF4Azbl5KXZnJHoe0nRrA
+1W4TNSNe35tfPe/W93bC6j67eA0cQmdrBNj41tpvi/JEoAGrAgEDo4HFMIHCMB0G
+A1UdDgQWBBS/X7fRzt0fhvRbVazc1xDCDqmI5zCBkgYDVR0jBIGKMIGHgBS/X7fR
+zt0fhvRbVazc1xDCDqmI56FspGowaDELMAkGA1UEBhMCVVMxJTAjBgNVBAoTHFN0
+YXJmaWVsZCBUZWNobm9sb2dpZXMsIEluYy4xMjAwBgNVBAsTKVN0YXJmaWVsZCBD
+bGFzcyAyIENlcnRpZmljYXRpb24gQXV0aG9yaXR5ggEAMAwGA1UdEwQFMAMBAf8w
+DQYJKoZIhvcNAQEFBQADggEBAAWdP4id0ckaVaGsafPzWdqbAYcaT1epoXkJKtv3
+L7IezMdeatiDh6GX70k1PncGQVhiv45YuApnP+yz3SFmH8lU+nLMPUxA2IGvd56D
+eruix/U0F47ZEUD0/CwqTRV/p2JdLiXTAAsgGh1o+Re49L2L7ShZ3U0WixeDyLJl
+xy16paq8U4Zt3VekyvggQQto8PT7dL5WXXp59fkdheMtlb71cZBDzI0fmgAKhynp
+VSJYACPq4xJDKVtHCN2MQWplBqjlIapBtJUhlbl90TSrE9atvNziPTnNvT51cKEY
+WQPJIrSPnNVeKtelttQKbfi3QBFGmh95DmK/D5fs4C8fF5Q=
+-----END CERTIFICATE-----
diff --git a/installers/ansible/roles/pgo-operator/files/pgo-backrest-repo/sshd_config b/installers/ansible/roles/pgo-operator/files/pgo-backrest-repo/sshd_config
index 3a96f209da..5a0f61e8f9 100644
--- a/installers/ansible/roles/pgo-operator/files/pgo-backrest-repo/sshd_config
+++ b/installers/ansible/roles/pgo-operator/files/pgo-backrest-repo/sshd_config
@@ -80,18 +80,9 @@ ChallengeResponseAuthentication yes
#GSSAPIKeyExchange no
#GSSAPIEnablek5users no
-# Set this to 'yes' to enable PAM authentication, account processing,
-# and session processing. If this is enabled, PAM authentication will
-# be allowed through the ChallengeResponseAuthentication and
-# PasswordAuthentication. Depending on your PAM configuration,
-# PAM authentication via ChallengeResponseAuthentication may bypass
-# the setting of "PermitRootLogin without-password".
-# If you just want the PAM account and session checks to run without
-# PAM authentication, then enable this but set PasswordAuthentication
-# and ChallengeResponseAuthentication to 'no'.
-# WARNING: 'UsePAM no' is not supported in Red Hat Enterprise Linux and may cause several
-# problems.
-UsePAM yes
+# This is set explicitly to *no* as we are only using pubkey authentication and
+# because each container is isolated to only an unprivileged user.
+UsePAM no
#AllowAgentForwarding yes
#AllowTcpForwarding yes
diff --git a/installers/ansible/roles/pgo-operator/files/pgo-configs/cluster-bootstrap-job.json b/installers/ansible/roles/pgo-operator/files/pgo-configs/cluster-bootstrap-job.json
index ecd2cf735a..9bd5a10f21 100644
--- a/installers/ansible/roles/pgo-operator/files/pgo-configs/cluster-bootstrap-job.json
+++ b/installers/ansible/roles/pgo-operator/files/pgo-configs/cluster-bootstrap-job.json
@@ -166,8 +166,7 @@
}, {
"name": "sshd",
"secret": {
- "secretName": "{{.RestoreFrom}}-backrest-repo-config",
- "defaultMode": 511
+ "secretName": "{{.RestoreFrom}}-backrest-repo-config"
}
},
{{if .TLSEnabled}}
diff --git a/installers/ansible/roles/pgo-operator/files/pgo-configs/cluster-deployment.json b/installers/ansible/roles/pgo-operator/files/pgo-configs/cluster-deployment.json
index 4a44785b27..b92f0e3b94 100644
--- a/installers/ansible/roles/pgo-operator/files/pgo-configs/cluster-deployment.json
+++ b/installers/ansible/roles/pgo-operator/files/pgo-configs/cluster-deployment.json
@@ -252,8 +252,7 @@
}, {
"name": "sshd",
"secret": {
- "secretName": "{{.ClusterName}}-backrest-repo-config",
- "defaultMode": 511
+ "secretName": "{{.ClusterName}}-backrest-repo-config"
}
}, {
"name": "root-volume",
diff --git a/installers/ansible/roles/pgo-operator/files/pgo-configs/pgbackrest-env-vars.json b/installers/ansible/roles/pgo-operator/files/pgo-configs/pgbackrest-env-vars.json
index fcf64b9679..8391309154 100644
--- a/installers/ansible/roles/pgo-operator/files/pgo-configs/pgbackrest-env-vars.json
+++ b/installers/ansible/roles/pgo-operator/files/pgo-configs/pgbackrest-env-vars.json
@@ -39,7 +39,7 @@
"value": "{{.PgbackrestPGPort}}"
},
{
- "name": "PGBACKREST_REPO_TYPE",
+ "name": "PGBACKREST_REPO1_TYPE",
"value": "{{.PgbackrestRepo1Type}}"
},
{
diff --git a/installers/ansible/roles/pgo-operator/files/pgo-configs/pgo-backrest-repo-template.json b/installers/ansible/roles/pgo-operator/files/pgo-configs/pgo-backrest-repo-template.json
index 5f9e5d5049..1c14cc08e4 100644
--- a/installers/ansible/roles/pgo-operator/files/pgo-configs/pgo-backrest-repo-template.json
+++ b/installers/ansible/roles/pgo-operator/files/pgo-configs/pgo-backrest-repo-template.json
@@ -102,8 +102,7 @@
"volumes": [{
"name": "sshd",
"secret": {
- "secretName": "{{.SshdSecretsName}}",
- "defaultMode": 511
+ "secretName": "{{.SshdSecretsName}}"
}
}, {
"name": "backrestrepo",
diff --git a/installers/ansible/roles/pgo-operator/files/pgo-configs/pgo-backrest-role-binding.json b/installers/ansible/roles/pgo-operator/files/pgo-configs/pgo-backrest-role-binding.json
index 84f1c031fc..5c4163b892 100644
--- a/installers/ansible/roles/pgo-operator/files/pgo-configs/pgo-backrest-role-binding.json
+++ b/installers/ansible/roles/pgo-operator/files/pgo-configs/pgo-backrest-role-binding.json
@@ -3,7 +3,10 @@
"kind": "RoleBinding",
"metadata": {
"name": "pgo-backrest-role-binding",
- "namespace": "{{.TargetNamespace}}"
+ "namespace": "{{.TargetNamespace}}",
+ "labels": {
+ "vendor": "crunchydata"
+ }
},
"roleRef": {
"apiGroup": "rbac.authorization.k8s.io",
diff --git a/installers/ansible/roles/pgo-operator/files/pgo-configs/pgo-backrest-role.json b/installers/ansible/roles/pgo-operator/files/pgo-configs/pgo-backrest-role.json
index ca1c5b4e0b..f14634c7c1 100644
--- a/installers/ansible/roles/pgo-operator/files/pgo-configs/pgo-backrest-role.json
+++ b/installers/ansible/roles/pgo-operator/files/pgo-configs/pgo-backrest-role.json
@@ -3,7 +3,10 @@
"kind": "Role",
"metadata": {
"name": "pgo-backrest-role",
- "namespace": "{{.TargetNamespace}}"
+ "namespace": "{{.TargetNamespace}}",
+ "labels": {
+ "vendor": "crunchydata"
+ }
},
"rules": [
{
diff --git a/installers/ansible/roles/pgo-operator/files/pgo-configs/pgo-backrest-sa.json b/installers/ansible/roles/pgo-operator/files/pgo-configs/pgo-backrest-sa.json
index d3d8d19c4b..cf5607a504 100644
--- a/installers/ansible/roles/pgo-operator/files/pgo-configs/pgo-backrest-sa.json
+++ b/installers/ansible/roles/pgo-operator/files/pgo-configs/pgo-backrest-sa.json
@@ -3,6 +3,9 @@
"kind": "ServiceAccount",
"metadata": {
"name": "pgo-backrest",
- "namespace": "{{.TargetNamespace}}"
+ "namespace": "{{.TargetNamespace}}",
+ "labels": {
+ "vendor": "crunchydata"
+ }
}
}
diff --git a/installers/ansible/roles/pgo-operator/files/pgo-configs/pgo-default-sa.json b/installers/ansible/roles/pgo-operator/files/pgo-configs/pgo-default-sa.json
index 5a8a52865c..f35dd542bd 100644
--- a/installers/ansible/roles/pgo-operator/files/pgo-configs/pgo-default-sa.json
+++ b/installers/ansible/roles/pgo-operator/files/pgo-configs/pgo-default-sa.json
@@ -3,7 +3,10 @@
"kind": "ServiceAccount",
"metadata": {
"name": "pgo-default",
- "namespace": "{{.TargetNamespace}}"
+ "namespace": "{{.TargetNamespace}}",
+ "labels": {
+ "vendor": "crunchydata"
+ }
},
"automountServiceAccountToken": false
}
diff --git a/installers/ansible/roles/pgo-operator/files/pgo-configs/pgo-target-role-binding.json b/installers/ansible/roles/pgo-operator/files/pgo-configs/pgo-target-role-binding.json
index df279ee347..5b23bcd927 100644
--- a/installers/ansible/roles/pgo-operator/files/pgo-configs/pgo-target-role-binding.json
+++ b/installers/ansible/roles/pgo-operator/files/pgo-configs/pgo-target-role-binding.json
@@ -3,7 +3,10 @@
"kind": "RoleBinding",
"metadata": {
"name": "pgo-target-role-binding",
- "namespace": "{{.TargetNamespace}}"
+ "namespace": "{{.TargetNamespace}}",
+ "labels": {
+ "vendor": "crunchydata"
+ }
},
"roleRef": {
"apiGroup": "rbac.authorization.k8s.io",
diff --git a/installers/ansible/roles/pgo-operator/files/pgo-configs/pgo-target-role.json b/installers/ansible/roles/pgo-operator/files/pgo-configs/pgo-target-role.json
index 1cb6a31cc5..612307356d 100644
--- a/installers/ansible/roles/pgo-operator/files/pgo-configs/pgo-target-role.json
+++ b/installers/ansible/roles/pgo-operator/files/pgo-configs/pgo-target-role.json
@@ -3,7 +3,10 @@
"kind": "Role",
"metadata": {
"name": "pgo-target-role",
- "namespace": "{{.TargetNamespace}}"
+ "namespace": "{{.TargetNamespace}}",
+ "labels": {
+ "vendor": "crunchydata"
+ }
},
"rules": [
{
@@ -15,8 +18,6 @@
"endpoints",
"pods",
"pods/exec",
- "pods/log",
- "replicasets",
"secrets",
"services",
"persistentvolumeclaims"
@@ -32,12 +33,26 @@
"deletecollection"
]
},
+ {
+ "apiGroups": [
+ ""
+ ],
+ "resources": [
+ "pods/log"
+ ],
+ "verbs":[
+ "get",
+ "list",
+ "watch"
+ ]
+ },
{
"apiGroups": [
"apps"
],
"resources": [
- "deployments"
+ "deployments",
+ "replicasets"
],
"verbs":[
"get",
diff --git a/installers/ansible/roles/pgo-operator/files/pgo-configs/pgo-target-sa.json b/installers/ansible/roles/pgo-operator/files/pgo-configs/pgo-target-sa.json
index 5d31bd4441..28cfb06565 100644
--- a/installers/ansible/roles/pgo-operator/files/pgo-configs/pgo-target-sa.json
+++ b/installers/ansible/roles/pgo-operator/files/pgo-configs/pgo-target-sa.json
@@ -3,6 +3,9 @@
"kind": "ServiceAccount",
"metadata": {
"name": "pgo-target",
- "namespace": "{{.TargetNamespace}}"
+ "namespace": "{{.TargetNamespace}}",
+ "labels": {
+ "vendor": "crunchydata"
+ }
}
}
diff --git a/installers/ansible/roles/pgo-operator/tasks/certs.yml b/installers/ansible/roles/pgo-operator/tasks/certs.yml
deleted file mode 100644
index 4c66e89892..0000000000
--- a/installers/ansible/roles/pgo-operator/tasks/certs.yml
+++ /dev/null
@@ -1,54 +0,0 @@
----
-- name: Ensure directory exists for local self-signed TLS certs.
- file:
- path: '{{ output_dir }}'
- state: directory
- tags:
- - install
-
-- name: Generate RSA Key
- command: openssl genrsa -out "{{ output_dir }}/server.key" 2048
- args:
- creates: "{{ output_dir }}/server.key"
- tags:
- - install
-
-- name: Generate CSR
- command: openssl req \
- -new \
- -subj '/C=US/ST=SC/L=Charleston/O=CrunchyData/CN=pg-operator' \
- -key "{{ output_dir }}/server.key" \
- -out "{{ output_dir }}/server.csr"
- args:
- creates: "{{ output_dir }}/server.csr"
- tags:
- - install
-
-- name: Generate Self-signed Certificate
- command: openssl req \
- -x509 \
- -days 1825 \
- -key "{{ output_dir }}/server.key" \
- -in "{{ output_dir }}/server.csr" \
- -out "{{ output_dir }}/server.crt"
- args:
- creates: "{{ output_dir }}/server.crt"
- tags:
- - install
-
-- name: Ensure {{ pgo_keys_dir }} Directory Exists
- file:
- path: '{{ pgo_keys_dir }}'
- state: directory
- tags:
- - install
-
-- name: Copy certificates to {{ pgo_keys_dir }}
- command: "cp {{ output_dir }}/server.crt {{ pgo_keys_dir }}/client.crt"
- tags:
- - install
-
-- name: Copy keys to {{ pgo_keys_dir }}
- command: "cp {{ output_dir }}/server.key {{ pgo_keys_dir }}/client.key"
- tags:
- - install
diff --git a/installers/ansible/roles/pgo-operator/tasks/cleanup.yml b/installers/ansible/roles/pgo-operator/tasks/cleanup.yml
index ffe9626c56..2f7925afd2 100644
--- a/installers/ansible/roles/pgo-operator/tasks/cleanup.yml
+++ b/installers/ansible/roles/pgo-operator/tasks/cleanup.yml
@@ -6,6 +6,20 @@
- uninstall
- update
+- name: Get number of Operator instances in this cluster
+ shell: |
+ {{ kubectl_or_oc }} get deployment --field-selector=metadata.name=postgres-operator --selector=vendor=crunchydata --all-namespaces -o name | wc -l
+ register: num_operators
+ tags:
+ - uninstall
+ - update
+
+- name: Set boolean for multi-operator environment
+ set_fact: multi_operator_env="{{ 'true' if num_operators.stdout | int > 1 else 'false' }}"
+ tags:
+ - uninstall
+ - update
+
- name: Find watched namespaces
shell: |
{{ kubectl_or_oc }} get namespaces -o json --selector=vendor=crunchydata,pgo-installation-name={{ pgo_installation_name }}
@@ -152,7 +166,8 @@
tags:
- uninstall
- update
- when: create_rbac|bool
+ when: not multi_operator_env|bool and
+ create_rbac|bool
- name: Delete cluster-admin Cluster Role Binding for PGO Service Account
command: "{{ kubectl_or_oc }} delete clusterrolebinding pgo-cluster-admin"
@@ -161,7 +176,8 @@
tags:
- uninstall
- update
- when: create_rbac|bool
+ when: not multi_operator_env|bool and
+ create_rbac|bool
- name: Delete existing Cluster Roles
shell: |
@@ -173,7 +189,8 @@
tags:
- uninstall
- update
- when: create_rbac|bool
+ when: not multi_operator_env|bool and
+ create_rbac|bool
- name: Delete existing PGO Role Bindings (Watched Namespaces)
shell: |
@@ -233,6 +250,7 @@
pgpolicies.crunchydata.com pgreplicas.crunchydata.com pgtasks.crunchydata.com
ignore_errors: yes
no_log: false
+ when: not multi_operator_env|bool
tags: uninstall
- name: Remove Labels from Watched Namespaces
@@ -276,7 +294,8 @@
file:
state: absent
path: "/usr/local/bin/pgo"
- when: pgo_client_install == "true"
+ when: pgo_client_install == "true" and
+ not multi_operator_env|bool
ignore_errors: yes
no_log: false
tags: uninstall
diff --git a/installers/ansible/roles/pgo-operator/tasks/main.yml b/installers/ansible/roles/pgo-operator/tasks/main.yml
index c9fc36e6a0..aafe7b6679 100644
--- a/installers/ansible/roles/pgo-operator/tasks/main.yml
+++ b/installers/ansible/roles/pgo-operator/tasks/main.yml
@@ -44,10 +44,6 @@
tags:
- uninstall
-- include_tasks: certs.yml
- tags:
- - install
-
- name: Use kubectl or oc
set_fact:
kubectl_or_oc: "{{ openshift_oc_bin if openshift_oc_bin is defined else 'kubectl' }}"
@@ -106,7 +102,7 @@
when: pgorole_pgoadmin_result.rc == 1
- name: PGO Service Account
- when:
+ when:
- create_rbac|bool
tags:
- install
@@ -128,7 +124,7 @@
when: pgo_service_account_result.rc == 1
- name: Cluster RBAC (namespace_mode 'dynamic')
- when:
+ when:
- create_rbac|bool
- namespace_mode == "dynamic"
tags:
@@ -151,7 +147,7 @@
when: cluster_rbac_result.rc == 1
- name: Cluster RBAC (namespace_mode 'readonly')
- when:
+ when:
- create_rbac|bool
- namespace_mode == "readonly"
tags:
@@ -179,7 +175,7 @@
tags:
- install
- update
- when:
+ when:
- create_rbac|bool
- namespace_mode == "disabled"
@@ -219,7 +215,8 @@
command: |
{{ kubectl_or_oc }} create clusterrolebinding pgo-cluster-admin \
--clusterrole cluster-admin \
- --serviceaccount "{{ pgo_operator_namespace }}:postgres-operator"
+ --serviceaccount "{{ pgo_operator_namespace }}:postgres-operator" && \
+ {{ kubectl_or_oc }} label clusterrolebinding pgo-cluster-admin vendor=crunchydata
when: pgo_cluster_admin_result.rc == 1
@@ -266,31 +263,13 @@
- name: Create PGO BackRest Repo Secret
command: |
{{ kubectl_or_oc }} create secret generic pgo-backrest-repo-config \
- --from-file=config='{{ role_path }}/files/pgo-backrest-repo/config' \
- --from-file=sshd_config='{{ role_path }}/files/pgo-backrest-repo/sshd_config' \
- --from-file=aws-s3-ca.crt='{{ role_path }}/files/pgo-backrest-repo/aws-s3-ca.crt' \
--from-literal=aws-s3-key='{{ backrest_aws_s3_key }}' \
--from-literal=aws-s3-key-secret='{{ backrest_aws_s3_secret }}' \
-n {{ pgo_operator_namespace }}
- when: pgo_backrest_repo_config_result.rc == 1
-
- - name: PGO API Secret
- tags:
- - install
- - update
- block:
- - name: Check PGO API Secret
- shell: "{{ kubectl_or_oc }} get secret pgo.tls -n {{ pgo_operator_namespace }}"
- register: pgo_tls_result
- failed_when: false
-
- - name: Create PGO API Secret
- command: |
- {{ kubectl_or_oc }} create secret tls pgo.tls \
- --cert='{{ output_dir }}/server.crt' \
- --key='{{ output_dir }}/server.key' \
- -n {{ pgo_operator_namespace }}
- when: pgo_tls_result.rc == 1
+ when:
+ - pgo_backrest_repo_config_result.rc == 1
+ - (backrest_aws_s3_key | default('') != '') or
+ (backrest_aws_s3_secret | default('') != '')
- name: PGO ConfigMap
tags:
@@ -307,7 +286,7 @@
shell: "{{ kubectl_or_oc }} get configmap pgo-config -n {{ pgo_operator_namespace }}"
register: pgo_config_result
failed_when: false
-
+
- name: Create PGO ConfigMap
command: |
{{ kubectl_or_oc }} create configmap pgo-config \
@@ -361,6 +340,8 @@
- name: Wait for PGO to finish deploying
command: "{{ kubectl_or_oc }} rollout status deployment/postgres-operator -n {{ pgo_operator_namespace }}"
async: 600
+ vars:
+ ansible_async_dir: /tmp/.ansible_async
- name: PGO Client
tags:
@@ -403,8 +384,8 @@
shell: "{{ kubectl_or_oc }} get -f {{ output_dir }}/pgo-client.json"
register: pgo_client_json_result
failed_when: false
-
+
- name: Create PGO-Client deployment
command: |
{{ kubectl_or_oc }} create --filename='{{ output_dir }}/pgo-client.json'
- when: pgo_client_json_result.rc == 1
\ No newline at end of file
+ when: pgo_client_json_result.rc == 1
diff --git a/installers/ansible/roles/pgo-operator/templates/add-targeted-namespace.sh.j2 b/installers/ansible/roles/pgo-operator/templates/add-targeted-namespace.sh.j2
index 380a8a80b7..b8f2ab2e9f 100644
--- a/installers/ansible/roles/pgo-operator/templates/add-targeted-namespace.sh.j2
+++ b/installers/ansible/roles/pgo-operator/templates/add-targeted-namespace.sh.j2
@@ -1,5 +1,5 @@
#!/bin/bash
-# Copyright 2017 - 2020 Crunchy Data Solutions, Inc.
+# Copyright 2017 - 2022 Crunchy Data Solutions, Inc.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
diff --git a/installers/ansible/roles/pgo-operator/templates/cluster-rbac-readonly.yaml.j2 b/installers/ansible/roles/pgo-operator/templates/cluster-rbac-readonly.yaml.j2
index 3021d4a058..f34e1b9579 100644
--- a/installers/ansible/roles/pgo-operator/templates/cluster-rbac-readonly.yaml.j2
+++ b/installers/ansible/roles/pgo-operator/templates/cluster-rbac-readonly.yaml.j2
@@ -3,6 +3,8 @@ kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: pgo-cluster-role
+ labels:
+ vendor: crunchydata
rules:
- apiGroups:
- ''
@@ -17,6 +19,8 @@ apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: pgo-cluster-role
+ labels:
+ vendor: crunchydata
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
diff --git a/installers/ansible/roles/pgo-operator/templates/cluster-rbac.yaml.j2 b/installers/ansible/roles/pgo-operator/templates/cluster-rbac.yaml.j2
index 771080042e..03783810da 100644
--- a/installers/ansible/roles/pgo-operator/templates/cluster-rbac.yaml.j2
+++ b/installers/ansible/roles/pgo-operator/templates/cluster-rbac.yaml.j2
@@ -3,6 +3,8 @@ kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: pgo-cluster-role
+ labels:
+ vendor: crunchydata
rules:
- apiGroups:
- ''
@@ -42,8 +44,6 @@ rules:
- endpoints
- pods
- pods/exec
- - pods/log
- - replicasets
- secrets
- services
- persistentvolumeclaims
@@ -56,10 +56,19 @@ rules:
- update
- delete
- deletecollection
+ - apiGroups:
+ - ''
+ resources:
+ - pods/log
+ verbs:
+ - get
+ - list
+ - watch
- apiGroups:
- apps
resources:
- deployments
+ - replicasets
verbs:
- get
- list
@@ -104,6 +113,8 @@ apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: pgo-cluster-role
+ labels:
+ vendor: crunchydata
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
diff --git a/installers/ansible/roles/pgo-operator/templates/local-namespace-rbac.yaml.j2 b/installers/ansible/roles/pgo-operator/templates/local-namespace-rbac.yaml.j2
index 4a878395ae..6eb3fe6144 100644
--- a/installers/ansible/roles/pgo-operator/templates/local-namespace-rbac.yaml.j2
+++ b/installers/ansible/roles/pgo-operator/templates/local-namespace-rbac.yaml.j2
@@ -3,6 +3,8 @@ kind: Role
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: pgo-local-ns
+ labels:
+ vendor: crunchydata
rules:
- apiGroups:
- ''
@@ -28,6 +30,8 @@ apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: pgo-local-ns
+ labels:
+ vendor: crunchydata
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
@@ -41,6 +45,8 @@ apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: pgo-target-role-binding
+ labels:
+ vendor: crunchydata
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
diff --git a/installers/ansible/roles/pgo-operator/templates/pgo-role-rbac.yaml.j2 b/installers/ansible/roles/pgo-operator/templates/pgo-role-rbac.yaml.j2
index 76af49dbcd..62ecb0a1b3 100644
--- a/installers/ansible/roles/pgo-operator/templates/pgo-role-rbac.yaml.j2
+++ b/installers/ansible/roles/pgo-operator/templates/pgo-role-rbac.yaml.j2
@@ -4,6 +4,8 @@ apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: pgo-role
namespace: {{ pgo_operator_namespace }}
+ labels:
+ vendor: crunchydata
rules:
- apiGroups:
- ''
@@ -28,6 +30,8 @@ kind: RoleBinding
metadata:
name: pgo-role
namespace: {{ pgo_operator_namespace }}
+ labels:
+ vendor: crunchydata
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
diff --git a/installers/ansible/roles/pgo-operator/templates/pgo-service-account.yaml.j2 b/installers/ansible/roles/pgo-operator/templates/pgo-service-account.yaml.j2
index b8a8de6a95..3baaa4a9f8 100644
--- a/installers/ansible/roles/pgo-operator/templates/pgo-service-account.yaml.j2
+++ b/installers/ansible/roles/pgo-operator/templates/pgo-service-account.yaml.j2
@@ -4,6 +4,8 @@ kind: ServiceAccount
metadata:
name: postgres-operator
namespace: {{ pgo_operator_namespace }}
+ labels:
+ vendor: crunchydata
imagePullSecrets:
{% if ccp_image_pull_secret %}
- name: {{ ccp_image_pull_secret }}
diff --git a/installers/ansible/roles/pgo-operator/templates/pgouser-admin.yaml.j2 b/installers/ansible/roles/pgo-operator/templates/pgouser-admin.yaml.j2
index ca6d6eb4ed..c861fdc220 100644
--- a/installers/ansible/roles/pgo-operator/templates/pgouser-admin.yaml.j2
+++ b/installers/ansible/roles/pgo-operator/templates/pgouser-admin.yaml.j2
@@ -10,6 +10,6 @@ metadata:
namespace: {{ pgo_operator_namespace }}
type: Opaque
data:
- password: {{ pgo_admin_password | b64encode }}
- username: {{ pgo_admin_username | b64encode }}
- roles: {{ pgo_admin_role_name | b64encode }}
+ password: '{{ pgo_admin_password | b64encode }}'
+ username: '{{ pgo_admin_username | b64encode }}'
+ roles: '{{ pgo_admin_role_name | b64encode }}'
diff --git a/installers/ansible/roles/pgo-operator/templates/service.json.j2 b/installers/ansible/roles/pgo-operator/templates/service.json.j2
index 766a060a72..b50985fa92 100644
--- a/installers/ansible/roles/pgo-operator/templates/service.json.j2
+++ b/installers/ansible/roles/pgo-operator/templates/service.json.j2
@@ -4,7 +4,8 @@
"metadata": {
"name": "postgres-operator",
"labels": {
- "name": "postgres-operator"
+ "name": "postgres-operator",
+ "vendor": "crunchydata"
}
},
"spec": {
diff --git a/installers/ansible/roles/pgo-preflight/tasks/check_vars.yml b/installers/ansible/roles/pgo-preflight/tasks/check_vars.yml
index 3424c43151..e6d375affe 100644
--- a/installers/ansible/roles/pgo-preflight/tasks/check_vars.yml
+++ b/installers/ansible/roles/pgo-preflight/tasks/check_vars.yml
@@ -8,7 +8,6 @@
- pgo_operator_namespace
- pgo_installation_name
- pgo_admin_username
- - pgo_admin_password
- pgo_admin_role_name
- pgo_admin_perms
- ccp_image_prefix
diff --git a/installers/ansible/values.yaml b/installers/ansible/values.yaml
index 4eb672bcec..c76c35c783 100644
--- a/installers/ansible/values.yaml
+++ b/installers/ansible/values.yaml
@@ -17,7 +17,7 @@ badger: "false"
ccp_image_prefix: "registry.developers.crunchydata.com/crunchydata"
ccp_image_pull_secret: ""
ccp_image_pull_secret_manifest: ""
-ccp_image_tag: "centos7-12.4-4.5.0"
+ccp_image_tag: "ubi8-12.13-4.5.9"
create_rbac: "true"
crunchy_debug: "false"
db_name: ""
@@ -50,14 +50,14 @@ pgo_apiserver_url: "https://postgres-operator"
pgo_client_cert_secret: "pgo.tls"
pgo_client_container_install: "false"
pgo_client_install: "true"
-pgo_client_version: "4.5.0"
+pgo_client_version: "4.5.9"
pgo_cluster_admin: "false"
pgo_disable_eventing: "false"
pgo_disable_tls: "false"
pgo_image_prefix: "registry.developers.crunchydata.com/crunchydata"
pgo_image_pull_secret: ""
pgo_image_pull_secret_manifest: ""
-pgo_image_tag: "centos7-4.5.0"
+pgo_image_tag: "ubi8-4.5.9"
pgo_installation_name: "devtest"
pgo_noauth_routes: ""
pgo_operator_namespace: "pgo"
diff --git a/installers/gcp-marketplace/Dockerfile b/installers/gcp-marketplace/Dockerfile
index adf85a355a..464e7d74fd 100644
--- a/installers/gcp-marketplace/Dockerfile
+++ b/installers/gcp-marketplace/Dockerfile
@@ -20,22 +20,24 @@ RUN apt-get update \
&& apt-get install -y --no-install-recommends ansible=2.9.* openssh-client \
&& rm -rf /var/lib/apt/lists/*
-COPY installers/ansible/* \
+COPY ansible/* \
/opt/postgres-operator/ansible/
-COPY installers/favicon.png \
- installers/gcp-marketplace/install-job.yaml \
- installers/gcp-marketplace/install.sh \
- installers/gcp-marketplace/values.yaml \
+COPY favicon.png \
+ gcp-marketplace/install-job.yaml \
+ gcp-marketplace/install.sh \
+ gcp-marketplace/values.yaml \
/opt/postgres-operator/
-COPY installers/gcp-marketplace/install-hook.sh \
+COPY gcp-marketplace/install-hook.sh \
/bin/create_manifests.sh
-COPY installers/gcp-marketplace/schema.yaml \
+COPY gcp-marketplace/schema.yaml \
/data/
-COPY installers/gcp-marketplace/application.yaml \
+COPY gcp-marketplace/application.yaml \
/data/manifest/
-COPY installers/gcp-marketplace/test-pod.yaml \
+COPY gcp-marketplace/test-pod.yaml \
/data-test/manifest/
+COPY gcp-marketplace/test-schema.yaml \
+ /data-test/schema.yaml
ARG PGO_VERSION
RUN for file in \
diff --git a/installers/gcp-marketplace/Makefile b/installers/gcp-marketplace/Makefile
index 5f4f0c6eb1..8329eed52b 100644
--- a/installers/gcp-marketplace/Makefile
+++ b/installers/gcp-marketplace/Makefile
@@ -6,7 +6,7 @@ MARKETPLACE_TOOLS ?= gcr.io/cloud-marketplace-tools/k8s/dev:$(MARKETPLACE_VERSIO
MARKETPLACE_VERSION ?= 0.9.4
KUBECONFIG ?= $(HOME)/.kube/config
PARAMETERS ?= {}
-PGO_VERSION ?= 4.5.0
+PGO_VERSION ?= 4.5.9
IMAGE_BUILD_ARGS = --build-arg MARKETPLACE_VERSION='$(MARKETPLACE_VERSION)' \
--build-arg PGO_VERSION='$(PGO_VERSION)'
@@ -37,12 +37,12 @@ image: image-$(IMAGE_BUILDER)
.PHONY: image-buildah
image-buildah: ## Build the deployer image with Buildah
- sudo buildah bud --file Dockerfile --tag '$(DEPLOYER_IMAGE)' $(IMAGE_BUILD_ARGS) --layers ../..
+ sudo buildah bud --file Dockerfile --tag '$(DEPLOYER_IMAGE)' $(IMAGE_BUILD_ARGS) --layers ..
sudo buildah push '$(DEPLOYER_IMAGE)' docker-daemon:'$(DEPLOYER_IMAGE)'
.PHONY: image-docker
image-docker: ## Build the deployer image with Docker
- docker build --file Dockerfile --tag '$(DEPLOYER_IMAGE)' $(IMAGE_BUILD_ARGS) ../..
+ docker build --file Dockerfile --tag '$(DEPLOYER_IMAGE)' $(IMAGE_BUILD_ARGS) ..
# PARAMETERS='{"OPERATOR_NAMESPACE": "", "OPERATOR_NAME": "", "OPERATOR_ADMIN_PASSWORD": ""}'
.PHONY: install
diff --git a/installers/gcp-marketplace/README.md b/installers/gcp-marketplace/README.md
index fd686764ad..31534e3eb4 100644
--- a/installers/gcp-marketplace/README.md
+++ b/installers/gcp-marketplace/README.md
@@ -1,11 +1,11 @@
-
This directory contains the files that are used to install [Crunchy PostgreSQL for GKE][gcp-details],
-which uses the PostgreSQL Operator, from the Google Cloud Marketplace.
+which uses PGO: the PostgreSQL Operator from [Crunchy Data][crunchy-data], from the Google Cloud Marketplace.
The integration centers around a container [image](./Dockerfile) that contains an installation
[schema](./schema.yaml) and an [Application][k8s-app] [manifest](./application.yaml).
Consult the [technical requirements][gcp-k8s-requirements] when making changes.
+[crunchy-data]: https://www.crunchydata.com
[k8s-app]: https://github.com/kubernetes-sigs/application/
[gcp-k8s]: https://cloud.google.com/marketplace/docs/kubernetes-apps/
[gcp-k8s-requirements]: https://cloud.google.com/marketplace/docs/partners/kubernetes-solutions/create-app-package
@@ -59,7 +59,7 @@ Google Cloud Marketplace.
```shell
IMAGE_REPOSITORY=gcr.io/crunchydata-public/postgres-operator
- export PGO_VERSION=4.5.0
+ export PGO_VERSION=4.5.9
export INSTALLER_IMAGE=${IMAGE_REPOSITORY}/deployer:${PGO_VERSION}
export OPERATOR_IMAGE=${IMAGE_REPOSITORY}:${PGO_VERSION}
export OPERATOR_IMAGE_API=${IMAGE_REPOSITORY}/pgo-apiserver:${PGO_VERSION}
diff --git a/installers/gcp-marketplace/install.sh b/installers/gcp-marketplace/install.sh
index 6dc770b993..3b65f8976d 100755
--- a/installers/gcp-marketplace/install.sh
+++ b/installers/gcp-marketplace/install.sh
@@ -37,16 +37,36 @@ resources=(
clusterrolebinding/pgo-cluster-role
configmap/pgo-config
deployment/postgres-operator
+ role/pgo-backrest-role
+ role/pgo-pg-role
role/pgo-role
+ role/pgo-target-role
+ rolebinding/pgo-backrest-role-binding
+ rolebinding/pgo-pg-role-binding
rolebinding/pgo-role
+ rolebinding/pgo-target-role-binding
secret/pgo.tls
secret/pgo-backrest-repo-config
secret/pgorole-pgoadmin
secret/pgouser-admin
service/postgres-operator
+ serviceaccount/pgo-backrest
+ serviceaccount/pgo-default
+ serviceaccount/pgo-pg
+ serviceaccount/pgo-target
serviceaccount/postgres-operator
)
for resource in "${resources[@]}"; do
+ kind="${resource%/*}"
+ name="${resource#*/}"
+
+ for _ in $(seq 5); do
+ if [ "$( kc get "$kind" --field-selector="metadata.name=$name" --output=name )" ]
+ then break
+ else sleep 1s
+ fi
+ done
+
kc patch "$resource" --type=strategic --patch="$application_ownership"
done
diff --git a/installers/gcp-marketplace/schema.yaml b/installers/gcp-marketplace/schema.yaml
index 6f0ec5320f..6b7e3df965 100644
--- a/installers/gcp-marketplace/schema.yaml
+++ b/installers/gcp-marketplace/schema.yaml
@@ -11,13 +11,13 @@ properties:
INSTALLER_SERVICE_ACCOUNT: # This key appears in the ClusterRoleBinding name.
title: Cluster Admin Service Account
- description: >-
- Name of a service account in the target namespace that has cluster-admin permissions.
- This is used by the operator installer to create Custom Resource Definitions.
type: string
x-google-marketplace:
type: SERVICE_ACCOUNT
serviceAccount:
+ description: >-
+ Name of a service account in the target namespace that has cluster-admin permissions.
+ This is used by the operator installer to create Custom Resource Definitions.
roles:
- type: ClusterRole
rulesType: PREDEFINED
diff --git a/installers/gcp-marketplace/test-schema.yaml b/installers/gcp-marketplace/test-schema.yaml
new file mode 100644
index 0000000000..5dae182d7e
--- /dev/null
+++ b/installers/gcp-marketplace/test-schema.yaml
@@ -0,0 +1,6 @@
+properties:
+ OPERATOR_ADMIN_PASSWORD:
+ type: string
+ default: insecure
+ x-google-marketplace:
+ type: MASKED_FIELD
diff --git a/installers/gcp-marketplace/values.yaml b/installers/gcp-marketplace/values.yaml
index cb0840b35b..45ff49f7ec 100644
--- a/installers/gcp-marketplace/values.yaml
+++ b/installers/gcp-marketplace/values.yaml
@@ -10,7 +10,7 @@ badger: "false"
ccp_image_prefix: "registry.developers.crunchydata.com/crunchydata"
ccp_image_pull_secret: ""
ccp_image_pull_secret_manifest: ""
-ccp_image_tag: "centos7-12.4-4.5.0"
+ccp_image_tag: "ubi8-12.13-4.5.9"
create_rbac: "true"
db_name: ""
db_password_age_days: "0"
@@ -32,9 +32,9 @@ pgo_admin_role_name: "pgoadmin"
pgo_admin_username: "admin"
pgo_client_container_install: "false"
pgo_client_install: 'false'
-pgo_client_version: "4.5.0"
+pgo_client_version: "4.5.9"
pgo_image_prefix: "registry.developers.crunchydata.com/crunchydata"
-pgo_image_tag: "centos7-4.5.0"
+pgo_image_tag: "ubi8-4.5.9"
pgo_installation_name: '${OPERATOR_NAME}'
pgo_operator_namespace: '${OPERATOR_NAMESPACE}'
scheduler_timeout: "3600"
diff --git a/installers/helm/Chart.yaml b/installers/helm/Chart.yaml
index 6d7ffeaa30..58c24902d0 100644
--- a/installers/helm/Chart.yaml
+++ b/installers/helm/Chart.yaml
@@ -1,11 +1,11 @@
apiVersion: v2
name: postgres-operator
-description: Crunchy PostgreSQL Operator Helm chart for Kubernetes
+description: 'PGO: The Postgres Operator from Crunchy Data Helm Chart for Kubernetes'
type: application
version: 0.1.0
-appVersion: 4.5.0
+appVersion: 4.5.9
home: https://github.com/CrunchyData/postgres-operator
-icon: https://github.com/CrunchyData/postgres-operator/raw/master/crunchy_logo.png
+icon: https://github.com/CrunchyData/postgres-operator/raw/master/docs/static/logos/pgo.svg
keywords:
- PostgreSQL
- Operator
diff --git a/installers/helm/README.md b/installers/helm/README.md
index bde966f9f9..0dbe9ac5a3 100644
--- a/installers/helm/README.md
+++ b/installers/helm/README.md
@@ -1,10 +1,10 @@
-# Crunchy PostgreSQL Operator
+# PGO: The Postgres Operator from Crunchy Data
-This Helm chart installs the Crunchy PostgreSQL Operator by using its “pgo-deployer”
-container. Helm will setup the ServiceAccount, RBAC, and ConfigMap needed to run
-the container as a Kubernetes Job. Then a job will be created based on `helm`
-`install`, `upgrade`, or `uninstall`. After the job has completed the RBAC will
-be cleaned up.
+This Helm chart installs PGO: the Postgres Operator from Crunchy Data by using
+its “pgo-deployer” container. Helm will setup the ServiceAccount, RBAC, and
+ConfigMap needed to run the container as a Kubernetes Job. Then a job will
+be created based on `helm` `install`, `upgrade`, or `uninstall`. After the
+job has completed the RBAC will be cleaned up.
## Prerequisites
@@ -39,10 +39,10 @@ cd postgres-operator/installers/helm
helm uninstall postgres-operator -n pgo
```
-## Configuraiton
+## Configuration
The following shows the configurable parameters that are relevant to the Helm
-Chart. A full list of all Crunchy PostgreSQL Operator configuration options can
+Chart. A full list of all PGO configuration options can
be found in the [documentation](https://access.crunchydata.com/documentation/postgres-operator/latest/installation/configuration/).
| Name | Default | Description |
diff --git a/installers/helm/templates/postgres-operator-install.yaml b/installers/helm/templates/postgres-operator-install.yaml
index 43b0604c3b..8196dfb2a9 100644
--- a/installers/helm/templates/postgres-operator-install.yaml
+++ b/installers/helm/templates/postgres-operator-install.yaml
@@ -3,7 +3,7 @@
apiVersion: batch/v1
kind: Job
metadata:
- name: pgo-deploy
+ name: pgo-deploy-install
namespace: {{ .Release.Namespace }}
labels:
{{ include "postgres-operator.labels" . | indent 4 }}
diff --git a/installers/helm/templates/postgres-operator-uninstall.yaml b/installers/helm/templates/postgres-operator-uninstall.yaml
index 0b7553b0e7..945295836b 100644
--- a/installers/helm/templates/postgres-operator-uninstall.yaml
+++ b/installers/helm/templates/postgres-operator-uninstall.yaml
@@ -3,7 +3,7 @@
apiVersion: batch/v1
kind: Job
metadata:
- name: pgo-deploy
+ name: pgo-deploy-uninstall
namespace: {{ .Release.Namespace }}
labels:
{{ include "postgres-operator.labels" . | indent 4 }}
diff --git a/installers/helm/templates/postgres-operator-upgrade.yaml b/installers/helm/templates/postgres-operator-upgrade.yaml
index 4ba8954b14..30a450c8d4 100644
--- a/installers/helm/templates/postgres-operator-upgrade.yaml
+++ b/installers/helm/templates/postgres-operator-upgrade.yaml
@@ -3,7 +3,7 @@
apiVersion: batch/v1
kind: Job
metadata:
- name: pgo-deploy
+ name: pgo-deploy-upgrade
namespace: {{ .Release.Namespace }}
labels:
{{ include "postgres-operator.labels" . | indent 4 }}
diff --git a/installers/helm/templates/rbac.yaml b/installers/helm/templates/rbac.yaml
index dbef140471..19d6fc06e4 100644
--- a/installers/helm/templates/rbac.yaml
+++ b/installers/helm/templates/rbac.yaml
@@ -73,6 +73,7 @@ rules:
- extensions
resources:
- deployments
+ - replicasets
verbs:
- get
- list
@@ -145,4 +146,4 @@ subjects:
- kind: ServiceAccount
name: {{ include "postgres-operator.serviceAccountName" . }}
namespace: {{ .Release.Namespace }}
-{{ end }}
\ No newline at end of file
+{{ end }}
diff --git a/installers/helm/values.yaml b/installers/helm/values.yaml
index 649436e0af..c01b2822c3 100644
--- a/installers/helm/values.yaml
+++ b/installers/helm/values.yaml
@@ -37,7 +37,7 @@ badger: "false"
ccp_image_prefix: "registry.developers.crunchydata.com/crunchydata"
ccp_image_pull_secret: ""
ccp_image_pull_secret_manifest: ""
-ccp_image_tag: "centos7-12.4-4.5.0"
+ccp_image_tag: "ubi8-12.13-4.5.9"
create_rbac: "true"
crunchy_debug: "false"
db_name: ""
@@ -70,14 +70,14 @@ pgo_apiserver_url: "https://postgres-operator"
pgo_client_cert_secret: "pgo.tls"
pgo_client_container_install: "false"
pgo_client_install: "true"
-pgo_client_version: "4.5.0"
+pgo_client_version: "4.5.9"
pgo_cluster_admin: "false"
pgo_disable_eventing: "false"
pgo_disable_tls: "false"
pgo_image_prefix: "registry.developers.crunchydata.com/crunchydata"
pgo_image_pull_secret: ""
pgo_image_pull_secret_manifest: ""
-pgo_image_tag: "centos7-4.5.0"
+pgo_image_tag: "ubi8-4.5.9"
pgo_installation_name: "devtest"
pgo_noauth_routes: ""
pgo_operator_namespace: "pgo"
diff --git a/installers/image/bin/pgo-deploy.sh b/installers/image/bin/pgo-deploy.sh
index 9a965d58be..088d37c5de 100755
--- a/installers/image/bin/pgo-deploy.sh
+++ b/installers/image/bin/pgo-deploy.sh
@@ -1,6 +1,6 @@
#!/bin/bash
-# Copyright 2020 Crunchy Data Solutions, Inc.
+# Copyright 2020 - 2022 Crunchy Data Solutions, Inc.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
diff --git a/installers/image/conf/kubernetes.repo b/installers/image/conf/kubernetes.repo
index 0a8b4cf2bf..8830e53746 100644
--- a/installers/image/conf/kubernetes.repo
+++ b/installers/image/conf/kubernetes.repo
@@ -3,5 +3,5 @@ name=Kubernetes
baseurl=https://packages.cloud.google.com/yum/repos/kubernetes-el7-x86_64
enabled=1
gpgcheck=1
-repo_gpgcheck=1
+repo_gpgcheck=0
gpgkey=https://packages.cloud.google.com/yum/doc/yum-key.gpg https://packages.cloud.google.com/yum/doc/rpm-package-key.gpg
\ No newline at end of file
diff --git a/installers/kubectl/client-setup.sh b/installers/kubectl/client-setup.sh
index 6956d63f6b..4d32c82270 100755
--- a/installers/kubectl/client-setup.sh
+++ b/installers/kubectl/client-setup.sh
@@ -1,6 +1,6 @@
#!/bin/bash
-# Copyright 2020 Crunchy Data Solutions, Inc.
+# Copyright 2020 - 2022 Crunchy Data Solutions, Inc.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
@@ -14,7 +14,7 @@
# This script should be run after the operator has been deployed
PGO_OPERATOR_NAMESPACE="${PGO_OPERATOR_NAMESPACE:-pgo}"
PGO_USER_ADMIN="${PGO_USER_ADMIN:-pgouser-admin}"
-PGO_CLIENT_VERSION="${PGO_CLIENT_VERSION:-v4.5.0}"
+PGO_CLIENT_VERSION="${PGO_CLIENT_VERSION:-v4.5.9}"
PGO_CLIENT_URL="https://github.com/CrunchyData/postgres-operator/releases/download/${PGO_CLIENT_VERSION}"
PGO_CMD="${PGO_CMD-kubectl}"
diff --git a/installers/kubectl/postgres-operator-ocp311.yml b/installers/kubectl/postgres-operator-ocp311.yml
index 9978d052d3..c993ec3981 100644
--- a/installers/kubectl/postgres-operator-ocp311.yml
+++ b/installers/kubectl/postgres-operator-ocp311.yml
@@ -3,12 +3,16 @@ kind: ServiceAccount
metadata:
name: pgo-deployer-sa
namespace: pgo
+ labels:
+ vendor: crunchydata
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: pgo-deployer-crb
namespace: pgo
+ labels:
+ vendor: crunchydata
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
@@ -23,6 +27,8 @@ kind: ConfigMap
metadata:
name: pgo-deployer-cm
namespace: pgo
+ labels:
+ vendor: crunchydata
data:
values.yaml: |-
# =====================
@@ -44,7 +50,7 @@ data:
ccp_image_prefix: "registry.developers.crunchydata.com/crunchydata"
ccp_image_pull_secret: ""
ccp_image_pull_secret_manifest: ""
- ccp_image_tag: "centos7-12.4-4.5.0"
+ ccp_image_tag: "ubi8-12.13-4.5.9"
create_rbac: "true"
crunchy_debug: "false"
db_name: ""
@@ -77,14 +83,14 @@ data:
pgo_client_cert_secret: "pgo.tls"
pgo_client_container_install: "false"
pgo_client_install: "true"
- pgo_client_version: "4.5.0"
+ pgo_client_version: "4.5.9"
pgo_cluster_admin: "false"
pgo_disable_eventing: "false"
pgo_disable_tls: "false"
pgo_image_prefix: "registry.developers.crunchydata.com/crunchydata"
pgo_image_pull_secret: ""
pgo_image_pull_secret_manifest: ""
- pgo_image_tag: "centos7-4.5.0"
+ pgo_image_tag: "ubi8-4.5.9"
pgo_installation_name: "devtest"
pgo_noauth_routes: ""
pgo_operator_namespace: "pgo"
@@ -151,17 +157,21 @@ kind: Job
metadata:
name: pgo-deploy
namespace: pgo
+ labels:
+ vendor: crunchydata
spec:
backoffLimit: 0
template:
metadata:
name: pgo-deploy
+ labels:
+ vendor: crunchydata
spec:
serviceAccountName: pgo-deployer-sa
restartPolicy: Never
containers:
- name: pgo-deploy
- image: registry.developers.crunchydata.com/crunchydata/pgo-deployer:centos7-4.5.0
+ image: registry.developers.crunchydata.com/crunchydata/pgo-deployer:ubi8-4.5.9
imagePullPolicy: IfNotPresent
env:
- name: DEPLOY_ACTION
diff --git a/installers/kubectl/postgres-operator.yml b/installers/kubectl/postgres-operator.yml
index 2b516ef2ca..54b07b09f3 100644
--- a/installers/kubectl/postgres-operator.yml
+++ b/installers/kubectl/postgres-operator.yml
@@ -3,11 +3,15 @@ kind: ServiceAccount
metadata:
name: pgo-deployer-sa
namespace: pgo
+ labels:
+ vendor: crunchydata
---
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: pgo-deployer-cr
+ labels:
+ vendor: crunchydata
rules:
- apiGroups:
- ''
@@ -60,6 +64,7 @@ rules:
- extensions
resources:
- deployments
+ - replicasets
verbs:
- get
- list
@@ -117,6 +122,8 @@ kind: ConfigMap
metadata:
name: pgo-deployer-cm
namespace: pgo
+ labels:
+ vendor: crunchydata
data:
values.yaml: |-
# =====================
@@ -138,7 +145,7 @@ data:
ccp_image_prefix: "registry.developers.crunchydata.com/crunchydata"
ccp_image_pull_secret: ""
ccp_image_pull_secret_manifest: ""
- ccp_image_tag: "centos7-12.4-4.5.0"
+ ccp_image_tag: "ubi8-12.13-4.5.9"
create_rbac: "true"
crunchy_debug: "false"
db_name: ""
@@ -171,14 +178,14 @@ data:
pgo_client_cert_secret: "pgo.tls"
pgo_client_container_install: "false"
pgo_client_install: "true"
- pgo_client_version: "4.5.0"
+ pgo_client_version: "4.5.9"
pgo_cluster_admin: "false"
pgo_disable_eventing: "false"
pgo_disable_tls: "false"
pgo_image_prefix: "registry.developers.crunchydata.com/crunchydata"
pgo_image_pull_secret: ""
pgo_image_pull_secret_manifest: ""
- pgo_image_tag: "centos7-4.5.0"
+ pgo_image_tag: "ubi8-4.5.9"
pgo_installation_name: "devtest"
pgo_noauth_routes: ""
pgo_operator_namespace: "pgo"
@@ -244,6 +251,8 @@ apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: pgo-deployer-crb
+ labels:
+ vendor: crunchydata
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
@@ -258,17 +267,21 @@ kind: Job
metadata:
name: pgo-deploy
namespace: pgo
+ labels:
+ vendor: crunchydata
spec:
backoffLimit: 0
template:
metadata:
name: pgo-deploy
+ labels:
+ vendor: crunchydata
spec:
serviceAccountName: pgo-deployer-sa
restartPolicy: Never
containers:
- name: pgo-deploy
- image: registry.developers.crunchydata.com/crunchydata/pgo-deployer:centos7-4.5.0
+ image: registry.developers.crunchydata.com/crunchydata/pgo-deployer:ubi8-4.5.9
imagePullPolicy: IfNotPresent
env:
- name: DEPLOY_ACTION
diff --git a/installers/metrics/ansible/README.md b/installers/metrics/ansible/README.md
index 1c047d1a85..bbfe4faf68 100644
--- a/installers/metrics/ansible/README.md
+++ b/installers/metrics/ansible/README.md
@@ -1,15 +1,15 @@
-# Crunchy Data PostgreSQL Operator Monitoring Playbook
+# PGO: Postgres Operator Monitoring Playbook