[traefik-forward-auth] Update ingress to v1 (#791)

* Update ingress to v1

* add v1 networking config
This commit is contained in:
Nicholas St. Germain 2021-04-15 16:47:36 -05:00 committed by GitHub
parent 2154ebc78e
commit 4b33374c88
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 14 additions and 3 deletions

View File

@ -2,7 +2,7 @@ apiVersion: v2
name: traefik-forward-auth
description: A minimal forward authentication service that provides OAuth/SSO login and authentication for the traefik reverse proxy/load balancer
type: application
version: 1.0.8
version: 1.0.9
appVersion: 2.2.0
keywords:
- traefik

View File

@ -1,10 +1,12 @@
{{- if .Values.ingress.enabled -}}
{{- $fullName := include "traefik-forward-auth.fullname" . -}}
{{- $svcPort := .Values.service.port -}}
{{- if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}}
{{- if semverCompare "<1.14-0" .Capabilities.KubeVersion.GitVersion -}}
apiVersion: extensions/v1beta1
{{- else if semverCompare "<1.19-0" .Capabilities.KubeVersion.GitVersion -}}
apiVersion: networking.k8s.io/v1beta1
{{- else -}}
apiVersion: extensions/v1beta1
apiVersion: networking.k8s.io/v1
{{- end }}
kind: Ingress
metadata:
@ -38,9 +40,18 @@ spec:
paths:
{{- range .paths }}
- path: {{ . }}
{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion }}
pathType: Prefix
backend:
service:
name: {{ $fullName }}
port:
name: http
{{- else }}
backend:
serviceName: {{ $fullName }}
servicePort: {{ $svcPort }}
{{- end }}
{{- end }}
{{- end }}
{{- end }}