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

[Fleet] Add new APIs and preconfiguration for Fleet server hosts per policy #142746

Merged
merged 11 commits into from
Oct 6, 2022

Conversation

nchaulet
Copy link
Member

@nchaulet nchaulet commented Oct 5, 2022

Summary

Related to #137785

That PR add a new saved object fleet-fleet-server-hosts that will allow to get per agent policy Fleet server host.

Add new CRUD Apis to manage Fleet server hosts:

/api/fleet/fleet_server_hosts
/api/fleet/fleet_server_hosts/{itemId}

Screen Shot 2022-10-05 at 11 56 22 AM

Add a new preconfiguration key in kibana config yo manage this hosts:

xpack.fleet.fleetServerHosts:
  - id: fleet123
    name: 'TEST 456'
    is_default: true
    host_urls: ['http://fleetserver:123']

The old kibana config key xpack.fleet.agents.fleet_server.hosts will create a new Fleet server hosts saved object too, to not introduce a breaking change.

Not done in that PR: the saved object is currently not used to build agent policies this will come in a following PR with the UI work.

Todo

  • Add basic API integrations
  • Add API doc

@nchaulet nchaulet added release_note:skip Skip the PR/issue when compiling release notes v8.6.0 labels Oct 5, 2022
@nchaulet nchaulet self-assigned this Oct 5, 2022
@nchaulet nchaulet force-pushed the feature-fleet-server-per-policy branch from 6cafc39 to f3206ce Compare October 5, 2022 13:52
@nchaulet nchaulet changed the title [Fleet] Add new APIs for Fleet server hosts per policy [Fleet] Add new APIs and preconfiguration for Fleet server hosts per policy Oct 5, 2022
@nchaulet nchaulet force-pushed the feature-fleet-server-per-policy branch from f3206ce to b02c2fc Compare October 5, 2022 15:40
@nchaulet nchaulet marked this pull request as ready for review October 5, 2022 15:44
@nchaulet nchaulet requested a review from a team as a code owner October 5, 2022 15:44
@nchaulet nchaulet added the Team:Fleet Team label for Observability Data Collection Fleet team label Oct 5, 2022
@elasticmachine
Copy link
Contributor

Pinging @elastic/fleet (Team:Fleet)

@nchaulet nchaulet requested a review from a team as a code owner October 5, 2022 18:23
@nchaulet nchaulet requested a review from a team as a code owner October 6, 2022 12:51
@nchaulet nchaulet force-pushed the feature-fleet-server-per-policy branch from 15fca3c to c86f5ab Compare October 6, 2022 14:27
Copy link
Contributor

@criamico criamico left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@nchaulet nchaulet enabled auto-merge (squash) October 6, 2022 17:36
@nchaulet nchaulet requested review from mistic and removed request for juliaElastic October 6, 2022 17:37
@nchaulet nchaulet mentioned this pull request Oct 6, 2022
3 tasks
@nchaulet nchaulet removed the request for review from mistic October 6, 2022 17:41
@nchaulet
Copy link
Member Author

nchaulet commented Oct 6, 2022

@elasticmachine merge upstream

@nchaulet
Copy link
Member Author

nchaulet commented Oct 6, 2022

@elasticmachine merge upstream

Copy link
Member

@jbudz jbudz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

packages/kbn-test

@kibana-ci
Copy link
Collaborator

💚 Build Succeeded

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
fleet 770 772 +2

Saved Objects .kibana field count

Every field in each saved object type adds overhead to Elasticsearch. Kibana needs to keep the total field count below Elasticsearch's default limit of 1000 fields. Only specify field mappings for the fields you wish to search on or query. See https://www.elastic.co/guide/en/kibana/master/saved-objects-service.html#_mappings

id before after diff
fleet-fleet-server-host - 5 +5

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

cc @nchaulet

@nchaulet nchaulet merged commit ad95c57 into elastic:main Oct 6, 2022
@kibanamachine kibanamachine added the backport:skip This commit does not require backporting label Oct 6, 2022
WafaaNasr pushed a commit to WafaaNasr/kibana that referenced this pull request Oct 11, 2022
WafaaNasr pushed a commit to WafaaNasr/kibana that referenced this pull request Oct 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:skip This commit does not require backporting release_note:skip Skip the PR/issue when compiling release notes Team:Fleet Team label for Observability Data Collection Fleet team v8.6.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants