-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[Fleet] Create new API to manage download_source setting #134889
Conversation
Pinging @elastic/fleet (Team:Fleet) |
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.
I don't really have any problems with the code - it's mostly boilerplate API CRUD stuff and lines up with basically every other API resource we have, so all looks good there.
I do have one question about the source_id
field. It seems like this is pulled from outputs which define an output_id
field, but I'm struggling to understand why we need that, especially since we set the saved objects' id
and source_id
to the same values on create.
Do you have any context around why we'd need these two attributes rather than just relying on id
?
@elasticmachine merge upstream |
💚 Build SucceededMetrics [docs]Module Count
Public APIs missing comments
Page load bundle
Saved Objects .kibana field count
History
To update your PR or re-run it, just comment with: cc @criamico |
Summary
First part of #133828
/api/fleet/agent_download_sources
around managing agent download sources. It will allow the user to specify the address of a custom registry where the agent can be downloaded from. The default value isartifactory.elastic.co
, but the user can change the default to another value, however only one default can exist.downloadSourceService
AgentPolicyService
to handle the new download sources values in agent policies.There will be a subsequent PR to update the compilation logic of
elastic-agent.yml
.It was decided to not add it to
/settings
api to maintain a similar structure tooutputs
, so it was added a new saved objectingest-download-sources
.Endpoints:
GET api/fleet/agent_download_sources
- On a fresh start of fleet this should returnGet single entry:
GET /api/fleet/agent_download_sources/{sourceId}
Create a new entry:
Update existing entry:
DELETE kbn:/api/fleet/agent_download_sources/{sourceId}
Checklist