]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
pybind/mgr/cephadm: add init_containers field to CephadmDaemonDeploySpec
authorJohn Mulligan <jmulligan@redhat.com>
Thu, 15 Jun 2023 18:39:48 +0000 (14:39 -0400)
committerJohn Mulligan <jmulligan@redhat.com>
Wed, 9 Aug 2023 17:48:07 +0000 (13:48 -0400)
This will permit the transfer of init_containers from a spec to the
structure that actually generates the deploy JSON.

Signed-off-by: John Mulligan <jmulligan@redhat.com>
src/pybind/mgr/cephadm/services/cephadmservice.py

index bdaf9efbb681c34ccad8d44e5aea849b639af521..625f7604871b0437d573818bfac2ac92088cba94 100644 (file)
@@ -14,6 +14,7 @@ from ceph.deployment.service_spec import (
     ArgumentList,
     CephExporterSpec,
     GeneralArgList,
+    InitContainerSpec,
     MONSpec,
     RGWSpec,
     ServiceSpec,
@@ -70,6 +71,7 @@ class CephadmDaemonDeploySpec:
                  rank_generation: Optional[int] = None,
                  extra_container_args: Optional[ArgumentList] = None,
                  extra_entrypoint_args: Optional[ArgumentList] = None,
+                 init_containers: Optional[List[InitContainerSpec]] = None,
                  ):
         """
         A data struction to encapsulate `cephadm deploy ...
@@ -109,6 +111,7 @@ class CephadmDaemonDeploySpec:
 
         self.extra_container_args = extra_container_args
         self.extra_entrypoint_args = extra_entrypoint_args
+        self.init_containers = init_containers
 
     def __setattr__(self, name: str, value: Any) -> None:
         if value is not None and name in ('extra_container_args', 'extra_entrypoint_args'):
@@ -243,6 +246,7 @@ class CephadmService(metaclass=ABCMeta):
                 spec, 'extra_container_args') else None,
             extra_entrypoint_args=spec.extra_entrypoint_args if hasattr(
                 spec, 'extra_entrypoint_args') else None,
+            init_containers=getattr(spec, 'init_containers', None),
         )
 
     def prepare_create(self, daemon_spec: CephadmDaemonDeploySpec) -> CephadmDaemonDeploySpec: