Skip to content

Commit 44b3f99

Browse files
authored
Merge branch 'main' into K8SPSMDB-1296-fix
2 parents 94cb066 + 1a6adeb commit 44b3f99

File tree

68 files changed

+1925
-287
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+1925
-287
lines changed

build/Dockerfile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
ARG BASE_IMAGE=ubi10
2+
13
FROM --platform=${BUILDPLATFORM} golang:1.25 AS go_builder
24
WORKDIR /go/src/github.com/percona/percona-server-mongodb-operator
35

@@ -34,7 +36,7 @@ RUN find $GOPATH/pkg/mod -regextype posix-extended -iregex '.*(license|notice)(\
3436
sh -c 'mkdir -pv /licenses/$(echo "$0" | sed -E "s/\/(license|notice).*$//gi") \
3537
&& cp -v "$0" /licenses/$(echo "$0" | sed -E "s/\/(license|notice).*$//gi")' {} \;
3638

37-
FROM registry.access.redhat.com/ubi9/ubi-minimal AS ubi9
39+
FROM registry.access.redhat.com/${BASE_IMAGE}/ubi-minimal AS ubi
3840
RUN microdnf update -y && microdnf clean all
3941

4042
LABEL name="Percona Server for MongoDB Operator" \

build/logcollector/entrypoint.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ set -e
33

44
export PATH="$PATH:/opt/fluent-bit/bin"
55

6-
LOGROTATE_SCHEDULE="${LOGROTATE_SCHEDULE:-0 0 * * *}"
6+
LOGROTATE_SCHEDULE="${LOGROTATE_SCHEDULE:-0 0 0 * * *}"
77

88
is_logrotate_config_invalid() {
99
local config_file="$1"
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
1-
/data/db/logs/*.log {
1+
/data/db/logs/mongod.full.log {
22
daily
3-
minsize 10M
43
maxsize 100M
5-
rotate 10
4+
rotate 7
65
missingok
76
nocompress
87
notifempty
8+
copytruncate
99
sharedscripts
10-
postrotate
10+
prerotate
11+
# rotate mongod.log using 'db.adminCommand({ logRotate: 1 })'
1112
mongosh "mongodb://${MONGODB_USER}:${MONGODB_PASSWORD}@${MONGODB_HOST}:${MONGODB_PORT}/admin" \
1213
--eval 'db.adminCommand({ logRotate: 1 })'
1314
find /data/db/logs/ -type f -name 'mongod.log.*' -mtime +7 -delete
14-
find /data/db/logs/ -type f -name 'mongod.full.log' -mtime +7 -delete
1515
endscript
1616
}

build/pbm-entry.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
#!/bin/bash
22

3+
if [ -d /etc/s3/certs-in ] && [ -n "$(ls -A /etc/s3/certs-in/*.crt 2>/dev/null)" ]; then
4+
cat /etc/s3/certs-in/*.crt > /etc/s3/certs/ca-bundle.crt
5+
chmod 0644 /etc/s3/certs/ca-bundle.crt
6+
fi
7+
38
if [[ -z ${PBM_AGENT_TLS_ENABLED} ]] || [[ ${PBM_AGENT_TLS_ENABLED} == "true" ]]; then
49
MONGO_SSL_DIR=/etc/mongodb-ssl
510
if [[ -e "${MONGO_SSL_DIR}/tls.crt" ]] && [[ -e "${MONGO_SSL_DIR}/tls.key" ]]; then

config/crd/bases/psmdb.percona.com_perconaservermongodbbackups.yaml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,19 @@ spec:
153153
properties:
154154
bucket:
155155
type: string
156+
caBundle:
157+
properties:
158+
key:
159+
type: string
160+
name:
161+
default: ""
162+
type: string
163+
optional:
164+
type: boolean
165+
required:
166+
- key
167+
type: object
168+
x-kubernetes-map-type: atomic
156169
credentialsSecret:
157170
type: string
158171
debugTrace:

config/crd/bases/psmdb.percona.com_perconaservermongodbrestores.yaml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,19 @@ spec:
114114
properties:
115115
bucket:
116116
type: string
117+
caBundle:
118+
properties:
119+
key:
120+
type: string
121+
name:
122+
default: ""
123+
type: string
124+
optional:
125+
type: boolean
126+
required:
127+
- key
128+
type: object
129+
x-kubernetes-map-type: atomic
117130
credentialsSecret:
118131
type: string
119132
debugTrace:

config/crd/bases/psmdb.percona.com_perconaservermongodbs.yaml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -371,6 +371,19 @@ spec:
371371
properties:
372372
bucket:
373373
type: string
374+
caBundle:
375+
properties:
376+
key:
377+
type: string
378+
name:
379+
default: ""
380+
type: string
381+
optional:
382+
type: boolean
383+
required:
384+
- key
385+
type: object
386+
x-kubernetes-map-type: atomic
374387
credentialsSecret:
375388
type: string
376389
debugTrace:

deploy/bundle.yaml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,19 @@ spec:
157157
properties:
158158
bucket:
159159
type: string
160+
caBundle:
161+
properties:
162+
key:
163+
type: string
164+
name:
165+
default: ""
166+
type: string
167+
optional:
168+
type: boolean
169+
required:
170+
- key
171+
type: object
172+
x-kubernetes-map-type: atomic
160173
credentialsSecret:
161174
type: string
162175
debugTrace:
@@ -382,6 +395,19 @@ spec:
382395
properties:
383396
bucket:
384397
type: string
398+
caBundle:
399+
properties:
400+
key:
401+
type: string
402+
name:
403+
default: ""
404+
type: string
405+
optional:
406+
type: boolean
407+
required:
408+
- key
409+
type: object
410+
x-kubernetes-map-type: atomic
385411
credentialsSecret:
386412
type: string
387413
debugTrace:
@@ -1232,6 +1258,19 @@ spec:
12321258
properties:
12331259
bucket:
12341260
type: string
1261+
caBundle:
1262+
properties:
1263+
key:
1264+
type: string
1265+
name:
1266+
default: ""
1267+
type: string
1268+
optional:
1269+
type: boolean
1270+
required:
1271+
- key
1272+
type: object
1273+
x-kubernetes-map-type: atomic
12351274
credentialsSecret:
12361275
type: string
12371276
debugTrace:

deploy/cr.yaml

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -788,7 +788,7 @@ spec:
788788
# numMaxRetries: 3
789789
# minRetryDelay: 30ms
790790
# maxRetryDelay: 5m
791-
# region: us-west-2
791+
# region: us-east-1
792792
# prefix: ""
793793
# uploadPartSize: 10485760
794794
# maxUploadParts: 10000
@@ -822,6 +822,9 @@ spec:
822822
# credentialsSecret: my-cluster-name-backup-minio
823823
# endpointUrl: minio.psmdb.svc.cluster.local:9000/minio/
824824
# insecureSkipTLSVerify: false
825+
# caBundle:
826+
# name: minio-ca-bundle
827+
# key: ca.crt
825828
# prefix: ""
826829
# secure: false
827830
# azure-blob:
@@ -927,7 +930,22 @@ spec:
927930
memory: 100M
928931
cpu: 200m
929932
# logrotate:
930-
# configuration: ""
933+
# configuration: |
934+
# /data/db/logs/mongod.full.log {
935+
# daily
936+
# maxsize 100M
937+
# rotate 7
938+
# missingok
939+
# nocompress
940+
# notifempty
941+
# copytruncate
942+
# prerotate
943+
# # rotate mongod.log using 'db.adminCommand({ logRotate: 1 })'
944+
# mongosh "mongodb://${MONGODB_USER}:${MONGODB_PASSWORD}@${MONGODB_HOST}:${MONGODB_PORT}/admin" \
945+
# --eval 'db.adminCommand({ logRotate: 1 })'
946+
# find /data/db/logs/ -type f -name 'mongod.log.*' -mtime +7 -delete
947+
# endscript
948+
# }
931949
# extraConfig:
932950
# name: logrotate-config
933-
# schedule: "0 0 * * *"
951+
# schedule: "0 0 0 * * *"

deploy/crd.yaml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,19 @@ spec:
157157
properties:
158158
bucket:
159159
type: string
160+
caBundle:
161+
properties:
162+
key:
163+
type: string
164+
name:
165+
default: ""
166+
type: string
167+
optional:
168+
type: boolean
169+
required:
170+
- key
171+
type: object
172+
x-kubernetes-map-type: atomic
160173
credentialsSecret:
161174
type: string
162175
debugTrace:
@@ -382,6 +395,19 @@ spec:
382395
properties:
383396
bucket:
384397
type: string
398+
caBundle:
399+
properties:
400+
key:
401+
type: string
402+
name:
403+
default: ""
404+
type: string
405+
optional:
406+
type: boolean
407+
required:
408+
- key
409+
type: object
410+
x-kubernetes-map-type: atomic
385411
credentialsSecret:
386412
type: string
387413
debugTrace:
@@ -1232,6 +1258,19 @@ spec:
12321258
properties:
12331259
bucket:
12341260
type: string
1261+
caBundle:
1262+
properties:
1263+
key:
1264+
type: string
1265+
name:
1266+
default: ""
1267+
type: string
1268+
optional:
1269+
type: boolean
1270+
required:
1271+
- key
1272+
type: object
1273+
x-kubernetes-map-type: atomic
12351274
credentialsSecret:
12361275
type: string
12371276
debugTrace:

0 commit comments

Comments
 (0)