Skip to content

Commit 0affd96

Browse files
akshitgroverrikatz
authored andcommitted
Add controller.watchIngressWithoutClass config option (kubernetes#7459)
Signed-off-by: Akshit Grover <[email protected]>
1 parent cef8fa4 commit 0affd96

File tree

4 files changed

+19
-1
lines changed

4 files changed

+19
-1
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
controller:
2+
watchIngressWithoutClass: true
3+
ingressClassResource:
4+
name: custom-nginx
5+
enabled: true
6+
default: true
7+
controllerValue: "k8s.io/custom-nginx"

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

+3
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,9 @@ spec:
111111
{{- if not (eq .Values.controller.healthCheckPath "/healthz") }}
112112
- --health-check-path={{ .Values.controller.healthCheckPath }}
113113
{{- end }}
114+
{{- if .Values.controller.watchIngressWithoutClass }}
115+
- --watch-ingress-without-class=true
116+
{{- end }}
114117
{{- range $key, $value := .Values.controller.extraArgs }}
115118
{{- /* Accept keys without values or with false as value */}}
116119
{{- if eq ($value | quote | len) 2 }}

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

+4-1
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,9 @@ spec:
112112
{{- if not (eq .Values.controller.healthCheckPath "/healthz") }}
113113
- --health-check-path={{ .Values.controller.healthCheckPath }}
114114
{{- end }}
115+
{{- if .Values.controller.watchIngressWithoutClass }}
116+
- --watch-ingress-without-class=true
117+
{{- end }}
115118
{{- range $key, $value := .Values.controller.extraArgs }}
116119
{{- /* Accept keys without values or with false as value */}}
117120
{{- if eq ($value | quote | len) 2 }}
@@ -143,7 +146,7 @@ spec:
143146
{{- end }}
144147
{{- if .Values.controller.extraEnvs }}
145148
{{- toYaml .Values.controller.extraEnvs | nindent 12 }}
146-
{{- end }}
149+
{{- end }}
147150
{{- if .Values.controller.startupProbe }}
148151
startupProbe: {{ toYaml .Values.controller.startupProbe | nindent 12 }}
149152
{{- end }}

charts/ingress-nginx/values.yaml

+5
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,11 @@ controller:
6161
# Ingress status was blank because there is no Service exposing the NGINX Ingress controller in a configuration using the host network, the default --publish-service flag used in standard cloud setups does not apply
6262
reportNodeInternalIp: false
6363

64+
# Process Ingress objects without ingressClass annotation/ingressClassName field
65+
# Overrides value for --watch-ingress-without-class flag of the controller binary
66+
# Defaults to false
67+
watchIngressWithoutClass: false
68+
6469
# Required for use with CNI based kubernetes installations (such as ones set up by kubeadm),
6570
# since CNI and hostport don't mix yet. Can be deprecated once https://github.com/kubernetes/kubernetes/issues/23920
6671
# is merged

0 commit comments

Comments
 (0)