This repository was archived by the owner on May 17, 2024. It is now read-only.
File tree 2 files changed +29
-2
lines changed
deploy/charts/kube-oidc-proxy
2 files changed +29
-2
lines changed Original file line number Diff line number Diff line change 1
1
{{- if .Values.ingress.enabled -}}
2
2
{{- $fullName := include "kube-oidc-proxy.fullname" . -}}
3
+ {{- $svcPort := .Values.service.port -}}
4
+ {{- if and .Values.ingress.className (not (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion)) }}
5
+ {{- if not (hasKey .Values.ingress.annotations "kubernetes.io/ingress.class") }}
6
+ {{- $_ := set .Values.ingress.annotations "kubernetes.io/ingress.class" .Values.ingress.className}}
7
+ {{- end }}
8
+ {{- end }}
9
+ {{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion -}}
10
+ apiVersion : networking.k8s.io/v1
11
+ {{- else if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}}
12
+ apiVersion : networking.k8s.io/v1beta1
13
+ {{- else -}}
3
14
apiVersion : extensions/v1beta1
15
+ {{- end }}
4
16
kind : Ingress
5
17
metadata :
6
18
name : {{ $fullName }}
@@ -11,6 +23,9 @@ metadata:
11
23
{{- toYaml . | nindent 4 }}
12
24
{{- end }}
13
25
spec :
26
+ {{- if and .Values.ingress.className (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion) }}
27
+ ingressClassName : {{ .Values.ingress.className }}
28
+ {{- end }}
14
29
{{- if .Values.ingress.tls }}
15
30
tls :
16
31
{{- range .Values.ingress.tls }}
@@ -27,10 +42,20 @@ spec:
27
42
http :
28
43
paths :
29
44
{{- range .paths }}
30
- - path : {{ . }}
45
+ - path : {{ .path }}
46
+ {{- if and .pathType (semverCompare ">=1.18-0" $.Capabilities.KubeVersion.GitVersion) }}
47
+ pathType : {{ .pathType }}
48
+ {{- end }}
31
49
backend :
50
+ {{- if semverCompare ">=1.19-0" $.Capabilities.KubeVersion.GitVersion }}
51
+ service :
52
+ name : {{ $fullName }}
53
+ port :
54
+ name : https
55
+ {{- else }}
32
56
serviceName : {{ $fullName }}
33
57
servicePort : https
58
+ {{- end }}
34
59
{{- end }}
35
60
{{- end }}
36
61
{{- end }}
Original file line number Diff line number Diff line change @@ -84,7 +84,9 @@ ingress:
84
84
# kubernetes.io/tls-acme: "true"
85
85
hosts :
86
86
- host : chart-example.local
87
- paths : []
87
+ paths :
88
+ - path : /
89
+ pathType : Prefix
88
90
89
91
tls : []
90
92
# - secretName: chart-example-tls
You can’t perform that action at this time.
0 commit comments