diff --git a/el9/templates/deployment.yaml b/el9/templates/deployment.yaml
index 047ed5672133c8e148b1bb832459314f598b71b1..cfec8268bbbcc83318d6b1df0a76a868c486dc5f 100644
--- a/el9/templates/deployment.yaml
+++ b/el9/templates/deployment.yaml
@@ -68,7 +68,7 @@ spec:
       {{- if .Values.securityContext }}
       securityContext: {{- .Values.securityContext | toYaml | nindent 8 }}
       {{- end }}
-      {{- end }}
+      {{- if .Values.nodeSelector }}
       nodeSelector: {{- .Values.nodeSelector | toYaml | nindent 8 }}
       {{- end }}
       {{- if .Values.tolerations }}