Skip to content

Commit a569ea6

Browse files
authored
Merge branch 'main' into dependabot/github_actions/aquasecurity/trivy-action-0.30.0
2 parents 17f375d + 02b1753 commit a569ea6

16 files changed

Lines changed: 59 additions & 18 deletions

File tree

build/crd/percona/generated/pgv2.percona.com_perconapgclusters.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13633,6 +13633,8 @@ spec:
1363313633
- Never
1363413634
- IfNotPresent
1363513635
type: string
13636+
postgresParams:
13637+
type: string
1363613638
querySource:
1363713639
default: pgstatmonitor
1363813640
enum:

build/postgres-operator/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,11 @@ RUN mkdir -p build/_output/bin \
2727
apt-get update -y && apt-get install gcc-x86-64-linux-gnu -y && export CC=x86_64-linux-gnu-gcc; \
2828
fi \
2929
&& CGO_ENABLED=$OPERATOR_CGO_ENABLED GOARCH=${TARGETARCH} GOOS=$GOOS GO_LDFLAGS=$GO_LDFLAGS \
30-
go build -ldflags "-w -s -X main.GitCommit=$GIT_COMMIT -X main.GitBranch=$GIT_BRANCH" \
30+
go build -ldflags "-w -s -X main.GitCommit=$GIT_COMMIT -X main.GitBranch=$GIT_BRANCH -X main.BuildTime=$BUILD_TIME" \
3131
-o build/_output/bin/postgres-operator \
3232
./cmd/postgres-operator \
3333
&& CGO_ENABLED=$EXTENSION_INSTALLER_CGO_ENABLED GOARCH=${TARGETARCH} GOOS=$GOOS GO_LDFLAGS=$GO_LDFLAGS \
34-
go build -ldflags "-w -s -X main.GitCommit=$GIT_COMMIT -X main.GitBranch=$GIT_BRANCH" \
34+
go build -ldflags "-w -s -X main.GitCommit=$GIT_COMMIT -X main.GitBranch=$GIT_BRANCH -X main.BuildTime=$BUILD_TIME" \
3535
-o build/_output/bin/extension-installer \
3636
./cmd/extension-installer \
3737
&& cp -r build/_output/bin/postgres-operator /usr/local/bin/postgres-operator \

cmd/postgres-operator/main.go

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import (
88
"context"
99
"fmt"
1010
"os"
11+
goruntime "runtime"
1112
"strconv"
1213
"strings"
1314
"time"
@@ -47,7 +48,12 @@ import (
4748
"github.com/percona/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1"
4849
)
4950

50-
var versionString string
51+
var (
52+
GitCommit string
53+
GitBranch string
54+
BuildTime string
55+
versionString string
56+
)
5157

5258
// assertNoError panics when err is not nil.
5359
func assertNoError(err error) {
@@ -74,6 +80,9 @@ func main() {
7480
log := logging.FromContext(ctx)
7581
log.V(1).Info("debug flag set to true")
7682

83+
log.Info("Manager starting up", "gitCommit", GitCommit, "gitBranch", GitBranch,
84+
"buildTime", BuildTime, "goVersion", goruntime.Version(), "os", goruntime.GOOS, "arch", goruntime.GOARCH)
85+
7786
features := feature.NewGate()
7887
err = features.SetFromMap(map[string]bool{
7988
string(feature.InstanceSidecars): true, // needed for PMM

config/crd/bases/pgv2.percona.com_perconapgclusters.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14038,6 +14038,8 @@ spec:
1403814038
- Never
1403914039
- IfNotPresent
1404014040
type: string
14041+
postgresParams:
14042+
type: string
1404114043
querySource:
1404214044
default: pgstatmonitor
1404314045
enum:

deploy/bundle.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14331,6 +14331,8 @@ spec:
1433114331
- Never
1433214332
- IfNotPresent
1433314333
type: string
14334+
postgresParams:
14335+
type: string
1433414336
querySource:
1433514337
default: pgstatmonitor
1433614338
enum:

deploy/cr.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -471,7 +471,8 @@ spec:
471471
# imagePullPolicy: IfNotPresent
472472
secret: cluster1-pmm-secret
473473
serverHost: monitoring-service
474-
# customClusterName: "<string>"
474+
# customClusterName: "<string>"
475+
# postgresParams: "<string>"
475476
# querySource: pgstatmonitor
476477
# patroni:
477478
# # Some values of the Liveness/Readiness probes of the patroni container are calculated using syncPeriodSeconds by the following formulas:

deploy/crd.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14331,6 +14331,8 @@ spec:
1433114331
- Never
1433214332
- IfNotPresent
1433314333
type: string
14334+
postgresParams:
14335+
type: string
1433414336
querySource:
1433514337
default: pgstatmonitor
1433614338
enum:

deploy/cw-bundle.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14331,6 +14331,8 @@ spec:
1433114331
- Never
1433214332
- IfNotPresent
1433314333
type: string
14334+
postgresParams:
14335+
type: string
1433414336
querySource:
1433514337
default: pgstatmonitor
1433614338
enum:

e2e-tests/functions

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,8 @@ get_cr() {
182182
.spec.proxy.pgBouncer.image = "'$IMAGE_PGBOUNCER'" |
183183
.spec.pmm.image = "'$IMAGE_PMM_CLIENT'" |
184184
.spec.pmm.secret = "'${cr_name}'-pmm-secret" |
185-
.spec.pmm.customClusterName = "'${cr_name}'-pmm-custom-name"
185+
.spec.pmm.customClusterName = "'${cr_name}'-pmm-custom-name" |
186+
.spec.pmm.postgresParams = "--environment=dev-postgres"
186187
' $DEPLOY_DIR/cr.yaml >$TEMP_DIR/cr.yaml
187188

188189
if [[ $OPENSHIFT ]]; then
@@ -381,7 +382,7 @@ deploy_pmm3_server() {
381382
oc create rolebinding pmm-pg-operator-namespace-only --role percona-postgresql-operator --serviceaccount=$NAMESPACE:pmm-server -n "${NAMESPACE}"
382383
oc patch role/percona-postgresql-operator --type json -p='[{"op":"add","path": "/rules/-","value":{"apiGroups":["security.openshift.io"],"resources":["securitycontextconstraints"],"verbs":["use"],"resourceNames":["privileged"]}}]' -n "$NAMESPACE"
383384
fi
384-
helm install monitoring --set imageTag=${IMAGE_PMM3_SERVER#*:} --set imageRepo=${IMAGE_PMM3_SERVER%:*} --set platform=$platform --set sa=pmm-server --set supresshttp2=false https://percona-charts.storage.googleapis.com/pmm-server-${PMM3_SERVER_VERSION}.tgz -n "$NAMESPACE"
385+
helm install monitoring --set imageTag=${IMAGE_PMM3_SERVER#*:} --set imageRepo=${IMAGE_PMM3_SERVER%:*} --set platform=$platform --set sa=pmm-server --set supresshttp2=false https://percona-charts.storage.googleapis.com/pmm-server-${PMM_SERVER_VERSION}.tgz -n "$NAMESPACE"
385386
else
386387
platform=kubernetes
387388

e2e-tests/tests/monitoring-pmm3/03-assert.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ spec:
4040
secret: monitoring-pmm3-pmm-secret
4141
serverHost: monitoring-service
4242
customClusterName: monitoring-pmm3-pmm-custom-name
43+
postgresParams: "--environment=dev-postgres"
4344
port: 5432
4445
proxy:
4546
pgBouncer:

0 commit comments

Comments
 (0)