diff --git a/agent/container/pkg/clients/nats_client.go b/agent/container/pkg/clients/nats_client.go index d087bb6c..7d824da4 100755 --- a/agent/container/pkg/clients/nats_client.go +++ b/agent/container/pkg/clients/nats_client.go @@ -59,11 +59,11 @@ func NewNATSContext(conf *config.Config) (*NATSContext, error) { } else { conn, err = nats.Connect(conf.NatsAddress, nats.Name("Github metrics"), - nats.Token(conf.NatsToken), + //nats.Token(conf.NatsToken), nats.Secure(tlsConfig), ) if err != nil { - log.Println("error while connecting with mtls ", err) + log.Fatal("error while connecting with mtls ", err) } } diff --git a/agent/git/pkg/clients/nats_client.go b/agent/git/pkg/clients/nats_client.go index 7d6830b4..e28b5104 100644 --- a/agent/git/pkg/clients/nats_client.go +++ b/agent/git/pkg/clients/nats_client.go @@ -49,11 +49,11 @@ func NewNATSContext(conf *config.Config) (*NATSContext, error) { } else { conn, err = nats.Connect(conf.NatsAddress, nats.Name("Github metrics"), - nats.Token(conf.NatsToken), + //nats.Token(conf.NatsToken), nats.Secure(tlsConfig), ) if err != nil { - log.Println("error while connecting with mtls ", err) + log.Fatal("error while connecting with mtls ", err) } } diff --git a/agent/kubviz/k8smetrics_agent.go b/agent/kubviz/k8smetrics_agent.go index d0c0c7f6..aa0facad 100644 --- a/agent/kubviz/k8smetrics_agent.go +++ b/agent/kubviz/k8smetrics_agent.go @@ -89,11 +89,11 @@ func main() { nc, err = nats.Connect( natsurl, nats.Name("K8s Metrics"), - nats.Token(token), + //nats.Token(token), nats.Secure(tlsConfig), ) if err != nil { - log.Println("error while connecting with mtls ", err) + log.Fatal("error while connecting with mtls ", err) } } diff --git a/client/pkg/clients/clients.go b/client/pkg/clients/clients.go index bee3fa2e..344e62d6 100644 --- a/client/pkg/clients/clients.go +++ b/client/pkg/clients/clients.go @@ -36,11 +36,11 @@ func NewNATSContext(conf *config.Config, dbClient clickhouse.DBInterface) (*NATS } else { conn, err = nats.Connect(conf.NatsAddress, nats.Name("Github metrics"), - nats.Token(conf.NatsToken), + //nats.Token(conf.NatsToken), nats.Secure(tlsConfig), ) if err != nil { - log.Println("error while connecting with mtls ", err) + log.Fatal("error while connecting with mtls ", err) } } }