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

[8.x](backport #6016) Remove endpoint security from linux containers #6042

Open
wants to merge 1 commit into
base: 8.x
Choose a base branch
from

Conversation

mergify[bot]
Copy link
Contributor

@mergify mergify bot commented Nov 15, 2024

  • Enhancement

What does this PR do?

The goal of this implementation is to remove endpoint security from linux containers. Since we currently do not distribute any container other than linux containers (source), this PR does not consider selected platforms when excluding the endpoint security from container images.

Why is it important?

Endpoint security cannot run in containers since it has a systemd dependency.

Checklist

  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • [ ] I have made corresponding changes to the documentation
  • [ ] I have made corresponding change to the default configuration files
  • [ ] I have added tests that prove my fix is effective or that my feature works
  • [ ] I have added an entry in ./changelog/fragments using the changelog tool
  • [ ] I have added an integration test or an E2E test

How to test this PR locally

Package elastic-agent for a non-docker platform and validate endpoint security is installed

  • Run SNAPSHOT=true PLATFORMS=linux/arm64 PACKAGES=tar.gz EXTERNAL=true mage package
  • Extract the compressed artifact tar xzvf elastic-agent-9.0.0-SNAPSHOT-linux-arm64.tar.gz
  • Go into the extracted dir
  • Go into data/elastic-agent-<commit>/components
  • Verify that endpoint security artifacts are present

Package elastic-agent for docker with linux and validate that endpoint security is not installed

  • Run SNAPSHOT=true PLATFORMS=linux/arm64 PACKAGES=docker EXTERNAL=true mage package
  • Start a container based on one of the images docker run --entrypoint /bin/bash -it e75d83ff01b5
  • Go into data/elastic-agent-<commit>/components
  • Verify that endpoint security is not installed

Related issues


This is an automatic backport of pull request #6016 done by [Mergify](https://mergify.com).

* enhancement(5495): added package types to expected binaries, updated packaging function

* enhancement(5495): ran mage addLicenseHeader

* enhancement(5495): added changelog fragment

* Update changelog/fragments/1731517501-removed-endpoint-security-from-linux-containers.yaml

Co-authored-by: Shaunak Kashyap <[email protected]>

* enhancement(5495): ran mage clean

---------

Co-authored-by: Shaunak Kashyap <[email protected]>
(cherry picked from commit 9c7552f)

# Conflicts:
#	dev-tools/mage/manifest/manifest.go
#	magefile.go
@mergify mergify bot added backport conflicts There is a conflict in the backported pull request labels Nov 15, 2024
@mergify mergify bot requested a review from a team as a code owner November 15, 2024 09:56
@mergify mergify bot requested review from michalpristas and swiatekm and removed request for a team November 15, 2024 09:56
Copy link
Contributor Author

mergify bot commented Nov 15, 2024

Cherry-pick of 9c7552f has failed:

On branch mergify/bp/8.x/pr-6016
Your branch is up to date with 'origin/8.x'.

You are currently cherry-picking commit 9c7552fde1.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Changes to be committed:
	new file:   changelog/fragments/1731517501-removed-endpoint-security-from-linux-containers.yaml
	new file:   dev-tools/mage/pkgcommon/pkgcommon-types.go
	modified:   dev-tools/mage/pkgtypes.go

Unmerged paths:
  (use "git add <file>..." to mark resolution)
	both modified:   dev-tools/mage/manifest/manifest.go
	both modified:   magefile.go

To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally

@pierrehilbert pierrehilbert added the Team:Elastic-Agent-Control-Plane Label for the Agent Control Plane team label Nov 15, 2024
@elasticmachine
Copy link
Contributor

Pinging @elastic/elastic-agent-control-plane (Team:Elastic-Agent-Control-Plane)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport conflicts There is a conflict in the backported pull request Team:Elastic-Agent-Control-Plane Label for the Agent Control Plane team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants