This repository was archived by the owner on Sep 18, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +11
-5
lines changed
Expand file tree Collapse file tree 2 files changed +11
-5
lines changed Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ type: application
2424# This is the chart version. This version number should be incremented each time you make changes
2525# to the chart and its templates, including the app version.
2626# Versions are expected to follow Semantic Versioning (https://semver.org/)
27- version : 1.3.0
27+ version : 1.3.1
2828
2929# This is the version number of the application being deployed. This version number should be
3030# incremented each time you make changes to the application. Versions are not expected to
Original file line number Diff line number Diff line change 33{{- $fullname := include "library-chart.fullname" . }}
44{{- $user := .Values.mongodb.auth.username }}
55{{- $password := .Values.mongodb.auth.password }}
6+ {{- $rootPassword := .Values.mongodb.auth.rootPassword }}
67{{- $db := .Values.mongodb.auth.database }}
78{{- $pvcList := list }}
89{{- $mongoList := list }}
1112{{- $mongoList = append $mongoList (printf "%s-%d.%s-headless:%d" $fullname $i $fullname $portNumber) }}
1213{{- end }}
1314- the connection string is :
14- ```
15- **mongodb://{{ $user }}:{{ $password }}@{{ (include "mongoList" .)}}/{{ $db }}**
16- ```
15+
16+ **`mongodb://{{ $user }}:{{ $password }}@{{ (include "mongoList" .)}}/{{ $db }}?authSource{{ $db }}`**
1717- example for python :
1818
1919```
2020from pymongo import MongoClient
21- client = MongoClient('mongodb://{{ $user }}:{{ $password }}@{{ (include "mongoList" .) }}/{{ $db }}')
21+ client = MongoClient('mongodb://{{ $user }}:{{ $password }}@{{ (include "mongoList" .) }}/{{ $db }}?authSource{{ $db }} ')
2222db=client.{{ $db }}
2323```
24+ - example for mongosh :
25+
26+ * as user in {{ $db }}
27+ `mongo -u {{ $user }} -p {{ $password }} --authenticationDatabase {{ $db }}`
28+ * as root
29+ `mongo -u root -p {{ $rootPassword }}`
2430
2531*NOTES about deletion :*
2632
You can’t perform that action at this time.
0 commit comments