Skip to content
Closed
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -236,13 +236,13 @@ spec:
valueFrom:
secretKeyRef:
key: MONGODB_CLUSTER_ADMIN_USER_ESCAPED
name: internal-another-name-users
name: internal-my-cluster-name-users
optional: false
- name: MONGODB_PASSWORD
valueFrom:
secretKeyRef:
key: MONGODB_CLUSTER_ADMIN_PASSWORD_ESCAPED
name: internal-another-name-users
name: internal-my-cluster-name-users
optional: false
imagePullPolicy: IfNotPresent
name: logrotate
Expand Down
1 change: 1 addition & 0 deletions e2e-tests/init-deploy/compare/backup-80.json
Original file line number Diff line number Diff line change
Expand Up @@ -449,6 +449,7 @@
"cluster": true
},
"actions": [
"listClusterCatalog",
"allCollectionStats",
"appendOplogNote",
"bypassWriteBlockingMode",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ spec:
fieldPath: metadata.name
imagePullPolicy: IfNotPresent
name: logs
resources: { }
resources: {}
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
volumeMounts:
Expand Down Expand Up @@ -208,7 +208,7 @@ spec:
optional: false
imagePullPolicy: IfNotPresent
name: logrotate
resources: { }
resources: {}
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
volumeMounts:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ spec:
value: "true"
envFrom:
- secretRef:
name: internal-another-name-users
name: internal-my-cluster-name-users
optional: false
imagePullPolicy: Always
livenessProbe:
Expand Down Expand Up @@ -177,7 +177,7 @@ spec:
fieldPath: metadata.name
imagePullPolicy: IfNotPresent
name: logs
resources: { }
resources: {}
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
volumeMounts:
Expand All @@ -198,17 +198,17 @@ spec:
valueFrom:
secretKeyRef:
key: MONGODB_CLUSTER_ADMIN_USER_ESCAPED
name: internal-another-name-users
name: internal-my-cluster-name-users
optional: false
- name: MONGODB_PASSWORD
valueFrom:
secretKeyRef:
key: MONGODB_CLUSTER_ADMIN_PASSWORD_ESCAPED
name: internal-another-name-users
name: internal-my-cluster-name-users
optional: false
imagePullPolicy: IfNotPresent
name: logrotate
resources: { }
resources: {}
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
volumeMounts:
Expand Down Expand Up @@ -273,7 +273,7 @@ spec:
- name: users-secret-file
secret:
defaultMode: 420
secretName: internal-another-name-users
secretName: internal-my-cluster-name-users
updateStrategy:
type: OnDelete
volumeClaimTemplates:
Expand Down
2 changes: 1 addition & 1 deletion e2e-tests/monitoring-2-0/run
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ until kubectl_bin exec monitoring-0 -- bash -c "ls -l /proc/*/exe 2>/dev/null| g
echo "Retry $retry"
sleep 5
let retry+=1
if [ $retry -ge 20 ]; then
if [ $retry -ge 30 ]; then
echo "Max retry count $retry reached. Pmm-server can't start"
exit 1
fi
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,268 @@
apiVersion: apps/v1
kind: StatefulSet
metadata:
annotations: {}
generation: 1
labels:
app.kubernetes.io/component: hidden
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-hidden
ownerReferences:
- controller: true
kind: PerconaServerMongoDB
name: some-name
spec:
podManagementPolicy: OrderedReady
replicas: 2
revisionHistoryLimit: 10
selector:
matchLabels:
app.kubernetes.io/component: hidden
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: hidden
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:
affinity:
podAntiAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchLabels:
app.kubernetes.io/component: hidden
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
topologyKey: kubernetes.io/hostname
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
- --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-hidden
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: 300m
memory: 500M
requests:
cpu: 300m
memory: 500M
securityContext:
runAsNonRoot: true
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: /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_ESCAPED
name: internal-some-name-users
optional: false
- name: PBM_AGENT_MONGODB_PASSWORD
valueFrom:
secretKeyRef:
key: MONGODB_BACKUP_PASSWORD_ESCAPED
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)@localhost:$(PBM_MONGODB_PORT)/?tls=true&tlsCertificateKeyFile=/tmp/tls.pem&tlsCAFile=/etc/mongodb-ssl/ca.crt&tlsInsecure=true
- name: PBM_AGENT_TLS_ENABLED
value: "true"
imagePullPolicy: Always
name: backup-agent
resources: {}
securityContext:
runAsNonRoot: true
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: 300m
memory: 500M
requests:
cpu: 300m
memory: 500M
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
volumeMounts:
- mountPath: /data/db
name: mongod-data
- mountPath: /opt/percona
name: bin
restartPolicy: Always
schedulerName: default-scheduler
securityContext: {}
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
- 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:
type: OnDelete
volumeClaimTemplates:
- metadata:
name: mongod-data
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 3Gi
status:
phase: Pending
Loading
Loading