From e04bb9cb236e20829f8ad99b9f20319105c75901 Mon Sep 17 00:00:00 2001 From: Cappy Ishihara Date: Mon, 11 Dec 2023 17:32:44 +0700 Subject: [PATCH] revert some changes, for debugging --- example/whoami.yaml | 4 ++-- src/daemon.rs | 2 +- src/deployment.rs | 8 +++++++- src/main.rs | 1 + 4 files changed, 11 insertions(+), 4 deletions(-) diff --git a/example/whoami.yaml b/example/whoami.yaml index 1cc115e..cb6190a 100644 --- a/example/whoami.yaml +++ b/example/whoami.yaml @@ -3,8 +3,8 @@ kind: Deployment metadata: name: whoami namespace: default - annotations: - chisel-operator.io/exit-node-name: "my-exit-node" + # annotations: + # chisel-operator.io/exit-node-name: "my-exit-node" spec: replicas: 1 selector: diff --git a/src/daemon.rs b/src/daemon.rs index f0dd412..c683d97 100644 --- a/src/daemon.rs +++ b/src/daemon.rs @@ -277,7 +277,7 @@ async fn reconcile_svcs(obj: Arc, ctx: Arc) -> Result String { /// values obtained from the `node` parameter. pub async fn generate_remote_arg(node: &ExitNode) -> String { // todo: what about ECDSA keys? - format!("{}:{}", node.get_host().await, node.spec.port) + + let host = node.get_host().await; + + debug!(host = ?host, "Host"); + let output = format!("{}:{}", host, node.spec.port); + debug!(output = ?output, "Output"); + output } /// This function generates arguments for a tunnel based on a given service. diff --git a/src/main.rs b/src/main.rs index b4ccd38..d253042 100644 --- a/src/main.rs +++ b/src/main.rs @@ -69,6 +69,7 @@ async fn main() -> Result<()> { let env_filter = EnvFilter::try_from_default_env().or_else(|_| EnvFilter::try_new("info"))? .add_directive("tower=off".parse().unwrap()) .add_directive("hyper=error".parse().unwrap()) + .add_directive("kube_client=error".parse().unwrap()) .add_directive("tokio_util=error".parse().unwrap()); // let telemetry = tracing_opentelemetry::layer().with_tracer(init_tracer().await);