Bypass kind cluster create for remote k8s case

This commit is contained in:
David Boreham 2023-11-18 16:20:03 -07:00
parent 8dc23a4eed
commit f1345a5fcf

View File

@ -52,8 +52,9 @@ class K8sDeployer(Deployer):
self.apps_api = client.AppsV1Api() self.apps_api = client.AppsV1Api()
def up(self, detach, services): def up(self, detach, services):
# Create the kind cluster if self.is_kind():
create_cluster(self.kind_cluster_name, self.deployment_dir.joinpath("kind-config.yml")) # Create the kind cluster
create_cluster(self.kind_cluster_name, self.deployment_dir.joinpath("kind-config.yml"))
self.connect_api() self.connect_api()
# Ensure the referenced containers are copied into kind # Ensure the referenced containers are copied into kind
load_images_into_kind(self.kind_cluster_name, self.cluster_info.image_set) load_images_into_kind(self.kind_cluster_name, self.cluster_info.image_set)
@ -92,8 +93,9 @@ class K8sDeployer(Deployer):
def down(self, timeout, volumes): def down(self, timeout, volumes):
# Delete the k8s objects # Delete the k8s objects
# Destroy the kind cluster if self.is_kind():
destroy_cluster(self.kind_cluster_name) # Destroy the kind cluster
destroy_cluster(self.kind_cluster_name)
def ps(self): def ps(self):
self.connect_api() self.connect_api()