mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-07 22:27:48 +00:00
Allow mongo connection string based on type
This commit is contained in:
@@ -120,19 +120,12 @@ Create the mongodb connection string.
|
|||||||
{{- $port := 27017 -}}
|
{{- $port := 27017 -}}
|
||||||
{{- $user := "root" -}}
|
{{- $user := "root" -}}
|
||||||
{{- $pass := "root" -}}
|
{{- $pass := "root" -}}
|
||||||
{{- if .Values.mongodbConnection -}}
|
{{- $connectionString := printf "mongodb://%s:%s@%s:%d/" $user $pass $host $port -}}
|
||||||
{{- if .Values.mongodbConnection.host -}}
|
{{- if .Values.mongodbConnection.standardConnectionStringFormat -}}
|
||||||
{{- $host = .Values.mongodbConnection.host -}}
|
{{- $connectionString = .Values.mongodbConnection.standardConnectionStringFormat -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{- if .Values.mongodbConnection.port -}}
|
{{- if .Values.mongodbConnection.dnsSeedListConnectionFormat -}}
|
||||||
{{- $port = .Values.mongodbConnection.port -}}
|
{{- $connectionString = .Values.mongodbConnection.dnsSeedListConnectionFormat -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{- if .Values.mongodbConnection.username -}}
|
{{- printf "%s" $connectionString -}}
|
||||||
{{- $user = .Values.mongodbConnection.username -}}
|
|
||||||
{{- end -}}
|
|
||||||
{{- if .Values.mongodbConnection.password -}}
|
|
||||||
{{- $pass = .Values.mongodbConnection.password -}}
|
|
||||||
{{- end -}}
|
|
||||||
{{- end -}}
|
|
||||||
{{- printf "mongodb://%s:%s@%s:%d/" $user $pass $host $port -}}
|
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|||||||
@@ -43,19 +43,18 @@ mongodb:
|
|||||||
service:
|
service:
|
||||||
annotations: {}
|
annotations: {}
|
||||||
|
|
||||||
|
# By default the backend will be connected to a Mongo instance in the cluster.
|
||||||
# Recommended to replace with Mongo Cloud URI as the DB instance in the cluster does not have persistence yet
|
# However, it is recommended to add a Mongo Cloud connection string as the DB instance in the cluster does not have persistence yet.
|
||||||
|
# Learn about connection string type here https://www.mongodb.com/docs/manual/reference/connection-string/
|
||||||
mongodbConnection: {}
|
mongodbConnection: {}
|
||||||
# host: mymongodb.com # defaults to the internal mongo service
|
# standardConnectionStringFormat: <>
|
||||||
# port: 27017
|
# dnsSeedListConnectionFormat: <>
|
||||||
# username: root
|
|
||||||
# password: root
|
|
||||||
|
|
||||||
ingress:
|
ingress:
|
||||||
enabled: true
|
enabled: true
|
||||||
annotations:
|
annotations:
|
||||||
kubernetes.io/ingress.class: "nginx"
|
kubernetes.io/ingress.class: "nginx"
|
||||||
hostName: example.com
|
hostName: example.com # replace with your domain
|
||||||
frontend:
|
frontend:
|
||||||
path: /
|
path: /
|
||||||
pathType: Prefix
|
pathType: Prefix
|
||||||
|
|||||||
Reference in New Issue
Block a user