-
Notifications
You must be signed in to change notification settings - Fork 197
Description
Describe the enhancement:
(Note: This enhancement might be more of an upstream Beats project, but I'm opening it here as I'm not 100% sure).
Elastic Agent should natively be able to tell when it has been given an IPv6 address with a port and automatically wrap it in brackets ([]
).
Describe a specific use case for the enhancement or feature:
Suppose I have an Elastic Agent policy that has an integration which targets a host endpoint. I would like to deploy this Elastic Agent policy in 2 environments, one that is IPv4 and one that is IPv6. I use a variable to determine the host value, something like: https://${kubernetes.pod.ip}:443
The issue is that while this host value will work with an IPv4 address, this integration will not work in the IPv6 environment, as the Elastic Agent doesn't properly wrap ${kubernetes.pod.ip}
when it encounters it.
This requires me to maintain 2 policies, one that sets host to https://${kubernetes.pod.ip}:443
(for IPv4) and another that sets host to https://[${kubernetes.pod.ip}]:443
(for IPv6).
By Elastic Agent being able to natively tell between an IPv4 & IPv6, I would not need to maintain 2 different policies.
This use case is important as IPv6 receives wider adoption, but IPv4 still needs to be maintained in other areas.
What is the definition of done?
Setting host to https://${kubernetes.pod.ip}:443
would work in either an IPv4 or IPv6 environment.