Add elastic-agent-security packaging variant with security-only build support - #16449
Open
blakerouse wants to merge 9 commits into
Open
Add elastic-agent-security packaging variant with security-only build support#16449blakerouse wants to merge 9 commits into
blakerouse wants to merge 9 commits into
Conversation
|
Pinging @elastic/elastic-agent-control-plane (Team:Elastic-Agent-Control-Plane) |
ycombinator
reviewed
Sep 1, 2026
ycombinator
reviewed
Sep 1, 2026
ycombinator
reviewed
Sep 1, 2026
ycombinator
previously approved these changes
Sep 1, 2026
💛 Build succeeded, but was flaky
Failed CI StepsHistory
cc @blakerouse |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Introduces a new
elastic-agent-securitydistribution variant. A slim packaging of Elastic Agent that bundles only the components needed for security use cases: endpoint-security and a stripped-downelastic-otel-collector(filebeat with filestream/log/syslog only, metricbeat with linux/system/windows modules only, and osquerybeat).Why is it important?
The security variant produces significantly smaller artifacts (~112 MB otel-collector vs ~376 MB standard, ~34 MB agent vs ~65 MB standard), reducing image size for security-focused deployments that only need endpoint protection and basic log/metric collection.
Checklist
[ ] I have made corresponding change to the default configuration files[ ] I have added an entry in(No changelog at the moment, as I don't know if we will release this)../changelog/fragmentsusing the changelog tool[ ] I have added an integration test or an E2E testDisruptive User Impact
None. The
VARIANTSenv var defaults tobasic, preserving all current build and packaging behavior. The newsecurityvariant is opt-in.How to test this PR locally
Build both variants:
Build security variant only:
Verify the security otel-collector is significantly smaller than the standard one, and that the agent binary built with -tags securityonly rejects unsupported input types via component.Err when a policy containing them is applied.
Unit tests for the input enforcement logic:
go test ./pkg/component/... -run TestSecurityOnlyVariantUnsupportedBeatError -v