mongodb: added secrets manifest for sensitive variables.

A secret volume named `mongodb` is created to store password variables.
This commit is contained in:
Sameer Naik
2016-06-30 11:36:38 +05:30
parent 19ce6fd555
commit 304e214f88
5 changed files with 41 additions and 5 deletions

View File

@@ -2,7 +2,7 @@ name: mongodb
home: https://mongodb.org
source:
- https://github.com/bitnami/bitnami-docker-mongodb
version: 0.2.0
version: 0.2.1
description: Chart for MongoDB
maintainers:
- Bitnami <containers@bitnami.com>

View File

@@ -23,11 +23,17 @@ spec:
image: bitnami/mongodb:3.2.7-r0
env:
- name: MONGODB_ROOT_PASSWORD
value: ""
valueFrom:
secretKeyRef:
name: mongodb
key: mongodb-root-password
- name: MONGODB_USER
value: ""
- name: MONGODB_PASSWORD
value: ""
valueFrom:
secretKeyRef:
name: mongodb
key: mongodb-password
- name: MONGODB_DATABASE
value: ""
ports:

View File

@@ -0,0 +1,12 @@
#helm:generate helmc tpl -d tpl/values.toml -o manifests/mongodb-secrets.yaml $HELM_GENERATE_FILE
apiVersion: v1
kind: Secret
metadata:
name: mongodb
labels:
provider: mongodb
heritage: bitnami
type: Opaque
data:
mongodb-root-password: ""
mongodb-password: ""

View File

@@ -23,11 +23,17 @@ spec:
image: bitnami/mongodb:3.2.7-r0
env:
- name: MONGODB_ROOT_PASSWORD
value: {{ .mongodbRootPassword | quote }}
valueFrom:
secretKeyRef:
name: mongodb
key: mongodb-root-password
- name: MONGODB_USER
value: {{ .mongodbUser | quote }}
- name: MONGODB_PASSWORD
value: {{ .mongodbPassword | quote }}
valueFrom:
secretKeyRef:
name: mongodb
key: mongodb-password
- name: MONGODB_DATABASE
value: {{ .mongodbDatabase | quote }}
ports:

View File

@@ -0,0 +1,12 @@
#helm:generate helmc tpl -d tpl/values.toml -o manifests/mongodb-secrets.yaml $HELM_GENERATE_FILE
apiVersion: v1
kind: Secret
metadata:
name: mongodb
labels:
provider: mongodb
heritage: bitnami
type: Opaque
data:
mongodb-root-password: {{ .mongodbRootPassword | b64enc | quote }}
mongodb-password: {{ .mongodbPassword | b64enc | quote }}