|
| 1 | +apiVersion: apps/v1 |
| 2 | +kind: StatefulSet |
| 3 | +metadata: |
| 4 | + annotations: |
| 5 | + percona.com/restore-in-progress: "true" |
| 6 | + generation: 3 |
| 7 | + labels: |
| 8 | + app.kubernetes.io/component: mongod |
| 9 | + app.kubernetes.io/instance: some-name |
| 10 | + app.kubernetes.io/managed-by: percona-server-mongodb-operator |
| 11 | + app.kubernetes.io/name: percona-server-mongodb |
| 12 | + app.kubernetes.io/part-of: percona-server-mongodb |
| 13 | + app.kubernetes.io/replset: rs0 |
| 14 | + name: some-name-rs0 |
| 15 | + ownerReferences: |
| 16 | + - controller: true |
| 17 | + kind: PerconaServerMongoDB |
| 18 | + name: some-name |
| 19 | +spec: |
| 20 | + podManagementPolicy: OrderedReady |
| 21 | + replicas: 4 |
| 22 | + revisionHistoryLimit: 10 |
| 23 | + selector: |
| 24 | + matchLabels: |
| 25 | + app.kubernetes.io/component: mongod |
| 26 | + app.kubernetes.io/instance: some-name |
| 27 | + app.kubernetes.io/managed-by: percona-server-mongodb-operator |
| 28 | + app.kubernetes.io/name: percona-server-mongodb |
| 29 | + app.kubernetes.io/part-of: percona-server-mongodb |
| 30 | + app.kubernetes.io/replset: rs0 |
| 31 | + serviceName: some-name-rs0 |
| 32 | + template: |
| 33 | + metadata: |
| 34 | + annotations: {} |
| 35 | + labels: |
| 36 | + app.kubernetes.io/component: mongod |
| 37 | + app.kubernetes.io/instance: some-name |
| 38 | + app.kubernetes.io/managed-by: percona-server-mongodb-operator |
| 39 | + app.kubernetes.io/name: percona-server-mongodb |
| 40 | + app.kubernetes.io/part-of: percona-server-mongodb |
| 41 | + app.kubernetes.io/replset: rs0 |
| 42 | + spec: |
| 43 | + containers: |
| 44 | + - args: |
| 45 | + - --bind_ip_all |
| 46 | + - --auth |
| 47 | + - --dbpath=/data/db |
| 48 | + - --port=27017 |
| 49 | + - --replSet=rs0 |
| 50 | + - --storageEngine=wiredTiger |
| 51 | + - --relaxPermChecks |
| 52 | + - --sslAllowInvalidCertificates |
| 53 | + - --clusterAuthMode=x509 |
| 54 | + - --enableEncryption |
| 55 | + - --encryptionKeyFile=/etc/mongodb-encryption/encryption-key |
| 56 | + - --wiredTigerCacheSizeGB=0.25 |
| 57 | + - --wiredTigerIndexPrefixCompression=true |
| 58 | + - --config=/etc/mongodb-config/mongod.conf |
| 59 | + command: |
| 60 | + - /opt/percona/physical-restore-ps-entry.sh |
| 61 | + env: |
| 62 | + - name: SERVICE_NAME |
| 63 | + value: some-name |
| 64 | + - name: MONGODB_PORT |
| 65 | + value: "27017" |
| 66 | + - name: MONGODB_REPLSET |
| 67 | + value: rs0 |
| 68 | + - name: PBM_AGENT_MONGODB_USERNAME |
| 69 | + valueFrom: |
| 70 | + secretKeyRef: |
| 71 | + key: MONGODB_BACKUP_USER |
| 72 | + name: some-users |
| 73 | + - name: PBM_AGENT_MONGODB_PASSWORD |
| 74 | + valueFrom: |
| 75 | + secretKeyRef: |
| 76 | + key: MONGODB_BACKUP_PASSWORD |
| 77 | + name: some-users |
| 78 | + - name: POD_NAME |
| 79 | + valueFrom: |
| 80 | + fieldRef: |
| 81 | + apiVersion: v1 |
| 82 | + fieldPath: metadata.name |
| 83 | + - name: PBM_MONGODB_URI |
| 84 | + value: mongodb://$(PBM_AGENT_MONGODB_USERNAME):$(PBM_AGENT_MONGODB_PASSWORD)@$(POD_NAME) |
| 85 | + envFrom: |
| 86 | + - secretRef: |
| 87 | + name: internal-some-name-users |
| 88 | + optional: false |
| 89 | + imagePullPolicy: Always |
| 90 | + livenessProbe: |
| 91 | + exec: |
| 92 | + command: |
| 93 | + - /opt/percona/mongodb-healthcheck |
| 94 | + - k8s |
| 95 | + - liveness |
| 96 | + - --ssl |
| 97 | + - --sslInsecure |
| 98 | + - --sslCAFile |
| 99 | + - /etc/mongodb-ssl/ca.crt |
| 100 | + - --sslPEMKeyFile |
| 101 | + - /tmp/tls.pem |
| 102 | + - --startupDelaySeconds |
| 103 | + - "7200" |
| 104 | + failureThreshold: 4 |
| 105 | + initialDelaySeconds: 60 |
| 106 | + periodSeconds: 30 |
| 107 | + successThreshold: 1 |
| 108 | + timeoutSeconds: 10 |
| 109 | + name: mongod |
| 110 | + ports: |
| 111 | + - containerPort: 27017 |
| 112 | + name: mongodb |
| 113 | + protocol: TCP |
| 114 | + readinessProbe: |
| 115 | + exec: |
| 116 | + command: |
| 117 | + - /opt/percona/mongodb-healthcheck |
| 118 | + - k8s |
| 119 | + - readiness |
| 120 | + - --component |
| 121 | + - mongod |
| 122 | + failureThreshold: 8 |
| 123 | + initialDelaySeconds: 10 |
| 124 | + periodSeconds: 3 |
| 125 | + successThreshold: 1 |
| 126 | + timeoutSeconds: 2 |
| 127 | + resources: |
| 128 | + limits: |
| 129 | + cpu: 500m |
| 130 | + memory: 1G |
| 131 | + requests: |
| 132 | + cpu: 100m |
| 133 | + memory: 100M |
| 134 | + securityContext: |
| 135 | + runAsNonRoot: true |
| 136 | + runAsUser: 1001 |
| 137 | + terminationMessagePath: /dev/termination-log |
| 138 | + terminationMessagePolicy: File |
| 139 | + volumeMounts: |
| 140 | + - mountPath: /data/db |
| 141 | + name: mongod-data |
| 142 | + - mountPath: /etc/mongodb-secrets |
| 143 | + name: some-name-mongodb-keyfile |
| 144 | + readOnly: true |
| 145 | + - mountPath: /etc/mongodb-ssl |
| 146 | + name: ssl |
| 147 | + readOnly: true |
| 148 | + - mountPath: /etc/mongodb-ssl-internal |
| 149 | + name: ssl-internal |
| 150 | + readOnly: true |
| 151 | + - mountPath: /etc/mongodb-config |
| 152 | + name: config |
| 153 | + - mountPath: /opt/percona |
| 154 | + name: bin |
| 155 | + - mountPath: /etc/mongodb-encryption |
| 156 | + name: some-name-mongodb-encryption-key |
| 157 | + readOnly: true |
| 158 | + - mountPath: /etc/users-secret |
| 159 | + name: users-secret-file |
| 160 | + - mountPath: /etc/pbm/ |
| 161 | + name: pbm-config |
| 162 | + readOnly: true |
| 163 | + workingDir: /data/db |
| 164 | + dnsPolicy: ClusterFirst |
| 165 | + initContainers: |
| 166 | + - command: |
| 167 | + - /init-entrypoint.sh |
| 168 | + imagePullPolicy: Always |
| 169 | + name: mongo-init |
| 170 | + resources: |
| 171 | + limits: |
| 172 | + cpu: 500m |
| 173 | + memory: 1G |
| 174 | + requests: |
| 175 | + cpu: 100m |
| 176 | + memory: 100M |
| 177 | + terminationMessagePath: /dev/termination-log |
| 178 | + terminationMessagePolicy: File |
| 179 | + volumeMounts: |
| 180 | + - mountPath: /data/db |
| 181 | + name: mongod-data |
| 182 | + - mountPath: /opt/percona |
| 183 | + name: bin |
| 184 | + - command: |
| 185 | + - bash |
| 186 | + - -c |
| 187 | + - install -D /usr/bin/pbm /opt/percona/pbm && install -D /usr/bin/pbm-agent /opt/percona/pbm-agent |
| 188 | + imagePullPolicy: Always |
| 189 | + name: pbm-init |
| 190 | + resources: {} |
| 191 | + terminationMessagePath: /dev/termination-log |
| 192 | + terminationMessagePolicy: File |
| 193 | + volumeMounts: |
| 194 | + - mountPath: /data/db |
| 195 | + name: mongod-data |
| 196 | + - mountPath: /opt/percona |
| 197 | + name: bin |
| 198 | + restartPolicy: Always |
| 199 | + schedulerName: default-scheduler |
| 200 | + securityContext: |
| 201 | + fsGroup: 1001 |
| 202 | + serviceAccount: default |
| 203 | + serviceAccountName: default |
| 204 | + terminationGracePeriodSeconds: 30 |
| 205 | + volumes: |
| 206 | + - name: some-name-mongodb-keyfile |
| 207 | + secret: |
| 208 | + defaultMode: 288 |
| 209 | + optional: false |
| 210 | + secretName: some-name-mongodb-keyfile |
| 211 | + - emptyDir: {} |
| 212 | + name: bin |
| 213 | + - configMap: |
| 214 | + defaultMode: 420 |
| 215 | + name: some-name-rs0-mongod |
| 216 | + optional: true |
| 217 | + name: config |
| 218 | + - name: some-name-mongodb-encryption-key |
| 219 | + secret: |
| 220 | + defaultMode: 288 |
| 221 | + optional: false |
| 222 | + secretName: some-name-mongodb-encryption-key |
| 223 | + - name: ssl |
| 224 | + secret: |
| 225 | + defaultMode: 288 |
| 226 | + optional: false |
| 227 | + secretName: some-name-ssl |
| 228 | + - name: ssl-internal |
| 229 | + secret: |
| 230 | + defaultMode: 288 |
| 231 | + optional: true |
| 232 | + secretName: some-name-ssl-internal |
| 233 | + - name: users-secret-file |
| 234 | + secret: |
| 235 | + defaultMode: 420 |
| 236 | + secretName: internal-some-name-users |
| 237 | + - name: pbm-config |
| 238 | + secret: |
| 239 | + defaultMode: 420 |
| 240 | + secretName: pbm-config |
| 241 | + updateStrategy: |
| 242 | + rollingUpdate: |
| 243 | + partition: 0 |
| 244 | + type: RollingUpdate |
| 245 | + volumeClaimTemplates: |
| 246 | + - metadata: |
| 247 | + name: mongod-data |
| 248 | + spec: |
| 249 | + accessModes: |
| 250 | + - ReadWriteOnce |
| 251 | + resources: |
| 252 | + requests: |
| 253 | + storage: 3Gi |
| 254 | + status: |
| 255 | + phase: Pending |
0 commit comments