-
Notifications
You must be signed in to change notification settings - Fork 86
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ZENKO-4527: patch mongodb charts to disable telemetry
- Loading branch information
1 parent
d073520
commit 7f323a5
Showing
5 changed files
with
88 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
diff --git a/solution-base/mongodb/charts/mongodb-sharded/templates/mongos/mongos-dep-sts.yaml b/solution-base/mongodb/charts/mongodb-sharded/templates/mongos/mongos-dep-sts.yaml | ||
index 6be3476e..0bc6f8a9 100644 | ||
--- a/solution-base/mongodb/charts/mongodb-sharded/templates/mongos/mongos-dep-sts.yaml | ||
+++ b/solution-base/mongodb/charts/mongodb-sharded/templates/mongos/mongos-dep-sts.yaml | ||
@@ -84,6 +84,9 @@ spec: | ||
runAsNonRoot: {{ .Values.securityContext.runAsNonRoot }} | ||
runAsUser: {{ .Values.securityContext.runAsUser }} | ||
{{- end }} | ||
+ command: | ||
+ - /bin/bash | ||
+ - /entrypoint/mongos-entrypoint.sh | ||
env: | ||
- name: MONGODB_ENABLE_NUMACTL | ||
value: {{ ternary "yes" "no" $.Values.common.mongodbEnableNumactl | quote }} | ||
@@ -209,6 +212,8 @@ spec: | ||
{{- end }} | ||
{{- end }} | ||
volumeMounts: | ||
+ - name: replicaset-entrypoint-configmap | ||
+ mountPath: /entrypoint | ||
{{- if .Values.usePasswordFile }} | ||
- name: secrets | ||
mountPath: /bitnami/mongodb/secrets/ | ||
@@ -299,6 +304,9 @@ spec: | ||
{{- include "common.tplvalues.render" ( dict "value" . "context" $ ) | nindent 8 }} | ||
{{- end }} | ||
volumes: | ||
+ - name: replicaset-entrypoint-configmap | ||
+ configMap: | ||
+ name: {{ include "common.names.fullname" . }}-replicaset-entrypoint | ||
{{- if .Values.usePasswordFile }} | ||
- name: secrets | ||
secret: | ||
-- | ||
2.25.1 | ||
|
31 changes: 31 additions & 0 deletions
31
solution-base/mongodb/patches/replicaset-entrypoint-configmap.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
diff --git a/solution-base/mongodb/charts/mongodb-sharded/templates/replicaset-entrypoint-configmap.yaml b/solution-base/mongodb/charts/mongodb-sharded/templates/replicaset-entrypoint-configmap.yaml | ||
index 22bdc5d7..36526df2 100644 | ||
--- a/solution-base/mongodb/charts/mongodb-sharded/templates/replicaset-entrypoint-configmap.yaml | ||
+++ b/solution-base/mongodb/charts/mongodb-sharded/templates/replicaset-entrypoint-configmap.yaml | ||
@@ -4,6 +4,16 @@ metadata: | ||
name: {{ include "common.names.fullname" . }}-replicaset-entrypoint | ||
labels: {{- include "common.labels.standard" . | nindent 4 }} | ||
data: | ||
+ mongos-entrypoint.sh: |- | ||
+ #!/bin/bash | ||
+ | ||
+ . /liblog.sh | ||
+ | ||
+ # Disable MongoSH telemetry to support offline deployments | ||
+ mongosh --nodb --eval "disableTelemetry()" | ||
+ info "MongoDB Telemetry is now disabled." | ||
+ | ||
+ exec /entrypoint.sh /run.sh | ||
replicaset-entrypoint.sh: |- | ||
#!/bin/bash | ||
|
||
@@ -29,5 +39,6 @@ data: | ||
|
||
+ # Disable MongoSH telemetry to support offline deployments | ||
+ mongosh --nodb --eval "disableTelemetry()" | ||
+ info "MongoDB Telemetry is now disabled." | ||
|
||
exec /entrypoint.sh /run.sh | ||
-- | ||
2.25.1 | ||
|