Skip to content

Commit

Permalink
Disable periodic functions that are not required for dashboards (#46577)
Browse files Browse the repository at this point in the history
There's no need for our many dashboard tenants to periodically
check for releases on GitHub (we keep these up to date automatically),
check for nodes with missing heartbeats (there are no nodes allowed
on dashboards), or to check for dynamic labels in deny rules
(users don't get to create or edit roles in dashboards).
  • Loading branch information
zmb3 authored Sep 17, 2024
1 parent 3b8dd51 commit 67a82ef
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion lib/auth/auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -1315,6 +1315,14 @@ func (a *Server) runPeriodicOperations() {
go a.periodicSyncUpgradeWindowStartHour()
}

// disable periodics that are not required for cloud dashboard tenants
if services.IsDashboard(*modules.GetModules().Features().ToProto()) {
releaseCheck.Stop()
localReleaseCheck.Stop()
heartbeatCheckTicker.Stop()
dynamicLabelsCheck.Stop()
}

for {
select {
case <-a.closeCtx.Done():
Expand Down Expand Up @@ -1460,7 +1468,7 @@ const (
)

// syncReleaseAlerts calculates alerts related to new teleport releases. When checkRemote
// is true it pulls the latest release info from github. Otherwise, it loads the versions used
// is true it pulls the latest release info from GitHub. Otherwise, it loads the versions used
// for the most recent alerts and re-syncs with latest cluster state.
func (a *Server) syncReleaseAlerts(ctx context.Context, checkRemote bool) {
log.Debug("Checking for new teleport releases via github api.")
Expand Down

0 comments on commit 67a82ef

Please sign in to comment.