Skip to content

Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.

Make host name optional

Maidul Islam68deea28b7f6
diff --git a/helm-charts/infisical/templates/_helpers.tpl b/helm-charts/infisical/templates/_helpers.tpl
index bf3f8e3018..d1a0b79228 100644
--- a/helm-charts/infisical/templates/_helpers.tpl
+++ b/helm-charts/infisical/templates/_helpers.tpl
@@ -127,3 +127,46 @@ Create the mongodb connection string.
{{- 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 }}
diff --git a/helm-charts/infisical/templates/backend-deployment.yaml b/helm-charts/infisical/templates/backend-deployment.yaml
index b6d63372f9..f0b134d5b6 100644
--- a/helm-charts/infisical/templates/backend-deployment.yaml
+++ b/helm-charts/infisical/templates/backend-deployment.yaml
@@ -89,5 +89,4 @@ stringData:
{{- $v := $value | default ($current | default $default) -}}
{{ $key }}: {{ $v | quote }}
{{ end -}}
- MONGO_URL: {{ include "infisical.mongodb.connectionString" . | quote }}
{{- end }}
diff --git a/helm-charts/infisical/templates/ingress.yaml b/helm-charts/infisical/templates/ingress.yaml
index 9b181fe647..57d1e4434f 100644
--- a/helm-charts/infisical/templates/ingress.yaml
+++ b/helm-charts/infisical/templates/ingress.yaml
@@ -27,22 +27,5 @@ spec:
secretName: {{ .secretName }}
{{- end }}
{{- end }}
- 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
+{{- include "infisical.ingress-rules" . | nindent 2 }}
{{ end }}
\ No newline at end of file
diff --git a/helm-charts/infisical/values.yaml b/helm-charts/infisical/values.yaml
index 4f540ff6db..8d6b783250 100644
--- a/helm-charts/infisical/values.yaml
+++ b/helm-charts/infisical/values.yaml
@@ -303,13 +303,14 @@ ingress:
ingressClassName: nginx
## @param ingress.annotations Ingress annotations
##
- annotations: {}
+ annotations:
+ {}
# kubernetes.io/ingress.class: "nginx"
# cert-manager.io/issuer: letsencrypt-nginx
## @param ingress.hostName Ingress hostname (your custom domain name)
## Replace with your own domain
##
- hostName: infisical.local
+ hostName: ""
## @skip ingress.frontend
##
frontend:
@@ -396,7 +397,8 @@ mailhog:
ingressClassName: nginx
## @param mailhog.ingress.annotations Ingress annotations
##
- annotations: {}
+ annotations:
+ {}
# kubernetes.io/ingress.class: nginx
# kubernetes.io/tls-acme: "true"
## @param mailhog.ingress.labels Ingress labels