From 5691def1f8634e4e0a55b313febea1fd0d8cb41a Mon Sep 17 00:00:00 2001 From: John Mulligan Date: Tue, 21 Mar 2023 11:42:25 -0400 Subject: [PATCH] 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 --- src/python-common/ceph/deployment/service_spec.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/python-common/ceph/deployment/service_spec.py b/src/python-common/ceph/deployment/service_spec.py index df99e3bbee2..4937318261a 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 = [] -- 2.39.5