Refactor parsing of key values

This commit is contained in:
Manuel Alejandro de Brito Fontes 2020-09-21 13:03:49 -03:00
parent 7e256d2c20
commit 4b831c77b2
No known key found for this signature in database
GPG key ID: 786136016A8BA02A
4 changed files with 13 additions and 10 deletions

View file

@ -1,6 +1,6 @@
apiVersion: v1
name: ingress-nginx
version: 3.2.0
version: 3.3.0
appVersion: 0.35.0
home: https://github.com/kubernetes/ingress-nginx
description: Ingress controller for Kubernetes using NGINX as a reverse proxy and load balancer

View file

@ -102,10 +102,11 @@ spec:
- --health-check-path={{ .Values.controller.healthCheckPath }}
{{- end }}
{{- range $key, $value := .Values.controller.extraArgs }}
{{- if $value }}
- --{{ $key }}={{ $value }}
{{- else }}
{{- /* Accept keys without values or with false as value */}}
{{- if eq ($value | quote | len) 2 }}
- --{{ $key }}
{{- else }}
- --{{ $key }}={{ $value }}
{{- end }}
{{- end }}
securityContext:

View file

@ -106,10 +106,11 @@ spec:
- --health-check-path={{ .Values.controller.healthCheckPath }}
{{- end }}
{{- range $key, $value := .Values.controller.extraArgs }}
{{- if $value }}
- --{{ $key }}={{ $value }}
{{- else }}
{{- /* Accept keys without values or with false as value */}}
{{- if eq ($value | quote | len) 2 }}
- --{{ $key }}
{{- else }}
- --{{ $key }}={{ $value }}
{{- end }}
{{- end }}
securityContext:

View file

@ -43,10 +43,11 @@ spec:
{{- if .Values.defaultBackend.extraArgs }}
args:
{{- range $key, $value := .Values.defaultBackend.extraArgs }}
{{- if $value }}
- --{{ $key }}={{ $value }}
{{- else }}
{{- /* Accept keys without values or with false as value */}}
{{- if eq ($value | quote | len) 2 }}
- --{{ $key }}
{{- else }}
- --{{ $key }}={{ $value }}
{{- end }}
{{- end }}
{{- end }}