/
replica-set-podspec.yaml
84 lines (74 loc) · 2.41 KB
/
replica-set-podspec.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
---
apiVersion: mongodb.com/v1
kind: MongoDB
metadata:
name: my-replica-set
spec:
members: 3
version: 4.0.0-ent
service: my-service
# Indicates featureCompatibilityVersion. This attribute will make the data
# format to persist in a particular version, maybe older, allowing for
# future downgrades if necessary.
featureCompatibilityVersion: "4.0"
# Please Note: The default Kubernetes cluster domain is `cluster.local`.
# If your cluster has been configured with another domain, you can specify it
# with the `clusterDomain` attribute.
# clusterDomain: mycompany.net
opsManager:
configMapRef:
name: my-project
credentials: my-credentials
type: ReplicaSet
# log level affects the level of logging for the agent. Use DEBUG cautiously
# as log file size may grow very quickly.
logLevel: WARN
persistent: true
podSpec:
# `podTemplate.spec.containers[].resources` should be specified otherwise, WiredTiger
# cache won't be calculated properly by MongoDB daemon.
podTemplate:
spec:
containers:
- name: mongodb-enterprise-database
# For more information about Pod and container resource management, see:
# https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
resources:
limits:
cpu: "0.25"
memory: 512M
# "multiple" persistence allows to mount different directories to different
# Persistent Volumes.
persistence:
multiple:
data:
storage: 10Gi
journal:
storage: 1Gi
labelSelector:
matchLabels:
app: "my-app"
logs:
storage: 500M
storageClass: standard
# For podAffinity and nodeAffinity see Kubernetes Docs
# https://kubernetes.io/docs/concepts/configuration/assign-pod-node/
podAntiAffinityTopologyKey: nodeId
podAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchExpressions:
- key: security
operator: In
values:
- S1
topologyKey: failure-domain.beta.kubernetes.io/zone
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: kubernetes.io/e2e-az-name
operator: In
values:
- e2e-az1
- e2e-az2