Skip to content

Commit

Permalink
fix kubernetes version detection in ingress (#46)
Browse files Browse the repository at this point in the history
* fix kubernetes version detection in ingress

* bump chart version to 0.2.21

* stable ingress is available in kubernetes 1.19+
  • Loading branch information
Vrtak-CZ authored Sep 17, 2021
1 parent a938960 commit 41d7362
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion charts/flagsmith/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
name: flagsmith
description: Flagsmith
type: application
version: 0.2.20
version: 0.2.21
appVersion: "2.9"
dependencies:
- name: postgresql
Expand Down
4 changes: 2 additions & 2 deletions charts/flagsmith/templates/ingress-api.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{{- if .Values.ingress.api.enabled -}}
{{- $fullName := include "flagsmith.fullname" . -}}
{{- $svcPort := .Values.service.api.port -}}
{{- if semverCompare ">=1.18.0" .Capabilities.KubeVersion.GitVersion -}}
{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion -}}
apiVersion: networking.k8s.io/v1
{{- else -}}
{{- if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}}
Expand Down Expand Up @@ -38,7 +38,7 @@ spec:
paths:
{{- range .paths }}
- path: {{ . }}
{{- if semverCompare ">=1.18.0" $.Capabilities.KubeVersion.GitVersion }}
{{- if semverCompare ">=1.19-0" $.Capabilities.KubeVersion.GitVersion }}
pathType: Prefix
backend:
service:
Expand Down
4 changes: 2 additions & 2 deletions charts/flagsmith/templates/ingress-frontend.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{{- if .Values.ingress.frontend.enabled -}}
{{- $fullName := include "flagsmith.fullname" . -}}
{{- $svcPort := .Values.service.frontend.port -}}
{{- if semverCompare ">=1.18.0" .Capabilities.KubeVersion.GitVersion -}}
{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion -}}
apiVersion: networking.k8s.io/v1
{{- else -}}
{{- if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}}
Expand Down Expand Up @@ -38,7 +38,7 @@ spec:
paths:
{{- range .paths }}
- path: {{ . }}
{{- if semverCompare ">=1.18.0" $.Capabilities.KubeVersion.GitVersion }}
{{- if semverCompare ">=1.19-0" $.Capabilities.KubeVersion.GitVersion }}
pathType: Prefix
backend:
service:
Expand Down

0 comments on commit 41d7362

Please sign in to comment.