diff --git a/helm-charts/infisical/templates/_helpers.tpl b/helm-charts/infisical/templates/_helpers.tpl index d1a0b7922..500edea33 100644 --- a/helm-charts/infisical/templates/_helpers.tpl +++ b/helm-charts/infisical/templates/_helpers.tpl @@ -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 -}} \ No newline at end of file diff --git a/helm-charts/infisical/templates/ingress.yaml b/helm-charts/infisical/templates/ingress.yaml index 57d1e4434..a675fa2ff 100644 --- a/helm-charts/infisical/templates/ingress.yaml +++ b/helm-charts/infisical/templates/ingress.yaml @@ -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 }} \ No newline at end of file