mirror of
https://github.com/helm/charts.git
synced 2026-08-23 22:37:45 +00:00
Move mongodb-replicaset to stable and update mongo version to 3.4 (#428)
This commit is contained in:
committed by
Lachlan Evenson
parent
a8a58db3b8
commit
0a2c0dc0ee
@@ -1,6 +1,6 @@
|
||||
name: mongodb-replicaset
|
||||
home: https://github.com/mongodb/mongo
|
||||
version: 0.2.0
|
||||
version: 1.0.0
|
||||
description: NoSQL document-oriented database that stores JSON-like documents with dynamic schemas, simplifying the integration of data in content-driven applications.
|
||||
icon: https://webassets.mongodb.com/_com_assets/cms/mongodb-logo-rgb-j6w271g1xn.jpg
|
||||
sources:
|
||||
+4
-6
@@ -19,10 +19,8 @@ function join {
|
||||
}
|
||||
|
||||
HOSTNAME=$(hostname)
|
||||
# Parse out cluster name, formatted as: statefulset_name-index
|
||||
IFS='-' read -ra ADDR <<< "$(hostname)"
|
||||
CLUSTER_NAME="${ADDR[0]}"
|
||||
|
||||
# Read input from peer-finder
|
||||
while read -ra LINE; do
|
||||
if [[ "${LINE}" == *"${HOSTNAME}"* ]]; then
|
||||
MY_NAME=$LINE
|
||||
@@ -43,10 +41,10 @@ echo "Initialized." >> /work-dir/log.txt
|
||||
# try to find a master and add yourself to its replicaset.
|
||||
for f in "${PEERS[@]}"
|
||||
do
|
||||
/usr/bin/mongo --host=${f} --eval="printjson(rs.isMaster())" | grep "\"ismaster\" : true"
|
||||
/usr/bin/mongo --host="${f}" --eval="printjson(rs.isMaster())" | grep "\"ismaster\" : true"
|
||||
if [ $? -eq 0 ]; then
|
||||
echo ${f} MASTER >> /work-dir/log.txt
|
||||
/usr/bin/mongo --host=${f} --eval="printjson(rs.add('${MY_NAME}'))"
|
||||
echo "${f}" MASTER >> /work-dir/log.txt
|
||||
/usr/bin/mongo --host="${f}" --eval="printjson(rs.add('${MY_NAME}'))"
|
||||
exit 0
|
||||
fi
|
||||
done
|
||||
@@ -11,7 +11,7 @@ installImage:
|
||||
# Specs for the MongoDB image
|
||||
image:
|
||||
name: mongo
|
||||
tag: 3.2
|
||||
tag: 3.4
|
||||
pullPolicy: IfNotPresent
|
||||
|
||||
# Annotations to be added to MongoDB pods
|
||||
Reference in New Issue
Block a user