Skip to content

Conversation

@mrodm
Copy link
Contributor

@mrodm mrodm commented Apr 24, 2024

Part of #787
Relates elastic/integrations#9660

This PR creates a new Agent Policy just for enrolling purposes.

This allows us to create a new Agent Policy for the testing purpose where all the changes are set before assigning it to the agent (e.g. package data stream). Doing so, agent just receives one update (policy reassign) with the required changes for the testing.

@mrodm mrodm requested a review from a team April 24, 2024 15:16
@mrodm mrodm self-assigned this Apr 24, 2024
@mrodm mrodm changed the title Create enroll policy Create a new Agent Policy for enrolling purposes Apr 24, 2024

// policyToEnroll is used in both independent agents and agents created by servicedeployer (custom or kubernetes agents)
policy := policyToEnroll
if r.options.RunTearDown || r.options.RunTestsOnly {
Copy link
Member

Choose a reason for hiding this comment

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

Oh, more conditional logic here 🙈 😅

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes, another one 😅

@mrodm mrodm merged commit 78f4687 into elastic:main Apr 25, 2024
@mrodm mrodm deleted the create_enroll_policy branch April 25, 2024 09:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants