Skip to content

Commit 0134bc7

Browse files
authored
Set Ingress network API version based on k8s version (#52)
Fixes #51
1 parent 5101d92 commit 0134bc7

File tree

3 files changed

+33
-28
lines changed

3 files changed

+33
-28
lines changed

helm/oauth2-proxy/Chart.yaml

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,35 @@
11
name: oauth2-proxy
2-
version: 4.2.0
2+
version: 4.2.1
33
apiVersion: v2
44
appVersion: 7.1.3
55
home: https://oauth2-proxy.github.io/oauth2-proxy/
66
description: A reverse proxy that provides authentication with Google, Github or other providers
77
keywords:
8-
- kubernetes
9-
- oauth
10-
- oauth2
11-
- authentication
12-
- google
13-
- github
14-
- redis
8+
- kubernetes
9+
- oauth
10+
- oauth2
11+
- authentication
12+
- google
13+
- github
14+
- redis
1515
dependencies:
1616
- name: redis
1717
version: ~10.6.0
1818
repository: https://charts.bitnami.com/bitnami
1919
alias: redis
2020
condition: redis.enabled
2121
sources:
22-
- https://github.com/oauth2-proxy/oauth2-proxy
23-
- https://github.com/oauth2-proxy/manifests
22+
- https://github.com/oauth2-proxy/oauth2-proxy
23+
- https://github.com/oauth2-proxy/manifests
2424
maintainers:
25-
- name: desaintmartin
26-
27-
- name: tlawrie
28-
- name: NickMeves
29-
30-
- name: JoelSpeed
31-
32-
- name: pierluigilenoci
33-
25+
- name: desaintmartin
26+
27+
- name: tlawrie
28+
- name: NickMeves
29+
30+
- name: JoelSpeed
31+
32+
- name: pierluigilenoci
33+
3434
engine: gotpl
3535
kubeVersion: ">=1.9.0-0"
Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,14 @@
11
ingress:
2+
enabled: true
3+
path: /
4+
pathType: ImplementationSpecific
5+
hosts:
6+
- chart-example.local
27
extraPaths:
3-
- path: /*
4-
pathType: ImplementationSpecific
5-
backend:
6-
service:
7-
name: ssl-redirect
8-
port:
9-
name: use-annotation
8+
- path: /*
9+
pathType: ImplementationSpecific
10+
backend:
11+
service:
12+
name: ssl-redirect
13+
port:
14+
name: use-annotation

helm/oauth2-proxy/templates/ingress.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@
55
{{- $ingressPathType := .Values.ingress.pathType -}}
66
{{- $extraPaths := .Values.ingress.extraPaths -}}
77
{{- $apiV1 := false -}}
8-
{{- if .Capabilities.APIVersions.Has "networking.k8s.io/v1/Ingress" -}}
8+
{{- if and (.Capabilities.APIVersions.Has "networking.k8s.io/v1") (semverCompare ">= v1.19.0" .Capabilities.KubeVersion.Version) -}}
99
apiVersion: networking.k8s.io/v1
1010
{{- $apiV1 = true -}}
11-
{{- else if .Capabilities.APIVersions.Has "networking.k8s.io/v1beta1/Ingress" -}}
11+
{{- else if .Capabilities.APIVersions.Has "networking.k8s.io/v1beta1" -}}
1212
apiVersion: networking.k8s.io/v1beta1
1313
{{- else -}}
1414
apiVersion: extensions/v1beta1

0 commit comments

Comments
 (0)