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] Create default Fleet Server policy with fleet server package #90973

Merged

Conversation

nchaulet
Copy link
Member

@nchaulet nchaulet commented Feb 10, 2021

Summary

Resolve #90628

This create a Default Fleet Server policy during the setup (open to better naming :)) with the Fleet server package installed.

The policy is also created in the .fleet-policies indice with the flag default_fleet_server:true

Screen Shot 2021-02-10 at 3 25 52 PM

Open discussion

I am wondering if we should evolve our datastructure for Agent Policy it start to be weird with all is_default is_managed, is_default_fleet_server and if we should maybe have something like a property tags that define the special feature of a policy like this tags: ['default']

@nchaulet nchaulet added release_note:skip Skip the PR/issue when compiling release notes v7.12.0 v8.0.0 labels Feb 10, 2021
@nchaulet nchaulet self-assigned this Feb 10, 2021
@nchaulet nchaulet added the Team:Fleet Team label for Observability Data Collection Fleet team label Feb 10, 2021
@nchaulet nchaulet marked this pull request as ready for review February 10, 2021 20:28
@nchaulet nchaulet requested a review from a team as a code owner February 10, 2021 20:28
@elasticmachine
Copy link
Contributor

Pinging @elastic/fleet (Team:Fleet)

@jen-huang jen-huang self-requested a review February 11, 2021 20:37
@ruflin
Copy link
Contributor

ruflin commented Feb 15, 2021

  • Can we delay the discussion around tags to separate it from this PR?
  • @mostlyjason You will enjoy the naming discussion around the default policy name ;-). Lets not block on it as I assume we can update it at any time but lets make sure we come to a conclusion quickly.

@nchaulet
Copy link
Member Author

@elasticmachine merge upstream

@nchaulet
Copy link
Member Author

Can we delay the discussion around tags to separate it from this PR?

Totally we should not change the data model right now, I am just suggesting we start to thing about it.

@nchaulet nchaulet requested review from skh and jfsiii February 15, 2021 15:59
@skh
Copy link
Contributor

skh commented Feb 16, 2021

Please add some instructions how to test this. When I run this, and open the Fleet UI to trigger the setup, no fleet-server policy is created, and I don't see Fleet Server in the list of installed packages. Maybe I shouldn't because it's hidden? What am I missing?


Edited to add: I was missing xpack.fleet.agents.fleetServerEnabled: true. Thanks for the test description in #90658 .

Copy link
Contributor

@skh skh left a comment

Choose a reason for hiding this comment

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

This works as described. When xpack.fleet.agents.fleetServerEnabled is set to true, the fleet server package is installed during setup, and a default fleet server policy is created.

@nchaulet
Copy link
Member Author

@elasticmachine merge upstream

@nchaulet nchaulet enabled auto-merge (squash) February 16, 2021 15:46
@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
fleet 366.6KB 367.2KB +605.0B

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/development-plugin-saved-objects.html#_mappings

id before after diff
ingest-agent-policies 12 13 +1

History

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release_note:skip Skip the PR/issue when compiling release notes Team:Fleet Team label for Observability Data Collection Fleet team v7.12.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Fleet] Default policy for fleet server
5 participants