[bitnami/mongodb-sharded] fix: 🔒 Move service-account token auto-mount to pod declaration (#22438)

Signed-off-by: Javier Salmeron Garcia <jsalmeron@vmware.com>
This commit is contained in:
Javier J. Salmerón-García
2024-01-19 10:22:46 +01:00
committed by GitHub
parent bede78afe7
commit 249eddea3f
7 changed files with 21 additions and 1 deletions

View File

@@ -35,4 +35,4 @@ maintainers:
name: mongodb-sharded
sources:
- https://github.com/bitnami/charts/tree/main/bitnami/mongodb-sharded
version: 7.3.1
version: 7.4.0

View File

@@ -152,6 +152,7 @@ The command removes all the Kubernetes components associated with the chart and
| ------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------ |
| `configsvr.replicaCount` | Number of nodes in the replica set (the first node will be primary) | `1` |
| `configsvr.resources` | Configure pod resources | `{}` |
| `configsvr.automountServiceAccountToken` | Mount Service Account token in pod | `false` |
| `configsvr.hostAliases` | Deployment pod host aliases | `[]` |
| `configsvr.mongodbExtraFlags` | MongoDB&reg; additional command line flags | `[]` |
| `configsvr.topologySpreadConstraints` | Topology Spread Constraints for pod assignment spread across your cluster among failure-domains. Evaluated as a template | `[]` |
@@ -243,6 +244,7 @@ The command removes all the Kubernetes components associated with the chart and
| ---------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | ---------------- |
| `mongos.replicaCount` | Number of replicas | `1` |
| `mongos.resources` | Configure pod resources | `{}` |
| `mongos.automountServiceAccountToken` | Mount Service Account token in pod | `false` |
| `mongos.hostAliases` | Deployment pod host aliases | `[]` |
| `mongos.mongodbExtraFlags` | MongoDB&reg; additional command line flags | `[]` |
| `mongos.topologySpreadConstraints` | Topology Spread Constraints for pod assignment spread across your cluster among failure-domains. Evaluated as a template | `[]` |
@@ -349,6 +351,7 @@ The command removes all the Kubernetes components associated with the chart and
| `shardsvr.dataNode.tolerations` | Data nodes Tolerations for pod assignment | `[]` |
| `shardsvr.dataNode.podManagementPolicy` | podManagementPolicy for the statefulset, allows parallel startup of pods | `OrderedReady` |
| `shardsvr.dataNode.updateStrategy.type` | updateStrategy for MongoDB&reg; Primary, Secondary and Arbiter statefulsets | `RollingUpdate` |
| `shardsvr.dataNode.automountServiceAccountToken` | Mount Service Account token in pod | `false` |
| `shardsvr.dataNode.hostAliases` | Deployment pod host aliases | `[]` |
| `shardsvr.dataNode.config` | Entries for the MongoDB&reg; config file | `""` |
| `shardsvr.dataNode.configCM` | ConfigMap name with MongoDB&reg; configuration (cannot be used with shardsvr.dataNode.config) | `""` |
@@ -427,6 +430,7 @@ The command removes all the Kubernetes components associated with the chart and
| Name | Description | Value |
| -------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------ | ---------------- |
| `shardsvr.arbiter.replicaCount` | Number of arbiters in each shard replica set (the first node will be primary) | `0` |
| `shardsvr.arbiter.automountServiceAccountToken` | Mount Service Account token in pod | `false` |
| `shardsvr.arbiter.hostAliases` | Deployment pod host aliases | `[]` |
| `shardsvr.arbiter.resources` | Configure pod resources | `{}` |
| `shardsvr.arbiter.mongodbExtraFlags` | MongoDB&reg; additional command line flags | `[]` |

View File

@@ -42,6 +42,7 @@ spec:
schedulerName: {{ .Values.configsvr.schedulerName | quote }}
{{- end }}
serviceAccountName: {{ include "mongodb-sharded.serviceAccountName" (dict "component" "configsvr" "value" .Values.configsvr.serviceAccount "context" $) }}
automountServiceAccountToken: {{ .Values.configsvr.automountServiceAccountToken }}
{{- if .Values.configsvr.hostAliases }}
hostAliases: {{- include "common.tplvalues.render" (dict "value" .Values.configsvr.hostAliases "context" $) | nindent 8 }}
{{- end }}

View File

@@ -46,6 +46,7 @@ spec:
schedulerName: {{ .Values.mongos.schedulerName | quote }}
{{- end }}
serviceAccountName: {{ include "mongodb-sharded.serviceAccountName" (dict "component" "mongos" "value" $.Values.mongos.serviceAccount "context" $) }}
automountServiceAccountToken: {{ .Values.mongos.automountServiceAccountToken }}
{{- if .Values.mongos.hostAliases }}
hostAliases: {{- include "common.tplvalues.render" (dict "value" .Values.mongos.hostAliases "context" $) | nindent 8 }}
{{- end }}

View File

@@ -45,6 +45,7 @@ spec:
{{- if $.Values.shardsvr.arbiter.schedulerName }}
schedulerName: {{ $.Values.shardsvr.arbiter.schedulerName | quote }}
{{- end }}
automountServiceAccountToken: {{ $.Values.shardsvr.arbiter.automountServiceAccountToken }}
{{- if $.Values.shardsvr.arbiter.hostAliases }}
hostAliases: {{- include "common.tplvalues.render" (dict "value" $.Values.shardsvr.arbiter.hostAliases "context" $) | nindent 8 }}
{{- end }}

View File

@@ -52,6 +52,7 @@ spec:
podAntiAffinity: {{- include "common.affinities.pods" (dict "type" $.Values.shardsvr.dataNode.podAntiAffinityPreset "component" "shardsvr" "customLabels" $podLabels "context" $) | nindent 10 }}
nodeAffinity: {{- include "common.affinities.nodes" (dict "type" $.Values.shardsvr.dataNode.nodeAffinityPreset.type "key" $.Values.shardsvr.dataNode.nodeAffinityPreset.key "values" $.Values.shardsvr.dataNode.nodeAffinityPreset.values) | nindent 10 }}
{{- end }}
automountServiceAccountToken: {{ $.Values.shardsvr.dataNode.automountServiceAccountToken }}
{{- if $.Values.shardsvr.dataNode.hostAliases }}
hostAliases: {{- include "common.tplvalues.render" (dict "value" $.Values.shardsvr.dataNode.hostAliases "context" $) | nindent 8 }}
{{- end }}

View File

@@ -343,6 +343,9 @@ configsvr:
## ref: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/
##
resources: {}
## @param configsvr.automountServiceAccountToken Mount Service Account token in pod
##
automountServiceAccountToken: false
## @param configsvr.hostAliases Deployment pod host aliases
## https://kubernetes.io/docs/concepts/services-networking/add-entries-to-pod-etc-hosts-with-host-aliases/
##
@@ -675,6 +678,9 @@ mongos:
## ref: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/
##
resources: {}
## @param mongos.automountServiceAccountToken Mount Service Account token in pod
##
automountServiceAccountToken: false
## @param mongos.hostAliases Deployment pod host aliases
## https://kubernetes.io/docs/concepts/services-networking/add-entries-to-pod-etc-hosts-with-host-aliases/
##
@@ -1093,6 +1099,9 @@ shardsvr:
##
updateStrategy:
type: RollingUpdate
## @param shardsvr.dataNode.automountServiceAccountToken Mount Service Account token in pod
##
automountServiceAccountToken: false
## @param shardsvr.dataNode.hostAliases Deployment pod host aliases
## https://kubernetes.io/docs/concepts/services-networking/add-entries-to-pod-etc-hosts-with-host-aliases/
##
@@ -1346,6 +1355,9 @@ shardsvr:
## @param shardsvr.arbiter.replicaCount Number of arbiters in each shard replica set (the first node will be primary)
##
replicaCount: 0
## @param shardsvr.arbiter.automountServiceAccountToken Mount Service Account token in pod
##
automountServiceAccountToken: false
## @param shardsvr.arbiter.hostAliases Deployment pod host aliases
## https://kubernetes.io/docs/concepts/services-networking/add-entries-to-pod-etc-hosts-with-host-aliases/
##