From 78a2e92626a938c3017df0b7183144011d65bb84 Mon Sep 17 00:00:00 2001 From: Felix Kunde Date: Thu, 14 Apr 2022 11:30:49 +0200 Subject: [PATCH] reflect feedback --- docs/administrator.md | 5 +++-- docs/user.md | 6 +++--- pkg/cluster/k8sres.go | 6 +++--- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/docs/administrator.md b/docs/administrator.md index eadf38edb..aa08f549e 100644 --- a/docs/administrator.md +++ b/docs/administrator.md @@ -623,8 +623,9 @@ individual backup locations for each of your clusters. Or you want to disable WAL archiving for a certain cluster by setting `WAL_S3_BUCKET`, `WAL_GS_BUCKET` or `AZURE_STORAGE_ACCOUNT` to an empty string. -The operator will give precendence to environment variables in the following -order: +The operator will give precedence to environment variables in the following +order (e.g. a variable defined in 4. overrides a variable with the same name +in 5.): 1. Assigned by the operator 2. Clone section (with WAL settings from operator config when `s3_wal_path` is empty) diff --git a/docs/user.md b/docs/user.md index dd9af564b..0fc7c35f2 100644 --- a/docs/user.md +++ b/docs/user.md @@ -786,7 +786,7 @@ metadata: If your source cluster uses a WAL location different from the global configuration you can specify the full path under `s3_wal_path`. For -[Google Cloud Plattform](administrator.md#google-cloud-platform-setup) +[Google Cloud Platform](administrator.md#google-cloud-platform-setup) or [Azure](administrator.md#azure-setup) it can only be set globally with [custom Pod environment variables](administrator.md#custom-pod-environment-variables) or locally in the Postgres manifest's [`env`](administrator.md#via-postgres-cluster-manifest) section. @@ -801,7 +801,7 @@ spec: uid: "efd12e58-5786-11e8-b5a7-06148230260c" cluster: "acid-minimal-cluster" timestamp: "2017-12-19T12:40:33+01:00" - s3_wal_path: "s3:///spilo///wal/" + s3_wal_path: "s3://custom/path/to/bucket" s3_endpoint: https://s3.acme.org s3_access_key_id: 0123456789abcdef0123456789abcdef s3_secret_access_key: 0123456789abcdef0123456789abcdef @@ -892,7 +892,7 @@ spec: gs_wal_path: "gs:///spilo///wal/" ``` -For a remote primry you specify the host address and optionally the port. +For a remote primary you specify the host address and optionally the port. If you leave out the port Patroni will use `"5432"`. ```yaml diff --git a/pkg/cluster/k8sres.go b/pkg/cluster/k8sres.go index 636e5edde..6cdf379bd 100644 --- a/pkg/cluster/k8sres.go +++ b/pkg/cluster/k8sres.go @@ -961,7 +961,7 @@ func (c *Cluster) getPodEnvironmentConfigMapVariables() ([]v1.EnvVar, error) { configMapPodEnvVarsList := make([]v1.EnvVar, 0) if c.OpConfig.PodEnvironmentConfigMap.Name == "" { - return nil, nil + return configMapPodEnvVarsList, nil } cm, err := c.KubeClient.ConfigMaps(c.OpConfig.PodEnvironmentConfigMap.Namespace).Get( @@ -993,7 +993,7 @@ func (c *Cluster) getPodEnvironmentSecretVariables() ([]v1.EnvVar, error) { secretPodEnvVarsList := make([]v1.EnvVar, 0) if c.OpConfig.PodEnvironmentSecret == "" { - return nil, nil + return secretPodEnvVarsList, nil } secret := &v1.Secret{} @@ -1298,7 +1298,7 @@ func (c *Cluster) generateStatefulSet(spec *acidv1.PostgresSpec) (*appsv1.Statef sidecarContainers, conflicts := mergeContainers(clusterSpecificSidecars, c.Config.OpConfig.SidecarContainers, globalSidecarContainersByDockerImage, scalyrSidecars) for containerName := range conflicts { - c.logger.Warningf("a sidecar is specified twice. Ignoring sidecar %q in favor of %q with high a precendence", + c.logger.Warningf("a sidecar is specified twice. Ignoring sidecar %q in favor of %q with high a precedence", containerName, containerName) }