Skip to content

Commit 6a70e70

Browse files
authored
Merge branch 'main' into dependabot/go_modules/github.com/onsi/ginkgo/v2-2.23.3
2 parents de8e291 + 3ce819f commit 6a70e70

14 files changed

Lines changed: 103 additions & 19 deletions

File tree

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13617,6 +13617,8 @@ spec:
1361713617
type: string
1361813618
type: object
1361913619
type: object
13620+
customClusterName:
13621+
type: string
1362013622
enabled:
1362113623
type: boolean
1362213624
image:
@@ -13631,6 +13633,8 @@ spec:
1363113633
- Never
1363213634
- IfNotPresent
1363313635
type: string
13636+
postgresParams:
13637+
type: string
1363413638
querySource:
1363513639
default: pgstatmonitor
1363613640
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: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14022,6 +14022,8 @@ spec:
1402214022
type: string
1402314023
type: object
1402414024
type: object
14025+
customClusterName:
14026+
type: string
1402514027
enabled:
1402614028
type: boolean
1402714029
image:
@@ -14036,6 +14038,8 @@ spec:
1403614038
- Never
1403714039
- IfNotPresent
1403814040
type: string
14041+
postgresParams:
14042+
type: string
1403914043
querySource:
1404014044
default: pgstatmonitor
1404114045
enum:

deploy/bundle.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14315,6 +14315,8 @@ spec:
1431514315
type: string
1431614316
type: object
1431714317
type: object
14318+
customClusterName:
14319+
type: string
1431814320
enabled:
1431914321
type: boolean
1432014322
image:
@@ -14329,6 +14331,8 @@ spec:
1432914331
- Never
1433014332
- IfNotPresent
1433114333
type: string
14334+
postgresParams:
14335+
type: string
1433214336
querySource:
1433314337
default: pgstatmonitor
1433414338
enum:

deploy/cr.yaml

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

deploy/crd.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14315,6 +14315,8 @@ spec:
1431514315
type: string
1431614316
type: object
1431714317
type: object
14318+
customClusterName:
14319+
type: string
1431814320
enabled:
1431914321
type: boolean
1432014322
image:
@@ -14329,6 +14331,8 @@ spec:
1432914331
- Never
1433014332
- IfNotPresent
1433114333
type: string
14334+
postgresParams:
14335+
type: string
1433214336
querySource:
1433314337
default: pgstatmonitor
1433414338
enum:

deploy/cw-bundle.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14315,6 +14315,8 @@ spec:
1431514315
type: string
1431614316
type: object
1431714317
type: object
14318+
customClusterName:
14319+
type: string
1431814320
enabled:
1431914321
type: boolean
1432014322
image:
@@ -14329,6 +14331,8 @@ spec:
1432914331
- Never
1433014332
- IfNotPresent
1433114333
type: string
14334+
postgresParams:
14335+
type: string
1433214336
querySource:
1433314337
default: pgstatmonitor
1433414338
enum:

e2e-tests/functions

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,9 @@ get_cr() {
181181
.spec.backups.pgbackrest.image = "'$IMAGE_BACKREST'" |
182182
.spec.proxy.pgBouncer.image = "'$IMAGE_PGBOUNCER'" |
183183
.spec.pmm.image = "'$IMAGE_PMM_CLIENT'" |
184-
.spec.pmm.secret = "'${cr_name}'-pmm-secret"
184+
.spec.pmm.secret = "'${cr_name}'-pmm-secret" |
185+
.spec.pmm.customClusterName = "'${cr_name}'-pmm-custom-name" |
186+
.spec.pmm.postgresParams = "--environment=dev-postgres"
185187
' $DEPLOY_DIR/cr.yaml >$TEMP_DIR/cr.yaml
186188

187189
if [[ $OPENSHIFT ]]; then
@@ -380,7 +382,7 @@ deploy_pmm3_server() {
380382
oc create rolebinding pmm-pg-operator-namespace-only --role percona-postgresql-operator --serviceaccount=$NAMESPACE:pmm-server -n "${NAMESPACE}"
381383
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"
382384
fi
383-
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"
384386
else
385387
platform=kubernetes
386388

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@ spec:
3939
enabled: true
4040
secret: monitoring-pmm3-pmm-secret
4141
serverHost: monitoring-service
42+
customClusterName: monitoring-pmm3-pmm-custom-name
43+
postgresParams: "--environment=dev-postgres"
4244
port: 5432
4345
proxy:
4446
pgBouncer:

0 commit comments

Comments
 (0)