Skip to content

Commit

Permalink
Set Ingress network API version based on k8s version (oauth2-proxy#52)
Browse files Browse the repository at this point in the history
  • Loading branch information
czunker authored Sep 13, 2021
1 parent 5101d92 commit 0134bc7
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 28 deletions.
38 changes: 19 additions & 19 deletions helm/oauth2-proxy/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,35 +1,35 @@
name: oauth2-proxy
version: 4.2.0
version: 4.2.1
apiVersion: v2
appVersion: 7.1.3
home: https://oauth2-proxy.github.io/oauth2-proxy/
description: A reverse proxy that provides authentication with Google, Github or other providers
keywords:
- kubernetes
- oauth
- oauth2
- authentication
- google
- github
- redis
- kubernetes
- oauth
- oauth2
- authentication
- google
- github
- redis
dependencies:
- name: redis
version: ~10.6.0
repository: https://charts.bitnami.com/bitnami
alias: redis
condition: redis.enabled
sources:
- https://github.com/oauth2-proxy/oauth2-proxy
- https://github.com/oauth2-proxy/manifests
- https://github.com/oauth2-proxy/oauth2-proxy
- https://github.com/oauth2-proxy/manifests
maintainers:
- name: desaintmartin
email: cedric@desaintmartin.fr
- name: tlawrie
- name: NickMeves
email: nicholas.meves@gmail.com
- name: JoelSpeed
email: joel.speed@hotmail.co.uk
- name: pierluigilenoci
email: pierluigi.lenoci@gmail.com
- name: desaintmartin
email: cedric@desaintmartin.fr
- name: tlawrie
- name: NickMeves
email: nicholas.meves@gmail.com
- name: JoelSpeed
email: joel.speed@hotmail.co.uk
- name: pierluigilenoci
email: pierluigi.lenoci@gmail.com
engine: gotpl
kubeVersion: ">=1.9.0-0"
19 changes: 12 additions & 7 deletions helm/oauth2-proxy/ci/ingress-extra-paths-values.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
ingress:
enabled: true
path: /
pathType: ImplementationSpecific
hosts:
- chart-example.local
extraPaths:
- path: /*
pathType: ImplementationSpecific
backend:
service:
name: ssl-redirect
port:
name: use-annotation
- path: /*
pathType: ImplementationSpecific
backend:
service:
name: ssl-redirect
port:
name: use-annotation
4 changes: 2 additions & 2 deletions helm/oauth2-proxy/templates/ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
{{- $ingressPathType := .Values.ingress.pathType -}}
{{- $extraPaths := .Values.ingress.extraPaths -}}
{{- $apiV1 := false -}}
{{- if .Capabilities.APIVersions.Has "networking.k8s.io/v1/Ingress" -}}
{{- if and (.Capabilities.APIVersions.Has "networking.k8s.io/v1") (semverCompare ">= v1.19.0" .Capabilities.KubeVersion.Version) -}}
apiVersion: networking.k8s.io/v1
{{- $apiV1 = true -}}
{{- else if .Capabilities.APIVersions.Has "networking.k8s.io/v1beta1/Ingress" -}}
{{- else if .Capabilities.APIVersions.Has "networking.k8s.io/v1beta1" -}}
apiVersion: networking.k8s.io/v1beta1
{{- else -}}
apiVersion: extensions/v1beta1
Expand Down

0 comments on commit 0134bc7

Please sign in to comment.