mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-09-22 13:39:35 +00:00
fix(chart): simplified ingress rules configuration
This commit is contained in:
@@ -122,51 +122,9 @@ Create the mongodb connection string.
|
||||
{{- $pass := first .Values.mongodb.auth.passwords | default "root" -}}
|
||||
{{- $database := first .Values.mongodb.auth.databases | default "test" -}}
|
||||
{{- $connectionString := printf "mongodb://%s:%s@%s:%d/%s" $user $pass $host $port $database -}}
|
||||
{{/* Backward compatibility (< 0.1.16, deprecated) */}}
|
||||
{{- if .Values.mongodbConnection.externalMongoDBConnectionString -}}
|
||||
{{- $connectionString = .Values.mongodbConnection.externalMongoDBConnectionString -}}
|
||||
{{- end -}}
|
||||
{{- printf "%s" $connectionString -}}
|
||||
{{- end -}}
|
||||
|
||||
|
||||
{{- define "infisical.ingress-rules" -}}
|
||||
{{- $ingress := .Values.ingress }}
|
||||
{{- if $ingress.hostName }}
|
||||
rules:
|
||||
- host: {{ $ingress.hostName }}
|
||||
http:
|
||||
paths:
|
||||
- path: {{ $ingress.frontend.path }}
|
||||
pathType: {{ $ingress.frontend.pathType }}
|
||||
backend:
|
||||
service:
|
||||
name: {{ include "infisical.frontend.fullname" . }}
|
||||
port:
|
||||
number: 3000
|
||||
- path: {{ $ingress.backend.path }}
|
||||
pathType: {{ $ingress.backend.pathType }}
|
||||
backend:
|
||||
service:
|
||||
name: {{ include "infisical.backend.fullname" . }}
|
||||
port:
|
||||
number: 4000
|
||||
{{- else }}
|
||||
rules:
|
||||
- http:
|
||||
paths:
|
||||
- path: {{ $ingress.frontend.path }}
|
||||
pathType: {{ $ingress.frontend.pathType }}
|
||||
backend:
|
||||
service:
|
||||
name: {{ include "infisical.frontend.fullname" . }}
|
||||
port:
|
||||
number: 3000
|
||||
- path: {{ $ingress.backend.path }}
|
||||
pathType: {{ $ingress.backend.pathType }}
|
||||
backend:
|
||||
service:
|
||||
name: {{ include "infisical.backend.fullname" . }}
|
||||
port:
|
||||
number: 4000
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end -}}
|
||||
@@ -27,5 +27,24 @@ spec:
|
||||
secretName: {{ .secretName }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- include "infisical.ingress-rules" . | nindent 2 }}
|
||||
rules:
|
||||
- http:
|
||||
paths:
|
||||
- path: {{ $ingress.frontend.path }}
|
||||
pathType: {{ $ingress.frontend.pathType }}
|
||||
backend:
|
||||
service:
|
||||
name: {{ include "infisical.frontend.fullname" . }}
|
||||
port:
|
||||
number: 3000
|
||||
- path: {{ $ingress.backend.path }}
|
||||
pathType: {{ $ingress.backend.pathType }}
|
||||
backend:
|
||||
service:
|
||||
name: {{ include "infisical.backend.fullname" . }}
|
||||
port:
|
||||
number: 4000
|
||||
{{- if $ingress.hostName }}
|
||||
host: {{ $ingress.hostName }}
|
||||
{{- end }}
|
||||
{{ end }}
|
||||
Reference in New Issue
Block a user