From 4b33374c88acc3b0acdf7c375c808bc28d335e06 Mon Sep 17 00:00:00 2001 From: "Nicholas St. Germain" Date: Thu, 15 Apr 2021 16:47:36 -0500 Subject: [PATCH] [traefik-forward-auth] Update ingress to v1 (#791) * Update ingress to v1 * add v1 networking config --- charts/stable/traefik-forward-auth/Chart.yaml | 2 +- .../traefik-forward-auth/templates/ingress.yaml | 15 +++++++++++++-- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/charts/stable/traefik-forward-auth/Chart.yaml b/charts/stable/traefik-forward-auth/Chart.yaml index 8969e7c9..a57ddff6 100644 --- a/charts/stable/traefik-forward-auth/Chart.yaml +++ b/charts/stable/traefik-forward-auth/Chart.yaml @@ -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 diff --git a/charts/stable/traefik-forward-auth/templates/ingress.yaml b/charts/stable/traefik-forward-auth/templates/ingress.yaml index 1b38b891..70d9a833 100644 --- a/charts/stable/traefik-forward-auth/templates/ingress.yaml +++ b/charts/stable/traefik-forward-auth/templates/ingress.yaml @@ -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 }}