mirror of
https://github.com/bitnami/charts.git
synced 2026-03-07 16:17:21 +08:00
charts: add mongodb chart
This commit is contained in:
10
mongodb/Chart.yaml
Normal file
10
mongodb/Chart.yaml
Normal file
@@ -0,0 +1,10 @@
|
||||
name: mongodb
|
||||
home: https://mongodb.org
|
||||
source:
|
||||
- https://github.com/bitnami/bitnami-docker-mongodb
|
||||
version: 0.1.0
|
||||
description: Chart for MongoDB
|
||||
maintainers:
|
||||
- Bitnami <containers@bitnami.com>
|
||||
details: |-
|
||||
MongoDB is a cross-platform document-oriented database. Classified as a NoSQL database, MongoDB eschews the traditional table-based relational database structure in favor of JSON-like documents with dynamic schemas, making the integration of data in certain types of applications easier and faster.
|
||||
37
mongodb/README.md
Normal file
37
mongodb/README.md
Normal file
@@ -0,0 +1,37 @@
|
||||
# MongoDB
|
||||
|
||||
> MongoDB is a cross-platform document-oriented database. Classified as a NoSQL database, MongoDB eschews the traditional table-based relational database structure in favor of JSON-like documents with dynamic schemas, making the integration of data in certain types of applications easier and faster.
|
||||
|
||||
Based on the [Bitnami MongoDB](https://github.com/bitnami/bitnami-docker-mongodb) image for docker, this Chart bootstraps a [MongoDB](https://mongodb.com/) deployment on a [Kubernetes](http://kubernetes.io) cluster using [Helm](https://helm.sh).
|
||||
|
||||
## Persistence
|
||||
|
||||
For persistence of the MongoDB data, mount a [storage volume](http://kubernetes.io/docs/user-guide/volumes/) at the `/bitnami/mongodb/data` path of the MongoDB pod.
|
||||
|
||||
By default the MongoDB Chart mounts an [emptyDir](http://kubernetes.io/docs/user-guide/volumes/#emptydir) volume.
|
||||
|
||||
## Configuration
|
||||
|
||||
To edit the default MongoDB configuration, run
|
||||
|
||||
```bash
|
||||
$ helm edit mongodb
|
||||
```
|
||||
|
||||
Configurable parameters can be specified in `tpl/values.toml`. If not specified default values as defined by the [Bitnami MongoDB](https://github.com/bitnami/bitnami-docker-mongodb) image are used.
|
||||
|
||||
> Tip: If you have issues running the above command, add `se autochdir` to your `~/.vimrc` profile or simply edit `~/.helm/workspace/charts/mongodb/tpl/values.toml` in your favourite editor.
|
||||
|
||||
Finally, generate the chart to apply your changes to the configuration.
|
||||
|
||||
```bash
|
||||
$ helm generate mongodb
|
||||
```
|
||||
|
||||
## Cleanup
|
||||
|
||||
To delete the MongoDB deployment completely:
|
||||
|
||||
```bash
|
||||
$ helm uninstall -n default mongodb
|
||||
```
|
||||
14
mongodb/manifests/mongodb-svc.yaml
Normal file
14
mongodb/manifests/mongodb-svc.yaml
Normal file
@@ -0,0 +1,14 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: mongodb
|
||||
labels:
|
||||
provider: mongodb
|
||||
heritage: bitnami
|
||||
spec:
|
||||
ports:
|
||||
- name: mongodb
|
||||
port: 27017
|
||||
targetPort: mongodb
|
||||
selector:
|
||||
provider: mongodb
|
||||
61
mongodb/tpl/mongodb-rc.yaml
Normal file
61
mongodb/tpl/mongodb-rc.yaml
Normal file
@@ -0,0 +1,61 @@
|
||||
#helm:generate helm tpl -d tpl/values.toml -o manifests/mongodb-rc.yaml $HELM_GENERATE_FILE
|
||||
apiVersion: v1
|
||||
kind: ReplicationController
|
||||
metadata:
|
||||
name: mongodb
|
||||
labels:
|
||||
provider: mongodb
|
||||
heritage: bitnami
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
provider: mongodb
|
||||
version: 3.0.7-1-r02
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
provider: mongodb
|
||||
version: 3.0.7-1-r02
|
||||
heritage: bitnami
|
||||
spec:
|
||||
containers:
|
||||
- name: mongodb
|
||||
image: bitnami/mongodb:3.0.7-1-r02
|
||||
env:
|
||||
- name: MONGODB_USER
|
||||
value: "{{.mongodbUser}}"
|
||||
- name: MONGODB_PASSWORD
|
||||
value: "{{.mongodbPassword}}"
|
||||
- name: MONGODB_DATABASE
|
||||
value: "{{.mongodbDatabase}}"
|
||||
ports:
|
||||
- name: mongodb
|
||||
containerPort: 27017
|
||||
livenessProbe:
|
||||
exec:
|
||||
command:
|
||||
- mongo
|
||||
- ping
|
||||
initialDelaySeconds: 30
|
||||
timeoutSeconds: 5
|
||||
readinessProbe:
|
||||
exec:
|
||||
command:
|
||||
- mongo
|
||||
- ping
|
||||
initialDelaySeconds: 5
|
||||
timeoutSeconds: 1
|
||||
volumeMounts:
|
||||
- name: data
|
||||
mountPath: /bitnami/mongodb/data
|
||||
- name: conf
|
||||
mountPath: /bitnami/mongodb/conf
|
||||
- name: logs
|
||||
mountPath: /bitnami/mongodb/logs
|
||||
volumes:
|
||||
- name: data
|
||||
emptyDir: {}
|
||||
- name: conf
|
||||
emptyDir: {}
|
||||
- name: logs
|
||||
emptyDir: {}
|
||||
3
mongodb/tpl/values.toml
Normal file
3
mongodb/tpl/values.toml
Normal file
@@ -0,0 +1,3 @@
|
||||
mongodbUser = ""
|
||||
mongodbPassword = ""
|
||||
mongodbDatabase = ""
|
||||
Reference in New Issue
Block a user