fix(mongodb): set advertised hostname (#2560)
* test * print hostname * change probe * check * check * again * ry * check * test * try again * again * again * localhost * test * test something * one more tet * publish address * emtpy * tets
This commit is contained in:
@@ -23,7 +23,7 @@ sources:
|
|||||||
- https://github.com/bitnami/bitnami-docker-mongodb
|
- https://github.com/bitnami/bitnami-docker-mongodb
|
||||||
- https://www.mongodb.com
|
- https://www.mongodb.com
|
||||||
type: application
|
type: application
|
||||||
version: 0.1.5
|
version: 0.1.6
|
||||||
annotations:
|
annotations:
|
||||||
truecharts.org/catagories: |
|
truecharts.org/catagories: |
|
||||||
- database
|
- database
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ data:
|
|||||||
# '.script' extension is just to avoid the bitnami init script to executing it. (bitnami executes .sh and .js files automatically)
|
# '.script' extension is just to avoid the bitnami init script to executing it. (bitnami executes .sh and .js files automatically)
|
||||||
echo 'use '$MONGODB_DATABASE > /docker-entrypoint-initdb.d/createOpLogUser.script;
|
echo 'use '$MONGODB_DATABASE > /docker-entrypoint-initdb.d/createOpLogUser.script;
|
||||||
echo 'db.createUser({user: "'$MONGODB_USERNAME'-oplog", pwd: "'$MONGODB_PASSWORD'", roles: [ { role: "read", db: "local" } ]})' >> /docker-entrypoint-initdb.d/createOpLogUser.script;
|
echo 'db.createUser({user: "'$MONGODB_USERNAME'-oplog", pwd: "'$MONGODB_PASSWORD'", roles: [ { role: "read", db: "local" } ]})' >> /docker-entrypoint-initdb.d/createOpLogUser.script;
|
||||||
|
echo 'hostname()' >> /docker-entrypoint-initdb.d/createOpLogUser.script;
|
||||||
echo "Command Generated!";
|
echo "Command Generated!";
|
||||||
|
|
||||||
echo "Creating the user...";
|
echo "Creating the user...";
|
||||||
|
|||||||
@@ -26,6 +26,7 @@ controller:
|
|||||||
|
|
||||||
service:
|
service:
|
||||||
main:
|
main:
|
||||||
|
publishNotReadyAddresses: true
|
||||||
ports:
|
ports:
|
||||||
main:
|
main:
|
||||||
port: 27017
|
port: 27017
|
||||||
@@ -61,7 +62,7 @@ probes:
|
|||||||
command:
|
command:
|
||||||
- /bin/bash
|
- /bin/bash
|
||||||
- -ec
|
- -ec
|
||||||
- echo "db.runCommand(\"ping\")" | mongo --host localhost --port 27017 ${MONGODB_DATABASE} --quiet
|
- echo "rs.status().ok" | mongo --host "${MONGODB_ADVERTISED_HOSTNAME}" -u root -p ${MONGODB_ROOT_PASSWORD} --port 27017 --quiet
|
||||||
|
|
||||||
# -- Redainess probe configuration
|
# -- Redainess probe configuration
|
||||||
# @default -- See below
|
# @default -- See below
|
||||||
@@ -78,7 +79,8 @@ probes:
|
|||||||
command:
|
command:
|
||||||
- /bin/bash
|
- /bin/bash
|
||||||
- -ec
|
- -ec
|
||||||
- echo "db.runCommand(\"ping\")" | mongo --host localhost --port 27017 ${MONGODB_DATABASE} --quiet
|
- echo "rs.status().ok" | mongo --host "${MONGODB_ADVERTISED_HOSTNAME}" -u root -p ${MONGODB_ROOT_PASSWORD} --port 27017 --quiet
|
||||||
|
|
||||||
# -- Startup probe configuration
|
# -- Startup probe configuration
|
||||||
# @default -- See below
|
# @default -- See below
|
||||||
startup:
|
startup:
|
||||||
@@ -93,7 +95,7 @@ probes:
|
|||||||
command:
|
command:
|
||||||
- /bin/bash
|
- /bin/bash
|
||||||
- -ec
|
- -ec
|
||||||
- echo "db.runCommand(\"ping\")" | mongo --host localhost --port 27017 ${MONGODB_DATABASE} --quiet
|
- echo "rs.status().ok" | mongo --host "${MONGODB_ADVERTISED_HOSTNAME}" -u root -p ${MONGODB_ROOT_PASSWORD} --port 27017 --quiet
|
||||||
|
|
||||||
mongodbPassword: "testpass"
|
mongodbPassword: "testpass"
|
||||||
mongodbUsername: "test"
|
mongodbUsername: "test"
|
||||||
@@ -102,7 +104,6 @@ mongodbRootPassword: "testroot"
|
|||||||
mongodbReplicasetMode: "primary"
|
mongodbReplicasetMode: "primary"
|
||||||
mongodbReplicasetName: "rs0"
|
mongodbReplicasetName: "rs0"
|
||||||
mongodbReplicasetKey: "testreplicasetkey"
|
mongodbReplicasetKey: "testreplicasetkey"
|
||||||
mongodbAdvertisedHostname: "localhost"
|
|
||||||
existingSecret: ""
|
existingSecret: ""
|
||||||
|
|
||||||
envValueFrom:
|
envValueFrom:
|
||||||
@@ -124,5 +125,8 @@ env:
|
|||||||
MONGODB_DATABASE: "{{ .Values.mongodbDatabase }}"
|
MONGODB_DATABASE: "{{ .Values.mongodbDatabase }}"
|
||||||
MONGODB_REPLICA_SET_MODE: "{{ .Values.mongodbReplicasetMode }}"
|
MONGODB_REPLICA_SET_MODE: "{{ .Values.mongodbReplicasetMode }}"
|
||||||
MONGODB_REPLICA_SET_NAME: "{{ .Values.mongodbReplicasetName }}"
|
MONGODB_REPLICA_SET_NAME: "{{ .Values.mongodbReplicasetName }}"
|
||||||
MONGODB_ADVERTISED_HOSTNAME: "{{ .Values.mongodbAdvertisedHostname }}"
|
MONGODB_ADVERTISED_HOSTNAME: "{{ .Release.Name }}"
|
||||||
MONGODB_ADVERTISED_PORT_NUMBER: "27017"
|
MONGODB_ADVERTISED_PORT_NUMBER: 27017
|
||||||
|
MONGODB_INITIAL_PRIMARY_HOST: "{{ .Release.Name }}"
|
||||||
|
MONGODB_INITIAL_PRIMARY_PORT_NUMBER: 27017
|
||||||
|
MONGODB_ENABLE_JOURNAL: true
|
||||||
|
|||||||
Reference in New Issue
Block a user