Skip to content

Commit 701ad4e

Browse files
authored
Merge pull request #6203 from aledbf/false
Refactor key/value parsing
2 parents 7e256d2 + 4b831c7 commit 701ad4e

File tree

4 files changed

+13
-10
lines changed

4 files changed

+13
-10
lines changed

charts/ingress-nginx/Chart.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
apiVersion: v1
22
name: ingress-nginx
3-
version: 3.2.0
3+
version: 3.3.0
44
appVersion: 0.35.0
55
home: https://github.com/kubernetes/ingress-nginx
66
description: Ingress controller for Kubernetes using NGINX as a reverse proxy and load balancer

charts/ingress-nginx/templates/controller-daemonset.yaml

+4-3
Original file line numberDiff line numberDiff line change
@@ -102,10 +102,11 @@ spec:
102102
- --health-check-path={{ .Values.controller.healthCheckPath }}
103103
{{- end }}
104104
{{- range $key, $value := .Values.controller.extraArgs }}
105-
{{- if $value }}
106-
- --{{ $key }}={{ $value }}
107-
{{- else }}
105+
{{- /* Accept keys without values or with false as value */}}
106+
{{- if eq ($value | quote | len) 2 }}
108107
- --{{ $key }}
108+
{{- else }}
109+
- --{{ $key }}={{ $value }}
109110
{{- end }}
110111
{{- end }}
111112
securityContext:

charts/ingress-nginx/templates/controller-deployment.yaml

+4-3
Original file line numberDiff line numberDiff line change
@@ -106,10 +106,11 @@ spec:
106106
- --health-check-path={{ .Values.controller.healthCheckPath }}
107107
{{- end }}
108108
{{- range $key, $value := .Values.controller.extraArgs }}
109-
{{- if $value }}
110-
- --{{ $key }}={{ $value }}
111-
{{- else }}
109+
{{- /* Accept keys without values or with false as value */}}
110+
{{- if eq ($value | quote | len) 2 }}
112111
- --{{ $key }}
112+
{{- else }}
113+
- --{{ $key }}={{ $value }}
113114
{{- end }}
114115
{{- end }}
115116
securityContext:

charts/ingress-nginx/templates/default-backend-deployment.yaml

+4-3
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,11 @@ spec:
4343
{{- if .Values.defaultBackend.extraArgs }}
4444
args:
4545
{{- range $key, $value := .Values.defaultBackend.extraArgs }}
46-
{{- if $value }}
47-
- --{{ $key }}={{ $value }}
48-
{{- else }}
46+
{{- /* Accept keys without values or with false as value */}}
47+
{{- if eq ($value | quote | len) 2 }}
4948
- --{{ $key }}
49+
{{- else }}
50+
- --{{ $key }}={{ $value }}
5051
{{- end }}
5152
{{- end }}
5253
{{- end }}

0 commit comments

Comments
 (0)