Skip to content

Commit

Permalink
Merge branch 'main' into K8SPSMDB-1174
Browse files Browse the repository at this point in the history
  • Loading branch information
inelpandzic authored Nov 22, 2024
2 parents c15c9e7 + fab4ac0 commit 596155c
Show file tree
Hide file tree
Showing 20 changed files with 638 additions and 58 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ You can get early access to new product features, invite-only ”ask me anything

# Roadmap

We have an experimental public roadmap which can be found [here](https://github.com/percona/roadmap/projects/1). Please feel free to contribute and propose new features by following the roadmap [guidelines](https://github.com/percona/roadmap).
We have a public roadmap which can be found [here](https://github.com/orgs/percona/projects/10). Please feel free to contribute and propose new features by following the roadmap [guidelines](https://github.com/percona/roadmap).

# Submitting Bug Reports

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
switched to db myApp
{ "_id" : , "x" : 100500 }
{ "_id" : , "x" : 100501 }
bye
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
switched to db myApp
{ "_id" : , "x" : 100500 }
{ "_id" : , "x" : 100502 }
bye
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
switched to db myApp
{ "_id" : , "x" : 100500 }
bye
Original file line number Diff line number Diff line change
@@ -0,0 +1,269 @@
apiVersion: apps/v1
kind: StatefulSet
metadata:
annotations: {}
generation: 1
labels:
app.kubernetes.io/component: mongod
app.kubernetes.io/instance: some-name
app.kubernetes.io/managed-by: percona-server-mongodb-operator
app.kubernetes.io/name: percona-server-mongodb
app.kubernetes.io/part-of: percona-server-mongodb
app.kubernetes.io/replset: rs0
name: some-name-rs0
ownerReferences:
- controller: true
kind: PerconaServerMongoDB
name: some-name
spec:
podManagementPolicy: OrderedReady
replicas: 3
revisionHistoryLimit: 10
selector:
matchLabels:
app.kubernetes.io/component: mongod
app.kubernetes.io/instance: some-name
app.kubernetes.io/managed-by: percona-server-mongodb-operator
app.kubernetes.io/name: percona-server-mongodb
app.kubernetes.io/part-of: percona-server-mongodb
app.kubernetes.io/replset: rs0
serviceName: some-name-rs0
template:
metadata:
annotations: {}
labels:
app.kubernetes.io/component: mongod
app.kubernetes.io/instance: some-name
app.kubernetes.io/managed-by: percona-server-mongodb-operator
app.kubernetes.io/name: percona-server-mongodb
app.kubernetes.io/part-of: percona-server-mongodb
app.kubernetes.io/replset: rs0
spec:
containers:
- args:
- --bind_ip_all
- --auth
- --dbpath=/data/db
- --port=27017
- --replSet=rs0
- --storageEngine=wiredTiger
- --relaxPermChecks
- --sslAllowInvalidCertificates
- --clusterAuthMode=x509
- --tlsMode=preferTLS
- --enableEncryption
- --encryptionKeyFile=/etc/mongodb-encryption/encryption-key
- --wiredTigerCacheSizeGB=0.25
- --wiredTigerIndexPrefixCompression=true
- --config=/etc/mongodb-config/mongod.conf
- --quiet
command:
- /opt/percona/ps-entry.sh
env:
- name: SERVICE_NAME
value: some-name
- name: MONGODB_PORT
value: "27017"
- name: MONGODB_REPLSET
value: rs0
envFrom:
- secretRef:
name: internal-some-name-users
optional: false
imagePullPolicy: Always
livenessProbe:
exec:
command:
- /opt/percona/mongodb-healthcheck
- k8s
- liveness
- --ssl
- --sslInsecure
- --sslCAFile
- /etc/mongodb-ssl/ca.crt
- --sslPEMKeyFile
- /tmp/tls.pem
- --startupDelaySeconds
- "7200"
failureThreshold: 4
initialDelaySeconds: 60
periodSeconds: 30
successThreshold: 1
timeoutSeconds: 10
name: mongod
ports:
- containerPort: 27017
name: mongodb
protocol: TCP
readinessProbe:
exec:
command:
- /opt/percona/mongodb-healthcheck
- k8s
- readiness
- --component
- mongod
failureThreshold: 8
initialDelaySeconds: 10
periodSeconds: 3
successThreshold: 1
timeoutSeconds: 2
resources:
limits:
cpu: 500m
memory: 1G
requests:
cpu: 100m
memory: 100M
securityContext:
runAsNonRoot: true
runAsUser: 1001
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
volumeMounts:
- mountPath: /data/db
name: mongod-data
- mountPath: /etc/mongodb-secrets
name: some-name-mongodb-keyfile
readOnly: true
- mountPath: /etc/mongodb-ssl
name: ssl
readOnly: true
- mountPath: /etc/mongodb-ssl-internal
name: ssl-internal
readOnly: true
- mountPath: /etc/mongodb-config
name: config
- mountPath: /opt/percona
name: bin
- mountPath: /etc/mongodb-encryption
name: some-name-mongodb-encryption-key
readOnly: true
- mountPath: /etc/users-secret
name: users-secret-file
workingDir: /data/db
- args:
- pbm-agent-entrypoint
command:
- /opt/percona/pbm-entry.sh
env:
- name: PBM_AGENT_MONGODB_USERNAME
valueFrom:
secretKeyRef:
key: MONGODB_BACKUP_USER
name: internal-some-name-users
optional: false
- name: PBM_AGENT_MONGODB_PASSWORD
valueFrom:
secretKeyRef:
key: MONGODB_BACKUP_PASSWORD
name: internal-some-name-users
optional: false
- name: PBM_MONGODB_REPLSET
value: rs0
- name: PBM_MONGODB_PORT
value: "27017"
- name: PBM_AGENT_SIDECAR
value: "true"
- name: PBM_AGENT_SIDECAR_SLEEP
value: "5"
- name: POD_NAME
valueFrom:
fieldRef:
apiVersion: v1
fieldPath: metadata.name
- name: PBM_MONGODB_URI
value: mongodb://$(PBM_AGENT_MONGODB_USERNAME):$(PBM_AGENT_MONGODB_PASSWORD)@$(POD_NAME)
- name: PBM_AGENT_TLS_ENABLED
value: "true"
imagePullPolicy: Always
name: backup-agent
resources: {}
securityContext:
runAsNonRoot: true
runAsUser: 1001
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
volumeMounts:
- mountPath: /etc/mongodb-ssl
name: ssl
readOnly: true
- mountPath: /opt/percona
name: bin
readOnly: true
- mountPath: /data/db
name: mongod-data
dnsPolicy: ClusterFirst
initContainers:
- command:
- /init-entrypoint.sh
imagePullPolicy: Always
name: mongo-init
resources:
limits:
cpu: 500m
memory: 1G
requests:
cpu: 100m
memory: 100M
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
volumeMounts:
- mountPath: /data/db
name: mongod-data
- mountPath: /opt/percona
name: bin
restartPolicy: Always
schedulerName: default-scheduler
securityContext:
fsGroup: 1001
serviceAccount: default
serviceAccountName: default
terminationGracePeriodSeconds: 60
volumes:
- name: some-name-mongodb-keyfile
secret:
defaultMode: 288
optional: false
secretName: some-name-mongodb-keyfile
- emptyDir: {}
name: bin
- configMap:
defaultMode: 420
name: some-name-rs0-mongod
optional: true
name: config
- name: some-name-mongodb-encryption-key
secret:
defaultMode: 288
optional: false
secretName: some-name-mongodb-encryption-key
- name: ssl
secret:
defaultMode: 288
optional: false
secretName: some-name-ssl
- name: ssl-internal
secret:
defaultMode: 288
optional: true
secretName: some-name-ssl-internal
- name: users-secret-file
secret:
defaultMode: 420
secretName: internal-some-name-users
updateStrategy:
rollingUpdate:
partition: 0
type: RollingUpdate
volumeClaimTemplates:
- metadata:
name: mongod-data
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 1Gi
status:
phase: Pending
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
apiVersion: psmdb.percona.com/v1
kind: PerconaServerMongoDBBackup
metadata:
finalizers:
- percona.com/delete-backup
name: backup-aws-s3
spec:
clusterName: some-name
storageName: aws-s3
11 changes: 11 additions & 0 deletions e2e-tests/demand-backup-eks-credentials-irsa/conf/pitr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
apiVersion: psmdb.percona.com/v1
kind: PerconaServerMongoDBRestore
metadata:
name:
spec:
clusterName: some-name
backupName:
storageName: aws-s3
pitr:
type: date
date:
7 changes: 7 additions & 0 deletions e2e-tests/demand-backup-eks-credentials-irsa/conf/restore.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
apiVersion: psmdb.percona.com/v1
kind: PerconaServerMongoDBRestore
metadata:
name:
spec:
clusterName: some-name
backupName:
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Principal": {
"Federated": "arn:aws:iam::119175775298:oidc-provider/oidc.eks.eu-west-3.amazonaws.com/id/D3BF3A9D31066A3A7AB57C03F9543A3C"
},
"Action": "sts:AssumeRoleWithWebIdentity",
"Condition": {
"StringEquals": {
"oidc.eks.eu-west-3.amazonaws.com/id/D3BF3A9D31066A3A7AB57C03F9543A3C:aud": "sts.amazonaws.com"
}
}
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"s3:*"
],
"Resource": [
"arn:aws:s3:::operator-testing",
"arn:aws:s3:::operator-testing/*"
]
}
]
}
Loading

0 comments on commit 596155c

Please sign in to comment.