Fix lint errors
This commit is contained in:
parent
f60717fbc3
commit
bfc668d64d
@ -58,7 +58,7 @@ def command(ctx, include, exclude, env_file, cluster):
|
|||||||
def create_deploy_context(global_context, stack, include, exclude, cluster, env_file):
|
def create_deploy_context(global_context, stack, include, exclude, cluster, env_file):
|
||||||
cluster_context = _make_cluster_context(global_context, stack, include, exclude, cluster, env_file)
|
cluster_context = _make_cluster_context(global_context, stack, include, exclude, cluster, env_file)
|
||||||
# See: https://gabrieldemarmiesse.github.io/python-on-whales/sub-commands/compose/
|
# See: https://gabrieldemarmiesse.github.io/python-on-whales/sub-commands/compose/
|
||||||
deployer = getDeployer(compose_files=cluster_context.compose_files, compose_project_name=cluster_context.cluster,
|
deployer = getDeployer("docker", compose_files=cluster_context.compose_files, compose_project_name=cluster_context.cluster,
|
||||||
compose_env_file=cluster_context.env_file)
|
compose_env_file=cluster_context.env_file)
|
||||||
return DeployCommandContext(stack, cluster_context, deployer)
|
return DeployCommandContext(stack, cluster_context, deployer)
|
||||||
|
|
||||||
|
@ -18,5 +18,27 @@ from app.deployer import Deployer
|
|||||||
|
|
||||||
|
|
||||||
class K8sDeployer(Deployer):
|
class K8sDeployer(Deployer):
|
||||||
def __init__(self) -> None:
|
def __init__(self, compose_files, compose_project_name, compose_env_file) -> None:
|
||||||
|
config.load_kube_config()
|
||||||
|
self.client = client.CoreV1Api()
|
||||||
|
|
||||||
|
def compose_up(self, detach, services):
|
||||||
|
pass
|
||||||
|
|
||||||
|
def compose_down(self, timeout, volumes):
|
||||||
|
pass
|
||||||
|
|
||||||
|
def compose_ps(self):
|
||||||
|
pass
|
||||||
|
|
||||||
|
def compose_port(self, service, private_port):
|
||||||
|
pass
|
||||||
|
|
||||||
|
def compose_execute(self, service_name, command, envs):
|
||||||
|
pass
|
||||||
|
|
||||||
|
def compose_logs(self, services, tail, follow, stream):
|
||||||
|
pass
|
||||||
|
|
||||||
|
def run(self, image, command, user, volumes, entrypoint=None):
|
||||||
pass
|
pass
|
||||||
|
@ -17,5 +17,8 @@ from app.deploy_k8s import K8sDeployer
|
|||||||
from app.deploy_docker import DockerDeployer
|
from app.deploy_docker import DockerDeployer
|
||||||
|
|
||||||
|
|
||||||
def getDeployer(compose_files, compose_project_name, compose_env_file):
|
def getDeployer(type, compose_files, compose_project_name, compose_env_file):
|
||||||
|
if type == "docker":
|
||||||
return DockerDeployer(compose_files, compose_project_name, compose_env_file)
|
return DockerDeployer(compose_files, compose_project_name, compose_env_file)
|
||||||
|
else:
|
||||||
|
return K8sDeployer(compose_files, compose_project_name, compose_env_file)
|
||||||
|
Loading…
Reference in New Issue
Block a user