[bitnami/mongodb-sharded] Add again removed affinity option (dataNodeLoopId) (#4934)

* [bitnami/mongodb-sharded] Add again removed affinity option (dataNodeLoopId)

* Fix typo

* Document parameter and revert changes in statefulset

* Add statefulset changes

* Update shard-data-statefulset.yaml

* [bitnami/mongodb-sharded] Update components versions

Signed-off-by: Bitnami Containers <containers@bitnami.com>

Co-authored-by: Bitnami Containers <containers@bitnami.com>
This commit is contained in:
Carlos Rodríguez Hernández
2021-01-11 14:19:58 +01:00
committed by GitHub
parent c7291dbc6e
commit 5d25492a7e
4 changed files with 14 additions and 4 deletions

View File

@@ -3,4 +3,4 @@ dependencies:
repository: https://charts.bitnami.com/bitnami
version: 1.2.3
digest: sha256:3fc1fbf3ae204e0121f1e202d6d57f9381f3a45d8821647d1dfe0a475644da0c
generated: "2021-01-11T11:14:15.007734691Z"
generated: "2021-01-11T12:09:03.695520962Z"

View File

@@ -40,7 +40,7 @@ spec:
schedulerName: {{ $.Values.common.schedulerName | quote }}
{{- end }}
{{- if $.Values.shardsvr.dataNode.affinity }}
affinity: {{- include "common.tplvalues.render" (dict "value" $.Values.shardsvr.dataNode.affinity "context" $) | nindent 8 }}
affinity: {{- include "common.tplvalues.render" (dict "value" $.Values.shardsvr.dataNode.affinity "context" (set $ "dataNodeLoopId" $i)) | nindent 8 }}
{{- else }}
affinity:
podAffinity: {{- include "common.affinities.pods" (dict "type" $.Values.shardsvr.dataNode.podAffinityPreset "component" "shardsvr" "context" $) | nindent 10 }}

View File

@@ -14,7 +14,7 @@ global: {}
image:
registry: docker.io
repository: bitnami/mongodb-sharded
tag: 4.4.3-debian-10-r20
tag: 4.4.3-debian-10-r21
## Specify a imagePullPolicy
## Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent'
## ref: http://kubernetes.io/docs/user-guide/images/#pre-pulling-images
@@ -152,6 +152,11 @@ shardsvr:
values: []
## Affinity for pod assignment
## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity
## You can set dataNodeLoopId (or any other parameter) by setting the below code block under this 'affinity' section:
## affinity:
## matchLabels:
## shard: "{{ .dataNodeLoopId }}"
##
## Note: shardsvr.dataNode.podAffinityPreset, shardsvr.dataNode.podAntiAffinityPreset, and shardsvr.dataNode.nodeAffinityPreset will be ignored when it's set
##
affinity: {}

View File

@@ -14,7 +14,7 @@ global: {}
image:
registry: docker.io
repository: bitnami/mongodb-sharded
tag: 4.4.3-debian-10-r20
tag: 4.4.3-debian-10-r21
## Specify a imagePullPolicy
## Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent'
## ref: http://kubernetes.io/docs/user-guide/images/#pre-pulling-images
@@ -132,6 +132,11 @@ shardsvr:
values: []
## Affinity for pod assignment
## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity
## You can set dataNodeLoopId (or any other parameter) by setting the below code block under this 'affinity' section:
## affinity:
## matchLabels:
## shard: "{{ .dataNodeLoopId }}"
##
## Note: shardsvr.dataNode.podAffinityPreset, shardsvr.dataNode.podAntiAffinityPreset, and shardsvr.dataNode.nodeAffinityPreset will be ignored when it's set
##
affinity: {}