Skip to content

Commit

Permalink
fix: deployment restart not working
Browse files Browse the repository at this point in the history
  • Loading branch information
davidgiga1993 committed Nov 23, 2023
1 parent 630f054 commit 1b2feae
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions octoploy/api/Oc.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,12 +83,13 @@ def rollout(self, name: str, namespace: Optional[str] = None):
raise NotImplemented

@abstractmethod
def exec(self, pod_name: str, cmd: str, args: List[str]):
def exec(self, pod_name: str, cmd: str, args: List[str], namespace: Optional[str] = None):
"""
Executes a command in the given pod
:param pod_name: Pod name
:param cmd: Command
:param args: Arguments
:param namespace: Namespace
"""
raise NotImplemented

Expand Down Expand Up @@ -244,7 +245,7 @@ def _get_bin(self) -> str:

class K8(Oc):
def rollout(self, name: str, namespace: Optional[str] = None):
self._exec(['rollout', 'restart', name], namespace=namespace)
self._exec(['rollout', 'restart', 'deployment', name], namespace=namespace)

def tag(self, source: str, dest: str, namespace: Optional[str] = None):
raise NotImplemented('Not available for k8')
Expand Down

0 comments on commit 1b2feae

Please sign in to comment.