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: v18.2.1~326^2~21 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=6dd79dacdd3c0f00e7959a89bd74969ade8cfbde;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 (cherry picked from commit 5691def1f8634e4e0a55b313febea1fd0d8cb41a) Conflicts: src/python-common/ceph/deployment/service_spec.py --- diff --git a/src/python-common/ceph/deployment/service_spec.py b/src/python-common/ceph/deployment/service_spec.py index 5977ee3236de4..e950c48a06dd7 100644 --- a/src/python-common/ceph/deployment/service_spec.py +++ b/src/python-common/ceph/deployment/service_spec.py @@ -950,6 +950,7 @@ class NFSServiceSpec(ServiceSpec): virtual_ip: Optional[str] = None, extra_container_args: Optional[GeneralArgList] = None, extra_entrypoint_args: Optional[GeneralArgList] = None, + enable_haproxy_protocol: bool = False, custom_configs: Optional[List[CustomConfig]] = None, ): assert service_type == 'nfs' @@ -961,6 +962,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: @@ -1287,6 +1289,7 @@ class IngressSpec(ServiceSpec): keepalive_only: bool = False, extra_container_args: Optional[GeneralArgList] = None, extra_entrypoint_args: Optional[GeneralArgList] = None, + enable_haproxy_protocol: bool = False, custom_configs: Optional[List[CustomConfig]] = None, ): assert service_type == 'ingress' @@ -1316,6 +1319,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 = []