@ -153,7 +153,9 @@ waitOnline:
} ,
} ,
} ,
} ,
}
}
authkey , _ , err := tsClient . CreateKey ( ctx , caps )
// zeroSeconds adopts the default expiration time.
zeroSeconds := time . Duration ( 0 * time . Second )
authkey , _ , err := tsClient . CreateKey ( ctx , caps , zeroSeconds )
if err != nil {
if err != nil {
startlog . Fatalf ( "creating operator authkey: %v" , err )
startlog . Fatalf ( "creating operator authkey: %v" , err )
}
}
@ -287,7 +289,7 @@ type ServiceReconciler struct {
}
}
type tsClient interface {
type tsClient interface {
CreateKey ( ctx context . Context , caps tailscale . KeyCapabilities ) ( string , * tailscale . Key , error )
CreateKey ( ctx context . Context , caps tailscale . KeyCapabilities , expiry time . Duration ) ( string , * tailscale . Key , error )
DeleteDevice ( ctx context . Context , id string ) error
DeleteDevice ( ctx context . Context , id string ) error
}
}
@ -593,7 +595,9 @@ func (a *ServiceReconciler) newAuthKey(ctx context.Context, tags []string) (stri
} ,
} ,
} ,
} ,
}
}
key , _ , err := a . tsClient . CreateKey ( ctx , caps )
zeroDuration := time . Duration ( 0 )
key , _ , err := a . tsClient . CreateKey ( ctx , caps , zeroDuration )
if err != nil {
if err != nil {
return "" , err
return "" , err
}
}