Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
errors: Recommend Helm-specific knob on proxy-misconfiguration page.
Alex Vandiver86eddecabcd8
diff --git a/templates/zerver/config_error/proxy.html b/templates/zerver/config_error/proxy.htmlindex 1ea2ed7b148..aacb22de2fd 100644--- a/templates/zerver/config_error/proxy.html+++ b/templates/zerver/config_error/proxy.html@@ -1,6 +1,8 @@{% extends "zerver/config_error/container.html" %}{% macro setting() -%}- {%- if docker_config -%}+ {%- if helm_config -%}+ <code>zulip.environment.LOADBALANCER_IPS</code> in your Helm values+ {%- elif docker_config -%}<code>LOADBALANCER_IPS</code> in your Docker image's environment{%- else -%}<code>ips</code> in the <code>[loadbalancer]</code> section of <code>/etc/zulip/zulip.conf</code>diff --git a/zerver/middleware.py b/zerver/middleware.pyindex 66a5b784f20..217108eed4d 100644--- a/zerver/middleware.py+++ b/zerver/middleware.py@@ -697,6 +697,7 @@ class DetectProxyMisconfiguration(MiddlewareMixin):"x_forwarded_for": request.headers.get("X-Forwarded-For"),"x_forwarded_proto": request.headers.get("X-Forwarded-Proto"),"remote_addr": request.META["REMOTE_ADDR"],+ "helm_config": settings.RUNNING_IN_HELM,"docker_config": settings.RUNNING_IN_DOCKERand os.environ.get("MANUAL_CONFIGURATION") != "True","all_headers": list(request.headers.items()),diff --git a/zproject/default_settings.py b/zproject/default_settings.pyindex 983d1c1a80d..7ba59d15f85 100644--- a/zproject/default_settings.py+++ b/zproject/default_settings.py@@ -424,6 +424,12 @@ DEVELOPMENT_DISABLE_PUSH_BOUNCER_DOMAIN_CHECK = False# one or a handful of realms, though they might on an installation# like Zulip Cloud or to work around a problem on another server.+# Set to True by the docker-zulip Helm chart via SETTING_RUNNING_IN_HELM, so that+# error messages can recommend Helm-specific knobs (e.g. setting LOADBALANCER_IPS+# via `zulip.environment.LOADBALANCER_IPS` in values) instead of bare env vars+# the operator has no direct way to set under Helm.+RUNNING_IN_HELM = False+NOTIFICATION_BOT = "[email protected]"EMAIL_GATEWAY_BOT = "[email protected]"NAGIOS_SEND_BOT = "[email protected]"