Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 1 addition & 0 deletions build/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -56,5 +56,6 @@ COPY build/ps-entry.sh /ps-entry.sh
COPY build/physical-restore-ps-entry.sh /physical-restore-ps-entry.sh
COPY build/pbm-entry.sh /pbm-entry.sh
COPY build/logcollector /logcollector
COPY build/mongot-entrypoint.sh /mongot-entrypoint.sh

USER 2
2 changes: 2 additions & 0 deletions build/init-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ install -o "$(id -u)" -g "$(id -g)" -m 0755 -D /ps-entry.sh /opt/percona/ps-entr
install -o "$(id -u)" -g "$(id -g)" -m 0755 -D /physical-restore-ps-entry.sh /opt/percona/physical-restore-ps-entry.sh
install -o "$(id -u)" -g "$(id -g)" -m 0755 -D /mongodb-healthcheck /opt/percona/mongodb-healthcheck
install -o "$(id -u)" -g "$(id -g)" -m 0755 -D /pbm-entry.sh /opt/percona/pbm-entry.sh
install -o "$(id -u)" -g "$(id -g)" -m 0755 -D /mongot-entrypoint.sh /opt/percona/mongot-entrypoint.sh

cp -a /logcollector /opt/percona/
chown -R "$(id -u)":"$(id -g)" /opt/percona/logcollector
chmod -R 0755 /opt/percona/logcollector
11 changes: 11 additions & 0 deletions build/mongot-entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/bash

set -o errexit

MONGO_SSL_DIR=${MONGO_SSL_DIR:-/etc/mongodb-ssl}

if [ -f "${MONGO_SSL_DIR}/tls.key" ] && [ -f "${MONGO_SSL_DIR}/tls.crt" ]; then
cat "${MONGO_SSL_DIR}/tls.key" "${MONGO_SSL_DIR}/tls.crt" >/tmp/tls.pem
fi

exec "$@"
8,856 changes: 5,619 additions & 3,237 deletions config/crd/bases/psmdb.percona.com_perconaservermongodbs.yaml

Large diffs are not rendered by default.

8,856 changes: 5,619 additions & 3,237 deletions deploy/bundle.yaml

Large diffs are not rendered by default.

25 changes: 25 additions & 0 deletions deploy/cr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -478,6 +478,18 @@ spec:
# envFrom:
# - configMapRef:
# name: configmap-name
# search:
# resources:
# requests:
# cpu: "8"
# memory: 32Gi
# storage:
# persistentVolumeClaim:
# resources:
# requests:
# storage: 200Gi
# affinity:
# antiAffinityTopologyKey: "kubernetes.io/hostname"
sharding:
enabled: true
# balancer:
Expand Down Expand Up @@ -970,3 +982,16 @@ spec:
# extraConfig:
# name: logrotate-config
# schedule: "0 0 * * *"
# search:
# enabled: true
# image: percona/percona-server-mongodb-search:<tag>
# size: 1
# storage:
# persistentVolumeClaim:
# resources:
# requests:
# storage: 10Gi
# resources:
# requests:
# cpu: "2"
# memory: 2Gi
8,856 changes: 5,619 additions & 3,237 deletions deploy/crd.yaml

Large diffs are not rendered by default.

8,856 changes: 5,619 additions & 3,237 deletions deploy/cw-bundle.yaml

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -158,8 +158,6 @@ spec:
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
volumeMounts:
- mountPath: /data/db
name: mongod-data
- mountPath: /opt/percona
name: bin
restartPolicy: Always
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -164,8 +164,6 @@ spec:
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
volumeMounts:
- mountPath: /data/db
name: mongod-data
- mountPath: /opt/percona
name: bin
restartPolicy: Always
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -165,8 +165,6 @@ spec:
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
volumeMounts:
- mountPath: /data/db
name: mongod-data
- mountPath: /opt/percona
name: bin
restartPolicy: Always
Expand Down
8 changes: 4 additions & 4 deletions e2e-tests/balancer/run
Original file line number Diff line number Diff line change
Expand Up @@ -63,27 +63,27 @@ write_data() {
local cluster=$1

log 'create user'
run_mongos \
run_mongosh_mongos \
'db.createUser({user:"user",pwd:"pass",roles:[{db:"app",role:"readWrite"}]})' \
"userAdmin:userAdmin123456@$cluster-mongos.$namespace" \
"mongodb" ".svc.cluster.local" "--quiet" "27017" "mongosh"
sleep 2

log 'enable sharding'
run_mongos \
run_mongosh_mongos \
'sh.enableSharding("app")' \
"clusterAdmin:clusterAdmin123456@$cluster-mongos.$namespace" \
"mongodb" ".svc.cluster.local" "--quiet" "27017" "mongosh"
sleep 2

log 'shard collection'
run_mongos \
run_mongosh_mongos \
'sh.shardCollection("app.city", { _id: 1 } )' \
"clusterAdmin:clusterAdmin123456@$cluster-mongos.$namespace" \
"mongodb" ".svc.cluster.local" "--quiet" "27017" "mongosh"

log 'write data (this can take some time, be patient)'
run_script_mongos "${test_dir}/data.js" "user:pass@$cluster-mongos.$namespace" \
run_script_mongosh_mongos "${test_dir}/data.js" "user:pass@$cluster-mongos.$namespace" \
"mongodb" ".svc.cluster.local" "--quiet" "mongosh"

}
Expand Down
6 changes: 3 additions & 3 deletions e2e-tests/conf/client-70.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: psmdb-client
name: psmdb-client-mongosh
spec:
replicas: 1
selector:
matchLabels:
name: psmdb-client
name: psmdb-client-mongosh
template:
metadata:
labels:
name: psmdb-client
name: psmdb-client-mongosh
spec:
terminationGracePeriodSeconds: 10
containers:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -162,8 +162,6 @@ spec:
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
volumeMounts:
- mountPath: /data/db
name: mongod-data
- mountPath: /opt/percona
name: bin
restartPolicy: Always
Expand Down
2 changes: 0 additions & 2 deletions e2e-tests/custom-tls/compare/statefulset_some-name-cfg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -163,8 +163,6 @@ spec:
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
volumeMounts:
- mountPath: /data/db
name: mongod-data
- mountPath: /opt/percona
name: bin
restartPolicy: Always
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,8 +149,6 @@ spec:
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
volumeMounts:
- mountPath: /data/db
name: mongod-data
- mountPath: /opt/percona
name: bin
restartPolicy: Always
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,6 @@ spec:
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
volumeMounts:
- mountPath: /data/db
name: mongod-data
- mountPath: /opt/percona
name: bin
restartPolicy: Always
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -163,8 +163,6 @@ spec:
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
volumeMounts:
- mountPath: /data/db
name: mongod-data
- mountPath: /opt/percona
name: bin
restartPolicy: Always
Expand Down
2 changes: 0 additions & 2 deletions e2e-tests/custom-tls/compare/statefulset_some-name-rs0.yml
Original file line number Diff line number Diff line change
Expand Up @@ -164,8 +164,6 @@ spec:
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
volumeMounts:
- mountPath: /data/db
name: mongod-data
- mountPath: /opt/percona
name: bin
restartPolicy: Always
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -172,8 +172,6 @@ spec:
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
volumeMounts:
- mountPath: /data/db
name: mongod-data
- mountPath: /opt/percona
name: bin
restartPolicy: Always
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -172,8 +172,6 @@ spec:
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
volumeMounts:
- mountPath: /data/db
name: mongod-data
- mountPath: /opt/percona
name: bin
restartPolicy: Always
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -173,8 +173,6 @@ spec:
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
volumeMounts:
- mountPath: /data/db
name: mongod-data
- mountPath: /opt/percona
name: bin
restartPolicy: Always
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -162,8 +162,6 @@ spec:
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
volumeMounts:
- mountPath: /data/db
name: mongod-data
- mountPath: /opt/percona
name: bin
restartPolicy: Always
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -162,8 +162,6 @@ spec:
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
volumeMounts:
- mountPath: /data/db
name: mongod-data
- mountPath: /opt/percona
name: bin
restartPolicy: Always
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -163,8 +163,6 @@ spec:
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
volumeMounts:
- mountPath: /data/db
name: mongod-data
- mountPath: /opt/percona
name: bin
restartPolicy: Always
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -176,8 +176,6 @@ spec:
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
volumeMounts:
- mountPath: /data/db
name: mongod-data
- mountPath: /opt/percona
name: bin
restartPolicy: Always
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -176,8 +176,6 @@ spec:
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
volumeMounts:
- mountPath: /data/db
name: mongod-data
- mountPath: /opt/percona
name: bin
restartPolicy: Always
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -177,8 +177,6 @@ spec:
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
volumeMounts:
- mountPath: /data/db
name: mongod-data
- mountPath: /opt/percona
name: bin
restartPolicy: Always
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -203,8 +203,6 @@ spec:
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
volumeMounts:
- mountPath: /data/db
name: mongod-data
- mountPath: /opt/percona
name: bin
restartPolicy: Always
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -205,8 +205,6 @@ spec:
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
volumeMounts:
- mountPath: /data/db
name: mongod-data
- mountPath: /opt/percona
name: bin
restartPolicy: Always
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -216,8 +216,6 @@ spec:
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
volumeMounts:
- mountPath: /data/db
name: mongod-data
- mountPath: /opt/percona
name: bin
restartPolicy: Always
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -218,8 +218,6 @@ spec:
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
volumeMounts:
- mountPath: /data/db
name: mongod-data
- mountPath: /opt/percona
name: bin
restartPolicy: Always
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -162,8 +162,6 @@ spec:
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
volumeMounts:
- mountPath: /data/db
name: mongod-data
- mountPath: /opt/percona
name: bin
restartPolicy: Always
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -163,8 +163,6 @@ spec:
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
volumeMounts:
- mountPath: /data/db
name: mongod-data
- mountPath: /opt/percona
name: bin
restartPolicy: Always
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -162,8 +162,6 @@ spec:
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
volumeMounts:
- mountPath: /data/db
name: mongod-data
- mountPath: /opt/percona
name: bin
restartPolicy: Always
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -163,8 +163,6 @@ spec:
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
volumeMounts:
- mountPath: /data/db
name: mongod-data
- mountPath: /opt/percona
name: bin
restartPolicy: Always
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -281,8 +281,6 @@ spec:
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
volumeMounts:
- mountPath: /data/db
name: mongod-data
- mountPath: /opt/percona
name: bin
restartPolicy: Always
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -283,8 +283,6 @@ spec:
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
volumeMounts:
- mountPath: /data/db
name: mongod-data
- mountPath: /opt/percona
name: bin
restartPolicy: Always
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -281,8 +281,6 @@ spec:
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
volumeMounts:
- mountPath: /data/db
name: mongod-data
- mountPath: /opt/percona
name: bin
restartPolicy: Always
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -283,8 +283,6 @@ spec:
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
volumeMounts:
- mountPath: /data/db
name: mongod-data
- mountPath: /opt/percona
name: bin
restartPolicy: Always
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -217,8 +217,6 @@ spec:
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
volumeMounts:
- mountPath: /data/db
name: mongod-data
- mountPath: /opt/percona
name: bin
restartPolicy: Always
Expand Down
Loading
Loading