Skip to content

Commit

Permalink
Fix mTLS issue
Browse files Browse the repository at this point in the history
  • Loading branch information
Nithunikzz committed Apr 26, 2024
1 parent d8dcc84 commit a6f238d
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions agent/container/pkg/clients/nats_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}

Expand Down
4 changes: 2 additions & 2 deletions agent/git/pkg/clients/nats_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}

Expand Down
4 changes: 2 additions & 2 deletions agent/kubviz/k8smetrics_agent.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}

Expand Down
4 changes: 2 additions & 2 deletions client/pkg/clients/clients.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}
}
Expand Down

0 comments on commit a6f238d

Please sign in to comment.