From: John Mulligan Date: Tue, 21 Mar 2023 15:42:25 +0000 (-0400) Subject: mgr/cephadm: add enable_haproxy_protocol to ingress and nfs service specs X-Git-Tag: v19.0.0~1098^2~9 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=5691def1f8634e4e0a55b313febea1fd0d8cb41a;p=ceph.git mgr/cephadm: add enable_haproxy_protocol to ingress and nfs service specs Add a new boolean field, enable_haproxy_protocol, to both the ingress service spec and the nfs service spec. The ingress service spec needs the field to tell haproxy to enable proxy protocol (v2) support. The nfs service spec needs the field to allow the nfs server to accept proxy protocol messages. Signed-off-by: John Mulligan --- diff --git a/src/python-common/ceph/deployment/service_spec.py b/src/python-common/ceph/deployment/service_spec.py index df99e3bbee20..4937318261a5 100644 --- a/src/python-common/ceph/deployment/service_spec.py +++ b/src/python-common/ceph/deployment/service_spec.py @@ -811,6 +811,7 @@ class NFSServiceSpec(ServiceSpec): networks: Optional[List[str]] = None, port: Optional[int] = None, virtual_ip: Optional[str] = None, + enable_haproxy_protocol: bool = False, extra_container_args: Optional[List[str]] = None, extra_entrypoint_args: Optional[List[str]] = None, custom_configs: Optional[List[CustomConfig]] = None, @@ -824,6 +825,7 @@ class NFSServiceSpec(ServiceSpec): self.port = port self.virtual_ip = virtual_ip + self.enable_haproxy_protocol = enable_haproxy_protocol def get_port_start(self) -> List[int]: if self.port: @@ -1054,6 +1056,7 @@ class IngressSpec(ServiceSpec): unmanaged: bool = False, ssl: bool = False, keepalive_only: bool = False, + enable_haproxy_protocol: bool = False, extra_container_args: Optional[List[str]] = None, extra_entrypoint_args: Optional[List[str]] = None, custom_configs: Optional[List[CustomConfig]] = None, @@ -1085,6 +1088,7 @@ class IngressSpec(ServiceSpec): self.unmanaged = unmanaged self.ssl = ssl self.keepalive_only = keepalive_only + self.enable_haproxy_protocol = enable_haproxy_protocol def get_port_start(self) -> List[int]: ports = []