fix(stable/unifi ingress): fix scoping issue (#12482)

.Values was out of scope for hosts block, since its in a range statement
Moved the failing access to unifiedService.enabled to a variable

Signed-off-by: Thiemo Krause <krausethiemo@googlemail.com>
This commit is contained in:
Thiemo 2019-03-24 21:57:06 +01:00 committed by Jeff Billimek
parent 652612e76b
commit 7f3bc53d12
No known key found for this signature in database
GPG Key ID: 214B3EF39B4956B7
2 changed files with 3 additions and 2 deletions

View File

@ -2,7 +2,7 @@ apiVersion: v1
appVersion: 5.9.29 appVersion: 5.9.29
description: Ubiquiti Network's Unifi Controller description: Ubiquiti Network's Unifi Controller
name: unifi name: unifi
version: 0.3.2 version: 0.3.3
keywords: keywords:
- ubiquiti - ubiquiti
- unifi - unifi

View File

@ -1,6 +1,7 @@
{{- if .Values.ingress.enabled -}} {{- if .Values.ingress.enabled -}}
{{- $fullName := include "unifi.fullname" . -}} {{- $fullName := include "unifi.fullname" . -}}
{{- $ingressPath := .Values.ingress.path -}} {{- $ingressPath := .Values.ingress.path -}}
{{- $unifiedServiceEnabled := .Values.unifiedService.enabled -}}
apiVersion: extensions/v1beta1 apiVersion: extensions/v1beta1
kind: Ingress kind: Ingress
metadata: metadata:
@ -32,7 +33,7 @@ spec:
paths: paths:
- path: {{ $ingressPath }} - path: {{ $ingressPath }}
backend: backend:
{{- if .Values.unifiedService.enabled }} {{- if $unifiedServiceEnabled }}
serviceName: {{ $fullName }} serviceName: {{ $fullName }}
{{- else }} {{- else }}
serviceName: {{ $fullName }}-gui serviceName: {{ $fullName }}-gui