Skip to content

Commit

Permalink
Merge pull request #26 from toxsick/patch-1
Browse files Browse the repository at this point in the history
  • Loading branch information
Vad1mo authored Dec 29, 2022
2 parents 25a4df5 + ec23775 commit f0fe13f
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion templates/ingress.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
{{- if .Values.ingress.enabled -}}
{{- $fullName := include "n8n.fullname" . -}}
{{- $svcPort := .Values.service.port -}}
{{- if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}}
{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion -}}
apiVersion: networking.k8s.io/v1
{{- else if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}}
apiVersion: networking.k8s.io/v1beta1
{{- else -}}
apiVersion: extensions/v1beta1
Expand Down Expand Up @@ -33,9 +35,19 @@ spec:
paths:
{{- range .paths }}
- path: {{ . }}
{{- if semverCompare ">=1.18-0" $.Capabilities.KubeVersion.GitVersion }}
pathType: Prefix
{{- end }}
backend:
{{- if semverCompare ">=1.19-0" $.Capabilities.KubeVersion.GitVersion }}
service:
name: {{ $fullName }}
port:
number: {{ $svcPort }}
{{- else }}
serviceName: {{ $fullName }}
servicePort: {{ $svcPort }}
{{- end }}
{{- end }}
{{- end }}
{{- end }}

0 comments on commit f0fe13f

Please sign in to comment.