Skip to content

Commit

Permalink
Fixes issues gabibbo97#50 & gabibbo97#34
Browse files Browse the repository at this point in the history
  • Loading branch information
Brendan Holmes committed Sep 13, 2021
1 parent b4e83de commit 2db9b01
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 6 deletions.
2 changes: 1 addition & 1 deletion charts/gangway/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: v2
name: gangway
version: 1.1.0
version: 1.2.0
description: An application that can be used to easily enable authentication flows via OIDC for a kubernetes cluster.
type: application
home: https://github.com/heptiolabs/gangway
Expand Down
1 change: 0 additions & 1 deletion charts/gangway/templates/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,6 @@ metadata:
{{- include "gangway.labels" . | nindent 4 }}
data:
tls.crt: {{ .Values.trustedCA.content | b64enc | quote }}
type: kubernetes.io/tls
{{- end }}
{{/* Environment secrets */}}
{{- if not .Values.existingSecret }}
Expand Down
24 changes: 20 additions & 4 deletions charts/gangway/templates/ingress.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{{- if .Values.ingress.enabled -}}
{{- $fullName := include "gangway.fullname" . -}}
{{- $svcPort := .Values.service.port -}}
{{- if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}}
apiVersion: networking.k8s.io/v1beta1
{{- else -}}
{{- if semverCompare ">=1.19.0" $.Capabilities.KubeVersion.Version }}
apiVersion: networking.k8s.io/v1
{{- else }}
apiVersion: extensions/v1beta1
{{- end }}
kind: Ingress
Expand All @@ -16,6 +16,13 @@ metadata:
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
{{- if .Values.ingress.class }}
{{- if semverCompare ">=1.19.0" $.Capabilities.KubeVersion.Version }}
ingressClassName: {{ .Values.ingress.class }}
{{- else }}
{{- fail "Please set the kubernetes.io/ingress.class annotation instead" }}
{{- end }}
{{- end }}
{{- if .Values.ingress.tls }}
tls:
{{- range .Values.ingress.tls }}
Expand All @@ -31,11 +38,20 @@ spec:
- host: {{ .host | quote }}
http:
paths:
{{- range .paths }}
{{- range .paths }}
- path: {{ . }}
{{- if semverCompare ">=1.19.0" $.Capabilities.KubeVersion.Version }}
pathType: ImplementationSpecific
backend:
service:
name: {{ include "gangway.fullname" $ }}
port:
name: http
{{- else }}
backend:
serviceName: {{ $fullName }}
servicePort: {{ $svcPort }}
{{- end }}
{{- end }}
{{- end }}
{{- end }}

0 comments on commit 2db9b01

Please sign in to comment.