Skip to content

Commit b3fda67

Browse files
committed
check ingress api version by resource capabilities
Signed-off-by: Caio Almeida <[email protected]>
1 parent 8ff1364 commit b3fda67

File tree

4 files changed

+3
-8
lines changed

4 files changed

+3
-8
lines changed

helm/oauth2-proxy/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: oauth2-proxy
2-
version: 4.0.2
2+
version: 4.0.3
33
apiVersion: v2
44
appVersion: 7.1.3
55
home: https://oauth2-proxy.github.io/oauth2-proxy/

helm/oauth2-proxy/README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,6 @@ Parameter | Description | Default
9797
`ingress.enabled` | Enable Ingress | `false`
9898
`ingress.path` | Ingress accepted path | `/`
9999
`ingress.pathType` | Ingress [path type](https://kubernetes.io/docs/concepts/services-networking/ingress/#path-types) | `ImplementationSpecific`
100-
`ingress.apiVersion` | Ingress api version | `nil`
101100
`ingress.extraPaths` | Ingress extra paths to prepend to every host configuration. Useful when configuring [custom actions with AWS ALB Ingress Controller](https://kubernetes-sigs.github.io/aws-alb-ingress-controller/guide/ingress/annotation/#actions). | `[]`
102101
`ingress.annotations` | Ingress annotations | `nil`
103102
`ingress.hosts` | Ingress accepted hostnames | `nil`

helm/oauth2-proxy/templates/ingress.yaml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,10 @@
55
{{- $ingressPathType := .Values.ingress.pathType -}}
66
{{- $extraPaths := .Values.ingress.extraPaths -}}
77
{{- $apiV1 := false -}}
8-
{{- if .Values.ingress.apiVersion -}}
9-
apiVersion: {{ .Values.ingress.apiVersion }}
10-
{{- else if .Capabilities.APIVersions.Has "networking.k8s.io/v1" -}}
8+
{{- if .Capabilities.APIVersions.Has "networking.k8s.io/v1/Ingress" -}}
119
apiVersion: networking.k8s.io/v1
1210
{{- $apiV1 = true -}}
13-
{{- else if .Capabilities.APIVersions.Has "networking.k8s.io/v1beta1" -}}
11+
{{- else if .Capabilities.APIVersions.Has "networking.k8s.io/v1beta1/Ingress" -}}
1412
apiVersion: networking.k8s.io/v1beta1
1513
{{- else -}}
1614
apiVersion: extensions/v1beta1

helm/oauth2-proxy/values.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,6 @@ ingress:
9191
path: /
9292
# Only used if API capabilities (networking.k8s.io/v1) allow it
9393
pathType: ImplementationSpecific
94-
# define the ingress api version (e.g. networking.k8s.io/v1)
95-
# apiVersion: networking.k8s.io/v1
9694
# Used to create an Ingress record.
9795
# hosts:
9896
# - chart-example.local

0 commit comments

Comments
 (0)