]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
cephadm: update additional container daemon form base class methods
authorJohn Mulligan <jmulligan@redhat.com>
Tue, 7 Nov 2023 22:57:43 +0000 (17:57 -0500)
committerJohn Mulligan <jmulligan@redhat.com>
Tue, 14 Nov 2023 21:05:48 +0000 (16:05 -0500)
Fix the function signature for the previously added stub
customize_container_args.
Add methods for customize_process_args and customize_container_envs.
The "process args" are args passed to the daemon process / entrypoint.
Container args are passed to the container engine.
Add a default_entrypoint method to return the default entrypoint for
a particular daemon-in-container.

Signed-off-by: John Mulligan <jmulligan@redhat.com>
src/cephadm/cephadmlib/container_daemon_form.py

index 4da0624698bcc52b362ffcc347546b221eb1b46d..ae8b6afe3c63d470247c0e326dc0d3bd02600aa4 100644 (file)
@@ -55,13 +55,33 @@ class ContainerDaemonForm(DaemonForm):
         """
         pass
 
-    def customize_container_args(self, args: List[str]) -> None:
+    def customize_container_args(
+        self, ctx: CephadmContext, args: List[str]
+    ) -> None:
         """Given a list of container arguments this function can update,
         delete, or otherwise mutate the arguments that the container engine
         will use.
         """
         pass
 
+    def customize_process_args(
+        self, ctx: CephadmContext, args: List[str]
+    ) -> None:
+        """Given a list of arguments for the containerized process, this
+        function can update, delete, or otherwise mutate the arguments that the
+        process will use.
+        """
+        pass
+
+    def customize_container_envs(
+        self, ctx: CephadmContext, envs: List[str]
+    ) -> None:
+        """Given a list of environment vars this function can update, delete,
+        or otherwise mutate the environment variables that are passed by the
+        container engine to the processes it executes.
+        """
+        pass
+
     def customize_container_endpoints(
         self, endpoints: List[EndPoint], deployment_type: DeploymentType
     ) -> None:
@@ -84,3 +104,9 @@ class ContainerDaemonForm(DaemonForm):
         expected to understand this.
         """
         return None
+
+    def default_entrypoint(self) -> str:
+        """Return the default entrypoint value when running a deamon process
+        in a container.
+        """
+        return ''