output: add new net.proxy_env_ignore option [v4.0]#10638
Merged
Conversation
When HTTP_PROXY, HTTPS_PROXY or NO_PROXY are set in the environment, the upstream use those defaults for proxy needs. There are cases where we don't want certain plugins use those, this new configuration net.proxy_env_ignore disables the proxy set by environment variables and can be used inside the plugins that relies in the upstream interface. Signed-off-by: Eduardo Silva <eduardo@chronosphere.io>
Signed-off-by: Eduardo Silva <eduardo@chronosphere.io>
Signed-off-by: Eduardo Silva <eduardo@chronosphere.io>
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.
This patch introduces a new configuration option:
net.proxy_env_ignore(default: false).By default, the upstream connection layer uses proxy settings from the environment (HTTP_PROXY, HTTPS_PROXY). However, in some scenarios, particularly when running multiple plugins with differing proxy needs, this default can cause unintended routing.
The new option
net.proxy_env_ignoreallows a plugin to explicitly disable the use of environment-based proxy configuration. When set to true, Fluent Bit will skip any proxy settings defined via environment variables, relying solely on plugin-level proxy settings (if provided).e.g:
setting up an invalid proxy port (8081), however functional proxy runs in port 8080
export HTTP_PROXY=http://localhost:8081fluent-bit -i random \ -o opentelemetry \ -p host=127.0.0.1 -p port=4328 -p proxy=http://127.0.0.1:8080 -p net.proxy_env_ignore=trueThis enhancement improves plugin-level control over network behavior when relying on the upstream interface.
Fluent Bit is licensed under Apache 2.0, by submitting this pull request I understand that this code will be released under the terms of that license.