Commit cf9cb469 authored by Will JALLET's avatar Will JALLET 💸

inject envars for db

parent 7c74762f
Pipeline #4338 passed with stage
in 10 seconds
......@@ -9,4 +9,6 @@ script:
- cd charts
- helm lint sites-binets/ -f sites-binets/test_values.yaml
- helm lint prometheus/
- helm lint grafana/
\ No newline at end of file
- helm lint grafana/
- echo "Producing template files, check if they're right..."
- helm template sites-binets/ -f sites-binets/test_values.yaml -n creneaux --namespace creneaux-site
\ No newline at end of file
{{- if .Values.db.mongodb -}}
{{- if .Values.db.mongodb.enabled -}}
apiVersion: kubedb.com/v1alpha1
kind: MongoDB
metadata:
......
......@@ -28,6 +28,12 @@ spec:
- containerPort: {{ .Values.service.port }}
name: http
protocol: TCP
{{- if .Values.env }}
env:
{{- range $key, $val := .Values.env }}
{{ $key }}: {{ $val | quote }}
{{- end}}
{{- end}}
restartPolicy: Always
{{- if .Values.image.pullSecrets }}
imagePullSecrets:
......
......@@ -5,4 +5,11 @@ ingress:
hosts:
- creneaux.kubeapps.binets.fr
service:
port: 5000
\ No newline at end of file
port: 5000
env:
MONGODB_HOST: "127.0.0.1"
db:
mongodb:
enabled: true
\ No newline at end of file
......@@ -19,6 +19,10 @@ ingress:
# hosts:
# - chart-example.local
env:
# Put your envars here as key,value pairs
# VARNAME: VARVAL
db:
postgres:
enabled: false
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment