This commit is contained in:
Irbe Krumina 2024-04-26 23:04:55 -06:00 committed by GitHub
commit b509dcad34
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 5 additions and 0 deletions

View File

@ -129,9 +129,14 @@ func initTSNet(zlog *zap.SugaredLogger) (*tsnet.Server, *tailscale.Client) {
tsClient := tailscale.NewClient("-", nil)
tsClient.HTTPClient = credentials.Client(context.Background())
configDir, err := os.MkdirTemp(os.TempDir(), "tsnet-config")
if err != nil {
startlog.Fatalf("error creating config directory for tsnet: %v", err)
}
s := &tsnet.Server{
Hostname: hostname,
Logf: zlog.Named("tailscaled").Debugf,
Dir: configDir,
}
if kubeSecret != "" {
st, err := kubestore.New(logger.Discard, kubeSecret)