Add support to define expose ports for independent agents#1795
Merged
mrodm merged 2 commits intoelastic:mainfrom Apr 25, 2024
Merged
Add support to define expose ports for independent agents#1795mrodm merged 2 commits intoelastic:mainfrom
mrodm merged 2 commits intoelastic:mainfrom
Conversation
776cded to
d9e2124
Compare
jsoriano
approved these changes
Apr 24, 2024
| PidMode string `config:"pid_mode"` | ||
| LinuxCapabilities []string `config:"linux_capabilities"` | ||
| Runtime string `config:"runtime"` | ||
| ExposePorts []string `config:"expose_ports"` |
Member
There was a problem hiding this comment.
Nit. Have you thought about calling this just ports?
Suggested change
| ExposePorts []string `config:"expose_ports"` | |
| ExposePorts []string `config:"ports"` |
Contributor
Author
There was a problem hiding this comment.
I wanted to emphasize that these ports are the ones to be exposed. But re-thinking that idea, if it used ports as the name in those settings, it looks like is clear that it refers to the ports to be exposed (or forwarded from the host like in VMs).
For instance, docker-compose uses ports: https://docs.docker.com/compose/compose-file/compose-file-v3/#ports
But in Vargrantfile, it is used forwarded_ports: https://developer.hashicorp.com/vagrant/docs/networking/forwarded_ports#defining-a-forwarded-port
I think it could be just "ports".
I'll update the PR
Collaborator
💚 Build Succeeded
History
cc @mrodm |
jsoriano
approved these changes
Apr 24, 2024
Closed
10 tasks
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.
Part of #787
Relates #1262 #1355
This PR allows users to define which ports should be exposed from the Elastic Agent container.ç
This definition should be added to the system configuration file. Example:
This example is based on agents using docker as a runtime https://docs.docker.com/compose/compose-file/compose-file-v2/#ports