|
| 1 | +apiVersion: apps/v1 |
| 2 | +kind: StatefulSet |
| 3 | +metadata: |
| 4 | + annotations: {} |
| 5 | + generation: 2 |
| 6 | + labels: |
| 7 | + app.kubernetes.io/component: mongos |
| 8 | + app.kubernetes.io/instance: some-name |
| 9 | + app.kubernetes.io/managed-by: percona-server-mongodb-operator |
| 10 | + app.kubernetes.io/name: percona-server-mongodb |
| 11 | + app.kubernetes.io/part-of: percona-server-mongodb |
| 12 | + name: some-name-mongos |
| 13 | + ownerReferences: |
| 14 | + - controller: true |
| 15 | + kind: PerconaServerMongoDB |
| 16 | + name: some-name |
| 17 | +spec: |
| 18 | + podManagementPolicy: OrderedReady |
| 19 | + replicas: 3 |
| 20 | + revisionHistoryLimit: 10 |
| 21 | + selector: |
| 22 | + matchLabels: |
| 23 | + app.kubernetes.io/component: mongos |
| 24 | + app.kubernetes.io/instance: some-name |
| 25 | + app.kubernetes.io/managed-by: percona-server-mongodb-operator |
| 26 | + app.kubernetes.io/name: percona-server-mongodb |
| 27 | + app.kubernetes.io/part-of: percona-server-mongodb |
| 28 | + serviceName: "" |
| 29 | + template: |
| 30 | + metadata: |
| 31 | + annotations: {} |
| 32 | + labels: |
| 33 | + app.kubernetes.io/component: mongos |
| 34 | + app.kubernetes.io/instance: some-name |
| 35 | + app.kubernetes.io/managed-by: percona-server-mongodb-operator |
| 36 | + app.kubernetes.io/name: percona-server-mongodb |
| 37 | + app.kubernetes.io/part-of: percona-server-mongodb |
| 38 | + spec: |
| 39 | + affinity: |
| 40 | + podAntiAffinity: |
| 41 | + requiredDuringSchedulingIgnoredDuringExecution: |
| 42 | + - labelSelector: |
| 43 | + matchLabels: |
| 44 | + app.kubernetes.io/component: mongos |
| 45 | + app.kubernetes.io/instance: some-name |
| 46 | + app.kubernetes.io/managed-by: percona-server-mongodb-operator |
| 47 | + app.kubernetes.io/name: percona-server-mongodb |
| 48 | + app.kubernetes.io/part-of: percona-server-mongodb |
| 49 | + topologyKey: kubernetes.io/hostname |
| 50 | + containers: |
| 51 | + - args: |
| 52 | + - mongos |
| 53 | + - --bind_ip_all |
| 54 | + - --port=27017 |
| 55 | + - --sslAllowInvalidCertificates |
| 56 | + - --configdb |
| 57 | + - cfg/some-name-cfg-0.some-name-cfg.NAME_SPACE.svc.cluster.local:27017,some-name-cfg-1.some-name-cfg.NAME_SPACE.svc.cluster.local:27017,some-name-cfg-2.some-name-cfg.NAME_SPACE.svc.cluster.local:27017 |
| 58 | + - --relaxPermChecks |
| 59 | + - --clusterAuthMode=x509 |
| 60 | + - --config=/etc/mongos-config/mongos.conf |
| 61 | + command: |
| 62 | + - /opt/percona/ps-entry.sh |
| 63 | + env: |
| 64 | + - name: MONGODB_PORT |
| 65 | + value: "27017" |
| 66 | + envFrom: |
| 67 | + - secretRef: |
| 68 | + name: some-users |
| 69 | + optional: false |
| 70 | + - secretRef: |
| 71 | + name: internal-some-name-users |
| 72 | + optional: false |
| 73 | + imagePullPolicy: Always |
| 74 | + livenessProbe: |
| 75 | + exec: |
| 76 | + command: |
| 77 | + - /opt/percona/mongodb-healthcheck |
| 78 | + - k8s |
| 79 | + - liveness |
| 80 | + - --component |
| 81 | + - mongos |
| 82 | + - --ssl |
| 83 | + - --sslInsecure |
| 84 | + - --sslCAFile |
| 85 | + - /etc/mongodb-ssl/ca.crt |
| 86 | + - --sslPEMKeyFile |
| 87 | + - /tmp/tls.pem |
| 88 | + - --startupDelaySeconds |
| 89 | + - "10" |
| 90 | + failureThreshold: 4 |
| 91 | + initialDelaySeconds: 60 |
| 92 | + periodSeconds: 30 |
| 93 | + successThreshold: 1 |
| 94 | + timeoutSeconds: 10 |
| 95 | + name: mongos |
| 96 | + ports: |
| 97 | + - containerPort: 27017 |
| 98 | + name: mongos |
| 99 | + protocol: TCP |
| 100 | + readinessProbe: |
| 101 | + exec: |
| 102 | + command: |
| 103 | + - /opt/percona/mongodb-healthcheck |
| 104 | + - k8s |
| 105 | + - readiness |
| 106 | + - --component |
| 107 | + - mongos |
| 108 | + - --ssl |
| 109 | + - --sslInsecure |
| 110 | + - --sslCAFile |
| 111 | + - /etc/mongodb-ssl/ca.crt |
| 112 | + - --sslPEMKeyFile |
| 113 | + - /tmp/tls.pem |
| 114 | + failureThreshold: 3 |
| 115 | + initialDelaySeconds: 10 |
| 116 | + periodSeconds: 1 |
| 117 | + successThreshold: 1 |
| 118 | + timeoutSeconds: 1 |
| 119 | + resources: {} |
| 120 | + securityContext: |
| 121 | + runAsNonRoot: true |
| 122 | + terminationMessagePath: /dev/termination-log |
| 123 | + terminationMessagePolicy: File |
| 124 | + volumeMounts: |
| 125 | + - mountPath: /data/db |
| 126 | + name: mongod-data |
| 127 | + - mountPath: /etc/mongodb-secrets |
| 128 | + name: some-name-mongodb-keyfile |
| 129 | + readOnly: true |
| 130 | + - mountPath: /etc/mongodb-ssl |
| 131 | + name: ssl |
| 132 | + readOnly: true |
| 133 | + - mountPath: /etc/mongodb-ssl-internal |
| 134 | + name: ssl-internal |
| 135 | + readOnly: true |
| 136 | + - mountPath: /etc/mongos-config |
| 137 | + name: config |
| 138 | + - mountPath: /etc/users-secret |
| 139 | + name: users-secret-file |
| 140 | + readOnly: true |
| 141 | + - mountPath: /opt/percona |
| 142 | + name: bin |
| 143 | + workingDir: /data/db |
| 144 | + - args: |
| 145 | + - -c |
| 146 | + - while true; do echo echo $(date -u) 'test' >> /dev/null; sleep 5;done |
| 147 | + command: |
| 148 | + - /bin/sh |
| 149 | + imagePullPolicy: Always |
| 150 | + name: mongos-sidecar-1 |
| 151 | + resources: {} |
| 152 | + terminationMessagePath: /dev/termination-log |
| 153 | + terminationMessagePolicy: File |
| 154 | + dnsPolicy: ClusterFirst |
| 155 | + initContainers: |
| 156 | + - command: |
| 157 | + - /init-entrypoint.sh |
| 158 | + imagePullPolicy: Always |
| 159 | + name: mongo-init |
| 160 | + resources: {} |
| 161 | + terminationMessagePath: /dev/termination-log |
| 162 | + terminationMessagePolicy: File |
| 163 | + volumeMounts: |
| 164 | + - mountPath: /data/db |
| 165 | + name: mongod-data |
| 166 | + - mountPath: /opt/percona |
| 167 | + name: bin |
| 168 | + restartPolicy: Always |
| 169 | + runtimeClassName: container-rc |
| 170 | + schedulerName: default-scheduler |
| 171 | + securityContext: {} |
| 172 | + terminationGracePeriodSeconds: 30 |
| 173 | + volumes: |
| 174 | + - name: some-name-mongodb-keyfile |
| 175 | + secret: |
| 176 | + defaultMode: 288 |
| 177 | + optional: false |
| 178 | + secretName: some-name-mongodb-keyfile |
| 179 | + - name: ssl |
| 180 | + secret: |
| 181 | + defaultMode: 288 |
| 182 | + optional: false |
| 183 | + secretName: some-name-ssl |
| 184 | + - name: ssl-internal |
| 185 | + secret: |
| 186 | + defaultMode: 288 |
| 187 | + optional: true |
| 188 | + secretName: some-name-ssl-internal |
| 189 | + - emptyDir: {} |
| 190 | + name: mongod-data |
| 191 | + - name: users-secret-file |
| 192 | + secret: |
| 193 | + defaultMode: 420 |
| 194 | + secretName: internal-some-name-users |
| 195 | + - name: config |
| 196 | + secret: |
| 197 | + defaultMode: 420 |
| 198 | + optional: true |
| 199 | + secretName: some-name-mongos |
| 200 | + - emptyDir: {} |
| 201 | + name: bin |
| 202 | + updateStrategy: |
| 203 | + rollingUpdate: |
| 204 | + partition: 0 |
| 205 | + type: RollingUpdate |
0 commit comments