Skip to content

hypertrace/mongodb

Repository files navigation

MongoDB

This repo publishes the docker image and helm chart for MongoDB.

Prerequisites

  • Kubernetes 1.10+
  • Helm 3.0+

Docker Image

Helm Chart Components

This chart will do the following:

  • Create a standalone MongoDB instance using a StatefulSet.
  • Create a MongoDB replicaset having a primary, multiple secondary and multiple arbiter nodes using a StatefulSet.
  • Create a PodDisruptionBudget.
  • Create a Headless Service to control the domain of the MongoDB instances.
  • Create a Service configured to connect to the available MongoDB instance on the configured client port.
  • Optionally apply a Pod Anti-Affinity to spread the MongoDB cluster across nodes.
  • Optionally start an Exporter container for Prometheus.
  • Optionally create a Prometheus ServiceMonitor for exporter container.
  • Optionally add a CronJob to take daily backup of MongoDB and save it in Google Cloud Storage.
  • Optionally add prometheus alerts.

Installing the Chart

You can install the chart with the release name mongodb as below.

$ helm upgrade mongodb ./helm --install --namespace hypertrace

Configuration

You can specify each parameter using the --set key=value[,key=value] argument to helm install.

Alternatively, a YAML file that specifies the values for the parameters can be provided while installing the chart. For example,

$ helm upgrade my-release ./helm --install --namespace hypertrace -f values.yaml

Default Values

  • You can find all user-configurable settings, their defaults in values.yaml.