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

Add --proxy-url to the elastic-agent upgrade command #5195

Open
2 tasks
mbudge opened this issue Jul 24, 2024 · 3 comments
Open
2 tasks

Add --proxy-url to the elastic-agent upgrade command #5195

mbudge opened this issue Jul 24, 2024 · 3 comments
Labels
enhancement New feature or request good first issue Good for newcomers Team:Elastic-Agent-Control-Plane Label for the Agent Control Plane team

Comments

@mbudge
Copy link
Contributor

mbudge commented Jul 24, 2024

Hi,

Customers might want to upgrade elastic-agent using the upgrade command on a network using proxies.

Without the --proxy-url command they have to do a manual reinstall if they can't set the proxy.

https://www.elastic.co/guide/en/fleet/current/elastic-agent-cmd-options.html#elastic-agent-upgrade-command

Allowing elastic-agent upgrade do an upgrade of Elastic-agent running in Fleet managed mode would allow customers do an upgrade if there's ever a problem with the Fleet managed upgrade process.

Requirements

  • Modify the agent.download section of the elastic-agent.yml to show how a proxy can be configured.
  • Add the --proxy-url option to the elastic-agent upgrade command
@cmacknz
Copy link
Member

cmacknz commented Jul 24, 2024

The proxy_url option is supported in the agent.download section of the policy, but looking closer we don't actually document this.

# agent.download:

No reason we can't also support the --proxy-url argument for convenience to avoid having to edit the configuration as well.

@cmacknz cmacknz added the Team:Elastic-Agent-Control-Plane Label for the Agent Control Plane team label Jul 24, 2024
@elasticmachine
Copy link
Contributor

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

@cmacknz
Copy link
Member

cmacknz commented Jul 25, 2024

For reference, we embed our generic HTTP transport settings configuration into the artfiact configuration structure:

httpcommon.HTTPTransportSettings `config:",inline" yaml:",inline"` // Note: use anonymous struct for json inline
}

httpcommon.HTTPTransportSettings `config:",inline" yaml:",inline"` // Note: use anonymous struct for json inline
}

This is what gives us proxy_url in addition to all of the ssl options that exist on our other network connections.

type HTTPClientProxySettings struct {
	// Proxy URL to use for http connections. If the proxy url is configured,
	// it is used for all connection attempts. All proxy related environment
	// variables are ignored.
	URL *ProxyURI `config:"proxy_url" yaml:"proxy_url,omitempty"`

	// Headers configures additional headers that are send to the proxy
	// during CONNECT requests.
	Headers ProxyHeaders `config:"proxy_headers" yaml:"proxy_headers,omitempty"`

	// Disable HTTP proxy support. Configured URLs and environment variables
	// are ignored.
	Disable bool `config:"proxy_disable" yaml:"proxy_disable,omitempty"`
}

@ycombinator ycombinator added enhancement New feature or request good first issue Good for newcomers labels Jul 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers Team:Elastic-Agent-Control-Plane Label for the Agent Control Plane team
Projects
None yet
Development

No branches or pull requests

4 participants