From f8d0a56bdb155811004cd660abf504b863d4be4f Mon Sep 17 00:00:00 2001
From: andrewlecuyer <43458182+andrewlecuyer@users.noreply.github.com>
Date: Tue, 13 Oct 2020 08:30:08 -0500
Subject: [PATCH 001/129] PGBACKREST_REPO_TYPE to PGBACKREST_REPO1_TYPE
Changes PGBACKREST_REPO_TYPE to PGBACKREST_REPO1_TYPE in the
pgbackrest-env-vars.json template as used to define pgBackRest
environment variables for PG deployments, pgBackRest repository
deployments, database bootstrap jobs and database restore jobs. This
prevents duplicate pgBackRest "repo type" environment variables from
being set when the environment is being set to run a 'pgbackrest'
command within the 'crunchy-postgres-ha' container (specifically using
the pgbackrest-set-env.sh script).
Issue: #1953
---
.../pgo-operator/files/pgo-configs/pgbackrest-env-vars.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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}}"
},
{
From d27676c587d0eaf4f67457c68e81498bbfeb19fa Mon Sep 17 00:00:00 2001
From: andrewlecuyer <43458182+andrewlecuyer@users.noreply.github.com>
Date: Tue, 13 Oct 2020 08:31:04 -0500
Subject: [PATCH 002/129] Logger no Longer Defaults to "debug" Log Level
The logger utilized by the various Go applications comprising the
PostgreSQL Operator no longer defaults to a "debug" logging level.
Instead, by default the "info" logging level will be utilized (per the
default set by the Logrus logging package), and the "debug" log level
will now only be set if the 'CRUNCHY_DEBUG' environment variable is set
to 'true'.
Issue: [ch9476]
---
internal/logging/loglib.go | 3 ---
1 file changed, 3 deletions(-)
diff --git a/internal/logging/loglib.go b/internal/logging/loglib.go
index c109d435f5..b443e47b4d 100644
--- a/internal/logging/loglib.go
+++ b/internal/logging/loglib.go
@@ -88,7 +88,4 @@ func CrunchyLogger(logDetails LogValues) {
// Output to stdout instead of the default stderr
// Can be any io.Writer, see below for File example
log.SetOutput(os.Stdout)
-
- // Only log the debug severity or above.
- log.SetLevel(log.DebugLevel)
}
From f7ef47342d51fcb1598cdd8cc13cfad2aca44ddc Mon Sep 17 00:00:00 2001
From: "Jonathan S. Katz"
Date: Thu, 15 Oct 2020 17:06:11 -0400
Subject: [PATCH 003/129] Add clarifying comment about the API server root URL
Clearly Indicate in the documentation that this URL should not
end in a `/`.
Issue: #807
---
docs/content/installation/configuration.md | 2 +-
docs/content/pgo-client/_index.md | 4 ++--
pgo/cmd/root.go | 2 +-
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/docs/content/installation/configuration.md b/docs/content/installation/configuration.md
index 1a09b4afaa..e3d535f2ba 100644
--- a/docs/content/installation/configuration.md
+++ b/docs/content/installation/configuration.md
@@ -58,7 +58,7 @@ Operator.
| `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 |
diff --git a/docs/content/pgo-client/_index.md b/docs/content/pgo-client/_index.md
index 99c1040882..b155e3a3e8 100644
--- a/docs/content/pgo-client/_index.md
+++ b/docs/content/pgo-client/_index.md
@@ -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/pgo/cmd/root.go b/pgo/cmd/root.go
index 075a9f13e8..ec3cdd5f32 100644
--- a/pgo/cmd/root.go
+++ b/pgo/cmd/root.go
@@ -61,7 +61,7 @@ func init() {
defExclOSTrust := (runtime.GOOS == "windows")
RootCmd.PersistentFlags().StringVarP(&Namespace, "namespace", "n", "", "The namespace to use for pgo requests.")
- RootCmd.PersistentFlags().StringVar(&APIServerURL, "apiserver-url", "", "The URL for the PostgreSQL Operator apiserver that will process the request from the pgo client.")
+ RootCmd.PersistentFlags().StringVar(&APIServerURL, "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 `/`.")
RootCmd.PersistentFlags().StringVar(&PGO_CA_CERT, "pgo-ca-cert", "", "The CA Certificate file path for authenticating to the PostgreSQL Operator apiserver.")
RootCmd.PersistentFlags().StringVar(&PGO_CLIENT_KEY, "pgo-client-key", "", "The Client Key file path for authenticating to the PostgreSQL Operator apiserver.")
RootCmd.PersistentFlags().StringVar(&PGO_CLIENT_CERT, "pgo-client-cert", "", "The Client Certificate file path for authenticating to the PostgreSQL Operator apiserver.")
From f2eaf5f3bdbc8287bec682692d6c59c1ec070683 Mon Sep 17 00:00:00 2001
From: Andrew L'Ecuyer
Date: Sat, 17 Oct 2020 23:06:20 +0000
Subject: [PATCH 004/129] Recreate All Database PVCs on PG Cluster Restore
All database PVCs are now removed and then recreated when restoring a
PostgreSQL cluster. Therefore, in addition to recreating the PVCs for
all PGDATA volumes across all primary and replica databases comprising
the cluster, any external WAL and/or tablespace volumes are now
recreated as well. This ensures proper restore behavior when restoring
clusters utilizing external WAL and/or tablespace volumes.
Issue: #1973
Issue: [ch9568]
---
internal/operator/backrest/restore.go | 71 +++++++++++++++++++++++----
1 file changed, 62 insertions(+), 9 deletions(-)
diff --git a/internal/operator/backrest/restore.go b/internal/operator/backrest/restore.go
index 9cb0ebae1c..97b6449dd2 100644
--- a/internal/operator/backrest/restore.go
+++ b/internal/operator/backrest/restore.go
@@ -36,6 +36,13 @@ import (
"k8s.io/apimachinery/pkg/util/wait"
)
+const (
+ // tablespacePVCSuffixPattern represents the pattern of the suffix for a tablespace PVC name
+ tablespacePVCSuffixPattern = "%s-tablespace-"
+ // walPVCPattern represents the pattern of a WAL PVC name
+ walPVCPattern = "%s-wal"
+)
+
// restoreTargetRegex defines a regex to detect if a restore target has been specified
// for pgBackRest using the '--target' option
var restoreTargetRegex = regexp.MustCompile("--target(=| +)")
@@ -168,24 +175,31 @@ func PrepareClusterForRestore(clientset kubeapi.Interface, cluster *crv1.Pgclust
}
log.Debugf("restore workflow: deleted all existing jobs for cluster %s", clusterName)
+ // find all database PVCs for the entire PostgreSQL cluster. Includes the PVCs for all PGDATA
+ // volumes, as well as the PVCs for any WAL and/or tablespace volumes
+ databasePVCList, err := getPGDatabasePVCNames(clientset, replicas, clusterName, namespace)
+ if err != nil {
+ return nil, err
+ }
+ log.Debugf("restore workflow: found PVCs %v for cluster %s", databasePVCList, clusterName)
+
// delete all PostgreSQL PVCs (the primary and all replica PVCs)
- for _, deployment := range pgInstances.Items {
- err := clientset.
- CoreV1().PersistentVolumeClaims(namespace).
- Delete(deployment.GetName(), &metav1.DeleteOptions{})
- if err != nil && !kerrors.IsNotFound(err) {
+ for _, pvcName := range databasePVCList {
+ err := clientset.CoreV1().PersistentVolumeClaims(namespace).
+ Delete(pvcName, &metav1.DeleteOptions{})
+ if err != nil {
return nil, err
}
- log.Debugf("restore workflow: deleted primary or replica PVC %s", deployment.GetName())
+ log.Debugf("restore workflow: deleted primary or replica PVC %s", pvcName)
}
// Wait for all PG PVCs to be removed. If unable to verify that all PVCs have been
- // removed, then the restore cannot proceed the function returns.
+ // removed, then the restore cannot proceed and the function returns.
if err := wait.Poll(time.Second/2, time.Minute*3, func() (bool, error) {
notFound := true
- for _, deployment := range pgInstances.Items {
+ for _, pvcName := range databasePVCList {
if _, err := clientset.CoreV1().PersistentVolumeClaims(namespace).
- Get(deployment.GetName(), metav1.GetOptions{}); err == nil {
+ Get(pvcName, metav1.GetOptions{}); err == nil {
notFound = false
}
}
@@ -267,3 +281,42 @@ func PublishRestore(id, clusterName, username, namespace string) {
}
}
+
+// getPGDatabasePVCNames returns the names of all PostgreSQL database PVCs for a specific
+// PostgreSQL cluster. This includes the PVCs for the PGDATA volumes for all database
+// instances comprising the cluster, in addition to any additional volumes used by those
+// instances, e.g. PVCs for external WAL and/or tablespace volumes.
+func getPGDatabasePVCNames(clientset kubeapi.Interface, replicas *crv1.PgreplicaList,
+ clusterName, namespace string) ([]string, error) {
+
+ // create a slice with the names of all database instances in the cluster. Even though the
+ // original primary database (with a name matching the cluster name) might no longer exist,
+ // add the cluster name to this list in the event that it does, along with the names of any
+ // pgreplica's.
+ instances := []string{clusterName}
+ for _, replica := range replicas.Items {
+ instances = append(instances, replica.GetName())
+ }
+
+ // find all current PVCs for the cluster
+ clusterPVCList, err := clientset.CoreV1().PersistentVolumeClaims(namespace).
+ List(metav1.ListOptions{
+ LabelSelector: fmt.Sprintf("%s=%s", config.LABEL_PG_CLUSTER, clusterName),
+ })
+ if err != nil {
+ return nil, err
+ }
+
+ var databasePVCList []string
+ for _, instance := range instances {
+ for _, clusterPVC := range clusterPVCList.Items {
+ pvcName := clusterPVC.GetName()
+ if pvcName == instance || pvcName == fmt.Sprintf(walPVCPattern, instance) ||
+ strings.HasPrefix(pvcName, fmt.Sprintf(tablespacePVCSuffixPattern, instance)) {
+ databasePVCList = append(databasePVCList, pvcName)
+ }
+ }
+ }
+
+ return databasePVCList, nil
+}
From da50cb27cead196284c00733ce70cde9012e9b10 Mon Sep 17 00:00:00 2001
From: Andrew L'Ecuyer
Date: Wed, 21 Oct 2020 22:06:25 +0000
Subject: [PATCH 005/129] Remove Invalid pgcluster Already Processed Checks
Within the pgcluster controller, the check for an existing Kubernetes
Deployment matching the name of the pgcluster, as well as the check to
determine whether or not a pgcluster custom resource is in a
'processed' status prior to enqueuing it from the pgcluster
controller's 'onAdd' function, have been removed, since both are no
longer valid methods for determining whether or not to process a
pgcluster. For instance, a Deployment matching the pgcluster name
(i.e. the original primary for the cluster) might no longer exist if it
was since scaled down and removed, while the 'processed' status does
not properly indicate whether or not the various Kubernetes resources
(e.g. Deployments) for the initial primary utilized to bootstrap the
cluster have been created, nor does it properly indicate whether or not
the PG cluster has been fully initialized.
Issue: [ch9574]
---
.../pgcluster/pgclustercontroller.go | 34 ++++---------------
1 file changed, 6 insertions(+), 28 deletions(-)
diff --git a/internal/controller/pgcluster/pgclustercontroller.go b/internal/controller/pgcluster/pgclustercontroller.go
index a3d0973906..f0b83607ad 100644
--- a/internal/controller/pgcluster/pgclustercontroller.go
+++ b/internal/controller/pgcluster/pgclustercontroller.go
@@ -17,7 +17,6 @@ limitations under the License.
import (
"encoding/json"
- "fmt"
"io/ioutil"
"reflect"
"strconv"
@@ -48,22 +47,11 @@ type Controller struct {
// onAdd is called when a pgcluster is added
func (c *Controller) onAdd(obj interface{}) {
- cluster := obj.(*crv1.Pgcluster)
- log.Debugf("[pgcluster Controller] ns %s onAdd %s", cluster.ObjectMeta.Namespace, cluster.ObjectMeta.SelfLink)
-
- //handle the case when the operator restarts and don't
- //process already processed pgclusters
- if cluster.Status.State == crv1.PgclusterStateProcessed {
- log.Debug("pgcluster " + cluster.ObjectMeta.Name + " already processed")
- return
- }
-
key, err := cache.MetaNamespaceKeyFunc(obj)
if err == nil {
log.Debugf("cluster putting key in queue %s", key)
c.Queue.Add(key)
}
-
}
// RunWorker is a long-running function that will continually call the
@@ -106,17 +94,6 @@ func (c *Controller) processNextItem() bool {
// parallel.
defer c.Queue.Done(key)
- // Invoke the method containing the business logic
- // in this case, the de-dupe logic is to test whether a cluster
- // deployment exists , if so, then we don't create another
- _, err := c.Client.AppsV1().Deployments(keyNamespace).Get(keyResourceName, metav1.GetOptions{})
-
- if err == nil {
- log.Debugf("cluster add - dep already found, not creating again")
- c.Queue.Forget(key)
- return true
- }
-
//get the pgcluster
cluster, err := c.Client.CrunchydataV1().Pgclusters(keyNamespace).Get(keyResourceName, metav1.GetOptions{})
if err != nil {
@@ -124,13 +101,14 @@ func (c *Controller) processNextItem() bool {
c.Queue.Forget(key) // NB(cbandy): This should probably be a retry.
return true
}
+ log.Debugf("[pgcluster Controller] ns %s onAdd %s", cluster.ObjectMeta.Namespace, cluster.ObjectMeta.SelfLink)
if cluster.Spec.Status == crv1.CompletedStatus ||
- cluster.Status.State == crv1.PgclusterStateBootstrapping {
- errorMsg := fmt.Sprintf("pgcluster Contoller: onAdd event received for cluster %s but "+
- "will not process because it either has a 'completed' status or is currently in a "+
- "'bootstrapping' state", cluster.GetName())
- log.Warn(errorMsg)
+ cluster.Status.State == crv1.PgclusterStateBootstrapping ||
+ cluster.Status.State == crv1.PgclusterStateInitialized {
+ log.Debugf("pgcluster Contoller: onAdd event received for cluster %s but "+
+ "will not process because it either has a 'completed' status or is currently in an "+
+ "'initialized' or 'bootstrapping' state", cluster.GetName())
return true
}
From fbe152c049356556c4e094920608d58199a2d77a Mon Sep 17 00:00:00 2001
From: tjmoore4 <42497036+tjmoore4@users.noreply.github.com>
Date: Mon, 26 Oct 2020 09:58:34 -0400
Subject: [PATCH 006/129] pgo show backup Command Update
Currently, the 'pgo show backup' functionality requires the
Primary pod to be in a Ready state. This is not technically required
because the relevant command is executed within the 'backrest-repo'
pod. As such, this PR separates out the check for the Primary pod
from the 'show backup' functionality so that the backup information
can be shown regardless of the Primary pod's status.
Issue: [ch9402]
Issue: #1927
---
.../apiserver/backrestservice/backrestimpl.go | 86 +++++++++----------
1 file changed, 40 insertions(+), 46 deletions(-)
diff --git a/internal/apiserver/backrestservice/backrestimpl.go b/internal/apiserver/backrestservice/backrestimpl.go
index 5f6d5644c5..5ce194a337 100644
--- a/internal/apiserver/backrestservice/backrestimpl.go
+++ b/internal/apiserver/backrestservice/backrestimpl.go
@@ -191,9 +191,9 @@ func CreateBackup(request *msgs.CreateBackrestBackupRequest, ns, pgouser string)
}
- //get pod name from cluster
+ // get pod name from cluster
var podname string
- podname, err = getPrimaryPodName(cluster, ns)
+ podname, err = getBackrestRepoPodName(cluster, ns)
if err != nil {
log.Error(err)
@@ -202,6 +202,14 @@ func CreateBackup(request *msgs.CreateBackrestBackupRequest, ns, pgouser string)
return resp
}
+ // check if primary is ready
+ if err := isPrimaryReady(cluster, ns); err != nil {
+ log.Error(err)
+ resp.Status.Code = msgs.Error
+ resp.Status.Msg = err.Error()
+ return resp
+ }
+
jobName := "backrest-" + crv1.PgtaskBackrestBackup + "-" + clusterName
log.Debugf("setting jobName to %s", jobName)
@@ -254,30 +262,9 @@ func getBackupParams(identifier, clusterName, taskName, action, podName, contain
return newInstance
}
-func getDeployName(cluster *crv1.Pgcluster, ns string) (string, error) {
- var depName string
-
- selector := config.LABEL_PG_CLUSTER + "=" + cluster.Spec.Name + "," + config.LABEL_SERVICE_NAME + "=" + cluster.Spec.Name
-
- deps, err := apiserver.Clientset.
- AppsV1().Deployments(ns).
- List(metav1.ListOptions{LabelSelector: selector})
- if err != nil {
- return depName, err
- }
-
- if len(deps.Items) != 1 {
- return depName, errors.New("error: deployment count is wrong for backrest backup " + cluster.Spec.Name)
- }
- for _, d := range deps.Items {
- return d.Name, err
- }
-
- return depName, errors.New("unknown error in backrest backup")
-}
-
-func getPrimaryPodName(cluster *crv1.Pgcluster, ns string) (string, error) {
-
+// getBackrestRepoPodName goes through the pod list to identify the
+// pgBackRest repo pod and then returns the pod name.
+func getBackrestRepoPodName(cluster *crv1.Pgcluster, ns string) (string, error) {
//look up the backrest-repo pod name
selector := "pg-cluster=" + cluster.Spec.Name + ",pgo-backrest-repo=true"
@@ -298,25 +285,6 @@ func getPrimaryPodName(cluster *crv1.Pgcluster, ns string) (string, error) {
repopodName := repopods.Items[0].Name
- primaryReady := false
-
- //make sure the primary pod is in the ready state
- selector = config.LABEL_SERVICE_NAME + "=" + cluster.Spec.Name
-
- pods, err := apiserver.Clientset.CoreV1().Pods(ns).List(metav1.ListOptions{LabelSelector: selector})
- if err != nil {
- return "", err
- }
- for _, p := range pods.Items {
- if isPrimary(&p, cluster.Spec.Name) && isReady(&p) {
- primaryReady = true
- }
- }
-
- if primaryReady == false {
- return "", errors.New("primary pod is not in Ready state")
- }
-
return repopodName, err
}
@@ -344,6 +312,32 @@ func isReady(pod *v1.Pod) bool {
}
+// isPrimaryReady goes through the pod list to first identify the
+// Primary pod and, once identified, determine if it is in a
+// ready state. If not, it returns an error, otherwise it returns
+// a nil value
+func isPrimaryReady(cluster *crv1.Pgcluster, ns string) error {
+ primaryReady := false
+
+ selector := fmt.Sprintf("%s=%s,%s=%s", config.LABEL_PG_CLUSTER, cluster.Name,
+ config.LABEL_PGHA_ROLE, config.LABEL_PGHA_ROLE_PRIMARY)
+
+ pods, err := apiserver.Clientset.CoreV1().Pods(ns).List(metav1.ListOptions{LabelSelector: selector})
+ if err != nil {
+ return err
+ }
+ for _, p := range pods.Items {
+ if isPrimary(&p, cluster.Spec.Name) && isReady(&p) {
+ primaryReady = true
+ }
+ }
+
+ if primaryReady == false {
+ return errors.New("primary pod is not in Ready state")
+ }
+ return nil
+}
+
// ShowBackrest ...
func ShowBackrest(name, selector, ns string) msgs.ShowBackrestResponse {
var err error
@@ -372,7 +366,7 @@ func ShowBackrest(name, selector, ns string) msgs.ShowBackrestResponse {
log.Debugf("clusters found len is %d\n", len(clusterList.Items))
for _, c := range clusterList.Items {
- podname, err := getPrimaryPodName(&c, ns)
+ podname, err := getBackrestRepoPodName(&c, ns)
if err != nil {
log.Error(err)
From d98a35424d169abc9d5b5bfa916a843961e3ed76 Mon Sep 17 00:00:00 2001
From: tjmoore4 <42497036+tjmoore4@users.noreply.github.com>
Date: Mon, 26 Oct 2020 11:52:12 -0400
Subject: [PATCH 007/129] Update standard image tag when using a GIS enabled
cluster
Currently, the image tag value used by GIS enabled pgclusters is
being used when creating sidecontainers. Since the standard and
GIS enable PostgreSQL containers use different tags, this causes
an image pull error.
This update takes the current image name and the image tag value
stored in the pgcluster CRD and, if the image being used is the
crunchy-postgres-gis-ha container with the corresponding tag, it uses
an updated tag without the addition of the GIS version when provisioning
sidecars containers for the cluster.
Issue: [ch9393]
Issue: #1749
---
internal/operator/cluster/pgadmin.go | 2 +-
internal/operator/cluster/pgbouncer.go | 2 +-
internal/operator/clusterutilities.go | 2 +-
internal/util/util.go | 19 +++++++
internal/util/util_test.go | 75 ++++++++++++++++++++++++++
5 files changed, 97 insertions(+), 3 deletions(-)
create mode 100644 internal/util/util_test.go
diff --git a/internal/operator/cluster/pgadmin.go b/internal/operator/cluster/pgadmin.go
index 86ea0129cc..c7170ce541 100644
--- a/internal/operator/cluster/pgadmin.go
+++ b/internal/operator/cluster/pgadmin.go
@@ -348,7 +348,7 @@ func createPgAdminDeployment(clientset kubernetes.Interface, cluster *crv1.Pgclu
Name: pgAdminDeploymentName,
ClusterName: cluster.Name,
CCPImagePrefix: operator.Pgo.Cluster.CCPImagePrefix,
- CCPImageTag: cluster.Spec.CCPImageTag,
+ CCPImageTag: util.GetStandardImageTag(cluster.Spec.CCPImage, cluster.Spec.CCPImageTag),
DisableFSGroup: operator.Pgo.Cluster.DisableFSGroup,
Port: defPgAdminPort,
InitUser: defSetupUsername,
diff --git a/internal/operator/cluster/pgbouncer.go b/internal/operator/cluster/pgbouncer.go
index 7737198480..4b964d2aaf 100644
--- a/internal/operator/cluster/pgbouncer.go
+++ b/internal/operator/cluster/pgbouncer.go
@@ -554,7 +554,7 @@ func createPgBouncerDeployment(clientset kubernetes.Interface, cluster *crv1.Pgc
Name: pgbouncerDeploymentName,
ClusterName: cluster.Name,
CCPImagePrefix: util.GetValueOrDefault(cluster.Spec.CCPImagePrefix, operator.Pgo.Cluster.CCPImagePrefix),
- CCPImageTag: cluster.Spec.CCPImageTag,
+ CCPImageTag: util.GetStandardImageTag(cluster.Spec.CCPImage, cluster.Spec.CCPImageTag),
Port: cluster.Spec.Port,
PGBouncerConfigMap: util.GeneratePgBouncerConfigMapName(cluster.Name),
PGBouncerSecret: util.GeneratePgBouncerSecretName(cluster.Name),
diff --git a/internal/operator/clusterutilities.go b/internal/operator/clusterutilities.go
index 42d97e336d..46d6cdc5ee 100644
--- a/internal/operator/clusterutilities.go
+++ b/internal/operator/clusterutilities.go
@@ -335,7 +335,7 @@ func GetBadgerAddon(clientset kubernetes.Interface, namespace string, cluster *c
if cluster.Labels[config.LABEL_BADGER] == "true" {
log.Debug("crunchy_badger was found as a label on cluster create")
badgerTemplateFields := badgerTemplateFields{}
- badgerTemplateFields.CCPImageTag = spec.CCPImageTag
+ badgerTemplateFields.CCPImageTag = util.GetStandardImageTag(spec.CCPImage, spec.CCPImageTag)
badgerTemplateFields.BadgerTarget = pgbadger_target
badgerTemplateFields.PGBadgerPort = spec.PGBadgerPort
badgerTemplateFields.CCPImagePrefix = util.GetValueOrDefault(spec.CCPImagePrefix, Pgo.Cluster.CCPImagePrefix)
diff --git a/internal/util/util.go b/internal/util/util.go
index bff3802c63..094cec77f4 100644
--- a/internal/util/util.go
+++ b/internal/util/util.go
@@ -20,6 +20,7 @@ import (
"errors"
"fmt"
"math/rand"
+ "regexp"
"strings"
"time"
@@ -45,6 +46,10 @@ type JSONPatchOperation struct {
Value interface{} `json:"value"`
}
+// gisImageTagRegex is a regular expression designed to match the standard image tag for
+// the crunchy-postgres-gis-ha container
+var gisImageTagRegex = regexp.MustCompile(`(.+-[\d|\.]+)-[\d|\.]+?(-[\d|\.]+.*)`)
+
func init() {
rand.Seed(time.Now().UnixNano())
@@ -203,6 +208,20 @@ func GetSecretPassword(clientset kubernetes.Interface, db, suffix, Namespace str
}
+// GetStandardImageTag takes the current image name and the image tag value
+// stored in the pgcluster CRD and, if the image being used is the
+// crunchy-postgres-gis-ha container with the corresponding tag, it returns
+// the tag without the addition of the GIS version. This tag value can then
+// be used when provisioning containers using the standard containers tag.
+func GetStandardImageTag(imageName, imageTag string) string {
+
+ if imageName == "crunchy-postgres-gis-ha" && strings.Count(imageTag, "-") > 2 {
+ return gisImageTagRegex.ReplaceAllString(imageTag, "$1$2")
+ }
+
+ return imageTag
+}
+
// RandStringBytesRmndr ...
func RandStringBytesRmndr(n int) string {
b := make([]byte, n)
diff --git a/internal/util/util_test.go b/internal/util/util_test.go
new file mode 100644
index 0000000000..30d6d8b65d
--- /dev/null
+++ b/internal/util/util_test.go
@@ -0,0 +1,75 @@
+package util
+
+import "testing"
+
+func TestGetStandardImageTag(t *testing.T) {
+
+ assertCorrectMessage := func(t testing.TB, got, want string) {
+ t.Helper()
+ if got != want {
+ t.Errorf("got %q want %q", got, want)
+ }
+ }
+
+ imageTagTests := []struct {
+ description string
+ imageName string
+ imageTag string
+ expected string
+ }{
+ {
+ "image: crunchy-postgres-ha, tag: centos7-12.4-4.5.0",
+ "crunchy-postgres-ha",
+ "centos7-12.4-4.5.0",
+ "centos7-12.4-4.5.0",
+ }, {
+ "image: crunchy-postgres-gis-ha, tag: centos7-12.4-3.0-4.5.0",
+ "crunchy-postgres-gis-ha",
+ "centos7-12.4-3.0-4.5.0",
+ "centos7-12.4-4.5.0",
+ }, {
+ "image: crunchy-postgres-ha, tag: centos7-12.4-4.5.0-beta.1",
+ "crunchy-postgres-ha",
+ "centos7-12.4-4.5.0-beta.1",
+ "centos7-12.4-4.5.0-beta.1",
+ }, {
+ "image: crunchy-postgres-gis-ha, tag: centos7-12.4-3.0-4.5.0-beta.2",
+ "crunchy-postgres-gis-ha",
+ "centos7-12.4-3.0-4.5.0-beta.2",
+ "centos7-12.4-4.5.0-beta.2",
+ }, {
+ "image: crunchy-postgres-ha, tag: centos8-9.5.23-4.5.0-rc.1",
+ "crunchy-postgres-ha",
+ "centos8-9.5.23-4.5.0-rc.1",
+ "centos8-9.5.23-4.5.0-rc.1",
+ }, {
+ "image: crunchy-postgres-gis-ha, tag: centos8-9.5.23-2.4-4.5.0-rc.1",
+ "crunchy-postgres-gis-ha",
+ "centos8-9.5.23-2.4-4.5.0-rc.1",
+ "centos8-9.5.23-4.5.0-rc.1",
+ }, {
+ "image: crunchy-postgres-gis-ha, tag: centos8-13.0-3.0-4.5.0-rc.1",
+ "crunchy-postgres-gis-ha",
+ "centos8-13.0-3.0-4.5.0-rc.1",
+ "centos8-13.0-4.5.0-rc.1",
+ }, {
+ "image: crunchy-postgres-gis-ha, tag: centos8-custom123",
+ "crunchy-postgres-gis-ha",
+ "centos8-custom123",
+ "centos8-custom123",
+ }, {
+ "image: crunchy-postgres-gis-ha, tag: centos8-custom123-moreinfo-789",
+ "crunchy-postgres-gis-ha",
+ "centos8-custom123-moreinfo-789",
+ "centos8-custom123-moreinfo-789",
+ },
+ }
+
+ for _, itt := range imageTagTests {
+ t.Run(itt.description, func(t *testing.T) {
+ got := GetStandardImageTag(itt.imageName, itt.imageTag)
+ want := itt.expected
+ assertCorrectMessage(t, got, want)
+ })
+ }
+}
From b68873e8fbabb771bfbe3322ed4f45884f09f53f Mon Sep 17 00:00:00 2001
From: "Jonathan S. Katz"
Date: Mon, 26 Oct 2020 18:04:52 -0400
Subject: [PATCH 008/129] Update logic for pgbouncer password modification on
creation
If the AddPgBouncer call is invoked as the Operator attempts to
add a new pgBouncer and it is determined that a pgBouncer Secret
already exists, do not attempt to update the password within
PostgreSQL.
This also ensures that an existing Secret storing the pgbouncer
user credential is synchronized to be the password represented
for the pgbouncer user in the database itself.
Issue: [ch9457]
---
internal/operator/cluster/pgbouncer.go | 38 ++++++++++++++++----------
1 file changed, 24 insertions(+), 14 deletions(-)
diff --git a/internal/operator/cluster/pgbouncer.go b/internal/operator/cluster/pgbouncer.go
index 4b964d2aaf..4eaa54828c 100644
--- a/internal/operator/cluster/pgbouncer.go
+++ b/internal/operator/cluster/pgbouncer.go
@@ -156,15 +156,30 @@ func AddPgbouncer(clientset kubernetes.Interface, restconfig *rest.Config, clust
}
}
- // set the password that will be used for the "pgbouncer" PostgreSQL account
- pgBouncerPassword, err := generatePassword()
-
- if err != nil {
- return err
- }
-
// only attempt to set the password if the cluster is not in standby mode
+ // and the secret does not already exist. If GetPasswordFromSecret returns
+ // no errors, then we can assume that the Secret does not exist
if !cluster.Spec.Standby {
+ secretName := util.GeneratePgBouncerSecretName(cluster.Name)
+ pgBouncerPassword, err := util.GetPasswordFromSecret(clientset, cluster.Namespace, secretName)
+
+ if err != nil {
+ // set the password that will be used for the "pgbouncer" PostgreSQL account
+ newPassword, err := generatePassword()
+
+ if err != nil {
+ return err
+ }
+
+ pgBouncerPassword = newPassword
+
+ // create the secret that pgbouncer will include the pgBouncer
+ // credentials
+ if err := createPgbouncerSecret(clientset, cluster, pgBouncerPassword); err != nil {
+ return err
+ }
+ }
+
// attempt to update the password in PostgreSQL, as this is how pgBouncer
// will properly interface with PostgreSQL
if err := setPostgreSQLPassword(clientset, restconfig, pod, cluster.Spec.Port, pgBouncerPassword); err != nil {
@@ -178,12 +193,6 @@ func AddPgbouncer(clientset kubernetes.Interface, restconfig *rest.Config, clust
return err
}
- // next, create the secret that pgbouncer will include the pgBouncer
- // credentials
- if err := createPgbouncerSecret(clientset, cluster, pgBouncerPassword); err != nil {
- return err
- }
-
// next, create the pgBouncer deployment
if err := createPgBouncerDeployment(clientset, cluster); err != nil {
return err
@@ -227,7 +236,8 @@ func DeletePgbouncer(clientset kubernetes.Interface, restconfig *rest.Config, cl
}
// next, delete the various Kubernetes objects associated with the pgbouncer
- // these include the Service, Deployment, and the pgBouncer secret
+ // these include the Service, Deployment, Secret and ConfigMap associated with
+ // pgbouncer
// If these fail, we'll just pass through
//
// First, delete the Service and Deployment, which share the same naem
From ca650eefec1394abdb705d8dbba713cc92f8e561 Mon Sep 17 00:00:00 2001
From: tjmoore4 <42497036+tjmoore4@users.noreply.github.com>
Date: Thu, 29 Oct 2020 09:39:53 -0400
Subject: [PATCH 009/129] Update pgMonitor version to v4.4-RC7
Updates pgMonitor library references to v4.4-RC7.
Issue: [ch9602]
---
bin/get-pgmonitor.sh | 2 +-
installers/metrics/ansible/roles/pgo-metrics/defaults/main.yml | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/bin/get-pgmonitor.sh b/bin/get-pgmonitor.sh
index 6bfb720b3e..cfc178e77d 100755
--- a/bin/get-pgmonitor.sh
+++ b/bin/get-pgmonitor.sh
@@ -14,7 +14,7 @@
# limitations under the License.
echo "Getting pgMonitor..."
-PGMONITOR_COMMIT='v4.4-RC6'
+PGMONITOR_COMMIT='v4.4-RC7'
# pgMonitor Setup
if [[ -d ${PGOROOT?}/tools/pgmonitor ]]
diff --git a/installers/metrics/ansible/roles/pgo-metrics/defaults/main.yml b/installers/metrics/ansible/roles/pgo-metrics/defaults/main.yml
index 600d57d6bf..775d6691f5 100644
--- a/installers/metrics/ansible/roles/pgo-metrics/defaults/main.yml
+++ b/installers/metrics/ansible/roles/pgo-metrics/defaults/main.yml
@@ -9,7 +9,7 @@ delete_metrics_namespace: "false"
metrics_namespace: "pgo"
metrics_image_pull_secret: ""
metrics_image_pull_secret_manifest: ""
-pgmonitor_version: "v4.4-RC6"
+pgmonitor_version: "v4.4-RC7"
alertmanager_configmap: "alertmanager-config"
alertmanager_rules_configmap: "alertmanager-rules-config"
From 12a62ce4d16e75417f60c85e094d490be8fdf260 Mon Sep 17 00:00:00 2001
From: tjmoore4 <42497036+tjmoore4@users.noreply.github.com>
Date: Thu, 29 Oct 2020 09:41:52 -0400
Subject: [PATCH 010/129] Preserve cluster-level resources in a multi-Operator
environment
Currently, uninstalling an instance of the PostgreSQL Operator
from one namespace will remove all Kubernetes/Openshift cluster-
level resources as well. This impairs the functionality of any other
Operators that may be installed.
This update adds a check to see if there are any other PostgreSQL
Operators installed on the cluster and, if so, adds a flag to skip
the removal of cluster-level resources.
Issue: [ch9389]
---
.../roles/pgo-operator/tasks/cleanup.yml | 27 ++++++++++++++++---
1 file changed, 23 insertions(+), 4 deletions(-)
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
From 8719ac7607f77c22edeb7b35d187f2c38a80edad Mon Sep 17 00:00:00 2001
From: tjmoore4 <42497036+tjmoore4@users.noreply.github.com>
Date: Fri, 30 Oct 2020 16:19:24 -0400
Subject: [PATCH 011/129] Use autogenerated pgouser password if not set
Currently, the PostgreSQL Operator requires a pgouser's
password to be set during the installation process.
This update allows for the password to be unset during installation,
and, during Operator initialization, any pgouser that currently has an
empty password will be given an autogenerated password, stored in the
relevant pgouser secret.
Issue: [ch9510]
---
docs/content/installation/configuration.md | 2 +-
.../templates/pgouser-admin.yaml.j2 | 6 +-
.../roles/pgo-preflight/tasks/check_vars.yml | 1 -
internal/apiserver/root.go | 59 ++++++++++++++++++-
4 files changed, 62 insertions(+), 6 deletions(-)
diff --git a/docs/content/installation/configuration.md b/docs/content/installation/configuration.md
index e3d535f2ba..ce097d2753 100644
--- a/docs/content/installation/configuration.md
+++ b/docs/content/installation/configuration.md
@@ -53,7 +53,7 @@ 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. |
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-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/internal/apiserver/root.go b/internal/apiserver/root.go
index 2ced3eaca7..7cd28033f2 100644
--- a/internal/apiserver/root.go
+++ b/internal/apiserver/root.go
@@ -31,9 +31,11 @@ import (
"github.com/crunchydata/postgres-operator/internal/kubeapi"
"github.com/crunchydata/postgres-operator/internal/ns"
"github.com/crunchydata/postgres-operator/internal/tlsutil"
+ "github.com/crunchydata/postgres-operator/internal/util"
log "github.com/sirupsen/logrus"
corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ "k8s.io/apimachinery/pkg/types"
"k8s.io/client-go/kubernetes"
"k8s.io/client-go/rest"
)
@@ -133,6 +135,11 @@ func Initialize() {
initConfig()
+ // look through all the pgouser secrets in the Operator's
+ // namespace and set a generated password for any that currently
+ // have an empty password set
+ setRandomPgouserPasswords()
+
if err := setNamespaceOperatingMode(); err != nil {
log.Error(err)
os.Exit(2)
@@ -160,7 +167,6 @@ func connectToKube() {
}
func initConfig() {
-
AuditFlag = Pgo.Pgo.Audit
if AuditFlag {
log.Info("audit flag is set to true")
@@ -305,6 +311,7 @@ func Authn(perm string, w http.ResponseWriter, r *http.Request) (string, error)
// this function currently encapsulates authorization as well, and this is
// the call where we get the username to check the RBAC settings
username, password, authOK := r.BasicAuth()
+
if AuditFlag {
log.Infof("[audit] %s username=[%s] method=[%s] ip=[%s] ok=[%t] ", perm, username, r.Method, r.RemoteAddr, authOK)
}
@@ -500,6 +507,56 @@ func setNamespaceOperatingMode() error {
return nil
}
+// setRandomPgouserPasswords looks through the pgouser secrets in the Operator's
+// namespace. If any have an empty password, it generates a random password,
+// Base64 encodes it, then stores it in the relevant PGO user's secret
+func setRandomPgouserPasswords() {
+ ctx := context.TODO()
+
+ selector := "pgo-pgouser=true,vendor=crunchydata"
+ secrets, err := Clientset.CoreV1().Secrets(PgoNamespace).
+ List(ctx, metav1.ListOptions{LabelSelector: selector})
+ if err != nil {
+ log.Warnf("Could not get pgouser secrets in namespace: %s", PgoNamespace)
+ return
+ }
+
+ for _, secret := range secrets.Items {
+ // check if password is set. if it is, continue.
+ if len(secret.Data["password"]) > 0 {
+ continue
+ }
+
+ log.Infof("Password in pgouser secret %s for operator installation %s in namespace %s is empty. "+
+ "Setting a generated password.", secret.Name, InstallationName, PgoNamespace)
+
+ // generate the password using the default password length
+ generatedPassword, err := util.GeneratePassword(util.DefaultGeneratedPasswordLength)
+
+ if err != nil {
+ log.Errorf("Could not generate password for pgouser secret %s for operator installation %s in "+
+ "namespace %s", secret.Name, InstallationName, PgoNamespace)
+ continue
+ }
+
+ // create the password patch
+ patch, err := kubeapi.NewMergePatch().Add("stringData", "password")(generatedPassword).Bytes()
+
+ if err != nil {
+ log.Errorf("Could not generate password patch for pgouser secret %s for operator installation "+
+ "%s in namespace %s", secret.Name, InstallationName, PgoNamespace)
+ continue
+ }
+
+ // patch the pgouser secret with the new password
+ if _, err := Clientset.CoreV1().Secrets(PgoNamespace).Patch(ctx, secret.Name, types.MergePatchType,
+ patch, metav1.PatchOptions{}); err != nil {
+ log.Errorf("Could not patch pgouser secret %s with generated password for operator installation "+
+ "%s in namespace %s", secret.Name, InstallationName, PgoNamespace)
+ }
+ }
+}
+
// NamespaceOperatingMode returns the namespace operating mode for the current Operator
// installation, which is stored in the "namespaceOperatingMode" variable
func NamespaceOperatingMode() ns.NamespaceOperatingMode {
From 9e75d666e151ef42a250bc09461bd3137b8c4ba6 Mon Sep 17 00:00:00 2001
From: tjmoore4 <42497036+tjmoore4@users.noreply.github.com>
Date: Mon, 2 Nov 2020 19:36:19 -0500
Subject: [PATCH 012/129] Add ports to pgo show cluster output
This update adds the service port and protocol information
to the 'pgo show cluster' output.
Issue: [ch9563]
---
internal/apiserver/clusterservice/clusterimpl.go | 3 +++
pgo/cmd/cluster.go | 6 ++++--
pkg/apiservermsgs/clustermsgs.go | 1 +
3 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/internal/apiserver/clusterservice/clusterimpl.go b/internal/apiserver/clusterservice/clusterimpl.go
index 6163b4b45d..b6bfefc9d2 100644
--- a/internal/apiserver/clusterservice/clusterimpl.go
+++ b/internal/apiserver/clusterservice/clusterimpl.go
@@ -308,6 +308,9 @@ func getServices(cluster *crv1.Pgcluster, ns string) ([]msgs.ShowClusterService,
d.ClusterName = cluster.Name
}
d.ClusterIP = p.Spec.ClusterIP
+ for _, port := range p.Spec.Ports {
+ d.ClusterPorts = append(d.ClusterPorts, strconv.Itoa(int(port.Port))+"/"+string(port.Protocol))
+ }
if len(p.Spec.ExternalIPs) > 0 {
d.ExternalIP = p.Spec.ExternalIPs[0]
}
diff --git a/pgo/cmd/cluster.go b/pgo/cmd/cluster.go
index 3ee443fcd8..d3c63f9445 100644
--- a/pgo/cmd/cluster.go
+++ b/pgo/cmd/cluster.go
@@ -220,9 +220,11 @@ func printCluster(detail *msgs.ShowClusterDetail) {
for _, service := range detail.Services {
if service.ExternalIP == "" {
- fmt.Println(TreeBranch + "service : " + service.Name + " - ClusterIP (" + service.ClusterIP + ")")
+ fmt.Println(TreeBranch + "service : " + service.Name + " - ClusterIP (" + service.ClusterIP + ")" + " - Ports (" +
+ strings.Trim(strings.Join(strings.Fields(fmt.Sprint(service.ClusterPorts)), ", "), "[]") + ")")
} else {
- fmt.Println(TreeBranch + "service : " + service.Name + " - ClusterIP (" + service.ClusterIP + ") ExternalIP (" + service.ExternalIP + ")")
+ fmt.Println(TreeBranch + "service : " + service.Name + " - ClusterIP (" + service.ClusterIP + ") ExternalIP (" + service.ExternalIP +
+ ")" + " - Ports (" + strings.Trim(strings.Join(strings.Fields(fmt.Sprint(service.ClusterPorts)), ", "), "[]") + ")")
}
}
diff --git a/pkg/apiservermsgs/clustermsgs.go b/pkg/apiservermsgs/clustermsgs.go
index cfe07dfdd7..e8983613c4 100644
--- a/pkg/apiservermsgs/clustermsgs.go
+++ b/pkg/apiservermsgs/clustermsgs.go
@@ -243,6 +243,7 @@ type ShowClusterService struct {
Name string
Data string
ClusterIP string
+ ClusterPorts []string
ExternalIP string
ClusterName string
Pgbouncer bool
From b4b2d8f4d2e5c0bb7dab6929e8f3a3ed19ae6517 Mon Sep 17 00:00:00 2001
From: "Jonathan S. Katz"
Date: Tue, 27 Oct 2020 14:58:52 -0400
Subject: [PATCH 013/129] Do not require pgBackRest Secret for cluster creation
This changes the methodology for how a pgBackRest Secret is
generated such that it is no longer required at the time a
cluster is created vis-a-vis the pgcluster custom resource.
Instead, the Operator follows this heuristic:
- If a pgBackRest Secret is provided, this Secret is used
- If the pgBackRest Secret is partially filled out, the
missing pieces are filled in
- If no Secret is provided, a Secret is generated.
Note that if you want to use S3 or a S3-like storage system,
you will need to still create the Secret with the appropriate
S3 credentials.
This also updates various documentation to show the easier
workflow.
Issue: [ch9451]
---
docs/content/custom-resources/_index.md | 65 +--------
examples/create-by-resource/run.sh | 39 -----
examples/helm/README.md | 79 ++++++++++
.../apiserver/clusterservice/clusterimpl.go | 30 ++--
internal/operator/backrest/repo.go | 13 ++
internal/operator/cluster/cluster.go | 8 ++
internal/util/cluster.go | 135 ++++++++++++------
7 files changed, 210 insertions(+), 159 deletions(-)
create mode 100644 examples/helm/README.md
diff --git a/docs/content/custom-resources/_index.md b/docs/content/custom-resources/_index.md
index e27adfd3e6..af913755e9 100644
--- a/docs/content/custom-resources/_index.md
+++ b/docs/content/custom-resources/_index.md
@@ -255,68 +255,7 @@ create additional secrets.
The following guide goes through how to create a PostgreSQL cluster called
`hippo` by creating a new custom resource.
-#### Step 1: Create the pgBackRest Secret
-
-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.
-
-In this example, we generate a ssh keypair using ED25519 keys, but if your
-environment requires it, you can also use RSA keys.
-
-In your working directory, run the following commands:
-
-
-# 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
-
-# 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: IwkkT3BlbkJTRDogc3NoZF9jb25maWcsdiAxLjEwMCAyMDE2LzA4LzE1IDEyOjMyOjA0IG5hZGR5IEV4cCAkCgojIFRoaXMgaXMgdGhlIHNzaGQgc2VydmVyIHN5c3RlbS13aWRlIGNvbmZpZ3VyYXRpb24gZmlsZS4gIFNlZQojIHNzaGRfY29uZmlnKDUpIGZvciBtb3JlIGluZm9ybWF0aW9uLgoKIyBUaGlzIHNzaGQg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TExBVEUgTENfTU9ORVRBUlkgTENfTUVTU0FHRVMKQWNjZXB0RW52IExDX1BBUEVSIExDX05BTUUgTENfQUREUkVTUyBMQ19URUxFUEhPTkUgTENfTUVBU1VSRU1FTlQKQWNjZXB0RW52IExDX0lERU5USUZJQ0FUSU9OIExDX0FMTCBMQU5HVUFHRQpBY2NlcHRFbnYgWE1PRElGSUVSUwoKIyBvdmVycmlkZSBkZWZhdWx0IG9mIG5vIHN1YnN5c3RlbXMKU3Vic3lzdGVtCXNmdHAJL3Vzci9saWJleGVjL29wZW5zc2gvc2Z0cC1zZXJ2ZXIKCiMgRXhhbXBsZSBvZiBvdmVycmlkaW5nIHNldHRpbmdzIG9uIGEgcGVyLXVzZXIgYmFzaXMKI01hdGNoIFVzZXIgYW5vbmN2cwojCVgxMUZvcndhcmRpbmcgbm8KIwlBbGxvd1RjcEZvcndhcmRpbmcgbm8KIwlQZXJtaXRUVFkgbm8KIwlGb3JjZUNvbW1hbmQgY3ZzIHNlcnZlcgo=
-EOF
-
-# remove the pgBackRest ssh keypair from the shell session
-unset pgbackrest_public_key pgbackrest_private_key
-
-# create the pgBackRest secret
-kubectl apply -f "${pgo_cluster_name}-backrest-repo-config.yaml"
-
-
-#### Step 2: Creating the PostgreSQL User Secrets
+#### Step 1: 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:
@@ -354,7 +293,7 @@ kubectl label secrets -n "${cluster_namespace}" "${pgo_cluster_name}-primaryuser
kubectl label secrets -n "${cluster_namespace}" "${pgo_cluster_name}-hippo-secret" "pg-cluster=${pgo_cluster_name}"
```
-#### Step 3: Create the PostgreSQL Cluster
+#### Step 2: Create the PostgreSQL Cluster
With the Secrets in place. It is now time to create the PostgreSQL cluster.
diff --git a/examples/create-by-resource/run.sh b/examples/create-by-resource/run.sh
index 1cdefdda77..ea034a4fe2 100755
--- a/examples/create-by-resource/run.sh
+++ b/examples/create-by-resource/run.sh
@@ -41,49 +41,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: IwkkT3BlbkJTRDogc3NoZF9jb25maWcsdiAxLjEwMCAyMDE2LzA4LzE1IDEyOjMyOjA0IG5hZGR5IEV4cCAkCgojIFRoaXMgaXMgdGhlIHNzaGQgc2VydmVyIHN5c3RlbS13aWRlIGNvbmZpZ3VyYXRpb24gZmlsZS4gIFNlZQojIHNzaGRfY29uZmlnKDUpIGZvciBtb3JlIGluZm9ybWF0aW9uLgoKIyBUaGlzIHNzaGQgd2FzIGNvbXBpbGVkIHdpdGggUEFUSD0vdXNyL2xvY2FsL2JpbjovdXNyL2JpbgoKIyBUaGUgc3RyYXRlZ3kgdXNlZCBmb3Igb3B0aW9ucyBpbiB0aGUgZGVmYXVsdCBzc2hkX2NvbmZpZyBzaGlwcGVkIHdpdGgKIyBPcGVuU1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EwgTEFOR1VBR0UKQWNjZXB0RW52IFhNT0RJRklFUlMKCiMgb3ZlcnJpZGUgZGVmYXVsdCBvZiBubyBzdWJzeXN0ZW1zClN1YnN5c3RlbQlzZnRwCS91c3IvbGliZXhlYy9vcGVuc3NoL3NmdHAtc2VydmVyCgojIEV4YW1wbGUgb2Ygb3ZlcnJpZGluZyBzZXR0aW5ncyBvbiBhIHBlci11c2VyIGJhc2lzCiNNYXRjaCBVc2VyIGFub25jdnMKIwlYMTFGb3J3YXJkaW5nIG5vCiMJQWxsb3dUY3BGb3J3YXJkaW5nIG5vCiMJUGVybWl0VFRZIG5vCiMJRm9yY2VDb21tYW5kIGN2cyBzZXJ2ZXI=
-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/helm/README.md b/examples/helm/README.md
new file mode 100644
index 0000000000..390bfbbaae
--- /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.1 or later, you can skip the below
+step.
+
+### Before 4.5.1
+
+```
+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/internal/apiserver/clusterservice/clusterimpl.go b/internal/apiserver/clusterservice/clusterimpl.go
index b6bfefc9d2..5d887eee60 100644
--- a/internal/apiserver/clusterservice/clusterimpl.go
+++ b/internal/apiserver/clusterservice/clusterimpl.go
@@ -994,17 +994,25 @@ func CreateCluster(request *msgs.CreateClusterRequest, ns, pgouser string) msgs.
backrestS3CACert = backrestSecret.Data[util.BackRestRepoSecretKeyAWSS3KeyAWSS3CACert]
}
- err := util.CreateBackrestRepoSecrets(apiserver.Clientset,
- util.BackrestRepoConfig{
- BackrestS3CA: backrestS3CACert,
- BackrestS3Key: request.BackrestS3Key,
- BackrestS3KeySecret: request.BackrestS3KeySecret,
- ClusterName: clusterName,
- ClusterNamespace: request.Namespace,
- OperatorNamespace: apiserver.PgoNamespace,
- })
-
- if err != nil {
+ // set up the secret for the cluster that contains the pgBackRest
+ // information
+ secret := &v1.Secret{
+ ObjectMeta: metav1.ObjectMeta{
+ Name: secretName,
+ Labels: map[string]string{
+ config.LABEL_VENDOR: config.LABEL_CRUNCHY,
+ config.LABEL_PG_CLUSTER: clusterName,
+ config.LABEL_PGO_BACKREST_REPO: "true",
+ },
+ },
+ Data: map[string][]byte{
+ util.BackRestRepoSecretKeyAWSS3KeyAWSS3CACert: backrestS3CACert,
+ util.BackRestRepoSecretKeyAWSS3KeyAWSS3Key: []byte(request.BackrestS3Key),
+ util.BackRestRepoSecretKeyAWSS3KeyAWSS3KeySecret: []byte(request.BackrestS3KeySecret),
+ },
+ }
+
+ if _, err := apiserver.Clientset.CoreV1().Secrets(ns).Create(ctx, secret, metav1.CreateOptions{}); err != nil && !kubeapi.IsAlreadyExists(err) {
resp.Status.Code = msgs.Error
resp.Status.Msg = fmt.Sprintf("could not create backrest repo secret: %s", err)
return resp
diff --git a/internal/operator/backrest/repo.go b/internal/operator/backrest/repo.go
index ea2e5100b0..65466232b9 100644
--- a/internal/operator/backrest/repo.go
+++ b/internal/operator/backrest/repo.go
@@ -157,6 +157,19 @@ func CreateRepoDeployment(clientset kubernetes.Interface, cluster *crv1.Pgcluste
return nil
}
+// CreateRepoSecret allows for the creation of the Secret used to populate
+// some (mostly) sensitive fields for managing the pgBackRest repository.
+//
+// If the Secret already exists, then missing fields will be overwritten.
+func CreateRepoSecret(clientset kubernetes.Interface, cluster *crv1.Pgcluster) error {
+ return util.CreateBackrestRepoSecrets(clientset,
+ util.BackrestRepoConfig{
+ ClusterName: cluster.Name,
+ ClusterNamespace: cluster.Namespace,
+ OperatorNamespace: operator.PgoNamespace,
+ })
+}
+
// setBootstrapRepoOverrides overrides certain fields used to populate the pgBackRest repository template
// as needed to support the creation of a bootstrap repository need to bootstrap a new cluster from an
// existing data source.
diff --git a/internal/operator/cluster/cluster.go b/internal/operator/cluster/cluster.go
index eef521107f..81cf6cbbcd 100644
--- a/internal/operator/cluster/cluster.go
+++ b/internal/operator/cluster/cluster.go
@@ -87,6 +87,14 @@ func AddClusterBase(clientset kubeapi.Interface, cl *crv1.Pgcluster, namespace s
return
}
+ // ensure the the pgBackRest Secret is created. If this fails, we have to
+ // abort
+ if err := backrest.CreateRepoSecret(clientset, cl); err != nil {
+ log.Error(err)
+ publishClusterCreateFailure(cl, err.Error())
+ return
+ }
+
if err := annotateBackrestSecret(clientset, cl); err != nil {
log.Error(err)
publishClusterCreateFailure(cl, err.Error())
diff --git a/internal/util/cluster.go b/internal/util/cluster.go
index 91c7cfec95..6e05a0f71f 100644
--- a/internal/util/cluster.go
+++ b/internal/util/cluster.go
@@ -27,6 +27,7 @@ import (
log "github.com/sirupsen/logrus"
v1 "k8s.io/api/core/v1"
+ kerrors "k8s.io/apimachinery/pkg/api/errors"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/client-go/kubernetes"
"k8s.io/client-go/rest"
@@ -115,70 +116,112 @@ var (
func CreateBackrestRepoSecrets(clientset kubernetes.Interface,
backrestRepoConfig BackrestRepoConfig) error {
- keys, err := NewPrivatePublicKeyPair()
- if err != nil {
- return err
+ // first: determine if a Secret already exists. If it does, we are going to
+ // work on modifying that Secret.
+ secretName := fmt.Sprintf("%s-%s", backrestRepoConfig.ClusterName,
+ config.LABEL_BACKREST_REPO_SECRET)
+ secret, secretErr := clientset.CoreV1().Secrets(backrestRepoConfig.ClusterNamespace).Get(
+ secretName, metav1.GetOptions{})
+
+ // only return an error if this is a **not** a not found error
+ if secretErr != nil && !kerrors.IsNotFound(secretErr) {
+ log.Error(secretErr)
+ return secretErr
+ }
+
+ // determine if we need to create a new secret, i.e. this is a not found error
+ newSecret := secretErr != nil
+ if newSecret {
+ // set up the secret for the cluster that contains the pgBackRest information
+ secret = &v1.Secret{
+ ObjectMeta: metav1.ObjectMeta{
+ Name: secretName,
+ Labels: map[string]string{
+ config.LABEL_VENDOR: config.LABEL_CRUNCHY,
+ config.LABEL_PG_CLUSTER: backrestRepoConfig.ClusterName,
+ config.LABEL_PGO_BACKREST_REPO: "true",
+ },
+ },
+ Data: map[string][]byte{},
+ }
}
- // Retrieve the S3/SSHD configuration files from secret
- configs, err := clientset.
+ // next, load the Operator level pgBackRest secret templates, which contain
+ // SSHD(...?) and possible S3 credentials
+ configs, configErr := clientset.
CoreV1().Secrets(backrestRepoConfig.OperatorNamespace).
Get("pgo-backrest-repo-config", metav1.GetOptions{})
- if err != nil {
- log.Error(err)
- return err
+ if configErr != nil {
+ log.Error(configErr)
+ return configErr
+ }
+
+ // set the SSH/SSHD configuration, if it is not presently set
+ for _, key := range []string{backRestRepoSecretKeySSHConfig, backRestRepoSecretKeySSHDConfig} {
+ if len(secret.Data[key]) == 0 {
+ secret.Data[key] = configs.Data[key]
+ }
}
- // if an S3 key has been provided via the request, then use key and key secret
- // included in the request instead of the default credentials that are
- // available in the Operator pgBackRest secret
- backrestS3Key := []byte(backrestRepoConfig.BackrestS3Key)
+ // set the SSH keys if any appear to be unset
+ if len(secret.Data[backRestRepoSecretKeyAuthorizedKeys]) == 0 ||
+ len(secret.Data[backRestRepoSecretKeySSHPrivateKey]) == 0 ||
+ len(secret.Data[backRestRepoSecretKeySSHHostPrivateKey]) == 0 {
+ // generate the keypair and then assign it to the values in the Secret
+ keys, keyErr := NewPrivatePublicKeyPair()
+
+ if keyErr != nil {
+ log.Error(keyErr)
+ return keyErr
+ }
+
+ secret.Data[backRestRepoSecretKeyAuthorizedKeys] = keys.Public
+ secret.Data[backRestRepoSecretKeySSHPrivateKey] = keys.Private
+ secret.Data[backRestRepoSecretKeySSHHostPrivateKey] = keys.Private
+ }
- if backrestRepoConfig.BackrestS3Key == "" {
- backrestS3Key = configs.Data[BackRestRepoSecretKeyAWSS3KeyAWSS3Key]
+ // Set the S3 credentials
+ // If explicit S3 credentials are passed in, use those.
+ // If the Secret already has S3 credentials, use those.
+ // Otherwise, try to load in the default credentials from the Operator Secret.
+ if len(backrestRepoConfig.BackrestS3CA) != 0 {
+ secret.Data[BackRestRepoSecretKeyAWSS3KeyAWSS3CACert] = backrestRepoConfig.BackrestS3CA
}
- backrestS3KeySecret := []byte(backrestRepoConfig.BackrestS3KeySecret)
+ if len(secret.Data[BackRestRepoSecretKeyAWSS3KeyAWSS3CACert]) == 0 &&
+ len(configs.Data[BackRestRepoSecretKeyAWSS3KeyAWSS3CACert]) != 0 {
+ secret.Data[BackRestRepoSecretKeyAWSS3KeyAWSS3CACert] = configs.Data[BackRestRepoSecretKeyAWSS3KeyAWSS3CACert]
+ }
- if backrestRepoConfig.BackrestS3KeySecret == "" {
- backrestS3KeySecret = configs.Data[BackRestRepoSecretKeyAWSS3KeyAWSS3KeySecret]
+ if backrestRepoConfig.BackrestS3Key != "" {
+ secret.Data[BackRestRepoSecretKeyAWSS3KeyAWSS3Key] = []byte(backrestRepoConfig.BackrestS3Key)
}
- // determine if there is a CA override provided, and if not, use the default
- // from the configuration
- caCert := backrestRepoConfig.BackrestS3CA
- if len(caCert) == 0 {
- caCert = configs.Data[BackRestRepoSecretKeyAWSS3KeyAWSS3CACert]
+ if len(secret.Data[BackRestRepoSecretKeyAWSS3KeyAWSS3Key]) == 0 &&
+ len(configs.Data[BackRestRepoSecretKeyAWSS3KeyAWSS3Key]) != 0 {
+ secret.Data[BackRestRepoSecretKeyAWSS3KeyAWSS3Key] = configs.Data[BackRestRepoSecretKeyAWSS3KeyAWSS3Key]
}
- // set up the secret for the cluster that contains the pgBackRest information
- secret := v1.Secret{
- ObjectMeta: metav1.ObjectMeta{
- Name: fmt.Sprintf("%s-%s", backrestRepoConfig.ClusterName,
- config.LABEL_BACKREST_REPO_SECRET),
- Labels: map[string]string{
- config.LABEL_VENDOR: config.LABEL_CRUNCHY,
- config.LABEL_PG_CLUSTER: backrestRepoConfig.ClusterName,
- config.LABEL_PGO_BACKREST_REPO: "true",
- },
- },
- Data: map[string][]byte{
- BackRestRepoSecretKeyAWSS3KeyAWSS3CACert: caCert,
- BackRestRepoSecretKeyAWSS3KeyAWSS3Key: backrestS3Key,
- BackRestRepoSecretKeyAWSS3KeyAWSS3KeySecret: backrestS3KeySecret,
- backRestRepoSecretKeyAuthorizedKeys: keys.Public,
- backRestRepoSecretKeySSHConfig: configs.Data[backRestRepoSecretKeySSHConfig],
- backRestRepoSecretKeySSHDConfig: configs.Data[backRestRepoSecretKeySSHDConfig],
- backRestRepoSecretKeySSHPrivateKey: keys.Private,
- backRestRepoSecretKeySSHHostPrivateKey: keys.Private,
- },
+ if backrestRepoConfig.BackrestS3KeySecret != "" {
+ secret.Data[BackRestRepoSecretKeyAWSS3KeyAWSS3KeySecret] = []byte(backrestRepoConfig.BackrestS3KeySecret)
}
- _, err = clientset.CoreV1().Secrets(backrestRepoConfig.ClusterNamespace).Create(&secret)
- if kubeapi.IsAlreadyExists(err) {
- _, err = clientset.CoreV1().Secrets(backrestRepoConfig.ClusterNamespace).Update(&secret)
+ if len(secret.Data[BackRestRepoSecretKeyAWSS3KeyAWSS3KeySecret]) == 0 &&
+ len(configs.Data[BackRestRepoSecretKeyAWSS3KeyAWSS3KeySecret]) != 0 {
+ secret.Data[BackRestRepoSecretKeyAWSS3KeyAWSS3KeySecret] = configs.Data[BackRestRepoSecretKeyAWSS3KeyAWSS3KeySecret]
}
+
+ // time to create or update the secret!
+ if newSecret {
+ _, err := clientset.CoreV1().Secrets(backrestRepoConfig.ClusterNamespace).Create(
+ secret)
+ return err
+ }
+
+ _, err := clientset.CoreV1().Secrets(backrestRepoConfig.ClusterNamespace).Update(
+ secret)
+
return err
}
From 14dc9c80423efefd1bf47b9bd96484193b98b7ea Mon Sep 17 00:00:00 2001
From: "Jonathan S. Katz"
Date: Tue, 27 Oct 2020 15:03:32 -0400
Subject: [PATCH 014/129] Reorder custom resource documentation
Move the attributes to the latter half of the page, and showcase
the workflows at the top.
---
docs/content/custom-resources/_index.md | 396 ++++++++++++------------
1 file changed, 198 insertions(+), 198 deletions(-)
diff --git a/docs/content/custom-resources/_index.md b/docs/content/custom-resources/_index.md
index af913755e9..7e024900f4 100644
--- a/docs/content/custom-resources/_index.md
+++ b/docs/content/custom-resources/_index.md
@@ -35,204 +35,6 @@ 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
-
-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. |
-
## Custom Resource Workflows
### Create a PostgreSQL Cluster
@@ -629,3 +431,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 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
+
+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. |
From 6622060af37d1d85a4dbc748c792e05b06a7b9b2 Mon Sep 17 00:00:00 2001
From: "Jonathan S. Katz"
Date: Tue, 27 Oct 2020 15:24:17 -0400
Subject: [PATCH 015/129] Add custom resource example for pgBackRest repo in S3
This examples shows how one can create a new PostgreSQL cluster
where the pgBackRest backups and archives exist in a S3
repository via creating a custom resource.
---
docs/content/custom-resources/_index.md | 192 ++++++++++++++++++++++++
1 file changed, 192 insertions(+)
diff --git a/docs/content/custom-resources/_index.md b/docs/content/custom-resources/_index.md
index 7e024900f4..f4384e311e 100644
--- a/docs/content/custom-resources/_index.md
+++ b/docs/content/custom-resources/_index.md
@@ -212,6 +212,198 @@ EOF
kubectl apply -f "${pgo_cluster_name}-pgcluster.yaml"
```
+### Create a PostgreSQL Cluster With Backups in S3
+
+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.
+
+#### Step 1: Create the pgBackRest S3 Secrets
+
+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.
+
+The below code will help you set up this Secret.
+
+```
+# 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
+# the following variables are your S3 key and key secret
+backrest_s3_key=yours3key
+backrest_s3_key_secret=yours3keysecret
+
+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}"
+
+unset backrest_s3_key
+unset backrest_s3_key_secret
+```
+
+#### Step 2: Creating the PostgreSQL User Secrets
+
+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
+- A standard PostgreSQL user
+
+The below code will help you set up these Secrets.
+
+```
+# 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
+
+# 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 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*
+
+# 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*
+
+
+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}"
+```
+
+#### Step 3: Create the PostgreSQL Cluster
+
+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.
+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
+kind: Pgcluster
+metadata:
+ annotations:
+ 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"
+ 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: dynamic
+ supplementalgroups: ""
+ PrimaryStorage:
+ accessmode: ReadWriteMany
+ matchLabels: ""
+ name: ${pgo_cluster_name}
+ size: 1G
+ storageclass: ""
+ storagetype: dynamic
+ supplementalgroups: ""
+ ReplicaStorage:
+ accessmode: ReadWriteMany
+ matchLabels: ""
+ name: ""
+ size: 1G
+ storageclass: ""
+ storagetype: dynamic
+ supplementalgroups: ""
+ annotations:
+ backrestLimits: {}
+ backrestRepoPath: ""
+ backrestResources:
+ memory: 48Mi
+ 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 >}}
+ 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:
+ backrest-storage-type: "s3"
+ crunchy-postgres-exporter: "false"
+ pg-pod-anti-affinity: ""
+ pgo-version: {{< param operatorVersion >}}
+ usersecretname: ${pgo_cluster_name}-hippo-secret
+EOF
+
+kubectl apply -f "${pgo_cluster_name}-pgcluster.yaml"
+```
+
### Modify a Cluster
There following modification operations are supported on the
From 62c849029c04354bd819639fd086fdf00c0bcdf2 Mon Sep 17 00:00:00 2001
From: "Jonathan S. Katz"
Date: Tue, 27 Oct 2020 20:40:12 -0400
Subject: [PATCH 016/129] Create "pgo-config" ConfigMap if not provided
The Operator (and associated containers) will create the pgo-config
ConfigMap from the stored default configuration if the pgo-config
ConfigMap is not present.
This allows for the editing of "default configuration" after
the Operator is deployed, and allows for the removal of the
pgo-config creation step from several of the installation
methods.
Issue: [ch9451]
---
docs/content/Configuration/configuration.md | 6 +-
.../installation/other/operator-hub.md | 14 --
installers/olm/description.openshift.md | 14 --
installers/olm/description.upstream.md | 14 --
internal/config/pgoconfig.go | 176 +++++++++++-------
5 files changed, 111 insertions(+), 113 deletions(-)
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/installation/other/operator-hub.md b/docs/content/installation/other/operator-hub.md
index 9b077ef073..b610ee2664 100644
--- a/docs/content/installation/other/operator-hub.md
+++ b/docs/content/installation/other/operator-hub.md
@@ -43,19 +43,6 @@ git clone -b v{{< param operatorVersion >}} https://github.com/CrunchyData/postg
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
@@ -152,4 +139,3 @@ pgo version
# pgo client version {{< param operatorVersion >}}
# pgo-apiserver version {{< param operatorVersion >}}
```
-
diff --git a/installers/olm/description.openshift.md b/installers/olm/description.openshift.md
index ad31cbe1e5..e4eb3c0831 100644
--- a/installers/olm/description.openshift.md
+++ b/installers/olm/description.openshift.md
@@ -63,20 +63,6 @@ edit `conf/postgres-operator/pgo.yaml` and set `DisableFSGroup` to `true`.
[Security Context Constraint]: https://docs.openshift.com/container-platform/latest/authentication/managing-security-context-constraints.html
-### 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][pgo-yaml-reference] is available in the documentation.
-
-[pgo-yaml-reference]: https://access.crunchydata.com/documentation/postgres-operator/${PGO_VERSION}/configuration/pgo-yaml-configuration/
-
-When the file is ready, upload the entire directory to the `pgo-config` ConfigMap.
-
-```
-oc -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
diff --git a/installers/olm/description.upstream.md b/installers/olm/description.upstream.md
index 8838098032..1e192fa9c2 100644
--- a/installers/olm/description.upstream.md
+++ b/installers/olm/description.upstream.md
@@ -56,20 +56,6 @@ git clone -b v${PGO_VERSION} https://github.com/CrunchyData/postgres-operator.gi
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][pgo-yaml-reference] is available in the documentation.
-
-[pgo-yaml-reference]: https://access.crunchydata.com/documentation/postgres-operator/${PGO_VERSION}/configuration/pgo-yaml-configuration/
-
-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
diff --git a/internal/config/pgoconfig.go b/internal/config/pgoconfig.go
index f951f77dee..7b4a162e3f 100644
--- a/internal/config/pgoconfig.go
+++ b/internal/config/pgoconfig.go
@@ -20,6 +20,7 @@ import (
"fmt"
"io/ioutil"
"os"
+ "path/filepath"
"strconv"
"strings"
"text/template"
@@ -28,6 +29,7 @@ import (
log "github.com/sirupsen/logrus"
v1 "k8s.io/api/core/v1"
+ kerrors "k8s.io/apimachinery/pkg/api/errors"
"k8s.io/apimachinery/pkg/api/resource"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/util/validation"
@@ -36,8 +38,7 @@ import (
)
const CustomConfigMapName = "pgo-config"
-const DefaultConfigsPath = "/default-pgo-config/"
-const CustomConfigsPath = "/pgo-config/"
+const defaultConfigPath = "/default-pgo-config/"
var PgoDefaultServiceAccountTemplate *template.Template
@@ -518,29 +519,17 @@ func (c *PgoConfig) GetStorageSpec(name string) (crv1.PgStorageSpec, error) {
func (c *PgoConfig) GetConfig(clientset kubernetes.Interface, namespace string) error {
- cMap, rootPath := getRootPath(clientset, namespace)
-
- var yamlFile []byte
- var err error
+ cMap, err := initialize(clientset, namespace)
//get the pgo.yaml config file
- if cMap != nil {
- str := cMap.Data[CONFIG_PATH]
- if str == "" {
- errMsg := fmt.Sprintf("could not get %s from ConfigMap", CONFIG_PATH)
- return errors.New(errMsg)
- }
- yamlFile = []byte(str)
- } else {
- yamlFile, err = ioutil.ReadFile(rootPath + CONFIG_PATH)
- if err != nil {
- log.Errorf("yamlFile.Get err #%v ", err)
- return err
- }
+ str := cMap.Data[CONFIG_PATH]
+ if str == "" {
+ return fmt.Errorf("could not get %s from ConfigMap", CONFIG_PATH)
}
- err = yaml.Unmarshal(yamlFile, c)
- if err != nil {
+ yamlFile := []byte(str)
+
+ if err := yaml.Unmarshal(yamlFile, c); err != nil {
log.Errorf("Unmarshal: %v", err)
return err
}
@@ -554,183 +543,183 @@ func (c *PgoConfig) GetConfig(clientset kubernetes.Interface, namespace string)
c.CheckEnv()
//load up all the templates
- PgoDefaultServiceAccountTemplate, err = c.LoadTemplate(cMap, rootPath, PGODefaultServiceAccountPath)
+ PgoDefaultServiceAccountTemplate, err = c.LoadTemplate(cMap, PGODefaultServiceAccountPath)
if err != nil {
return err
}
- PgoBackrestServiceAccountTemplate, err = c.LoadTemplate(cMap, rootPath, PGOBackrestServiceAccountPath)
+ PgoBackrestServiceAccountTemplate, err = c.LoadTemplate(cMap, PGOBackrestServiceAccountPath)
if err != nil {
return err
}
- PgoTargetServiceAccountTemplate, err = c.LoadTemplate(cMap, rootPath, PGOTargetServiceAccountPath)
+ PgoTargetServiceAccountTemplate, err = c.LoadTemplate(cMap, PGOTargetServiceAccountPath)
if err != nil {
return err
}
- PgoTargetRoleBindingTemplate, err = c.LoadTemplate(cMap, rootPath, PGOTargetRoleBindingPath)
+ PgoTargetRoleBindingTemplate, err = c.LoadTemplate(cMap, PGOTargetRoleBindingPath)
if err != nil {
return err
}
- PgoBackrestRoleTemplate, err = c.LoadTemplate(cMap, rootPath, PGOBackrestRolePath)
+ PgoBackrestRoleTemplate, err = c.LoadTemplate(cMap, PGOBackrestRolePath)
if err != nil {
return err
}
- PgoBackrestRoleBindingTemplate, err = c.LoadTemplate(cMap, rootPath, PGOBackrestRoleBindingPath)
+ PgoBackrestRoleBindingTemplate, err = c.LoadTemplate(cMap, PGOBackrestRoleBindingPath)
if err != nil {
return err
}
- PgoTargetRoleTemplate, err = c.LoadTemplate(cMap, rootPath, PGOTargetRolePath)
+ PgoTargetRoleTemplate, err = c.LoadTemplate(cMap, PGOTargetRolePath)
if err != nil {
return err
}
- PgoPgServiceAccountTemplate, err = c.LoadTemplate(cMap, rootPath, PGOPgServiceAccountPath)
+ PgoPgServiceAccountTemplate, err = c.LoadTemplate(cMap, PGOPgServiceAccountPath)
if err != nil {
return err
}
- PgoPgRoleTemplate, err = c.LoadTemplate(cMap, rootPath, PGOPgRolePath)
+ PgoPgRoleTemplate, err = c.LoadTemplate(cMap, PGOPgRolePath)
if err != nil {
return err
}
- PgoPgRoleBindingTemplate, err = c.LoadTemplate(cMap, rootPath, PGOPgRoleBindingPath)
+ PgoPgRoleBindingTemplate, err = c.LoadTemplate(cMap, PGOPgRoleBindingPath)
if err != nil {
return err
}
- PVCTemplate, err = c.LoadTemplate(cMap, rootPath, pvcPath)
+ PVCTemplate, err = c.LoadTemplate(cMap, pvcPath)
if err != nil {
return err
}
- PolicyJobTemplate, err = c.LoadTemplate(cMap, rootPath, policyJobTemplatePath)
+ PolicyJobTemplate, err = c.LoadTemplate(cMap, policyJobTemplatePath)
if err != nil {
return err
}
- ContainerResourcesTemplate, err = c.LoadTemplate(cMap, rootPath, containerResourcesTemplatePath)
+ ContainerResourcesTemplate, err = c.LoadTemplate(cMap, containerResourcesTemplatePath)
if err != nil {
return err
}
- PgoBackrestRepoServiceTemplate, err = c.LoadTemplate(cMap, rootPath, pgoBackrestRepoServiceTemplatePath)
+ PgoBackrestRepoServiceTemplate, err = c.LoadTemplate(cMap, pgoBackrestRepoServiceTemplatePath)
if err != nil {
return err
}
- PgoBackrestRepoTemplate, err = c.LoadTemplate(cMap, rootPath, pgoBackrestRepoTemplatePath)
+ PgoBackrestRepoTemplate, err = c.LoadTemplate(cMap, pgoBackrestRepoTemplatePath)
if err != nil {
return err
}
- PgmonitorEnvVarsTemplate, err = c.LoadTemplate(cMap, rootPath, pgmonitorEnvVarsPath)
+ PgmonitorEnvVarsTemplate, err = c.LoadTemplate(cMap, pgmonitorEnvVarsPath)
if err != nil {
return err
}
- PgbackrestEnvVarsTemplate, err = c.LoadTemplate(cMap, rootPath, pgbackrestEnvVarsPath)
+ PgbackrestEnvVarsTemplate, err = c.LoadTemplate(cMap, pgbackrestEnvVarsPath)
if err != nil {
return err
}
- PgbackrestS3EnvVarsTemplate, err = c.LoadTemplate(cMap, rootPath, pgbackrestS3EnvVarsPath)
+ PgbackrestS3EnvVarsTemplate, err = c.LoadTemplate(cMap, pgbackrestS3EnvVarsPath)
if err != nil {
return err
}
- PgAdminTemplate, err = c.LoadTemplate(cMap, rootPath, pgAdminTemplatePath)
+ PgAdminTemplate, err = c.LoadTemplate(cMap, pgAdminTemplatePath)
if err != nil {
return err
}
- PgAdminServiceTemplate, err = c.LoadTemplate(cMap, rootPath, pgAdminServiceTemplatePath)
+ PgAdminServiceTemplate, err = c.LoadTemplate(cMap, pgAdminServiceTemplatePath)
if err != nil {
return err
}
- PgbouncerTemplate, err = c.LoadTemplate(cMap, rootPath, pgbouncerTemplatePath)
+ PgbouncerTemplate, err = c.LoadTemplate(cMap, pgbouncerTemplatePath)
if err != nil {
return err
}
- PgbouncerConfTemplate, err = c.LoadTemplate(cMap, rootPath, pgbouncerConfTemplatePath)
+ PgbouncerConfTemplate, err = c.LoadTemplate(cMap, pgbouncerConfTemplatePath)
if err != nil {
return err
}
- PgbouncerUsersTemplate, err = c.LoadTemplate(cMap, rootPath, pgbouncerUsersTemplatePath)
+ PgbouncerUsersTemplate, err = c.LoadTemplate(cMap, pgbouncerUsersTemplatePath)
if err != nil {
return err
}
- PgbouncerHBATemplate, err = c.LoadTemplate(cMap, rootPath, pgbouncerHBATemplatePath)
+ PgbouncerHBATemplate, err = c.LoadTemplate(cMap, pgbouncerHBATemplatePath)
if err != nil {
return err
}
- ServiceTemplate, err = c.LoadTemplate(cMap, rootPath, serviceTemplatePath)
+ ServiceTemplate, err = c.LoadTemplate(cMap, serviceTemplatePath)
if err != nil {
return err
}
- RmdatajobTemplate, err = c.LoadTemplate(cMap, rootPath, rmdatajobPath)
+ RmdatajobTemplate, err = c.LoadTemplate(cMap, rmdatajobPath)
if err != nil {
return err
}
- BackrestjobTemplate, err = c.LoadTemplate(cMap, rootPath, backrestjobPath)
+ BackrestjobTemplate, err = c.LoadTemplate(cMap, backrestjobPath)
if err != nil {
return err
}
- BackrestRestorejobTemplate, err = c.LoadTemplate(cMap, rootPath, backrestRestorejobPath)
+ BackrestRestorejobTemplate, err = c.LoadTemplate(cMap, backrestRestorejobPath)
if err != nil {
return err
}
- PgDumpBackupJobTemplate, err = c.LoadTemplate(cMap, rootPath, pgDumpBackupJobPath)
+ PgDumpBackupJobTemplate, err = c.LoadTemplate(cMap, pgDumpBackupJobPath)
if err != nil {
return err
}
- PgRestoreJobTemplate, err = c.LoadTemplate(cMap, rootPath, pgRestoreJobPath)
+ PgRestoreJobTemplate, err = c.LoadTemplate(cMap, pgRestoreJobPath)
if err != nil {
return err
}
- PVCMatchLabelsTemplate, err = c.LoadTemplate(cMap, rootPath, pvcMatchLabelsPath)
+ PVCMatchLabelsTemplate, err = c.LoadTemplate(cMap, pvcMatchLabelsPath)
if err != nil {
return err
}
- PVCStorageClassTemplate, err = c.LoadTemplate(cMap, rootPath, pvcSCPath)
+ PVCStorageClassTemplate, err = c.LoadTemplate(cMap, pvcSCPath)
if err != nil {
return err
}
- AffinityTemplate, err = c.LoadTemplate(cMap, rootPath, affinityTemplatePath)
+ AffinityTemplate, err = c.LoadTemplate(cMap, affinityTemplatePath)
if err != nil {
return err
}
- PodAntiAffinityTemplate, err = c.LoadTemplate(cMap, rootPath, podAntiAffinityTemplatePath)
+ PodAntiAffinityTemplate, err = c.LoadTemplate(cMap, podAntiAffinityTemplatePath)
if err != nil {
return err
}
- ExporterTemplate, err = c.LoadTemplate(cMap, rootPath, exporterTemplatePath)
+ ExporterTemplate, err = c.LoadTemplate(cMap, exporterTemplatePath)
if err != nil {
return err
}
- BadgerTemplate, err = c.LoadTemplate(cMap, rootPath, badgerTemplatePath)
+ BadgerTemplate, err = c.LoadTemplate(cMap, badgerTemplatePath)
if err != nil {
return err
}
- DeploymentTemplate, err = c.LoadTemplate(cMap, rootPath, deploymentTemplatePath)
+ DeploymentTemplate, err = c.LoadTemplate(cMap, deploymentTemplatePath)
if err != nil {
return err
}
- BootstrapTemplate, err = c.LoadTemplate(cMap, rootPath, bootstrapTemplatePath)
+ BootstrapTemplate, err = c.LoadTemplate(cMap, bootstrapTemplatePath)
if err != nil {
return err
}
@@ -738,20 +727,71 @@ func (c *PgoConfig) GetConfig(clientset kubernetes.Interface, namespace string)
return nil
}
-func getRootPath(clientset kubernetes.Interface, namespace string) (*v1.ConfigMap, string) {
+// getOperatorConfigMap returns the config map that contains all of the
+// configuration for the Operator
+func getOperatorConfigMap(clientset kubernetes.Interface, namespace string) (*v1.ConfigMap, error) {
+ return clientset.CoreV1().ConfigMaps(namespace).Get(CustomConfigMapName, metav1.GetOptions{})
+}
+
+// initialize attemps to get the configuration ConfigMap based on a name.
+// If the ConfigMap does not exist, a ConfigMap is created from the default
+// configuration path
+func initialize(clientset kubernetes.Interface, namespace string) (*v1.ConfigMap, error) {
+ // if the ConfigMap exists, exit
+ if cm, err := getOperatorConfigMap(clientset, namespace); err == nil {
+ log.Infof("Config: %q ConfigMap found, using config files from the configmap", CustomConfigMapName)
+ return cm, nil
+ }
+
+ // otherwise, create a ConfigMap
+ log.Infof("Config: %q ConfigMap NOT found, creating ConfigMap from files from %q", CustomConfigMapName, defaultConfigPath)
+
+ cm := &v1.ConfigMap{
+ ObjectMeta: metav1.ObjectMeta{
+ Name: CustomConfigMapName,
+ },
+ Data: map[string]string{},
+ }
+
+ // get all of the file names that are in the default configuration directory
+ if err := filepath.Walk(defaultConfigPath, func(path string, info os.FileInfo, err error) error {
+ if err != nil {
+ return err
+ }
+
+ // skip if a directory
+ if info.IsDir() {
+ return nil
+ }
+
+ // get all of the contents of a default configuration and load it into
+ // a ConfigMap
+ if contents, err := ioutil.ReadFile(path); err != nil {
+ return err
+ } else {
+ cm.Data[info.Name()] = string(contents)
+ }
+
+ return nil
+ }); err != nil {
+ return nil, err
+ }
+
+ // create the ConfigMap. If the error is that the ConfigMap was already
+ // created, then grab the new ConfigMap
+ if _, err := clientset.CoreV1().ConfigMaps(namespace).Create(cm); err != nil {
+ if kerrors.IsAlreadyExists(err) {
+ return getOperatorConfigMap(clientset, namespace)
+ }
- cMap, err := clientset.CoreV1().ConfigMaps(namespace).Get(CustomConfigMapName, metav1.GetOptions{})
- if err == nil {
- log.Infof("Config: %s ConfigMap found, using config files from the configmap", CustomConfigMapName)
- return cMap, ""
+ return nil, err
}
- log.Infof("Config: %s ConfigMap NOT found, using default baked-in config files from %s", CustomConfigMapName, DefaultConfigsPath)
- return nil, DefaultConfigsPath
+ return cm, nil
}
// LoadTemplate will load a JSON template from a path
-func (c *PgoConfig) LoadTemplate(cMap *v1.ConfigMap, rootPath, path string) (*template.Template, error) {
+func (c *PgoConfig) LoadTemplate(cMap *v1.ConfigMap, path string) (*template.Template, error) {
var value string
var err error
@@ -781,7 +821,7 @@ func (c *PgoConfig) LoadTemplate(cMap *v1.ConfigMap, rootPath, path string) (*te
func (c *PgoConfig) DefaultTemplate(path string) (string, error) {
// set the lookup value for the file path based on the default configuration
// path and the template file requested to be loaded
- fullPath := DefaultConfigsPath + path
+ fullPath := defaultConfigPath + path
log.Debugf("No entry in cmap loading default path [%s]", fullPath)
From 2c318bacc6e65faa46be17d87469204a055bc421 Mon Sep 17 00:00:00 2001
From: "Jonathan S. Katz"
Date: Sun, 8 Nov 2020 17:59:15 -0500
Subject: [PATCH 017/129] Fix compilatino errors introduced from backpatch
REL_4_5 uses an older version of client-go for Kubernetes which
does not use contexts. Additionally, 8719ac76 leveraged some
functions that did not exist on REL_4_5 and as such the patch
was rewritten to use the existing functions.
Issue: [chch9510]
---
.../apiserver/clusterservice/clusterimpl.go | 2 +-
internal/apiserver/root.go | 20 +++++--------------
2 files changed, 6 insertions(+), 16 deletions(-)
diff --git a/internal/apiserver/clusterservice/clusterimpl.go b/internal/apiserver/clusterservice/clusterimpl.go
index 5d887eee60..8d166236f8 100644
--- a/internal/apiserver/clusterservice/clusterimpl.go
+++ b/internal/apiserver/clusterservice/clusterimpl.go
@@ -1012,7 +1012,7 @@ func CreateCluster(request *msgs.CreateClusterRequest, ns, pgouser string) msgs.
},
}
- if _, err := apiserver.Clientset.CoreV1().Secrets(ns).Create(ctx, secret, metav1.CreateOptions{}); err != nil && !kubeapi.IsAlreadyExists(err) {
+ if _, err := apiserver.Clientset.CoreV1().Secrets(ns).Create(secret); err != nil && !kubeapi.IsAlreadyExists(err) {
resp.Status.Code = msgs.Error
resp.Status.Msg = fmt.Sprintf("could not create backrest repo secret: %s", err)
return resp
diff --git a/internal/apiserver/root.go b/internal/apiserver/root.go
index 7cd28033f2..bff09ceb9d 100644
--- a/internal/apiserver/root.go
+++ b/internal/apiserver/root.go
@@ -35,7 +35,6 @@ import (
log "github.com/sirupsen/logrus"
corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- "k8s.io/apimachinery/pkg/types"
"k8s.io/client-go/kubernetes"
"k8s.io/client-go/rest"
)
@@ -511,17 +510,15 @@ func setNamespaceOperatingMode() error {
// namespace. If any have an empty password, it generates a random password,
// Base64 encodes it, then stores it in the relevant PGO user's secret
func setRandomPgouserPasswords() {
- ctx := context.TODO()
-
selector := "pgo-pgouser=true,vendor=crunchydata"
secrets, err := Clientset.CoreV1().Secrets(PgoNamespace).
- List(ctx, metav1.ListOptions{LabelSelector: selector})
+ List(metav1.ListOptions{LabelSelector: selector})
if err != nil {
log.Warnf("Could not get pgouser secrets in namespace: %s", PgoNamespace)
return
}
- for _, secret := range secrets.Items {
+ for i, secret := range secrets.Items {
// check if password is set. if it is, continue.
if len(secret.Data["password"]) > 0 {
continue
@@ -539,18 +536,11 @@ func setRandomPgouserPasswords() {
continue
}
- // create the password patch
- patch, err := kubeapi.NewMergePatch().Add("stringData", "password")(generatedPassword).Bytes()
-
- if err != nil {
- log.Errorf("Could not generate password patch for pgouser secret %s for operator installation "+
- "%s in namespace %s", secret.Name, InstallationName, PgoNamespace)
- continue
- }
+ // add the password to the secret
+ secrets.Items[i].Data["password"] = []byte(generatedPassword)
// patch the pgouser secret with the new password
- if _, err := Clientset.CoreV1().Secrets(PgoNamespace).Patch(ctx, secret.Name, types.MergePatchType,
- patch, metav1.PatchOptions{}); err != nil {
+ if _, err := Clientset.CoreV1().Secrets(PgoNamespace).Update(&secrets.Items[i]); err != nil {
log.Errorf("Could not patch pgouser secret %s with generated password for operator installation "+
"%s in namespace %s", secret.Name, InstallationName, PgoNamespace)
}
From 7c68baaaf2d36af9cbcd6018e9618725c628159a Mon Sep 17 00:00:00 2001
From: "Jonathan S. Katz"
Date: Mon, 9 Nov 2020 14:57:20 -0500
Subject: [PATCH 018/129] Reinstate the create-cluster directory in the Helm
example
For whatever reason, this was lost in backpatching.
---
examples/helm/create-cluster/.helmignore | 23 +++++
examples/helm/create-cluster/Chart.yaml | 23 +++++
.../helm/create-cluster/templates/NOTES.txt | 34 +++++++
.../create-cluster/templates/_helpers.tpl | 62 ++++++++++++
.../templates/backrest-repo-config.yaml | 16 ++++
.../templates/hippo-secret.yaml | 12 +++
.../create-cluster/templates/pgcluster.yaml | 95 +++++++++++++++++++
.../templates/postgres-secret.yaml | 12 +++
.../templates/primaryuser-secret.yaml | 12 +++
examples/helm/create-cluster/values.yaml | 17 ++++
10 files changed, 306 insertions(+)
create mode 100644 examples/helm/create-cluster/.helmignore
create mode 100644 examples/helm/create-cluster/Chart.yaml
create mode 100644 examples/helm/create-cluster/templates/NOTES.txt
create mode 100644 examples/helm/create-cluster/templates/_helpers.tpl
create mode 100644 examples/helm/create-cluster/templates/backrest-repo-config.yaml
create mode 100644 examples/helm/create-cluster/templates/hippo-secret.yaml
create mode 100644 examples/helm/create-cluster/templates/pgcluster.yaml
create mode 100644 examples/helm/create-cluster/templates/postgres-secret.yaml
create mode 100644 examples/helm/create-cluster/templates/primaryuser-secret.yaml
create mode 100644 examples/helm/create-cluster/values.yaml
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/backrest-repo-config.yaml b/examples/helm/create-cluster/templates/backrest-repo-config.yaml
new file mode 100644
index 0000000000..166d0b3dcd
--- /dev/null
+++ b/examples/helm/create-cluster/templates/backrest-repo-config.yaml
@@ -0,0 +1,16 @@
+apiVersion: v1
+data:
+ authorized_keys: {{ .Files.Get "certs/hippo-key.pub" | b64enc }}
+ config: SG9zdCAqClN0cmljdEhvc3RLZXlDaGVja2luZyBubwpJZGVudGl0eUZpbGUgL3RtcC9pZF9lZDI1NTE5ClBvcnQgMjAyMgpVc2VyIHBnYmFja3Jlc3QK
+ id_ed25519: {{ .Files.Get "certs/hippo-key" | b64enc }}
+ ssh_host_ed25519_key: {{ .Files.Get "certs/hippo-key" | b64enc }}
+ sshd_config: IwkkT3BlbkJTRDog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MAojUGVybWl0VHVubmVsIG5vCiNDaHJvb3REaXJlY3Rvcnkgbm9uZQojVmVyc2lvbkFkZGVuZHVtIG5vbmUKCiMgbm8gZGVmYXVsdCBiYW5uZXIgcGF0aAojQmFubmVyIG5vbmUKCiMgQWNjZXB0IGxvY2FsZS1yZWxhdGVkIGVudmlyb25tZW50IHZhcmlhYmxlcwpBY2NlcHRFbnYgTEFORyBMQ19DVFlQRSBMQ19OVU1FUklDIExDX1RJTUUgTENfQ09MTEFURSBMQ19NT05FVEFSWSBMQ19NRVNTQUdFUwpBY2NlcHRFbnYgTENfUEFQRVIgTENfTkFNRSBMQ19BRERSRVNTIExDX1RFTEVQSE9ORSBMQ19NRUFTVVJFTUVOVApBY2NlcHRFbnYgTENfSURFTlRJRklDQVRJT04gTENfQUxMIExBTkdVQUdFCkFjY2VwdEVudiBYTU9ESUZJRVJTCgojIG92ZXJyaWRlIGRlZmF1bHQgb2Ygbm8gc3Vic3lzdGVtcwpTdWJzeXN0ZW0Jc2Z0cAkvdXNyL2xpYmV4ZWMvb3BlbnNzaC9zZnRwLXNlcnZlcgoKIyBFeGFtcGxlIG9mIG92ZXJyaWRpbmcgc2V0dGluZ3Mgb24gYSBwZXItdXNlciBiYXNpcwojTWF0Y2ggVXNlciBhbm9uY3ZzCiMJWDExRm9yd2FyZGluZyBubwojCUFsbG93VGNwRm9yd2FyZGluZyBubwojCVBlcm1pdFRUWSBubwojCUZvcmNlQ29tbWFuZCBjdnMgc2VydmVyCg==
+kind: Secret
+metadata:
+ labels:
+ pg-cluster: {{ .Values.pgclustername }}
+ pgo-backrest-repo: "true"
+ vendor: crunchydata
+ name: {{ .Values.pgclustername }}-backrest-repo-config
+ namespace: {{ .Values.namespace }}
+type: Opaque
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..9dc5a4655d
--- /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.0
+ 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..09438cb745
--- /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: centos7-12.4-4.5.0
+namespace: pgo
+pgclustername: hippo
+pgoimageprefix: registry.developers.crunchydata.com/crunchydata
+pgoversion: 4.5.0
+hipposecretuser: "hippo"
+hipposecretpassword: "Supersecurepassword*"
+postgressecretuser: "postgres"
+postgressecretpassword: "Anothersecurepassword*"
+primaryusersecretuser: "primaryuser"
+primaryusersecretpassword: "Moresecurepassword*"
\ No newline at end of file
From 558d1b9a32df4863b26f351d9bf59148b9e61a6b Mon Sep 17 00:00:00 2001
From: "Jonathan S. Katz"
Date: Mon, 9 Nov 2020 15:01:08 -0500
Subject: [PATCH 019/129] Remove pgBackRest Secret creation from Helm chart
example
This is no longer needed, as the Operator will reconcile this
information if it is missing.
---
.../templates/backrest-repo-config.yaml | 16 ----------------
1 file changed, 16 deletions(-)
delete mode 100644 examples/helm/create-cluster/templates/backrest-repo-config.yaml
diff --git a/examples/helm/create-cluster/templates/backrest-repo-config.yaml b/examples/helm/create-cluster/templates/backrest-repo-config.yaml
deleted file mode 100644
index 166d0b3dcd..0000000000
--- a/examples/helm/create-cluster/templates/backrest-repo-config.yaml
+++ /dev/null
@@ -1,16 +0,0 @@
-apiVersion: v1
-data:
- authorized_keys: {{ .Files.Get "certs/hippo-key.pub" | b64enc }}
- config: SG9zdCAqClN0cmljdEhvc3RLZXlDaGVja2luZyBubwpJZGVudGl0eUZpbGUgL3RtcC9pZF9lZDI1NTE5ClBvcnQgMjAyMgpVc2VyIHBnYmFja3Jlc3QK
- id_ed25519: {{ .Files.Get "certs/hippo-key" | b64enc }}
- ssh_host_ed25519_key: {{ .Files.Get "certs/hippo-key" | b64enc }}
- sshd_config: IwkkT3BlbkJTRDogc3NoZF9jb25maWcsdiAxLjEwMCAyMDE2LzA4LzE1IDEyOjMyOjA0IG5hZGR5IEV4cCAkCgojIFRoaXMgaXMgdGhlIHNzaGQgc2VydmVyIHN5c3RlbS13aWRlIGNvbmZpZ3VyYXRpb24gZmlsZS4gIFNlZQojIHNzaGRfY29uZmlnKDUpIGZvciBtb3JlIGluZm9ybWF0aW9uLgoKIyBUaGlzIHNzaGQgd2FzIGNvbXBpbGVkIHdpdGggUEFUSD0vdXNyL2xvY2FsL2JpbjovdXNyL2JpbgoKIyBUaGUgc3RyYXRlZ3kgdXNlZCBmb3Igb3B0aW9ucyBpbiB0aGUgZGVmYXVsdCBzc2hkX2NvbmZpZyBzaGlwcGVkIHdpdGgKIyBPcGVuU1NIIGlzIHRvIHNwZWNpZnkgb3B0aW9ucyB3aXRoIHRoZWlyIGRlZmF1bHQgdmFsdWUgd2hlcmUKIyBwb3NzaWJsZSwgYnV0IGxlYXZlIHRoZW0gY29tbWVudGVkLiAgVW5jb21tZW50ZWQgb3B0aW9ucyBvdmVycmlkZSB0aGUKIyBkZWZhdWx0IHZhbHVlLgoKIyBJZiB5b3Ugd2FudCB0byBjaGFuZ2UgdGhlIHBvcnQgb24gYSBTRUxpbnV4IHN5c3RlbSwgeW91IGhhdmUgdG8gdGVsbAojIFNFTGludXggYWJvdXQgdGh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CUFsbG93VGNwRm9yd2FyZGluZyBubwojCVBlcm1pdFRUWSBubwojCUZvcmNlQ29tbWFuZCBjdnMgc2VydmVyCg==
-kind: Secret
-metadata:
- labels:
- pg-cluster: {{ .Values.pgclustername }}
- pgo-backrest-repo: "true"
- vendor: crunchydata
- name: {{ .Values.pgclustername }}-backrest-repo-config
- namespace: {{ .Values.namespace }}
-type: Opaque
From b1118b5308b2ddeba0595092190efea76098d1f6 Mon Sep 17 00:00:00 2001
From: "Jonathan S. Katz"
Date: Mon, 9 Nov 2020 18:11:57 -0500
Subject: [PATCH 020/129] Indicate support for PL/Perl
PL/Perl support was added to the PostGIS-enabled containers, as
such, the Operator can now support it.
Issue: CrunchyData/crunchy-containers#1287
---
README.md | 1 +
docs/content/_index.md | 1 +
2 files changed, 2 insertions(+)
diff --git a/README.md b/README.md
index 86704fd5ba..664f4cd204 100644
--- a/README.md
+++ b/README.md
@@ -189,6 +189,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)
diff --git a/docs/content/_index.md b/docs/content/_index.md
index f83a7c49e1..b879f3db2a 100644
--- a/docs/content/_index.md
+++ b/docs/content/_index.md
@@ -104,6 +104,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)
From 1b1708d842b4d2a02797cd7c255aea0394d6c64c Mon Sep 17 00:00:00 2001
From: "Jonathan S. Katz"
Date: Tue, 10 Nov 2020 08:34:09 -0500
Subject: [PATCH 021/129] Add explanation for transient monitoring issue
This issue only occurs during the initialization phase of a
PostgreSQL cluster, but can be confusing as it indicates there
is an error.
Issue: #1962
---
docs/content/tutorial/create-cluster.md | 23 ++++++++++++++++++++++
docs/content/tutorial/customize-cluster.md | 23 ++++++++++++++++++++++
2 files changed, 46 insertions(+)
diff --git a/docs/content/tutorial/create-cluster.md b/docs/content/tutorial/create-cluster.md
index eeb798faf5..423f0a4dbb 100644
--- a/docs/content/tutorial/create-cluster.md
+++ b/docs/content/tutorial/create-cluster.md
@@ -120,6 +120,29 @@ 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.
+
## 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!
From bcd02e5a19aafca1d0d39026056a9477dc41bb48 Mon Sep 17 00:00:00 2001
From: "Jonathan S. Katz"
Date: Tue, 10 Nov 2020 09:12:40 -0500
Subject: [PATCH 022/129] Bump to v4.5.1
---
Makefile | 4 +-
README.md | 2 +-
bin/push-ccp-to-gcr.sh | 2 +-
conf/postgres-operator/pgo.yaml | 4 +-
docs/config.toml | 16 ++++----
docs/content/Configuration/compatibility.md | 10 ++++-
docs/content/releases/4.5.1.md | 38 +++++++++++++++++++
docs/content/tutorial/pgbouncer.md | 2 +-
examples/create-by-resource/fromcrd.json | 6 +--
examples/envs.sh | 2 +-
.../create-cluster/templates/pgcluster.yaml | 2 +-
examples/helm/create-cluster/values.yaml | 4 +-
installers/ansible/README.md | 2 +-
installers/ansible/values.yaml | 6 +--
installers/gcp-marketplace/Makefile | 2 +-
installers/gcp-marketplace/README.md | 2 +-
installers/gcp-marketplace/values.yaml | 6 +--
installers/helm/Chart.yaml | 2 +-
installers/helm/values.yaml | 6 +--
installers/kubectl/client-setup.sh | 2 +-
.../kubectl/postgres-operator-ocp311.yml | 8 ++--
installers/kubectl/postgres-operator.yml | 8 ++--
installers/metrics/ansible/README.md | 2 +-
installers/metrics/helm/Chart.yaml | 2 +-
installers/metrics/helm/helm_template.yaml | 2 +-
installers/metrics/helm/values.yaml | 2 +-
.../postgres-operator-metrics-ocp311.yml | 2 +-
.../kubectl/postgres-operator-metrics.yml | 2 +-
installers/olm/Makefile | 4 +-
pkg/apis/crunchydata.com/v1/doc.go | 8 ++--
pkg/apiservermsgs/common.go | 2 +-
redhat/atomic/help.1 | 2 +-
redhat/atomic/help.md | 2 +-
33 files changed, 106 insertions(+), 60 deletions(-)
create mode 100644 docs/content/releases/4.5.1.md
diff --git a/Makefile b/Makefile
index d0caa5ed40..413a6a8181 100644
--- a/Makefile
+++ b/Makefile
@@ -9,9 +9,9 @@ PGO_CMD ?= kubectl
PGO_IMAGE_PREFIX ?= crunchydata
PGO_IMAGE_TAG ?= $(PGO_BASEOS)-$(PGO_VERSION)
PGO_OPERATOR_NAMESPACE ?= pgo
-PGO_VERSION ?= 4.5.0
+PGO_VERSION ?= 4.5.1
PGO_PG_VERSION ?= 12
-PGO_PG_FULLVERSION ?= 12.4
+PGO_PG_FULLVERSION ?= 12.5
PGO_BACKREST_VERSION ?= 2.29
PACKAGER ?= yum
diff --git a/README.md b/README.md
index 664f4cd204..0a2784b7d6 100644
--- a/README.md
+++ b/README.md
@@ -161,7 +161,7 @@ Based on your storage settings in your Kubernetes environment, you may be able t
```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.1/installers/kubectl/postgres-operator.yml
```
Otherwise, we highly recommend following the instructions from our [Quickstart](https://access.crunchydata.com/documentation/postgres-operator/latest/quickstart/).
diff --git a/bin/push-ccp-to-gcr.sh b/bin/push-ccp-to-gcr.sh
index 3b9de84ed0..59e2e329e8 100755
--- a/bin/push-ccp-to-gcr.sh
+++ b/bin/push-ccp-to-gcr.sh
@@ -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=centos7-12.5-4.5.1
IMAGES=(
crunchy-prometheus
diff --git a/conf/postgres-operator/pgo.yaml b/conf/postgres-operator/pgo.yaml
index ff5c97ec7f..622fc268f8 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: centos7-12.5-4.5.1
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: centos7-4.5.1
diff --git a/docs/config.toml b/docs/config.toml
index 48ef2d760d..dc39d49daa 100644
--- a/docs/config.toml
+++ b/docs/config.toml
@@ -25,14 +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.1"
+postgresVersion = "12.5"
+postgresVersion13 = "13.1"
+postgresVersion12 = "12.5"
+postgresVersion11 = "11.10"
+postgresVersion10 = "10.15"
+postgresVersion96 = "9.6.20"
+postgresVersion95 = "9.5.24"
postgisVersion = "3.0"
centosBase = "centos7"
diff --git a/docs/content/Configuration/compatibility.md b/docs/content/Configuration/compatibility.md
index b805ef9c08..43af7021db 100644
--- a/docs/content/Configuration/compatibility.md
+++ b/docs/content/Configuration/compatibility.md
@@ -12,7 +12,15 @@ 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.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/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/tutorial/pgbouncer.md b/docs/content/tutorial/pgbouncer.md
index 89ba8ce993..0349ff1eaf 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.5, server 1.14.0/bouncer)
Type "help" for help.
pgbouncer=#
diff --git a/examples/create-by-resource/fromcrd.json b/examples/create-by-resource/fromcrd.json
index 987ec53d55..ea603808ac 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.1",
"pgouser": "pgoadmin",
"primary": "true"
},
@@ -62,7 +62,7 @@
},
"backrestResources": {},
"ccpimage": "crunchy-postgres-ha",
- "ccpimagetag": "centos7-12.4-4.5.0",
+ "ccpimagetag": "centos7-12.5-4.5.1",
"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.1",
"pgouser": "pgoadmin",
"pgo-backrest": "true"
},
diff --git a/examples/envs.sh b/examples/envs.sh
index 86bde3cde3..b17080fb17 100644
--- a/examples/envs.sh
+++ b/examples/envs.sh
@@ -23,7 +23,7 @@ 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_VERSION=4.5.1
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/create-cluster/templates/pgcluster.yaml b/examples/helm/create-cluster/templates/pgcluster.yaml
index 9dc5a4655d..0852b1f447 100644
--- a/examples/helm/create-cluster/templates/pgcluster.yaml
+++ b/examples/helm/create-cluster/templates/pgcluster.yaml
@@ -13,7 +13,7 @@ metadata:
pg-cluster: {{ .Values.pgclustername }}
pg-pod-anti-affinity: ""
pgo-backrest: "true"
- pgo-version: 4.5.0
+ pgo-version: 4.5.1
pgouser: admin
name: {{ .Values.pgclustername }}
namespace: {{ .Values.namespace }}
diff --git a/examples/helm/create-cluster/values.yaml b/examples/helm/create-cluster/values.yaml
index 09438cb745..4add0e560f 100644
--- a/examples/helm/create-cluster/values.yaml
+++ b/examples/helm/create-cluster/values.yaml
@@ -4,11 +4,11 @@
# The values is for the namespace and the postgresql cluster name
ccpimage: crunchy-postgres-ha
ccpimageprefix: registry.developers.crunchydata.com/crunchydata
-ccpimagetag: centos7-12.4-4.5.0
+ccpimagetag: centos7-12.5-4.5.1
namespace: pgo
pgclustername: hippo
pgoimageprefix: registry.developers.crunchydata.com/crunchydata
-pgoversion: 4.5.0
+pgoversion: 4.5.1
hipposecretuser: "hippo"
hipposecretpassword: "Supersecurepassword*"
postgressecretuser: "postgres"
diff --git a/installers/ansible/README.md b/installers/ansible/README.md
index a9f0babd16..345d035037 100644
--- a/installers/ansible/README.md
+++ b/installers/ansible/README.md
@@ -4,7 +4,7 @@
-Latest Release: 4.5.0
+Latest Release: 4.5.1
## General
diff --git a/installers/ansible/values.yaml b/installers/ansible/values.yaml
index 4eb672bcec..ebce0ed751 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: "centos7-12.5-4.5.1"
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.1"
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: "centos7-4.5.1"
pgo_installation_name: "devtest"
pgo_noauth_routes: ""
pgo_operator_namespace: "pgo"
diff --git a/installers/gcp-marketplace/Makefile b/installers/gcp-marketplace/Makefile
index 5f4f0c6eb1..f10f5b7c27 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.1
IMAGE_BUILD_ARGS = --build-arg MARKETPLACE_VERSION='$(MARKETPLACE_VERSION)' \
--build-arg PGO_VERSION='$(PGO_VERSION)'
diff --git a/installers/gcp-marketplace/README.md b/installers/gcp-marketplace/README.md
index fd686764ad..af2e60f80c 100644
--- a/installers/gcp-marketplace/README.md
+++ b/installers/gcp-marketplace/README.md
@@ -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.1
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/values.yaml b/installers/gcp-marketplace/values.yaml
index cb0840b35b..e2ed852df1 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: "centos7-12.5-4.5.1"
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.1"
pgo_image_prefix: "registry.developers.crunchydata.com/crunchydata"
-pgo_image_tag: "centos7-4.5.0"
+pgo_image_tag: "centos7-4.5.1"
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..e7a55444cb 100644
--- a/installers/helm/Chart.yaml
+++ b/installers/helm/Chart.yaml
@@ -3,7 +3,7 @@ name: postgres-operator
description: Crunchy PostgreSQL Operator Helm chart for Kubernetes
type: application
version: 0.1.0
-appVersion: 4.5.0
+appVersion: 4.5.1
home: https://github.com/CrunchyData/postgres-operator
icon: https://github.com/CrunchyData/postgres-operator/raw/master/crunchy_logo.png
keywords:
diff --git a/installers/helm/values.yaml b/installers/helm/values.yaml
index 649436e0af..b2c5d441b2 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: "centos7-12.5-4.5.1"
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.1"
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: "centos7-4.5.1"
pgo_installation_name: "devtest"
pgo_noauth_routes: ""
pgo_operator_namespace: "pgo"
diff --git a/installers/kubectl/client-setup.sh b/installers/kubectl/client-setup.sh
index 6956d63f6b..496f25abd4 100755
--- a/installers/kubectl/client-setup.sh
+++ b/installers/kubectl/client-setup.sh
@@ -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.1}"
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..977c9ea790 100644
--- a/installers/kubectl/postgres-operator-ocp311.yml
+++ b/installers/kubectl/postgres-operator-ocp311.yml
@@ -44,7 +44,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: "centos7-12.5-4.5.1"
create_rbac: "true"
crunchy_debug: "false"
db_name: ""
@@ -77,14 +77,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.1"
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: "centos7-4.5.1"
pgo_installation_name: "devtest"
pgo_noauth_routes: ""
pgo_operator_namespace: "pgo"
@@ -161,7 +161,7 @@ spec:
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:centos7-4.5.1
imagePullPolicy: IfNotPresent
env:
- name: DEPLOY_ACTION
diff --git a/installers/kubectl/postgres-operator.yml b/installers/kubectl/postgres-operator.yml
index 2b516ef2ca..971e436d20 100644
--- a/installers/kubectl/postgres-operator.yml
+++ b/installers/kubectl/postgres-operator.yml
@@ -138,7 +138,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: "centos7-12.5-4.5.1"
create_rbac: "true"
crunchy_debug: "false"
db_name: ""
@@ -171,14 +171,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.1"
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: "centos7-4.5.1"
pgo_installation_name: "devtest"
pgo_noauth_routes: ""
pgo_operator_namespace: "pgo"
@@ -268,7 +268,7 @@ spec:
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:centos7-4.5.1
imagePullPolicy: IfNotPresent
env:
- name: DEPLOY_ACTION
diff --git a/installers/metrics/ansible/README.md b/installers/metrics/ansible/README.md
index 1c047d1a85..57f68cd878 100644
--- a/installers/metrics/ansible/README.md
+++ b/installers/metrics/ansible/README.md
@@ -4,7 +4,7 @@
-Latest Release: 4.5.0
+Latest Release: 4.5.1
## General
diff --git a/installers/metrics/helm/Chart.yaml b/installers/metrics/helm/Chart.yaml
index 603cab3982..520204c2d1 100644
--- a/installers/metrics/helm/Chart.yaml
+++ b/installers/metrics/helm/Chart.yaml
@@ -3,6 +3,6 @@ name: postgres-operator-monitoring
description: Install for Crunchy PostgreSQL Operator Monitoring
type: application
version: 0.1.0
-appVersion: 4.5.0
+appVersion: 4.5.1
home: https://github.com/CrunchyData/postgres-operator
icon: https://github.com/CrunchyData/postgres-operator/raw/master/crunchy_logo.png
\ No newline at end of file
diff --git a/installers/metrics/helm/helm_template.yaml b/installers/metrics/helm/helm_template.yaml
index d5e346dbc7..b328adba55 100644
--- a/installers/metrics/helm/helm_template.yaml
+++ b/installers/metrics/helm/helm_template.yaml
@@ -20,5 +20,5 @@ serviceAccount:
# the image prefix and tag to use for the 'pgo-deployer' container
pgo_image_prefix: "registry.developers.crunchydata.com/crunchydata"
-pgo_image_tag: "centos7-4.5.0"
+pgo_image_tag: "centos7-4.5.1"
diff --git a/installers/metrics/helm/values.yaml b/installers/metrics/helm/values.yaml
index 9f2ecefb63..616001b5ec 100644
--- a/installers/metrics/helm/values.yaml
+++ b/installers/metrics/helm/values.yaml
@@ -20,7 +20,7 @@ serviceAccount:
# the image prefix and tag to use for the 'pgo-deployer' container
pgo_image_prefix: "registry.developers.crunchydata.com/crunchydata"
-pgo_image_tag: "centos7-4.5.0"
+pgo_image_tag: "centos7-4.5.1"
# =====================
# Configuration Options
diff --git a/installers/metrics/kubectl/postgres-operator-metrics-ocp311.yml b/installers/metrics/kubectl/postgres-operator-metrics-ocp311.yml
index ca4daafd16..f4643fc126 100644
--- a/installers/metrics/kubectl/postgres-operator-metrics-ocp311.yml
+++ b/installers/metrics/kubectl/postgres-operator-metrics-ocp311.yml
@@ -96,7 +96,7 @@ spec:
restartPolicy: Never
containers:
- name: pgo-metrics-deploy
- image: registry.developers.crunchydata.com/crunchydata/pgo-deployer:centos7-4.5.0
+ image: registry.developers.crunchydata.com/crunchydata/pgo-deployer:centos7-4.5.1
imagePullPolicy: IfNotPresent
env:
- name: DEPLOY_ACTION
diff --git a/installers/metrics/kubectl/postgres-operator-metrics.yml b/installers/metrics/kubectl/postgres-operator-metrics.yml
index e1cc94fd5a..313698aaeb 100644
--- a/installers/metrics/kubectl/postgres-operator-metrics.yml
+++ b/installers/metrics/kubectl/postgres-operator-metrics.yml
@@ -165,7 +165,7 @@ spec:
restartPolicy: Never
containers:
- name: pgo-metrics-deploy
- image: registry.developers.crunchydata.com/crunchydata/pgo-deployer:centos7-4.5.0
+ image: registry.developers.crunchydata.com/crunchydata/pgo-deployer:centos7-4.5.1
imagePullPolicy: IfNotPresent
env:
- name: DEPLOY_ACTION
diff --git a/installers/olm/Makefile b/installers/olm/Makefile
index 3b8884bf78..41ee2405b2 100644
--- a/installers/olm/Makefile
+++ b/installers/olm/Makefile
@@ -2,7 +2,7 @@
.SUFFIXES:
CCP_IMAGE_PREFIX ?= registry.developers.crunchydata.com/crunchydata
-CCP_PG_FULLVERSION ?= 12.4
+CCP_PG_FULLVERSION ?= 12.5
CCP_POSTGIS_VERSION ?= 3.0
KUBECONFIG ?= $(HOME)/.kube/config
OLM_SDK_VERSION ?= 0.15.1
@@ -10,7 +10,7 @@ OLM_TOOLS ?= registry.localhost:5000/postgres-operator-olm-tools:$(OLM_SDK_VERSI
OLM_VERSION ?= 0.15.1
PGO_BASEOS ?= centos7
PGO_IMAGE_PREFIX ?= registry.developers.crunchydata.com/crunchydata
-PGO_VERSION ?= 4.5.0
+PGO_VERSION ?= 4.5.1
PGO_IMAGE_TAG ?= $(PGO_BASEOS)-$(PGO_VERSION)
CCP_IMAGE_TAG ?= $(PGO_BASEOS)-$(CCP_PG_FULLVERSION)-$(PGO_VERSION)
CCP_POSTGIS_IMAGE_TAG ?= $(PGO_BASEOS)-$(CCP_PG_FULLVERSION)-$(CCP_POSTGIS_VERSION)-$(PGO_VERSION)
diff --git a/pkg/apis/crunchydata.com/v1/doc.go b/pkg/apis/crunchydata.com/v1/doc.go
index 3d5c49cd25..4c793e782f 100644
--- a/pkg/apis/crunchydata.com/v1/doc.go
+++ b/pkg/apis/crunchydata.com/v1/doc.go
@@ -53,7 +53,7 @@ cluster.
curl --cacert $PGO_CA_CERT --key $PGO_CLIENT_KEY --cert $PGO_CA_CERT -u \
admin:examplepassword -H "Content-Type:application/json" --insecure -X \
POST --data \
- '{"ClientVersion":"4.5.0",
+ '{"ClientVersion":"4.5.1",
"Namespace":"pgouser1",
"Name":"mycluster",
$PGO_APISERVER_URL/clusters
@@ -72,7 +72,7 @@ show all of the clusters that are in the given namespace.
curl --cacert $PGO_CA_CERT --key $PGO_CLIENT_KEY --cert $PGO_CA_CERT -u \
admin:examplepassword -H "Content-Type:application/json" --insecure -X \
POST --data \
- '{"ClientVersion":"4.5.0",
+ '{"ClientVersion":"4.5.1",
"Namespace":"pgouser1",
"Clustername":"mycluster"}' \
$PGO_APISERVER_URL/showclusters
@@ -82,7 +82,7 @@ $PGO_APISERVER_URL/showclusters
curl --cacert $PGO_CA_CERT --key $PGO_CLIENT_KEY --cert $PGO_CA_CERT -u \
admin:examplepassword -H "Content-Type:application/json" --insecure -X \
POST --data \
- '{"ClientVersion":"4.5.0",
+ '{"ClientVersion":"4.5.1",
"Namespace":"pgouser1",
"Clustername":"mycluster"}' \
$PGO_APISERVER_URL/clustersdelete
@@ -90,7 +90,7 @@ $PGO_APISERVER_URL/clustersdelete
Schemes: http, https
BasePath: /
- Version: 4.5.0
+ Version: 4.5.1
License: Apache 2.0 http://www.apache.org/licenses/LICENSE-2.0
Contact: Crunchy Data https://www.crunchydata.com/
diff --git a/pkg/apiservermsgs/common.go b/pkg/apiservermsgs/common.go
index cce7f6be40..093405b4fd 100644
--- a/pkg/apiservermsgs/common.go
+++ b/pkg/apiservermsgs/common.go
@@ -15,7 +15,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
-const PGO_VERSION = "4.5.0"
+const PGO_VERSION = "4.5.1"
// Ok status
const Ok = "ok"
diff --git a/redhat/atomic/help.1 b/redhat/atomic/help.1
index bc21518dd8..6f9bfad143 100644
--- a/redhat/atomic/help.1
+++ b/redhat/atomic/help.1
@@ -56,4 +56,4 @@ The Red Hat Enterprise Linux version from which the container was built. For exa
\fB\fCRelease=\fR
.PP
-The specific release number of the container. For example, Release="4.5.0"
+The specific release number of the container. For example, Release="4.5.1"
diff --git a/redhat/atomic/help.md b/redhat/atomic/help.md
index 8950e24d47..1a12dbc144 100644
--- a/redhat/atomic/help.md
+++ b/redhat/atomic/help.md
@@ -45,4 +45,4 @@ The Red Hat Enterprise Linux version from which the container was built. For exa
`Release=`
-The specific release number of the container. For example, Release="4.5.0"
+The specific release number of the container. For example, Release="4.5.1"
From 2335a0003f8b8b4ae37d8b527356d7df95aef253 Mon Sep 17 00:00:00 2001
From: "Jonathan S. Katz"
Date: Sun, 15 Nov 2020 14:14:49 -0500
Subject: [PATCH 023/129] Tighter check for replica service in `pgo test`
The check looked to see if the word "replica" existed in one
of the Service Labels, when really we shold be checking for a
suffix of "replica".
Issue: [ch9764]
Issue: #2047
---
internal/apiserver/clusterservice/clusterimpl.go | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/internal/apiserver/clusterservice/clusterimpl.go b/internal/apiserver/clusterservice/clusterimpl.go
index 8d166236f8..1da1b65124 100644
--- a/internal/apiserver/clusterservice/clusterimpl.go
+++ b/internal/apiserver/clusterservice/clusterimpl.go
@@ -484,7 +484,7 @@ func TestCluster(name, selector, ns, pgouser string, allFlag bool) msgs.ClusterT
switch {
default:
endpoint.InstanceType = msgs.ClusterTestInstanceTypePrimary
- case strings.Contains(service.Name, msgs.PodTypeReplica):
+ case strings.HasSuffix(service.Name, msgs.PodTypeReplica):
endpoint.InstanceType = msgs.ClusterTestInstanceTypeReplica
case service.Pgbouncer:
endpoint.InstanceType = msgs.ClusterTestInstanceTypePGBouncer
From 6d7b39d0b4e995b0b93599726971fae6b6c15c73 Mon Sep 17 00:00:00 2001
From: "Jonathan S. Katz"
Date: Mon, 16 Nov 2020 09:40:22 -0500
Subject: [PATCH 024/129] Update OLM installation instructions template
This updates a few of the OLM installation instruction steps
so that the dependency on `git` is removed, replaced by `curl`
to get the exact files from the repository that are needed.
---
installers/olm/description.openshift.md | 32 +++++++++++++------------
installers/olm/description.upstream.md | 32 +++++++++++++------------
2 files changed, 34 insertions(+), 30 deletions(-)
diff --git a/installers/olm/description.openshift.md b/installers/olm/description.openshift.md
index e4eb3c0831..76be0028da 100644
--- a/installers/olm/description.openshift.md
+++ b/installers/olm/description.openshift.md
@@ -49,13 +49,6 @@ export PGO_OPERATOR_NAMESPACE=pgo
oc create namespace "$PGO_OPERATOR_NAMESPACE"
```
-Next, clone the PostgreSQL Operator repository locally.
-
-```
-git clone -b v${PGO_VERSION} https://github.com/CrunchyData/postgres-operator.git
-cd postgres-operator
-```
-
### Security
For the PostgreSQL Operator and PostgreSQL clusters to run in the recommended `restricted` [Security Context Constraint][],
@@ -69,19 +62,23 @@ Configure pgBackRest for your environment. If you do not plan to use AWS S3 to s
the `aws-s3` keys below.
```
+curl https://raw.githubusercontent.com/CrunchyData/postgres-operator/v${PGO_VERSION}/installers/ansible/roles/pgo-operator/files/pgo-backrest-repo/config > config
+curl https://raw.githubusercontent.com/CrunchyData/postgres-operator/v${PGO_VERSION}/installers/ansible/roles/pgo-operator/files/pgo-backrest-repo/sshd_config > sshd_config
+curl https://raw.githubusercontent.com/CrunchyData/postgres-operator/v${PGO_VERSION}/installers/ansible/roles/pgo-operator/files/pgo-backrest-repo/aws-s3-ca.crt > aws-s3-ca.crt
+
oc -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-file=./config \
+ --from-file=./sshd_config \
+ --from-file=./aws-s3-ca.crt \
--from-literal=aws-s3-key="" \
--from-literal=aws-s3-key-secret=""
```
### Certificates (optional)
-The PostgreSQL Operator 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.
+The PostgreSQL Operator has an API that uses TLS to communicate securely with clients. If one is not provided, the API will automatically generated one for you.
+
+If you have a certificate bundle validated by your organization, you can install it now.
```
oc -n "$PGO_OPERATOR_NAMESPACE" create secret tls pgo.tls \
@@ -102,8 +99,13 @@ to use the [PostgreSQL Operator Client][pgo-client].
Install the first set of client credentials and download the `pgo` binary and client certificates.
```
-PGO_CMD=oc ./deploy/install-bootstrap-creds.sh
-PGO_CMD=oc ./installers/kubectl/client-setup.sh
+curl https://raw.githubusercontent.com/CrunchyData/postgres-operator/v${PGO_VERSION}/deploy/install-bootstrap-creds.sh > install-bootstrap-creds.sh
+curl https://raw.githubusercontent.com/CrunchyData/postgres-operator/v${PGO_VERSION}/installers/kubectl/client-setup.sh > client-setup.sh
+
+chmod +x install-bootstrap-creds.sh client-setup.sh
+
+PGO_CMD=oc ./install-bootstrap-creds.sh
+PGO_CMD=oc ./client-setup.sh
```
The client needs to be able to reach the PostgreSQL Operator API from outside the OpenShift cluster.
diff --git a/installers/olm/description.upstream.md b/installers/olm/description.upstream.md
index 1e192fa9c2..7d1dcce69d 100644
--- a/installers/olm/description.upstream.md
+++ b/installers/olm/description.upstream.md
@@ -49,32 +49,29 @@ export PGO_OPERATOR_NAMESPACE=pgo
kubectl create namespace "$PGO_OPERATOR_NAMESPACE"
```
-Next, clone the PostgreSQL Operator repository locally.
-
-```
-git clone -b v${PGO_VERSION} https://github.com/CrunchyData/postgres-operator.git
-cd 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.
```
+curl https://raw.githubusercontent.com/CrunchyData/postgres-operator/v${PGO_VERSION}/installers/ansible/roles/pgo-operator/files/pgo-backrest-repo/config > config
+curl https://raw.githubusercontent.com/CrunchyData/postgres-operator/v${PGO_VERSION}/installers/ansible/roles/pgo-operator/files/pgo-backrest-repo/sshd_config > sshd_config
+curl https://raw.githubusercontent.com/CrunchyData/postgres-operator/v${PGO_VERSION}/installers/ansible/roles/pgo-operator/files/pgo-backrest-repo/aws-s3-ca.crt > aws-s3-ca.crt
+
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-file=./config \
+ --from-file=./sshd_config \
+ --from-file=./aws-s3-ca.crt \
--from-literal=aws-s3-key="" \
--from-literal=aws-s3-key-secret=""
```
### Certificates (optional)
-The PostgreSQL Operator 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.
+The PostgreSQL Operator has an API that uses TLS to communicate securely with clients. If one is not provided, the API will automatically generated one for you.
+
+If you have a certificate bundle validated by your organization, you can install it now.
```
kubectl -n "$PGO_OPERATOR_NAMESPACE" create secret tls pgo.tls \
@@ -95,8 +92,13 @@ to use the [PostgreSQL Operator Client][pgo-client].
Install the first set of client credentials and download the `pgo` binary and client certificates.
```
-PGO_CMD=kubectl ./deploy/install-bootstrap-creds.sh
-PGO_CMD=kubectl ./installers/kubectl/client-setup.sh
+curl https://raw.githubusercontent.com/CrunchyData/postgres-operator/v${PGO_VERSION}/deploy/install-bootstrap-creds.sh > install-bootstrap-creds.sh
+curl https://raw.githubusercontent.com/CrunchyData/postgres-operator/v${PGO_VERSION}/installers/kubectl/client-setup.sh > client-setup.sh
+
+chmod +x install-bootstrap-creds.sh client-setup.sh
+
+PGO_CMD=kubectl ./install-bootstrap-creds.sh
+PGO_CMD=kubectl ./client-setup.sh
```
The client needs to be able to reach the PostgreSQL Operator API from outside the Kubernetes cluster.
From d78454e410d9b073962640356b2e7cbb0fb0a186 Mon Sep 17 00:00:00 2001
From: "Jonathan S. Katz"
Date: Tue, 17 Nov 2020 21:48:16 -0500
Subject: [PATCH 025/129] Provide clarity on retrieving credentials for
standbys
The `pgo show user` command has a `--show-system-accounts` flag
for retrieving the credentials of system accounts (e.g. superuser,
replication users, etc.), which can be helpful when setting up
standby clusters.
Issue: #2053
---
.../high-availability/multi-cluster-kubernetes.md | 11 +++++++++++
docs/content/pgo-client/common-tasks.md | 8 ++++++++
2 files changed, 19 insertions(+)
diff --git a/docs/content/architecture/high-availability/multi-cluster-kubernetes.md b/docs/content/architecture/high-availability/multi-cluster-kubernetes.md
index c6043adba4..f2be1e03c5 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.
diff --git a/docs/content/pgo-client/common-tasks.md b/docs/content/pgo-client/common-tasks.md
index a2ea5d1efe..2c58209937 100644
--- a/docs/content/pgo-client/common-tasks.md
+++ b/docs/content/pgo-client/common-tasks.md
@@ -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
From 9e22fcec9fa442a1724314c0ba69448301ab955f Mon Sep 17 00:00:00 2001
From: "Jonathan S. Katz"
Date: Fri, 20 Nov 2020 13:35:37 -0500
Subject: [PATCH 026/129] Add command defaults to some of the examples
Given the variable name `$PGO_CMD` can involve a lot of context
and given that some of the examples may be run without the
precursor "envs" executable being run, this adds a sane default
of `kubectl` to some of the example scripts, while also indicating
what are acceptable values, should one introspect the scripts.
Issue: #1928
---
examples/create-by-resource/run.sh | 2 ++
examples/custom-config/create.sh | 7 ++-----
2 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/examples/create-by-resource/run.sh b/examples/create-by-resource/run.sh
index ea034a4fe2..e6940ead12 100755
--- a/examples/create-by-resource/run.sh
+++ b/examples/create-by-resource/run.sh
@@ -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
diff --git a/examples/custom-config/create.sh b/examples/custom-config/create.sh
index b0599f1b37..df6c701f2a 100755
--- a/examples/custom-config/create.sh
+++ b/examples/custom-config/create.sh
@@ -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} ]]
From df59748a3b198bbff255715bb88d69b72facca69 Mon Sep 17 00:00:00 2001
From: "Jonathan S. Katz"
Date: Fri, 27 Nov 2020 11:54:40 -0500
Subject: [PATCH 027/129] Fix crash in cluster shutdown logic
The Operator would crash if a shutdown was issued but there was
no in the cluster.
Issue: [ch9825]
Issue: #2073
---
internal/operator/cluster/clusterlogic.go | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/internal/operator/cluster/clusterlogic.go b/internal/operator/cluster/clusterlogic.go
index a953e07213..43ab32b27d 100644
--- a/internal/operator/cluster/clusterlogic.go
+++ b/internal/operator/cluster/clusterlogic.go
@@ -620,7 +620,10 @@ func ShutdownCluster(clientset kubeapi.Interface, cluster crv1.Pgcluster) error
return err
}
- if len(pods.Items) > 1 {
+ if len(pods.Items) == 0 {
+ return fmt.Errorf("Cluster Operator: Could not find primary pod for shutdown of "+
+ "cluster %s", cluster.Name)
+ } else if len(pods.Items) > 1 {
return fmt.Errorf("Cluster Operator: Invalid number of primary pods (%d) found when "+
"shutting down cluster %s", len(pods.Items), cluster.Name)
}
From 7b88ae4ecbf05ff5d09d85817e1dad3b9b386327 Mon Sep 17 00:00:00 2001
From: "Jonathan S. Katz"
Date: Mon, 30 Nov 2020 10:18:13 -0500
Subject: [PATCH 028/129] Catch error when generating default pgo-config
During the initialization of the default "pgo-config" ConfigMap,
there exists a case (likely a race condition that I did not track
down) that triggered an error, but we were not catching the error.
Regardless, we should, given the next line could trigger a panic.
Immediate remediation without the patch should be just restarting
the Operator Pod.
Issue: [ch9826]
Issue: #2075
---
internal/config/pgoconfig.go | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/internal/config/pgoconfig.go b/internal/config/pgoconfig.go
index 7b4a162e3f..6f5ea07b29 100644
--- a/internal/config/pgoconfig.go
+++ b/internal/config/pgoconfig.go
@@ -521,6 +521,11 @@ func (c *PgoConfig) GetConfig(clientset kubernetes.Interface, namespace string)
cMap, err := initialize(clientset, namespace)
+ if err != nil {
+ log.Errorf("could not get ConfigMap: %s", err.Error())
+ return err
+ }
+
//get the pgo.yaml config file
str := cMap.Data[CONFIG_PATH]
if str == "" {
From 80cfa33d29e1f97dde76a98826871f73ac35b21d Mon Sep 17 00:00:00 2001
From: "Jonathan S. Katz"
Date: Mon, 30 Nov 2020 16:27:01 -0500
Subject: [PATCH 029/129] Allow for pg_stat_statements collections from
pgMonitor
pgMonitor 4.4 introduced the ability to scrape metrics around
pg_stat_statments, which include:
- `ccp_pg_stat_statements_total_calls_count`
Total number of queries run per user/database
- `ccp_pg_stat_statements_total_exec_time_ms`
Total runtime of all queries per user/database
- `ccp_pg_stat_statements_total_mean_exec_time_ms`
Mean runtime of all queries per user/database
- ccp_pg_stat_statements_total_row_count
Total rows returned from all queries per user/database
While there may not be corresponding visuals in the pgMonitor
Kubernetes overlay at this point, this at least allows for the
collection and aggregation of these metrics.
This also retitles an error message.
Issue: [ch9841]
Issue: #2036
---
bin/crunchy-postgres-exporter/start.sh | 38 +++++++++++++++++++++++++-
1 file changed, 37 insertions(+), 1 deletion(-)
diff --git a/bin/crunchy-postgres-exporter/start.sh b/bin/crunchy-postgres-exporter/start.sh
index f8e02e4094..2a0d543b70 100755
--- a/bin/crunchy-postgres-exporter/start.sh
+++ b/bin/crunchy-postgres-exporter/start.sh
@@ -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.."
From 06e16da9d03345fda83719d03953c3a71d4535b3 Mon Sep 17 00:00:00 2001
From: andrewlecuyer <43458182+andrewlecuyer@users.noreply.github.com>
Date: Wed, 2 Dec 2020 10:16:22 -0600
Subject: [PATCH 030/129] Remove disabling of autofailover from rmdata
The rmdata application no longer disables autofailover when deleting a
PostgreSQL cluster. In past versions of the PostgreSQL Operator, it
was necessary to first disable autofailover prior to cluster deletion
since the rmdata application itself would stop the PostgreSQL database
using 'pg_ctl stop'. However, since Patroni is now responsible for
cleanly shutting down the database (specifically upon receipt of a
SIGTERM signal), autofailver should no longer be disabled (if it is,
Patroni will not respond to the SIGTERM and will therefore not attempt
to cleanly shutdown the database).
This commit therefore ensures an attempt is made to cleanly shutdown
the database when deleting a PostgreSQL cluster. This, in turn, will
increase the likeliness that the cluster can later be recreated and
cleanly restarted.
Issue: [ch9856]
---
pgo-rmdata/rmdata/process.go | 9 ---------
1 file changed, 9 deletions(-)
diff --git a/pgo-rmdata/rmdata/process.go b/pgo-rmdata/rmdata/process.go
index 90d135a59a..866aca9fda 100644
--- a/pgo-rmdata/rmdata/process.go
+++ b/pgo-rmdata/rmdata/process.go
@@ -50,15 +50,6 @@ const (
func Delete(request Request) {
log.Infof("rmdata.Process %v", request)
- // if, check to see if this is a full cluster removal...i.e. "IsReplica"
- // and "IsBackup" is set to false
- //
- // if this is a full cluster removal, first disable autofailover
- if !(request.IsReplica || request.IsBackup) {
- log.Debug("disabling autofailover for cluster removal")
- util.ToggleAutoFailover(request.Clientset, false, request.ClusterPGHAScope, request.Namespace)
- }
-
//the case of 'pgo scaledown'
if request.IsReplica {
log.Info("rmdata.Process scaledown replica use case")
From f381400e31c09918a9524120f722db3a3090a4ff Mon Sep 17 00:00:00 2001
From: andrewlecuyer <43458182+andrewlecuyer@users.noreply.github.com>
Date: Tue, 8 Dec 2020 15:00:14 -0600
Subject: [PATCH 031/129] No post-failover backups for standby clusters
A post-failover backup is now only triggered for non-standby clusters.
Therefore, if a failover occurs within a standby cluster, and automatic
backup will no longer be run.
Issue: [ch9912]
Issue: #2102
---
internal/controller/pod/promotionhandler.go | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/internal/controller/pod/promotionhandler.go b/internal/controller/pod/promotionhandler.go
index c9476b6782..533f265344 100644
--- a/internal/controller/pod/promotionhandler.go
+++ b/internal/controller/pod/promotionhandler.go
@@ -62,7 +62,8 @@ func (c *Controller) handlePostgresPodPromotion(newPod *apiv1.Pod, cluster crv1.
}
}
- if cluster.Status.State == crv1.PgclusterStateInitialized {
+ // create a post-failover backup if not a standby cluster
+ if !cluster.Spec.Standby && cluster.Status.State == crv1.PgclusterStateInitialized {
if err := cleanAndCreatePostFailoverBackup(c.Client,
cluster.Name, newPod.Namespace); err != nil {
log.Error(err)
From 09d12e68876a7f54a2d0470490f582fcd9b94c78 Mon Sep 17 00:00:00 2001
From: "Jonathan S. Katz"
Date: Tue, 8 Dec 2020 22:19:40 -0500
Subject: [PATCH 032/129] Do not consider bootstrap Pod in `pgo df`
The bootstrap Pod, a remnaint of a cluster restore, gets caught
up in the `pgo df` search, but unfortunately this is not a valid
Pod. This exlcude this Pod from being considered.
Issue: [ch2029]
Issue: #2029
---
internal/apiserver/dfservice/dfimpl.go | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/internal/apiserver/dfservice/dfimpl.go b/internal/apiserver/dfservice/dfimpl.go
index 6b244836c0..f10cda475b 100644
--- a/internal/apiserver/dfservice/dfimpl.go
+++ b/internal/apiserver/dfservice/dfimpl.go
@@ -143,7 +143,8 @@ func getClaimCapacity(clientset kubernetes.Interface, pvcName, ns string) (strin
func getClusterDf(cluster *crv1.Pgcluster, clusterResultsChannel chan msgs.DfDetail, clusterProgressChannel chan bool, errorChannel chan error) {
log.Debugf("pod df: %s", cluster.Spec.Name)
- selector := fmt.Sprintf("%s=%s", config.LABEL_PG_CLUSTER, cluster.Spec.Name)
+ selector := fmt.Sprintf("%s=%s,!%s",
+ config.LABEL_PG_CLUSTER, cluster.Spec.Name, config.LABEL_PGHA_BOOTSTRAP)
pods, err := apiserver.Clientset.CoreV1().Pods(cluster.Spec.Namespace).List(metav1.ListOptions{LabelSelector: selector})
From 19502ee93fd0cc34bce3cc42b45f429193427251 Mon Sep 17 00:00:00 2001
From: "Jonathan S. Katz"
Date: Tue, 8 Dec 2020 22:41:06 -0500
Subject: [PATCH 033/129] Delete bootstrap Job once it successfully completes
When the bootstrap Job completes successfully after a restore,
it contains information that ends up being consumed by other
parts of the Operator system, such as Patroni. As the logs
from the Job do not provide much, if any, helpful information
after a restore succeeds, it's best to have the Operator
eliminate the job.
As such, this changes the behavior so that the bootstrap Job
is removed.
As this has lead to some buggy behavior, this is being
considered as a bug fix, as regular operational work would
dictate that the Job is removed anyway.
Issue: [ch9919]
---
internal/controller/job/bootstraphandler.go | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/internal/controller/job/bootstraphandler.go b/internal/controller/job/bootstraphandler.go
index 1b75d14803..6085c6bb7a 100644
--- a/internal/controller/job/bootstraphandler.go
+++ b/internal/controller/job/bootstraphandler.go
@@ -80,7 +80,7 @@ func (c *Controller) handleBootstrapUpdate(job *apiv1.Job) error {
// If the job was successful we updated the state of the pgcluster to a "bootstrapped" status.
// This will then trigger full initialization of the cluster. We also cleanup any resources
- // from the bootstrap job.
+ // from the bootstrap job and delete the job itself
if cluster.Status.State == crv1.PgclusterStateBootstrapping {
if err := c.cleanupBootstrapResources(job, cluster, restore); err != nil {
@@ -100,6 +100,11 @@ func (c *Controller) handleBootstrapUpdate(job *apiv1.Job) error {
log.Error(err)
return err
}
+
+ // as it is no longer needed, delete the job
+ deletePropagation := metav1.DeletePropagationBackground
+ return c.Client.BatchV1().Jobs(namespace).Delete(job.Name,
+ &metav1.DeleteOptions{PropagationPolicy: &deletePropagation})
}
if restore {
From 050fb51e5e0d936b2f95ef7ca53cec4a6d6ccc6a Mon Sep 17 00:00:00 2001
From: "Jonathan S. Katz"
Date: Thu, 10 Dec 2020 12:38:36 -0500
Subject: [PATCH 034/129] Only consider running Pods for `pgo test`
By adding this limitation, Pods such as Evicted Pods would not
be considered as a part of `pgo test` output, as this could
present some odd scenarios, such as the presence of two primaries.
Issue: [ch9931]
Issue: #2095
---
.../apiserver/clusterservice/clusterimpl.go | 17 +++++++++++++----
1 file changed, 13 insertions(+), 4 deletions(-)
diff --git a/internal/apiserver/clusterservice/clusterimpl.go b/internal/apiserver/clusterservice/clusterimpl.go
index 1da1b65124..565ce20a1f 100644
--- a/internal/apiserver/clusterservice/clusterimpl.go
+++ b/internal/apiserver/clusterservice/clusterimpl.go
@@ -38,6 +38,7 @@ import (
kerrors "k8s.io/apimachinery/pkg/api/errors"
"k8s.io/apimachinery/pkg/api/resource"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ "k8s.io/apimachinery/pkg/fields"
"k8s.io/apimachinery/pkg/util/validation"
"k8s.io/client-go/kubernetes"
)
@@ -2055,10 +2056,15 @@ func GetPrimaryAndReplicaPods(cluster *crv1.Pgcluster, ns string) ([]msgs.ShowCl
output := make([]msgs.ShowClusterPod, 0)
+ // find all of the Pods that represent Postgres primary and replicas.
+ // only consider running Pods
selector := config.LABEL_SERVICE_NAME + "=" + cluster.Spec.Name + "," + config.LABEL_DEPLOYMENT_NAME
- log.Debugf("selector for GetPrimaryAndReplicaPods is %s", selector)
+ options := metav1.ListOptions{
+ FieldSelector: fields.OneTermEqualSelector("status.phase", string(v1.PodRunning)).String(),
+ LabelSelector: selector,
+ }
- pods, err := apiserver.Clientset.CoreV1().Pods(ns).List(metav1.ListOptions{LabelSelector: selector})
+ pods, err := apiserver.Clientset.CoreV1().Pods(ns).List(options)
if err != nil {
return output, err
}
@@ -2078,9 +2084,12 @@ func GetPrimaryAndReplicaPods(cluster *crv1.Pgcluster, ns string) ([]msgs.ShowCl
}
selector = config.LABEL_SERVICE_NAME + "=" + cluster.Spec.Name + "-replica" + "," + config.LABEL_DEPLOYMENT_NAME
- log.Debugf("selector for GetPrimaryAndReplicaPods is %s", selector)
+ options = metav1.ListOptions{
+ FieldSelector: fields.OneTermEqualSelector("status.phase", string(v1.PodRunning)).String(),
+ LabelSelector: selector,
+ }
- pods, err = apiserver.Clientset.CoreV1().Pods(ns).List(metav1.ListOptions{LabelSelector: selector})
+ pods, err = apiserver.Clientset.CoreV1().Pods(ns).List(options)
if err != nil {
return output, err
}
From 773b6588c3e757cd6ef9ff3fed6038827170df2d Mon Sep 17 00:00:00 2001
From: "Jonathan S. Katz"
Date: Wed, 16 Dec 2020 09:43:40 -0500
Subject: [PATCH 035/129] Do not consider evicted Pods with `pgo df`
For a variety of reasons, including the need to exec into Pods
to get PVC status with `pgo df`, only running Pods should be
considered for this command and, in particular, no evicted Pods.
Issue: [ch9959]
Issue: #2129
---
internal/apiserver/dfservice/dfimpl.go | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/internal/apiserver/dfservice/dfimpl.go b/internal/apiserver/dfservice/dfimpl.go
index f10cda475b..fe1bbd3529 100644
--- a/internal/apiserver/dfservice/dfimpl.go
+++ b/internal/apiserver/dfservice/dfimpl.go
@@ -24,10 +24,12 @@ import (
"github.com/crunchydata/postgres-operator/internal/kubeapi"
crv1 "github.com/crunchydata/postgres-operator/pkg/apis/crunchydata.com/v1"
msgs "github.com/crunchydata/postgres-operator/pkg/apiservermsgs"
+
log "github.com/sirupsen/logrus"
v1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/api/resource"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ "k8s.io/apimachinery/pkg/fields"
"k8s.io/client-go/kubernetes"
)
@@ -146,7 +148,12 @@ func getClusterDf(cluster *crv1.Pgcluster, clusterResultsChannel chan msgs.DfDet
selector := fmt.Sprintf("%s=%s,!%s",
config.LABEL_PG_CLUSTER, cluster.Spec.Name, config.LABEL_PGHA_BOOTSTRAP)
- pods, err := apiserver.Clientset.CoreV1().Pods(cluster.Spec.Namespace).List(metav1.ListOptions{LabelSelector: selector})
+ options := metav1.ListOptions{
+ FieldSelector: fields.OneTermEqualSelector("status.phase", string(v1.PodRunning)).String(),
+ LabelSelector: selector,
+ }
+
+ pods, err := apiserver.Clientset.CoreV1().Pods(cluster.Spec.Namespace).List(options)
// if there is an error attempting to get the pods, just return
if err != nil {
From a4de7811525db14047fadd40a3891c64a56fe5cc Mon Sep 17 00:00:00 2001
From: "Jonathan S. Katz"
Date: Fri, 18 Dec 2020 16:36:12 -0500
Subject: [PATCH 036/129] Modify syntax for checking for recovery status via
SQL (#2133)
There were cases where this was failing due to too many quotes
being used, so this should avoid said issues.
Issue: [ch9981]
Issue: #2108
---
internal/controller/pod/promotionhandler.go | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/internal/controller/pod/promotionhandler.go b/internal/controller/pod/promotionhandler.go
index 533f265344..660f841fdc 100644
--- a/internal/controller/pod/promotionhandler.go
+++ b/internal/controller/pod/promotionhandler.go
@@ -34,9 +34,14 @@ import (
"k8s.io/client-go/rest"
)
+const (
+ // recoverySQL is just the SQL to figure out if Postgres is in recovery mode
+ recoverySQL = "SELECT pg_is_in_recovery();"
+)
+
var (
// isInRecoveryCommand is the command run to determine if postgres is in recovery
- isInRecoveryCMD []string = []string{"psql", "-t", "-c", "'SELECT pg_is_in_recovery();'", "-p"}
+ isInRecoveryCMD []string = []string{"psql", "-t", "-c", recoverySQL, "-p"}
// leaderStatusCMD is the command run to get the Patroni status for the primary
leaderStatusCMD []string = []string{"curl", fmt.Sprintf("localhost:%s/master",
From ff5bdf97f868af57d33b7a9de1df4da69d3d59aa Mon Sep 17 00:00:00 2001
From: "Jonathan S. Katz"
Date: Sat, 19 Dec 2020 16:51:05 -0500
Subject: [PATCH 037/129] Bump Grafana version for Postgres Operator Monitoring
This moves Grafana to 6.7.5. Note that this continues to
use the upstream version.
---
docs/content/installation/metrics/metrics-configuration.md | 6 +++---
.../metrics/ansible/roles/pgo-metrics/defaults/main.yml | 2 +-
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/docs/content/installation/metrics/metrics-configuration.md b/docs/content/installation/metrics/metrics-configuration.md
index 7d343480cf..d65cd47aef 100644
--- a/docs/content/installation/metrics/metrics-configuration.md
+++ b/docs/content/installation/metrics/metrics-configuration.md
@@ -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_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 |
-[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/installers/metrics/ansible/roles/pgo-metrics/defaults/main.yml b/installers/metrics/ansible/roles/pgo-metrics/defaults/main.yml
index 775d6691f5..08df353edf 100644
--- a/installers/metrics/ansible/roles/pgo-metrics/defaults/main.yml
+++ b/installers/metrics/ansible/roles/pgo-metrics/defaults/main.yml
@@ -29,7 +29,7 @@ grafana_admin_password: ""
grafana_install: "true"
grafana_image_prefix: "grafana"
grafana_image_name: "grafana"
-grafana_image_tag: "6.7.4"
+grafana_image_tag: "6.7.5"
grafana_port: "3000"
grafana_service_name: "crunchy-grafana"
grafana_service_type: "ClusterIP"
From c8c29c3d04965a3666111d13367212a1ff300b2f Mon Sep 17 00:00:00 2001
From: "Jonathan S. Katz"
Date: Sun, 20 Dec 2020 11:37:57 -0500
Subject: [PATCH 038/129] Add missing `--no-prompt` flag to `pgo upgrade`
The mechanism for disabling the verification prompt for `pgo upgrade`
was always available, but the flag itself was not exposed.
Issue: [ch9988]
Issue: #2135
---
docs/content/pgo-client/reference/pgo_upgrade.md | 11 ++++++-----
pgo/cmd/upgrade.go | 11 +++++------
2 files changed, 11 insertions(+), 11 deletions(-)
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/pgo/cmd/upgrade.go b/pgo/cmd/upgrade.go
index e6672f1aa8..1211990790 100644
--- a/pgo/cmd/upgrade.go
+++ b/pgo/cmd/upgrade.go
@@ -41,10 +41,10 @@ var UpgradeCCPImageTag string
var UpgradeCmd = &cobra.Command{
Use: "upgrade",
Short: "Perform a cluster upgrade.",
- Long: `UPGRADE allows you to perform a comprehensive PGCluster upgrade
- (for use after performing a Postgres Operator upgrade).
+ Long: `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.`,
Run: func(cmd *cobra.Command, args []string) {
@@ -69,8 +69,9 @@ func init() {
RootCmd.AddCommand(UpgradeCmd)
// flags for "pgo upgrade"
- UpgradeCmd.Flags().BoolVarP(&IgnoreValidation, "ignore-validation", "", false, "Disables version checking against the image tags when performing an cluster upgrade.")
UpgradeCmd.Flags().StringVarP(&UpgradeCCPImageTag, "ccp-image-tag", "", "", "The image tag to use for cluster creation. If specified, it overrides the default configuration setting and disables tag validation checking.")
+ UpgradeCmd.Flags().BoolVarP(&IgnoreValidation, "ignore-validation", "", false, "Disables version checking against the image tags when performing an cluster upgrade.")
+ UpgradeCmd.Flags().BoolVar(&NoPrompt, "no-prompt", false, "No command line confirmation.")
}
func createUpgrade(args []string, ns string) {
@@ -90,7 +91,6 @@ func createUpgrade(args []string, ns string) {
request.UpgradeCCPImageTag = UpgradeCCPImageTag
response, err := api.CreateUpgrade(httpclient, &SessionCredentials, &request)
-
if err != nil {
fmt.Println("Error: " + err.Error())
os.Exit(2)
@@ -104,5 +104,4 @@ func createUpgrade(args []string, ns string) {
fmt.Println("Error: " + response.Status.Msg)
os.Exit(2)
}
-
}
From 62a677db54ad40df314c0fd5368b599aaf9f91ee Mon Sep 17 00:00:00 2001
From: "Jonathan S. Katz"
Date: Sun, 20 Dec 2020 12:30:26 -0500
Subject: [PATCH 039/129] Ensure consistent permissions for mounting repo
Secret
While the Secret volume mount is set to be readonly for the
pgBackRest Secret information, the defaultMode on the volume itself
was set to be more permissive. While it appears that the vast
majority of Kubernetes distributions gie precedence to the value
of the volume mount, so flavors do use the values set on the volume.
As such, it's prudent to remove the more permissive settings, which
this patch does.
Issue: [ch9989]
Issue: #2140
---
.../pgo-operator/files/pgo-configs/cluster-bootstrap-job.json | 3 +--
.../pgo-operator/files/pgo-configs/cluster-deployment.json | 3 +--
.../files/pgo-configs/pgo-backrest-repo-template.json | 3 +--
3 files changed, 3 insertions(+), 6 deletions(-)
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/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",
From dce3c34a9e6c7d3870d4582c211e960d3b06fa3f Mon Sep 17 00:00:00 2001
From: Chris Bandy
Date: Thu, 24 Sep 2020 11:41:28 -0500
Subject: [PATCH 040/129] Build the GCP Marketplace installer with a smaller
context
This reduces the time it takes to build with Docker.
---
installers/gcp-marketplace/Dockerfile | 18 +++++++++---------
installers/gcp-marketplace/Makefile | 4 ++--
2 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/installers/gcp-marketplace/Dockerfile b/installers/gcp-marketplace/Dockerfile
index adf85a355a..0e84cb2f27 100644
--- a/installers/gcp-marketplace/Dockerfile
+++ b/installers/gcp-marketplace/Dockerfile
@@ -20,21 +20,21 @@ 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/
ARG PGO_VERSION
diff --git a/installers/gcp-marketplace/Makefile b/installers/gcp-marketplace/Makefile
index f10f5b7c27..6236ae3ad8 100644
--- a/installers/gcp-marketplace/Makefile
+++ b/installers/gcp-marketplace/Makefile
@@ -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
From 3330f7098ed72df60de06046bad2261737e6be66 Mon Sep 17 00:00:00 2001
From: Chris Bandy
Date: Tue, 22 Dec 2020 12:54:57 -0600
Subject: [PATCH 041/129] Wait for RBAC reconciliation in GCP Marketplace
Marketplace verification checks that the namespace has no RBAC objects
after the application is removed. These objects used to be created
during the install, but now they are created by the operator during
reconcile.
See: 78b39759cef7f6994165a937348291f03500db5c
Issue: [ch10000]
---
installers/gcp-marketplace/install.sh | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
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
From 49b220a7127ef627b7996b5e06946b48dd557439 Mon Sep 17 00:00:00 2001
From: Chris Bandy
Date: Tue, 22 Dec 2020 13:46:19 -0600
Subject: [PATCH 042/129] Verify GCP Marketplace installer without parameters
To be on the marketplace, the deployer image must pass verification
without any specified parameters. Contrary to the documentation, the
verify command still takes parameters which allows us to test different
configuration values.
See: https://github.com/GoogleCloudPlatform/marketplace-k8s-app-tools/commit/aca27e694dc2
Issue: [ch10000]
---
installers/gcp-marketplace/Dockerfile | 2 ++
installers/gcp-marketplace/test-schema.yaml | 6 ++++++
2 files changed, 8 insertions(+)
create mode 100644 installers/gcp-marketplace/test-schema.yaml
diff --git a/installers/gcp-marketplace/Dockerfile b/installers/gcp-marketplace/Dockerfile
index 0e84cb2f27..464e7d74fd 100644
--- a/installers/gcp-marketplace/Dockerfile
+++ b/installers/gcp-marketplace/Dockerfile
@@ -36,6 +36,8 @@ COPY gcp-marketplace/application.yaml \
/data/manifest/
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/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
From 974b0f0075a85641d90e0bd6489655855ddad33a Mon Sep 17 00:00:00 2001
From: Chris Bandy
Date: Tue, 22 Dec 2020 14:22:07 -0600
Subject: [PATCH 043/129] Move GCP Marketplace service account description
Recent versions of marketplace verification expect a service account's
description under a different schema key. Tested with tools v0.10.10.
See: https://github.com/GoogleCloudPlatform/marketplace-k8s-app-tools/commit/10c92d4bb52c
Issue: [ch10000]
---
installers/gcp-marketplace/schema.yaml | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
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
From f541288f04083c8120300a44acf6f4a066056c7b Mon Sep 17 00:00:00 2001
From: "Jonathan S. Katz"
Date: Sat, 26 Dec 2020 15:14:47 -0500
Subject: [PATCH 044/129] Modify character space for random password generation
This removes a couple of characters from consideration for
the randomly generated passwords, as these characters could pose
problems when applying them in shell environments. The character
entropy is still quite large even with this removal.
---
internal/util/secrets.go | 20 ++++++++++++++++----
internal/util/secrets_test.go | 12 +++++++++---
2 files changed, 25 insertions(+), 7 deletions(-)
diff --git a/internal/util/secrets.go b/internal/util/secrets.go
index 1ef90e7bd6..ce7b69472f 100644
--- a/internal/util/secrets.go
+++ b/internal/util/secrets.go
@@ -45,6 +45,10 @@ const (
// passwordCharUpper is the highest ASCII character to use for generating a
// password, which is 126
passwordCharUpper = 126
+ // passwordCharExclude is a map of characters that we choose to exclude from
+ // the password to simplify usage in the shell. There is still enough entropy
+ // that exclusion of these characters is OK.
+ passwordCharExclude = "`\\"
)
// passwordCharSelector is a "big int" that we need to select the random ASCII
@@ -77,16 +81,24 @@ func CreateSecret(clientset kubernetes.Interface, db, secretName, username, pass
// ASCII characters suitable for a password
func GeneratePassword(length int) (string, error) {
password := make([]byte, length)
+ i := 0
- for i := 0; i < length; i++ {
- char, err := rand.Int(rand.Reader, passwordCharSelector)
-
+ for i < length {
+ val, err := rand.Int(rand.Reader, passwordCharSelector)
// if there is an error generating the random integer, return
if err != nil {
return "", err
}
- password[i] = byte(passwordCharLower + char.Int64())
+ char := byte(passwordCharLower + val.Int64())
+
+ // if the character is in the exclusion list, continue
+ if idx := strings.IndexAny(string(char), passwordCharExclude); idx > -1 {
+ continue
+ }
+
+ password[i] = char
+ i++
}
return string(password), nil
diff --git a/internal/util/secrets_test.go b/internal/util/secrets_test.go
index 89cbcebac9..423beb5e03 100644
--- a/internal/util/secrets_test.go
+++ b/internal/util/secrets_test.go
@@ -23,7 +23,7 @@ import (
func TestGeneratePassword(t *testing.T) {
// different lengths
- for _, length := range []int{1, 2, 3, 5, 20} {
+ for _, length := range []int{1, 2, 3, 5, 20, 200} {
password, err := GeneratePassword(length)
if err != nil {
t.Fatalf("expected no error, got %v", err)
@@ -31,9 +31,12 @@ func TestGeneratePassword(t *testing.T) {
if expected, actual := length, len(password); expected != actual {
t.Fatalf("expected length %v, got %v", expected, actual)
}
- if i := strings.IndexFunc(password, unicode.IsPrint); i > 0 {
+ if i := strings.IndexFunc(password, func(r rune) bool { return !unicode.IsPrint(r) }); i > -1 {
t.Fatalf("expected only printable characters, got %q in %q", password[i], password)
}
+ if i := strings.IndexAny(password, passwordCharExclude); i > -1 {
+ t.Fatalf("expected no exclude characters, got %q in %q", password[i], password)
+ }
}
// random contents
@@ -44,9 +47,12 @@ func TestGeneratePassword(t *testing.T) {
if err != nil {
t.Fatalf("expected no error, got %v", err)
}
- if i := strings.IndexFunc(password, unicode.IsPrint); i > 0 {
+ if i := strings.IndexFunc(password, func(r rune) bool { return !unicode.IsPrint(r) }); i > -1 {
t.Fatalf("expected only printable characters, got %q in %q", password[i], password)
}
+ if i := strings.IndexAny(password, passwordCharExclude); i > -1 {
+ t.Fatalf("expected no exclude characters, got %q in %q", password[i], password)
+ }
for i := range previous {
if password == previous[i] {
From c17d4fe7045b6888c6e1cecc80ccb36fe1430e6f Mon Sep 17 00:00:00 2001
From: "Jonathan S. Katz"
Date: Tue, 29 Dec 2020 09:59:45 -0500
Subject: [PATCH 045/129] Ensure sync replication ConfigMap is deleted on
delete
The deletion task was not checking for the existence of this
ConfigMap on delete, and as such it was being missed.
---
pgo-rmdata/rmdata/process.go | 3 +++
1 file changed, 3 insertions(+)
diff --git a/pgo-rmdata/rmdata/process.go b/pgo-rmdata/rmdata/process.go
index 866aca9fda..772eae8f17 100644
--- a/pgo-rmdata/rmdata/process.go
+++ b/pgo-rmdata/rmdata/process.go
@@ -45,6 +45,7 @@ const (
configConfigMapSuffix = "config"
leaderConfigMapSuffix = "leader"
failoverConfigMapSuffix = "failover"
+ syncConfigMapSuffix = "sync"
)
func Delete(request Request) {
@@ -236,6 +237,8 @@ func removeClusterConfigmaps(request Request) {
// next, the name of the failover configmap, which is
// "`clusterName`-failover"
fmt.Sprintf("%s-%s", request.ClusterName, failoverConfigMapSuffix),
+ // next, if there is a synchronous replication configmap, clean that up
+ fmt.Sprintf("%s-%s", request.ClusterName, syncConfigMapSuffix),
// finally, if there is a pgbouncer, remove the pgbouncer configmap
util.GeneratePgBouncerConfigMapName(request.ClusterName),
}
From bdd5da20f8bd8c7f0d5b9a4ea9e012709554b44f Mon Sep 17 00:00:00 2001
From: "Jonathan S. Katz"
Date: Sat, 2 Jan 2021 11:58:10 -0500
Subject: [PATCH 046/129] Happy New Year!
Good riddance 2020, hello 2021.
---
LICENSE.md | 2 +-
apiserver.go | 2 +-
bin/crunchy-postgres-exporter/common_lib.sh | 2 +-
bin/crunchy-postgres-exporter/start.sh | 2 +-
bin/get-deps.sh | 2 +-
bin/get-pgmonitor.sh | 2 +-
bin/pgo-backrest-repo-sync/pgo-backrest-repo-sync.sh | 2 +-
bin/pgo-backrest-repo/pgo-backrest-repo.sh | 2 +-
bin/pgo-backrest-restore/pgo-backrest-restore.sh | 2 +-
bin/pgo-backrest/pgo-backrest.sh | 2 +-
bin/pgo-event/pgo-event.sh | 2 +-
bin/pgo-rmdata/start.sh | 2 +-
bin/pgo-scheduler/start.sh | 2 +-
bin/pgo-sqlrunner/start.sh | 2 +-
bin/pre-pull-crunchy-containers.sh | 2 +-
bin/pull-from-gcr.sh | 2 +-
bin/push-ccp-to-gcr.sh | 2 +-
bin/push-to-gcr.sh | 2 +-
bin/uid_daemon.sh | 2 +-
bin/upgrade-secret.sh | 2 +-
deploy/add-targeted-namespace-reconcile-rbac.sh | 2 +-
deploy/add-targeted-namespace.sh | 2 +-
deploy/cleannamespaces.sh | 2 +-
deploy/cleanup-rbac.sh | 2 +-
deploy/cleanup.sh | 2 +-
deploy/deploy.sh | 2 +-
deploy/gen-api-keys.sh | 2 +-
deploy/install-bootstrap-creds.sh | 2 +-
deploy/install-rbac.sh | 2 +-
deploy/remove-crd.sh | 2 +-
deploy/setupnamespaces.sh | 2 +-
deploy/show-crd.sh | 2 +-
deploy/upgrade-creds.sh | 2 +-
deploy/upgrade-pgo.sh | 2 +-
examples/create-by-resource/run.sh | 2 +-
examples/custom-config/create.sh | 2 +-
examples/custom-config/setup.sql | 2 +-
hack/boilerplate.go.txt | 2 +-
hack/config_sync.sh | 2 +-
hack/update-codegen.sh | 2 +-
hack/verify-codegen.sh | 2 +-
.../roles/pgo-operator/templates/add-targeted-namespace.sh.j2 | 2 +-
installers/image/bin/pgo-deploy.sh | 2 +-
installers/kubectl/client-setup.sh | 2 +-
internal/apiserver/backrestservice/backrestimpl.go | 2 +-
internal/apiserver/backrestservice/backrestservice.go | 2 +-
internal/apiserver/backupoptions/backupoptionsutil.go | 2 +-
internal/apiserver/backupoptions/pgbackrestoptions.go | 2 +-
internal/apiserver/backupoptions/pgdumpoptions.go | 2 +-
internal/apiserver/catservice/catimpl.go | 2 +-
internal/apiserver/catservice/catservice.go | 2 +-
internal/apiserver/cloneservice/cloneimpl.go | 2 +-
internal/apiserver/cloneservice/cloneservice.go | 2 +-
internal/apiserver/clusterservice/clusterimpl.go | 2 +-
internal/apiserver/clusterservice/clusterservice.go | 2 +-
internal/apiserver/clusterservice/scaleimpl.go | 2 +-
internal/apiserver/clusterservice/scaleservice.go | 2 +-
internal/apiserver/common.go | 2 +-
internal/apiserver/common_test.go | 2 +-
internal/apiserver/configservice/configimpl.go | 2 +-
internal/apiserver/configservice/configservice.go | 2 +-
internal/apiserver/dfservice/dfimpl.go | 2 +-
internal/apiserver/dfservice/dfservice.go | 2 +-
internal/apiserver/failoverservice/failoverimpl.go | 2 +-
internal/apiserver/failoverservice/failoverservice.go | 2 +-
internal/apiserver/labelservice/labelimpl.go | 2 +-
internal/apiserver/labelservice/labelservice.go | 2 +-
internal/apiserver/middleware.go | 2 +-
internal/apiserver/namespaceservice/namespaceimpl.go | 2 +-
internal/apiserver/namespaceservice/namespaceservice.go | 2 +-
internal/apiserver/perms.go | 2 +-
internal/apiserver/pgadminservice/pgadminimpl.go | 2 +-
internal/apiserver/pgadminservice/pgadminservice.go | 2 +-
internal/apiserver/pgbouncerservice/pgbouncerimpl.go | 2 +-
internal/apiserver/pgbouncerservice/pgbouncerservice.go | 2 +-
internal/apiserver/pgdumpservice/pgdumpimpl.go | 2 +-
internal/apiserver/pgdumpservice/pgdumpservice.go | 2 +-
internal/apiserver/pgoroleservice/pgoroleimpl.go | 2 +-
internal/apiserver/pgoroleservice/pgoroleservice.go | 2 +-
internal/apiserver/pgouserservice/pgouserimpl.go | 2 +-
internal/apiserver/pgouserservice/pgouserservice.go | 2 +-
internal/apiserver/policyservice/policyimpl.go | 2 +-
internal/apiserver/policyservice/policyservice.go | 2 +-
internal/apiserver/pvcservice/pvcimpl.go | 2 +-
internal/apiserver/pvcservice/pvcservice.go | 2 +-
internal/apiserver/reloadservice/reloadimpl.go | 2 +-
internal/apiserver/reloadservice/reloadservice.go | 2 +-
internal/apiserver/restartservice/restartimpl.go | 2 +-
internal/apiserver/restartservice/restartservice.go | 2 +-
internal/apiserver/root.go | 2 +-
internal/apiserver/routing/doc.go | 2 +-
internal/apiserver/routing/routes.go | 2 +-
internal/apiserver/scheduleservice/scheduleimpl.go | 2 +-
internal/apiserver/scheduleservice/scheduleservice.go | 2 +-
internal/apiserver/statusservice/statusimpl.go | 2 +-
internal/apiserver/statusservice/statusservice.go | 2 +-
internal/apiserver/upgradeservice/upgradeimpl.go | 2 +-
internal/apiserver/upgradeservice/upgradeservice.go | 2 +-
internal/apiserver/userservice/userimpl.go | 2 +-
internal/apiserver/userservice/userimpl_test.go | 2 +-
internal/apiserver/userservice/userservice.go | 2 +-
internal/apiserver/versionservice/versionimpl.go | 2 +-
internal/apiserver/versionservice/versionservice.go | 2 +-
internal/apiserver/workflowservice/workflowimpl.go | 2 +-
internal/apiserver/workflowservice/workflowservice.go | 2 +-
internal/config/annotations.go | 2 +-
internal/config/defaults.go | 2 +-
internal/config/images.go | 2 +-
internal/config/labels.go | 2 +-
internal/config/pgoconfig.go | 2 +-
internal/config/volumes.go | 2 +-
internal/controller/configmap/configmapcontroller.go | 2 +-
internal/controller/configmap/synchandler.go | 2 +-
internal/controller/controllerutil.go | 2 +-
internal/controller/job/backresthandler.go | 2 +-
internal/controller/job/bootstraphandler.go | 2 +-
internal/controller/job/jobcontroller.go | 2 +-
internal/controller/job/jobevents.go | 2 +-
internal/controller/job/jobutil.go | 2 +-
internal/controller/job/pgdumphandler.go | 2 +-
internal/controller/job/reposynchandler.go | 2 +-
internal/controller/job/rmdatahandler.go | 2 +-
internal/controller/manager/controllermanager.go | 2 +-
internal/controller/manager/rbac.go | 2 +-
internal/controller/namespace/namespacecontroller.go | 2 +-
internal/controller/pgcluster/pgclustercontroller.go | 2 +-
internal/controller/pgpolicy/pgpolicycontroller.go | 2 +-
internal/controller/pgreplica/pgreplicacontroller.go | 2 +-
internal/controller/pgtask/backresthandler.go | 2 +-
internal/controller/pgtask/pgtaskcontroller.go | 2 +-
internal/controller/pod/inithandler.go | 2 +-
internal/controller/pod/podcontroller.go | 2 +-
internal/controller/pod/podevents.go | 2 +-
internal/controller/pod/promotionhandler.go | 2 +-
internal/kubeapi/client_config.go | 2 +-
internal/kubeapi/deployment.go | 2 +-
internal/kubeapi/endpoints.go | 2 +-
internal/kubeapi/errors.go | 2 +-
internal/kubeapi/exec.go | 2 +-
internal/kubeapi/fake/clientset.go | 2 +-
internal/kubeapi/fake/fakeclients.go | 2 +-
internal/kubeapi/pod.go | 2 +-
internal/kubeapi/volumes.go | 2 +-
internal/kubeapi/volumes_test.go | 2 +-
internal/logging/loglib.go | 2 +-
internal/ns/nslogic.go | 2 +-
internal/operator/backrest/backup.go | 2 +-
internal/operator/backrest/repo.go | 2 +-
internal/operator/backrest/restore.go | 2 +-
internal/operator/backrest/stanza.go | 2 +-
internal/operator/cluster/clone.go | 2 +-
internal/operator/cluster/cluster.go | 2 +-
internal/operator/cluster/clusterlogic.go | 2 +-
internal/operator/cluster/failover.go | 2 +-
internal/operator/cluster/failoverlogic.go | 2 +-
internal/operator/cluster/pgadmin.go | 2 +-
internal/operator/cluster/pgbouncer.go | 2 +-
internal/operator/cluster/pgbouncer_test.go | 2 +-
internal/operator/cluster/rmdata.go | 2 +-
internal/operator/cluster/service.go | 2 +-
internal/operator/cluster/standby.go | 2 +-
internal/operator/cluster/upgrade.go | 2 +-
internal/operator/clusterutilities.go | 2 +-
internal/operator/clusterutilities_test.go | 2 +-
internal/operator/common.go | 2 +-
internal/operator/config/configutil.go | 2 +-
internal/operator/config/dcs.go | 2 +-
internal/operator/config/localdb.go | 2 +-
internal/operator/operatorupgrade/version-check.go | 2 +-
internal/operator/pgbackrest.go | 2 +-
internal/operator/pgbackrest_test.go | 2 +-
internal/operator/pgdump/dump.go | 2 +-
internal/operator/pgdump/restore.go | 2 +-
internal/operator/pvc/pvc.go | 2 +-
internal/operator/storage.go | 2 +-
internal/operator/storage_test.go | 2 +-
internal/operator/task/applypolicies.go | 2 +-
internal/operator/task/rmbackups.go | 2 +-
internal/operator/task/rmdata.go | 2 +-
internal/operator/task/workflow.go | 2 +-
internal/operator/wal.go | 2 +-
internal/patroni/doc.go | 2 +-
internal/patroni/patroni.go | 2 +-
internal/pgadmin/backoff.go | 2 +-
internal/pgadmin/backoff_test.go | 2 +-
internal/pgadmin/crypto.go | 2 +-
internal/pgadmin/crypto_test.go | 2 +-
internal/pgadmin/doc.go | 2 +-
internal/pgadmin/hash.go | 2 +-
internal/pgadmin/logic.go | 2 +-
internal/pgadmin/runner.go | 2 +-
internal/pgadmin/server.go | 2 +-
internal/postgres/doc.go | 2 +-
internal/postgres/password/doc.go | 2 +-
internal/postgres/password/md5.go | 2 +-
internal/postgres/password/md5_test.go | 2 +-
internal/postgres/password/password.go | 2 +-
internal/postgres/password/password_test.go | 2 +-
internal/postgres/password/scram.go | 2 +-
internal/postgres/password/scram_test.go | 2 +-
internal/tlsutil/primitives.go | 2 +-
internal/tlsutil/primitives_test.go | 2 +-
internal/util/backrest.go | 2 +-
internal/util/clone.go | 2 +-
internal/util/cluster.go | 2 +-
internal/util/failover.go | 2 +-
internal/util/pgbouncer.go | 2 +-
internal/util/policy.go | 2 +-
internal/util/secrets.go | 2 +-
internal/util/secrets_test.go | 2 +-
internal/util/ssh.go | 2 +-
internal/util/util.go | 2 +-
pgo-backrest/pgo-backrest.go | 2 +-
pgo-rmdata/pgo-rmdata.go | 2 +-
pgo-rmdata/rmdata/process.go | 2 +-
pgo-rmdata/rmdata/types.go | 2 +-
pgo-scheduler/pgo-scheduler.go | 2 +-
pgo-scheduler/scheduler/configmapcontroller.go | 2 +-
pgo-scheduler/scheduler/controllermanager.go | 2 +-
pgo-scheduler/scheduler/pgbackrest.go | 2 +-
pgo-scheduler/scheduler/policy.go | 2 +-
pgo-scheduler/scheduler/scheduler.go | 2 +-
pgo-scheduler/scheduler/tasks.go | 2 +-
pgo-scheduler/scheduler/types.go | 2 +-
pgo-scheduler/scheduler/validate.go | 2 +-
pgo-scheduler/scheduler/validate_test.go | 2 +-
pgo/api/backrest.go | 2 +-
pgo/api/cat.go | 2 +-
pgo/api/clone.go | 2 +-
pgo/api/cluster.go | 2 +-
pgo/api/common.go | 2 +-
pgo/api/config.go | 2 +-
pgo/api/df.go | 2 +-
pgo/api/failover.go | 2 +-
pgo/api/label.go | 2 +-
pgo/api/namespace.go | 2 +-
pgo/api/pgadmin.go | 2 +-
pgo/api/pgbouncer.go | 2 +-
pgo/api/pgdump.go | 2 +-
pgo/api/pgorole.go | 2 +-
pgo/api/pgouser.go | 2 +-
pgo/api/policy.go | 2 +-
pgo/api/pvc.go | 2 +-
pgo/api/reload.go | 2 +-
pgo/api/restart.go | 2 +-
pgo/api/restore.go | 2 +-
pgo/api/restoreDump.go | 2 +-
pgo/api/scale.go | 2 +-
pgo/api/scaledown.go | 2 +-
pgo/api/schedule.go | 2 +-
pgo/api/status.go | 2 +-
pgo/api/test.go | 2 +-
pgo/api/upgrade.go | 2 +-
pgo/api/user.go | 2 +-
pgo/api/version.go | 2 +-
pgo/api/workflow.go | 2 +-
pgo/cmd/auth.go | 2 +-
pgo/cmd/backrest.go | 2 +-
pgo/cmd/backup.go | 2 +-
pgo/cmd/cat.go | 2 +-
pgo/cmd/clone.go | 2 +-
pgo/cmd/cluster.go | 2 +-
pgo/cmd/common.go | 2 +-
pgo/cmd/config.go | 2 +-
pgo/cmd/create.go | 2 +-
pgo/cmd/delete.go | 2 +-
pgo/cmd/df.go | 2 +-
pgo/cmd/failover.go | 2 +-
pgo/cmd/flags.go | 2 +-
pgo/cmd/label.go | 2 +-
pgo/cmd/namespace.go | 2 +-
pgo/cmd/pgadmin.go | 2 +-
pgo/cmd/pgbouncer.go | 2 +-
pgo/cmd/pgdump.go | 2 +-
pgo/cmd/pgorole.go | 2 +-
pgo/cmd/pgouser.go | 2 +-
pgo/cmd/policy.go | 2 +-
pgo/cmd/pvc.go | 2 +-
pgo/cmd/reload.go | 2 +-
pgo/cmd/restart.go | 2 +-
pgo/cmd/restore.go | 2 +-
pgo/cmd/root.go | 2 +-
pgo/cmd/scale.go | 2 +-
pgo/cmd/scaledown.go | 2 +-
pgo/cmd/schedule.go | 2 +-
pgo/cmd/show.go | 2 +-
pgo/cmd/status.go | 2 +-
pgo/cmd/test.go | 2 +-
pgo/cmd/update.go | 2 +-
pgo/cmd/upgrade.go | 2 +-
pgo/cmd/user.go | 2 +-
pgo/cmd/version.go | 2 +-
pgo/cmd/watch.go | 2 +-
pgo/cmd/workflow.go | 2 +-
pgo/generatedocs.go | 2 +-
pgo/pgo.go | 2 +-
pgo/util/confirmation.go | 2 +-
pgo/util/pad.go | 2 +-
pgo/util/validation.go | 2 +-
pkg/apis/crunchydata.com/v1/cluster.go | 2 +-
pkg/apis/crunchydata.com/v1/common.go | 2 +-
pkg/apis/crunchydata.com/v1/common_test.go | 2 +-
pkg/apis/crunchydata.com/v1/doc.go | 2 +-
pkg/apis/crunchydata.com/v1/policy.go | 2 +-
pkg/apis/crunchydata.com/v1/register.go | 2 +-
pkg/apis/crunchydata.com/v1/replica.go | 2 +-
pkg/apis/crunchydata.com/v1/task.go | 2 +-
pkg/apis/crunchydata.com/v1/zz_generated.deepcopy.go | 2 +-
pkg/apiservermsgs/backrestmsgs.go | 2 +-
pkg/apiservermsgs/catmsgs.go | 2 +-
pkg/apiservermsgs/clonemsgs.go | 2 +-
pkg/apiservermsgs/clustermsgs.go | 2 +-
pkg/apiservermsgs/common.go | 2 +-
pkg/apiservermsgs/configmsgs.go | 2 +-
pkg/apiservermsgs/dfmsgs.go | 2 +-
pkg/apiservermsgs/failovermsgs.go | 2 +-
pkg/apiservermsgs/labelmsgs.go | 2 +-
pkg/apiservermsgs/namespacemsgs.go | 2 +-
pkg/apiservermsgs/pgadminmsgs.go | 2 +-
pkg/apiservermsgs/pgbouncermsgs.go | 2 +-
pkg/apiservermsgs/pgdumpmsgs.go | 2 +-
pkg/apiservermsgs/pgorolemsgs.go | 2 +-
pkg/apiservermsgs/pgousermsgs.go | 2 +-
pkg/apiservermsgs/policymsgs.go | 2 +-
pkg/apiservermsgs/pvcmsgs.go | 2 +-
pkg/apiservermsgs/reloadmsgs.go | 2 +-
pkg/apiservermsgs/restartmsgs.go | 2 +-
pkg/apiservermsgs/schedulemsgs.go | 2 +-
pkg/apiservermsgs/statusmsgs.go | 2 +-
pkg/apiservermsgs/upgrademsgs.go | 2 +-
pkg/apiservermsgs/usermsgs.go | 2 +-
pkg/apiservermsgs/usermsgs_test.go | 2 +-
pkg/apiservermsgs/versionmsgs.go | 2 +-
pkg/apiservermsgs/watchmsgs.go | 2 +-
pkg/apiservermsgs/workflowmsgs.go | 2 +-
pkg/events/eventing.go | 2 +-
pkg/events/eventtype.go | 2 +-
pkg/events/pgoeventtype.go | 2 +-
pkg/generated/clientset/versioned/clientset.go | 2 +-
pkg/generated/clientset/versioned/doc.go | 2 +-
pkg/generated/clientset/versioned/fake/clientset_generated.go | 2 +-
pkg/generated/clientset/versioned/fake/doc.go | 2 +-
pkg/generated/clientset/versioned/fake/register.go | 2 +-
pkg/generated/clientset/versioned/scheme/doc.go | 2 +-
pkg/generated/clientset/versioned/scheme/register.go | 2 +-
.../typed/crunchydata.com/v1/crunchydata.com_client.go | 2 +-
.../clientset/versioned/typed/crunchydata.com/v1/doc.go | 2 +-
.../clientset/versioned/typed/crunchydata.com/v1/fake/doc.go | 2 +-
.../crunchydata.com/v1/fake/fake_crunchydata.com_client.go | 2 +-
.../versioned/typed/crunchydata.com/v1/fake/fake_pgcluster.go | 2 +-
.../versioned/typed/crunchydata.com/v1/fake/fake_pgpolicy.go | 2 +-
.../versioned/typed/crunchydata.com/v1/fake/fake_pgreplica.go | 2 +-
.../versioned/typed/crunchydata.com/v1/fake/fake_pgtask.go | 2 +-
.../versioned/typed/crunchydata.com/v1/generated_expansion.go | 2 +-
.../clientset/versioned/typed/crunchydata.com/v1/pgcluster.go | 2 +-
.../clientset/versioned/typed/crunchydata.com/v1/pgpolicy.go | 2 +-
.../clientset/versioned/typed/crunchydata.com/v1/pgreplica.go | 2 +-
.../clientset/versioned/typed/crunchydata.com/v1/pgtask.go | 2 +-
.../informers/externalversions/crunchydata.com/interface.go | 2 +-
.../informers/externalversions/crunchydata.com/v1/interface.go | 2 +-
.../informers/externalversions/crunchydata.com/v1/pgcluster.go | 2 +-
.../informers/externalversions/crunchydata.com/v1/pgpolicy.go | 2 +-
.../informers/externalversions/crunchydata.com/v1/pgreplica.go | 2 +-
.../informers/externalversions/crunchydata.com/v1/pgtask.go | 2 +-
pkg/generated/informers/externalversions/factory.go | 2 +-
pkg/generated/informers/externalversions/generic.go | 2 +-
.../externalversions/internalinterfaces/factory_interfaces.go | 2 +-
pkg/generated/listers/crunchydata.com/v1/expansion_generated.go | 2 +-
pkg/generated/listers/crunchydata.com/v1/pgcluster.go | 2 +-
pkg/generated/listers/crunchydata.com/v1/pgpolicy.go | 2 +-
pkg/generated/listers/crunchydata.com/v1/pgreplica.go | 2 +-
pkg/generated/listers/crunchydata.com/v1/pgtask.go | 2 +-
postgres-operator.go | 2 +-
pv/create-pv-nfs-label.sh | 2 +-
pv/create-pv-nfs-legacy.sh | 2 +-
pv/create-pv-nfs.sh | 2 +-
pv/create-pv.sh | 2 +-
pv/delete-pv.sh | 2 +-
testing/pgo_cli/cluster_backup_test.go | 2 +-
testing/pgo_cli/cluster_cat_test.go | 2 +-
testing/pgo_cli/cluster_clone_test.go | 2 +-
testing/pgo_cli/cluster_create_test.go | 2 +-
testing/pgo_cli/cluster_delete_test.go | 2 +-
testing/pgo_cli/cluster_df_test.go | 2 +-
testing/pgo_cli/cluster_failover_test.go | 2 +-
testing/pgo_cli/cluster_label_test.go | 2 +-
testing/pgo_cli/cluster_pgbouncer_test.go | 2 +-
testing/pgo_cli/cluster_policy_test.go | 2 +-
testing/pgo_cli/cluster_pvc_test.go | 2 +-
testing/pgo_cli/cluster_reload_test.go | 2 +-
testing/pgo_cli/cluster_restart_test.go | 2 +-
testing/pgo_cli/cluster_scale_test.go | 2 +-
testing/pgo_cli/cluster_scaledown_test.go | 2 +-
testing/pgo_cli/cluster_test_test.go | 2 +-
testing/pgo_cli/cluster_user_test.go | 2 +-
testing/pgo_cli/operator_namespace_test.go | 2 +-
testing/pgo_cli/operator_rbac_test.go | 2 +-
testing/pgo_cli/operator_test.go | 2 +-
testing/pgo_cli/suite_helpers_test.go | 2 +-
testing/pgo_cli/suite_pgo_cmd_test.go | 2 +-
testing/pgo_cli/suite_test.go | 2 +-
401 files changed, 401 insertions(+), 401 deletions(-)
diff --git a/LICENSE.md b/LICENSE.md
index 90fe0562e2..f8ebe3dacd 100644
--- a/LICENSE.md
+++ b/LICENSE.md
@@ -176,7 +176,7 @@
END OF TERMS AND CONDITIONS
- Copyright 2017 - 2020 Crunchy Data Solutions, Inc.
+ Copyright 2017 - 2021 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.
diff --git a/apiserver.go b/apiserver.go
index 2c3858bb63..3df9608796 100644
--- a/apiserver.go
+++ b/apiserver.go
@@ -1,7 +1,7 @@
package main
/*
- Copyright 2017 - 2020 Crunchy Data Solutions, Inc.
+ Copyright 2017 - 2021 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..a42a618eb1 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 - 2021 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 2a0d543b70..95c6d55ab8 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 - 2021 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-deps.sh b/bin/get-deps.sh
index a0fddd048e..6c3e39324e 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 - 2021 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 cfc178e77d..b6cceb2af4 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 - 2021 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-sync/pgo-backrest-repo-sync.sh b/bin/pgo-backrest-repo-sync/pgo-backrest-repo-sync.sh
index 53e98e3a2e..f4bf1f1709 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 - 2021 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..925e5808a3 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 - 2021 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..a0373b7a96 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 - 2021 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..86f758a50a 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 - 2021 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..1602e56193 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 - 2021 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..228f891694 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 - 2021 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..4549d82d57 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 - 2021 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..01422d26d7 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 - 2021 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..91cfcb9dc8 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 - 2021 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..a180a7a472 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 - 2021 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 59e2e329e8..d476c07b0b 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 - 2021 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-to-gcr.sh b/bin/push-to-gcr.sh
index f8293d9159..f0467affdb 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 - 2021 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..bc988bae79 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 - 2021 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..f852008890 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 - 2021 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-reconcile-rbac.sh b/deploy/add-targeted-namespace-reconcile-rbac.sh
index 8438c10912..533e8507f9 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 - 2021 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..61647e9feb 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 - 2021 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..169bae6853 100755
--- a/deploy/cleannamespaces.sh
+++ b/deploy/cleannamespaces.sh
@@ -1,6 +1,6 @@
#!/bin/bash
-# Copyright 2019 - 2020 Crunchy Data Solutions, Inc.
+# Copyright 2019 - 2021 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..df60c14500 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 - 2021 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..711e276823 100755
--- a/deploy/cleanup.sh
+++ b/deploy/cleanup.sh
@@ -1,5 +1,5 @@
#!/bin/bash
-# Copyright 2017 - 2020 Crunchy Data Solutions, Inc.
+# Copyright 2017 - 2021 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/deploy.sh b/deploy/deploy.sh
index 823671c7d9..139bba7c08 100755
--- a/deploy/deploy.sh
+++ b/deploy/deploy.sh
@@ -1,5 +1,5 @@
#!/bin/bash
-# Copyright 2017 - 2020 Crunchy Data Solutions, Inc.
+# Copyright 2017 - 2021 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/gen-api-keys.sh b/deploy/gen-api-keys.sh
index 8aece10000..a5444a9020 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 - 2021 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..e25253104c 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 - 2021 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-rbac.sh b/deploy/install-rbac.sh
index d96532d9f1..ec7a4d7d49 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 - 2021 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/remove-crd.sh b/deploy/remove-crd.sh
index 764645264f..f14bbfd022 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 - 2021 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/setupnamespaces.sh b/deploy/setupnamespaces.sh
index 9d2188a56f..08aade3518 100755
--- a/deploy/setupnamespaces.sh
+++ b/deploy/setupnamespaces.sh
@@ -1,6 +1,6 @@
#!/bin/bash
-# Copyright 2019 - 2020 Crunchy Data Solutions, Inc.
+# Copyright 2019 - 2021 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..091c2b6810 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 - 2021 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..dfea9c10c1 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 - 2021 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..0999cd9b79 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 - 2021 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/create-by-resource/run.sh b/examples/create-by-resource/run.sh
index e6940ead12..c450490734 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 - 2021 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/custom-config/create.sh b/examples/custom-config/create.sh
index df6c701f2a..5900132568 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 - 2021 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/custom-config/setup.sql b/examples/custom-config/setup.sql
index 206005eb8a..1a05bce487 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 - 2021 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/boilerplate.go.txt b/hack/boilerplate.go.txt
index 8aabc9a12b..e681957476 100644
--- a/hack/boilerplate.go.txt
+++ b/hack/boilerplate.go.txt
@@ -1,5 +1,5 @@
/*
-Copyright 2020 Crunchy Data Solutions, Inc.
+Copyright 2020 - 2021 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..6317c556a1 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 - 2021 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..97fb0aa383 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 - 2021 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..27eccb0eb1 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 - 2021 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/add-targeted-namespace.sh.j2 b/installers/ansible/roles/pgo-operator/templates/add-targeted-namespace.sh.j2
index 380a8a80b7..ec5e9e82d6 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 - 2021 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/bin/pgo-deploy.sh b/installers/image/bin/pgo-deploy.sh
index 9a965d58be..92fc955e9a 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 - 2021 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/kubectl/client-setup.sh b/installers/kubectl/client-setup.sh
index 496f25abd4..1504009506 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 - 2021 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/internal/apiserver/backrestservice/backrestimpl.go b/internal/apiserver/backrestservice/backrestimpl.go
index 5ce194a337..31dd01fe4b 100644
--- a/internal/apiserver/backrestservice/backrestimpl.go
+++ b/internal/apiserver/backrestservice/backrestimpl.go
@@ -1,7 +1,7 @@
package backrestservice
/*
-Copyright 2018 - 2020 Crunchy Data Solutions, Inc.
+Copyright 2018 - 2021 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/internal/apiserver/backrestservice/backrestservice.go b/internal/apiserver/backrestservice/backrestservice.go
index e436afb878..00f4aba481 100644
--- a/internal/apiserver/backrestservice/backrestservice.go
+++ b/internal/apiserver/backrestservice/backrestservice.go
@@ -1,7 +1,7 @@
package backrestservice
/*
-Copyright 2018 - 2020 Crunchy Data Solutions, Inc.
+Copyright 2018 - 2021 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/internal/apiserver/backupoptions/backupoptionsutil.go b/internal/apiserver/backupoptions/backupoptionsutil.go
index 196d0f1fa1..c1c3c69f1b 100644
--- a/internal/apiserver/backupoptions/backupoptionsutil.go
+++ b/internal/apiserver/backupoptions/backupoptionsutil.go
@@ -1,7 +1,7 @@
package backupoptions
/*
-Copyright 2019 - 2020 Crunchy Data Solutions, Inc.
+Copyright 2019 - 2021 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/internal/apiserver/backupoptions/pgbackrestoptions.go b/internal/apiserver/backupoptions/pgbackrestoptions.go
index 2c7a1e356e..ea932de517 100644
--- a/internal/apiserver/backupoptions/pgbackrestoptions.go
+++ b/internal/apiserver/backupoptions/pgbackrestoptions.go
@@ -1,7 +1,7 @@
package backupoptions
/*
-Copyright 2019 - 2020 Crunchy Data Solutions, Inc.
+Copyright 2019 - 2021 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/internal/apiserver/backupoptions/pgdumpoptions.go b/internal/apiserver/backupoptions/pgdumpoptions.go
index 268aa42412..bfbae16c23 100644
--- a/internal/apiserver/backupoptions/pgdumpoptions.go
+++ b/internal/apiserver/backupoptions/pgdumpoptions.go
@@ -1,7 +1,7 @@
package backupoptions
/*
-Copyright 2019 - 2020 Crunchy Data Solutions, Inc.
+Copyright 2019 - 2021 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/internal/apiserver/catservice/catimpl.go b/internal/apiserver/catservice/catimpl.go
index 6d656f7e9a..f3bd91ce9b 100644
--- a/internal/apiserver/catservice/catimpl.go
+++ b/internal/apiserver/catservice/catimpl.go
@@ -1,7 +1,7 @@
package catservice
/*
-Copyright 2019 - 2020 Crunchy Data Solutions, Inc.
+Copyright 2019 - 2021 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/internal/apiserver/catservice/catservice.go b/internal/apiserver/catservice/catservice.go
index 439274271e..9c34db38db 100644
--- a/internal/apiserver/catservice/catservice.go
+++ b/internal/apiserver/catservice/catservice.go
@@ -1,7 +1,7 @@
package catservice
/*
-Copyright 2019 - 2020 Crunchy Data Solutions, Inc.
+Copyright 2019 - 2021 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/internal/apiserver/cloneservice/cloneimpl.go b/internal/apiserver/cloneservice/cloneimpl.go
index 4eeb4ac8ac..452c201d09 100644
--- a/internal/apiserver/cloneservice/cloneimpl.go
+++ b/internal/apiserver/cloneservice/cloneimpl.go
@@ -1,7 +1,7 @@
package cloneservice
/*
-Copyright 2019 - 2020 Crunchy Data Solutions, Inc.
+Copyright 2019 - 2021 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/internal/apiserver/cloneservice/cloneservice.go b/internal/apiserver/cloneservice/cloneservice.go
index f98a5f439d..7bf035e94f 100644
--- a/internal/apiserver/cloneservice/cloneservice.go
+++ b/internal/apiserver/cloneservice/cloneservice.go
@@ -1,7 +1,7 @@
package cloneservice
/*
-Copyright 2017 - 2020 Crunchy Data Solutions, Inc.
+Copyright 2017 - 2021 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/internal/apiserver/clusterservice/clusterimpl.go b/internal/apiserver/clusterservice/clusterimpl.go
index 565ce20a1f..b089162368 100644
--- a/internal/apiserver/clusterservice/clusterimpl.go
+++ b/internal/apiserver/clusterservice/clusterimpl.go
@@ -1,7 +1,7 @@
package clusterservice
/*
-Copyright 2017 - 2020 Crunchy Data Solutions, Inc.
+Copyright 2017 - 2021 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/internal/apiserver/clusterservice/clusterservice.go b/internal/apiserver/clusterservice/clusterservice.go
index d0f31df636..eac046a580 100644
--- a/internal/apiserver/clusterservice/clusterservice.go
+++ b/internal/apiserver/clusterservice/clusterservice.go
@@ -1,7 +1,7 @@
package clusterservice
/*
-Copyright 2017 - 2020 Crunchy Data Solutions, Inc.
+Copyright 2017 - 2021 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/internal/apiserver/clusterservice/scaleimpl.go b/internal/apiserver/clusterservice/scaleimpl.go
index 6e3c7e975b..11fe1e55f6 100644
--- a/internal/apiserver/clusterservice/scaleimpl.go
+++ b/internal/apiserver/clusterservice/scaleimpl.go
@@ -1,7 +1,7 @@
package clusterservice
/*
-Copyright 2017 - 2020 Crunchy Data Solutions, Inc.
+Copyright 2017 - 2021 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/internal/apiserver/clusterservice/scaleservice.go b/internal/apiserver/clusterservice/scaleservice.go
index 92db853216..bb742691e7 100644
--- a/internal/apiserver/clusterservice/scaleservice.go
+++ b/internal/apiserver/clusterservice/scaleservice.go
@@ -1,7 +1,7 @@
package clusterservice
/*
-Copyright 2017 - 2020 Crunchy Data Solutions, Inc.
+Copyright 2017 - 2021 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/internal/apiserver/common.go b/internal/apiserver/common.go
index b171b8ce6a..d4dffc8368 100644
--- a/internal/apiserver/common.go
+++ b/internal/apiserver/common.go
@@ -1,7 +1,7 @@
package apiserver
/*
-Copyright 2018 - 2020 Crunchy Data Solutions, Inc.
+Copyright 2018 - 2021 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/internal/apiserver/common_test.go b/internal/apiserver/common_test.go
index da909d2ba6..6ec95b7066 100644
--- a/internal/apiserver/common_test.go
+++ b/internal/apiserver/common_test.go
@@ -1,7 +1,7 @@
package apiserver
/*
-Copyright 2018 - 2020 Crunchy Data Solutions, Inc.
+Copyright 2018 - 2021 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/internal/apiserver/configservice/configimpl.go b/internal/apiserver/configservice/configimpl.go
index 76d891d5ed..dc7ec2274c 100644
--- a/internal/apiserver/configservice/configimpl.go
+++ b/internal/apiserver/configservice/configimpl.go
@@ -1,7 +1,7 @@
package configservice
/*
-Copyright 2018 - 2020 Crunchy Data Solutions, Inc.
+Copyright 2018 - 2021 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/internal/apiserver/configservice/configservice.go b/internal/apiserver/configservice/configservice.go
index 1f70934888..92a296ac3f 100644
--- a/internal/apiserver/configservice/configservice.go
+++ b/internal/apiserver/configservice/configservice.go
@@ -1,7 +1,7 @@
package configservice
/*
-Copyright 2018 - 2020 Crunchy Data Solutions, Inc.
+Copyright 2018 - 2021 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/internal/apiserver/dfservice/dfimpl.go b/internal/apiserver/dfservice/dfimpl.go
index fe1bbd3529..e9e62df216 100644
--- a/internal/apiserver/dfservice/dfimpl.go
+++ b/internal/apiserver/dfservice/dfimpl.go
@@ -1,7 +1,7 @@
package dfservice
/*
-Copyright 2018 - 2020 Crunchy Data Solutions, Inc.
+Copyright 2018 - 2021 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/internal/apiserver/dfservice/dfservice.go b/internal/apiserver/dfservice/dfservice.go
index 325e20257a..3a71e9feab 100644
--- a/internal/apiserver/dfservice/dfservice.go
+++ b/internal/apiserver/dfservice/dfservice.go
@@ -1,7 +1,7 @@
package dfservice
/*
-Copyright 2018 - 2020 Crunchy Data Solutions, Inc.
+Copyright 2018 - 2021 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/internal/apiserver/failoverservice/failoverimpl.go b/internal/apiserver/failoverservice/failoverimpl.go
index 0a988a3027..cd40406e5c 100644
--- a/internal/apiserver/failoverservice/failoverimpl.go
+++ b/internal/apiserver/failoverservice/failoverimpl.go
@@ -1,7 +1,7 @@
package failoverservice
/*
-Copyright 2018 - 2020 Crunchy Data Solutions, Inc.
+Copyright 2018 - 2021 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/internal/apiserver/failoverservice/failoverservice.go b/internal/apiserver/failoverservice/failoverservice.go
index 164d7b1545..e80d7e05de 100644
--- a/internal/apiserver/failoverservice/failoverservice.go
+++ b/internal/apiserver/failoverservice/failoverservice.go
@@ -1,7 +1,7 @@
package failoverservice
/*
-Copyright 2018 - 2020 Crunchy Data Solutions, Inc.
+Copyright 2018 - 2021 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/internal/apiserver/labelservice/labelimpl.go b/internal/apiserver/labelservice/labelimpl.go
index bd6e26da3d..8c47701931 100644
--- a/internal/apiserver/labelservice/labelimpl.go
+++ b/internal/apiserver/labelservice/labelimpl.go
@@ -1,7 +1,7 @@
package labelservice
/*
-Copyright 2017 - 2020 Crunchy Data Solutions, Inc.
+Copyright 2017 - 2021 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/internal/apiserver/labelservice/labelservice.go b/internal/apiserver/labelservice/labelservice.go
index f13054fd17..5921a7633b 100644
--- a/internal/apiserver/labelservice/labelservice.go
+++ b/internal/apiserver/labelservice/labelservice.go
@@ -1,7 +1,7 @@
package labelservice
/*
-Copyright 2017 - 2020 Crunchy Data Solutions, Inc.
+Copyright 2017 - 2021 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/internal/apiserver/middleware.go b/internal/apiserver/middleware.go
index fc7e60e8e2..58a1fcd77d 100644
--- a/internal/apiserver/middleware.go
+++ b/internal/apiserver/middleware.go
@@ -1,7 +1,7 @@
package apiserver
/*
-Copyright 2019 - 2020 Crunchy Data Solutions, Inc.
+Copyright 2019 - 2021 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/internal/apiserver/namespaceservice/namespaceimpl.go b/internal/apiserver/namespaceservice/namespaceimpl.go
index 04b6671f26..281bb5d085 100644
--- a/internal/apiserver/namespaceservice/namespaceimpl.go
+++ b/internal/apiserver/namespaceservice/namespaceimpl.go
@@ -1,7 +1,7 @@
package namespaceservice
/*
-Copyright 2019 - 2020 Crunchy Data Solutions, Inc.
+Copyright 2019 - 2021 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/internal/apiserver/namespaceservice/namespaceservice.go b/internal/apiserver/namespaceservice/namespaceservice.go
index 1e27294c96..1e348218fa 100644
--- a/internal/apiserver/namespaceservice/namespaceservice.go
+++ b/internal/apiserver/namespaceservice/namespaceservice.go
@@ -1,7 +1,7 @@
package namespaceservice
/*
-Copyright 2019 - 2020 Crunchy Data Solutions, Inc.
+Copyright 2019 - 2021 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/internal/apiserver/perms.go b/internal/apiserver/perms.go
index d8796c8590..db4861fe7e 100644
--- a/internal/apiserver/perms.go
+++ b/internal/apiserver/perms.go
@@ -1,7 +1,7 @@
package apiserver
/*
-Copyright 2018 - 2020 Crunchy Data Solutions, Inc.
+Copyright 2018 - 2021 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/internal/apiserver/pgadminservice/pgadminimpl.go b/internal/apiserver/pgadminservice/pgadminimpl.go
index 5ca4aa8a1a..2ac3130a8f 100644
--- a/internal/apiserver/pgadminservice/pgadminimpl.go
+++ b/internal/apiserver/pgadminservice/pgadminimpl.go
@@ -1,7 +1,7 @@
package pgadminservice
/*
-Copyright 2020 Crunchy Data Solutions, Inc.
+Copyright 2020 - 2021 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/internal/apiserver/pgadminservice/pgadminservice.go b/internal/apiserver/pgadminservice/pgadminservice.go
index 90378868ca..44fe32f6b7 100644
--- a/internal/apiserver/pgadminservice/pgadminservice.go
+++ b/internal/apiserver/pgadminservice/pgadminservice.go
@@ -1,7 +1,7 @@
package pgadminservice
/*
-Copyright 2020 Crunchy Data Solutions, Inc.
+Copyright 2020 - 2021 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/internal/apiserver/pgbouncerservice/pgbouncerimpl.go b/internal/apiserver/pgbouncerservice/pgbouncerimpl.go
index bab470b00a..e7ef6ff768 100644
--- a/internal/apiserver/pgbouncerservice/pgbouncerimpl.go
+++ b/internal/apiserver/pgbouncerservice/pgbouncerimpl.go
@@ -1,7 +1,7 @@
package pgbouncerservice
/*
-Copyright 2018 - 2020 Crunchy Data Solutions, Inc.
+Copyright 2018 - 2021 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/internal/apiserver/pgbouncerservice/pgbouncerservice.go b/internal/apiserver/pgbouncerservice/pgbouncerservice.go
index 969aabd205..54fa6b3dae 100644
--- a/internal/apiserver/pgbouncerservice/pgbouncerservice.go
+++ b/internal/apiserver/pgbouncerservice/pgbouncerservice.go
@@ -1,7 +1,7 @@
package pgbouncerservice
/*
-Copyright 2018 - 2020 Crunchy Data Solutions, Inc.
+Copyright 2018 - 2021 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/internal/apiserver/pgdumpservice/pgdumpimpl.go b/internal/apiserver/pgdumpservice/pgdumpimpl.go
index ecad14f7fd..2297a99242 100644
--- a/internal/apiserver/pgdumpservice/pgdumpimpl.go
+++ b/internal/apiserver/pgdumpservice/pgdumpimpl.go
@@ -1,7 +1,7 @@
package pgdumpservice
/*
-Copyright 2019 - 2020 Crunchy Data Solutions, Inc.
+Copyright 2019 - 2021 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/internal/apiserver/pgdumpservice/pgdumpservice.go b/internal/apiserver/pgdumpservice/pgdumpservice.go
index 755a9bbd98..a31a2a788a 100644
--- a/internal/apiserver/pgdumpservice/pgdumpservice.go
+++ b/internal/apiserver/pgdumpservice/pgdumpservice.go
@@ -1,7 +1,7 @@
package pgdumpservice
/*
-Copyright 2019 - 2020 Crunchy Data Solutions, Inc.
+Copyright 2019 - 2021 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/internal/apiserver/pgoroleservice/pgoroleimpl.go b/internal/apiserver/pgoroleservice/pgoroleimpl.go
index 633d0c3660..5d9e1c7c2c 100644
--- a/internal/apiserver/pgoroleservice/pgoroleimpl.go
+++ b/internal/apiserver/pgoroleservice/pgoroleimpl.go
@@ -1,7 +1,7 @@
package pgoroleservice
/*
-Copyright 2019 - 2020 Crunchy Data Solutions, Inc.
+Copyright 2019 - 2021 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/internal/apiserver/pgoroleservice/pgoroleservice.go b/internal/apiserver/pgoroleservice/pgoroleservice.go
index b3e3413e09..9b9c70b061 100644
--- a/internal/apiserver/pgoroleservice/pgoroleservice.go
+++ b/internal/apiserver/pgoroleservice/pgoroleservice.go
@@ -1,7 +1,7 @@
package pgoroleservice
/*
-Copyright 2019 - 2020 Crunchy Data Solutions, Inc.
+Copyright 2019 - 2021 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/internal/apiserver/pgouserservice/pgouserimpl.go b/internal/apiserver/pgouserservice/pgouserimpl.go
index 6e0c061467..f7627c47cf 100644
--- a/internal/apiserver/pgouserservice/pgouserimpl.go
+++ b/internal/apiserver/pgouserservice/pgouserimpl.go
@@ -1,7 +1,7 @@
package pgouserservice
/*
-Copyright 2019 - 2020 Crunchy Data Solutions, Inc.
+Copyright 2019 - 2021 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/internal/apiserver/pgouserservice/pgouserservice.go b/internal/apiserver/pgouserservice/pgouserservice.go
index ccf1b1ce8f..1abaf309d6 100644
--- a/internal/apiserver/pgouserservice/pgouserservice.go
+++ b/internal/apiserver/pgouserservice/pgouserservice.go
@@ -1,7 +1,7 @@
package pgouserservice
/*
-Copyright 2019 - 2020 Crunchy Data Solutions, Inc.
+Copyright 2019 - 2021 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/internal/apiserver/policyservice/policyimpl.go b/internal/apiserver/policyservice/policyimpl.go
index aff08b0e36..8fb0c3d751 100644
--- a/internal/apiserver/policyservice/policyimpl.go
+++ b/internal/apiserver/policyservice/policyimpl.go
@@ -1,7 +1,7 @@
package policyservice
/*
-Copyright 2017 - 2020 Crunchy Data Solutions, Inc.
+Copyright 2017 - 2021 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/internal/apiserver/policyservice/policyservice.go b/internal/apiserver/policyservice/policyservice.go
index d2a3d6234f..874c6c4ff9 100644
--- a/internal/apiserver/policyservice/policyservice.go
+++ b/internal/apiserver/policyservice/policyservice.go
@@ -1,7 +1,7 @@
package policyservice
/*
-Copyright 2017 - 2020 Crunchy Data Solutions, Inc.
+Copyright 2017 - 2021 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/internal/apiserver/pvcservice/pvcimpl.go b/internal/apiserver/pvcservice/pvcimpl.go
index 734c21fa4c..ca07a3e8d9 100644
--- a/internal/apiserver/pvcservice/pvcimpl.go
+++ b/internal/apiserver/pvcservice/pvcimpl.go
@@ -1,7 +1,7 @@
package pvcservice
/*
-Copyright 2017 - 2020 Crunchy Data Solutions, Inc.
+Copyright 2017 - 2021 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/internal/apiserver/pvcservice/pvcservice.go b/internal/apiserver/pvcservice/pvcservice.go
index a12979cb3c..de24ab7616 100644
--- a/internal/apiserver/pvcservice/pvcservice.go
+++ b/internal/apiserver/pvcservice/pvcservice.go
@@ -1,7 +1,7 @@
package pvcservice
/*
-Copyright 2017 - 2020 Crunchy Data Solutions, Inc.
+Copyright 2017 - 2021 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/internal/apiserver/reloadservice/reloadimpl.go b/internal/apiserver/reloadservice/reloadimpl.go
index 08bc21430e..da68706a90 100644
--- a/internal/apiserver/reloadservice/reloadimpl.go
+++ b/internal/apiserver/reloadservice/reloadimpl.go
@@ -1,7 +1,7 @@
package reloadservice
/*
-Copyright 2018 - 2020 Crunchy Data Solutions, Inc.
+Copyright 2018 - 2021 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/internal/apiserver/reloadservice/reloadservice.go b/internal/apiserver/reloadservice/reloadservice.go
index 9d1096c3c9..e464a7991e 100644
--- a/internal/apiserver/reloadservice/reloadservice.go
+++ b/internal/apiserver/reloadservice/reloadservice.go
@@ -1,7 +1,7 @@
package reloadservice
/*
-Copyright 2018 - 2020 Crunchy Data Solutions, Inc.
+Copyright 2018 - 2021 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/internal/apiserver/restartservice/restartimpl.go b/internal/apiserver/restartservice/restartimpl.go
index 51c172e91f..ffb5e4f692 100644
--- a/internal/apiserver/restartservice/restartimpl.go
+++ b/internal/apiserver/restartservice/restartimpl.go
@@ -1,7 +1,7 @@
package restartservice
/*
-Copyright 2020 Crunchy Data Solutions, Inc.
+Copyright 2020 - 2021 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/internal/apiserver/restartservice/restartservice.go b/internal/apiserver/restartservice/restartservice.go
index a1bfb97194..460635bec1 100644
--- a/internal/apiserver/restartservice/restartservice.go
+++ b/internal/apiserver/restartservice/restartservice.go
@@ -1,7 +1,7 @@
package restartservice
/*
-Copyright 2020 Crunchy Data Solutions, Inc.
+Copyright 2020 - 2021 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/internal/apiserver/root.go b/internal/apiserver/root.go
index bff09ceb9d..c76a93f0ff 100644
--- a/internal/apiserver/root.go
+++ b/internal/apiserver/root.go
@@ -1,7 +1,7 @@
package apiserver
/*
-Copyright 2017 - 2020 Crunchy Data Solutions, Inc.
+Copyright 2017 - 2021 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/internal/apiserver/routing/doc.go b/internal/apiserver/routing/doc.go
index e985fd4280..2807dfb978 100644
--- a/internal/apiserver/routing/doc.go
+++ b/internal/apiserver/routing/doc.go
@@ -1,5 +1,5 @@
/*
-Copyright 2019 - 2020 Crunchy Data Solutions, Inc.
+Copyright 2019 - 2021 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/internal/apiserver/routing/routes.go b/internal/apiserver/routing/routes.go
index 0198efaaf8..3488ee9f25 100644
--- a/internal/apiserver/routing/routes.go
+++ b/internal/apiserver/routing/routes.go
@@ -1,7 +1,7 @@
package routing
/*
-Copyright 2019 - 2020 Crunchy Data Solutions, Inc.
+Copyright 2019 - 2021 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/internal/apiserver/scheduleservice/scheduleimpl.go b/internal/apiserver/scheduleservice/scheduleimpl.go
index 96e134949c..1ecc2992ec 100644
--- a/internal/apiserver/scheduleservice/scheduleimpl.go
+++ b/internal/apiserver/scheduleservice/scheduleimpl.go
@@ -1,7 +1,7 @@
package scheduleservice
/*
- Copyright 2018 - 2020 Crunchy Data Solutions, Inc.
+ Copyright 2018 - 2021 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/internal/apiserver/scheduleservice/scheduleservice.go b/internal/apiserver/scheduleservice/scheduleservice.go
index b88fa16d7e..52f00bbe14 100644
--- a/internal/apiserver/scheduleservice/scheduleservice.go
+++ b/internal/apiserver/scheduleservice/scheduleservice.go
@@ -1,7 +1,7 @@
package scheduleservice
/*
-Copyright 2018 - 2020 Crunchy Data Solutions, Inc.
+Copyright 2018 - 2021 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/internal/apiserver/statusservice/statusimpl.go b/internal/apiserver/statusservice/statusimpl.go
index 64c55f62e7..5388842d39 100644
--- a/internal/apiserver/statusservice/statusimpl.go
+++ b/internal/apiserver/statusservice/statusimpl.go
@@ -1,7 +1,7 @@
package statusservice
/*
-Copyright 2018 - 2020 Crunchy Data Solutions, Inc.
+Copyright 2018 - 2021 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/internal/apiserver/statusservice/statusservice.go b/internal/apiserver/statusservice/statusservice.go
index ecab0047c2..2dd232dc4c 100644
--- a/internal/apiserver/statusservice/statusservice.go
+++ b/internal/apiserver/statusservice/statusservice.go
@@ -1,7 +1,7 @@
package statusservice
/*
-Copyright 2018 - 2020 Crunchy Data Solutions, Inc.
+Copyright 2018 - 2021 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/internal/apiserver/upgradeservice/upgradeimpl.go b/internal/apiserver/upgradeservice/upgradeimpl.go
index 04758d2d34..a157c34d30 100644
--- a/internal/apiserver/upgradeservice/upgradeimpl.go
+++ b/internal/apiserver/upgradeservice/upgradeimpl.go
@@ -1,7 +1,7 @@
package upgradeservice
/*
-Copyright 2017 - 2020 Crunchy Data Solutions, Inc.
+Copyright 2017 - 2021 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/internal/apiserver/upgradeservice/upgradeservice.go b/internal/apiserver/upgradeservice/upgradeservice.go
index dee9c68dc2..7f6e1cd350 100644
--- a/internal/apiserver/upgradeservice/upgradeservice.go
+++ b/internal/apiserver/upgradeservice/upgradeservice.go
@@ -1,7 +1,7 @@
package upgradeservice
/*
-Copyright 2017 - 2020 Crunchy Data Solutions, Inc.
+Copyright 2017 - 2021 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/internal/apiserver/userservice/userimpl.go b/internal/apiserver/userservice/userimpl.go
index f3bad44677..b4b5698b48 100644
--- a/internal/apiserver/userservice/userimpl.go
+++ b/internal/apiserver/userservice/userimpl.go
@@ -1,7 +1,7 @@
package userservice
/*
-Copyright 2017 - 2020 Crunchy Data Solutions, Inc.
+Copyright 2017 - 2021 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/internal/apiserver/userservice/userimpl_test.go b/internal/apiserver/userservice/userimpl_test.go
index 71d3aa5fcf..ba6f378c0d 100644
--- a/internal/apiserver/userservice/userimpl_test.go
+++ b/internal/apiserver/userservice/userimpl_test.go
@@ -1,7 +1,7 @@
package userservice
/*
- Copyright 2020 Crunchy Data Solutions, Inc.
+ Copyright 2020 - 2021 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/internal/apiserver/userservice/userservice.go b/internal/apiserver/userservice/userservice.go
index 83994c90fa..709105daae 100644
--- a/internal/apiserver/userservice/userservice.go
+++ b/internal/apiserver/userservice/userservice.go
@@ -1,7 +1,7 @@
package userservice
/*
-Copyright 2017 - 2020 Crunchy Data Solutions, Inc.
+Copyright 2017 - 2021 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/internal/apiserver/versionservice/versionimpl.go b/internal/apiserver/versionservice/versionimpl.go
index d2341d4e93..959cfae669 100644
--- a/internal/apiserver/versionservice/versionimpl.go
+++ b/internal/apiserver/versionservice/versionimpl.go
@@ -1,7 +1,7 @@
package versionservice
/*
-Copyright 2017 - 2020 Crunchy Data Solutions, Inc.
+Copyright 2017 - 2021 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/internal/apiserver/versionservice/versionservice.go b/internal/apiserver/versionservice/versionservice.go
index 49735dff1a..5affd301dd 100644
--- a/internal/apiserver/versionservice/versionservice.go
+++ b/internal/apiserver/versionservice/versionservice.go
@@ -1,7 +1,7 @@
package versionservice
/*
-Copyright 2017 - 2020 Crunchy Data Solutions, Inc.
+Copyright 2017 - 2021 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/internal/apiserver/workflowservice/workflowimpl.go b/internal/apiserver/workflowservice/workflowimpl.go
index 13c5f342a8..1f0742704b 100644
--- a/internal/apiserver/workflowservice/workflowimpl.go
+++ b/internal/apiserver/workflowservice/workflowimpl.go
@@ -1,7 +1,7 @@
package workflowservice
/*
-Copyright 2018 - 2020 Crunchy Data Solutions, Inc.
+Copyright 2018 - 2021 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/internal/apiserver/workflowservice/workflowservice.go b/internal/apiserver/workflowservice/workflowservice.go
index 81aea9ff98..168937d31d 100644
--- a/internal/apiserver/workflowservice/workflowservice.go
+++ b/internal/apiserver/workflowservice/workflowservice.go
@@ -1,7 +1,7 @@
package workflowservice
/*
-Copyright 2018 - 2020 Crunchy Data Solutions, Inc.
+Copyright 2018 - 2021 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/internal/config/annotations.go b/internal/config/annotations.go
index eb474738eb..d8c872e879 100644
--- a/internal/config/annotations.go
+++ b/internal/config/annotations.go
@@ -1,7 +1,7 @@
package config
/*
- Copyright 2019 - 2020 Crunchy Data Solutions, Inc.
+ Copyright 2019 - 2021 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/internal/config/defaults.go b/internal/config/defaults.go
index d86e404eb7..776dfd7c90 100644
--- a/internal/config/defaults.go
+++ b/internal/config/defaults.go
@@ -1,7 +1,7 @@
package config
/*
- Copyright 2020 Crunchy Data Solutions, Inc.
+ Copyright 2020 - 2021 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/internal/config/images.go b/internal/config/images.go
index 905e46579c..455677bb13 100644
--- a/internal/config/images.go
+++ b/internal/config/images.go
@@ -1,7 +1,7 @@
package config
/*
- Copyright 2019 - 2020 Crunchy Data Solutions, Inc.
+ Copyright 2019 - 2021 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/internal/config/labels.go b/internal/config/labels.go
index 6d20c72742..4ef9676a33 100644
--- a/internal/config/labels.go
+++ b/internal/config/labels.go
@@ -1,7 +1,7 @@
package config
/*
- Copyright 2019 - 2020 Crunchy Data Solutions, Inc.
+ Copyright 2019 - 2021 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/internal/config/pgoconfig.go b/internal/config/pgoconfig.go
index 6f5ea07b29..8d3f1d7790 100644
--- a/internal/config/pgoconfig.go
+++ b/internal/config/pgoconfig.go
@@ -1,7 +1,7 @@
package config
/*
-Copyright 2018 - 2020 Crunchy Data Solutions, Inc.
+Copyright 2018 - 2021 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/internal/config/volumes.go b/internal/config/volumes.go
index d21c2d6a4e..4738d682c1 100644
--- a/internal/config/volumes.go
+++ b/internal/config/volumes.go
@@ -1,7 +1,7 @@
package config
/*
- Copyright 2019 - 2020 Crunchy Data Solutions, Inc.
+ Copyright 2019 - 2021 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/internal/controller/configmap/configmapcontroller.go b/internal/controller/configmap/configmapcontroller.go
index a7145ea6bf..9c9710c345 100644
--- a/internal/controller/configmap/configmapcontroller.go
+++ b/internal/controller/configmap/configmapcontroller.go
@@ -1,7 +1,7 @@
package configmap
/*
-Copyright 2020 Crunchy Data Solutions, Inc.
+Copyright 2020 - 2021 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/internal/controller/configmap/synchandler.go b/internal/controller/configmap/synchandler.go
index 9309c0555c..289a6c0afa 100644
--- a/internal/controller/configmap/synchandler.go
+++ b/internal/controller/configmap/synchandler.go
@@ -1,7 +1,7 @@
package configmap
/*
-Copyright 2020 Crunchy Data Solutions, Inc.
+Copyright 2020 - 2021 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/internal/controller/controllerutil.go b/internal/controller/controllerutil.go
index bf54f98fce..db67bb1e56 100644
--- a/internal/controller/controllerutil.go
+++ b/internal/controller/controllerutil.go
@@ -1,7 +1,7 @@
package controller
/*
-Copyright 2020 Crunchy Data Solutions, Inc.
+Copyright 2020 - 2021 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/internal/controller/job/backresthandler.go b/internal/controller/job/backresthandler.go
index f399cf1e3d..faf1061a7a 100644
--- a/internal/controller/job/backresthandler.go
+++ b/internal/controller/job/backresthandler.go
@@ -1,7 +1,7 @@
package job
/*
-Copyright 2017 - 2020 Crunchy Data Solutions, Inc.
+Copyright 2017 - 2021 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/internal/controller/job/bootstraphandler.go b/internal/controller/job/bootstraphandler.go
index 6085c6bb7a..c26817da2d 100644
--- a/internal/controller/job/bootstraphandler.go
+++ b/internal/controller/job/bootstraphandler.go
@@ -1,7 +1,7 @@
package job
/*
-Copyright 2020 Crunchy Data Solutions, Inc.
+Copyright 2020 - 2021 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/internal/controller/job/jobcontroller.go b/internal/controller/job/jobcontroller.go
index 13d919ed5e..75ce0ca9bb 100644
--- a/internal/controller/job/jobcontroller.go
+++ b/internal/controller/job/jobcontroller.go
@@ -1,7 +1,7 @@
package job
/*
-Copyright 2017 - 2020 Crunchy Data Solutions, Inc.
+Copyright 2017 - 2021 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/internal/controller/job/jobevents.go b/internal/controller/job/jobevents.go
index ef4f1a1760..05e1d0d0fe 100644
--- a/internal/controller/job/jobevents.go
+++ b/internal/controller/job/jobevents.go
@@ -1,7 +1,7 @@
package job
/*
-Copyright 2019 - 2020 Crunchy Data Solutions, Inc.
+Copyright 2019 - 2021 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/internal/controller/job/jobutil.go b/internal/controller/job/jobutil.go
index 78d6bb6e34..e7a3113469 100644
--- a/internal/controller/job/jobutil.go
+++ b/internal/controller/job/jobutil.go
@@ -1,7 +1,7 @@
package job
/*
-Copyright 2020 Crunchy Data Solutions, Inc.
+Copyright 2020 - 2021 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/internal/controller/job/pgdumphandler.go b/internal/controller/job/pgdumphandler.go
index 0fc8444f20..dc9012cabd 100644
--- a/internal/controller/job/pgdumphandler.go
+++ b/internal/controller/job/pgdumphandler.go
@@ -1,7 +1,7 @@
package job
/*
-Copyright 2017 - 2020 Crunchy Data Solutions, Inc.
+Copyright 2017 - 2021 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/internal/controller/job/reposynchandler.go b/internal/controller/job/reposynchandler.go
index 136f63365a..49b642b4bd 100644
--- a/internal/controller/job/reposynchandler.go
+++ b/internal/controller/job/reposynchandler.go
@@ -1,7 +1,7 @@
package job
/*
-Copyright 2017 - 2020 Crunchy Data Solutions, Inc.
+Copyright 2017 - 2021 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/internal/controller/job/rmdatahandler.go b/internal/controller/job/rmdatahandler.go
index 4a6861c5c9..e2f0693e66 100644
--- a/internal/controller/job/rmdatahandler.go
+++ b/internal/controller/job/rmdatahandler.go
@@ -1,7 +1,7 @@
package job
/*
-Copyright 2017 - 2020 Crunchy Data Solutions, Inc.
+Copyright 2017 - 2021 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/internal/controller/manager/controllermanager.go b/internal/controller/manager/controllermanager.go
index bb2c2e1039..e2514d52a7 100644
--- a/internal/controller/manager/controllermanager.go
+++ b/internal/controller/manager/controllermanager.go
@@ -1,7 +1,7 @@
package manager
/*
-Copyright 2020 Crunchy Data Solutions, Inc.
+Copyright 2020 - 2021 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/internal/controller/manager/rbac.go b/internal/controller/manager/rbac.go
index 21f7db9cee..5b04e7004d 100644
--- a/internal/controller/manager/rbac.go
+++ b/internal/controller/manager/rbac.go
@@ -1,7 +1,7 @@
package manager
/*
-Copyright 2020 Crunchy Data Solutions, Inc.
+Copyright 2020 - 2021 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/internal/controller/namespace/namespacecontroller.go b/internal/controller/namespace/namespacecontroller.go
index 6fc85f644f..20db2e9534 100644
--- a/internal/controller/namespace/namespacecontroller.go
+++ b/internal/controller/namespace/namespacecontroller.go
@@ -1,7 +1,7 @@
package namespace
/*
-Copyright 2019 - 2020 Crunchy Data Solutions, Inc.
+Copyright 2019 - 2021 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/internal/controller/pgcluster/pgclustercontroller.go b/internal/controller/pgcluster/pgclustercontroller.go
index f0b83607ad..fef1a54734 100644
--- a/internal/controller/pgcluster/pgclustercontroller.go
+++ b/internal/controller/pgcluster/pgclustercontroller.go
@@ -1,7 +1,7 @@
package pgcluster
/*
-Copyright 2017 - 2020 Crunchy Data Solutions, Inc.
+Copyright 2017 - 2021 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/internal/controller/pgpolicy/pgpolicycontroller.go b/internal/controller/pgpolicy/pgpolicycontroller.go
index 0f3ab76ff3..a5be12bafb 100644
--- a/internal/controller/pgpolicy/pgpolicycontroller.go
+++ b/internal/controller/pgpolicy/pgpolicycontroller.go
@@ -1,7 +1,7 @@
package pgpolicy
/*
-Copyright 2017 - 2020 Crunchy Data Solutions, Inc.
+Copyright 2017 - 2021 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/internal/controller/pgreplica/pgreplicacontroller.go b/internal/controller/pgreplica/pgreplicacontroller.go
index e41babcb6f..5ada57d30a 100644
--- a/internal/controller/pgreplica/pgreplicacontroller.go
+++ b/internal/controller/pgreplica/pgreplicacontroller.go
@@ -1,7 +1,7 @@
package pgreplica
/*
-Copyright 2017 - 2020 Crunchy Data Solutions, Inc.
+Copyright 2017 - 2021 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/internal/controller/pgtask/backresthandler.go b/internal/controller/pgtask/backresthandler.go
index 8e8582364a..31753453ab 100644
--- a/internal/controller/pgtask/backresthandler.go
+++ b/internal/controller/pgtask/backresthandler.go
@@ -1,7 +1,7 @@
package pgtask
/*
-Copyright 2020 Crunchy Data Solutions, Inc.
+Copyright 2020 - 2021 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/internal/controller/pgtask/pgtaskcontroller.go b/internal/controller/pgtask/pgtaskcontroller.go
index e1dfbcd18b..e26755e35e 100644
--- a/internal/controller/pgtask/pgtaskcontroller.go
+++ b/internal/controller/pgtask/pgtaskcontroller.go
@@ -1,7 +1,7 @@
package pgtask
/*
-Copyright 2017 - 2020 Crunchy Data Solutions, Inc.
+Copyright 2017 - 2021 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/internal/controller/pod/inithandler.go b/internal/controller/pod/inithandler.go
index ea19ec4e8d..6f3eed2c2d 100644
--- a/internal/controller/pod/inithandler.go
+++ b/internal/controller/pod/inithandler.go
@@ -1,7 +1,7 @@
package pod
/*
-Copyright 2017 - 2020 Crunchy Data Solutions, Inc.
+Copyright 2017 - 2021 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/internal/controller/pod/podcontroller.go b/internal/controller/pod/podcontroller.go
index cc05f84fb7..30f21836b8 100644
--- a/internal/controller/pod/podcontroller.go
+++ b/internal/controller/pod/podcontroller.go
@@ -1,7 +1,7 @@
package pod
/*
-Copyright 2017 - 2020 Crunchy Data Solutions, Inc.
+Copyright 2017 - 2021 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/internal/controller/pod/podevents.go b/internal/controller/pod/podevents.go
index dc0b53766b..7aa3c8da3a 100644
--- a/internal/controller/pod/podevents.go
+++ b/internal/controller/pod/podevents.go
@@ -1,7 +1,7 @@
package pod
/*
-Copyright 2017 - 2020 Crunchy Data Solutions, Inc.
+Copyright 2017 - 2021 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/internal/controller/pod/promotionhandler.go b/internal/controller/pod/promotionhandler.go
index 660f841fdc..513a675f7b 100644
--- a/internal/controller/pod/promotionhandler.go
+++ b/internal/controller/pod/promotionhandler.go
@@ -1,7 +1,7 @@
package pod
/*
-Copyright 2020 Crunchy Data Solutions, Inc.
+Copyright 2020 - 2021 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/internal/kubeapi/client_config.go b/internal/kubeapi/client_config.go
index 5d070fc25e..10285b7873 100644
--- a/internal/kubeapi/client_config.go
+++ b/internal/kubeapi/client_config.go
@@ -1,7 +1,7 @@
package kubeapi
/*
- Copyright 2020 Crunchy Data Solutions, Inc.
+ Copyright 2020 - 2021 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/internal/kubeapi/deployment.go b/internal/kubeapi/deployment.go
index ec13795e09..5e9a665480 100644
--- a/internal/kubeapi/deployment.go
+++ b/internal/kubeapi/deployment.go
@@ -1,7 +1,7 @@
package kubeapi
/*
- Copyright 2018 - 2020 Crunchy Data Solutions, Inc.
+ Copyright 2018 - 2021 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/internal/kubeapi/endpoints.go b/internal/kubeapi/endpoints.go
index b4cd8ece62..d655ba1484 100644
--- a/internal/kubeapi/endpoints.go
+++ b/internal/kubeapi/endpoints.go
@@ -1,7 +1,7 @@
package kubeapi
/*
- Copyright 2019 - 2020 Crunchy Data Solutions, Inc.
+ Copyright 2019 - 2021 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/internal/kubeapi/errors.go b/internal/kubeapi/errors.go
index 829ca9f097..ab5e9c07aa 100644
--- a/internal/kubeapi/errors.go
+++ b/internal/kubeapi/errors.go
@@ -1,7 +1,7 @@
package kubeapi
/*
- Copyright 2020 Crunchy Data Solutions, Inc.
+ Copyright 2020 - 2021 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/internal/kubeapi/exec.go b/internal/kubeapi/exec.go
index b2e994d84d..c154ba1fa3 100644
--- a/internal/kubeapi/exec.go
+++ b/internal/kubeapi/exec.go
@@ -1,7 +1,7 @@
package kubeapi
/*
- Copyright 2018 - 2020 Crunchy Data Solutions, Inc.
+ Copyright 2018 - 2021 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/internal/kubeapi/fake/clientset.go b/internal/kubeapi/fake/clientset.go
index 7fbd74b802..2ac060e1da 100644
--- a/internal/kubeapi/fake/clientset.go
+++ b/internal/kubeapi/fake/clientset.go
@@ -1,7 +1,7 @@
package fake
/*
- Copyright 2020 Crunchy Data Solutions, Inc.
+ Copyright 2020 - 2021 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/internal/kubeapi/fake/fakeclients.go b/internal/kubeapi/fake/fakeclients.go
index 6a263818d4..173c7ea4e4 100644
--- a/internal/kubeapi/fake/fakeclients.go
+++ b/internal/kubeapi/fake/fakeclients.go
@@ -1,7 +1,7 @@
package fake
/*
- Copyright 2020 Crunchy Data Solutions, Inc.
+ Copyright 2020 - 2021 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/internal/kubeapi/pod.go b/internal/kubeapi/pod.go
index 1dc5539089..bedae52adf 100644
--- a/internal/kubeapi/pod.go
+++ b/internal/kubeapi/pod.go
@@ -1,7 +1,7 @@
package kubeapi
/*
- Copyright 2018 - 2020 Crunchy Data Solutions, Inc.
+ Copyright 2018 - 2021 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/internal/kubeapi/volumes.go b/internal/kubeapi/volumes.go
index 05412672ac..795b0a9151 100644
--- a/internal/kubeapi/volumes.go
+++ b/internal/kubeapi/volumes.go
@@ -1,7 +1,7 @@
package kubeapi
/*
- Copyright 2020 Crunchy Data Solutions, Inc.
+ Copyright 2020 - 2021 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/internal/kubeapi/volumes_test.go b/internal/kubeapi/volumes_test.go
index b793ac5269..458a4153ef 100644
--- a/internal/kubeapi/volumes_test.go
+++ b/internal/kubeapi/volumes_test.go
@@ -1,7 +1,7 @@
package kubeapi
/*
- Copyright 2020 Crunchy Data Solutions, Inc.
+ Copyright 2020 - 2021 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/internal/logging/loglib.go b/internal/logging/loglib.go
index b443e47b4d..6205760a4e 100644
--- a/internal/logging/loglib.go
+++ b/internal/logging/loglib.go
@@ -2,7 +2,7 @@
package logging
/*
- Copyright 2019 - 2020 Crunchy Data Solutions, Inc.
+ Copyright 2019 - 2021 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/internal/ns/nslogic.go b/internal/ns/nslogic.go
index e579b6d47b..b9bb8da878 100644
--- a/internal/ns/nslogic.go
+++ b/internal/ns/nslogic.go
@@ -1,7 +1,7 @@
package ns
/*
-Copyright 2019 - 2020 Crunchy Data Solutions, Inc.
+Copyright 2019 - 2021 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/internal/operator/backrest/backup.go b/internal/operator/backrest/backup.go
index 690d7e5e78..055f6ac7a1 100644
--- a/internal/operator/backrest/backup.go
+++ b/internal/operator/backrest/backup.go
@@ -1,7 +1,7 @@
package backrest
/*
- Copyright 2018 - 2020 Crunchy Data Solutions, Inc.
+ Copyright 2018 - 2021 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/internal/operator/backrest/repo.go b/internal/operator/backrest/repo.go
index 65466232b9..d84b9773e2 100644
--- a/internal/operator/backrest/repo.go
+++ b/internal/operator/backrest/repo.go
@@ -1,7 +1,7 @@
package backrest
/*
- Copyright 2017 - 2020 Crunchy Data Solutions, Inc.
+ Copyright 2017 - 2021 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/internal/operator/backrest/restore.go b/internal/operator/backrest/restore.go
index 97b6449dd2..cd0a1c8a24 100644
--- a/internal/operator/backrest/restore.go
+++ b/internal/operator/backrest/restore.go
@@ -1,7 +1,7 @@
package backrest
/*
- Copyright 2018 - 2020 Crunchy Data Solutions, Inc.
+ Copyright 2018 - 2021 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/internal/operator/backrest/stanza.go b/internal/operator/backrest/stanza.go
index d7d55615dd..a88b058d6e 100644
--- a/internal/operator/backrest/stanza.go
+++ b/internal/operator/backrest/stanza.go
@@ -1,7 +1,7 @@
package backrest
/*
- Copyright 2019 - 2020 Crunchy Data Solutions, Inc.
+ Copyright 2019 - 2021 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/internal/operator/cluster/clone.go b/internal/operator/cluster/clone.go
index ae33ffd0cb..494ca88e16 100644
--- a/internal/operator/cluster/clone.go
+++ b/internal/operator/cluster/clone.go
@@ -1,7 +1,7 @@
package cluster
/*
- Copyright 2017 - 2020 Crunchy Data Solutions, Inc.
+ Copyright 2017 - 2021 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/internal/operator/cluster/cluster.go b/internal/operator/cluster/cluster.go
index 81cf6cbbcd..40360ab12b 100644
--- a/internal/operator/cluster/cluster.go
+++ b/internal/operator/cluster/cluster.go
@@ -4,7 +4,7 @@
package cluster
/*
- Copyright 2017 - 2020 Crunchy Data Solutions, Inc.
+ Copyright 2017 - 2021 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/internal/operator/cluster/clusterlogic.go b/internal/operator/cluster/clusterlogic.go
index 43ab32b27d..2842281914 100644
--- a/internal/operator/cluster/clusterlogic.go
+++ b/internal/operator/cluster/clusterlogic.go
@@ -4,7 +4,7 @@
package cluster
/*
- Copyright 2019 - 2020 Crunchy Data Solutions, Inc.
+ Copyright 2019 - 2021 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/internal/operator/cluster/failover.go b/internal/operator/cluster/failover.go
index 45870d9a75..e6533db7a6 100644
--- a/internal/operator/cluster/failover.go
+++ b/internal/operator/cluster/failover.go
@@ -4,7 +4,7 @@
package cluster
/*
- Copyright 2018 - 2020 Crunchy Data Solutions, Inc.
+ Copyright 2018 - 2021 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/internal/operator/cluster/failoverlogic.go b/internal/operator/cluster/failoverlogic.go
index 3dee469682..cf61bff6e8 100644
--- a/internal/operator/cluster/failoverlogic.go
+++ b/internal/operator/cluster/failoverlogic.go
@@ -4,7 +4,7 @@
package cluster
/*
- Copyright 2019 - 2020 Crunchy Data Solutions, Inc.
+ Copyright 2019 - 2021 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/internal/operator/cluster/pgadmin.go b/internal/operator/cluster/pgadmin.go
index c7170ce541..4a78c48a53 100644
--- a/internal/operator/cluster/pgadmin.go
+++ b/internal/operator/cluster/pgadmin.go
@@ -1,7 +1,7 @@
package cluster
/*
- Copyright 2020 Crunchy Data Solutions, Inc.
+ Copyright 2020 - 2021 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/internal/operator/cluster/pgbouncer.go b/internal/operator/cluster/pgbouncer.go
index 4eaa54828c..cc9cbf9910 100644
--- a/internal/operator/cluster/pgbouncer.go
+++ b/internal/operator/cluster/pgbouncer.go
@@ -1,7 +1,7 @@
package cluster
/*
- Copyright 2018 - 2020 Crunchy Data Solutions, Inc.
+ Copyright 2018 - 2021 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/internal/operator/cluster/pgbouncer_test.go b/internal/operator/cluster/pgbouncer_test.go
index 06ff30d8b6..2407da50a0 100644
--- a/internal/operator/cluster/pgbouncer_test.go
+++ b/internal/operator/cluster/pgbouncer_test.go
@@ -1,7 +1,7 @@
package cluster
/*
- Copyright 2020 Crunchy Data Solutions, Inc.
+ Copyright 2020 - 2021 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/internal/operator/cluster/rmdata.go b/internal/operator/cluster/rmdata.go
index b25d260ca4..bf0a8ce365 100644
--- a/internal/operator/cluster/rmdata.go
+++ b/internal/operator/cluster/rmdata.go
@@ -4,7 +4,7 @@
package cluster
/*
- Copyright 2019 - 2020 Crunchy Data Solutions, Inc.
+ Copyright 2019 - 2021 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/internal/operator/cluster/service.go b/internal/operator/cluster/service.go
index 2812a88389..f192be92cf 100644
--- a/internal/operator/cluster/service.go
+++ b/internal/operator/cluster/service.go
@@ -4,7 +4,7 @@
package cluster
/*
- Copyright 2017 - 2020 Crunchy Data Solutions, Inc.
+ Copyright 2017 - 2021 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/internal/operator/cluster/standby.go b/internal/operator/cluster/standby.go
index 154a2dd3f6..67ae9148e6 100644
--- a/internal/operator/cluster/standby.go
+++ b/internal/operator/cluster/standby.go
@@ -1,7 +1,7 @@
package cluster
/*
-Copyright 2020 Crunchy Data Solutions, Inc.
+Copyright 2020 - 2021 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/internal/operator/cluster/upgrade.go b/internal/operator/cluster/upgrade.go
index e2d58e7dc4..692eb544d1 100644
--- a/internal/operator/cluster/upgrade.go
+++ b/internal/operator/cluster/upgrade.go
@@ -1,7 +1,7 @@
package cluster
/*
- Copyright 2017 - 2020 Crunchy Data Solutions, Inc.
+ Copyright 2017 - 2021 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/internal/operator/clusterutilities.go b/internal/operator/clusterutilities.go
index 46d6cdc5ee..500ccf26ea 100644
--- a/internal/operator/clusterutilities.go
+++ b/internal/operator/clusterutilities.go
@@ -1,7 +1,7 @@
package operator
/*
- Copyright 2019 - 2020 Crunchy Data Solutions, Inc.
+ Copyright 2019 - 2021 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/internal/operator/clusterutilities_test.go b/internal/operator/clusterutilities_test.go
index 72de4844ff..f5f00d84ef 100644
--- a/internal/operator/clusterutilities_test.go
+++ b/internal/operator/clusterutilities_test.go
@@ -1,7 +1,7 @@
package operator
/*
- Copyright 2020 Crunchy Data Solutions, Inc.
+ Copyright 2020 - 2021 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/internal/operator/common.go b/internal/operator/common.go
index 2d4360deb7..03d69d5329 100644
--- a/internal/operator/common.go
+++ b/internal/operator/common.go
@@ -1,7 +1,7 @@
package operator
/*
- Copyright 2017 - 2020 Crunchy Data Solutions, Inc.
+ Copyright 2017 - 2021 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/internal/operator/config/configutil.go b/internal/operator/config/configutil.go
index af6bc62f35..0b4d594f27 100644
--- a/internal/operator/config/configutil.go
+++ b/internal/operator/config/configutil.go
@@ -1,7 +1,7 @@
package config
/*
- Copyright 2020 Crunchy Data Solutions, Inc.
+ Copyright 2020 - 2021 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/internal/operator/config/dcs.go b/internal/operator/config/dcs.go
index 7b5c721c5f..99c383d904 100644
--- a/internal/operator/config/dcs.go
+++ b/internal/operator/config/dcs.go
@@ -1,7 +1,7 @@
package config
/*
- Copyright 2020 Crunchy Data Solutions, Ind.
+ Copyright 2020 - 2021 Crunchy Data Solutions, Ind.
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/internal/operator/config/localdb.go b/internal/operator/config/localdb.go
index 0e3c182e17..dbdb9ab89e 100644
--- a/internal/operator/config/localdb.go
+++ b/internal/operator/config/localdb.go
@@ -1,7 +1,7 @@
package config
/*
- Copyright 2020 Crunchy Data Solutions, Inl.
+ Copyright 2020 - 2021 Crunchy Data Solutions, Inl.
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/internal/operator/operatorupgrade/version-check.go b/internal/operator/operatorupgrade/version-check.go
index 81461417cb..b49b2d430c 100644
--- a/internal/operator/operatorupgrade/version-check.go
+++ b/internal/operator/operatorupgrade/version-check.go
@@ -1,7 +1,7 @@
package operatorupgrade
/*
- Copyright 2018 - 2020 Crunchy Data Solutions, Inc.
+ Copyright 2018 - 2021 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/internal/operator/pgbackrest.go b/internal/operator/pgbackrest.go
index 42a8f645d1..7c4232c51c 100644
--- a/internal/operator/pgbackrest.go
+++ b/internal/operator/pgbackrest.go
@@ -1,7 +1,7 @@
package operator
/*
- Copyright 2020 Crunchy Data Solutions, Inc.
+ Copyright 2020 - 2021 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/internal/operator/pgbackrest_test.go b/internal/operator/pgbackrest_test.go
index 046d2be770..38d09a6be6 100644
--- a/internal/operator/pgbackrest_test.go
+++ b/internal/operator/pgbackrest_test.go
@@ -1,7 +1,7 @@
package operator
/*
- Copyright 2020 Crunchy Data Solutions, Inc.
+ Copyright 2020 - 2021 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/internal/operator/pgdump/dump.go b/internal/operator/pgdump/dump.go
index 78d51a0a38..d1e6f393c1 100644
--- a/internal/operator/pgdump/dump.go
+++ b/internal/operator/pgdump/dump.go
@@ -1,7 +1,7 @@
package pgdump
/*
- Copyright 2019 - 2020 Crunchy Data Solutions, Inc.
+ Copyright 2019 - 2021 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/internal/operator/pgdump/restore.go b/internal/operator/pgdump/restore.go
index d813331dd5..2cf3d385e9 100644
--- a/internal/operator/pgdump/restore.go
+++ b/internal/operator/pgdump/restore.go
@@ -1,7 +1,7 @@
package pgdump
/*
- Copyright 2019 - 2020 Crunchy Data Solutions, Inc.
+ Copyright 2019 - 2021 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/internal/operator/pvc/pvc.go b/internal/operator/pvc/pvc.go
index 0c37e8d27c..b557514511 100644
--- a/internal/operator/pvc/pvc.go
+++ b/internal/operator/pvc/pvc.go
@@ -1,7 +1,7 @@
package pvc
/*
- Copyright 2017 - 2020 Crunchy Data Solutions, Inc.
+ Copyright 2017 - 2021 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/internal/operator/storage.go b/internal/operator/storage.go
index da06087deb..2b1e3053b4 100644
--- a/internal/operator/storage.go
+++ b/internal/operator/storage.go
@@ -1,7 +1,7 @@
package operator
/*
- Copyright 2020 Crunchy Data Solutions, Inc.
+ Copyright 2020 - 2021 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/internal/operator/storage_test.go b/internal/operator/storage_test.go
index 280b1c6cd0..dacaaf78d3 100644
--- a/internal/operator/storage_test.go
+++ b/internal/operator/storage_test.go
@@ -1,7 +1,7 @@
package operator
/*
- Copyright 2020 Crunchy Data Solutions, Inc.
+ Copyright 2020 - 2021 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/internal/operator/task/applypolicies.go b/internal/operator/task/applypolicies.go
index 8d3b540927..eb63f3674a 100644
--- a/internal/operator/task/applypolicies.go
+++ b/internal/operator/task/applypolicies.go
@@ -1,7 +1,7 @@
package task
/*
- Copyright 2018 - 2020 Crunchy Data Solutions, Inc.
+ Copyright 2018 - 2021 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/internal/operator/task/rmbackups.go b/internal/operator/task/rmbackups.go
index 928a8cb977..8c9744181c 100644
--- a/internal/operator/task/rmbackups.go
+++ b/internal/operator/task/rmbackups.go
@@ -1,7 +1,7 @@
package task
/*
- Copyright 2018 - 2020 Crunchy Data Solutions, Inc.
+ Copyright 2018 - 2021 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/internal/operator/task/rmdata.go b/internal/operator/task/rmdata.go
index d4e62a5775..c061170727 100644
--- a/internal/operator/task/rmdata.go
+++ b/internal/operator/task/rmdata.go
@@ -1,7 +1,7 @@
package task
/*
- Copyright 2018 - 2020 Crunchy Data Solutions, Inc.
+ Copyright 2018 - 2021 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/internal/operator/task/workflow.go b/internal/operator/task/workflow.go
index 2f55b0f481..a275f0e306 100644
--- a/internal/operator/task/workflow.go
+++ b/internal/operator/task/workflow.go
@@ -1,7 +1,7 @@
package task
/*
- Copyright 2018 - 2020 Crunchy Data Solutions, Inc.
+ Copyright 2018 - 2021 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/internal/operator/wal.go b/internal/operator/wal.go
index 1b679755fb..b9a14c3219 100644
--- a/internal/operator/wal.go
+++ b/internal/operator/wal.go
@@ -1,7 +1,7 @@
package operator
/*
- Copyright 2020 Crunchy Data Solutions, Inc.
+ Copyright 2020 - 2021 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/internal/patroni/doc.go b/internal/patroni/doc.go
index 63a42c84d3..6311d1e653 100644
--- a/internal/patroni/doc.go
+++ b/internal/patroni/doc.go
@@ -4,7 +4,7 @@
package patroni
/*
- Copyright 2020 Crunchy Data Solutions, Inc.
+ Copyright 2020 - 2021 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/internal/patroni/patroni.go b/internal/patroni/patroni.go
index e1bc58a01a..83d2772839 100644
--- a/internal/patroni/patroni.go
+++ b/internal/patroni/patroni.go
@@ -1,7 +1,7 @@
package patroni
/*
- Copyright 2020 Crunchy Data Solutions, Inc.
+ Copyright 2020 - 2021 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/internal/pgadmin/backoff.go b/internal/pgadmin/backoff.go
index d1df68c80d..7fe83c72b6 100644
--- a/internal/pgadmin/backoff.go
+++ b/internal/pgadmin/backoff.go
@@ -1,7 +1,7 @@
package pgadmin
/*
- Copyright 2020 Crunchy Data Solutions, Inc.
+ Copyright 2020 - 2021 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/internal/pgadmin/backoff_test.go b/internal/pgadmin/backoff_test.go
index aeae16f7a5..ec24f360fe 100644
--- a/internal/pgadmin/backoff_test.go
+++ b/internal/pgadmin/backoff_test.go
@@ -1,7 +1,7 @@
package pgadmin
/*
- Copyright 2020 Crunchy Data Solutions, Inc.
+ Copyright 2020 - 2021 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/internal/pgadmin/crypto.go b/internal/pgadmin/crypto.go
index 55ebc8b771..e2db5beb5d 100644
--- a/internal/pgadmin/crypto.go
+++ b/internal/pgadmin/crypto.go
@@ -1,7 +1,7 @@
package pgadmin
/*
- Copyright 2018 - 2020 Crunchy Data Solutions, Inc.
+ Copyright 2018 - 2021 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/internal/pgadmin/crypto_test.go b/internal/pgadmin/crypto_test.go
index 36f8468379..8c78611501 100644
--- a/internal/pgadmin/crypto_test.go
+++ b/internal/pgadmin/crypto_test.go
@@ -1,7 +1,7 @@
package pgadmin
/*
- Copyright 2018 - 2020 Crunchy Data Solutions, Inc.
+ Copyright 2018 - 2021 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/internal/pgadmin/doc.go b/internal/pgadmin/doc.go
index 97900b0227..58bf983ab5 100644
--- a/internal/pgadmin/doc.go
+++ b/internal/pgadmin/doc.go
@@ -4,7 +4,7 @@ database which powers pgadmin */
package pgadmin
/*
- Copyright 2020 Crunchy Data Solutions, Inc.
+ Copyright 2020 - 2021 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/internal/pgadmin/hash.go b/internal/pgadmin/hash.go
index b73222fb8b..64bc3df471 100644
--- a/internal/pgadmin/hash.go
+++ b/internal/pgadmin/hash.go
@@ -1,7 +1,7 @@
package pgadmin
/*
- Copyright 2020 Crunchy Data Solutions, Inc.
+ Copyright 2020 - 2021 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/internal/pgadmin/logic.go b/internal/pgadmin/logic.go
index 2a3fdf0c30..5481f69dc6 100644
--- a/internal/pgadmin/logic.go
+++ b/internal/pgadmin/logic.go
@@ -1,7 +1,7 @@
package pgadmin
/*
- Copyright 2020 Crunchy Data Solutions, Inc.
+ Copyright 2020 - 2021 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/internal/pgadmin/runner.go b/internal/pgadmin/runner.go
index 233dc092be..e4cb8a8ece 100644
--- a/internal/pgadmin/runner.go
+++ b/internal/pgadmin/runner.go
@@ -1,7 +1,7 @@
package pgadmin
/*
- Copyright 2020 Crunchy Data Solutions, Inc.
+ Copyright 2020 - 2021 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/internal/pgadmin/server.go b/internal/pgadmin/server.go
index 26568e8806..b5ab3b6ef5 100644
--- a/internal/pgadmin/server.go
+++ b/internal/pgadmin/server.go
@@ -1,7 +1,7 @@
package pgadmin
/*
- Copyright 2020 Crunchy Data Solutions, Inc.
+ Copyright 2020 - 2021 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/internal/postgres/doc.go b/internal/postgres/doc.go
index 974cb7c8df..2a2155a2cd 100644
--- a/internal/postgres/doc.go
+++ b/internal/postgres/doc.go
@@ -5,7 +5,7 @@
package postgres
/*
- Copyright 2020 Crunchy Data Solutions, Inc.
+ Copyright 2020 - 2021 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/internal/postgres/password/doc.go b/internal/postgres/password/doc.go
index 6ea6563873..b0e22372f6 100644
--- a/internal/postgres/password/doc.go
+++ b/internal/postgres/password/doc.go
@@ -4,7 +4,7 @@
package password
/*
- Copyright 2020 Crunchy Data Solutions, Inc.
+ Copyright 2020 - 2021 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/internal/postgres/password/md5.go b/internal/postgres/password/md5.go
index ae93d2cc56..7541d05a70 100644
--- a/internal/postgres/password/md5.go
+++ b/internal/postgres/password/md5.go
@@ -1,7 +1,7 @@
package password
/*
- Copyright 2020 Crunchy Data Solutions, Inc.
+ Copyright 2020 - 2021 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/internal/postgres/password/md5_test.go b/internal/postgres/password/md5_test.go
index c77c8abf43..5f810d884d 100644
--- a/internal/postgres/password/md5_test.go
+++ b/internal/postgres/password/md5_test.go
@@ -1,7 +1,7 @@
package password
/*
- Copyright 2020 Crunchy Data Solutions, Inc.
+ Copyright 2020 - 2021 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/internal/postgres/password/password.go b/internal/postgres/password/password.go
index b70112a4c3..c0ad603a14 100644
--- a/internal/postgres/password/password.go
+++ b/internal/postgres/password/password.go
@@ -1,7 +1,7 @@
package password
/*
- Copyright 2020 Crunchy Data Solutions, Inc.
+ Copyright 2020 - 2021 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/internal/postgres/password/password_test.go b/internal/postgres/password/password_test.go
index b9b7094dbc..1cf7e6f09f 100644
--- a/internal/postgres/password/password_test.go
+++ b/internal/postgres/password/password_test.go
@@ -1,7 +1,7 @@
package password
/*
- Copyright 2020 Crunchy Data Solutions, Inc.
+ Copyright 2020 - 2021 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/internal/postgres/password/scram.go b/internal/postgres/password/scram.go
index aa6eee3df8..a28b187b90 100644
--- a/internal/postgres/password/scram.go
+++ b/internal/postgres/password/scram.go
@@ -1,7 +1,7 @@
package password
/*
- Copyright 2020 Crunchy Data Solutions, Inc.
+ Copyright 2020 - 2021 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/internal/postgres/password/scram_test.go b/internal/postgres/password/scram_test.go
index 6de92bb17c..69397c1f8a 100644
--- a/internal/postgres/password/scram_test.go
+++ b/internal/postgres/password/scram_test.go
@@ -1,7 +1,7 @@
package password
/*
- Copyright 2020 Crunchy Data Solutions, Inc.
+ Copyright 2020 - 2021 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/internal/tlsutil/primitives.go b/internal/tlsutil/primitives.go
index 03fb73f744..a2c8da3187 100644
--- a/internal/tlsutil/primitives.go
+++ b/internal/tlsutil/primitives.go
@@ -1,7 +1,7 @@
package tlsutil
/*
-Copyright 2019 - 2020 Crunchy Data Solutions, Inc.
+Copyright 2019 - 2021 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/internal/tlsutil/primitives_test.go b/internal/tlsutil/primitives_test.go
index 22676e9fbc..0805621f57 100644
--- a/internal/tlsutil/primitives_test.go
+++ b/internal/tlsutil/primitives_test.go
@@ -1,7 +1,7 @@
package tlsutil
/*
-Copyright 2019 - 2020 Crunchy Data Solutions, Inc.
+Copyright 2019 - 2021 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/internal/util/backrest.go b/internal/util/backrest.go
index 66e3a2dec6..eae2e62bfb 100644
--- a/internal/util/backrest.go
+++ b/internal/util/backrest.go
@@ -1,7 +1,7 @@
package util
/*
- Copyright 2019 - 2020 Crunchy Data Solutions, Inc.
+ Copyright 2019 - 2021 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/internal/util/clone.go b/internal/util/clone.go
index a1d563262c..e01e34e670 100644
--- a/internal/util/clone.go
+++ b/internal/util/clone.go
@@ -1,7 +1,7 @@
package util
/*
- Copyright 2019 - 2020 Crunchy Data Solutions, Inc.
+ Copyright 2019 - 2021 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/internal/util/cluster.go b/internal/util/cluster.go
index 6e05a0f71f..ef5a324f4f 100644
--- a/internal/util/cluster.go
+++ b/internal/util/cluster.go
@@ -1,7 +1,7 @@
package util
/*
- Copyright 2019 - 2020 Crunchy Data Solutions, Inc.
+ Copyright 2019 - 2021 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/internal/util/failover.go b/internal/util/failover.go
index 87dadf51cf..dcee1da022 100644
--- a/internal/util/failover.go
+++ b/internal/util/failover.go
@@ -1,7 +1,7 @@
package util
/*
- Copyright 2018 - 2020 Crunchy Data Solutions, Inc.
+ Copyright 2018 - 2021 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/internal/util/pgbouncer.go b/internal/util/pgbouncer.go
index 2fdd645126..3775c01378 100644
--- a/internal/util/pgbouncer.go
+++ b/internal/util/pgbouncer.go
@@ -1,7 +1,7 @@
package util
/*
- Copyright 2017 - 2020 Crunchy Data Solutions, Inc.
+ Copyright 2017 - 2021 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/internal/util/policy.go b/internal/util/policy.go
index 11f5a1563e..2d3180b0d0 100644
--- a/internal/util/policy.go
+++ b/internal/util/policy.go
@@ -1,7 +1,7 @@
package util
/*
- Copyright 2017 - 2020 Crunchy Data Solutions, Inc.
+ Copyright 2017 - 2021 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/internal/util/secrets.go b/internal/util/secrets.go
index ce7b69472f..43300706a1 100644
--- a/internal/util/secrets.go
+++ b/internal/util/secrets.go
@@ -1,7 +1,7 @@
package util
/*
- Copyright 2017 - 2020 Crunchy Data Solutions, Inc.
+ Copyright 2017 - 2021 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/internal/util/secrets_test.go b/internal/util/secrets_test.go
index 423beb5e03..8dca7649bb 100644
--- a/internal/util/secrets_test.go
+++ b/internal/util/secrets_test.go
@@ -1,7 +1,7 @@
package util
/*
- Copyright 2020 Crunchy Data Solutions, Inc.
+ Copyright 2020 - 2021 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/internal/util/ssh.go b/internal/util/ssh.go
index aa886bbca7..e72eb77cdd 100644
--- a/internal/util/ssh.go
+++ b/internal/util/ssh.go
@@ -1,7 +1,7 @@
package util
/*
- Copyright 2019 - 2020 Crunchy Data Solutions, Inc.
+ Copyright 2019 - 2021 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/internal/util/util.go b/internal/util/util.go
index 094cec77f4..97a5fb3e27 100644
--- a/internal/util/util.go
+++ b/internal/util/util.go
@@ -1,7 +1,7 @@
package util
/*
- Copyright 2017 - 2020 Crunchy Data Solutions, Inc.
+ Copyright 2017 - 2021 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/pgo-backrest/pgo-backrest.go b/pgo-backrest/pgo-backrest.go
index ee75dd743d..a02598bd37 100644
--- a/pgo-backrest/pgo-backrest.go
+++ b/pgo-backrest/pgo-backrest.go
@@ -1,7 +1,7 @@
package main
/*
- Copyright 2018 - 2020 Crunchy Data Solutions, Inc.
+ Copyright 2018 - 2021 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/pgo-rmdata/pgo-rmdata.go b/pgo-rmdata/pgo-rmdata.go
index 40a3bf32fd..c191acbde9 100644
--- a/pgo-rmdata/pgo-rmdata.go
+++ b/pgo-rmdata/pgo-rmdata.go
@@ -1,7 +1,7 @@
package main
/*
-Copyright 2019 - 2020 Crunchy Data
+Copyright 2019 - 2021 Crunchy Data
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/pgo-rmdata/rmdata/process.go b/pgo-rmdata/rmdata/process.go
index 772eae8f17..4dd5eec16c 100644
--- a/pgo-rmdata/rmdata/process.go
+++ b/pgo-rmdata/rmdata/process.go
@@ -1,7 +1,7 @@
package rmdata
/*
-Copyright 2019 - 2020 Crunchy Data
+Copyright 2019 - 2021 Crunchy Data
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/pgo-rmdata/rmdata/types.go b/pgo-rmdata/rmdata/types.go
index 1044e85ee9..06aec3ff3c 100644
--- a/pgo-rmdata/rmdata/types.go
+++ b/pgo-rmdata/rmdata/types.go
@@ -1,7 +1,7 @@
package rmdata
/*
-Copyright 2019 - 2020 Crunchy Data
+Copyright 2019 - 2021 Crunchy Data
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/pgo-scheduler/pgo-scheduler.go b/pgo-scheduler/pgo-scheduler.go
index 68b17c1218..a33ce5d18e 100644
--- a/pgo-scheduler/pgo-scheduler.go
+++ b/pgo-scheduler/pgo-scheduler.go
@@ -1,7 +1,7 @@
package main
/*
- Copyright 2019 - 2020 Crunchy Data Solutions, Inc.
+ Copyright 2019 - 2021 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/pgo-scheduler/scheduler/configmapcontroller.go b/pgo-scheduler/scheduler/configmapcontroller.go
index 41372f96b5..c6b1e701d7 100644
--- a/pgo-scheduler/scheduler/configmapcontroller.go
+++ b/pgo-scheduler/scheduler/configmapcontroller.go
@@ -1,7 +1,7 @@
package scheduler
/*
-Copyright 2020 Crunchy Data Solutions, Inc.
+Copyright 2020 - 2021 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/pgo-scheduler/scheduler/controllermanager.go b/pgo-scheduler/scheduler/controllermanager.go
index 843f6ac060..bdb8f7eb9c 100644
--- a/pgo-scheduler/scheduler/controllermanager.go
+++ b/pgo-scheduler/scheduler/controllermanager.go
@@ -1,7 +1,7 @@
package scheduler
/*
-Copyright 2020 Crunchy Data Solutions, Inc.
+Copyright 2020 - 2021 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/pgo-scheduler/scheduler/pgbackrest.go b/pgo-scheduler/scheduler/pgbackrest.go
index 1ce1fb3166..75561e0af3 100644
--- a/pgo-scheduler/scheduler/pgbackrest.go
+++ b/pgo-scheduler/scheduler/pgbackrest.go
@@ -1,7 +1,7 @@
package scheduler
/*
- Copyright 2019 - 2020 Crunchy Data Solutions, Inc.
+ Copyright 2019 - 2021 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/pgo-scheduler/scheduler/policy.go b/pgo-scheduler/scheduler/policy.go
index acf5c6a489..3b3d097492 100644
--- a/pgo-scheduler/scheduler/policy.go
+++ b/pgo-scheduler/scheduler/policy.go
@@ -1,7 +1,7 @@
package scheduler
/*
- Copyright 2019 - 2020 Crunchy Data Solutions, Inc.
+ Copyright 2019 - 2021 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/pgo-scheduler/scheduler/scheduler.go b/pgo-scheduler/scheduler/scheduler.go
index d0360b4df4..7f84e18963 100644
--- a/pgo-scheduler/scheduler/scheduler.go
+++ b/pgo-scheduler/scheduler/scheduler.go
@@ -1,7 +1,7 @@
package scheduler
/*
- Copyright 2019 - 2020 Crunchy Data Solutions, Inc.
+ Copyright 2019 - 2021 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/pgo-scheduler/scheduler/tasks.go b/pgo-scheduler/scheduler/tasks.go
index a2c715d3be..a8374bfbe7 100644
--- a/pgo-scheduler/scheduler/tasks.go
+++ b/pgo-scheduler/scheduler/tasks.go
@@ -1,7 +1,7 @@
package scheduler
/*
- Copyright 2019 - 2020 Crunchy Data Solutions, Inc.
+ Copyright 2019 - 2021 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/pgo-scheduler/scheduler/types.go b/pgo-scheduler/scheduler/types.go
index 7b0b07353e..7d7a3b5bb6 100644
--- a/pgo-scheduler/scheduler/types.go
+++ b/pgo-scheduler/scheduler/types.go
@@ -1,7 +1,7 @@
package scheduler
/*
- Copyright 2019 - 2020 Crunchy Data Solutions, Inc.
+ Copyright 2019 - 2021 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/pgo-scheduler/scheduler/validate.go b/pgo-scheduler/scheduler/validate.go
index 37c24dc7ab..29e923c716 100644
--- a/pgo-scheduler/scheduler/validate.go
+++ b/pgo-scheduler/scheduler/validate.go
@@ -1,7 +1,7 @@
package scheduler
/*
- Copyright 2019 - 2020 Crunchy Data Solutions, Inc.
+ Copyright 2019 - 2021 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/pgo-scheduler/scheduler/validate_test.go b/pgo-scheduler/scheduler/validate_test.go
index 6abe1a7396..9cc7b4864e 100644
--- a/pgo-scheduler/scheduler/validate_test.go
+++ b/pgo-scheduler/scheduler/validate_test.go
@@ -1,7 +1,7 @@
package scheduler
/*
- Copyright 2019 - 2020 Crunchy Data Solutions, Inc.
+ Copyright 2019 - 2021 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/pgo/api/backrest.go b/pgo/api/backrest.go
index 13e2ff702b..08c74e1ac5 100644
--- a/pgo/api/backrest.go
+++ b/pgo/api/backrest.go
@@ -1,7 +1,7 @@
package api
/*
- Copyright 2018 - 2020 Crunchy Data Solutions, Inc.
+ Copyright 2018 - 2021 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/pgo/api/cat.go b/pgo/api/cat.go
index 00d17c7fb6..9e06936153 100644
--- a/pgo/api/cat.go
+++ b/pgo/api/cat.go
@@ -1,7 +1,7 @@
package api
/*
- Copyright 2019 - 2020 Crunchy Data Solutions, Inc.
+ Copyright 2019 - 2021 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/pgo/api/clone.go b/pgo/api/clone.go
index 2e7ebfccba..ae09c01553 100644
--- a/pgo/api/clone.go
+++ b/pgo/api/clone.go
@@ -1,7 +1,7 @@
package api
/*
- Copyright 2019 - 2020 Crunchy Data Solutions, Inc.
+ Copyright 2019 - 2021 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/pgo/api/cluster.go b/pgo/api/cluster.go
index 74407c0dbc..d3d543ba08 100644
--- a/pgo/api/cluster.go
+++ b/pgo/api/cluster.go
@@ -1,7 +1,7 @@
package api
/*
- Copyright 2018 - 2020 Crunchy Data Solutions, Inc.
+ Copyright 2018 - 2021 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/pgo/api/common.go b/pgo/api/common.go
index 6fcd876ebf..327bbce98e 100644
--- a/pgo/api/common.go
+++ b/pgo/api/common.go
@@ -1,7 +1,7 @@
package api
/*
- Copyright 2018 - 2020 Crunchy Data Solutions, Inc.
+ Copyright 2018 - 2021 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/pgo/api/config.go b/pgo/api/config.go
index 90848edcfd..c3c580cc4c 100644
--- a/pgo/api/config.go
+++ b/pgo/api/config.go
@@ -1,7 +1,7 @@
package api
/*
- Copyright 2018 - 2020 Crunchy Data Solutions, Inc.
+ Copyright 2018 - 2021 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/pgo/api/df.go b/pgo/api/df.go
index fa993051aa..6ed90c9643 100644
--- a/pgo/api/df.go
+++ b/pgo/api/df.go
@@ -1,7 +1,7 @@
package api
/*
- Copyright 2018 - 2020 Crunchy Data Solutions, Inc.
+ Copyright 2018 - 2021 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/pgo/api/failover.go b/pgo/api/failover.go
index 4ebbab9471..1ee9bf3694 100644
--- a/pgo/api/failover.go
+++ b/pgo/api/failover.go
@@ -1,7 +1,7 @@
package api
/*
- Copyright 2018 - 2020 Crunchy Data Solutions, Inc.
+ Copyright 2018 - 2021 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/pgo/api/label.go b/pgo/api/label.go
index e083f998a8..9ce0456812 100644
--- a/pgo/api/label.go
+++ b/pgo/api/label.go
@@ -1,7 +1,7 @@
package api
/*
- Copyright 2018 - 2020 Crunchy Data Solutions, Inc.
+ Copyright 2018 - 2021 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/pgo/api/namespace.go b/pgo/api/namespace.go
index 96f10ba8d7..391fb75816 100644
--- a/pgo/api/namespace.go
+++ b/pgo/api/namespace.go
@@ -1,7 +1,7 @@
package api
/*
- Copyright 2019 - 2020 Crunchy Data Solutions, Inc.
+ Copyright 2019 - 2021 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/pgo/api/pgadmin.go b/pgo/api/pgadmin.go
index 0d410355cd..56858a6be4 100644
--- a/pgo/api/pgadmin.go
+++ b/pgo/api/pgadmin.go
@@ -1,7 +1,7 @@
package api
/*
- Copyright 2018 - 2020 Crunchy Data Solutions, Inc.
+ Copyright 2018 - 2021 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/pgo/api/pgbouncer.go b/pgo/api/pgbouncer.go
index efee86ca53..58ae62d7ee 100644
--- a/pgo/api/pgbouncer.go
+++ b/pgo/api/pgbouncer.go
@@ -1,7 +1,7 @@
package api
/*
- Copyright 2018 - 2020 Crunchy Data Solutions, Inc.
+ Copyright 2018 - 2021 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/pgo/api/pgdump.go b/pgo/api/pgdump.go
index 3bc0804c7b..2d6e0f3fd7 100644
--- a/pgo/api/pgdump.go
+++ b/pgo/api/pgdump.go
@@ -1,7 +1,7 @@
package api
/*
- Copyright 2019 - 2020 Crunchy Data Solutions, Inc.
+ Copyright 2019 - 2021 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/pgo/api/pgorole.go b/pgo/api/pgorole.go
index 804f0c1eb2..c9d9716b0b 100644
--- a/pgo/api/pgorole.go
+++ b/pgo/api/pgorole.go
@@ -1,7 +1,7 @@
package api
/*
- Copyright 2019 - 2020 Crunchy Data Solutions, Inc.
+ Copyright 2019 - 2021 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/pgo/api/pgouser.go b/pgo/api/pgouser.go
index e0026d20ca..a17804d61e 100644
--- a/pgo/api/pgouser.go
+++ b/pgo/api/pgouser.go
@@ -1,7 +1,7 @@
package api
/*
- Copyright 2019 - 2020 Crunchy Data Solutions, Inc.
+ Copyright 2019 - 2021 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/pgo/api/policy.go b/pgo/api/policy.go
index b7e9cf5d6f..9e56993dc9 100644
--- a/pgo/api/policy.go
+++ b/pgo/api/policy.go
@@ -1,7 +1,7 @@
package api
/*
- Copyright 2018 - 2020 Crunchy Data Solutions, Inc.
+ Copyright 2018 - 2021 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/pgo/api/pvc.go b/pgo/api/pvc.go
index f4fac4ceb4..0498967561 100644
--- a/pgo/api/pvc.go
+++ b/pgo/api/pvc.go
@@ -1,7 +1,7 @@
package api
/*
- Copyright 2018 - 2020 Crunchy Data Solutions, Inc.
+ Copyright 2018 - 2021 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/pgo/api/reload.go b/pgo/api/reload.go
index 9235cc1ea9..9dbe07a5f4 100644
--- a/pgo/api/reload.go
+++ b/pgo/api/reload.go
@@ -1,7 +1,7 @@
package api
/*
- Copyright 2018 - 2020 Crunchy Data Solutions, Inc.
+ Copyright 2018 - 2021 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/pgo/api/restart.go b/pgo/api/restart.go
index 13dc205972..3fba6f112f 100644
--- a/pgo/api/restart.go
+++ b/pgo/api/restart.go
@@ -1,7 +1,7 @@
package api
/*
- Copyright 2018 - 2020 Crunchy Data Solutions, Inc.
+ Copyright 2018 - 2021 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/pgo/api/restore.go b/pgo/api/restore.go
index e22cea904b..f8816e3c6c 100644
--- a/pgo/api/restore.go
+++ b/pgo/api/restore.go
@@ -1,7 +1,7 @@
package api
/*
- Copyright 2018 - 2020 Crunchy Data Solutions, Inc.
+ Copyright 2018 - 2021 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/pgo/api/restoreDump.go b/pgo/api/restoreDump.go
index bd911c1b75..cb7aa573d7 100644
--- a/pgo/api/restoreDump.go
+++ b/pgo/api/restoreDump.go
@@ -1,7 +1,7 @@
package api
/*
- Copyright 2019 - 2020 Crunchy Data Solutions, Inc.
+ Copyright 2019 - 2021 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/pgo/api/scale.go b/pgo/api/scale.go
index 6defb09127..b64133653f 100644
--- a/pgo/api/scale.go
+++ b/pgo/api/scale.go
@@ -1,7 +1,7 @@
package api
/*
- Copyright 2018 - 2020 Crunchy Data Solutions, Inc.
+ Copyright 2018 - 2021 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/pgo/api/scaledown.go b/pgo/api/scaledown.go
index 1cc6691b72..f4c8de0f6e 100644
--- a/pgo/api/scaledown.go
+++ b/pgo/api/scaledown.go
@@ -1,7 +1,7 @@
package api
/*
- Copyright 2018 - 2020 Crunchy Data Solutions, Inc.
+ Copyright 2018 - 2021 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/pgo/api/schedule.go b/pgo/api/schedule.go
index 4007e77e1b..02de41ba2d 100644
--- a/pgo/api/schedule.go
+++ b/pgo/api/schedule.go
@@ -1,7 +1,7 @@
package api
/*
- Copyright 2018 - 2020 Crunchy Data Solutions, Inc.
+ Copyright 2018 - 2021 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/pgo/api/status.go b/pgo/api/status.go
index ad70bd2f96..31ee0f7c70 100644
--- a/pgo/api/status.go
+++ b/pgo/api/status.go
@@ -1,7 +1,7 @@
package api
/*
- Copyright 2018 - 2020 Crunchy Data Solutions, Inc.
+ Copyright 2018 - 2021 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/pgo/api/test.go b/pgo/api/test.go
index 887d67b056..30bbeafd69 100644
--- a/pgo/api/test.go
+++ b/pgo/api/test.go
@@ -1,7 +1,7 @@
package api
/*
- Copyright 2018 - 2020 Crunchy Data Solutions, Inc.
+ Copyright 2018 - 2021 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/pgo/api/upgrade.go b/pgo/api/upgrade.go
index 6079a29023..9f00a2c2d5 100644
--- a/pgo/api/upgrade.go
+++ b/pgo/api/upgrade.go
@@ -1,7 +1,7 @@
package api
/*
- Copyright 2018 - 2020 Crunchy Data Solutions, Inc.
+ Copyright 2018 - 2021 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/pgo/api/user.go b/pgo/api/user.go
index 38424ab17b..4334acd186 100644
--- a/pgo/api/user.go
+++ b/pgo/api/user.go
@@ -1,7 +1,7 @@
package api
/*
- Copyright 2018 - 2020 Crunchy Data Solutions, Inc.
+ Copyright 2018 - 2021 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/pgo/api/version.go b/pgo/api/version.go
index 9ca743add1..bef166c93a 100644
--- a/pgo/api/version.go
+++ b/pgo/api/version.go
@@ -1,7 +1,7 @@
package api
/*
- Copyright 2018 - 2020 Crunchy Data Solutions, Inc.
+ Copyright 2018 - 2021 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/pgo/api/workflow.go b/pgo/api/workflow.go
index 3289329aa1..6b4ef05f67 100644
--- a/pgo/api/workflow.go
+++ b/pgo/api/workflow.go
@@ -1,7 +1,7 @@
package api
/*
- Copyright 2018 - 2020 Crunchy Data Solutions, Inc.
+ Copyright 2018 - 2021 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/pgo/cmd/auth.go b/pgo/cmd/auth.go
index 322e5f5e9c..7b1b54ca04 100644
--- a/pgo/cmd/auth.go
+++ b/pgo/cmd/auth.go
@@ -1,7 +1,7 @@
package cmd
/*
- Copyright 2017 - 2020 Crunchy Data Solutions, Inc.
+ Copyright 2017 - 2021 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/pgo/cmd/backrest.go b/pgo/cmd/backrest.go
index a0a183fa86..c4c39a3af7 100644
--- a/pgo/cmd/backrest.go
+++ b/pgo/cmd/backrest.go
@@ -2,7 +2,7 @@
package cmd
/*
- Copyright 2018 - 2020 Crunchy Data Solutions, Inc.
+ Copyright 2018 - 2021 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/pgo/cmd/backup.go b/pgo/cmd/backup.go
index 61225cc3ea..719ea55712 100644
--- a/pgo/cmd/backup.go
+++ b/pgo/cmd/backup.go
@@ -2,7 +2,7 @@
package cmd
/*
- Copyright 2017 - 2020 Crunchy Data Solutions, Inc.
+ Copyright 2017 - 2021 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/pgo/cmd/cat.go b/pgo/cmd/cat.go
index e97301d40d..b213777843 100644
--- a/pgo/cmd/cat.go
+++ b/pgo/cmd/cat.go
@@ -2,7 +2,7 @@
package cmd
/*
- Copyright 2019 - 2020 Crunchy Data Solutions, Inc.
+ Copyright 2019 - 2021 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/pgo/cmd/clone.go b/pgo/cmd/clone.go
index 5f544e52e3..463ccfca96 100644
--- a/pgo/cmd/clone.go
+++ b/pgo/cmd/clone.go
@@ -2,7 +2,7 @@
package cmd
/*
- Copyright 2019 - 2020 Crunchy Data Solutions, Inc.
+ Copyright 2019 - 2021 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/pgo/cmd/cluster.go b/pgo/cmd/cluster.go
index d3c63f9445..095b41e286 100644
--- a/pgo/cmd/cluster.go
+++ b/pgo/cmd/cluster.go
@@ -1,7 +1,7 @@
package cmd
/*
- Copyright 2017 - 2020 Crunchy Data Solutions, Inc.
+ Copyright 2017 - 2021 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/pgo/cmd/common.go b/pgo/cmd/common.go
index f1e8f84e70..266bbf2937 100644
--- a/pgo/cmd/common.go
+++ b/pgo/cmd/common.go
@@ -1,7 +1,7 @@
package cmd
/*
- Copyright 2017 - 2020 Crunchy Data Solutions, Inc.
+ Copyright 2017 - 2021 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/pgo/cmd/config.go b/pgo/cmd/config.go
index 16a29d0603..0a1a4ba773 100644
--- a/pgo/cmd/config.go
+++ b/pgo/cmd/config.go
@@ -1,7 +1,7 @@
package cmd
/*
- Copyright 2018 - 2020 Crunchy Data Solutions, Inc.
+ Copyright 2018 - 2021 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/pgo/cmd/create.go b/pgo/cmd/create.go
index 57e4e77eb6..180904305b 100644
--- a/pgo/cmd/create.go
+++ b/pgo/cmd/create.go
@@ -1,7 +1,7 @@
package cmd
/*
- Copyright 2017 - 2020 Crunchy Data Solutions, Inc.
+ Copyright 2017 - 2021 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/pgo/cmd/delete.go b/pgo/cmd/delete.go
index d29341355e..eae34e471c 100644
--- a/pgo/cmd/delete.go
+++ b/pgo/cmd/delete.go
@@ -1,7 +1,7 @@
package cmd
/*
- Copyright 2017 - 2020 Crunchy Data Solutions, Inc.
+ Copyright 2017 - 2021 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/pgo/cmd/df.go b/pgo/cmd/df.go
index 576376d1bc..ec4bdc81b1 100644
--- a/pgo/cmd/df.go
+++ b/pgo/cmd/df.go
@@ -1,7 +1,7 @@
package cmd
/*
- Copyright 2018 - 2020 Crunchy Data Solutions, Inc.
+ Copyright 2018 - 2021 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/pgo/cmd/failover.go b/pgo/cmd/failover.go
index 4a667429a7..f55c98d8a8 100644
--- a/pgo/cmd/failover.go
+++ b/pgo/cmd/failover.go
@@ -2,7 +2,7 @@
package cmd
/*
- Copyright 2018 - 2020 Crunchy Data Solutions, Inc.
+ Copyright 2018 - 2021 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/pgo/cmd/flags.go b/pgo/cmd/flags.go
index bb831e4006..89d55e4f97 100644
--- a/pgo/cmd/flags.go
+++ b/pgo/cmd/flags.go
@@ -1,7 +1,7 @@
package cmd
/*
- Copyright 2018 - 2020 Crunchy Data Solutions, Inc.
+ Copyright 2018 - 2021 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/pgo/cmd/label.go b/pgo/cmd/label.go
index 3a888663b6..f06e8fdac6 100644
--- a/pgo/cmd/label.go
+++ b/pgo/cmd/label.go
@@ -1,7 +1,7 @@
package cmd
/*
- Copyright 2017 - 2020 Crunchy Data Solutions, Inc.
+ Copyright 2017 - 2021 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/pgo/cmd/namespace.go b/pgo/cmd/namespace.go
index 1065193ad8..5dd1fdc81e 100644
--- a/pgo/cmd/namespace.go
+++ b/pgo/cmd/namespace.go
@@ -1,7 +1,7 @@
package cmd
/*
- Copyright 2019 - 2020 Crunchy Data Solutions, Inc.
+ Copyright 2019 - 2021 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/pgo/cmd/pgadmin.go b/pgo/cmd/pgadmin.go
index 52412324d4..336ab4ab40 100644
--- a/pgo/cmd/pgadmin.go
+++ b/pgo/cmd/pgadmin.go
@@ -1,7 +1,7 @@
package cmd
/*
- Copyright 2020 Crunchy Data Solutions, Inc.
+ Copyright 2020 - 2021 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/pgo/cmd/pgbouncer.go b/pgo/cmd/pgbouncer.go
index 9d302a8cdb..3771047e9d 100644
--- a/pgo/cmd/pgbouncer.go
+++ b/pgo/cmd/pgbouncer.go
@@ -1,7 +1,7 @@
package cmd
/*
- Copyright 2018 - 2020 Crunchy Data Solutions, Inc.
+ Copyright 2018 - 2021 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/pgo/cmd/pgdump.go b/pgo/cmd/pgdump.go
index 744ebe7274..e34036005c 100644
--- a/pgo/cmd/pgdump.go
+++ b/pgo/cmd/pgdump.go
@@ -2,7 +2,7 @@
package cmd
/*
- Copyright 2019 - 2020 Crunchy Data Solutions, Inc.
+ Copyright 2019 - 2021 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/pgo/cmd/pgorole.go b/pgo/cmd/pgorole.go
index 171b03e401..144f1fb108 100644
--- a/pgo/cmd/pgorole.go
+++ b/pgo/cmd/pgorole.go
@@ -1,7 +1,7 @@
package cmd
/*
- Copyright 2019 - 2020 Crunchy Data Solutions, Inc.
+ Copyright 2019 - 2021 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/pgo/cmd/pgouser.go b/pgo/cmd/pgouser.go
index 2ccc72d970..ff4b535a1c 100644
--- a/pgo/cmd/pgouser.go
+++ b/pgo/cmd/pgouser.go
@@ -1,7 +1,7 @@
package cmd
/*
- Copyright 2019 - 2020 Crunchy Data Solutions, Inc.
+ Copyright 2019 - 2021 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/pgo/cmd/policy.go b/pgo/cmd/policy.go
index 3afa306923..805bef66fd 100644
--- a/pgo/cmd/policy.go
+++ b/pgo/cmd/policy.go
@@ -1,7 +1,7 @@
package cmd
/*
- Copyright 2017 - 2020 Crunchy Data Solutions, Inc.
+ Copyright 2017 - 2021 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/pgo/cmd/pvc.go b/pgo/cmd/pvc.go
index 47bc481cb0..6fc4c5cdd7 100644
--- a/pgo/cmd/pvc.go
+++ b/pgo/cmd/pvc.go
@@ -1,7 +1,7 @@
package cmd
/*
- Copyright 2017 - 2020 Crunchy Data Solutions, Inc.
+ Copyright 2017 - 2021 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/pgo/cmd/reload.go b/pgo/cmd/reload.go
index cf6c5b647c..f006f1a7dd 100644
--- a/pgo/cmd/reload.go
+++ b/pgo/cmd/reload.go
@@ -2,7 +2,7 @@
package cmd
/*
- Copyright 2018 - 2020 Crunchy Data Solutions, Inc.
+ Copyright 2018 - 2021 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/pgo/cmd/restart.go b/pgo/cmd/restart.go
index 5303466f9b..d01e6dab80 100644
--- a/pgo/cmd/restart.go
+++ b/pgo/cmd/restart.go
@@ -2,7 +2,7 @@
package cmd
/*
- Copyright 2020 Crunchy Data Solutions, Inc.
+ Copyright 2020 - 2021 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/pgo/cmd/restore.go b/pgo/cmd/restore.go
index bafe7418e3..7f4e884002 100644
--- a/pgo/cmd/restore.go
+++ b/pgo/cmd/restore.go
@@ -2,7 +2,7 @@
package cmd
/*
- Copyright 2018 - 2020 Crunchy Data Solutions, Inc.
+ Copyright 2018 - 2021 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/pgo/cmd/root.go b/pgo/cmd/root.go
index ec3cdd5f32..396c078493 100644
--- a/pgo/cmd/root.go
+++ b/pgo/cmd/root.go
@@ -1,7 +1,7 @@
package cmd
/*
- Copyright 2017 - 2020 Crunchy Data Solutions, Inc.
+ Copyright 2017 - 2021 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/pgo/cmd/scale.go b/pgo/cmd/scale.go
index 831ec2ddf9..f6a5e10518 100644
--- a/pgo/cmd/scale.go
+++ b/pgo/cmd/scale.go
@@ -1,7 +1,7 @@
package cmd
/*
- Copyright 2017 - 2020 Crunchy Data Solutions, Inc.
+ Copyright 2017 - 2021 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/pgo/cmd/scaledown.go b/pgo/cmd/scaledown.go
index 20241c3d46..57b869a6a8 100644
--- a/pgo/cmd/scaledown.go
+++ b/pgo/cmd/scaledown.go
@@ -1,7 +1,7 @@
package cmd
/*
- Copyright 2018 - 2020 Crunchy Data Solutions, Inc.
+ Copyright 2018 - 2021 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/pgo/cmd/schedule.go b/pgo/cmd/schedule.go
index 5413001efb..018a5fdb52 100644
--- a/pgo/cmd/schedule.go
+++ b/pgo/cmd/schedule.go
@@ -2,7 +2,7 @@
package cmd
/*
- Copyright 2018 - 2020 Crunchy Data Solutions, Inc.
+ Copyright 2018 - 2021 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/pgo/cmd/show.go b/pgo/cmd/show.go
index b42ba2a7d9..9636f7615f 100644
--- a/pgo/cmd/show.go
+++ b/pgo/cmd/show.go
@@ -1,7 +1,7 @@
package cmd
/*
- Copyright 2017 - 2020 Crunchy Data Solutions, Inc.
+ Copyright 2017 - 2021 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/pgo/cmd/status.go b/pgo/cmd/status.go
index 681ad08d6c..f93c4a93bf 100644
--- a/pgo/cmd/status.go
+++ b/pgo/cmd/status.go
@@ -1,7 +1,7 @@
package cmd
/*
- Copyright 2018 - 2020 Crunchy Data Solutions, Inc.
+ Copyright 2018 - 2021 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/pgo/cmd/test.go b/pgo/cmd/test.go
index 111475fbed..38b2df6146 100644
--- a/pgo/cmd/test.go
+++ b/pgo/cmd/test.go
@@ -1,7 +1,7 @@
package cmd
/*
- Copyright 2017 - 2020 Crunchy Data Solutions, Inc.
+ Copyright 2017 - 2021 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/pgo/cmd/update.go b/pgo/cmd/update.go
index 806b44388e..408ee5b699 100644
--- a/pgo/cmd/update.go
+++ b/pgo/cmd/update.go
@@ -1,7 +1,7 @@
package cmd
/*
- Copyright 2017 - 2020 Crunchy Data Solutions, Inc.
+ Copyright 2017 - 2021 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/pgo/cmd/upgrade.go b/pgo/cmd/upgrade.go
index 1211990790..500865330d 100644
--- a/pgo/cmd/upgrade.go
+++ b/pgo/cmd/upgrade.go
@@ -2,7 +2,7 @@
package cmd
/*
- Copyright 2017 - 2020 Crunchy Data Solutions, Inc.
+ Copyright 2017 - 2021 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/pgo/cmd/user.go b/pgo/cmd/user.go
index 7216ce9e1d..a952aef402 100644
--- a/pgo/cmd/user.go
+++ b/pgo/cmd/user.go
@@ -1,7 +1,7 @@
package cmd
/*
- Copyright 2017 - 2020 Crunchy Data Solutions, Inc.
+ Copyright 2017 - 2021 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/pgo/cmd/version.go b/pgo/cmd/version.go
index 25e6253767..a5934cfb88 100644
--- a/pgo/cmd/version.go
+++ b/pgo/cmd/version.go
@@ -1,7 +1,7 @@
package cmd
/*
- Copyright 2017 - 2020 Crunchy Data Solutions, Inc.
+ Copyright 2017 - 2021 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/pgo/cmd/watch.go b/pgo/cmd/watch.go
index 69d288a1d8..9dd9d5cd41 100644
--- a/pgo/cmd/watch.go
+++ b/pgo/cmd/watch.go
@@ -1,7 +1,7 @@
package cmd
/*
- Copyright 2019 - 2020 Crunchy Data Solutions, Inc.
+ Copyright 2019 - 2021 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/pgo/cmd/workflow.go b/pgo/cmd/workflow.go
index 239fcd6ef2..c0fb0b8ca5 100644
--- a/pgo/cmd/workflow.go
+++ b/pgo/cmd/workflow.go
@@ -1,7 +1,7 @@
package cmd
/*
- Copyright 2018 - 2020 Crunchy Data Solutions, Inc.
+ Copyright 2018 - 2021 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/pgo/generatedocs.go b/pgo/generatedocs.go
index daafa3224c..8d2b2a2833 100644
--- a/pgo/generatedocs.go
+++ b/pgo/generatedocs.go
@@ -1,7 +1,7 @@
package main
/*
- Copyright 2019 - 2020 Crunchy Data Solutions, Inc.
+ Copyright 2019 - 2021 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/pgo/pgo.go b/pgo/pgo.go
index 6895b7863a..49bdb9fde5 100644
--- a/pgo/pgo.go
+++ b/pgo/pgo.go
@@ -1,7 +1,7 @@
package main
/*
- Copyright 2017 - 2020 Crunchy Data Solutions, Inc.
+ Copyright 2017 - 2021 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/pgo/util/confirmation.go b/pgo/util/confirmation.go
index c227055cb1..4d15e0ae83 100644
--- a/pgo/util/confirmation.go
+++ b/pgo/util/confirmation.go
@@ -1,7 +1,7 @@
package util
/*
- Copyright 2018 - 2020 Crunchy Data Solutions, Inc.
+ Copyright 2018 - 2021 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/pgo/util/pad.go b/pgo/util/pad.go
index 276469471a..fee08615ed 100644
--- a/pgo/util/pad.go
+++ b/pgo/util/pad.go
@@ -1,7 +1,7 @@
package util
/*
- Copyright 2018 - 2020 Crunchy Data Solutions, Inc.
+ Copyright 2018 - 2021 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/pgo/util/validation.go b/pgo/util/validation.go
index 7d90f6a6ac..17d29b8eac 100644
--- a/pgo/util/validation.go
+++ b/pgo/util/validation.go
@@ -1,7 +1,7 @@
package util
/*
- Copyright 2019 - 2020 Crunchy Data Solutions, Inc.
+ Copyright 2019 - 2021 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/pkg/apis/crunchydata.com/v1/cluster.go b/pkg/apis/crunchydata.com/v1/cluster.go
index e67d0f107d..375255130c 100644
--- a/pkg/apis/crunchydata.com/v1/cluster.go
+++ b/pkg/apis/crunchydata.com/v1/cluster.go
@@ -1,7 +1,7 @@
package v1
/*
- Copyright 2017 - 2020 Crunchy Data Solutions, Inc.
+ Copyright 2017 - 2021 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/pkg/apis/crunchydata.com/v1/common.go b/pkg/apis/crunchydata.com/v1/common.go
index 723c2a0a60..227a74d3a9 100644
--- a/pkg/apis/crunchydata.com/v1/common.go
+++ b/pkg/apis/crunchydata.com/v1/common.go
@@ -1,7 +1,7 @@
package v1
/*
-Copyright 2017 - 2020 Crunchy Data Solutions, Inc.
+Copyright 2017 - 2021 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/pkg/apis/crunchydata.com/v1/common_test.go b/pkg/apis/crunchydata.com/v1/common_test.go
index 8ad909e64f..cde6832420 100644
--- a/pkg/apis/crunchydata.com/v1/common_test.go
+++ b/pkg/apis/crunchydata.com/v1/common_test.go
@@ -1,7 +1,7 @@
package v1
/*
- Copyright 2020 Crunchy Data Solutions, Inc.
+ Copyright 2020 - 2021 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/pkg/apis/crunchydata.com/v1/doc.go b/pkg/apis/crunchydata.com/v1/doc.go
index 4c793e782f..62cd5bc582 100644
--- a/pkg/apis/crunchydata.com/v1/doc.go
+++ b/pkg/apis/crunchydata.com/v1/doc.go
@@ -108,7 +108,7 @@ package v1
// +k8s:deepcopy-gen=package,register
/*
- Copyright 2017 - 2020 Crunchy Data Solutions, Inc.
+ Copyright 2017 - 2021 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/pkg/apis/crunchydata.com/v1/policy.go b/pkg/apis/crunchydata.com/v1/policy.go
index 28347f9950..f3ac077cf4 100644
--- a/pkg/apis/crunchydata.com/v1/policy.go
+++ b/pkg/apis/crunchydata.com/v1/policy.go
@@ -1,7 +1,7 @@
package v1
/*
- Copyright 2017 - 2020 Crunchy Data Solutions, Inc.
+ Copyright 2017 - 2021 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/pkg/apis/crunchydata.com/v1/register.go b/pkg/apis/crunchydata.com/v1/register.go
index 00db119bda..10e79dc7fc 100644
--- a/pkg/apis/crunchydata.com/v1/register.go
+++ b/pkg/apis/crunchydata.com/v1/register.go
@@ -1,7 +1,7 @@
package v1
/*
-Copyright 2017 - 2020 Crunchy Data Solutions, Inc.
+Copyright 2017 - 2021 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.
diff --git a/pkg/apis/crunchydata.com/v1/replica.go b/pkg/apis/crunchydata.com/v1/replica.go
index 386fa033d0..c5e17f4697 100644
--- a/pkg/apis/crunchydata.com/v1/replica.go
+++ b/pkg/apis/crunchydata.com/v1/replica.go
@@ -1,7 +1,7 @@
package v1
/*
- Copyright 2018 - 2020 Crunchy Data Solutions, Inc.
+ Copyright 2018 - 2021 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/pkg/apis/crunchydata.com/v1/task.go b/pkg/apis/crunchydata.com/v1/task.go
index 5e54d97ab3..e898b548fd 100644
--- a/pkg/apis/crunchydata.com/v1/task.go
+++ b/pkg/apis/crunchydata.com/v1/task.go
@@ -1,7 +1,7 @@
package v1
/*
- Copyright 2017 - 2020 Crunchy Data Solutions, Inc.
+ Copyright 2017 - 2021 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/pkg/apis/crunchydata.com/v1/zz_generated.deepcopy.go b/pkg/apis/crunchydata.com/v1/zz_generated.deepcopy.go
index 80fd389e4f..81f9ab7a41 100644
--- a/pkg/apis/crunchydata.com/v1/zz_generated.deepcopy.go
+++ b/pkg/apis/crunchydata.com/v1/zz_generated.deepcopy.go
@@ -1,7 +1,7 @@
// +build !ignore_autogenerated
/*
-Copyright 2020 Crunchy Data Solutions, Inc.
+Copyright 2020 - 2021 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/pkg/apiservermsgs/backrestmsgs.go b/pkg/apiservermsgs/backrestmsgs.go
index 12d72844b9..622b94bbe9 100644
--- a/pkg/apiservermsgs/backrestmsgs.go
+++ b/pkg/apiservermsgs/backrestmsgs.go
@@ -1,7 +1,7 @@
package apiservermsgs
/*
-Copyright 2018 - 2020 Crunchy Data Solutions, Inc.
+Copyright 2018 - 2021 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/pkg/apiservermsgs/catmsgs.go b/pkg/apiservermsgs/catmsgs.go
index ded313371f..15f7d5cf85 100644
--- a/pkg/apiservermsgs/catmsgs.go
+++ b/pkg/apiservermsgs/catmsgs.go
@@ -1,7 +1,7 @@
package apiservermsgs
/*
-Copyright 2019 - 2020 Crunchy Data Solutions, Inc.
+Copyright 2019 - 2021 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/pkg/apiservermsgs/clonemsgs.go b/pkg/apiservermsgs/clonemsgs.go
index 7f78139af1..c8ff454904 100644
--- a/pkg/apiservermsgs/clonemsgs.go
+++ b/pkg/apiservermsgs/clonemsgs.go
@@ -1,7 +1,7 @@
package apiservermsgs
/*
-Copyright 2019 - 2020 Crunchy Data Solutions, Inc.
+Copyright 2019 - 2021 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/pkg/apiservermsgs/clustermsgs.go b/pkg/apiservermsgs/clustermsgs.go
index e8983613c4..d23aa6af38 100644
--- a/pkg/apiservermsgs/clustermsgs.go
+++ b/pkg/apiservermsgs/clustermsgs.go
@@ -1,7 +1,7 @@
package apiservermsgs
/*
-Copyright 2017 - 2020 Crunchy Data Solutions, Inc.
+Copyright 2017 - 2021 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/pkg/apiservermsgs/common.go b/pkg/apiservermsgs/common.go
index 093405b4fd..d52499aa4a 100644
--- a/pkg/apiservermsgs/common.go
+++ b/pkg/apiservermsgs/common.go
@@ -1,7 +1,7 @@
package apiservermsgs
/*
-Copyright 2017 - 2020 Crunchy Data Solutions, Inc.
+Copyright 2017 - 2021 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/pkg/apiservermsgs/configmsgs.go b/pkg/apiservermsgs/configmsgs.go
index 06ed680008..325e2281e5 100644
--- a/pkg/apiservermsgs/configmsgs.go
+++ b/pkg/apiservermsgs/configmsgs.go
@@ -1,7 +1,7 @@
package apiservermsgs
/*
-Copyright 2018 - 2020 Crunchy Data Solutions, Inc.
+Copyright 2018 - 2021 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/pkg/apiservermsgs/dfmsgs.go b/pkg/apiservermsgs/dfmsgs.go
index 22541840e7..8d947768ef 100644
--- a/pkg/apiservermsgs/dfmsgs.go
+++ b/pkg/apiservermsgs/dfmsgs.go
@@ -1,7 +1,7 @@
package apiservermsgs
/*
-Copyright 2018 - 2020 Crunchy Data Solutions, Inc.
+Copyright 2018 - 2021 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/pkg/apiservermsgs/failovermsgs.go b/pkg/apiservermsgs/failovermsgs.go
index bfeefcb49a..b51b11c3e4 100644
--- a/pkg/apiservermsgs/failovermsgs.go
+++ b/pkg/apiservermsgs/failovermsgs.go
@@ -1,7 +1,7 @@
package apiservermsgs
/*
-Copyright 2018 - 2020 Crunchy Data Solutions, Inc.
+Copyright 2018 - 2021 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/pkg/apiservermsgs/labelmsgs.go b/pkg/apiservermsgs/labelmsgs.go
index eabf3e8ecf..d0a914840e 100644
--- a/pkg/apiservermsgs/labelmsgs.go
+++ b/pkg/apiservermsgs/labelmsgs.go
@@ -1,7 +1,7 @@
package apiservermsgs
/*
-Copyright 2017 - 2020 Crunchy Data Solutions, Inc.
+Copyright 2017 - 2021 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/pkg/apiservermsgs/namespacemsgs.go b/pkg/apiservermsgs/namespacemsgs.go
index 3921604a00..5fc4665a9b 100644
--- a/pkg/apiservermsgs/namespacemsgs.go
+++ b/pkg/apiservermsgs/namespacemsgs.go
@@ -1,7 +1,7 @@
package apiservermsgs
/*
-Copyright 2017 - 2020 Crunchy Data Solutions, Inc.
+Copyright 2017 - 2021 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/pkg/apiservermsgs/pgadminmsgs.go b/pkg/apiservermsgs/pgadminmsgs.go
index 5d68b9352d..73e4475294 100644
--- a/pkg/apiservermsgs/pgadminmsgs.go
+++ b/pkg/apiservermsgs/pgadminmsgs.go
@@ -1,7 +1,7 @@
package apiservermsgs
/*
-Copyright 2020 Crunchy Data Solutions, Inc.
+Copyright 2020 - 2021 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/pkg/apiservermsgs/pgbouncermsgs.go b/pkg/apiservermsgs/pgbouncermsgs.go
index 0feab5f15e..2c575b8f0c 100644
--- a/pkg/apiservermsgs/pgbouncermsgs.go
+++ b/pkg/apiservermsgs/pgbouncermsgs.go
@@ -1,7 +1,7 @@
package apiservermsgs
/*
-Copyright 2018 - 2020 Crunchy Data Solutions, Inc.
+Copyright 2018 - 2021 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/pkg/apiservermsgs/pgdumpmsgs.go b/pkg/apiservermsgs/pgdumpmsgs.go
index e247fca304..34bc123127 100644
--- a/pkg/apiservermsgs/pgdumpmsgs.go
+++ b/pkg/apiservermsgs/pgdumpmsgs.go
@@ -5,7 +5,7 @@ import (
)
/*
-Copyright 2019 - 2020 Crunchy Data Solutions, Inc.
+Copyright 2019 - 2021 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/pkg/apiservermsgs/pgorolemsgs.go b/pkg/apiservermsgs/pgorolemsgs.go
index 1f62efa1ab..6aae3494d0 100644
--- a/pkg/apiservermsgs/pgorolemsgs.go
+++ b/pkg/apiservermsgs/pgorolemsgs.go
@@ -1,7 +1,7 @@
package apiservermsgs
/*
-Copyright 2019 - 2020 Crunchy Data Solutions, Inc.
+Copyright 2019 - 2021 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/pkg/apiservermsgs/pgousermsgs.go b/pkg/apiservermsgs/pgousermsgs.go
index 815f8f1fdf..4690c1f888 100644
--- a/pkg/apiservermsgs/pgousermsgs.go
+++ b/pkg/apiservermsgs/pgousermsgs.go
@@ -1,7 +1,7 @@
package apiservermsgs
/*
-Copyright 2019 - 2020 Crunchy Data Solutions, Inc.
+Copyright 2019 - 2021 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/pkg/apiservermsgs/policymsgs.go b/pkg/apiservermsgs/policymsgs.go
index ec3e7cf2f9..54fb12d52a 100644
--- a/pkg/apiservermsgs/policymsgs.go
+++ b/pkg/apiservermsgs/policymsgs.go
@@ -1,7 +1,7 @@
package apiservermsgs
/*
-Copyright 2017 - 2020 Crunchy Data Solutions, Inc.
+Copyright 2017 - 2021 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/pkg/apiservermsgs/pvcmsgs.go b/pkg/apiservermsgs/pvcmsgs.go
index f59ddd7983..da902da96b 100644
--- a/pkg/apiservermsgs/pvcmsgs.go
+++ b/pkg/apiservermsgs/pvcmsgs.go
@@ -1,7 +1,7 @@
package apiservermsgs
/*
-Copyright 2017 - 2020 Crunchy Data Solutions, Inc.
+Copyright 2017 - 2021 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/pkg/apiservermsgs/reloadmsgs.go b/pkg/apiservermsgs/reloadmsgs.go
index 34a3738399..11c4293980 100644
--- a/pkg/apiservermsgs/reloadmsgs.go
+++ b/pkg/apiservermsgs/reloadmsgs.go
@@ -1,7 +1,7 @@
package apiservermsgs
/*
-Copyright 2018 - 2020 Crunchy Data Solutions, Inc.
+Copyright 2018 - 2021 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/pkg/apiservermsgs/restartmsgs.go b/pkg/apiservermsgs/restartmsgs.go
index c0b32d3d00..bf6b9faa1d 100644
--- a/pkg/apiservermsgs/restartmsgs.go
+++ b/pkg/apiservermsgs/restartmsgs.go
@@ -1,7 +1,7 @@
package apiservermsgs
/*
-Copyright 2020 Crunchy Data Solutions, Inc.
+Copyright 2020 - 2021 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/pkg/apiservermsgs/schedulemsgs.go b/pkg/apiservermsgs/schedulemsgs.go
index 4b037a5992..47e9f90ca8 100644
--- a/pkg/apiservermsgs/schedulemsgs.go
+++ b/pkg/apiservermsgs/schedulemsgs.go
@@ -1,7 +1,7 @@
package apiservermsgs
/*
-Copyright 2018 - 2020 Crunchy Data Solutions, Inc.
+Copyright 2018 - 2021 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/pkg/apiservermsgs/statusmsgs.go b/pkg/apiservermsgs/statusmsgs.go
index 94994c75b9..72a6c79aab 100644
--- a/pkg/apiservermsgs/statusmsgs.go
+++ b/pkg/apiservermsgs/statusmsgs.go
@@ -1,7 +1,7 @@
package apiservermsgs
/*
-Copyright 2018 - 2020 Crunchy Data Solutions, Inc.
+Copyright 2018 - 2021 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/pkg/apiservermsgs/upgrademsgs.go b/pkg/apiservermsgs/upgrademsgs.go
index ab7fecc47a..a360c036c7 100644
--- a/pkg/apiservermsgs/upgrademsgs.go
+++ b/pkg/apiservermsgs/upgrademsgs.go
@@ -1,7 +1,7 @@
package apiservermsgs
/*
-Copyright 2017 - 2020 Crunchy Data Solutions, Inc.
+Copyright 2017 - 2021 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/pkg/apiservermsgs/usermsgs.go b/pkg/apiservermsgs/usermsgs.go
index 1f0ba56295..bf67358abe 100644
--- a/pkg/apiservermsgs/usermsgs.go
+++ b/pkg/apiservermsgs/usermsgs.go
@@ -1,7 +1,7 @@
package apiservermsgs
/*
-Copyright 2017 - 2020 Crunchy Data Solutions, Inc.
+Copyright 2017 - 2021 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/pkg/apiservermsgs/usermsgs_test.go b/pkg/apiservermsgs/usermsgs_test.go
index d2f70388fc..0f6d39b754 100644
--- a/pkg/apiservermsgs/usermsgs_test.go
+++ b/pkg/apiservermsgs/usermsgs_test.go
@@ -1,7 +1,7 @@
package apiservermsgs
/*
- Copyright 2020 Crunchy Data Solutions, Inc.
+ Copyright 2020 - 2021 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/pkg/apiservermsgs/versionmsgs.go b/pkg/apiservermsgs/versionmsgs.go
index 7685221c44..38ab640cdb 100644
--- a/pkg/apiservermsgs/versionmsgs.go
+++ b/pkg/apiservermsgs/versionmsgs.go
@@ -1,7 +1,7 @@
package apiservermsgs
/*
-Copyright 2017 - 2020 Crunchy Data Solutions, Inc.
+Copyright 2017 - 2021 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/pkg/apiservermsgs/watchmsgs.go b/pkg/apiservermsgs/watchmsgs.go
index 9d50a81ccd..02c1472b90 100644
--- a/pkg/apiservermsgs/watchmsgs.go
+++ b/pkg/apiservermsgs/watchmsgs.go
@@ -1,7 +1,7 @@
package apiservermsgs
/*
-Copyright 2019 - 2020 Crunchy Data Solutions, Inc.
+Copyright 2019 - 2021 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/pkg/apiservermsgs/workflowmsgs.go b/pkg/apiservermsgs/workflowmsgs.go
index 2908d75347..3d4c44353a 100644
--- a/pkg/apiservermsgs/workflowmsgs.go
+++ b/pkg/apiservermsgs/workflowmsgs.go
@@ -1,7 +1,7 @@
package apiservermsgs
/*
-Copyright 2018 - 2020 Crunchy Data Solutions, Inc.
+Copyright 2018 - 2021 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/pkg/events/eventing.go b/pkg/events/eventing.go
index 66fc353117..3ea0e68044 100644
--- a/pkg/events/eventing.go
+++ b/pkg/events/eventing.go
@@ -1,7 +1,7 @@
package events
/*
- Copyright 2019 - 2020 Crunchy Data Solutions, Inc.
+ Copyright 2019 - 2021 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/pkg/events/eventtype.go b/pkg/events/eventtype.go
index 15b1bcd726..db946cf915 100644
--- a/pkg/events/eventtype.go
+++ b/pkg/events/eventtype.go
@@ -1,7 +1,7 @@
package events
/*
- Copyright 2019 - 2020 Crunchy Data Solutions, Inc.
+ Copyright 2019 - 2021 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/pkg/events/pgoeventtype.go b/pkg/events/pgoeventtype.go
index 75c076b311..4e4f114868 100644
--- a/pkg/events/pgoeventtype.go
+++ b/pkg/events/pgoeventtype.go
@@ -1,7 +1,7 @@
package events
/*
- Copyright 2019 - 2020 Crunchy Data Solutions, Inc.
+ Copyright 2019 - 2021 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/pkg/generated/clientset/versioned/clientset.go b/pkg/generated/clientset/versioned/clientset.go
index 7c5e89774a..bc2b61e5e0 100644
--- a/pkg/generated/clientset/versioned/clientset.go
+++ b/pkg/generated/clientset/versioned/clientset.go
@@ -1,5 +1,5 @@
/*
-Copyright 2020 Crunchy Data Solutions, Inc.
+Copyright 2020 - 2021 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/pkg/generated/clientset/versioned/doc.go b/pkg/generated/clientset/versioned/doc.go
index e2534c0fe7..f862afa1b0 100644
--- a/pkg/generated/clientset/versioned/doc.go
+++ b/pkg/generated/clientset/versioned/doc.go
@@ -1,5 +1,5 @@
/*
-Copyright 2020 Crunchy Data Solutions, Inc.
+Copyright 2020 - 2021 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/pkg/generated/clientset/versioned/fake/clientset_generated.go b/pkg/generated/clientset/versioned/fake/clientset_generated.go
index 384d0e7737..5f9ec9bbbb 100644
--- a/pkg/generated/clientset/versioned/fake/clientset_generated.go
+++ b/pkg/generated/clientset/versioned/fake/clientset_generated.go
@@ -1,5 +1,5 @@
/*
-Copyright 2020 Crunchy Data Solutions, Inc.
+Copyright 2020 - 2021 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/pkg/generated/clientset/versioned/fake/doc.go b/pkg/generated/clientset/versioned/fake/doc.go
index 6318a06f3c..e9300efbfe 100644
--- a/pkg/generated/clientset/versioned/fake/doc.go
+++ b/pkg/generated/clientset/versioned/fake/doc.go
@@ -1,5 +1,5 @@
/*
-Copyright 2020 Crunchy Data Solutions, Inc.
+Copyright 2020 - 2021 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/pkg/generated/clientset/versioned/fake/register.go b/pkg/generated/clientset/versioned/fake/register.go
index 26c69c1594..7d57cf4437 100644
--- a/pkg/generated/clientset/versioned/fake/register.go
+++ b/pkg/generated/clientset/versioned/fake/register.go
@@ -1,5 +1,5 @@
/*
-Copyright 2020 Crunchy Data Solutions, Inc.
+Copyright 2020 - 2021 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/pkg/generated/clientset/versioned/scheme/doc.go b/pkg/generated/clientset/versioned/scheme/doc.go
index 462fec5e30..49cfafd10d 100644
--- a/pkg/generated/clientset/versioned/scheme/doc.go
+++ b/pkg/generated/clientset/versioned/scheme/doc.go
@@ -1,5 +1,5 @@
/*
-Copyright 2020 Crunchy Data Solutions, Inc.
+Copyright 2020 - 2021 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/pkg/generated/clientset/versioned/scheme/register.go b/pkg/generated/clientset/versioned/scheme/register.go
index 4850f74045..2ce45ab80b 100644
--- a/pkg/generated/clientset/versioned/scheme/register.go
+++ b/pkg/generated/clientset/versioned/scheme/register.go
@@ -1,5 +1,5 @@
/*
-Copyright 2020 Crunchy Data Solutions, Inc.
+Copyright 2020 - 2021 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/pkg/generated/clientset/versioned/typed/crunchydata.com/v1/crunchydata.com_client.go b/pkg/generated/clientset/versioned/typed/crunchydata.com/v1/crunchydata.com_client.go
index aac71b2aa3..4c862528fa 100644
--- a/pkg/generated/clientset/versioned/typed/crunchydata.com/v1/crunchydata.com_client.go
+++ b/pkg/generated/clientset/versioned/typed/crunchydata.com/v1/crunchydata.com_client.go
@@ -1,5 +1,5 @@
/*
-Copyright 2020 Crunchy Data Solutions, Inc.
+Copyright 2020 - 2021 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/pkg/generated/clientset/versioned/typed/crunchydata.com/v1/doc.go b/pkg/generated/clientset/versioned/typed/crunchydata.com/v1/doc.go
index b7311c21af..21c249ea20 100644
--- a/pkg/generated/clientset/versioned/typed/crunchydata.com/v1/doc.go
+++ b/pkg/generated/clientset/versioned/typed/crunchydata.com/v1/doc.go
@@ -1,5 +1,5 @@
/*
-Copyright 2020 Crunchy Data Solutions, Inc.
+Copyright 2020 - 2021 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/pkg/generated/clientset/versioned/typed/crunchydata.com/v1/fake/doc.go b/pkg/generated/clientset/versioned/typed/crunchydata.com/v1/fake/doc.go
index 759d8fff95..14f506a6fb 100644
--- a/pkg/generated/clientset/versioned/typed/crunchydata.com/v1/fake/doc.go
+++ b/pkg/generated/clientset/versioned/typed/crunchydata.com/v1/fake/doc.go
@@ -1,5 +1,5 @@
/*
-Copyright 2020 Crunchy Data Solutions, Inc.
+Copyright 2020 - 2021 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/pkg/generated/clientset/versioned/typed/crunchydata.com/v1/fake/fake_crunchydata.com_client.go b/pkg/generated/clientset/versioned/typed/crunchydata.com/v1/fake/fake_crunchydata.com_client.go
index f8d6b6b350..33ad7a5550 100644
--- a/pkg/generated/clientset/versioned/typed/crunchydata.com/v1/fake/fake_crunchydata.com_client.go
+++ b/pkg/generated/clientset/versioned/typed/crunchydata.com/v1/fake/fake_crunchydata.com_client.go
@@ -1,5 +1,5 @@
/*
-Copyright 2020 Crunchy Data Solutions, Inc.
+Copyright 2020 - 2021 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/pkg/generated/clientset/versioned/typed/crunchydata.com/v1/fake/fake_pgcluster.go b/pkg/generated/clientset/versioned/typed/crunchydata.com/v1/fake/fake_pgcluster.go
index 516955d577..01bb2a2f00 100644
--- a/pkg/generated/clientset/versioned/typed/crunchydata.com/v1/fake/fake_pgcluster.go
+++ b/pkg/generated/clientset/versioned/typed/crunchydata.com/v1/fake/fake_pgcluster.go
@@ -1,5 +1,5 @@
/*
-Copyright 2020 Crunchy Data Solutions, Inc.
+Copyright 2020 - 2021 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/pkg/generated/clientset/versioned/typed/crunchydata.com/v1/fake/fake_pgpolicy.go b/pkg/generated/clientset/versioned/typed/crunchydata.com/v1/fake/fake_pgpolicy.go
index f44e8a4ebb..43a0a0a1fc 100644
--- a/pkg/generated/clientset/versioned/typed/crunchydata.com/v1/fake/fake_pgpolicy.go
+++ b/pkg/generated/clientset/versioned/typed/crunchydata.com/v1/fake/fake_pgpolicy.go
@@ -1,5 +1,5 @@
/*
-Copyright 2020 Crunchy Data Solutions, Inc.
+Copyright 2020 - 2021 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/pkg/generated/clientset/versioned/typed/crunchydata.com/v1/fake/fake_pgreplica.go b/pkg/generated/clientset/versioned/typed/crunchydata.com/v1/fake/fake_pgreplica.go
index d6dc4fbd40..b1a3ea105e 100644
--- a/pkg/generated/clientset/versioned/typed/crunchydata.com/v1/fake/fake_pgreplica.go
+++ b/pkg/generated/clientset/versioned/typed/crunchydata.com/v1/fake/fake_pgreplica.go
@@ -1,5 +1,5 @@
/*
-Copyright 2020 Crunchy Data Solutions, Inc.
+Copyright 2020 - 2021 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/pkg/generated/clientset/versioned/typed/crunchydata.com/v1/fake/fake_pgtask.go b/pkg/generated/clientset/versioned/typed/crunchydata.com/v1/fake/fake_pgtask.go
index 2db70f152f..d4c2e511a1 100644
--- a/pkg/generated/clientset/versioned/typed/crunchydata.com/v1/fake/fake_pgtask.go
+++ b/pkg/generated/clientset/versioned/typed/crunchydata.com/v1/fake/fake_pgtask.go
@@ -1,5 +1,5 @@
/*
-Copyright 2020 Crunchy Data Solutions, Inc.
+Copyright 2020 - 2021 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/pkg/generated/clientset/versioned/typed/crunchydata.com/v1/generated_expansion.go b/pkg/generated/clientset/versioned/typed/crunchydata.com/v1/generated_expansion.go
index 066f811e51..5ea3a63db1 100644
--- a/pkg/generated/clientset/versioned/typed/crunchydata.com/v1/generated_expansion.go
+++ b/pkg/generated/clientset/versioned/typed/crunchydata.com/v1/generated_expansion.go
@@ -1,5 +1,5 @@
/*
-Copyright 2020 Crunchy Data Solutions, Inc.
+Copyright 2020 - 2021 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/pkg/generated/clientset/versioned/typed/crunchydata.com/v1/pgcluster.go b/pkg/generated/clientset/versioned/typed/crunchydata.com/v1/pgcluster.go
index 035712a6ef..d87c091f29 100644
--- a/pkg/generated/clientset/versioned/typed/crunchydata.com/v1/pgcluster.go
+++ b/pkg/generated/clientset/versioned/typed/crunchydata.com/v1/pgcluster.go
@@ -1,5 +1,5 @@
/*
-Copyright 2020 Crunchy Data Solutions, Inc.
+Copyright 2020 - 2021 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/pkg/generated/clientset/versioned/typed/crunchydata.com/v1/pgpolicy.go b/pkg/generated/clientset/versioned/typed/crunchydata.com/v1/pgpolicy.go
index 402b99f523..31d0ddd8b7 100644
--- a/pkg/generated/clientset/versioned/typed/crunchydata.com/v1/pgpolicy.go
+++ b/pkg/generated/clientset/versioned/typed/crunchydata.com/v1/pgpolicy.go
@@ -1,5 +1,5 @@
/*
-Copyright 2020 Crunchy Data Solutions, Inc.
+Copyright 2020 - 2021 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/pkg/generated/clientset/versioned/typed/crunchydata.com/v1/pgreplica.go b/pkg/generated/clientset/versioned/typed/crunchydata.com/v1/pgreplica.go
index 88fb060a69..5df06c39a4 100644
--- a/pkg/generated/clientset/versioned/typed/crunchydata.com/v1/pgreplica.go
+++ b/pkg/generated/clientset/versioned/typed/crunchydata.com/v1/pgreplica.go
@@ -1,5 +1,5 @@
/*
-Copyright 2020 Crunchy Data Solutions, Inc.
+Copyright 2020 - 2021 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/pkg/generated/clientset/versioned/typed/crunchydata.com/v1/pgtask.go b/pkg/generated/clientset/versioned/typed/crunchydata.com/v1/pgtask.go
index 25b2cd1055..cbed3e2468 100644
--- a/pkg/generated/clientset/versioned/typed/crunchydata.com/v1/pgtask.go
+++ b/pkg/generated/clientset/versioned/typed/crunchydata.com/v1/pgtask.go
@@ -1,5 +1,5 @@
/*
-Copyright 2020 Crunchy Data Solutions, Inc.
+Copyright 2020 - 2021 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/pkg/generated/informers/externalversions/crunchydata.com/interface.go b/pkg/generated/informers/externalversions/crunchydata.com/interface.go
index dfe44a0fcb..698763aff3 100644
--- a/pkg/generated/informers/externalversions/crunchydata.com/interface.go
+++ b/pkg/generated/informers/externalversions/crunchydata.com/interface.go
@@ -1,5 +1,5 @@
/*
-Copyright 2020 Crunchy Data Solutions, Inc.
+Copyright 2020 - 2021 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/pkg/generated/informers/externalversions/crunchydata.com/v1/interface.go b/pkg/generated/informers/externalversions/crunchydata.com/v1/interface.go
index c34a37f8e7..b30e24b239 100644
--- a/pkg/generated/informers/externalversions/crunchydata.com/v1/interface.go
+++ b/pkg/generated/informers/externalversions/crunchydata.com/v1/interface.go
@@ -1,5 +1,5 @@
/*
-Copyright 2020 Crunchy Data Solutions, Inc.
+Copyright 2020 - 2021 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/pkg/generated/informers/externalversions/crunchydata.com/v1/pgcluster.go b/pkg/generated/informers/externalversions/crunchydata.com/v1/pgcluster.go
index 92f0d9a6a9..3be680bc29 100644
--- a/pkg/generated/informers/externalversions/crunchydata.com/v1/pgcluster.go
+++ b/pkg/generated/informers/externalversions/crunchydata.com/v1/pgcluster.go
@@ -1,5 +1,5 @@
/*
-Copyright 2020 Crunchy Data Solutions, Inc.
+Copyright 2020 - 2021 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/pkg/generated/informers/externalversions/crunchydata.com/v1/pgpolicy.go b/pkg/generated/informers/externalversions/crunchydata.com/v1/pgpolicy.go
index ea70fa720d..4383e0914c 100644
--- a/pkg/generated/informers/externalversions/crunchydata.com/v1/pgpolicy.go
+++ b/pkg/generated/informers/externalversions/crunchydata.com/v1/pgpolicy.go
@@ -1,5 +1,5 @@
/*
-Copyright 2020 Crunchy Data Solutions, Inc.
+Copyright 2020 - 2021 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/pkg/generated/informers/externalversions/crunchydata.com/v1/pgreplica.go b/pkg/generated/informers/externalversions/crunchydata.com/v1/pgreplica.go
index 99332793ac..840efd6b0a 100644
--- a/pkg/generated/informers/externalversions/crunchydata.com/v1/pgreplica.go
+++ b/pkg/generated/informers/externalversions/crunchydata.com/v1/pgreplica.go
@@ -1,5 +1,5 @@
/*
-Copyright 2020 Crunchy Data Solutions, Inc.
+Copyright 2020 - 2021 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/pkg/generated/informers/externalversions/crunchydata.com/v1/pgtask.go b/pkg/generated/informers/externalversions/crunchydata.com/v1/pgtask.go
index bf1cbd60a8..c25536e459 100644
--- a/pkg/generated/informers/externalversions/crunchydata.com/v1/pgtask.go
+++ b/pkg/generated/informers/externalversions/crunchydata.com/v1/pgtask.go
@@ -1,5 +1,5 @@
/*
-Copyright 2020 Crunchy Data Solutions, Inc.
+Copyright 2020 - 2021 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/pkg/generated/informers/externalversions/factory.go b/pkg/generated/informers/externalversions/factory.go
index 56886a005a..65c18752b4 100644
--- a/pkg/generated/informers/externalversions/factory.go
+++ b/pkg/generated/informers/externalversions/factory.go
@@ -1,5 +1,5 @@
/*
-Copyright 2020 Crunchy Data Solutions, Inc.
+Copyright 2020 - 2021 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/pkg/generated/informers/externalversions/generic.go b/pkg/generated/informers/externalversions/generic.go
index 130dd5ad37..48e7491d80 100644
--- a/pkg/generated/informers/externalversions/generic.go
+++ b/pkg/generated/informers/externalversions/generic.go
@@ -1,5 +1,5 @@
/*
-Copyright 2020 Crunchy Data Solutions, Inc.
+Copyright 2020 - 2021 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/pkg/generated/informers/externalversions/internalinterfaces/factory_interfaces.go b/pkg/generated/informers/externalversions/internalinterfaces/factory_interfaces.go
index 4086ab3a09..130bc043a8 100644
--- a/pkg/generated/informers/externalversions/internalinterfaces/factory_interfaces.go
+++ b/pkg/generated/informers/externalversions/internalinterfaces/factory_interfaces.go
@@ -1,5 +1,5 @@
/*
-Copyright 2020 Crunchy Data Solutions, Inc.
+Copyright 2020 - 2021 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/pkg/generated/listers/crunchydata.com/v1/expansion_generated.go b/pkg/generated/listers/crunchydata.com/v1/expansion_generated.go
index ca6b77b1a3..369c56b717 100644
--- a/pkg/generated/listers/crunchydata.com/v1/expansion_generated.go
+++ b/pkg/generated/listers/crunchydata.com/v1/expansion_generated.go
@@ -1,5 +1,5 @@
/*
-Copyright 2020 Crunchy Data Solutions, Inc.
+Copyright 2020 - 2021 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/pkg/generated/listers/crunchydata.com/v1/pgcluster.go b/pkg/generated/listers/crunchydata.com/v1/pgcluster.go
index 10db1c63a2..eb059beb06 100644
--- a/pkg/generated/listers/crunchydata.com/v1/pgcluster.go
+++ b/pkg/generated/listers/crunchydata.com/v1/pgcluster.go
@@ -1,5 +1,5 @@
/*
-Copyright 2020 Crunchy Data Solutions, Inc.
+Copyright 2020 - 2021 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/pkg/generated/listers/crunchydata.com/v1/pgpolicy.go b/pkg/generated/listers/crunchydata.com/v1/pgpolicy.go
index d996df08ee..d73fef8e45 100644
--- a/pkg/generated/listers/crunchydata.com/v1/pgpolicy.go
+++ b/pkg/generated/listers/crunchydata.com/v1/pgpolicy.go
@@ -1,5 +1,5 @@
/*
-Copyright 2020 Crunchy Data Solutions, Inc.
+Copyright 2020 - 2021 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/pkg/generated/listers/crunchydata.com/v1/pgreplica.go b/pkg/generated/listers/crunchydata.com/v1/pgreplica.go
index 23632d1ee4..db450cee51 100644
--- a/pkg/generated/listers/crunchydata.com/v1/pgreplica.go
+++ b/pkg/generated/listers/crunchydata.com/v1/pgreplica.go
@@ -1,5 +1,5 @@
/*
-Copyright 2020 Crunchy Data Solutions, Inc.
+Copyright 2020 - 2021 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/pkg/generated/listers/crunchydata.com/v1/pgtask.go b/pkg/generated/listers/crunchydata.com/v1/pgtask.go
index 94a405754c..2042db9581 100644
--- a/pkg/generated/listers/crunchydata.com/v1/pgtask.go
+++ b/pkg/generated/listers/crunchydata.com/v1/pgtask.go
@@ -1,5 +1,5 @@
/*
-Copyright 2020 Crunchy Data Solutions, Inc.
+Copyright 2020 - 2021 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/postgres-operator.go b/postgres-operator.go
index 325303c9a2..5289876661 100644
--- a/postgres-operator.go
+++ b/postgres-operator.go
@@ -1,7 +1,7 @@
package main
/*
-Copyright 2017 - 2020 Crunchy Data
+Copyright 2017 - 2021 Crunchy Data
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/pv/create-pv-nfs-label.sh b/pv/create-pv-nfs-label.sh
index a77e3e68e3..a347a907fd 100755
--- a/pv/create-pv-nfs-label.sh
+++ b/pv/create-pv-nfs-label.sh
@@ -1,6 +1,6 @@
#!/bin/bash
-# Copyright 2018 - 2020 Crunchy Data Solutions, Inc.
+# Copyright 2018 - 2021 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/pv/create-pv-nfs-legacy.sh b/pv/create-pv-nfs-legacy.sh
index 4850e73652..96d698e159 100755
--- a/pv/create-pv-nfs-legacy.sh
+++ b/pv/create-pv-nfs-legacy.sh
@@ -1,6 +1,6 @@
#!/bin/bash
-# Copyright 2017 - 2020 Crunchy Data Solutions, Inc.
+# Copyright 2017 - 2021 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/pv/create-pv-nfs.sh b/pv/create-pv-nfs.sh
index 8b2ef4ab67..e1e71c95d8 100755
--- a/pv/create-pv-nfs.sh
+++ b/pv/create-pv-nfs.sh
@@ -1,5 +1,5 @@
#!/bin/bash
-# Copyright 2017 - 2020 Crunchy Data Solutions, Inc.
+# Copyright 2017 - 2021 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/pv/create-pv.sh b/pv/create-pv.sh
index 46bbf4dbe8..6d9ede0b71 100755
--- a/pv/create-pv.sh
+++ b/pv/create-pv.sh
@@ -1,5 +1,5 @@
#!/bin/bash
-# Copyright 2017 - 2020 Crunchy Data Solutions, Inc.
+# Copyright 2017 - 2021 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/pv/delete-pv.sh b/pv/delete-pv.sh
index cd653a1778..b3d7422ff2 100755
--- a/pv/delete-pv.sh
+++ b/pv/delete-pv.sh
@@ -1,5 +1,5 @@
#!/bin/bash
-# Copyright 2017 - 2020 Crunchy Data Solutions, Inc.
+# Copyright 2017 - 2021 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/testing/pgo_cli/cluster_backup_test.go b/testing/pgo_cli/cluster_backup_test.go
index d2f8508c3d..ceeefe2e5a 100644
--- a/testing/pgo_cli/cluster_backup_test.go
+++ b/testing/pgo_cli/cluster_backup_test.go
@@ -1,7 +1,7 @@
package pgo_cli_test
/*
- Copyright 2020 Crunchy Data Solutions, Inc.
+ Copyright 2020 - 2021 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/testing/pgo_cli/cluster_cat_test.go b/testing/pgo_cli/cluster_cat_test.go
index 4cb159be8d..aea958fb15 100644
--- a/testing/pgo_cli/cluster_cat_test.go
+++ b/testing/pgo_cli/cluster_cat_test.go
@@ -1,7 +1,7 @@
package pgo_cli_test
/*
- Copyright 2020 Crunchy Data Solutions, Inc.
+ Copyright 2020 - 2021 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/testing/pgo_cli/cluster_clone_test.go b/testing/pgo_cli/cluster_clone_test.go
index 606139e820..24154c2f05 100644
--- a/testing/pgo_cli/cluster_clone_test.go
+++ b/testing/pgo_cli/cluster_clone_test.go
@@ -1,7 +1,7 @@
package pgo_cli_test
/*
- Copyright 2020 Crunchy Data Solutions, Inc.
+ Copyright 2020 - 2021 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/testing/pgo_cli/cluster_create_test.go b/testing/pgo_cli/cluster_create_test.go
index 26f0c2be4f..f0579de8cd 100644
--- a/testing/pgo_cli/cluster_create_test.go
+++ b/testing/pgo_cli/cluster_create_test.go
@@ -1,7 +1,7 @@
package pgo_cli_test
/*
- Copyright 2020 Crunchy Data Solutions, Inc.
+ Copyright 2020 - 2021 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/testing/pgo_cli/cluster_delete_test.go b/testing/pgo_cli/cluster_delete_test.go
index cba99408f7..1285b6026e 100644
--- a/testing/pgo_cli/cluster_delete_test.go
+++ b/testing/pgo_cli/cluster_delete_test.go
@@ -1,7 +1,7 @@
package pgo_cli_test
/*
- Copyright 2020 Crunchy Data Solutions, Inc.
+ Copyright 2020 - 2021 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/testing/pgo_cli/cluster_df_test.go b/testing/pgo_cli/cluster_df_test.go
index 8171a7aa45..91ae0b8092 100644
--- a/testing/pgo_cli/cluster_df_test.go
+++ b/testing/pgo_cli/cluster_df_test.go
@@ -1,7 +1,7 @@
package pgo_cli_test
/*
- Copyright 2020 Crunchy Data Solutions, Inc.
+ Copyright 2020 - 2021 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/testing/pgo_cli/cluster_failover_test.go b/testing/pgo_cli/cluster_failover_test.go
index d35a6d87f5..ac4f2a40c6 100644
--- a/testing/pgo_cli/cluster_failover_test.go
+++ b/testing/pgo_cli/cluster_failover_test.go
@@ -1,7 +1,7 @@
package pgo_cli_test
/*
- Copyright 2020 Crunchy Data Solutions, Inc.
+ Copyright 2020 - 2021 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/testing/pgo_cli/cluster_label_test.go b/testing/pgo_cli/cluster_label_test.go
index 0f54f7af93..ccf4a17461 100644
--- a/testing/pgo_cli/cluster_label_test.go
+++ b/testing/pgo_cli/cluster_label_test.go
@@ -1,7 +1,7 @@
package pgo_cli_test
/*
- Copyright 2020 Crunchy Data Solutions, Inc.
+ Copyright 2020 - 2021 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/testing/pgo_cli/cluster_pgbouncer_test.go b/testing/pgo_cli/cluster_pgbouncer_test.go
index 9c5b72ba66..b0f9199881 100644
--- a/testing/pgo_cli/cluster_pgbouncer_test.go
+++ b/testing/pgo_cli/cluster_pgbouncer_test.go
@@ -1,7 +1,7 @@
package pgo_cli_test
/*
- Copyright 2020 Crunchy Data Solutions, Inc.
+ Copyright 2020 - 2021 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/testing/pgo_cli/cluster_policy_test.go b/testing/pgo_cli/cluster_policy_test.go
index df7197deb4..66db7c6080 100644
--- a/testing/pgo_cli/cluster_policy_test.go
+++ b/testing/pgo_cli/cluster_policy_test.go
@@ -1,7 +1,7 @@
package pgo_cli_test
/*
- Copyright 2020 Crunchy Data Solutions, Inc.
+ Copyright 2020 - 2021 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/testing/pgo_cli/cluster_pvc_test.go b/testing/pgo_cli/cluster_pvc_test.go
index bd91b28435..0009225e4a 100644
--- a/testing/pgo_cli/cluster_pvc_test.go
+++ b/testing/pgo_cli/cluster_pvc_test.go
@@ -1,7 +1,7 @@
package pgo_cli_test
/*
- Copyright 2020 Crunchy Data Solutions, Inc.
+ Copyright 2020 - 2021 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/testing/pgo_cli/cluster_reload_test.go b/testing/pgo_cli/cluster_reload_test.go
index e2900ee4fb..02cf63a479 100644
--- a/testing/pgo_cli/cluster_reload_test.go
+++ b/testing/pgo_cli/cluster_reload_test.go
@@ -1,7 +1,7 @@
package pgo_cli_test
/*
- Copyright 2020 Crunchy Data Solutions, Inc.
+ Copyright 2020 - 2021 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/testing/pgo_cli/cluster_restart_test.go b/testing/pgo_cli/cluster_restart_test.go
index 3f438b6570..2a106fbd41 100644
--- a/testing/pgo_cli/cluster_restart_test.go
+++ b/testing/pgo_cli/cluster_restart_test.go
@@ -1,7 +1,7 @@
package pgo_cli_test
/*
- Copyright 2020 Crunchy Data Solutions, Inc.
+ Copyright 2020 - 2021 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/testing/pgo_cli/cluster_scale_test.go b/testing/pgo_cli/cluster_scale_test.go
index 11ce9a9c21..219e44f582 100644
--- a/testing/pgo_cli/cluster_scale_test.go
+++ b/testing/pgo_cli/cluster_scale_test.go
@@ -1,7 +1,7 @@
package pgo_cli_test
/*
- Copyright 2020 Crunchy Data Solutions, Inc.
+ Copyright 2020 - 2021 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/testing/pgo_cli/cluster_scaledown_test.go b/testing/pgo_cli/cluster_scaledown_test.go
index f1926a4d4d..5e9dc16b28 100644
--- a/testing/pgo_cli/cluster_scaledown_test.go
+++ b/testing/pgo_cli/cluster_scaledown_test.go
@@ -1,7 +1,7 @@
package pgo_cli_test
/*
- Copyright 2020 Crunchy Data Solutions, Inc.
+ Copyright 2020 - 2021 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/testing/pgo_cli/cluster_test_test.go b/testing/pgo_cli/cluster_test_test.go
index 153d47f467..76100eb9f0 100644
--- a/testing/pgo_cli/cluster_test_test.go
+++ b/testing/pgo_cli/cluster_test_test.go
@@ -1,7 +1,7 @@
package pgo_cli_test
/*
- Copyright 2020 Crunchy Data Solutions, Inc.
+ Copyright 2020 - 2021 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/testing/pgo_cli/cluster_user_test.go b/testing/pgo_cli/cluster_user_test.go
index 9e59757a9a..964bb6b58c 100644
--- a/testing/pgo_cli/cluster_user_test.go
+++ b/testing/pgo_cli/cluster_user_test.go
@@ -1,7 +1,7 @@
package pgo_cli_test
/*
- Copyright 2020 Crunchy Data Solutions, Inc.
+ Copyright 2020 - 2021 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/testing/pgo_cli/operator_namespace_test.go b/testing/pgo_cli/operator_namespace_test.go
index ef327c2ece..57bc685ea2 100644
--- a/testing/pgo_cli/operator_namespace_test.go
+++ b/testing/pgo_cli/operator_namespace_test.go
@@ -1,7 +1,7 @@
package pgo_cli_test
/*
- Copyright 2020 Crunchy Data Solutions, Inc.
+ Copyright 2020 - 2021 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/testing/pgo_cli/operator_rbac_test.go b/testing/pgo_cli/operator_rbac_test.go
index 8fa4609894..569f1bd090 100644
--- a/testing/pgo_cli/operator_rbac_test.go
+++ b/testing/pgo_cli/operator_rbac_test.go
@@ -1,7 +1,7 @@
package pgo_cli_test
/*
- Copyright 2020 Crunchy Data Solutions, Inc.
+ Copyright 2020 - 2021 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/testing/pgo_cli/operator_test.go b/testing/pgo_cli/operator_test.go
index 743b872614..09e8148c68 100644
--- a/testing/pgo_cli/operator_test.go
+++ b/testing/pgo_cli/operator_test.go
@@ -1,7 +1,7 @@
package pgo_cli_test
/*
- Copyright 2020 Crunchy Data Solutions, Inc.
+ Copyright 2020 - 2021 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/testing/pgo_cli/suite_helpers_test.go b/testing/pgo_cli/suite_helpers_test.go
index 4ec5ed613b..b4db220487 100644
--- a/testing/pgo_cli/suite_helpers_test.go
+++ b/testing/pgo_cli/suite_helpers_test.go
@@ -1,7 +1,7 @@
package pgo_cli_test
/*
- Copyright 2020 Crunchy Data Solutions, Inc.
+ Copyright 2020 - 2021 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/testing/pgo_cli/suite_pgo_cmd_test.go b/testing/pgo_cli/suite_pgo_cmd_test.go
index 91aec62228..245d314aa7 100644
--- a/testing/pgo_cli/suite_pgo_cmd_test.go
+++ b/testing/pgo_cli/suite_pgo_cmd_test.go
@@ -1,7 +1,7 @@
package pgo_cli_test
/*
- Copyright 2020 Crunchy Data Solutions, Inc.
+ Copyright 2020 - 2021 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/testing/pgo_cli/suite_test.go b/testing/pgo_cli/suite_test.go
index 4f2056d08e..9429f28278 100644
--- a/testing/pgo_cli/suite_test.go
+++ b/testing/pgo_cli/suite_test.go
@@ -1,7 +1,7 @@
package pgo_cli_test
/*
- Copyright 2020 Crunchy Data Solutions, Inc.
+ Copyright 2020 - 2021 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
From 33c6a7f3270ff9ed0f7416057323f6f7691adb6c Mon Sep 17 00:00:00 2001
From: "Jonathan S. Katz"
Date: Thu, 7 Jan 2021 11:51:11 -0500
Subject: [PATCH 047/129] Modify roles for pgo-target-role
This moves the "replicasets" resource to be under the "apps"
group, where it really should have been all along (at least since
1.9). This also adds an explicit permission for viewing pods/logs.
Co-authored-by: Pramodh Mereddy
Issue: [ch10081]
---
deploy/cluster-roles.yaml | 11 ++++--
docs/content/architecture/namespace.md | 35 +++++++++++--------
.../files/pgo-configs/pgo-target-role.json | 18 ++++++++--
.../templates/cluster-rbac.yaml.j2 | 11 ++++--
installers/helm/templates/rbac.yaml | 3 +-
installers/kubectl/postgres-operator.yml | 1 +
6 files changed, 57 insertions(+), 22 deletions(-)
diff --git a/deploy/cluster-roles.yaml b/deploy/cluster-roles.yaml
index cb0bb85b41..d760492836 100644
--- a/deploy/cluster-roles.yaml
+++ b/deploy/cluster-roles.yaml
@@ -41,8 +41,6 @@ rules:
- endpoints
- pods
- pods/exec
- - pods/log
- - replicasets
- secrets
- services
- persistentvolumeclaims
@@ -55,10 +53,19 @@ rules:
- update
- delete
- deletecollection
+ - apiGroups:
+ - ''
+ resources:
+ - pods/log
+ verbs:
+ - get
+ - list
+ - watch
- apiGroups:
- apps
resources:
- deployments
+ - replicasets
verbs:
- get
- list
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/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..09b77ef469 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
@@ -15,8 +15,6 @@
"endpoints",
"pods",
"pods/exec",
- "pods/log",
- "replicasets",
"secrets",
"services",
"persistentvolumeclaims"
@@ -32,12 +30,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/templates/cluster-rbac.yaml.j2 b/installers/ansible/roles/pgo-operator/templates/cluster-rbac.yaml.j2
index 771080042e..4212d9107b 100644
--- a/installers/ansible/roles/pgo-operator/templates/cluster-rbac.yaml.j2
+++ b/installers/ansible/roles/pgo-operator/templates/cluster-rbac.yaml.j2
@@ -42,8 +42,6 @@ rules:
- endpoints
- pods
- pods/exec
- - pods/log
- - replicasets
- secrets
- services
- persistentvolumeclaims
@@ -56,10 +54,19 @@ rules:
- update
- delete
- deletecollection
+ - apiGroups:
+ - ''
+ resources:
+ - pods/log
+ verbs:
+ - get
+ - list
+ - watch
- apiGroups:
- apps
resources:
- deployments
+ - replicasets
verbs:
- get
- list
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/kubectl/postgres-operator.yml b/installers/kubectl/postgres-operator.yml
index 971e436d20..d163795cbe 100644
--- a/installers/kubectl/postgres-operator.yml
+++ b/installers/kubectl/postgres-operator.yml
@@ -60,6 +60,7 @@ rules:
- extensions
resources:
- deployments
+ - replicasets
verbs:
- get
- list
From 3f8c6541e1705ca903db173fd1de73e3904e01ac Mon Sep 17 00:00:00 2001
From: "Jonathan S. Katz"
Date: Mon, 11 Jan 2021 11:51:02 -0500
Subject: [PATCH 048/129] Embed pgMonitor assets into pgo-deployer container
This allows for the pgo-deployer container to install the monitoring
stack without making any additional calls to the Internet. If the
installation script does not detect the presence of the asset files,
it will attempt to download them from the Internet.
Issue: [ch10107]
Issue: #1987
---
build/pgo-deployer/Dockerfile | 2 ++
.../ansible/roles/pgo-metrics/tasks/alertmanager.yml | 2 +-
.../ansible/roles/pgo-metrics/tasks/grafana.yml | 6 +++---
.../metrics/ansible/roles/pgo-metrics/tasks/main.yml | 11 +++++++++--
.../ansible/roles/pgo-metrics/tasks/prometheus.yml | 8 ++++----
5 files changed, 19 insertions(+), 10 deletions(-)
diff --git a/build/pgo-deployer/Dockerfile b/build/pgo-deployer/Dockerfile
index c2000eaa87..2f18411334 100644
--- a/build/pgo-deployer/Dockerfile
+++ b/build/pgo-deployer/Dockerfile
@@ -70,6 +70,7 @@ 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 +79,7 @@ ENV HOME="/tmp"
RUN chmod g=u /etc/passwd
RUN chmod g=u /uid_daemon.sh
+RUN chown -R 2:2 /tmp/.pgo/metrics
ENTRYPOINT ["/uid_daemon.sh"]
diff --git a/installers/metrics/ansible/roles/pgo-metrics/tasks/alertmanager.yml b/installers/metrics/ansible/roles/pgo-metrics/tasks/alertmanager.yml
index dc82e92d1a..13fd013290 100644
--- a/installers/metrics/ansible/roles/pgo-metrics/tasks/alertmanager.yml
+++ b/installers/metrics/ansible/roles/pgo-metrics/tasks/alertmanager.yml
@@ -16,7 +16,7 @@
- name: Set pgmonitor Prometheus Directory Fact
set_fact:
- pgmonitor_prometheus_dir: "{{ metrics_dir }}/pgmonitor-{{ pgmonitor_version | replace('v','') }}/prometheus"
+ pgmonitor_prometheus_dir: "{{ metrics_dir }}/pgmonitor/prometheus"
- name: Copy Alertmanger Config to Output Directory
command: "cp {{ pgmonitor_prometheus_dir }}/{{ item.src }} {{ alertmanager_output_dir }}/{{ item.dst }}"
diff --git a/installers/metrics/ansible/roles/pgo-metrics/tasks/grafana.yml b/installers/metrics/ansible/roles/pgo-metrics/tasks/grafana.yml
index 1d528429b5..f0b88e0c65 100644
--- a/installers/metrics/ansible/roles/pgo-metrics/tasks/grafana.yml
+++ b/installers/metrics/ansible/roles/pgo-metrics/tasks/grafana.yml
@@ -9,7 +9,7 @@
grafana_output_dir: "{{ metrics_dir }}/output/grafana"
- name: Ensure Output Directory Exists
- file:
+ file:
path: "{{ grafana_output_dir }}"
state: "directory"
mode: "0700"
@@ -48,7 +48,7 @@
- name: Set pgmonitor Grafana Directory Fact
set_fact:
- pgmonitor_grafana_dir: "{{ metrics_dir }}/pgmonitor-{{ pgmonitor_version | replace('v','') }}/grafana"
+ pgmonitor_grafana_dir: "{{ metrics_dir }}/pgmonitor/grafana"
- name: Copy Grafana Config to Output Directory
command: "cp {{ pgmonitor_grafana_dir }}/{{ item }} {{ grafana_output_dir }}"
@@ -111,7 +111,7 @@
src: "{{ item }}"
dest: "{{ grafana_output_dir }}/{{ item | replace('.j2', '') }}"
mode: "0600"
- loop:
+ loop:
- grafana-pvc.json.j2
- grafana-service.json.j2
- grafana-deployment.json.j2
diff --git a/installers/metrics/ansible/roles/pgo-metrics/tasks/main.yml b/installers/metrics/ansible/roles/pgo-metrics/tasks/main.yml
index 425d3f8e1b..ae2c27b8e3 100644
--- a/installers/metrics/ansible/roles/pgo-metrics/tasks/main.yml
+++ b/installers/metrics/ansible/roles/pgo-metrics/tasks/main.yml
@@ -1,7 +1,7 @@
---
- name: Set Metrics Directory Fact
set_fact:
- metrics_dir: "{{ ansible_env.HOME }}/.pgo/metrics/{{ metrics_namespace }}"
+ metrics_dir: "{{ ansible_env.HOME }}/.pgo/metrics"
tags: always
- name: Ensure Output Directory Exists
@@ -54,16 +54,23 @@
- install-metrics
- update-metrics
block:
+ - name: Check for pgmonitor
+ stat:
+ path: "{{ metrics_dir }}/pgmonitor"
+ register: pgmonitor_dir
+
- name: Download pgmonitor {{ pgmonitor_version }}
get_url:
url: https://github.com/CrunchyData/pgmonitor/archive/{{ pgmonitor_version }}.tar.gz
dest: "{{ metrics_dir }}"
mode: "0600"
+ when: not pgmonitor_dir.stat.exists
- name: Extract pgmonitor
unarchive:
src: "{{ metrics_dir }}/pgmonitor-{{ pgmonitor_version | replace('v','') }}.tar.gz"
- dest: "{{ metrics_dir }}"
+ dest: "{{ metrics_dir }}/pgmonitor"
+ when: not pgmonitor_dir.stat.exists
- name: Create Metrics Image Pull Secret
shell: >
diff --git a/installers/metrics/ansible/roles/pgo-metrics/tasks/prometheus.yml b/installers/metrics/ansible/roles/pgo-metrics/tasks/prometheus.yml
index ffcfa7c625..b9d70aad1f 100644
--- a/installers/metrics/ansible/roles/pgo-metrics/tasks/prometheus.yml
+++ b/installers/metrics/ansible/roles/pgo-metrics/tasks/prometheus.yml
@@ -9,7 +9,7 @@
prom_output_dir: "{{ metrics_dir }}/output/prom"
- name: Ensure Output Directory Exists
- file:
+ file:
path: "{{ prom_output_dir }}"
state: "directory"
mode: "0700"
@@ -22,7 +22,7 @@
loop:
- prometheus-rbac.json.j2
when: create_rbac | bool
-
+
- name: Create Prometheus RBAC
command: "{{ kubectl_or_oc }} create -f {{ prom_output_dir }}/{{ item }} -n {{ metrics_namespace }}"
loop:
@@ -35,7 +35,7 @@
- name: Set pgmonitor Prometheus Directory Fact
set_fact:
- pgmonitor_prometheus_dir: "{{ metrics_dir }}/pgmonitor-{{ pgmonitor_version | replace('v','') }}/prometheus"
+ pgmonitor_prometheus_dir: "{{ metrics_dir }}/pgmonitor/prometheus"
- name: Copy Prometheus Config to Output Directory
command: "cp {{ pgmonitor_prometheus_dir }}/{{ item.src }} {{ prom_output_dir }}/{{ item.dst }}"
@@ -88,7 +88,7 @@
src: "{{ item }}"
dest: "{{ prom_output_dir }}/{{ item | replace('.j2', '') }}"
mode: "0600"
- loop:
+ loop:
- prometheus-pvc.json.j2
- prometheus-service.json.j2
- prometheus-deployment.json.j2
From bea76d5328953b0992266e0d33cb86fc23d74b1e Mon Sep 17 00:00:00 2001
From: "Jonathan S. Katz"
Date: Wed, 13 Jan 2021 12:43:46 -0500
Subject: [PATCH 049/129] Gracefully handle names with "replica" in `pgo test`
This provides an even tighter check than the one introduced in
b0a276ab1 to determine what is a primary vs. replica Service.
Issue: [ch9764]
Issue: #2047
---
internal/apiserver/clusterservice/clusterimpl.go | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/internal/apiserver/clusterservice/clusterimpl.go b/internal/apiserver/clusterservice/clusterimpl.go
index b089162368..d5d02544b2 100644
--- a/internal/apiserver/clusterservice/clusterimpl.go
+++ b/internal/apiserver/clusterservice/clusterimpl.go
@@ -485,7 +485,7 @@ func TestCluster(name, selector, ns, pgouser string, allFlag bool) msgs.ClusterT
switch {
default:
endpoint.InstanceType = msgs.ClusterTestInstanceTypePrimary
- case strings.HasSuffix(service.Name, msgs.PodTypeReplica):
+ case (strings.HasSuffix(service.Name, "-"+msgs.PodTypeReplica) && strings.Count(service.Name, "-"+msgs.PodTypeReplica) == 1):
endpoint.InstanceType = msgs.ClusterTestInstanceTypeReplica
case service.Pgbouncer:
endpoint.InstanceType = msgs.ClusterTestInstanceTypePGBouncer
From d094049be7e40c27aa1c6cde6ec1d88016a7a207 Mon Sep 17 00:00:00 2001
From: "Jonathan S. Katz"
Date: Wed, 13 Jan 2021 16:47:44 -0500
Subject: [PATCH 050/129] Ensure standby cluster creates pgBouncer Secret
The code was not allowing for this to happen. Even though the
pgBouncer credential will need to be rotated after a standby is
promoted, we can still create the credential with a nonworking
default.
Issue: [ch10083]
---
internal/operator/cluster/pgbouncer.go | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/internal/operator/cluster/pgbouncer.go b/internal/operator/cluster/pgbouncer.go
index cc9cbf9910..422614131f 100644
--- a/internal/operator/cluster/pgbouncer.go
+++ b/internal/operator/cluster/pgbouncer.go
@@ -185,6 +185,12 @@ func AddPgbouncer(clientset kubernetes.Interface, restconfig *rest.Config, clust
if err := setPostgreSQLPassword(clientset, restconfig, pod, cluster.Spec.Port, pgBouncerPassword); err != nil {
return err
}
+ } else {
+ // if this is a standby cluster, we still need to create a pgBouncer Secret,
+ // but no credentials are available
+ if err := createPgbouncerSecret(clientset, cluster, ""); err != nil {
+ return err
+ }
}
// next, create the pgBouncer config map that will allow pgBouncer to be
From 4bb67f99edba43563272bbae48beeea3586bfcac Mon Sep 17 00:00:00 2001
From: "Jonathan S. Katz"
Date: Wed, 13 Jan 2021 17:38:23 -0500
Subject: [PATCH 051/129] Remove restrictions on generic linking options for
pgBackRest
This is useful for creating a new cluster with an external WAL
volume from a cluster that lacks one.
Issue: [ch10157]
---
internal/apiserver/backupoptions/pgbackrestoptions.go | 2 --
1 file changed, 2 deletions(-)
diff --git a/internal/apiserver/backupoptions/pgbackrestoptions.go b/internal/apiserver/backupoptions/pgbackrestoptions.go
index ea932de517..026fb45501 100644
--- a/internal/apiserver/backupoptions/pgbackrestoptions.go
+++ b/internal/apiserver/backupoptions/pgbackrestoptions.go
@@ -25,8 +25,6 @@ var pgBackRestOptsDenyList = []string{
"--config",
"--config-include-path",
"--config-path",
- "--link-all",
- "--link-map",
"--lock-path",
"--log-timestamp",
"--neutral-umask",
From 90d2097fd6879f979cd1003a6e2a1157f5cd5e86 Mon Sep 17 00:00:00 2001
From: "Jonathan S. Katz"
Date: Wed, 13 Jan 2021 18:24:57 -0500
Subject: [PATCH 052/129] Reconcile API server permissions list
Of note is the "Restart" permission which was not added to the
validation list, and removing some permissions for calls that are
no longer available.
Issue: #2203
Issue: #2201
---
docs/content/Security/configure-postgres-operator-rbac.md | 1 +
internal/apiserver/perms.go | 7 +------
2 files changed, 2 insertions(+), 6 deletions(-)
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/internal/apiserver/perms.go b/internal/apiserver/perms.go
index db4861fe7e..1874ffbd3c 100644
--- a/internal/apiserver/perms.go
+++ b/internal/apiserver/perms.go
@@ -41,7 +41,6 @@ const (
CREATE_CLUSTER_PERM = "CreateCluster"
CREATE_DUMP_PERM = "CreateDump"
CREATE_FAILOVER_PERM = "CreateFailover"
- CREATE_INGEST_PERM = "CreateIngest"
CREATE_NAMESPACE_PERM = "CreateNamespace"
CREATE_PGADMIN_PERM = "CreatePgAdmin"
CREATE_PGBOUNCER_PERM = "CreatePgbouncer"
@@ -58,7 +57,6 @@ const (
// DELETE
DELETE_BACKUP_PERM = "DeleteBackup"
DELETE_CLUSTER_PERM = "DeleteCluster"
- DELETE_INGEST_PERM = "DeleteIngest"
DELETE_NAMESPACE_PERM = "DeleteNamespace"
DELETE_PGADMIN_PERM = "DeletePgAdmin"
DELETE_PGBOUNCER_PERM = "DeletePgbouncer"
@@ -72,7 +70,6 @@ const (
SHOW_BACKUP_PERM = "ShowBackup"
SHOW_CLUSTER_PERM = "ShowCluster"
SHOW_CONFIG_PERM = "ShowConfig"
- SHOW_INGEST_PERM = "ShowIngest"
SHOW_NAMESPACE_PERM = "ShowNamespace"
SHOW_PGADMIN_PERM = "ShowPgAdmin"
SHOW_PGBOUNCER_PERM = "ShowPgBouncer"
@@ -117,6 +114,7 @@ func initializePerms() {
DF_CLUSTER_PERM: "yes",
LABEL_PERM: "yes",
RELOAD_PERM: "yes",
+ RESTART_PERM: "yes",
RESTORE_PERM: "yes",
STATUS_PERM: "yes",
TEST_CLUSTER_PERM: "yes",
@@ -127,7 +125,6 @@ func initializePerms() {
CREATE_DUMP_PERM: "yes",
CREATE_CLUSTER_PERM: "yes",
CREATE_FAILOVER_PERM: "yes",
- CREATE_INGEST_PERM: "yes",
CREATE_NAMESPACE_PERM: "yes",
CREATE_PGADMIN_PERM: "yes",
CREATE_PGBOUNCER_PERM: "yes",
@@ -144,7 +141,6 @@ func initializePerms() {
// DELETE
DELETE_BACKUP_PERM: "yes",
DELETE_CLUSTER_PERM: "yes",
- DELETE_INGEST_PERM: "yes",
DELETE_NAMESPACE_PERM: "yes",
DELETE_PGADMIN_PERM: "yes",
DELETE_PGBOUNCER_PERM: "yes",
@@ -158,7 +154,6 @@ func initializePerms() {
SHOW_BACKUP_PERM: "yes",
SHOW_CLUSTER_PERM: "yes",
SHOW_CONFIG_PERM: "yes",
- SHOW_INGEST_PERM: "yes",
SHOW_NAMESPACE_PERM: "yes",
SHOW_PGADMIN_PERM: "yes",
SHOW_PGBOUNCER_PERM: "yes",
From 2291158f0572f067f07650488a454fa5f4a33524 Mon Sep 17 00:00:00 2001
From: "Jonathan S. Katz"
Date: Sun, 17 Jan 2021 10:40:22 -0500
Subject: [PATCH 053/129] Remove references to `--autofail` flag
This has been gone for a bit. Replace with `--enable-autofail`
and `--disable-autofail`.
Issue: #2214
---
docs/content/architecture/disaster-recovery.md | 2 +-
docs/content/pgo-client/common-tasks.md | 2 +-
docs/content/pgo-client/reference/pgo_update.md | 4 ++--
docs/content/pgo-client/reference/pgo_update_cluster.md | 2 +-
internal/apiserver/clusterservice/clusterimpl.go | 2 +-
internal/apiserver/clusterservice/clusterservice.go | 4 ++--
pgo/cmd/update.go | 6 +++---
7 files changed, 11 insertions(+), 11 deletions(-)
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/pgo-client/common-tasks.md b/docs/content/pgo-client/common-tasks.md
index 2c58209937..265e0354aa 100644
--- a/docs/content/pgo-client/common-tasks.md
+++ b/docs/content/pgo-client/common-tasks.md
@@ -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`)
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/internal/apiserver/clusterservice/clusterimpl.go b/internal/apiserver/clusterservice/clusterimpl.go
index d5d02544b2..3516a54f4a 100644
--- a/internal/apiserver/clusterservice/clusterimpl.go
+++ b/internal/apiserver/clusterservice/clusterimpl.go
@@ -1888,7 +1888,7 @@ func UpdateCluster(request *msgs.UpdateClusterRequest) msgs.UpdateClusterRespons
for _, cluster := range clusterList.Items {
- //set autofail=true or false on each pgcluster CRD
+ // set --enable-autofail / --disable-autofail on each pgcluster CRD
// Make the change based on the value of Autofail vis-a-vis UpdateClusterAutofailStatus
switch request.Autofail {
case msgs.UpdateClusterAutofailEnable:
diff --git a/internal/apiserver/clusterservice/clusterservice.go b/internal/apiserver/clusterservice/clusterservice.go
index eac046a580..9d1a3a29e5 100644
--- a/internal/apiserver/clusterservice/clusterservice.go
+++ b/internal/apiserver/clusterservice/clusterservice.go
@@ -306,8 +306,8 @@ func TestClusterHandler(w http.ResponseWriter, r *http.Request) {
}
// UpdateClusterHandler ...
-// pgo update cluster mycluster --autofail=true
-// pgo update cluster --selector=env=research --autofail=false
+// pgo update cluster mycluster --enable-autofail
+// pgo update cluster --selector=env=research --disable-autofail
// returns a UpdateClusterResponse
func UpdateClusterHandler(w http.ResponseWriter, r *http.Request) {
// swagger:operation POST /clustersupdate clusterservice clustersupdate
diff --git a/pgo/cmd/update.go b/pgo/cmd/update.go
index 408ee5b699..fde0f6f774 100644
--- a/pgo/cmd/update.go
+++ b/pgo/cmd/update.go
@@ -169,8 +169,8 @@ var UpdateCmd = &cobra.Command{
Short: "Update a pgouser, pgorole, or cluster",
Long: `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"
@@ -215,7 +215,7 @@ var UpdateClusterCmd = &cobra.Command{
Short: "Update a PostgreSQL cluster",
Long: `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`,
From b15c31dc96e842740096e3d4e2d5580f575e3b49 Mon Sep 17 00:00:00 2001
From: "Jonathan S. Katz"
Date: Sun, 17 Jan 2021 10:52:55 -0500
Subject: [PATCH 054/129] Adjust replica creation logic as part of a standby
cluster
This ensures an explicit call of standby creation after receiving
a notification that a stanza for the cluster was successfully
created.
Co-authored-by: Andrew L'Ecuyer
---
internal/controller/job/backresthandler.go | 3 +++
1 file changed, 3 insertions(+)
diff --git a/internal/controller/job/backresthandler.go b/internal/controller/job/backresthandler.go
index faf1061a7a..36c455b6f5 100644
--- a/internal/controller/job/backresthandler.go
+++ b/internal/controller/job/backresthandler.go
@@ -198,6 +198,9 @@ func (c *Controller) handleBackrestStanzaCreateUpdate(job *apiv1.Job) error {
log.Debugf("job Controller: standby cluster %s will now be set to an initialized "+
"status", clusterName)
controller.SetClusterInitializedStatus(c.Client, clusterName, namespace)
+
+ // now initialize the creation of any replica
+ controller.InitializeReplicaCreation(c.Client, clusterName, namespace)
return nil
}
From 7afc54ccb2e26cb12116b6c132cb8a0aadbe9543 Mon Sep 17 00:00:00 2001
From: "Jonathan S. Katz"
Date: Sun, 17 Jan 2021 21:44:41 -0500
Subject: [PATCH 055/129] Update label validation to match Kubernetes rules
The validation rules for certain kinds of keys are now covered,
and values are properly validated against what Kubernetes expects.
Issue: [ch10197]
Issue: #2215
---
internal/apiserver/labelservice/labelimpl.go | 63 +++++++++++++++-----
1 file changed, 48 insertions(+), 15 deletions(-)
diff --git a/internal/apiserver/labelservice/labelimpl.go b/internal/apiserver/labelservice/labelimpl.go
index 8c47701931..a5bfb3c6be 100644
--- a/internal/apiserver/labelservice/labelimpl.go
+++ b/internal/apiserver/labelservice/labelimpl.go
@@ -16,8 +16,13 @@ limitations under the License.
*/
import (
+<<<<<<< HEAD
"encoding/json"
"errors"
+=======
+ "context"
+ "fmt"
+>>>>>>> 5c56a341d... Update label validation to match Kubernetes rules
"strings"
"github.com/crunchydata/postgres-operator/internal/apiserver"
@@ -54,7 +59,7 @@ func Label(request *msgs.LabelRequest, ns, pgouser string) msgs.LabelResponse {
labelsMap, err = validateLabel(request.LabelCmdLabel, ns)
if err != nil {
resp.Status.Code = msgs.Error
- resp.Status.Msg = "labels not formatted correctly"
+ resp.Status.Msg = err.Error()
return resp
}
@@ -250,29 +255,57 @@ func PatchPgcluster(newLabels map[string]string, oldCRD crv1.Pgcluster, ns strin
}
-func validateLabel(LabelCmdLabel, ns string) (map[string]string, error) {
- var err error
- labelMap := make(map[string]string)
- userValues := strings.Split(LabelCmdLabel, ",")
- for _, v := range userValues {
+// validateLabel validates if the input is a valid Kubernetes label
+//
+// A label is composed of a key and value.
+//
+// The key can either be a name or have an optional prefix that i
+// terminated by a "/", e.g. "prefix/name"
+//
+// The name must be a valid DNS 1123 value
+// THe prefix must be a valid DNS 1123 subdomain
+//
+// The value can be validated by machinery provided by Kubenretes
+//
+// Ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/
+func validateLabel(LabelCmdLabel string) (map[string]string, error) {
+ labelMap := map[string]string{}
+
+ for _, v := range strings.Split(LabelCmdLabel, ",") {
pair := strings.Split(v, "=")
if len(pair) != 2 {
- log.Error("label format incorrect, requires name=value")
- return labelMap, errors.New("label format incorrect, requires name=value")
+ return labelMap, fmt.Errorf("label format incorrect, requires key=value")
}
- errs := validation.IsDNS1035Label(pair[0])
- if len(errs) > 0 {
- return labelMap, errors.New("label format incorrect, requires name=value " + errs[0])
+ // first handle the key
+ keyParts := strings.Split(pair[0], "/")
+
+ switch len(keyParts) {
+ default:
+ return labelMap, fmt.Errorf("invalid key for " + v)
+ case 2:
+ if errs := validation.IsDNS1123Subdomain(keyParts[0]); len(errs) > 0 {
+ return labelMap, fmt.Errorf("invalid key for %s: %s", v, strings.Join(errs, ","))
+ }
+
+ if errs := validation.IsDNS1123Label(keyParts[1]); len(errs) > 0 {
+ return labelMap, fmt.Errorf("invalid key for %s: %s", v, strings.Join(errs, ","))
+ }
+ case 1:
+ if errs := validation.IsDNS1123Label(keyParts[0]); len(errs) > 0 {
+ return labelMap, fmt.Errorf("invalid key for %s: %s", v, strings.Join(errs, ","))
+ }
}
- errs = validation.IsDNS1035Label(pair[1])
- if len(errs) > 0 {
- return labelMap, errors.New("label format incorrect, requires name=value " + errs[0])
+
+ // handle the value
+ if errs := validation.IsValidLabelValue(pair[1]); len(errs) > 0 {
+ return labelMap, fmt.Errorf("invalid value for %s: %s", v, strings.Join(errs, ","))
}
labelMap[pair[0]] = pair[1]
}
- return labelMap, err
+
+ return labelMap, nil
}
// DeleteLabel ...
From f87c6b185e873e6a787043b1fc80d54ef0998f1f Mon Sep 17 00:00:00 2001
From: "Jonathan S. Katz"
Date: Mon, 18 Jan 2021 10:23:59 -0500
Subject: [PATCH 056/129] Refactor of label validation function
This moves the function to a common area in the API code and adds
some much needed testing to it.
---
internal/apiserver/common.go | 57 +++++++++++++++++
internal/apiserver/common_test.go | 63 +++++++++++++++++++
internal/apiserver/labelservice/labelimpl.go | 65 +-------------------
3 files changed, 122 insertions(+), 63 deletions(-)
diff --git a/internal/apiserver/common.go b/internal/apiserver/common.go
index d4dffc8368..d3e1c007dc 100644
--- a/internal/apiserver/common.go
+++ b/internal/apiserver/common.go
@@ -26,6 +26,7 @@ import (
kerrors "k8s.io/apimachinery/pkg/api/errors"
"k8s.io/apimachinery/pkg/api/resource"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ "k8s.io/apimachinery/pkg/util/validation"
)
const (
@@ -44,6 +45,8 @@ var (
// ErrDBContainerNotFound is an error that indicates that a "database" container
// could not be found in a specific pod
ErrDBContainerNotFound = errors.New("\"database\" container not found in pod")
+ // ErrLabelInvalid indicates that a label is invalid
+ ErrLabelInvalid = errors.New("invalid label")
// ErrStandbyNotAllowed contains the error message returned when an API call is not
// permitted because it involves a cluster that is in standby mode
ErrStandbyNotAllowed = errors.New("Action not permitted because standby mode is enabled")
@@ -109,6 +112,60 @@ func IsValidPVC(pvcName, ns string) bool {
return pvc != nil
}
+// ValidateLabel is derived from a legacy method and validates if the input is a
+// valid Kubernetes label.
+//
+// A label is composed of a key and value.
+//
+// The key can either be a name or have an optional prefix that i
+// terminated by a "/", e.g. "prefix/name"
+//
+// The name must be a valid DNS 1123 value
+// THe prefix must be a valid DNS 1123 subdomain
+//
+// The value can be validated by machinery provided by Kubenretes
+//
+// Ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/
+func ValidateLabel(labelStr string) (map[string]string, error) {
+ labelMap := map[string]string{}
+
+ for _, v := range strings.Split(labelStr, ",") {
+ pair := strings.Split(v, "=")
+ if len(pair) != 2 {
+ return labelMap, fmt.Errorf("%w: label format incorrect, requires key=value", ErrLabelInvalid)
+ }
+
+ // first handle the key
+ keyParts := strings.Split(pair[0], "/")
+
+ switch len(keyParts) {
+ default:
+ return labelMap, fmt.Errorf("%w: invalid key for "+v, ErrLabelInvalid)
+ case 2:
+ if errs := validation.IsDNS1123Subdomain(keyParts[0]); len(errs) > 0 {
+ return labelMap, fmt.Errorf("%w: invalid key for %s: %s", ErrLabelInvalid, v, strings.Join(errs, ","))
+ }
+
+ if errs := validation.IsDNS1123Label(keyParts[1]); len(errs) > 0 {
+ return labelMap, fmt.Errorf("%w: invalid key for %s: %s", ErrLabelInvalid, v, strings.Join(errs, ","))
+ }
+ case 1:
+ if errs := validation.IsDNS1123Label(keyParts[0]); len(errs) > 0 {
+ return labelMap, fmt.Errorf("%w: invalid key for %s: %s", ErrLabelInvalid, v, strings.Join(errs, ","))
+ }
+ }
+
+ // handle the value
+ if errs := validation.IsValidLabelValue(pair[1]); len(errs) > 0 {
+ return labelMap, fmt.Errorf("%w: invalid value for %s: %s", ErrLabelInvalid, v, strings.Join(errs, ","))
+ }
+
+ labelMap[pair[0]] = pair[1]
+ }
+
+ return labelMap, nil
+}
+
// ValidateResourceRequestLimit validates that a Kubernetes Requests/Limit pair
// is valid, both by validating the values are valid quantity values, and then
// by checking that the limit >= request. This also needs to check against the
diff --git a/internal/apiserver/common_test.go b/internal/apiserver/common_test.go
index 6ec95b7066..c36cb7bfa3 100644
--- a/internal/apiserver/common_test.go
+++ b/internal/apiserver/common_test.go
@@ -16,11 +16,74 @@ limitations under the License.
*/
import (
+ "errors"
+ "fmt"
+ "strings"
"testing"
"k8s.io/apimachinery/pkg/api/resource"
)
+func TestValidateLabel(t *testing.T) {
+ t.Run("valid", func(t *testing.T) {
+ inputs := []map[string]string{
+ map[string]string{"key": "value"},
+ map[string]string{"example.com/key": "value"},
+ map[string]string{"key1": "value1", "key2": "value2"},
+ }
+
+ for _, input := range inputs {
+ labelStr := ""
+
+ for k, v := range input {
+ labelStr += fmt.Sprintf("%s=%s,", k, v)
+ }
+
+ labelStr = strings.Trim(labelStr, ",")
+
+ t.Run(labelStr, func(*testing.T) {
+ labels, err := ValidateLabel(labelStr)
+
+ if err != nil {
+ t.Fatalf("expected no error, got: %s", err.Error())
+ }
+
+ for k := range labels {
+ if v, ok := input[k]; !(ok || v == labels[k]) {
+ t.Fatalf("label values do not matched (%s vs. %s)", input[k], labels[k])
+ }
+ }
+ })
+ }
+ })
+
+ t.Run("invalid", func(t *testing.T) {
+ inputs := []string{
+ "key",
+ "key=value=value",
+ "key=value,",
+ "b@d=value",
+ "b@d-prefix/key=value",
+ "really/bad/prefix/key=value",
+ "key=v\\alue",
+ }
+
+ for _, input := range inputs {
+ t.Run(input, func(t *testing.T) {
+ _, err := ValidateLabel(input)
+
+ if err == nil {
+ t.Fatalf("expected an invalid input error.")
+ }
+
+ if !errors.Is(err, ErrLabelInvalid) {
+ t.Fatalf("expected an ErrLabelInvalid error.")
+ }
+ })
+ }
+ })
+}
+
func TestValidateResourceRequestLimit(t *testing.T) {
t.Run("valid", func(t *testing.T) {
resources := []struct{ request, limit, defaultRequest string }{
diff --git a/internal/apiserver/labelservice/labelimpl.go b/internal/apiserver/labelservice/labelimpl.go
index a5bfb3c6be..deb49e32b9 100644
--- a/internal/apiserver/labelservice/labelimpl.go
+++ b/internal/apiserver/labelservice/labelimpl.go
@@ -16,14 +16,7 @@ limitations under the License.
*/
import (
-<<<<<<< HEAD
"encoding/json"
- "errors"
-=======
- "context"
- "fmt"
->>>>>>> 5c56a341d... Update label validation to match Kubernetes rules
- "strings"
"github.com/crunchydata/postgres-operator/internal/apiserver"
"github.com/crunchydata/postgres-operator/internal/config"
@@ -36,7 +29,6 @@ import (
"k8s.io/apimachinery/pkg/api/meta"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/types"
- "k8s.io/apimachinery/pkg/util/validation"
)
// Label ... 2 forms ...
@@ -56,7 +48,7 @@ func Label(request *msgs.LabelRequest, ns, pgouser string) msgs.LabelResponse {
return resp
}
- labelsMap, err = validateLabel(request.LabelCmdLabel, ns)
+ labelsMap, err = apiserver.ValidateLabel(request.LabelCmdLabel)
if err != nil {
resp.Status.Code = msgs.Error
resp.Status.Msg = err.Error()
@@ -255,59 +247,6 @@ func PatchPgcluster(newLabels map[string]string, oldCRD crv1.Pgcluster, ns strin
}
-// validateLabel validates if the input is a valid Kubernetes label
-//
-// A label is composed of a key and value.
-//
-// The key can either be a name or have an optional prefix that i
-// terminated by a "/", e.g. "prefix/name"
-//
-// The name must be a valid DNS 1123 value
-// THe prefix must be a valid DNS 1123 subdomain
-//
-// The value can be validated by machinery provided by Kubenretes
-//
-// Ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/
-func validateLabel(LabelCmdLabel string) (map[string]string, error) {
- labelMap := map[string]string{}
-
- for _, v := range strings.Split(LabelCmdLabel, ",") {
- pair := strings.Split(v, "=")
- if len(pair) != 2 {
- return labelMap, fmt.Errorf("label format incorrect, requires key=value")
- }
-
- // first handle the key
- keyParts := strings.Split(pair[0], "/")
-
- switch len(keyParts) {
- default:
- return labelMap, fmt.Errorf("invalid key for " + v)
- case 2:
- if errs := validation.IsDNS1123Subdomain(keyParts[0]); len(errs) > 0 {
- return labelMap, fmt.Errorf("invalid key for %s: %s", v, strings.Join(errs, ","))
- }
-
- if errs := validation.IsDNS1123Label(keyParts[1]); len(errs) > 0 {
- return labelMap, fmt.Errorf("invalid key for %s: %s", v, strings.Join(errs, ","))
- }
- case 1:
- if errs := validation.IsDNS1123Label(keyParts[0]); len(errs) > 0 {
- return labelMap, fmt.Errorf("invalid key for %s: %s", v, strings.Join(errs, ","))
- }
- }
-
- // handle the value
- if errs := validation.IsValidLabelValue(pair[1]); len(errs) > 0 {
- return labelMap, fmt.Errorf("invalid value for %s: %s", v, strings.Join(errs, ","))
- }
-
- labelMap[pair[0]] = pair[1]
- }
-
- return labelMap, nil
-}
-
// DeleteLabel ...
// pgo delete label mycluster yourcluster --label=env=prod
// pgo delete label --label=env=prod --selector=group=somegroup
@@ -325,7 +264,7 @@ func DeleteLabel(request *msgs.DeleteLabelRequest, ns string) msgs.LabelResponse
return resp
}
- labelsMap, err = validateLabel(request.LabelCmdLabel, ns)
+ labelsMap, err = apiserver.ValidateLabel(request.LabelCmdLabel)
if err != nil {
resp.Status.Code = msgs.Error
resp.Status.Msg = "labels not formatted correctly"
From 69ae6435e19b06662c33a759da80b7310e506124 Mon Sep 17 00:00:00 2001
From: "Jonathan S. Katz"
Date: Mon, 18 Jan 2021 10:31:28 -0500
Subject: [PATCH 057/129] Unify label validation strategy across API functions
The `pgo create cluster` command was not using the same label
validation as the other label commands were using.
Issue: [ch10201]
---
.../apiserver/clusterservice/clusterimpl.go | 18 ++++++------------
1 file changed, 6 insertions(+), 12 deletions(-)
diff --git a/internal/apiserver/clusterservice/clusterimpl.go b/internal/apiserver/clusterservice/clusterimpl.go
index 3516a54f4a..1bf31a84ec 100644
--- a/internal/apiserver/clusterservice/clusterimpl.go
+++ b/internal/apiserver/clusterservice/clusterimpl.go
@@ -576,18 +576,12 @@ func CreateCluster(request *msgs.CreateClusterRequest, ns, pgouser string) msgs.
return resp
}
- userLabelsMap := make(map[string]string)
- if request.UserLabels != "" {
- labels := strings.Split(request.UserLabels, ",")
- for _, v := range labels {
- p := strings.Split(v, "=")
- if len(p) < 2 {
- resp.Status.Code = msgs.Error
- resp.Status.Msg = "invalid labels format"
- return resp
- }
- userLabelsMap[p[0]] = p[1]
- }
+ userLabelsMap, err := apiserver.ValidateLabel(request.UserLabels)
+
+ if err != nil {
+ resp.Status.Code = msgs.Error
+ resp.Status.Msg = err.Error()
+ return resp
}
// validate any parameters provided to bootstrap the cluster from an existing data source
From 42f489223460acf261c5901e237a070b48609dcf Mon Sep 17 00:00:00 2001
From: "Jonathan S. Katz"
Date: Fri, 22 Jan 2021 09:35:13 -0500
Subject: [PATCH 058/129] Fix compilation errors from bad backpatch
The apiserver binary was missing one import.
---
internal/apiserver/common.go | 1 +
1 file changed, 1 insertion(+)
diff --git a/internal/apiserver/common.go b/internal/apiserver/common.go
index d3e1c007dc..a072ebc779 100644
--- a/internal/apiserver/common.go
+++ b/internal/apiserver/common.go
@@ -19,6 +19,7 @@ import (
"errors"
"fmt"
"strconv"
+ "strings"
"github.com/crunchydata/postgres-operator/internal/config"
crv1 "github.com/crunchydata/postgres-operator/pkg/apis/crunchydata.com/v1"
From eacd2bbb2b8ecec79e1f70ba95ca31289a208480 Mon Sep 17 00:00:00 2001
From: andrewlecuyer <43458182+andrewlecuyer@users.noreply.github.com>
Date: Fri, 22 Jan 2021 08:14:00 -0600
Subject: [PATCH 059/129] Update Replica Init Logic
The operator will now only initialize replica creation prior to stanza
creation if the cluster has s3-only enabled. Otherwise replicas will
be created following stanza-creation.
Additionally, the InitializeReplicaCreation() function (as used to
trigger the creation of replicas via pgreplica custom resources) now
uses a Patch() operation instead of an Update() operation. This is to
prevent potential conflicts when updating a pgreplica.
---
internal/controller/controllerutil.go | 17 +-
internal/controller/job/backresthandler.go | 28 ++-
internal/controller/pod/inithandler.go | 22 +-
internal/kubeapi/patch.go | 171 ++++++++++++++
internal/kubeapi/patch_test.go | 259 +++++++++++++++++++++
5 files changed, 475 insertions(+), 22 deletions(-)
create mode 100644 internal/kubeapi/patch.go
create mode 100644 internal/kubeapi/patch_test.go
diff --git a/internal/controller/controllerutil.go b/internal/controller/controllerutil.go
index db67bb1e56..849582db04 100644
--- a/internal/controller/controllerutil.go
+++ b/internal/controller/controllerutil.go
@@ -20,6 +20,7 @@ import (
"errors"
"github.com/crunchydata/postgres-operator/internal/config"
+ "github.com/crunchydata/postgres-operator/internal/kubeapi"
crv1 "github.com/crunchydata/postgres-operator/pkg/apis/crunchydata.com/v1"
pgo "github.com/crunchydata/postgres-operator/pkg/generated/clientset/versioned"
log "github.com/sirupsen/logrus"
@@ -61,17 +62,19 @@ func InitializeReplicaCreation(clientset pgo.Interface, clusterName,
log.Error(err)
return err
}
- for _, pgreplica := range pgreplicaList.Items {
- if pgreplica.Annotations == nil {
- pgreplica.Annotations = make(map[string]string)
+ for i := range pgreplicaList.Items {
+ patch, err := kubeapi.NewMergePatch().
+ Add("metadata", "annotations")(map[string]string{
+ config.ANNOTATION_PGHA_BOOTSTRAP_REPLICA: "true",
+ }).Bytes()
+ if err != nil {
+ log.Error(err)
}
- pgreplica.Annotations[config.ANNOTATION_PGHA_BOOTSTRAP_REPLICA] = "true"
-
- if _, err = clientset.CrunchydataV1().Pgreplicas(namespace).Update(&pgreplica); err != nil {
+ if _, err := clientset.CrunchydataV1().Pgreplicas(namespace).
+ Patch(pgreplicaList.Items[i].GetName(), types.MergePatchType, patch, ""); err != nil {
log.Error(err)
- return err
}
}
return nil
diff --git a/internal/controller/job/backresthandler.go b/internal/controller/job/backresthandler.go
index 36c455b6f5..5d142b6ebb 100644
--- a/internal/controller/job/backresthandler.go
+++ b/internal/controller/job/backresthandler.go
@@ -144,12 +144,18 @@ func (c *Controller) handleBackrestBackupUpdate(job *apiv1.Job) error {
if labels[config.LABEL_PGHA_BACKUP_TYPE] == crv1.BackupTypeBootstrap {
log.Debugf("jobController onUpdate initial backup complete")
- controller.SetClusterInitializedStatus(c.Client, labels[config.LABEL_PG_CLUSTER],
- job.ObjectMeta.Namespace)
+ if err := controller.SetClusterInitializedStatus(c.Client, labels[config.LABEL_PG_CLUSTER],
+ job.ObjectMeta.Namespace); err != nil {
+ log.Error(err)
+ return err
+ }
- // now initialize the creation of any replica
- controller.InitializeReplicaCreation(c.Client, labels[config.LABEL_PG_CLUSTER],
- job.ObjectMeta.Namespace)
+ // now initialize the creation of any replicas
+ if err := controller.InitializeReplicaCreation(c.Client, labels[config.LABEL_PG_CLUSTER],
+ job.ObjectMeta.Namespace); err != nil {
+ log.Error(err)
+ return err
+ }
} else if labels[config.LABEL_PGHA_BACKUP_TYPE] == crv1.BackupTypeFailover {
err := clusteroperator.RemovePrimaryOnRoleChangeTag(c.Client, c.Client.Config,
@@ -197,10 +203,18 @@ func (c *Controller) handleBackrestStanzaCreateUpdate(job *apiv1.Job) error {
if cluster.Spec.Standby {
log.Debugf("job Controller: standby cluster %s will now be set to an initialized "+
"status", clusterName)
- controller.SetClusterInitializedStatus(c.Client, clusterName, namespace)
+ if err := controller.SetClusterInitializedStatus(c.Client, clusterName,
+ namespace); err != nil {
+ log.Error(err)
+ return err
+ }
// now initialize the creation of any replica
- controller.InitializeReplicaCreation(c.Client, clusterName, namespace)
+ if err := controller.InitializeReplicaCreation(c.Client, clusterName,
+ namespace); err != nil {
+ log.Error(err)
+ return err
+ }
return nil
}
diff --git a/internal/controller/pod/inithandler.go b/internal/controller/pod/inithandler.go
index 6f3eed2c2d..b96a911c22 100644
--- a/internal/controller/pod/inithandler.go
+++ b/internal/controller/pod/inithandler.go
@@ -208,15 +208,21 @@ func (c *Controller) handleStandbyInit(cluster *crv1.Pgcluster) error {
}
backrestoperator.StanzaCreate(namespace, clusterName, c.Client)
} else {
- controller.SetClusterInitializedStatus(c.Client, clusterName, namespace)
- }
+ if err := controller.SetClusterInitializedStatus(c.Client, clusterName,
+ namespace); err != nil {
+ log.Error(err)
+ }
- // If a standby cluster initialize the creation of any replicas. Replicas
- // can be initialized right away, i.e. there is no dependency on
- // stanza-creation and/or the creation of any backups, since the replicas
- // will be generated from the pgBackRest repository of an external PostgreSQL
- // database (which should already exist).
- controller.InitializeReplicaCreation(c.Client, clusterName, namespace)
+ // If a standby cluster with s3 only initialize the creation of any replicas. Replicas
+ // can be initialized right away, i.e. there is no dependency on
+ // stanza-creation and/or the creation of any backups, since the replicas
+ // will be generated from the pgBackRest repository of an external PostgreSQL
+ // database (which should already exist).
+ if err := controller.InitializeReplicaCreation(c.Client, clusterName,
+ namespace); err != nil {
+ log.Error(err)
+ }
+ }
// if this is a pgbouncer enabled cluster, add a pgbouncer
// Note: we only warn if we cannot create the pgBouncer, so eecution can
diff --git a/internal/kubeapi/patch.go b/internal/kubeapi/patch.go
new file mode 100644
index 0000000000..57f11e6867
--- /dev/null
+++ b/internal/kubeapi/patch.go
@@ -0,0 +1,171 @@
+package kubeapi
+
+/*
+ Copyright 2020 - 2021 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.
+*/
+
+import (
+ "encoding/json"
+ "strings"
+)
+
+// escapeJSONPointer encodes '~' and '/' according to RFC 6901.
+var escapeJSONPointer = strings.NewReplacer(
+ "~", "~0",
+ "/", "~1",
+).Replace
+
+// JSON6902 represents a JSON Patch according to RFC 6902; the same as
+// k8s.io/apimachinery/pkg/types.JSONPatchType.
+type JSON6902 []interface{}
+
+// NewJSONPatch creates a new JSON Patch according to RFC 6902; the same as
+// k8s.io/apimachinery/pkg/types.JSONPatchType.
+func NewJSONPatch() *JSON6902 { return &JSON6902{} }
+
+func (*JSON6902) pointer(tokens ...string) string {
+ var b strings.Builder
+
+ for _, t := range tokens {
+ _ = b.WriteByte('/')
+ _, _ = b.WriteString(escapeJSONPointer(t))
+ }
+
+ return b.String()
+}
+
+// Add appends an "add" operation to patch.
+//
+// > The "add" operation performs one of the following functions,
+// > depending upon what the target location references:
+// >
+// > o If the target location specifies an array index, a new value is
+// > inserted into the array at the specified index.
+// >
+// > o If the target location specifies an object member that does not
+// > already exist, a new member is added to the object.
+// >
+// > o If the target location specifies an object member that does exist,
+// > that member's value is replaced.
+//
+func (patch *JSON6902) Add(path ...string) func(value interface{}) *JSON6902 {
+ i := len(*patch)
+ f := func(value interface{}) *JSON6902 {
+ (*patch)[i] = map[string]interface{}{
+ "op": "add",
+ "path": patch.pointer(path...),
+ "value": value,
+ }
+ return patch
+ }
+
+ *patch = append(*patch, f)
+
+ return f
+}
+
+// Remove appends a "remove" operation to patch.
+//
+// > The "remove" operation removes the value at the target location.
+// >
+// > The target location MUST exist for the operation to be successful.
+//
+func (patch *JSON6902) Remove(path ...string) *JSON6902 {
+ *patch = append(*patch, map[string]interface{}{
+ "op": "remove",
+ "path": patch.pointer(path...),
+ })
+
+ return patch
+}
+
+// Replace appends a "replace" operation to patch.
+//
+// > The "replace" operation replaces the value at the target location
+// > with a new value.
+// >
+// > The target location MUST exist for the operation to be successful.
+//
+func (patch *JSON6902) Replace(path ...string) func(value interface{}) *JSON6902 {
+ i := len(*patch)
+ f := func(value interface{}) *JSON6902 {
+ (*patch)[i] = map[string]interface{}{
+ "op": "replace",
+ "path": patch.pointer(path...),
+ "value": value,
+ }
+ return patch
+ }
+
+ *patch = append(*patch, f)
+
+ return f
+}
+
+// Bytes returns the JSON representation of patch.
+func (patch JSON6902) Bytes() ([]byte, error) { return json.Marshal(patch) }
+
+// Merge7386 represents a JSON Merge Patch according to RFC 7386; the same as
+// k8s.io/apimachinery/pkg/types.MergePatchType.
+type Merge7386 map[string]interface{}
+
+// NewMergePatch creates a new JSON Merge Patch according to RFC 7386; the same
+// as k8s.io/apimachinery/pkg/types.MergePatchType.
+func NewMergePatch() *Merge7386 { return &Merge7386{} }
+
+// Add modifies patch to indicate that the member at path should be added or
+// replaced with value.
+//
+// > If the provided merge patch contains members that do not appear
+// > within the target, those members are added. If the target does
+// > contain the member, the value is replaced. Null values in the merge
+// > patch are given special meaning to indicate the removal of existing
+// > values in the target.
+//
+func (patch *Merge7386) Add(path ...string) func(value interface{}) *Merge7386 {
+ position := *patch
+
+ for len(path) > 1 {
+ p, ok := position[path[0]].(Merge7386)
+ if !ok {
+ p = Merge7386{}
+ position[path[0]] = p
+ }
+
+ position = p
+ path = path[1:]
+ }
+
+ if len(path) < 1 {
+ return func(interface{}) *Merge7386 { return patch }
+ }
+
+ f := func(value interface{}) *Merge7386 {
+ position[path[0]] = value
+ return patch
+ }
+
+ position[path[0]] = f
+
+ return f
+}
+
+// Remove modifies patch to indicate that the member at path should be removed
+// if it exists.
+func (patch *Merge7386) Remove(path ...string) *Merge7386 {
+ return patch.Add(path...)(nil)
+}
+
+// Bytes returns the JSON representation of patch.
+func (patch Merge7386) Bytes() ([]byte, error) { return json.Marshal(patch) }
diff --git a/internal/kubeapi/patch_test.go b/internal/kubeapi/patch_test.go
new file mode 100644
index 0000000000..706ee4768d
--- /dev/null
+++ b/internal/kubeapi/patch_test.go
@@ -0,0 +1,259 @@
+package kubeapi
+
+/*
+ Copyright 2020 - 2021 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.
+*/
+
+import (
+ "encoding/json"
+ "reflect"
+ "testing"
+
+ "k8s.io/apimachinery/pkg/labels"
+)
+
+func assertJSON(t testing.TB, expected interface{}, actual []byte) {
+ t.Helper()
+
+ var e, a interface{}
+ var err error
+
+ if b, ok := expected.([]byte); ok {
+ err = json.Unmarshal(b, &e)
+ } else if s, ok := expected.(string); ok {
+ err = json.Unmarshal([]byte(s), &e)
+ } else {
+ t.Fatalf("bug in test: unexpected type %T", expected)
+ }
+
+ if err != nil {
+ t.Fatalf("bug in test: %v", err)
+ }
+
+ if err = json.Unmarshal(actual, &a); err != nil {
+ t.Fatal(err)
+ }
+
+ if !reflect.DeepEqual(e, a) {
+ t.Errorf("\n--- Expected\n+++ Actual\n- %#v\n+ %#v", e, a)
+ }
+}
+
+func TestEscapeJSONPointer(t *testing.T) {
+ t.Parallel()
+
+ for _, tt := range []struct{ input, expected string }{
+ {"~1", "~01"},
+ {"~~", "~0~0"},
+ {"/1", "~11"},
+ {"//", "~1~1"},
+ {"~/", "~0~1"},
+ {"some/label", "some~1label"},
+ } {
+ actual := escapeJSONPointer(tt.input)
+ if actual != tt.expected {
+ t.Errorf("expected %q, got %q", tt.expected, actual)
+ }
+ }
+}
+
+func TestJSON6902(t *testing.T) {
+ t.Parallel()
+
+ // An empty patch is valid.
+ {
+ b, err := NewJSONPatch().Bytes()
+ if err != nil {
+ t.Fatalf("expected no error, got %v", err)
+ }
+ assertJSON(t, `[]`, b)
+ }
+
+ // Calling Add without its value is an error.
+ {
+ patch := NewJSONPatch()
+ patch.Add("a")
+ _, err := patch.Bytes()
+ if err == nil {
+ t.Fatal("expected an error, got none")
+ }
+ }
+ {
+ b, err := NewJSONPatch().Add("a", "x/y", "0")(9).Bytes()
+ if err != nil {
+ t.Fatalf("expected no error, got %v", err)
+ }
+ assertJSON(t, `[{"op":"add","path":"/a/x~1y/0","value":9}]`, b)
+ }
+
+ // Remove takes no value.
+ {
+ b, err := NewJSONPatch().Remove("b", "m/n/o").Bytes()
+ if err != nil {
+ t.Fatalf("expected no error, got %v", err)
+ }
+ assertJSON(t, `[{"op":"remove","path":"/b/m~1n~1o"}]`, b)
+ }
+
+ // Calling Replace without its value is an error.
+ {
+ patch := NewJSONPatch()
+ patch.Replace("a")
+ _, err := patch.Bytes()
+ if err == nil {
+ t.Fatal("expected an error, got none")
+ }
+ }
+ {
+ b, err := NewJSONPatch().Replace("metadata", "labels", "some/thing")("5").Bytes()
+ if err != nil {
+ t.Fatalf("expected no error, got %v", err)
+ }
+ assertJSON(t, `[{"op":"replace","path":"/metadata/labels/some~1thing","value":"5"}]`, b)
+ }
+
+ // Calls are chainable.
+ {
+ b, err := NewJSONPatch().
+ Add("a", "b", "c")(1).
+ Remove("x", "y", "z").
+ Replace("1", "2", "3")(nil).
+ Bytes()
+ if err != nil {
+ t.Fatalf("expected no error, got %v", err)
+ }
+ assertJSON(t, `[
+ {"op":"add","path":"/a/b/c","value":1},
+ {"op":"remove","path":"/x/y/z"},
+ {"op":"replace","path":"/1/2/3","value":null}
+ ]`, b)
+ }
+}
+
+func TestMerge7386(t *testing.T) {
+ t.Parallel()
+
+ // An empty patch is valid.
+ {
+ b, err := NewMergePatch().Bytes()
+ if err != nil {
+ t.Fatalf("expected no error, got %v", err)
+ }
+ assertJSON(t, `{}`, b)
+ }
+
+ // Calling Add without a path does nothing.
+ {
+ b, err := NewMergePatch().Add()("anything").Bytes()
+ if err != nil {
+ t.Fatalf("expected no error, got %v", err)
+ }
+ assertJSON(t, `{}`, b)
+ }
+
+ // Calling Add without its value is an error.
+ {
+ patch := NewMergePatch()
+ patch.Add("a")
+ _, err := patch.Bytes()
+ if err == nil {
+ t.Fatal("expected an error, got none")
+ }
+ }
+ {
+ b, err := NewMergePatch().Add("a", "x/y", "0")(9).Bytes()
+ if err != nil {
+ t.Fatalf("expected no error, got %v", err)
+ }
+ assertJSON(t, `{"a":{"x/y":{"0":9}}}`, b)
+ }
+
+ // Remove takes no value.
+ {
+ b, err := NewMergePatch().Remove("b", "m/n/o").Bytes()
+ if err != nil {
+ t.Fatalf("expected no error, got %v", err)
+ }
+ assertJSON(t, `{"b":{"m/n/o":null}}`, b)
+ }
+
+ // Calls are chainable.
+ {
+ b, err := NewMergePatch().
+ Add("a", "b", "c")(1).
+ Remove("x", "y", "z").
+ Bytes()
+ if err != nil {
+ t.Fatalf("expected no error, got %v", err)
+ }
+ assertJSON(t, `{
+ "a":{"b":{"c":1}},
+ "x":{"y":{"z":null}}
+ }`, b)
+ }
+}
+
+// TestMerge7386Equivalence demonstrates that the same effect can be spelled
+// different ways with Merge7386.
+func TestMerge7386Equivalence(t *testing.T) {
+ t.Parallel()
+
+ expected := `{
+ "metadata": {
+ "labels": {"lk":"lv"},
+ "annotations": {"ak1":"av1", "ak2":"av2"}
+ }
+ }`
+
+ patches := []*Merge7386{
+ // multiple calls to Add
+ NewMergePatch().
+ Add("metadata", "labels", "lk")("lv").
+ Add("metadata", "annotations", "ak1")("av1").
+ Add("metadata", "annotations", "ak2")("av2"),
+
+ // fewer calls using the patch type
+ NewMergePatch().
+ Add("metadata", "labels")(Merge7386{"lk": "lv"}).
+ Add("metadata", "annotations")(Merge7386{"ak1": "av1", "ak2": "av2"}),
+
+ // fewer calls using other types
+ NewMergePatch().
+ Add("metadata", "labels")(labels.Set{"lk": "lv"}).
+ Add("metadata", "annotations")(map[string]string{"ak1": "av1", "ak2": "av2"}),
+
+ // one call using the patch type
+ NewMergePatch().
+ Add("metadata")(Merge7386{
+ "labels": Merge7386{"lk": "lv"},
+ "annotations": Merge7386{"ak1": "av1", "ak2": "av2"},
+ }),
+
+ // one call using other types
+ NewMergePatch().
+ Add("metadata")(map[string]interface{}{
+ "labels": labels.Set{"lk": "lv"},
+ "annotations": map[string]string{"ak1": "av1", "ak2": "av2"},
+ }),
+ }
+
+ for i, patch := range patches {
+ b, err := patch.Bytes()
+ if err != nil {
+ t.Fatalf("expected no error for %v, got %v", i, err)
+ }
+
+ assertJSON(t, expected, b)
+ }
+}
From 45886e8ed5692618fe11ed16826cb4cf1571b4f9 Mon Sep 17 00:00:00 2001
From: "Jonathan S. Katz"
Date: Fri, 29 Jan 2021 13:13:43 -0500
Subject: [PATCH 060/129] Add support for the pgBackRest `--compress-type` flag
Selecting the compression type for pgBackRest is supported across
recent Postgres Operator releases, but the CLI was not allowing for
this flag to be passed through.
This allows for the selection of pgBackRest compression type amongst
the allowable methods in the container, which are none, bz2, gz, and
lz4. Currently zst does not ship within the container.
Issue: [ch10287]
---
.../backupoptions/backupoptionsutil.go | 7 ++++
.../backupoptions/backupoptionsutil_test.go | 40 +++++++++++++++++++
.../backupoptions/pgbackrestoptions.go | 6 +++
3 files changed, 53 insertions(+)
create mode 100644 internal/apiserver/backupoptions/backupoptionsutil_test.go
diff --git a/internal/apiserver/backupoptions/backupoptionsutil.go b/internal/apiserver/backupoptions/backupoptionsutil.go
index c1c3c69f1b..c8efed16b5 100644
--- a/internal/apiserver/backupoptions/backupoptionsutil.go
+++ b/internal/apiserver/backupoptions/backupoptionsutil.go
@@ -167,6 +167,13 @@ func isValidCompressLevel(compressLevel int) bool {
}
}
+// isValidCompressType checks that the compression type passed in matches one
+// of the ones supported by pgBackRest. However, it presently does not support
+// `zst`
+func isValidCompressType(compressType string) bool {
+ return compressType == "gz" || compressType == "bz2" || compressType == "lz4" || compressType == "none"
+}
+
// isValidRetentionRange validates that pgBackrest Full, Diff or Archive
// retention option value is set within the allowable range.
// allowed: 1-9999999
diff --git a/internal/apiserver/backupoptions/backupoptionsutil_test.go b/internal/apiserver/backupoptions/backupoptionsutil_test.go
new file mode 100644
index 0000000000..44048f15d8
--- /dev/null
+++ b/internal/apiserver/backupoptions/backupoptionsutil_test.go
@@ -0,0 +1,40 @@
+package backupoptions
+
+/*
+Copyright 2021 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.
+*/
+
+import "testing"
+
+func TestIsValidCompressType(t *testing.T) {
+ tests := []struct {
+ compressType string
+ expected bool
+ }{
+ {compressType: "bz2", expected: true},
+ {compressType: "gz", expected: true},
+ {compressType: "none", expected: true},
+ {compressType: "lz4", expected: true},
+ {compressType: "zst", expected: false},
+ {compressType: "bogus", expected: false},
+ }
+
+ for _, test := range tests {
+ t.Run(test.compressType, func(t *testing.T) {
+ if isValidCompressType(test.compressType) != test.expected {
+ t.Fatalf("expected %q to be %t", test.compressType, test.expected)
+ }
+ })
+ }
+}
diff --git a/internal/apiserver/backupoptions/pgbackrestoptions.go b/internal/apiserver/backupoptions/pgbackrestoptions.go
index 026fb45501..2deb8d2dcf 100644
--- a/internal/apiserver/backupoptions/pgbackrestoptions.go
+++ b/internal/apiserver/backupoptions/pgbackrestoptions.go
@@ -82,6 +82,7 @@ type pgBackRestBackupOptions struct {
NoCompress bool `flag:"no-compress"`
CompressLevel int `flag:"compress-level"`
CompressLevelNetwork int `flag:"compress-level-network"`
+ CompressType string `flag:"compress-type"`
DBTimeout int `flag:"db-timeout"`
Delta bool `flag:"no-delta"`
ProcessMax int `flag:"process-max"`
@@ -146,6 +147,11 @@ func (backRestBackupOpts pgBackRestBackupOptions) validate(setFlagFieldNames []s
err := errors.New("Invalid network compress level for pgBackRest backup")
errstrings = append(errstrings, err.Error())
}
+ case "CompressType":
+ if !isValidCompressType(backRestBackupOpts.CompressType) {
+ err := errors.New("Invalid compress type for pgBackRest backup")
+ errstrings = append(errstrings, err.Error())
+ }
case "LogLevelConsole":
if !isValidBackrestLogLevel(backRestBackupOpts.LogLevelConsole) {
err := errors.New("Invalid log level for pgBackRest backup")
From 91d773ca4799c2459170204782ed75db4ce4ee4c Mon Sep 17 00:00:00 2001
From: Steven Siahetiong
Date: Mon, 1 Feb 2021 00:54:39 +0800
Subject: [PATCH 061/129] Replace PG_STAT_STATEMENTS_LIMIT on exporter startup
The new variable was added for the `pg_stat_statements` support.
This sets the default to be "20" statements, which is what is used by
pgMonitor.
Co-authored-by: Steven Siahetiong
Issue: #2244
---
bin/crunchy-postgres-exporter/start.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/bin/crunchy-postgres-exporter/start.sh b/bin/crunchy-postgres-exporter/start.sh
index 95c6d55ab8..5ecfc1c07c 100755
--- a/bin/crunchy-postgres-exporter/start.sh
+++ b/bin/crunchy-postgres-exporter/start.sh
@@ -226,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}"
From 67b44d77010bc2afc5a05bd371f326bc49bf988c Mon Sep 17 00:00:00 2001
From: "Jonathan S. Katz"
Date: Sun, 31 Jan 2021 12:37:40 -0500
Subject: [PATCH 062/129] Only consider running Pods for scheduled backups
Though the scheduled backup code would bail if it found multiple
pgBackRest repository Pods, this ensures that only running
pgBackRest Pods would be considered.
Issue: #2237
---
pgo-scheduler/scheduler/pgbackrest.go | 15 ++++++++++-----
1 file changed, 10 insertions(+), 5 deletions(-)
diff --git a/pgo-scheduler/scheduler/pgbackrest.go b/pgo-scheduler/scheduler/pgbackrest.go
index 75561e0af3..fd706d5337 100644
--- a/pgo-scheduler/scheduler/pgbackrest.go
+++ b/pgo-scheduler/scheduler/pgbackrest.go
@@ -21,8 +21,10 @@ import (
"github.com/crunchydata/postgres-operator/internal/config"
log "github.com/sirupsen/logrus"
+ v1 "k8s.io/api/core/v1"
kerrors "k8s.io/apimachinery/pkg/api/errors"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ "k8s.io/apimachinery/pkg/fields"
"k8s.io/apimachinery/pkg/util/wait"
)
@@ -113,17 +115,20 @@ func (b BackRestBackupJob) Run() {
return
}
- selector := fmt.Sprintf("%s=%s,pgo-backrest-repo=true", config.LABEL_PG_CLUSTER, b.cluster)
- pods, err := clientset.CoreV1().Pods(b.namespace).List(metav1.ListOptions{LabelSelector: selector})
+ selector := fmt.Sprintf("%s=%s,%s", config.LABEL_PG_CLUSTER, b.cluster, config.LABEL_PGO_BACKREST_REPO)
+ options := metav1.ListOptions{
+ FieldSelector: fields.OneTermEqualSelector("status.phase", string(v1.PodRunning)).String(),
+ LabelSelector: selector,
+ }
+
+ pods, err := clientset.CoreV1().Pods(b.namespace).List(options)
if err != nil {
contextLogger.WithFields(log.Fields{
"selector": selector,
"error": err,
}).Error("error getting pods from selector")
return
- }
-
- if len(pods.Items) != 1 {
+ } else if len(pods.Items) != 1 {
contextLogger.WithFields(log.Fields{
"selector": selector,
"error": err,
From 744b9b52286ef2aee7d1fae846b6fdbebc0e30c5 Mon Sep 17 00:00:00 2001
From: Andrew L'Ecuyer
Date: Fri, 29 Jan 2021 23:43:17 +0000
Subject: [PATCH 063/129] Clean Stanza Create pgtask & Job After Init
When a PostgreSQL cluster is initialized for the first time, the stanza
create pgtask and the Kubernetes Job associated with it are now
automatically deleted. This ensures that subsequent update events in
the Job controller for a stanza-create Job do not trigger additional
"initial backups" Jobs for the cluster.
Issue: [ch10277]
Issue: #2106
---
internal/controller/job/backresthandler.go | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/internal/controller/job/backresthandler.go b/internal/controller/job/backresthandler.go
index 5d142b6ebb..5727bffbfa 100644
--- a/internal/controller/job/backresthandler.go
+++ b/internal/controller/job/backresthandler.go
@@ -229,6 +229,14 @@ func (c *Controller) handleBackrestStanzaCreateUpdate(job *apiv1.Job) error {
backrestoperator.CreateInitialBackup(c.Client, job.ObjectMeta.Namespace,
clusterName, backrestRepoPodName)
+ // now that the initial backup has been initiated, proceed with deleting the stanza-create
+ // pgtask and associated Job. This will ensure any subsequent updates to the stanza-create
+ // Job do not trigger more initial backup Jobs.
+ if err := backrest.CleanStanzaCreateResources(namespace, clusterName, c.Client); err != nil {
+ log.Error(err)
+ return err
+ }
+
}
return nil
}
From 52b578e9cbe2c88f1a54996f078f582180d39232 Mon Sep 17 00:00:00 2001
From: Andrew L'Ecuyer
Date: Mon, 1 Feb 2021 20:43:03 +0000
Subject: [PATCH 064/129] Handle & Log Initial Backup Creation Errors
Errors are now handled and logged when creating an initial cluster
backup pgtask following a successful stanza-create Job.
---
internal/controller/job/backresthandler.go | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/internal/controller/job/backresthandler.go b/internal/controller/job/backresthandler.go
index 5727bffbfa..7873089a37 100644
--- a/internal/controller/job/backresthandler.go
+++ b/internal/controller/job/backresthandler.go
@@ -226,8 +226,11 @@ func (c *Controller) handleBackrestStanzaCreateUpdate(job *apiv1.Job) error {
return err
}
- backrestoperator.CreateInitialBackup(c.Client, job.ObjectMeta.Namespace,
- clusterName, backrestRepoPodName)
+ if _, err := backrestoperator.CreateInitialBackup(c.Client, job.ObjectMeta.Namespace,
+ clusterName, backrestRepoPodName); err != nil {
+ log.Error(err)
+ return err
+ }
// now that the initial backup has been initiated, proceed with deleting the stanza-create
// pgtask and associated Job. This will ensure any subsequent updates to the stanza-create
From 611ce309a0c80c5009c975ca9d8cb0cdabf6a5b9 Mon Sep 17 00:00:00 2001
From: "Jonathan S. Katz"
Date: Mon, 1 Feb 2021 16:58:08 -0500
Subject: [PATCH 065/129] Use proper bootstrap template for debug output
This also moves the debugging line before the actual template
execution to make it possible to more easily debug any issues
if the template were customized.
---
internal/operator/cluster/clusterlogic.go | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/internal/operator/cluster/clusterlogic.go b/internal/operator/cluster/clusterlogic.go
index 2842281914..9b828e173c 100644
--- a/internal/operator/cluster/clusterlogic.go
+++ b/internal/operator/cluster/clusterlogic.go
@@ -97,15 +97,16 @@ func addClusterBootstrapJob(clientset kubeapi.Interface,
return err
}
+ if operator.CRUNCHY_DEBUG {
+ _ = config.BootstrapTemplate.Execute(os.Stdout, bootstrapFields)
+ }
+
var bootstrapSpec bytes.Buffer
+
if err := config.BootstrapTemplate.Execute(&bootstrapSpec, bootstrapFields); err != nil {
return err
}
- if operator.CRUNCHY_DEBUG {
- config.DeploymentTemplate.Execute(os.Stdout, bootstrapFields)
- }
-
job := &batchv1.Job{}
if err := json.Unmarshal(bootstrapSpec.Bytes(), job); err != nil {
return err
From 19de963977f48c0364859eededf03290d4ebc607 Mon Sep 17 00:00:00 2001
From: "Jonathan S. Katz"
Date: Thu, 11 Feb 2021 18:36:01 -0500
Subject: [PATCH 066/129] Existence check for primary Deployment before scaling
During the cluster initialization process, there is a step where
the Deployment object representing the primary is explicitly
scaled from 0 to 1 Pods. However, there is a case that may
trigger the Deployment scaling before the Deployment is created.
As such, we can add a guard to check that the Deployment is
actually created before proceeding with the scaling operation.
This patch also modifies a debug line around the cluster
Deployment creation, as the debug output came after the
point at which the code may have exited due to error.
---
internal/controller/pod/inithandler.go | 47 ++++++++++++++++++++++-
internal/operator/cluster/clusterlogic.go | 8 ++--
2 files changed, 49 insertions(+), 6 deletions(-)
diff --git a/internal/controller/pod/inithandler.go b/internal/controller/pod/inithandler.go
index b96a911c22..37b8b103d4 100644
--- a/internal/controller/pod/inithandler.go
+++ b/internal/controller/pod/inithandler.go
@@ -18,6 +18,7 @@ limitations under the License.
import (
"fmt"
"strconv"
+ "time"
"github.com/crunchydata/postgres-operator/internal/config"
"github.com/crunchydata/postgres-operator/internal/controller"
@@ -28,12 +29,14 @@ import (
taskoperator "github.com/crunchydata/postgres-operator/internal/operator/task"
"github.com/crunchydata/postgres-operator/internal/util"
crv1 "github.com/crunchydata/postgres-operator/pkg/apis/crunchydata.com/v1"
+
+ log "github.com/sirupsen/logrus"
apiv1 "k8s.io/api/core/v1"
kerrors "k8s.io/apimachinery/pkg/api/errors"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ "k8s.io/apimachinery/pkg/fields"
"k8s.io/apimachinery/pkg/types"
-
- log "github.com/sirupsen/logrus"
+ "k8s.io/apimachinery/pkg/util/wait"
)
// handleClusterInit is responsible for proceeding with initialization of the PG cluster once the
@@ -85,6 +88,16 @@ func (c *Controller) handleBackRestRepoInit(newPod *apiv1.Pod, cluster *crv1.Pgc
return nil
}
+ // first: a sanity check that there exists a primary deployment to scale. this
+ // is to attempt to avoid any silent failures in the deployment scaling
+ // function.
+ //
+ // If we do encounter an error, we will proceed in case the deployment becomes
+ // available after.
+ if err := c.waitForPrimaryDeployment(cluster); err != nil {
+ log.Warn(err)
+ }
+
clusterInfo, err := clusteroperator.ScaleClusterDeployments(c.Client, *cluster, 1,
true, false, false, false)
if err != nil {
@@ -288,3 +301,33 @@ func (c *Controller) labelPostgresPodAndDeployment(newpod *apiv1.Pod) {
}
}
+
+// waitForPrimaryDeployment checks to see that a primary deployment is
+// available. It does not check readiness, only that the deployment exists. This
+// used before scaling to ensure scaling does not fail silently
+func (c *Controller) waitForPrimaryDeployment(cluster *crv1.Pgcluster) error {
+ primaryDeploymentName := cluster.Annotations[config.ANNOTATION_CURRENT_PRIMARY]
+ options := metav1.ListOptions{
+ LabelSelector: fields.AndSelectors(
+ fields.OneTermEqualSelector(config.LABEL_PG_CLUSTER, cluster.Name),
+ fields.OneTermEqualSelector(config.LABEL_PG_DATABASE, config.LABEL_TRUE),
+ fields.OneTermEqualSelector(config.LABEL_DEPLOYMENT_NAME, primaryDeploymentName),
+ ).String(),
+ }
+
+ // start polling to see if the primary deployment is created
+ if err := wait.PollImmediate(5*time.Second, 60*time.Second, func() (bool, error) {
+ // check to see if the deployment exists
+ d, err := c.Client.AppsV1().Deployments(cluster.Namespace).List(options)
+
+ if err != nil {
+ log.Warnf("could not find primary deployment for scaling: %s", err)
+ }
+
+ return err == nil && len(d.Items) > 0, nil
+ }); err != nil {
+ return fmt.Errorf("primary deployment lookup timeout reached for %q", primaryDeploymentName)
+ }
+
+ return nil
+}
diff --git a/internal/operator/cluster/clusterlogic.go b/internal/operator/cluster/clusterlogic.go
index 9b828e173c..4270b456d9 100644
--- a/internal/operator/cluster/clusterlogic.go
+++ b/internal/operator/cluster/clusterlogic.go
@@ -141,15 +141,15 @@ func addClusterDeployments(clientset kubeapi.Interface,
deploymentFields := getClusterDeploymentFields(clientset, cl,
dataVolume, walVolume, tablespaceVolumes)
+ if operator.CRUNCHY_DEBUG {
+ _ = config.DeploymentTemplate.Execute(os.Stdout, deploymentFields)
+ }
+
var primaryDoc bytes.Buffer
if err := config.DeploymentTemplate.Execute(&primaryDoc, deploymentFields); err != nil {
return err
}
- if operator.CRUNCHY_DEBUG {
- config.DeploymentTemplate.Execute(os.Stdout, deploymentFields)
- }
-
deployment := &appsv1.Deployment{}
if err := json.Unmarshal(primaryDoc.Bytes(), deployment); err != nil {
return err
From 7b197d4abc77449ac5b1a17dc8454091d346de00 Mon Sep 17 00:00:00 2001
From: "Jonathan S. Katz"
Date: Thu, 11 Feb 2021 18:42:46 -0500
Subject: [PATCH 067/129] Modify primary check before taking backup
This was using a legacy method and is now modified to use
the method used by other Operator operations to check for
both the primary cluster and its availability.
---
.../apiserver/backrestservice/backrestimpl.go | 56 +++++--------------
1 file changed, 14 insertions(+), 42 deletions(-)
diff --git a/internal/apiserver/backrestservice/backrestimpl.go b/internal/apiserver/backrestservice/backrestimpl.go
index 31dd01fe4b..7b5b7d1b64 100644
--- a/internal/apiserver/backrestservice/backrestimpl.go
+++ b/internal/apiserver/backrestservice/backrestimpl.go
@@ -203,10 +203,9 @@ func CreateBackup(request *msgs.CreateBackrestBackupRequest, ns, pgouser string)
}
// check if primary is ready
- if err := isPrimaryReady(cluster, ns); err != nil {
- log.Error(err)
+ if !isPrimaryReady(cluster) {
resp.Status.Code = msgs.Error
- resp.Status.Msg = err.Error()
+ resp.Status.Msg = "primary pod is not in Ready state"
return resp
}
@@ -288,54 +287,27 @@ func getBackrestRepoPodName(cluster *crv1.Pgcluster, ns string) (string, error)
return repopodName, err
}
-func isPrimary(pod *v1.Pod, clusterName string) bool {
- if pod.ObjectMeta.Labels[config.LABEL_SERVICE_NAME] == clusterName {
- return true
- }
- return false
-
-}
-
-func isReady(pod *v1.Pod) bool {
- readyCount := 0
- containerCount := 0
- for _, stat := range pod.Status.ContainerStatuses {
- containerCount++
- if stat.Ready {
- readyCount++
- }
- }
- if readyCount != containerCount {
- return false
- }
- return true
-
-}
-
// isPrimaryReady goes through the pod list to first identify the
// Primary pod and, once identified, determine if it is in a
// ready state. If not, it returns an error, otherwise it returns
// a nil value
-func isPrimaryReady(cluster *crv1.Pgcluster, ns string) error {
- primaryReady := false
+func isPrimaryReady(cluster *crv1.Pgcluster) bool {
+ options := metav1.ListOptions{
+ FieldSelector: fields.OneTermEqualSelector("status.phase", string(v1.PodRunning)).String(),
+ LabelSelector: fields.AndSelectors(
+ fields.OneTermEqualSelector(config.LABEL_PG_CLUSTER, cluster.Name),
+ fields.OneTermEqualSelector(config.LABEL_PGHA_ROLE, config.LABEL_PGHA_ROLE_PRIMARY),
+ ).String(),
+ }
- selector := fmt.Sprintf("%s=%s,%s=%s", config.LABEL_PG_CLUSTER, cluster.Name,
- config.LABEL_PGHA_ROLE, config.LABEL_PGHA_ROLE_PRIMARY)
+ pods, err := apiserver.Clientset.CoreV1().Pods(cluster.Namespace).List(options)
- pods, err := apiserver.Clientset.CoreV1().Pods(ns).List(metav1.ListOptions{LabelSelector: selector})
if err != nil {
- return err
- }
- for _, p := range pods.Items {
- if isPrimary(&p, cluster.Spec.Name) && isReady(&p) {
- primaryReady = true
- }
+ log.Error(err)
+ return false
}
- if primaryReady == false {
- return errors.New("primary pod is not in Ready state")
- }
- return nil
+ return len(pods.Items) > 0
}
// ShowBackrest ...
From 2f6268adc2d65942baa6ab357c6e7f92e97e3770 Mon Sep 17 00:00:00 2001
From: "Jonathan S. Katz"
Date: Fri, 12 Feb 2021 15:32:02 -0500
Subject: [PATCH 068/129] Revise inernal references in pkg components
The location of these functions caused a cross internal/pkg
reference, which made external SDK builds difficult. This removes
the internal components from the pkg components to ensure
proper pkg compatibility.
---
internal/apiserver/common.go | 25 +++++++++
internal/apiserver/common_test.go | 42 +++++++++++++++
internal/apiserver/userservice/userimpl.go | 9 ++--
pgo/cmd/user.go | 5 +-
pkg/apiservermsgs/configmsgs.go | 6 +--
pkg/apiservermsgs/usermsgs.go | 33 ------------
pkg/apiservermsgs/usermsgs_test.go | 63 ----------------------
pkg/events/eventing.go | 8 ++-
8 files changed, 78 insertions(+), 113 deletions(-)
delete mode 100644 pkg/apiservermsgs/usermsgs_test.go
diff --git a/internal/apiserver/common.go b/internal/apiserver/common.go
index a072ebc779..b6c665c652 100644
--- a/internal/apiserver/common.go
+++ b/internal/apiserver/common.go
@@ -22,6 +22,7 @@ import (
"strings"
"github.com/crunchydata/postgres-operator/internal/config"
+ pgpassword "github.com/crunchydata/postgres-operator/internal/postgres/password"
crv1 "github.com/crunchydata/postgres-operator/pkg/apis/crunchydata.com/v1"
log "github.com/sirupsen/logrus"
kerrors "k8s.io/apimachinery/pkg/api/errors"
@@ -48,6 +49,9 @@ var (
ErrDBContainerNotFound = errors.New("\"database\" container not found in pod")
// ErrLabelInvalid indicates that a label is invalid
ErrLabelInvalid = errors.New("invalid label")
+ // ErrPasswordTypeInvalid is used when a string that's not included in
+ // PasswordTypeStrings is used
+ ErrPasswordTypeInvalid = errors.New("invalid password type. choices are (md5, scram-sha-256)")
// ErrStandbyNotAllowed contains the error message returned when an API call is not
// permitted because it involves a cluster that is in standby mode
ErrStandbyNotAllowed = errors.New("Action not permitted because standby mode is enabled")
@@ -58,6 +62,15 @@ var (
"Operator installation")
)
+// passwordTypeStrings is a mapping of strings of password types to their
+// corresponding value of the structured password type
+var passwordTypeStrings = map[string]pgpassword.PasswordType{
+ "": pgpassword.MD5,
+ "md5": pgpassword.MD5,
+ "scram": pgpassword.SCRAM,
+ "scram-sha-256": pgpassword.SCRAM,
+}
+
func CreateRMDataTask(clusterName, replicaName, taskName string, deleteBackups, deleteData, isReplica, isBackup bool, ns, clusterPGHAScope string) error {
var err error
@@ -100,6 +113,18 @@ func GetBackrestStorageTypes() []string {
return backrestStorageTypes
}
+// GetPasswordType returns the enumerated password type based on the string, and
+// an error if it cannot match one
+func GetPasswordType(passwordTypeStr string) (pgpassword.PasswordType, error) {
+ passwordType, ok := passwordTypeStrings[passwordTypeStr]
+
+ if !ok {
+ return passwordType, ErrPasswordTypeInvalid
+ }
+
+ return passwordType, nil
+}
+
// IsValidPVC determines if a PVC with the name provided exits
func IsValidPVC(pvcName, ns string) bool {
pvc, err := Clientset.CoreV1().PersistentVolumeClaims(ns).Get(pvcName, metav1.GetOptions{})
diff --git a/internal/apiserver/common_test.go b/internal/apiserver/common_test.go
index c36cb7bfa3..992cc134b7 100644
--- a/internal/apiserver/common_test.go
+++ b/internal/apiserver/common_test.go
@@ -21,9 +21,51 @@ import (
"strings"
"testing"
+ pgpassword "github.com/crunchydata/postgres-operator/internal/postgres/password"
+
"k8s.io/apimachinery/pkg/api/resource"
)
+func TestGetPasswordType(t *testing.T) {
+ t.Run("valid", func(t *testing.T) {
+ tests := map[string]pgpassword.PasswordType{
+ "": pgpassword.MD5,
+ "md5": pgpassword.MD5,
+ "scram": pgpassword.SCRAM,
+ "scram-sha-256": pgpassword.SCRAM,
+ }
+
+ for passwordTypeStr, expected := range tests {
+ t.Run(passwordTypeStr, func(t *testing.T) {
+ passwordType, err := GetPasswordType(passwordTypeStr)
+ if err != nil {
+ t.Error(err)
+ return
+ }
+
+ if passwordType != expected {
+ t.Errorf("password type %q should yield %d", passwordTypeStr, expected)
+ }
+ })
+ }
+ })
+
+ t.Run("invalid", func(t *testing.T) {
+ tests := map[string]error{
+ "magic": ErrPasswordTypeInvalid,
+ "scram-sha-512": ErrPasswordTypeInvalid,
+ }
+
+ for passwordTypeStr, expected := range tests {
+ t.Run(passwordTypeStr, func(t *testing.T) {
+ if _, err := GetPasswordType(passwordTypeStr); !errors.Is(err, expected) {
+ t.Errorf("password type %q should yield error %q", passwordTypeStr, expected.Error())
+ }
+ })
+ }
+ })
+}
+
func TestValidateLabel(t *testing.T) {
t.Run("valid", func(t *testing.T) {
inputs := []map[string]string{
diff --git a/internal/apiserver/userservice/userimpl.go b/internal/apiserver/userservice/userimpl.go
index b4b5698b48..cbc71c2485 100644
--- a/internal/apiserver/userservice/userimpl.go
+++ b/internal/apiserver/userservice/userimpl.go
@@ -168,8 +168,7 @@ func CreateUser(request *msgs.CreateUserRequest, pgouser string) msgs.CreateUser
}
// determine if the user passed in a valid password type
- passwordType, err := msgs.GetPasswordType(request.PasswordType)
-
+ passwordType, err := apiserver.GetPasswordType(request.PasswordType)
if err != nil {
response.Status.Code = msgs.Error
response.Status.Msg = err.Error()
@@ -620,7 +619,7 @@ func UpdateUser(request *msgs.UpdateUserRequest, pgouser string) msgs.UpdateUser
}
// determine if the user passed in a valid password type
- if _, err := msgs.GetPasswordType(request.PasswordType); err != nil {
+ if _, err := apiserver.GetPasswordType(request.PasswordType); err != nil {
response.Status.Code = msgs.Error
response.Status.Msg = err.Error()
return response
@@ -965,7 +964,7 @@ func rotateExpiredPasswords(request *msgs.UpdateUserRequest, cluster *crv1.Pgclu
// get the password type. the error is already evaluated in a called
// function
- passwordType, _ := msgs.GetPasswordType(request.PasswordType)
+ passwordType, _ := apiserver.GetPasswordType(request.PasswordType)
// generate a new password. Check to see if the user passed in a particular
// length of the password, or passed in a password to rotate (though that
@@ -1097,7 +1096,7 @@ func updateUser(request *msgs.UpdateUserRequest, cluster *crv1.Pgcluster) msgs.U
// Speaking of passwords...let's first determine if the user updated their
// password. See generatePassword for how precedence is given for password
// updates
- passwordType, _ := msgs.GetPasswordType(request.PasswordType)
+ passwordType, _ := apiserver.GetPasswordType(request.PasswordType)
isChanged, password, hashedPassword, err := generatePassword(result.Username,
request.Password, passwordType, request.RotatePassword, request.PasswordLength)
diff --git a/pgo/cmd/user.go b/pgo/cmd/user.go
index a952aef402..ef8e73f283 100644
--- a/pgo/cmd/user.go
+++ b/pgo/cmd/user.go
@@ -20,6 +20,7 @@ import (
"os"
"strings"
+ "github.com/crunchydata/postgres-operator/internal/apiserver"
utiloperator "github.com/crunchydata/postgres-operator/internal/util"
"github.com/crunchydata/postgres-operator/pgo/api"
"github.com/crunchydata/postgres-operator/pgo/util"
@@ -88,7 +89,7 @@ func createUser(args []string, ns string) {
}
// determine if the user provies a valid password type
- if _, err := msgs.GetPasswordType(PasswordType); err != nil {
+ if _, err := apiserver.GetPasswordType(PasswordType); err != nil {
fmt.Println("Error:", err.Error())
os.Exit(1)
}
@@ -401,7 +402,7 @@ func updateUser(clusterNames []string, namespace string) {
}
// determine if the user provies a valid password type
- if _, err := msgs.GetPasswordType(PasswordType); err != nil {
+ if _, err := apiserver.GetPasswordType(PasswordType); err != nil {
fmt.Println("Error:", err.Error())
os.Exit(1)
}
diff --git a/pkg/apiservermsgs/configmsgs.go b/pkg/apiservermsgs/configmsgs.go
index 325e2281e5..1a4f8aae9c 100644
--- a/pkg/apiservermsgs/configmsgs.go
+++ b/pkg/apiservermsgs/configmsgs.go
@@ -15,13 +15,9 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
-import (
- "github.com/crunchydata/postgres-operator/internal/config"
-)
-
// ShowConfigResponse ...
// swagger:model
type ShowConfigResponse struct {
- Result config.PgoConfig
+ Result interface{}
Status
}
diff --git a/pkg/apiservermsgs/usermsgs.go b/pkg/apiservermsgs/usermsgs.go
index bf67358abe..da048129db 100644
--- a/pkg/apiservermsgs/usermsgs.go
+++ b/pkg/apiservermsgs/usermsgs.go
@@ -15,12 +15,6 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
-import (
- "errors"
-
- pgpassword "github.com/crunchydata/postgres-operator/internal/postgres/password"
-)
-
type UpdateClusterLoginState int
// set the different values around whether or not to disable/enable a user's
@@ -31,21 +25,6 @@ const (
UpdateUserLoginDisable
)
-var (
- // ErrPasswordTypeInvalid is used when a string that's not included in
- // PasswordTypeStrings is used
- ErrPasswordTypeInvalid = errors.New("invalid password type. choices are (md5, scram-sha-256)")
-)
-
-// passwordTypeStrings is a mapping of strings of password types to their
-// corresponding value of the structured password type
-var passwordTypeStrings = map[string]pgpassword.PasswordType{
- "": pgpassword.MD5,
- "md5": pgpassword.MD5,
- "scram": pgpassword.SCRAM,
- "scram-sha-256": pgpassword.SCRAM,
-}
-
// CreateUserRequest contains the parameters that are passed in when an Operator
// user requests to create a new PostgreSQL user
// swagger:model
@@ -152,15 +131,3 @@ type UserResponseDetail struct {
Username string
ValidUntil string
}
-
-// GetPasswordType returns the enumerated password type based on the string, and
-// an error if it cannot match one
-func GetPasswordType(passwordTypeStr string) (pgpassword.PasswordType, error) {
- passwordType, ok := passwordTypeStrings[passwordTypeStr]
-
- if !ok {
- return passwordType, ErrPasswordTypeInvalid
- }
-
- return passwordType, nil
-}
diff --git a/pkg/apiservermsgs/usermsgs_test.go b/pkg/apiservermsgs/usermsgs_test.go
deleted file mode 100644
index 0f6d39b754..0000000000
--- a/pkg/apiservermsgs/usermsgs_test.go
+++ /dev/null
@@ -1,63 +0,0 @@
-package apiservermsgs
-
-/*
- Copyright 2020 - 2021 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.
-*/
-
-import (
- "testing"
-
- pgpassword "github.com/crunchydata/postgres-operator/internal/postgres/password"
-)
-
-func TestGetPasswordType(t *testing.T) {
- t.Run("valid", func(t *testing.T) {
- tests := map[string]pgpassword.PasswordType{
- "": pgpassword.MD5,
- "md5": pgpassword.MD5,
- "scram": pgpassword.SCRAM,
- "scram-sha-256": pgpassword.SCRAM,
- }
-
- for passwordTypeStr, expected := range tests {
- t.Run(passwordTypeStr, func(t *testing.T) {
- passwordType, err := GetPasswordType(passwordTypeStr)
-
- if err != nil {
- t.Error(err)
- return
- }
-
- if passwordType != expected {
- t.Errorf("password type %q should yield %d", passwordTypeStr, expected)
- }
- })
- }
- })
-
- t.Run("invalid", func(t *testing.T) {
- tests := map[string]error{
- "magic": ErrPasswordTypeInvalid,
- "scram-sha-512": ErrPasswordTypeInvalid,
- }
-
- for passwordTypeStr, expected := range tests {
- t.Run(passwordTypeStr, func(t *testing.T) {
- if _, err := GetPasswordType(passwordTypeStr); err != expected {
- t.Errorf("password type %q should yield error %q", passwordTypeStr, expected.Error())
- }
- })
- }
- })
-}
diff --git a/pkg/events/eventing.go b/pkg/events/eventing.go
index 3ea0e68044..5efcf7d328 100644
--- a/pkg/events/eventing.go
+++ b/pkg/events/eventing.go
@@ -19,18 +19,16 @@ import (
"encoding/json"
"errors"
"fmt"
- crunchylog "github.com/crunchydata/postgres-operator/internal/logging"
- "github.com/nsqio/go-nsq"
- log "github.com/sirupsen/logrus"
"os"
"reflect"
"time"
+
+ "github.com/nsqio/go-nsq"
+ log "github.com/sirupsen/logrus"
)
// String returns the string form for a given LogLevel
func Publish(e EventInterface) error {
- //Add logging configuration
- crunchylog.CrunchyLogger(crunchylog.SetParameters())
eventAddr := os.Getenv("EVENT_ADDR")
if eventAddr == "" {
return errors.New("EVENT_ADDR not set")
From ba89897b20c916ffaf70caa3a0726131a05f127d Mon Sep 17 00:00:00 2001
From: Roel Adriaans
Date: Fri, 12 Feb 2021 22:32:27 +0100
Subject: [PATCH 069/129] Fix typo in create cluster tutorial
Replaces "testuer" with -"testuser".
---
docs/content/tutorial/create-cluster.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/docs/content/tutorial/create-cluster.md b/docs/content/tutorial/create-cluster.md
index 423f0a4dbb..3012787e93 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.
From 7d6b3aebe3241eafb10fc2049a9c4c29a3abc609 Mon Sep 17 00:00:00 2001
From: "Jonathan S. Katz"
Date: Sun, 21 Feb 2021 22:28:31 -0500
Subject: [PATCH 070/129] Bump version 4.5.2
---
Makefile | 8 +--
README.md | 2 +-
bin/push-ccp-to-gcr.sh | 2 +-
conf/postgres-operator/pgo.yaml | 4 +-
docs/config.toml | 18 +++----
docs/content/Configuration/compatibility.md | 7 +++
docs/content/Upgrade/manual/upgrade4.md | 4 +-
docs/content/releases/4.5.2.md | 54 +++++++++++++++++++
docs/content/tutorial/pgbouncer.md | 2 +-
examples/create-by-resource/fromcrd.json | 6 +--
examples/envs.sh | 4 +-
examples/helm/README.md | 4 +-
.../create-cluster/templates/pgcluster.yaml | 2 +-
examples/helm/create-cluster/values.yaml | 4 +-
installers/ansible/README.md | 2 +-
installers/ansible/values.yaml | 6 +--
installers/gcp-marketplace/Makefile | 2 +-
installers/gcp-marketplace/README.md | 2 +-
installers/gcp-marketplace/values.yaml | 6 +--
installers/helm/Chart.yaml | 2 +-
installers/helm/values.yaml | 6 +--
installers/kubectl/client-setup.sh | 2 +-
.../kubectl/postgres-operator-ocp311.yml | 8 +--
installers/kubectl/postgres-operator.yml | 8 +--
installers/metrics/ansible/README.md | 2 +-
installers/metrics/helm/Chart.yaml | 2 +-
installers/metrics/helm/helm_template.yaml | 2 +-
installers/metrics/helm/values.yaml | 2 +-
.../postgres-operator-metrics-ocp311.yml | 2 +-
.../kubectl/postgres-operator-metrics.yml | 2 +-
installers/olm/Makefile | 6 +--
internal/util/util_test.go | 24 ++++-----
pkg/apis/crunchydata.com/v1/doc.go | 8 +--
pkg/apiservermsgs/common.go | 2 +-
redhat/atomic/help.1 | 2 +-
redhat/atomic/help.md | 2 +-
36 files changed, 141 insertions(+), 80 deletions(-)
create mode 100644 docs/content/releases/4.5.2.md
diff --git a/Makefile b/Makefile
index 413a6a8181..464bc28483 100644
--- a/Makefile
+++ b/Makefile
@@ -4,14 +4,14 @@ GOBIN ?= $(GOPATH)/bin
# Default values if not already set
ANSIBLE_VERSION ?= 2.9.*
PGOROOT ?= $(GOPATH)/src/github.com/crunchydata/postgres-operator
-PGO_BASEOS ?= centos7
+PGO_BASEOS ?= centos8
PGO_CMD ?= kubectl
PGO_IMAGE_PREFIX ?= crunchydata
PGO_IMAGE_TAG ?= $(PGO_BASEOS)-$(PGO_VERSION)
PGO_OPERATOR_NAMESPACE ?= pgo
-PGO_VERSION ?= 4.5.1
+PGO_VERSION ?= 4.5.2
PGO_PG_VERSION ?= 12
-PGO_PG_FULLVERSION ?= 12.5
+PGO_PG_FULLVERSION ?= 12.6
PGO_BACKREST_VERSION ?= 2.29
PACKAGER ?= yum
@@ -61,7 +61,7 @@ ifeq ("$(PGO_BASEOS)", "ubi8")
PACKAGER=dnf
endif
-ifeq ("$(PGO_BASEOS)", "centos7")
+ifeq ("$(PGO_BASEOS)", "centos8")
DFSET=centos
DOCKERBASEREGISTRY=centos:
endif
diff --git a/README.md b/README.md
index 0a2784b7d6..fdd72b8cb9 100644
--- a/README.md
+++ b/README.md
@@ -161,7 +161,7 @@ Based on your storage settings in your Kubernetes environment, you may be able t
```shell
kubectl create namespace pgo
-kubectl apply -f https://raw.githubusercontent.com/CrunchyData/postgres-operator/v4.5.1/installers/kubectl/postgres-operator.yml
+kubectl apply -f https://raw.githubusercontent.com/CrunchyData/postgres-operator/v4.5.2/installers/kubectl/postgres-operator.yml
```
Otherwise, we highly recommend following the instructions from our [Quickstart](https://access.crunchydata.com/documentation/postgres-operator/latest/quickstart/).
diff --git a/bin/push-ccp-to-gcr.sh b/bin/push-ccp-to-gcr.sh
index d476c07b0b..5a293622b5 100755
--- a/bin/push-ccp-to-gcr.sh
+++ b/bin/push-ccp-to-gcr.sh
@@ -16,7 +16,7 @@
GCR_IMAGE_PREFIX=gcr.io/crunchy-dev-test
CCP_IMAGE_PREFIX=crunchydata
-CCP_IMAGE_TAG=centos7-12.5-4.5.1
+CCP_IMAGE_TAG=centos8-12.6-4.5.2
IMAGES=(
crunchy-prometheus
diff --git a/conf/postgres-operator/pgo.yaml b/conf/postgres-operator/pgo.yaml
index 622fc268f8..c98c69aa98 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.5-4.5.1
+ CCPImageTag: centos8-12.6-4.5.2
Port: 5432
PGBadgerPort: 10000
ExporterPort: 9187
@@ -82,4 +82,4 @@ Storage:
Pgo:
Audit: false
PGOImagePrefix: registry.developers.crunchydata.com/crunchydata
- PGOImageTag: centos7-4.5.1
+ PGOImageTag: centos8-4.5.2
diff --git a/docs/config.toml b/docs/config.toml
index dc39d49daa..7d328e9564 100644
--- a/docs/config.toml
+++ b/docs/config.toml
@@ -25,16 +25,16 @@ 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.1"
-postgresVersion = "12.5"
-postgresVersion13 = "13.1"
-postgresVersion12 = "12.5"
-postgresVersion11 = "11.10"
-postgresVersion10 = "10.15"
-postgresVersion96 = "9.6.20"
-postgresVersion95 = "9.5.24"
+operatorVersion = "4.5.2"
+postgresVersion = "12.6"
+postgresVersion13 = "13.2"
+postgresVersion12 = "12.6"
+postgresVersion11 = "11.11"
+postgresVersion10 = "10.16"
+postgresVersion96 = "9.6.21"
+postgresVersion95 = "9.5.25"
postgisVersion = "3.0"
-centosBase = "centos7"
+centosBase = "centos8"
[outputs]
home = [ "HTML", "RSS", "JSON"]
diff --git a/docs/content/Configuration/compatibility.md b/docs/content/Configuration/compatibility.md
index 43af7021db..57e86019b8 100644
--- a/docs/content/Configuration/compatibility.md
+++ b/docs/content/Configuration/compatibility.md
@@ -12,6 +12,13 @@ version dependencies between the two projects. Below are the operator releases a
| Operator Release | Container Release | Postgres | PgBackrest Version
|:----------|:-------------|:------------|:--------------
+| 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|
diff --git a/docs/content/Upgrade/manual/upgrade4.md b/docs/content/Upgrade/manual/upgrade4.md
index da11f86f15..01d6ac1d32 100644
--- a/docs/content/Upgrade/manual/upgrade4.md
+++ b/docs/content/Upgrade/manual/upgrade4.md
@@ -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: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)
@@ -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/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/tutorial/pgbouncer.md b/docs/content/tutorial/pgbouncer.md
index 0349ff1eaf..2e189bb76f 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.5, server 1.14.0/bouncer)
+psql (12.6, server 1.14.0/bouncer)
Type "help" for help.
pgbouncer=#
diff --git a/examples/create-by-resource/fromcrd.json b/examples/create-by-resource/fromcrd.json
index ea603808ac..81fa142821 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.1",
+ "pgo-version": "4.5.2",
"pgouser": "pgoadmin",
"primary": "true"
},
@@ -62,7 +62,7 @@
},
"backrestResources": {},
"ccpimage": "crunchy-postgres-ha",
- "ccpimagetag": "centos7-12.5-4.5.1",
+ "ccpimagetag": "centos8-12.6-4.5.2",
"clustername": "fromcrd",
"customconfig": "",
"database": "userdb",
@@ -95,7 +95,7 @@
"userlabels": {
"crunchy-postgres-exporter": "false",
"pg-pod-anti-affinity": "",
- "pgo-version": "4.5.1",
+ "pgo-version": "4.5.2",
"pgouser": "pgoadmin",
"pgo-backrest": "true"
},
diff --git a/examples/envs.sh b/examples/envs.sh
index b17080fb17..9d00960260 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.1
+export PGO_BASEOS=centos8
+export PGO_VERSION=4.5.2
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
index 390bfbbaae..230906684c 100644
--- a/examples/helm/README.md
+++ b/examples/helm/README.md
@@ -22,10 +22,10 @@ https://access.crunchydata.com/documentation/postgres-operator/latest/custom-res
## Setup
-If you are running Postgres Operator 4.5.1 or later, you can skip the below
+If you are running Postgres Operator 4.5.2 or later, you can skip the below
step.
-### Before 4.5.1
+### Before 4.5.2
```
cd postgres-operator/examples/helm/create-cluster
diff --git a/examples/helm/create-cluster/templates/pgcluster.yaml b/examples/helm/create-cluster/templates/pgcluster.yaml
index 0852b1f447..fab6c18d93 100644
--- a/examples/helm/create-cluster/templates/pgcluster.yaml
+++ b/examples/helm/create-cluster/templates/pgcluster.yaml
@@ -13,7 +13,7 @@ metadata:
pg-cluster: {{ .Values.pgclustername }}
pg-pod-anti-affinity: ""
pgo-backrest: "true"
- pgo-version: 4.5.1
+ pgo-version: 4.5.2
pgouser: admin
name: {{ .Values.pgclustername }}
namespace: {{ .Values.namespace }}
diff --git a/examples/helm/create-cluster/values.yaml b/examples/helm/create-cluster/values.yaml
index 4add0e560f..f334830007 100644
--- a/examples/helm/create-cluster/values.yaml
+++ b/examples/helm/create-cluster/values.yaml
@@ -4,11 +4,11 @@
# The values is for the namespace and the postgresql cluster name
ccpimage: crunchy-postgres-ha
ccpimageprefix: registry.developers.crunchydata.com/crunchydata
-ccpimagetag: centos7-12.5-4.5.1
+ccpimagetag: centos8-12.6-4.5.2
namespace: pgo
pgclustername: hippo
pgoimageprefix: registry.developers.crunchydata.com/crunchydata
-pgoversion: 4.5.1
+pgoversion: 4.5.2
hipposecretuser: "hippo"
hipposecretpassword: "Supersecurepassword*"
postgressecretuser: "postgres"
diff --git a/installers/ansible/README.md b/installers/ansible/README.md
index 345d035037..238f1398bb 100644
--- a/installers/ansible/README.md
+++ b/installers/ansible/README.md
@@ -4,7 +4,7 @@
-Latest Release: 4.5.1
+Latest Release: 4.5.2
## General
diff --git a/installers/ansible/values.yaml b/installers/ansible/values.yaml
index ebce0ed751..acde59ad02 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.5-4.5.1"
+ccp_image_tag: "centos8-12.6-4.5.2"
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.1"
+pgo_client_version: "4.5.2"
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.1"
+pgo_image_tag: "centos8-4.5.2"
pgo_installation_name: "devtest"
pgo_noauth_routes: ""
pgo_operator_namespace: "pgo"
diff --git a/installers/gcp-marketplace/Makefile b/installers/gcp-marketplace/Makefile
index 6236ae3ad8..a5ca4e43e1 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.1
+PGO_VERSION ?= 4.5.2
IMAGE_BUILD_ARGS = --build-arg MARKETPLACE_VERSION='$(MARKETPLACE_VERSION)' \
--build-arg PGO_VERSION='$(PGO_VERSION)'
diff --git a/installers/gcp-marketplace/README.md b/installers/gcp-marketplace/README.md
index af2e60f80c..6a5c1429c8 100644
--- a/installers/gcp-marketplace/README.md
+++ b/installers/gcp-marketplace/README.md
@@ -59,7 +59,7 @@ Google Cloud Marketplace.
```shell
IMAGE_REPOSITORY=gcr.io/crunchydata-public/postgres-operator
- export PGO_VERSION=4.5.1
+ export PGO_VERSION=4.5.2
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/values.yaml b/installers/gcp-marketplace/values.yaml
index e2ed852df1..4c514f533f 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.5-4.5.1"
+ccp_image_tag: "centos8-12.6-4.5.2"
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.1"
+pgo_client_version: "4.5.2"
pgo_image_prefix: "registry.developers.crunchydata.com/crunchydata"
-pgo_image_tag: "centos7-4.5.1"
+pgo_image_tag: "centos8-4.5.2"
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 e7a55444cb..6b32ef6d5e 100644
--- a/installers/helm/Chart.yaml
+++ b/installers/helm/Chart.yaml
@@ -3,7 +3,7 @@ name: postgres-operator
description: Crunchy PostgreSQL Operator Helm chart for Kubernetes
type: application
version: 0.1.0
-appVersion: 4.5.1
+appVersion: 4.5.2
home: https://github.com/CrunchyData/postgres-operator
icon: https://github.com/CrunchyData/postgres-operator/raw/master/crunchy_logo.png
keywords:
diff --git a/installers/helm/values.yaml b/installers/helm/values.yaml
index b2c5d441b2..f7bb96330c 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.5-4.5.1"
+ccp_image_tag: "centos8-12.6-4.5.2"
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.1"
+pgo_client_version: "4.5.2"
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.1"
+pgo_image_tag: "centos8-4.5.2"
pgo_installation_name: "devtest"
pgo_noauth_routes: ""
pgo_operator_namespace: "pgo"
diff --git a/installers/kubectl/client-setup.sh b/installers/kubectl/client-setup.sh
index 1504009506..455c91bd63 100755
--- a/installers/kubectl/client-setup.sh
+++ b/installers/kubectl/client-setup.sh
@@ -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.1}"
+PGO_CLIENT_VERSION="${PGO_CLIENT_VERSION:-v4.5.2}"
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 977c9ea790..33567fa374 100644
--- a/installers/kubectl/postgres-operator-ocp311.yml
+++ b/installers/kubectl/postgres-operator-ocp311.yml
@@ -44,7 +44,7 @@ data:
ccp_image_prefix: "registry.developers.crunchydata.com/crunchydata"
ccp_image_pull_secret: ""
ccp_image_pull_secret_manifest: ""
- ccp_image_tag: "centos7-12.5-4.5.1"
+ ccp_image_tag: "centos8-12.6-4.5.2"
create_rbac: "true"
crunchy_debug: "false"
db_name: ""
@@ -77,14 +77,14 @@ data:
pgo_client_cert_secret: "pgo.tls"
pgo_client_container_install: "false"
pgo_client_install: "true"
- pgo_client_version: "4.5.1"
+ pgo_client_version: "4.5.2"
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.1"
+ pgo_image_tag: "centos8-4.5.2"
pgo_installation_name: "devtest"
pgo_noauth_routes: ""
pgo_operator_namespace: "pgo"
@@ -161,7 +161,7 @@ spec:
restartPolicy: Never
containers:
- name: pgo-deploy
- image: registry.developers.crunchydata.com/crunchydata/pgo-deployer:centos7-4.5.1
+ image: registry.developers.crunchydata.com/crunchydata/pgo-deployer:centos8-4.5.2
imagePullPolicy: IfNotPresent
env:
- name: DEPLOY_ACTION
diff --git a/installers/kubectl/postgres-operator.yml b/installers/kubectl/postgres-operator.yml
index d163795cbe..a26a841742 100644
--- a/installers/kubectl/postgres-operator.yml
+++ b/installers/kubectl/postgres-operator.yml
@@ -139,7 +139,7 @@ data:
ccp_image_prefix: "registry.developers.crunchydata.com/crunchydata"
ccp_image_pull_secret: ""
ccp_image_pull_secret_manifest: ""
- ccp_image_tag: "centos7-12.5-4.5.1"
+ ccp_image_tag: "centos8-12.6-4.5.2"
create_rbac: "true"
crunchy_debug: "false"
db_name: ""
@@ -172,14 +172,14 @@ data:
pgo_client_cert_secret: "pgo.tls"
pgo_client_container_install: "false"
pgo_client_install: "true"
- pgo_client_version: "4.5.1"
+ pgo_client_version: "4.5.2"
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.1"
+ pgo_image_tag: "centos8-4.5.2"
pgo_installation_name: "devtest"
pgo_noauth_routes: ""
pgo_operator_namespace: "pgo"
@@ -269,7 +269,7 @@ spec:
restartPolicy: Never
containers:
- name: pgo-deploy
- image: registry.developers.crunchydata.com/crunchydata/pgo-deployer:centos7-4.5.1
+ image: registry.developers.crunchydata.com/crunchydata/pgo-deployer:centos8-4.5.2
imagePullPolicy: IfNotPresent
env:
- name: DEPLOY_ACTION
diff --git a/installers/metrics/ansible/README.md b/installers/metrics/ansible/README.md
index 57f68cd878..319de0231f 100644
--- a/installers/metrics/ansible/README.md
+++ b/installers/metrics/ansible/README.md
@@ -4,7 +4,7 @@
-Latest Release: 4.5.1
+Latest Release: 4.5.2
## General
diff --git a/installers/metrics/helm/Chart.yaml b/installers/metrics/helm/Chart.yaml
index 520204c2d1..91853271ac 100644
--- a/installers/metrics/helm/Chart.yaml
+++ b/installers/metrics/helm/Chart.yaml
@@ -3,6 +3,6 @@ name: postgres-operator-monitoring
description: Install for Crunchy PostgreSQL Operator Monitoring
type: application
version: 0.1.0
-appVersion: 4.5.1
+appVersion: 4.5.2
home: https://github.com/CrunchyData/postgres-operator
icon: https://github.com/CrunchyData/postgres-operator/raw/master/crunchy_logo.png
\ No newline at end of file
diff --git a/installers/metrics/helm/helm_template.yaml b/installers/metrics/helm/helm_template.yaml
index b328adba55..5af724ab41 100644
--- a/installers/metrics/helm/helm_template.yaml
+++ b/installers/metrics/helm/helm_template.yaml
@@ -20,5 +20,5 @@ serviceAccount:
# the image prefix and tag to use for the 'pgo-deployer' container
pgo_image_prefix: "registry.developers.crunchydata.com/crunchydata"
-pgo_image_tag: "centos7-4.5.1"
+pgo_image_tag: "centos8-4.5.2"
diff --git a/installers/metrics/helm/values.yaml b/installers/metrics/helm/values.yaml
index 616001b5ec..d10e50ddf0 100644
--- a/installers/metrics/helm/values.yaml
+++ b/installers/metrics/helm/values.yaml
@@ -20,7 +20,7 @@ serviceAccount:
# the image prefix and tag to use for the 'pgo-deployer' container
pgo_image_prefix: "registry.developers.crunchydata.com/crunchydata"
-pgo_image_tag: "centos7-4.5.1"
+pgo_image_tag: "centos8-4.5.2"
# =====================
# Configuration Options
diff --git a/installers/metrics/kubectl/postgres-operator-metrics-ocp311.yml b/installers/metrics/kubectl/postgres-operator-metrics-ocp311.yml
index f4643fc126..aa38708858 100644
--- a/installers/metrics/kubectl/postgres-operator-metrics-ocp311.yml
+++ b/installers/metrics/kubectl/postgres-operator-metrics-ocp311.yml
@@ -96,7 +96,7 @@ spec:
restartPolicy: Never
containers:
- name: pgo-metrics-deploy
- image: registry.developers.crunchydata.com/crunchydata/pgo-deployer:centos7-4.5.1
+ image: registry.developers.crunchydata.com/crunchydata/pgo-deployer:centos8-4.5.2
imagePullPolicy: IfNotPresent
env:
- name: DEPLOY_ACTION
diff --git a/installers/metrics/kubectl/postgres-operator-metrics.yml b/installers/metrics/kubectl/postgres-operator-metrics.yml
index 313698aaeb..e1630c8601 100644
--- a/installers/metrics/kubectl/postgres-operator-metrics.yml
+++ b/installers/metrics/kubectl/postgres-operator-metrics.yml
@@ -165,7 +165,7 @@ spec:
restartPolicy: Never
containers:
- name: pgo-metrics-deploy
- image: registry.developers.crunchydata.com/crunchydata/pgo-deployer:centos7-4.5.1
+ image: registry.developers.crunchydata.com/crunchydata/pgo-deployer:centos8-4.5.2
imagePullPolicy: IfNotPresent
env:
- name: DEPLOY_ACTION
diff --git a/installers/olm/Makefile b/installers/olm/Makefile
index 41ee2405b2..8706e15016 100644
--- a/installers/olm/Makefile
+++ b/installers/olm/Makefile
@@ -2,15 +2,15 @@
.SUFFIXES:
CCP_IMAGE_PREFIX ?= registry.developers.crunchydata.com/crunchydata
-CCP_PG_FULLVERSION ?= 12.5
+CCP_PG_FULLVERSION ?= 12.6
CCP_POSTGIS_VERSION ?= 3.0
KUBECONFIG ?= $(HOME)/.kube/config
OLM_SDK_VERSION ?= 0.15.1
OLM_TOOLS ?= registry.localhost:5000/postgres-operator-olm-tools:$(OLM_SDK_VERSION)
OLM_VERSION ?= 0.15.1
-PGO_BASEOS ?= centos7
+PGO_BASEOS ?= centos8
PGO_IMAGE_PREFIX ?= registry.developers.crunchydata.com/crunchydata
-PGO_VERSION ?= 4.5.1
+PGO_VERSION ?= 4.5.2
PGO_IMAGE_TAG ?= $(PGO_BASEOS)-$(PGO_VERSION)
CCP_IMAGE_TAG ?= $(PGO_BASEOS)-$(CCP_PG_FULLVERSION)-$(PGO_VERSION)
CCP_POSTGIS_IMAGE_TAG ?= $(PGO_BASEOS)-$(CCP_PG_FULLVERSION)-$(CCP_POSTGIS_VERSION)-$(PGO_VERSION)
diff --git a/internal/util/util_test.go b/internal/util/util_test.go
index 30d6d8b65d..b7ae785b55 100644
--- a/internal/util/util_test.go
+++ b/internal/util/util_test.go
@@ -18,25 +18,25 @@ func TestGetStandardImageTag(t *testing.T) {
expected string
}{
{
- "image: crunchy-postgres-ha, tag: centos7-12.4-4.5.0",
+ "image: crunchy-postgres-ha, tag: centos8-12.4-4.5.0",
"crunchy-postgres-ha",
- "centos7-12.4-4.5.0",
- "centos7-12.4-4.5.0",
+ "centos8-12.4-4.5.0",
+ "centos8-12.4-4.5.0",
}, {
- "image: crunchy-postgres-gis-ha, tag: centos7-12.4-3.0-4.5.0",
+ "image: crunchy-postgres-gis-ha, tag: centos8-12.4-3.0-4.5.0",
"crunchy-postgres-gis-ha",
- "centos7-12.4-3.0-4.5.0",
- "centos7-12.4-4.5.0",
+ "centos8-12.4-3.0-4.5.0",
+ "centos8-12.4-4.5.0",
}, {
- "image: crunchy-postgres-ha, tag: centos7-12.4-4.5.0-beta.1",
+ "image: crunchy-postgres-ha, tag: centos8-12.4-4.5.0-beta.1",
"crunchy-postgres-ha",
- "centos7-12.4-4.5.0-beta.1",
- "centos7-12.4-4.5.0-beta.1",
+ "centos8-12.4-4.5.0-beta.1",
+ "centos8-12.4-4.5.0-beta.1",
}, {
- "image: crunchy-postgres-gis-ha, tag: centos7-12.4-3.0-4.5.0-beta.2",
+ "image: crunchy-postgres-gis-ha, tag: centos8-12.4-3.0-4.5.0-beta.2",
"crunchy-postgres-gis-ha",
- "centos7-12.4-3.0-4.5.0-beta.2",
- "centos7-12.4-4.5.0-beta.2",
+ "centos8-12.4-3.0-4.5.0-beta.2",
+ "centos8-12.4-4.5.0-beta.2",
}, {
"image: crunchy-postgres-ha, tag: centos8-9.5.23-4.5.0-rc.1",
"crunchy-postgres-ha",
diff --git a/pkg/apis/crunchydata.com/v1/doc.go b/pkg/apis/crunchydata.com/v1/doc.go
index 62cd5bc582..630f69fe82 100644
--- a/pkg/apis/crunchydata.com/v1/doc.go
+++ b/pkg/apis/crunchydata.com/v1/doc.go
@@ -53,7 +53,7 @@ cluster.
curl --cacert $PGO_CA_CERT --key $PGO_CLIENT_KEY --cert $PGO_CA_CERT -u \
admin:examplepassword -H "Content-Type:application/json" --insecure -X \
POST --data \
- '{"ClientVersion":"4.5.1",
+ '{"ClientVersion":"4.5.2",
"Namespace":"pgouser1",
"Name":"mycluster",
$PGO_APISERVER_URL/clusters
@@ -72,7 +72,7 @@ show all of the clusters that are in the given namespace.
curl --cacert $PGO_CA_CERT --key $PGO_CLIENT_KEY --cert $PGO_CA_CERT -u \
admin:examplepassword -H "Content-Type:application/json" --insecure -X \
POST --data \
- '{"ClientVersion":"4.5.1",
+ '{"ClientVersion":"4.5.2",
"Namespace":"pgouser1",
"Clustername":"mycluster"}' \
$PGO_APISERVER_URL/showclusters
@@ -82,7 +82,7 @@ $PGO_APISERVER_URL/showclusters
curl --cacert $PGO_CA_CERT --key $PGO_CLIENT_KEY --cert $PGO_CA_CERT -u \
admin:examplepassword -H "Content-Type:application/json" --insecure -X \
POST --data \
- '{"ClientVersion":"4.5.1",
+ '{"ClientVersion":"4.5.2",
"Namespace":"pgouser1",
"Clustername":"mycluster"}' \
$PGO_APISERVER_URL/clustersdelete
@@ -90,7 +90,7 @@ $PGO_APISERVER_URL/clustersdelete
Schemes: http, https
BasePath: /
- Version: 4.5.1
+ Version: 4.5.2
License: Apache 2.0 http://www.apache.org/licenses/LICENSE-2.0
Contact: Crunchy Data https://www.crunchydata.com/
diff --git a/pkg/apiservermsgs/common.go b/pkg/apiservermsgs/common.go
index d52499aa4a..1f2307540b 100644
--- a/pkg/apiservermsgs/common.go
+++ b/pkg/apiservermsgs/common.go
@@ -15,7 +15,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
-const PGO_VERSION = "4.5.1"
+const PGO_VERSION = "4.5.2"
// Ok status
const Ok = "ok"
diff --git a/redhat/atomic/help.1 b/redhat/atomic/help.1
index 6f9bfad143..69852f8802 100644
--- a/redhat/atomic/help.1
+++ b/redhat/atomic/help.1
@@ -56,4 +56,4 @@ The Red Hat Enterprise Linux version from which the container was built. For exa
\fB\fCRelease=\fR
.PP
-The specific release number of the container. For example, Release="4.5.1"
+The specific release number of the container. For example, Release="4.5.2"
diff --git a/redhat/atomic/help.md b/redhat/atomic/help.md
index 1a12dbc144..73f61740a6 100644
--- a/redhat/atomic/help.md
+++ b/redhat/atomic/help.md
@@ -45,4 +45,4 @@ The Red Hat Enterprise Linux version from which the container was built. For exa
`Release=`
-The specific release number of the container. For example, Release="4.5.1"
+The specific release number of the container. For example, Release="4.5.2"
From b38e9df0399380398341ee135b408ea12811f888 Mon Sep 17 00:00:00 2001
From: "Jonathan S. Katz"
Date: Mon, 22 Feb 2021 10:46:07 -0500
Subject: [PATCH 071/129] Fix overly aggressive substitution in Makefile
Ensure that the centos7 instructions are still present.
---
Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Makefile b/Makefile
index 464bc28483..8527944c29 100644
--- a/Makefile
+++ b/Makefile
@@ -61,7 +61,7 @@ ifeq ("$(PGO_BASEOS)", "ubi8")
PACKAGER=dnf
endif
-ifeq ("$(PGO_BASEOS)", "centos8")
+ifeq ("$(PGO_BASEOS)", "centos7")
DFSET=centos
DOCKERBASEREGISTRY=centos:
endif
From a2a3456b7faec49c138062dc96573bdf961bd150 Mon Sep 17 00:00:00 2001
From: Joseph Mckulka <16840147+jmckulk@users.noreply.github.com>
Date: Thu, 14 Jan 2021 18:27:41 -0500
Subject: [PATCH 072/129] Update perms on deployer working directory
The working directory for pgo-deployer (/tmp/.pgo) is now created at build time
instead of install time. When building, the directory is created with root:root
as user:group meaning the installer does not have permission to create the
required subdirectories. This change recursively updates the user and group on
/tmp/.pgo so that the installer can make changes.
---
build/pgo-deployer/Dockerfile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/build/pgo-deployer/Dockerfile b/build/pgo-deployer/Dockerfile
index 2f18411334..79c3516d2c 100644
--- a/build/pgo-deployer/Dockerfile
+++ b/build/pgo-deployer/Dockerfile
@@ -79,7 +79,7 @@ ENV HOME="/tmp"
RUN chmod g=u /etc/passwd
RUN chmod g=u /uid_daemon.sh
-RUN chown -R 2:2 /tmp/.pgo/metrics
+RUN chown -R 2:2 /tmp/.pgo
ENTRYPOINT ["/uid_daemon.sh"]
From a8adcd069f53d33b2b9f2617de2e449b530e8ed3 Mon Sep 17 00:00:00 2001
From: "Jonathan S. Katz"
Date: Mon, 22 Feb 2021 14:27:36 -0500
Subject: [PATCH 073/129] Allow for the existence of no labels when creating a
cluster
This fell on the trap of the "empty string being split", which
by default creates a single entry in an array. As an empty string
is not a valid label, this would fail on the default command.
---
internal/apiserver/common.go | 5 +++++
internal/apiserver/common_test.go | 5 +++++
2 files changed, 10 insertions(+)
diff --git a/internal/apiserver/common.go b/internal/apiserver/common.go
index b6c665c652..a73e826a8a 100644
--- a/internal/apiserver/common.go
+++ b/internal/apiserver/common.go
@@ -155,6 +155,11 @@ func IsValidPVC(pvcName, ns string) bool {
func ValidateLabel(labelStr string) (map[string]string, error) {
labelMap := map[string]string{}
+ // if this is an empty string, return
+ if strings.TrimSpace(labelStr) == "" {
+ return labelMap, nil
+ }
+
for _, v := range strings.Split(labelStr, ",") {
pair := strings.Split(v, "=")
if len(pair) != 2 {
diff --git a/internal/apiserver/common_test.go b/internal/apiserver/common_test.go
index 992cc134b7..712ca11611 100644
--- a/internal/apiserver/common_test.go
+++ b/internal/apiserver/common_test.go
@@ -72,12 +72,17 @@ func TestValidateLabel(t *testing.T) {
map[string]string{"key": "value"},
map[string]string{"example.com/key": "value"},
map[string]string{"key1": "value1", "key2": "value2"},
+ map[string]string{"": ""},
}
for _, input := range inputs {
labelStr := ""
for k, v := range input {
+ if k == "" && v == "" {
+ continue
+ }
+
labelStr += fmt.Sprintf("%s=%s,", k, v)
}
From d2b1c5cbd95bbc232e89b7fe598d5bf382e73fc1 Mon Sep 17 00:00:00 2001
From: "Jonathan S. Katz"
Date: Sat, 27 Feb 2021 16:44:49 -0500
Subject: [PATCH 074/129] Revert changes from 05742298
05742298 was designed to workaround an issue with the Docker
packaging from Red Hat that introduced a bug which prevented the
containers from properly loading. Given we are in a single-user
environment that only uses ssh public key authentication for
performing pgBackRest operations, we can set "UsePAM" to "no".
This allows for one to run the containers with a security context
of "allowPrivilegeEscalation" set to "false".
Issue: [ch10588]
---
.../files/pgo-backrest-repo/sshd_config | 15 +++------------
1 file changed, 3 insertions(+), 12 deletions(-)
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..f79f039771 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
From 6219d05c033e64bb8b5f00fb48569b51aaa3aef6 Mon Sep 17 00:00:00 2001
From: jmckulk
Date: Tue, 23 Feb 2021 12:40:16 -0500
Subject: [PATCH 075/129] Update e2e helper functions to user t.Cleanup
When these helper functions were added the t.Cleanup function did not exist.
This change removes defer calls in favor of t.Cleanup.
---
testing/pgo_cli/suite_helpers_test.go | 22 +++++++++-------------
1 file changed, 9 insertions(+), 13 deletions(-)
diff --git a/testing/pgo_cli/suite_helpers_test.go b/testing/pgo_cli/suite_helpers_test.go
index b4db220487..57067a863b 100644
--- a/testing/pgo_cli/suite_helpers_test.go
+++ b/testing/pgo_cli/suite_helpers_test.go
@@ -327,12 +327,6 @@ func withCluster(t testing.TB, namespace func() string, during func(func() strin
var name string
var once sync.Once
- defer func() {
- if name != "" {
- teardownCluster(t, namespace(), name, created)
- }
- }()
-
during(func() string {
once.Do(func() {
generated := names.SimpleNameGenerator.GenerateName("pgo-test-")
@@ -343,6 +337,10 @@ func withCluster(t testing.TB, namespace func() string, during func(func() strin
created = time.Now()
name = generated
}
+
+ t.Cleanup(func() {
+ teardownCluster(t, namespace(), name, created)
+ })
})
return name
})
@@ -364,13 +362,6 @@ func withNamespace(t testing.TB, during func(func() string)) {
var namespace *core_v1.Namespace
var once sync.Once
- defer func() {
- if namespace != nil {
- err := TestContext.Kubernetes.DeleteNamespace(namespace.Name)
- assert.NoErrorf(t, err, "unable to tear down namespace %q", namespace.Name)
- }
- }()
-
during(func() string {
once.Do(func() {
ns, err := TestContext.Kubernetes.GenerateNamespace(
@@ -381,6 +372,11 @@ func withNamespace(t testing.TB, during func(func() string)) {
_, err = pgo("update", "namespace", namespace.Name).Exec(t)
assert.NoErrorf(t, err, "unable to take ownership of namespace %q", namespace.Name)
}
+
+ t.Cleanup(func() {
+ err := TestContext.Kubernetes.DeleteNamespace(namespace.Name)
+ assert.NoErrorf(t, err, "unable to tear down namespace %q", namespace.Name)
+ })
})
return namespace.Name
From bcb00ca188c5737a3e3518a505c2035d19650f03 Mon Sep 17 00:00:00 2001
From: jmckulk
Date: Tue, 23 Feb 2021 12:53:42 -0500
Subject: [PATCH 076/129] Add annotation e2e test
This change adds an end-to-end test for the annotation functionality for the
operator. Tests are added to create, update, and remove annotations from the
cluster deployment.
---
testing/kubeapi/deployment.go | 10 +
testing/pgo_cli/cluster_annotation_test.go | 247 +++++++++++++++++++++
testing/pgo_cli/suite_helpers_test.go | 10 +
3 files changed, 267 insertions(+)
create mode 100644 testing/pgo_cli/cluster_annotation_test.go
diff --git a/testing/kubeapi/deployment.go b/testing/kubeapi/deployment.go
index 4b864d326a..52ab85e4c9 100644
--- a/testing/kubeapi/deployment.go
+++ b/testing/kubeapi/deployment.go
@@ -22,3 +22,13 @@ func (k *KubeAPI) ListDeployments(namespace string, labels map[string]string) ([
return list.Items, err
}
+
+// GetDeployment returns deployment by name, if exists.
+func (k *KubeAPI) GetDeployment(namespace, name string) *apps_v1.Deployment {
+ deployment, err := k.Client.AppsV1().Deployments(namespace).Get(name, meta_v1.GetOptions{})
+ if deployment == nil && err != nil {
+ deployment = &apps_v1.Deployment{}
+ }
+
+ return deployment
+}
diff --git a/testing/pgo_cli/cluster_annotation_test.go b/testing/pgo_cli/cluster_annotation_test.go
new file mode 100644
index 0000000000..e0a2b9286f
--- /dev/null
+++ b/testing/pgo_cli/cluster_annotation_test.go
@@ -0,0 +1,247 @@
+package pgo_cli_test
+
+/*
+ Copyright 2020 - 2021 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.
+*/
+
+import (
+ "testing"
+ "time"
+
+ "github.com/stretchr/testify/require"
+)
+
+func TestClusterAnnotation(t *testing.T) {
+ t.Parallel()
+
+ withNamespace(t, func(namespace func() string) {
+ t.Run("on create", func(t *testing.T) {
+ t.Parallel()
+ tests := []struct {
+ testName string
+ annotations map[string]string
+ clusterFlags []string
+ addFlags []string
+ removeFlags []string
+ deployments []string
+ }{
+ {
+ testName: "create-global",
+ annotations: map[string]string{
+ "global": "here",
+ "global2": "foo",
+ },
+ clusterFlags: []string{"--pgbouncer"},
+ addFlags: []string{"--annotation=global=here", "--annotation=global2=foo"},
+ removeFlags: []string{"--annotation=global-", "--annotation=global2-"},
+ deployments: []string{"create-global", "create-global-backrest-shared-repo", "create-global-pgbouncer"},
+ }, {
+ testName: "create-postgres",
+ annotations: map[string]string{
+ "postgres": "present",
+ },
+ clusterFlags: []string{},
+ addFlags: []string{"--annotation-postgres=postgres=present"},
+ removeFlags: []string{"--annotation-postgres=postgres-"},
+ deployments: []string{"create-postgres"},
+ }, {
+ testName: "create-pgbackrest",
+ annotations: map[string]string{
+ "pgbackrest": "what",
+ },
+ clusterFlags: []string{},
+ addFlags: []string{"--annotation-pgbackrest=pgbackrest=what"},
+ removeFlags: []string{"--annotation-pgbackrest=pgbackrest-"},
+ deployments: []string{"create-pgbackrest-backrest-shared-repo"},
+ }, {
+ testName: "create-pgbouncer",
+ annotations: map[string]string{
+ "pgbouncer": "aqui",
+ },
+ clusterFlags: []string{"--pgbouncer"},
+ addFlags: []string{"--annotation-pgbouncer=pgbouncer=aqui"},
+ removeFlags: []string{"--annotation-pgbouncer=pgbouncer-"},
+ deployments: []string{"create-pgbouncer-pgbouncer"},
+ }, {
+ testName: "remove-one",
+ annotations: map[string]string{
+ "leave": "me",
+ },
+ clusterFlags: []string{"--pgbouncer"},
+ addFlags: []string{"--annotation=remove=me", "--annotation=leave=me"},
+ removeFlags: []string{"--annotation=remove-"},
+ deployments: []string{"remove-one", "remove-one-backrest-shared-repo", "remove-one-pgbouncer"},
+ },
+ }
+
+ for _, test := range tests {
+ test := test // lock test variable in for each run since it changes across parallel loops
+ t.Run(test.testName, func(t *testing.T) {
+ t.Parallel()
+ createCMD := []string{"create", "cluster", test.testName, "-n", namespace()}
+ createCMD = append(createCMD, test.clusterFlags...)
+ createCMD = append(createCMD, test.addFlags...)
+ output, err := pgo(createCMD...).Exec(t)
+ t.Cleanup(func() {
+ teardownCluster(t, namespace(), test.testName, time.Now())
+ })
+ require.NoError(t, err)
+ require.Contains(t, output, "created cluster:")
+
+ requireClusterReady(t, namespace(), test.testName, (2 * time.Minute))
+ if contains(test.clusterFlags, "--pgbouncer") {
+ requirePgBouncerReady(t, namespace(), test.testName, (2 * time.Minute))
+ }
+
+ t.Run("add", func(t *testing.T) {
+ for _, deploymentName := range test.deployments {
+ for expectedKey, expectedValue := range test.annotations {
+ hasAnnotation := func() bool {
+ actualAnnotations := TestContext.Kubernetes.GetDeployment(namespace(), deploymentName).Spec.Template.ObjectMeta.GetAnnotations()
+ actualValue := actualAnnotations[expectedKey]
+ if actualValue == expectedValue {
+ return true
+ }
+
+ return false
+ }
+
+ requireWaitFor(t, hasAnnotation, time.Minute, time.Second,
+ "timeout waiting for deployment \"%q\" to have annotation \"%s: %s\"", deploymentName, expectedKey, expectedValue)
+ }
+ }
+ })
+
+ t.Run("remove", func(t *testing.T) {
+ t.Skip("Bug: annotation in not removed on update")
+ updateCMD := []string{"update", "cluster", test.testName, "-n", namespace(), "--no-prompt"}
+ updateCMD = append(updateCMD, test.removeFlags...)
+ output, err := pgo(updateCMD...).Exec(t)
+ require.NoError(t, err)
+ require.Contains(t, output, "updated pgcluster")
+
+ for _, deploymentName := range test.deployments {
+ for expectedKey, _ := range test.annotations {
+ notHasAnnotation := func() bool {
+ actualAnnotations := TestContext.Kubernetes.GetDeployment(namespace(), deploymentName).Spec.Template.ObjectMeta.GetAnnotations()
+ actualValue := actualAnnotations[expectedKey]
+ if actualValue != "" {
+ return false
+ }
+
+ return true
+ }
+
+ requireWaitFor(t, notHasAnnotation, time.Minute, time.Second,
+ "timeout waiting for annotation key \"%s\" to be removed from deployment \"%s\"", expectedKey, deploymentName)
+ }
+ }
+ })
+ })
+ }
+ })
+
+ t.Run("on update", func(t *testing.T) {
+ t.Parallel()
+
+ tests := []struct {
+ testName string
+ annotations map[string]string
+ clusterFlags []string
+ addFlags []string
+ deployments []string
+ }{
+ {
+ testName: "update-global",
+ annotations: map[string]string{
+ "global": "here",
+ "global2": "foo",
+ },
+ clusterFlags: []string{"--pgbouncer"},
+ addFlags: []string{"--annotation=global=here", "--annotation=global2=foo"},
+ deployments: []string{"update-global", "update-global-backrest-shared-repo", "update-global-pgbouncer"},
+ }, {
+ testName: "update-postgres",
+ annotations: map[string]string{
+ "postgres": "present",
+ },
+ clusterFlags: []string{},
+ addFlags: []string{"--annotation-postgres=postgres=present"},
+ deployments: []string{"update-postgres"},
+ }, {
+ testName: "update-pgbackrest",
+ annotations: map[string]string{
+ "pgbackrest": "what",
+ },
+ clusterFlags: []string{},
+ addFlags: []string{"--annotation-pgbackrest=pgbackrest=what"},
+ deployments: []string{"update-pgbackrest-backrest-shared-repo"},
+ }, {
+ testName: "update-pgbouncer",
+ annotations: map[string]string{
+ "pgbouncer": "aqui",
+ },
+ clusterFlags: []string{"--pgbouncer"},
+ addFlags: []string{"--annotation-pgbouncer=pgbouncer=aqui"},
+ deployments: []string{"update-pgbouncer-pgbouncer"},
+ },
+ }
+
+ for _, test := range tests {
+ test := test // lock test variable in for each run since it changes across parallel loops
+ t.Run(test.testName, func(t *testing.T) {
+ t.Parallel()
+ createCMD := []string{"create", "cluster", test.testName, "-n", namespace()}
+ createCMD = append(createCMD, test.clusterFlags...)
+ output, err := pgo(createCMD...).Exec(t)
+ t.Cleanup(func() {
+ teardownCluster(t, namespace(), test.testName, time.Now())
+ })
+ require.NoError(t, err)
+ require.Contains(t, output, "created cluster:")
+
+ requireClusterReady(t, namespace(), test.testName, (2 * time.Minute))
+ if contains(test.clusterFlags, "--pgbouncer") {
+ requirePgBouncerReady(t, namespace(), test.testName, (2 * time.Minute))
+ }
+
+ updateCMD := []string{"update", "cluster", test.testName, "-n", namespace(), "--no-prompt"}
+ updateCMD = append(updateCMD, test.addFlags...)
+ output, err = pgo(updateCMD...).Exec(t)
+ require.NoError(t, err)
+ require.Contains(t, output, "updated pgcluster")
+
+ t.Run("add", func(t *testing.T) {
+ for _, deploymentName := range test.deployments {
+ for expectedKey, expectedValue := range test.annotations {
+ hasAnnotation := func() bool {
+ actualAnnotations := TestContext.Kubernetes.GetDeployment(namespace(), deploymentName).Spec.Template.ObjectMeta.GetAnnotations()
+ actualValue := actualAnnotations[expectedKey]
+ if actualValue == expectedValue {
+ return true
+ }
+
+ return false
+ }
+
+ requireWaitFor(t, hasAnnotation, time.Minute, time.Second,
+ "timeout waiting for deployment \"%q\" to have annotation \"%s: %s\"", deploymentName, expectedKey, expectedValue)
+ }
+ }
+ })
+ })
+ }
+ })
+ })
+}
diff --git a/testing/pgo_cli/suite_helpers_test.go b/testing/pgo_cli/suite_helpers_test.go
index 57067a863b..811343d8d9 100644
--- a/testing/pgo_cli/suite_helpers_test.go
+++ b/testing/pgo_cli/suite_helpers_test.go
@@ -44,6 +44,16 @@ type Pool struct {
func (p *Pool) Close() error { p.Pool.Close(); return p.Proxy.Close() }
+// contains will take a string slice and check if it contains a string
+func contains(s []string, str string) bool {
+ for _, v := range s {
+ if v == str {
+ return true
+ }
+ }
+ return false
+}
+
// clusterConnection opens a PostgreSQL connection to a database pod. Any error
// will cause t to FailNow.
func clusterConnection(t testing.TB, namespace, cluster, dsn string) *Pool {
From 9ef764f1933e7b2c8dbb62de0f374edc600e3c54 Mon Sep 17 00:00:00 2001
From: "Jonathan S. Katz"
Date: Wed, 10 Mar 2021 17:37:16 -0500
Subject: [PATCH 077/129] Allow for startup to proceed even if status
subresource is missing
We have a guard to only allow a cluster to be started up if we know
that it is in a shut down state. However, there appears to be cases
independentof the Operator where the pgclusters.crunchydata.com
"status" subresource is missing, which would cause that guard to be
too aggressive.
This change allows for the condition that there is no state registered
in the status subresource, which allows for the start up to proceed
regardless.
Issue: [ch10811]
---
internal/controller/pgcluster/pgclustercontroller.go | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/internal/controller/pgcluster/pgclustercontroller.go b/internal/controller/pgcluster/pgclustercontroller.go
index fef1a54734..4568f87b50 100644
--- a/internal/controller/pgcluster/pgclustercontroller.go
+++ b/internal/controller/pgcluster/pgclustercontroller.go
@@ -184,10 +184,16 @@ func (c *Controller) onUpdate(oldObj, newObj interface{}) {
// if the 'shutdown' parameter in the pgcluster update shows that the cluster should be either
// shutdown or started but its current status does not properly reflect that it is, then
// proceed with the logic needed to either shutdown or start the cluster
+ //
+ // we do need to check if the status has info in it. There have been cases
+ // where the entire status has been removed that could be external to the
+ // operator itself. In the case of checking that the state is in a shutdown
+ // phase, we also want to check if the status is completely empty. If it is,
+ // we will proceed with the shutdown.
if newcluster.Spec.Shutdown && newcluster.Status.State != crv1.PgclusterStateShutdown {
clusteroperator.ShutdownCluster(c.Client, *newcluster)
} else if !newcluster.Spec.Shutdown &&
- newcluster.Status.State == crv1.PgclusterStateShutdown {
+ (newcluster.Status.State == crv1.PgclusterStateShutdown || newcluster.Status.State == "") {
clusteroperator.StartupCluster(c.Client, *newcluster)
}
From 51a44cb185a57d7bda7b1bd38cccd18df6c47d70 Mon Sep 17 00:00:00 2001
From: Andrew L'Ecuyer
Date: Mon, 15 Mar 2021 20:23:00 +0000
Subject: [PATCH 078/129] Fix UsePAM Setting in sshd_config File
Fixes the UsePAM setting in sshd_config by changing the value from 'No'
to 'no'.
---
.../roles/pgo-operator/files/pgo-backrest-repo/sshd_config | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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 f79f039771..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
@@ -82,7 +82,7 @@ ChallengeResponseAuthentication 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
+UsePAM no
#AllowAgentForwarding yes
#AllowTcpForwarding yes
From 6987ee81cb4ff363eac023f6e051ee95e6ec6310 Mon Sep 17 00:00:00 2001
From: "Jonathan S. Katz"
Date: Thu, 18 Mar 2021 12:51:10 -0400
Subject: [PATCH 079/129] Documentation updates
Documentation updates in prep for the upcoming releaes.
---
docs/layouts/partials/flex/body-aftercontent.html | 3 +++
1 file changed, 3 insertions(+)
create mode 100644 docs/layouts/partials/flex/body-aftercontent.html
diff --git a/docs/layouts/partials/flex/body-aftercontent.html b/docs/layouts/partials/flex/body-aftercontent.html
new file mode 100644
index 0000000000..42949426a4
--- /dev/null
+++ b/docs/layouts/partials/flex/body-aftercontent.html
@@ -0,0 +1,3 @@
+
+
© 2017 - 2021 Crunchy Data Solutions, Inc.
+
From 03d7d27b72a3d317677c0422fbde054aeb9f786d Mon Sep 17 00:00:00 2001
From: "Jonathan S. Katz"
Date: Mon, 22 Mar 2021 11:03:39 -0400
Subject: [PATCH 080/129] Clarify different Pod anti-affinity options in docs
It is possible to fine tune the Pod anti-affinity settings for
the managed Deployments in a PostgreSQL cluster, though this was
not particularly clear in that section of the docs.
Issue: #2342
---
.../architecture/high-availability/_index.md | 24 +++++++++++++++++++
1 file changed, 24 insertions(+)
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
From d5f517dbac50a2642730c6f41a41dae81ac59224 Mon Sep 17 00:00:00 2001
From: "Jonathan S. Katz"
Date: Mon, 22 Mar 2021 15:22:35 -0400
Subject: [PATCH 081/129] Fix issue with documentation updates
Some of the interactive features were not loading due to the
last round of documentation updates. This fixes those issues.
---
.../partials/flex/body-aftercontent.html | 41 +++++++++++++++++++
1 file changed, 41 insertions(+)
diff --git a/docs/layouts/partials/flex/body-aftercontent.html b/docs/layouts/partials/flex/body-aftercontent.html
index 42949426a4..8d5f330f56 100644
--- a/docs/layouts/partials/flex/body-aftercontent.html
+++ b/docs/layouts/partials/flex/body-aftercontent.html
@@ -1,3 +1,44 @@
+
+ {{ partial "next-prev-page.html" . }}
+
+
+
+
+
+
+
+{{ partial "flex/scripts.html" . }}
From 1bd5a2296fbb1f9928a0e98c562e1ff071328f81 Mon Sep 17 00:00:00 2001
From: "Jonathan S. Katz"
Date: Wed, 24 Mar 2021 12:15:15 -0400
Subject: [PATCH 082/129] Update descriptions for the different backrest/backup
storage configs
Some of the legacy purposes of what this parameter did, which
was both confusing and inaccurate. This adds some clarity.
Reported by: Andreas Karlsson
---
docs/content/Configuration/pgo-yaml-configuration.md | 4 ++--
docs/content/installation/configuration.md | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/docs/content/Configuration/pgo-yaml-configuration.md b/docs/content/Configuration/pgo-yaml-configuration.md
index c1b6a894e1..942eafd229 100644
--- a/docs/content/Configuration/pgo-yaml-configuration.md
+++ b/docs/content/Configuration/pgo-yaml-configuration.md
@@ -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/installation/configuration.md b/docs/content/installation/configuration.md
index ce097d2753..b9b22f0c5a 100644
--- a/docs/content/installation/configuration.md
+++ b/docs/content/installation/configuration.md
@@ -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. |
From e0e95ea56c5efe83655bb22ce481a8a2d384fde2 Mon Sep 17 00:00:00 2001
From: "Jonathan S. Katz"
Date: Wed, 24 Mar 2021 16:28:30 -0400
Subject: [PATCH 083/129] Add clarification on disabling FSGroup for metrics
installation
This makes it abundantly clear that you may need to toggle the
"disable_fsgroup" attribute in the PostgreSQL Operator Monitoring
stack installer based upon the type of OpenShift / CRC environment
you are deploying into.
---
.../metrics/metrics-configuration.md | 2 +-
.../other/ansible/metrics-prerequisites.md | 8 ++++++--
.../installation/metrics/other/helm-metrics.md | 13 +++++++++----
.../metrics/postgres-operator-metrics.md | 16 +++++++++++++---
4 files changed, 29 insertions(+), 10 deletions(-)
diff --git a/docs/content/installation/metrics/metrics-configuration.md b/docs/content/installation/metrics/metrics-configuration.md
index d65cd47aef..580f8e264a 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. |
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
From ea3ce14a5e7b1940878085e24e71b328a3804b2a Mon Sep 17 00:00:00 2001
From: "Jonathan S. Katz"
Date: Mon, 5 Apr 2021 12:27:34 -0400
Subject: [PATCH 084/129] Update general descriptions
This provides some updates around the geneal description for
PGO.
---
README.md | 122 +++++++++++++++++++++++++++--------------
docs/config.toml | 2 +-
docs/content/_index.md | 69 +++++++++++++++--------
3 files changed, 128 insertions(+), 65 deletions(-)
diff --git a/README.md b/README.md
index fdd72b8cb9..0acc5d9339 100644
--- a/README.md
+++ b/README.md
@@ -1,17 +1,22 @@
-Crunchy Data PostgreSQL Operator
+PGO: The Postgres Operator from Crunchy Data
[](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,47 +127,58 @@ 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
@@ -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/)
@@ -223,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!
-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 Tutorial](https://access.crunchydata.com/documentation/postgres-operator/latest/tutorial/)
-- [PostgreSQL Operator Documentation](https://access.crunchydata.com/documentation/postgres-operator/)
+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 (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)
@@ -265,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:
@@ -276,3 +305,16 @@ 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)
diff --git a/docs/config.toml b/docs/config.toml
index 7d328e9564..9e8853f125 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"
diff --git a/docs/content/_index.md b/docs/content/_index.md
index b879f3db2a..a97ab4d1d6 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!
@@ -140,24 +156,29 @@ 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+
-
-## 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.
-- Rook
-- StorageOS
-- Google Compute Engine persistent volumes
-- NFS
-- HostPath
+## Storage
-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.
+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. Storage is a rapidly evolving field in Kubernetes and we will continue to adapt the PostgreSQL Operator to modern Kubernetes storage standards.
+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.
From bcd1d417d509c222bce47d7cb466fc9bc3e4b686 Mon Sep 17 00:00:00 2001
From: "Jonathan S. Katz"
Date: Sat, 10 Apr 2021 14:47:51 -0400
Subject: [PATCH 085/129] Updates to installation instructions and other
guidance
A periodic pass through the installation instructions and
other general updates to the documentation.
---
README.md | 2 +-
crunchy_logo.png | Bin 169205 -> 0 bytes
docs/content/_index.md | 2 +-
docs/content/installation/_index.md | 4 +-
docs/content/installation/configuration.md | 4 +-
.../metrics/other/ansible/_index.md | 8 +-
docs/content/installation/other/_index.md | 2 +-
.../installation/other/ansible/_index.md | 8 +-
docs/content/installation/other/bash.md | 76 +++++++++---------
.../other/google-cloud-marketplace.md | 26 +++---
docs/content/installation/other/helm.md | 13 +--
.../installation/other/operator-hub.md | 10 +--
docs/content/installation/pgo-client.md | 14 ++--
.../content/installation/postgres-operator.md | 20 ++---
docs/content/installation/prerequisites.md | 14 ++--
docs/content/pgo-client/_index.md | 4 +-
docs/content/quickstart/_index.md | 45 ++++++-----
docs/content/support/_index.md | 6 +-
docs/content/tutorial/_index.md | 4 +-
docs/content/tutorial/create-cluster.md | 4 +
docs/content/tutorial/getting-started.md | 14 ++--
docs/static/crunchy-logo.jpg | Bin 100361 -> 0 bytes
docs/static/pgo.png | Bin 0 -> 234696 bytes
docs/static/pgo.svg | 1 +
installers/ansible/README.md | 8 +-
installers/gcp-marketplace/README.md | 4 +-
installers/helm/Chart.yaml | 4 +-
installers/helm/README.md | 16 ++--
installers/metrics/ansible/README.md | 10 +--
installers/metrics/helm/Chart.yaml | 2 +-
installers/olm/README.md | 4 +-
31 files changed, 167 insertions(+), 162 deletions(-)
delete mode 100644 crunchy_logo.png
delete mode 100644 docs/static/crunchy-logo.jpg
create mode 100644 docs/static/pgo.png
create mode 100644 docs/static/pgo.svg
diff --git a/README.md b/README.md
index 0acc5d9339..d4faf35d54 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,6 @@
PGO: The Postgres Operator from Crunchy Data
-
+
[](https://goreportcard.com/report/github.com/CrunchyData/postgres-operator)
diff --git a/crunchy_logo.png b/crunchy_logo.png
deleted file mode 100644
index 2fbf3352c1dc55d5941d1b3faba7d687deaad4be..0000000000000000000000000000000000000000
GIT binary patch
literal 0
HcmV?d00001
literal 169205
zcmcG0gbnX7;
z<(%{V2Ornv<+3~P%rj5k&popQzEXH`oq&b_f}ra%(o#wgbj=9nKMa>|;!fZrNJi?3ic8AoG@*-XKahOw3K`HUewL^BxqP{PsL3Pu#F64`x
zoxd;xhQ*I-H(MC-?_$iZG)_%ESK~Y{9i6b+xx5rnq%$aps6U=~@)muBM)$a$Z&l#{
z3IFr66FQfK`M+OI-Xq{GT>UgLWAps)H6(WT6UP63*~NcC^uO0Wig;k>|NZfhB*psQ
z>p3z%s{g%)(n(wY-|G|q|Nl!c#1j&N1)E6t=*A=OTj==dyESZd?mE3(SC~6aoj4p%
z^ep@eOEl-3QZ?(9ynzQ^o8(Z3Z$5au6B#d?iRSg0v&6gK
z1!OIScK*DRaqkze+$iHarRM_AA!Kh{?apGmj(h0>VJg#@t{CMgI^f)$O21jhzNXQr
zZ?}2uAbAHK+xMTbclj10X#=AE-9OGn2Nj|+y0=8^G_$>ZhP`Q4rem#Z#e~c5PjcM^
zPml^+SwTYL42S(PTkXqyH<3)RE9YD!h0MUS1{KGJEcC=fCL1u)$LBvwA(Cn?Z*{$F_2Koq*TIld;;ZR+6-+`Ckd->W?Mj!N(ku`vXNp62;>$lG&B2&X
zsjG>kwIiDtYhLzdX>-Pw`jonyki)IosXjw>}o#0?!Uz#
z-K*cnq+xmk<{)*ungcHsSh5&t#26WCG$vgW)P&Q-{e|oy*9*y{udr&3S7%|5$NqTb
zi7Yn~?MsF(WEphjJ`zIVnz()R4E4=!d|*W8%`3S*_<^+^N43i&(X;fUWwUgkOle2A
zb}^@yLXwYQk8ixPY7?J7Cp7fyolN+Vw#^a6JRBr-|B=(b*CpW>jzqh?V*ivJ{D@EM
zm9Y>^d~{Ah2j>Wh
zKJa-b-IW~F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