Skip to content

Commit

Permalink
Set EnvironmentFile=/etc/mco/proxy.env in the systemd services genera…
Browse files Browse the repository at this point in the history
…ted by mcpproducer (rh-ecosystem-edge#1168)

So that the systemd services can pull the images through proxy if the proxy is set on the cluster
  • Loading branch information
borball committed Aug 28, 2024
1 parent 72f65a6 commit 6467a7d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pkg/mcproducer/templates/machine-config.gotmpl
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ spec:
User=root
Type=oneshot
TimeoutSec=10
EnvironmentFile=/etc/mco/proxy.env
Environment="IN_TREE_MODULE_TO_REMOVE={{.InTreeModuleToRemove}}"
Environment="KERNEL_MODULE={{.KernelModule}}"
Environment="KERNEL_MODULE_IMAGE_FILEPATH={{.KernelModuleImageFilepath}}"
Expand All @@ -43,6 +44,7 @@ spec:
[Service]
User=root
Type=oneshot
EnvironmentFile=/etc/mco/proxy.env
Environment="KERNEL_MODULE_IMAGE={{.KernelModuleImage}}"
Environment="KERNEL_MODULE_IMAGE_FILEPATH={{.KernelModuleImageFilepath}}"
Environment="WORKER_IMAGE={{.WorkerImage}}"
Expand Down
2 changes: 2 additions & 0 deletions pkg/mcproducer/testdata/machineconfig-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ spec:
User=root
Type=oneshot
TimeoutSec=10
EnvironmentFile=/etc/mco/proxy.env
Environment="IN_TREE_MODULE_TO_REMOVE=testInTreeKernelModuleName"
Environment="KERNEL_MODULE=testKernelModuleName"
Environment="KERNEL_MODULE_IMAGE_FILEPATH=/var/lib/image_file_day1.tar"
Expand All @@ -43,6 +44,7 @@ spec:
[Service]
User=root
Type=oneshot
EnvironmentFile=/etc/mco/proxy.env
Environment="KERNEL_MODULE_IMAGE=quay.io/project/repo:some-tag12"
Environment="KERNEL_MODULE_IMAGE_FILEPATH=/var/lib/image_file_day1.tar"
Environment="WORKER_IMAGE=quay.io/edge-infrastructure/kernel-module-management-worker:latest"
Expand Down

0 comments on commit 6467a7d

Please sign in to comment.