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] Fix xpack.agents.* to not be editable in UI if defined in kibana.yml #135669

Merged

Conversation

nchaulet
Copy link
Member

@nchaulet nchaulet commented Jul 4, 2022

Description

Resolve #105400

That PR change the behavior of the xpack.agents.* (fleet server hosts and elasticsearch hosts) to allow user to update these value from kibana config.

If these fields are set in Kibana config it will not be possible to update these settings in the UI.

For this I introduced a new property preconfigured_fields in the settings for fleet server hosts and for elasticsearch hosts, the output will be treated as a preconfigured output.

Release notes

If a user setxpack.fleet.agents.fleet_server.hosts and xpack.fleet.agents.elasticsearch.hosts fields in Kibana config these fields will not be updatable from the Fleet UI but only from the Kibana config file.

UI Change

Fleet server hosts

Screen Shot 2022-07-04 at 2 28 14 PM

Screen Shot 2022-07-04 at 2 28 09 PM

Elasticsearch hosts

Screen Shot 2022-07-05 at 9 58 55 AM

How to test?

You can tests that by adding these entries to your kibana config file it creates preconfigured output and settings that you cannot edit from the UI and if you remove these fields from the config they become editable

xpack.fleet.agents.fleet_server.hosts: ['http://toto.fr']
xpack.fleet.agents.elasticsearch.hosts: ['http://toto.fr']

@nchaulet nchaulet added Team:Fleet Team label for Observability Data Collection Fleet team v8.4.0 labels Jul 4, 2022
@nchaulet nchaulet self-assigned this Jul 4, 2022
@nchaulet nchaulet changed the title [Fleet] Fix preconfigured Fleet server or es hosts to not be editable… [Fleet] Fix xpack.agents.* to not be editable in UI if defined in kibana.yml Jul 4, 2022
@nchaulet nchaulet marked this pull request as ready for review July 5, 2022 13:59
@nchaulet nchaulet requested a review from a team as a code owner July 5, 2022 13:59
@elasticmachine
Copy link
Contributor

Pinging @elastic/fleet (Team:Fleet)

@nchaulet nchaulet added the release_note:skip Skip the PR/issue when compiling release notes label Jul 5, 2022
@kpollich kpollich self-requested a review July 5, 2022 16:18
@nchaulet nchaulet added release_note:breaking and removed release_note:skip Skip the PR/issue when compiling release notes labels Jul 5, 2022
content={
<FormattedMessage
id="xpack.fleet.settings.fleetServerHostsPreconfiguredTooltipContent"
defaultMessage="Fleet Server hosts are configured outside of Fleet. Refer to your kibana config for more detail"
Copy link
Contributor

Choose a reason for hiding this comment

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

nit:more detail-> more details.

Copy link
Contributor

@juliaElastic juliaElastic left a comment

Choose a reason for hiding this comment

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

Code LGTM

@nchaulet
Copy link
Member Author

nchaulet commented Jul 7, 2022

@elasticmachine merge upstream

@kibana-ci
Copy link
Collaborator

💚 Build Succeeded

Metrics [docs]

Public APIs missing comments

Total count of every public API that lacks a comment. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats comments for more detailed information.

id before after diff
fleet 1376 1377 +1

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
fleet 842.9KB 843.5KB +553.0B
Unknown metric groups

API count

id before after diff
fleet 1507 1508 +1

History

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

cc @nchaulet

@nchaulet nchaulet merged commit 818f33f into elastic:main Jul 7, 2022
@kibanamachine kibanamachine added the backport:skip This commit does not require backporting label Jul 7, 2022
@nchaulet nchaulet deleted the feature-preconfigure-es-fleet-server-hosts branch July 7, 2022 19:02
@maggieghamry
Copy link
Contributor

@nchaulet will there be any backported versions added for this issue, or a documented workaround for folks not able to upgrade to 8.4?

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:breaking Team:Fleet Team label for Observability Data Collection Fleet team v8.4.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Fleet] Kibana ignores new values of xpack.fleet.agent.* keys in the config
6 participants