From 249eddea3fc72bb10662683fcda0f1bfb69b276e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javier=20J=2E=20Salmer=C3=B3n-Garc=C3=ADa?= Date: Fri, 19 Jan 2024 10:22:46 +0100 Subject: [PATCH] [bitnami/mongodb-sharded] fix: :lock: Move service-account token auto-mount to pod declaration (#22438) Signed-off-by: Javier Salmeron Garcia --- bitnami/mongodb-sharded/Chart.yaml | 2 +- bitnami/mongodb-sharded/README.md | 4 ++++ .../config-server/config-server-statefulset.yaml | 1 + .../templates/mongos/mongos-dep-sts.yaml | 1 + .../templates/shard/shard-arbiter-statefulset.yaml | 1 + .../templates/shard/shard-data-statefulset.yaml | 1 + bitnami/mongodb-sharded/values.yaml | 12 ++++++++++++ 7 files changed, 21 insertions(+), 1 deletion(-) diff --git a/bitnami/mongodb-sharded/Chart.yaml b/bitnami/mongodb-sharded/Chart.yaml index 42a9c8a135..7f7cee2ed9 100644 --- a/bitnami/mongodb-sharded/Chart.yaml +++ b/bitnami/mongodb-sharded/Chart.yaml @@ -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 diff --git a/bitnami/mongodb-sharded/README.md b/bitnami/mongodb-sharded/README.md index 3a58677a47..2e05e5d780 100644 --- a/bitnami/mongodb-sharded/README.md +++ b/bitnami/mongodb-sharded/README.md @@ -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® 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® 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® 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® config file | `""` | | `shardsvr.dataNode.configCM` | ConfigMap name with MongoDB® 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® additional command line flags | `[]` | diff --git a/bitnami/mongodb-sharded/templates/config-server/config-server-statefulset.yaml b/bitnami/mongodb-sharded/templates/config-server/config-server-statefulset.yaml index c5ab80c98d..2188e0bfed 100644 --- a/bitnami/mongodb-sharded/templates/config-server/config-server-statefulset.yaml +++ b/bitnami/mongodb-sharded/templates/config-server/config-server-statefulset.yaml @@ -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 }} diff --git a/bitnami/mongodb-sharded/templates/mongos/mongos-dep-sts.yaml b/bitnami/mongodb-sharded/templates/mongos/mongos-dep-sts.yaml index 4e25f8bd62..604704f8de 100644 --- a/bitnami/mongodb-sharded/templates/mongos/mongos-dep-sts.yaml +++ b/bitnami/mongodb-sharded/templates/mongos/mongos-dep-sts.yaml @@ -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 }} diff --git a/bitnami/mongodb-sharded/templates/shard/shard-arbiter-statefulset.yaml b/bitnami/mongodb-sharded/templates/shard/shard-arbiter-statefulset.yaml index 8148312769..4517cff3cd 100644 --- a/bitnami/mongodb-sharded/templates/shard/shard-arbiter-statefulset.yaml +++ b/bitnami/mongodb-sharded/templates/shard/shard-arbiter-statefulset.yaml @@ -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 }} diff --git a/bitnami/mongodb-sharded/templates/shard/shard-data-statefulset.yaml b/bitnami/mongodb-sharded/templates/shard/shard-data-statefulset.yaml index 4336fcaf80..38e856ba21 100644 --- a/bitnami/mongodb-sharded/templates/shard/shard-data-statefulset.yaml +++ b/bitnami/mongodb-sharded/templates/shard/shard-data-statefulset.yaml @@ -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 }} diff --git a/bitnami/mongodb-sharded/values.yaml b/bitnami/mongodb-sharded/values.yaml index 954a1e32c4..8139f5ba9a 100644 --- a/bitnami/mongodb-sharded/values.yaml +++ b/bitnami/mongodb-sharded/values.yaml @@ -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/ ##