@@ -67,7 +67,29 @@ clusterDomain: cluster.local
6767# # app.kubernetes.io/name: mongodb
6868# # primary: "true"
6969# #
70- extraDeploy : []
70+ extraDeploy :
71+ - apiVersion : v1
72+ kind : Service
73+ metadata :
74+ name : mongodb-primary
75+ namespace : ${namespace}
76+ labels :
77+ app.kubernetes.io/component : mongodb
78+ app.kubernetes.io/instance : mongodb
79+ app.kubernetes.io/managed-by : Helm
80+ app.kubernetes.io/name : mongodb
81+ spec :
82+ type : ClusterIP
83+ ports :
84+ - name : mongodb-primary
85+ port : 27017
86+ protocol : TCP
87+ targetPort : mongodb
88+ selector :
89+ app.kubernetes.io/component : mongodb
90+ app.kubernetes.io/instance : mongodb
91+ app.kubernetes.io/name : mongodb
92+ primary : " true"
7193# # @param commonLabels Add labels to all the deployed resources (sub-charts are not considered). Evaluated as a template
7294# #
7395commonLabels : {}
@@ -502,23 +524,23 @@ containerSecurityContext:
502524# # @param resources.limits The resources limits for MongoDB(®) containers
503525# # @param resources.requests The requested resources for MongoDB(®) containers
504526# #
505- resources :
527+ resources : {}
506528 # # Example:
507529 # # limits:
508530 # # cpu: 100m
509531 # # memory: 128Mi
510532 # #
511- limits :
512- cpu : 1000m
513- memory : 1000Mi
533+ # limits:
534+ # cpu: 1000m
535+ # memory: 1000Mi
514536 # # Examples:
515537 # # requests:
516538 # # cpu: 100m
517539 # # memory: 128Mi
518540 # #
519- requests :
520- cpu : 500m
521- memory : 500Mi
541+ # requests:
542+ # cpu: 500m
543+ # memory: 500Mi
522544# # @param containerPorts.mongodb MongoDB(®) container port
523545containerPorts :
524546 mongodb : 27017
@@ -620,7 +642,24 @@ initContainers: []
620642# # - name: DEBUG
621643# # value: "true"
622644# #
623- sidecars : []
645+ sidecars :
646+ - name : mongo-labeler
647+ image : korenlev/k8s-mongo-labeler-sidecar
648+ imagePullPolicy : Always
649+ env :
650+ - name : LABEL_SELECTOR
651+ value : " app.kubernetes.io/component=mongodb,app.kubernetes.io/instance=mongodb,app.kubernetes.io/name=mongodb"
652+ - name : NAMESPACE
653+ value : ${namespace}
654+ - name : DEBUG
655+ value : " true"
656+ resources :
657+ limits :
658+ cpu : 100m
659+ memory : 200Mi
660+ requests :
661+ cpu : 50m
662+ memory : 100Mi
624663# # @param extraVolumeMounts Optionally specify extra list of additional volumeMounts for the MongoDB(®) container(s)
625664# # Examples:
626665# # extraVolumeMounts:
@@ -996,7 +1035,7 @@ rbac:
9961035 # # that allows MongoDB(®) pods querying the K8s API
9971036 # # this needs to be set to 'true' to enable the mongo-labeler sidecar primary mongodb discovery
9981037 # #
999- create : false
1038+ create : true
10001039 # # @param rbac.rules Custom rules to create following the role specification
10011040 # # The example below needs to be uncommented to use the 'mongo-labeler' sidecar for dynamic discovery of the primary mongodb pod:
10021041 # # rules:
@@ -1010,7 +1049,16 @@ rbac:
10101049 # # - watch
10111050 # # - update
10121051 # #
1013- rules : []
1052+ rules :
1053+ - apiGroups :
1054+ - " "
1055+ resources :
1056+ - pods
1057+ verbs :
1058+ - get
1059+ - list
1060+ - watch
1061+ - update
10141062# # PodSecurityPolicy configuration
10151063# # Be sure to also set rbac.create to true, otherwise Role and RoleBinding won't be created.
10161064# # ref: https://kubernetes.io/docs/concepts/policy/pod-security-policy/
@@ -1304,23 +1352,23 @@ arbiter:
13041352 # # @param arbiter.resources.limits The resources limits for Arbiter containers
13051353 # # @param arbiter.resources.requests The requested resources for Arbiter containers
13061354 # #
1307- resources :
1355+ resources : {}
13081356 # # Example:
13091357 # # limits:
13101358 # # cpu: 100m
13111359 # # memory: 128Mi
13121360 # #
1313- limits :
1314- cpu : 200m
1315- memory : 500Mi
1361+ # limits:
1362+ # cpu: 200m
1363+ # memory: 500Mi
13161364 # # Examples:
13171365 # # requests:
13181366 # # cpu: 100m
13191367 # # memory: 128Mi
13201368 # #
1321- requests :
1322- cpu : 100m
1323- memory : 250Mi
1369+ # requests:
1370+ # cpu: 100m
1371+ # memory: 250Mi
13241372 # # @param arbiter.containerPorts.mongodb MongoDB(®) arbiter container port
13251373 # #
13261374 containerPorts :
@@ -1866,19 +1914,14 @@ metrics:
18661914 # # @param metrics.resources.limits The resources limits for Prometheus exporter containers
18671915 # # @param metrics.resources.requests The requested resources for Prometheus exporter containers
18681916 # #
1869- resources :
1870- # # Example:
1871- # # limits:
1872- # # cpu: 100m
1873- # # memory: 128Mi
1874- # #
1875- limits : {}
1876- # # Examples:
1877- # # requests:
1878- # # cpu: 100m
1879- # # memory: 128Mi
1880- # #
1881- requests : {}
1917+ resources : {}
1918+ # limits:
1919+ # cpu: 100m
1920+ # memory: 128Mi
1921+ # requests:
1922+ # cpu: 100m
1923+ # memory: 128Mi
1924+ # #
18821925 # # @param metrics.containerPort Port of the Prometheus metrics container
18831926 # #
18841927 containerPort : 9216
@@ -1929,9 +1972,9 @@ metrics:
19291972 # #
19301973 readinessProbe :
19311974 enabled : true
1932- initialDelaySeconds : 5
1975+ initialDelaySeconds : 30
19331976 periodSeconds : 5
1934- timeoutSeconds : 1
1977+ timeoutSeconds : 15
19351978 failureThreshold : 3
19361979 successThreshold : 1
19371980 # # Slow starting containers can be protected through startup probes
0 commit comments