]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/cephadm: add enable_haproxy_protocol to ingress and nfs service specs
authorJohn Mulligan <jmulligan@redhat.com>
Tue, 21 Mar 2023 15:42:25 +0000 (11:42 -0400)
committerAdam King <adking@redhat.com>
Thu, 31 Aug 2023 17:36:15 +0000 (13:36 -0400)
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 <jmulligan@redhat.com>
(cherry picked from commit 5691def1f8634e4e0a55b313febea1fd0d8cb41a)

Conflicts:
src/python-common/ceph/deployment/service_spec.py

src/python-common/ceph/deployment/service_spec.py

index 5977ee3236de45fea7f9450176fb1703697bd9fe..e950c48a06dd7ff9edfe891e01eac8173304b343 100644 (file)
@@ -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 = []