Skip to content

Commit

Permalink
Fix templating because of dashes before curly brackets
Browse files Browse the repository at this point in the history
  • Loading branch information
mkilchhofer committed Feb 25, 2021
1 parent c50f21e commit 3f44e78
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
16 changes: 8 additions & 8 deletions deploy/helm/templates/ingress.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{{- if .Values.ingress.enabled -}}
{{- $fullName := include "nebraska.fullname" . -}}
{{- $svcPort := .Values.service.port -}}
{{- $kubeGitVersion := .Capabilities.KubeVersion.GitVersion -}}
{{- if semverCompare ">=1.19-0" $kubeGitVersion -}}
{{- if .Values.ingress.enabled }}
{{- $fullName := include "nebraska.fullname" . }}
{{- $svcPort := .Values.service.port }}
{{- $kubeGitVersion := .Capabilities.KubeVersion.GitVersion }}
{{- if semverCompare ">=1.19-0" $kubeGitVersion }}
apiVersion: networking.k8s.io/v1
{{- else if semverCompare ">=1.14-0" $kubeGitVersion -}}
{{- else if semverCompare ">=1.14-0" $kubeGitVersion }}
apiVersion: networking.k8s.io/v1beta1
{{- else -}}
{{- else }}
apiVersion: extensions/v1beta1
{{- end }}
kind: Ingress
Expand Down Expand Up @@ -42,7 +42,7 @@ spec:
port:
number: {{ $svcPort }}
pathType: ImplementationSpecific
{{- else -}}
{{- else }}
serviceName: {{ $fullName }}
servicePort: {{ $svcPort }}
{{- end }}
Expand Down
2 changes: 1 addition & 1 deletion deploy/helm/templates/serviceaccount.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if .Values.serviceAccount.create -}}
{{- if .Values.serviceAccount.create }}
apiVersion: v1
kind: ServiceAccount
metadata:
Expand Down

0 comments on commit 3f44e78

Please sign in to comment.