From 4bf7e8bbd1c052f22aa770ef6096b83069af0221 Mon Sep 17 00:00:00 2001 From: Maidul Islam Date: Mon, 26 Feb 2024 13:01:29 -0500 Subject: [PATCH] add ingress back to helm --- .../infisical-standalone-postgres/Chart.yaml | 2 +- .../templates/ingress.yaml | 50 +++++++++++++++++++ 2 files changed, 51 insertions(+), 1 deletion(-) create mode 100644 helm-charts/infisical-standalone-postgres/templates/ingress.yaml diff --git a/helm-charts/infisical-standalone-postgres/Chart.yaml b/helm-charts/infisical-standalone-postgres/Chart.yaml index e5892d2e3..a12e60a8b 100644 --- a/helm-charts/infisical-standalone-postgres/Chart.yaml +++ b/helm-charts/infisical-standalone-postgres/Chart.yaml @@ -7,7 +7,7 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 1.0.0 +version: 1.0.1 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to diff --git a/helm-charts/infisical-standalone-postgres/templates/ingress.yaml b/helm-charts/infisical-standalone-postgres/templates/ingress.yaml new file mode 100644 index 000000000..a059c4f24 --- /dev/null +++ b/helm-charts/infisical-standalone-postgres/templates/ingress.yaml @@ -0,0 +1,50 @@ +{{ if .Values.ingress.enabled }} +{{- $ingress := .Values.ingress }} +{{- if and $ingress.ingressClassName (not (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion)) }} + {{- if not (hasKey $ingress.annotations "kubernetes.io/ingress.class") }} + {{- $_ := set $ingress.annotations "kubernetes.io/ingress.class" $ingress.ingressClassName}} + {{- end }} +{{- end }} +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + name: infisical-ingress + {{- with $ingress.annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} +spec: + {{- if and $ingress.ingressClassName (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion) }} + ingressClassName: {{ $ingress.ingressClassName | default "nginx" }} + {{- end }} +{{- if $ingress.tls }} + tls: + {{- range $ingress.tls }} + - hosts: + {{- range .hosts }} + - {{ . | quote }} + {{- end }} + secretName: {{ .secretName }} + {{- end }} +{{- end }} + rules: + - http: + paths: + - path: / + pathType: Prefix + backend: + service: + name: {{ include "infisical.fullname" . }} + port: + number: 8080 + - path: /ss-webhook + pathType: Exact + backend: + service: + name: {{ include "infisical.fullname" . }} + port: + number: 8080 + {{- if $ingress.hostName }} + host: {{ $ingress.hostName }} + {{- end }} +{{ end }} \ No newline at end of file