-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
ignition: propagate proxy settings from a host into a vm #13209
Conversation
a907561
to
18656a9
Compare
Set proxy settings (such as `HTTP_PROXY`, and others) for the whole guest OS with setting up `DefaultEnvironment` with a `systemd` configuration file `default-env.conf`, a `profile.d` scenario file - `default-env.sh` and a `environment.d` configuration file `default-env.conf` The **actual** environment variables are read by podman at a start, then they are encrypted with base64 into a single string and after are provided into a VM through QEMU Firmware Configuration (fw_cfg) Device Inside a VM a systemd service `envset-fwcfg.service` reads the providead encrypted string from fw_cfg, decrypts and then adds to the files - `/etc/systemd/system.conf.d/default-env.conf` - `/etc/profile.d/default-env.sh` - `/etc/environment.d/default-env.conf` At the end this service execute `systemctl daemon-reload` to propagate new variables for systemd manager [NO NEW TESTS NEEDED] Closes containers#13168 Signed-off-by: esendjer <[email protected]>
LGTM |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: esendjer, rhatdan The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Any trick to making this work on a mac?
This is the error when requests do not go to proxy and go to our honeypot instead, so it is not using the host proxy. |
This is still an issue with MacOS Ventura 13.3.1 with fresh installation and Corporate proxies set in my zsh shell. The only thing that worked was having to manually run
I have not found any other documentation around that can solve this with out having users manually go in and configure this. Keeping the scope only with proxies these should be pulled into the podman machine init or better yet podman machine start.
|
@amilanoski |
The check is done, and unfortunately the problem has come back.
I want to dive deeper to understand how it could be solved. |
@amilanoski FYI |
PR solves the need of setting proxy for systemd and the whole guest system.
Set proxy settings (such as
HTTP_PROXY
, and others) for the whole guest OS with setting upDefaultEnvironment
with asystemd
configuration filedefault-env.conf
, aprofile.d
scenario file -default-env.sh
and aenvironment.d
configuration filedefault-env.conf
.The actual environment variables are read by podman at a start, then they are encrypted with base64 into a single string and after are provided into a VM through QEMU Firmware Configuration (fw_cfg) Device
Inside a VM a systemd service
envset-fwcfg.service
reads the providead encrypted string from fw_cfg, decrypts and then adds to the files:/etc/systemd/system.conf.d/default-env.conf
/etc/profile.d/default-env.sh
/etc/environment.d/default-env.conf
At the end, this service execute
systemctl daemon-reload
to propagate new variables for systemd manager[NO NEW TESTS NEEDED]
Closes #13168
Also related to #11941 #12739