-
Notifications
You must be signed in to change notification settings - Fork 118
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
Add support to define expose ports for independent agents #1795
Add support to define expose ports for independent agents #1795
Conversation
776cded
to
d9e2124
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
@@ -58,6 +58,7 @@ type testConfig struct { | |||
PidMode string `config:"pid_mode"` | |||
LinuxCapabilities []string `config:"linux_capabilities"` | |||
Runtime string `config:"runtime"` | |||
ExposePorts []string `config:"expose_ports"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit. Have you thought about calling this just ports
?
ExposePorts []string `config:"expose_ports"` | |
ExposePorts []string `config:"ports"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated in 2af3fac
💚 Build Succeeded
History
cc @mrodm |
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