diff --git a/charts/oscam/Chart.yaml b/charts/oscam/Chart.yaml index 55eab0f..ec3f785 100644 --- a/charts/oscam/Chart.yaml +++ b/charts/oscam/Chart.yaml @@ -15,7 +15,7 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 0.1.3 +version: 0.1.4 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to diff --git a/charts/oscam/templates/ingress.yaml b/charts/oscam/templates/ingress.yaml index ac449b6..af5cf4a 100644 --- a/charts/oscam/templates/ingress.yaml +++ b/charts/oscam/templates/ingress.yaml @@ -1,26 +1,20 @@ {{- if .Values.ingress.enabled -}} -{{- $fullName := include "oscam.fullname" . -}} -{{- $svcPort := .Values.service.port -}} -{{- if and .Values.ingress.className (not (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion)) }} + {{- $fullName := include "oscam.fullname" . -}} + {{- $svcPort := .Values.service.port -}} + {{- if and .Values.ingress.className (not (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion)) }} {{- if not (hasKey .Values.ingress.annotations "kubernetes.io/ingress.class") }} {{- $_ := set .Values.ingress.annotations "kubernetes.io/ingress.class" .Values.ingress.className}} {{- end }} -{{- end }} -{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion -}} + {{- end }} apiVersion: networking.k8s.io/v1 -{{- else if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}} -apiVersion: networking.k8s.io/v1beta1 -{{- else -}} -apiVersion: extensions/v1beta1 -{{- end }} kind: Ingress metadata: name: {{ $fullName }} labels: - {{- include "oscam.labels" . | nindent 4 }} + {{- include "oscam.labels" . | nindent 4 }} {{- with .Values.ingress.annotations }} annotations: - {{- toYaml . | nindent 4 }} + {{- toYaml . | nindent 4 }} {{- end }} spec: {{- if and .Values.ingress.className (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion) }} @@ -32,9 +26,9 @@ spec: - hosts: {{- range .hosts }} - {{ . | quote }} - {{- end }} + {{- end }} secretName: {{ .secretName }} - {{- end }} + {{- end }} {{- end }} rules: {{- range .Values.ingress.hosts }} @@ -55,7 +49,7 @@ spec: {{- else }} serviceName: {{ $fullName }} servicePort: {{ $svcPort }} - {{- end }} - {{- end }} - {{- end }} -{{- end }} + {{- end }} + {{- end }} + {{- end }} + {{- end }}