Skip to content

Commit

Permalink
fix: dns_search as list
Browse files Browse the repository at this point in the history
  • Loading branch information
SteinRobert committed Mar 6, 2024
1 parent 4ff7cc1 commit 297c9c7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
4 changes: 3 additions & 1 deletion client/gefyra/api/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,9 @@ def run(
else:
ns_source = "--namespace argument"

dns_search = f"{namespace}.svc.cluster.local svc.cluster.local cluster.local k8s"
dns_search = (
f"{namespace}.svc.cluster.local svc.cluster.local cluster.local k8s".split(" ")
)
#
# Confirm the wireguard connection working
#
Expand Down
8 changes: 4 additions & 4 deletions client/gefyra/local/bridge.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def handle_create_gefyrabridge(config: ClientConfiguration, body, target: str):
if e.status == 409:
raise RuntimeError(f"Workload {target} already bridged.")
logger.error(
f"A Kubernetes API Error occured. \nReason:{e.reason} \nBody:{e.body}"
f"A Kubernetes API Error occured. \nReason: {e.reason} \nBody: {e.body}"
)
raise e from None
return ireq
Expand Down Expand Up @@ -139,7 +139,7 @@ def deploy_app_container(
ports: Optional[Dict] = None,
env: Optional[Dict] = None,
auto_remove: bool = False,
dns_search: str = "default",
dns_search: List[str] = ["default"],
) -> Container:
import docker

Expand All @@ -155,10 +155,10 @@ def deploy_app_container(
"ports": ports,
"detach": True,
"dns": [config.STOWAWAY_IP],
"dns_search": [dns_search],
"dns_search": dns_search,
"auto_remove": auto_remove,
"environment": env,
"pid_mode": f"container:{config.CARGO_CONTAINER_NAME}",
"pid_mode": f"container:{config.CARGO_CONTAINER_NAME}", # noqa: E231
}
not_none_kwargs = {k: v for k, v in all_kwargs.items() if v is not None}

Expand Down

0 comments on commit 297c9c7

Please sign in to comment.