Add pathType value to ingress

Modern GKE versions only accept ImplementationSpecific
as pathType for the ingress resource, so here we added
a new value for the pathType which can be used to set
pathType on demand, the default value is still Prefix
for backward compatability

Signed-off-by: Mouhsen Ibrahim <mouhsen.ibrahim@gmail.com>
This commit is contained in:
Mouhsen Ibrahim 2021-07-01 14:59:14 +02:00
parent 7f16fc4213
commit 9758455a4c
3 changed files with 8 additions and 4 deletions

View file

@ -3,6 +3,7 @@
{{- $servicePort := ternary .Values.server.service.servicePortHttps .Values.server.service.servicePortHttp .Values.server.ingressGrpc.https -}}
{{- $paths := .Values.server.ingressGrpc.paths -}}
{{- $extraPaths := .Values.server.ingressGrpc.extraPaths -}}
{{- $pathType := .Values.server.ingressGrpc.pathType -}}
apiVersion: {{ include "argo-cd.ingress.apiVersion" . }}
kind: Ingress
metadata:
@ -36,7 +37,7 @@ spec:
{{- range $p := $paths }}
- path: {{ $p }}
{{- if eq (include "argo-cd.ingress.apiVersion" $) "networking.k8s.io/v1" }}
pathType: Prefix
pathType: {{ $pathType }}
{{- end }}
backend:
{{- if eq (include "argo-cd.ingress.apiVersion" $) "networking.k8s.io/v1" }}
@ -63,7 +64,7 @@ spec:
{{- range $p := $paths }}
- path: {{ $p }}
{{- if eq (include "argo-cd.ingress.apiVersion" $) "networking.k8s.io/v1" }}
pathType: Prefix
pathType: {{ $pathType }}
{{- end }}
backend:
{{- if eq (include "argo-cd.ingress.apiVersion" $) "networking.k8s.io/v1" }}

View file

@ -3,6 +3,7 @@
{{- $servicePort := ternary .Values.server.service.servicePortHttps .Values.server.service.servicePortHttp .Values.server.ingress.https -}}
{{- $paths := .Values.server.ingress.paths -}}
{{- $extraPaths := .Values.server.ingress.extraPaths -}}
{{- $pathType := .Values.server.ingress.pathType -}}
apiVersion: {{ include "argo-cd.ingress.apiVersion" . }}
kind: Ingress
metadata:
@ -36,7 +37,7 @@ spec:
{{- range $p := $paths }}
- path: {{ $p }}
{{- if eq (include "argo-cd.ingress.apiVersion" $) "networking.k8s.io/v1" }}
pathType: Prefix
pathType: {{ $pathType }}
{{- end }}
backend:
{{- if eq (include "argo-cd.ingress.apiVersion" $) "networking.k8s.io/v1" }}
@ -63,7 +64,7 @@ spec:
{{- range $p := $paths }}
- path: {{ $p }}
{{- if eq (include "argo-cd.ingress.apiVersion" $) "networking.k8s.io/v1" }}
pathType: Prefix
pathType: {{ $pathType }}
{{- end }}
backend:
{{- if eq (include "argo-cd.ingress.apiVersion" $) "networking.k8s.io/v1" }}

View file

@ -557,6 +557,7 @@ server:
# - argocd.example.com
paths:
- /
pathType: Prefix
extraPaths:
[]
# - path: /*
@ -594,6 +595,7 @@ server:
# - argocd.example.com
paths:
- /
pathType: Prefix
extraPaths:
[]
# - path: /*