]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/cephadm: add optional HAProxy_Hosts field to ganesha conf template
authorJohn Mulligan <jmulligan@redhat.com>
Tue, 21 Mar 2023 15:42:25 +0000 (11:42 -0400)
committerJohn Mulligan <jmulligan@redhat.com>
Fri, 26 May 2023 14:43:11 +0000 (10:43 -0400)
When NFS-Ganesha is used behind a HAProxy with proxy protocol support
enabled ganesha requires that HAProxy_Hosts is set to a list of hosts
that are permitted to use the proxy protocol. This change adds support
for specifying HAProxy_Hosts in the ganesha configuration file template.

Signed-off-by: John Mulligan <jmulligan@redhat.com>
src/pybind/mgr/cephadm/templates/services/nfs/ganesha.conf.j2

index 9d6e15f1c4f7111036384e269898f16501069732..ab8df71923b495c5d92741140cb409a4e0215d8e 100644 (file)
@@ -7,6 +7,9 @@ NFS_CORE_PARAM {
 {% if bind_addr %}
         Bind_addr = {{ bind_addr }};
 {% endif %}
+{% if haproxy_hosts %}
+        HAProxy_Hosts = {{ haproxy_hosts|join(", ") }};
+{% endif %}
 }
 
 NFSv4 {