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 ability to specify which integration variables should be configurable #97163

Merged
merged 3 commits into from
Apr 14, 2021

Conversation

Zacqary
Copy link
Contributor

@Zacqary Zacqary commented Apr 14, 2021

Summary

Closes #96319

Adds an optional flag called frozen to package policy input vars. When set through the Preconfiguration API, this will make it impossible to edit the specified variable.

This freezes the variable both in the UI and through the update API.

Screen Shot 2021-04-14 at 12 59 04 PM

Note that EuiCodeEditor has no disabled prop, so I had to approximate this for yaml-type variables by conditionally rendering a disabled textarea with similar styling to the code editor:

Screen Shot 2021-04-14 at 12 59 15 PM

Example

In kibana.dev.yml:

xpack.fleet.agentPolicies:
  - name: Preconfigured Policy From Config
    id: 1
    namespace: test
    package_policies:
      - package:
          name: system
        name: System Integration
        inputs:
          - type: system/metrics
            enabled: true
            vars:
              - name: system.hostfs
                value: home/test
                frozen: true
            streams:
              - data_stream:
                  dataset: system.fsstat
                vars:
                  - name: processors
                    frozen: true
              - data_stream:
                  dataset: system.core
                enabled: true
                vars:
                  - name: period
                    value: 20s
                    frozen: true
          - type: winlog
            enabled: false

Checklist

  • Unit or functional tests were updated or added to match the most common scenarios
  • Any UI touched in this PR is usable by keyboard only (learn more about keyboard accessibility)
  • Any UI touched in this PR does not create any new axe failures (run axe in browser: FF, Chrome)
  • This renders correctly on smaller devices using a responsive layout. (You can test this in your browser)

@Zacqary Zacqary added release_note:enhancement v8.0.0 Feature:Fleet Fleet team's agent central management project Team:Fleet Team label for Observability Data Collection Fleet team labels Apr 14, 2021
@Zacqary Zacqary self-assigned this Apr 14, 2021
@Zacqary Zacqary marked this pull request as ready for review April 14, 2021 19:30
@Zacqary Zacqary requested a review from a team as a code owner April 14, 2021 19:30
@elasticmachine
Copy link
Contributor

Pinging @elastic/fleet (Feature:Fleet)

Copy link
Contributor

@jen-huang jen-huang 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, thanks for landing this so quickly 🚀

@ph
Copy link
Contributor

ph commented Apr 14, 2021

Woa @Zacqary this is great thanks for making a quick change!

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

Async chunks

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

id before after diff
fleet 711.5KB 711.8KB +372.0B

History

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

cc @Zacqary

@Zacqary Zacqary merged commit deaa779 into elastic:master Apr 14, 2021
@Zacqary Zacqary deleted the 96319-frozen-vars branch April 14, 2021 22:00
Zacqary added a commit to Zacqary/kibana that referenced this pull request Apr 15, 2021
Zacqary added a commit to Zacqary/kibana that referenced this pull request Apr 15, 2021
Zacqary added a commit that referenced this pull request Apr 16, 2021
madirey pushed a commit to madirey/kibana that referenced this pull request May 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:Fleet Fleet team's agent central management project release_note:enhancement Team:Fleet Team label for Observability Data Collection Fleet team v7.13.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Fleet] Specify which variables should be configurable for an integration per policy
5 participants