Skip to content
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

Merged
merged 4 commits into from
Oct 29, 2024

Conversation

hugoShaka
Copy link
Contributor

@hugoShaka hugoShaka commented Oct 24, 2024

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.

@hugoShaka hugoShaka requested review from sclevine and vapopov October 24, 2024 21:06
@hugoShaka hugoShaka added the no-changelog Indicates that a PR does not require a changelog entry label Oct 24, 2024
@github-actions github-actions bot requested review from kiosion and ravicious October 24, 2024 21:07
@hugoShaka hugoShaka force-pushed the hugo/initial-proxy-agent-update-implementation branch from 24f99fe to dd79107 Compare October 24, 2024 21:35
lib/web/apiserver.go Outdated Show resolved Hide resolved
Base automatically changed from hugo/fix-automatic-update-tools-default to master October 24, 2024 23:05
// 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"`
Copy link
Member

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?

@sclevine
Copy link
Member

@hugoShaka would it make sense to add the Teleport edition and FIPS compliance status to this PR?

@hugoShaka hugoShaka force-pushed the hugo/initial-proxy-agent-update-implementation branch from 0586a36 to 28c3899 Compare October 25, 2024 15:42
@hugoShaka hugoShaka requested a review from espadolini October 25, 2024 15:45
}

autoUpdateConfig, err := h.cfg.AccessPoint.GetAutoUpdateConfig(r.Context())
Copy link
Contributor

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.

@hugoShaka hugoShaka mentioned this pull request Oct 28, 2024
@hugoShaka hugoShaka force-pushed the hugo/initial-proxy-agent-update-implementation branch from 28c3899 to b07a437 Compare October 28, 2024 20:34
@hugoShaka hugoShaka requested a review from espadolini October 28, 2024 20:35
@hugoShaka hugoShaka enabled auto-merge October 28, 2024 20:38
@hugoShaka hugoShaka added this pull request to the merge queue Oct 29, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Oct 29, 2024
@hugoShaka hugoShaka added this pull request to the merge queue Oct 29, 2024
Merged via the queue into master with commit 1807dfd Oct 29, 2024
39 checks passed
@hugoShaka hugoShaka deleted the hugo/initial-proxy-agent-update-implementation branch October 29, 2024 15:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
no-changelog Indicates that a PR does not require a changelog entry size/md
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants