-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement immediate schedule support for automatic updates #47920
Implement immediate schedule support for automatic updates #47920
Conversation
24f99fe
to
dd79107
Compare
// AgentVersion defines the version of teleport that agents enrolled into autoupdates should run. | ||
AgentVersion string `json:"agent_version"` | ||
// AgentAutoUpdate indicates if the requesting agent should attempt to update now. | ||
AgentAutoUpdate bool `json:"agent_auto_update"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Noticing that this is inconsistent with the tools_mode
field that has the same meaning.
@vapopov The _mode
fields were intended for configuration, not for the command sent to clients/agents. Could we change ToolsMode string
to ToolsAutoUpdate bool
to match this PR?
@hugoShaka would it make sense to add the Teleport edition and FIPS compliance status to this PR? |
0586a36
to
28c3899
Compare
lib/web/apiserver.go
Outdated
} | ||
|
||
autoUpdateConfig, err := h.cfg.AccessPoint.GetAutoUpdateConfig(r.Context()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This (or the new implementation) should 100% not be in the path for /webapi/find
like this, it's bad enough that we are doing any work in the find handler right now (with GetProxySettings
and the recent addition of GetAuthPreference
) - find is rate-unlimited and it's called far too often by basically every cluster component and client.
Maybe this could be the occasion to finally add a FnCache
with a few seconds of TTL for the object about to be returned? Any per-request personalization can then be added with a shallow clone if necessary.
28c3899
to
b07a437
Compare
This PR adds support for the agent automatic update immediate schedule.
Part of #47126
This PR adds the proxy response for the agent. Currently only the immediate schedule is supported because we don't have the
autoupdate_agent_rollout
reconciler yet.This also fixes an issue introduced in #48016 whwre the wrong context was used in the cached function.