Skip to content

Commit

Permalink
Changed settings so they are in a table.
Browse files Browse the repository at this point in the history
  • Loading branch information
cravall committed Apr 20, 2017
1 parent 380d9af commit 7132fb5
Showing 1 changed file with 10 additions and 31 deletions.
41 changes: 10 additions & 31 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,37 +15,16 @@ There you will also find some helper scripts to test out creating the replica se

### Settings

- KUBE_NAMESPACE
Required: NO
The namespace to look up pods in. Not setting it will search for pods in all namespaces.
- MONGO_SIDECAR_POD_LABELS
Required: YES
This should be a be a comma separated list of key values the same as the podTemplate labels. See above for example.
- MONGO_SIDECAR_SLEEP_SECONDS
Required: NO
Default: 5
This is how long to sleep between work cycles.
- MONGO_SIDECAR_UNHEALTHY_SECONDS
Required: NO
Default: 15
This is how many seconds a replica set member has to get healthy before automatically being removed from the replica set.
- MONGO_PORT
 Required: NO
 Default: 27017
 Configures the mongo port, allows the usage of non-standard ports.  
- CONFIG_SVR
 Required: NO
 Default: false
 Configures the [configsvr](https://docs.mongodb.com/manual/reference/replica-configuration/#rsconf.configsvr) variable when initializing the replicaset.
- KUBERNETES_MONGO_SERVICE_NAME
Required: NO
This should point to the MongoDB Kubernetes (headless) service that identifies all the pods. It is used for setting up the
DNS configuration for the mongo pods, instead of the default pod IPs. Works only with the StatefulSets' stable network ID.
- KUBERNETES_CLUSTER_DOMAIN
Required: NO
Default: cluster.local
This allows the specification of a custom cluster domain name. Used for the creation of a stable network ID of the k8s Mongo
pods. An example could be: "kube.local".
| Environment Variable | Required | Default | Description |
| --- | --- | --- | --- |
| KUBE_NAMESPACE | NO | | The namespace to look up pods in. Not setting it will search for pods in all namespaces. |
| MONGO_SIDECAR_POD_LABELS | YES | - | This should be a be a comma separated list of key values the same as the podTemplate labels. See above for example. |
| MONGO_SIDECAR_SLEEP_SECONDS | NO | 5 | This is how long to sleep between work cycles. |
| MONGO_SIDECAR_UNHEALTHY_SECONDS | NO | 15 | This is how many seconds a replica set member has to get healthy before automatically being removed from the replica set. |
| MONGO_PORT | NO | 27017 | Configures the mongo port, allows the usage of non-standard ports. |
| CONFIG_SVR | NO | false | Configures the [configsvr](https://docs.mongodb.com/manual/reference/replica-configuration/#rsconf.configsvr) variable when initializing the replicaset. |
| KUBERNETES_MONGO_SERVICE_NAME | NO | - | This should point to the MongoDB Kubernetes (headless) service that identifies all the pods. It is used for setting up the DNS configuration for the mongo pods, instead of the default pod IPs. Works only with the StatefulSets' stable network ID. |
| KUBERNETES_CLUSTER_DOMAIN | NO | cluster.local | This allows the specification of a custom cluster domain name. Used for the creation of a stable network ID of the k8s Mongo pods. An example could be: "kube.local". |

In its default configuration the sidecar uses the pods' IPs for the MongodDB replica names. Here is a trimmed example:
```
Expand Down

0 comments on commit 7132fb5

Please sign in to comment.