Skip to content

Commit 474fa25

Browse files
mbussolottocbosdo
authored andcommitted
read env var from http conf file (bsc#1253282)
1 parent 7c79ba1 commit 474fa25

File tree

7 files changed

+20
-22
lines changed

7 files changed

+20
-22
lines changed

mgrpxy/shared/templates/httpd.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,6 @@ After=uyuni-proxy-pod.service
2323
2424
[Service]
2525
Environment=PODMAN_SYSTEMD_UNIT=%n
26-
{{- if .HTTPProxyFile }}
27-
EnvironmentFile={{ .HTTPProxyFile }}
28-
{{- end }}
2926
Restart=on-failure
3027
ExecStartPre=/bin/rm -f %t/uyuni-proxy-httpd.pid %t/uyuni-proxy-httpd.ctr-id
3128
@@ -42,6 +39,9 @@ ExecStart=/bin/sh -c '/usr/bin/podman run \
4239
{{- if .SystemIDSecret }}
4340
--secret {{ .SystemIDSecret }},type=mount,mode=0444,target="/etc/sysconfig/rhn/systemid" \
4441
{{- end }}
42+
{{- if .HTTPProxyFile }}
43+
-v {{ .HTTPProxyFile }}:{{ .HTTPProxyFile }}:ro \
44+
{{- end }}
4545
${HTTPD_EXTRA_CONF} --name uyuni-proxy-httpd \
4646
${UYUNI_IMAGE}'
4747

mgrpxy/shared/templates/pod.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,6 @@ Before=uyuni-proxy-tftpd.service
3030
3131
[Service]
3232
Environment=PODMAN_SYSTEMD_UNIT=%n
33-
{{- if .HTTPProxyFile }}
34-
EnvironmentFile={{ .HTTPProxyFile }}
35-
{{- end }}
3633
Restart=on-failure
3734
ExecStartPre=/bin/rm -f %t/uyuni-proxy-pod.pid %t/uyuni-proxy-pod.pod-id
3835

mgrpxy/shared/templates/salt-broker.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// SPDX-FileCopyrightText: 2024 SUSE LLC
1+
// SPDX-FileCopyrightText: 2025 SUSE LLC
22
//
33
// SPDX-License-Identifier: Apache-2.0
44

@@ -21,9 +21,6 @@ After=uyuni-proxy-pod.service
2121
2222
[Service]
2323
Environment=PODMAN_SYSTEMD_UNIT=%n
24-
{{- if .HTTPProxyFile }}
25-
EnvironmentFile={{ .HTTPProxyFile }}
26-
{{- end }}
2724
Restart=on-failure
2825
ExecStartPre=/bin/rm -f %t/uyuni-proxy-salt-broker.pid %t/uyuni-proxy-salt-broker.ctr-id
2926
@@ -34,6 +31,9 @@ ExecStart=/bin/sh -c '/usr/bin/podman run \
3431
--pod-id-file %t/uyuni-proxy-pod.pod-id -d \
3532
--replace -dt \
3633
-v /etc/uyuni/proxy:/etc/uyuni:ro \
34+
{{- if .HTTPProxyFile }}
35+
-v {{ .HTTPProxyFile }}:{{ .HTTPProxyFile }}:ro \
36+
{{- end }}
3737
--name uyuni-proxy-salt-broker \
3838
${UYUNI_IMAGE}'
3939

mgrpxy/shared/templates/squid.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// SPDX-FileCopyrightText: 2024 SUSE LLC
1+
// SPDX-FileCopyrightText: 2025 SUSE LLC
22
//
33
// SPDX-License-Identifier: Apache-2.0
44

@@ -23,9 +23,6 @@ After=uyuni-proxy-pod.service
2323
2424
[Service]
2525
Environment=PODMAN_SYSTEMD_UNIT=%n
26-
{{- if .HTTPProxyFile }}
27-
EnvironmentFile={{ .HTTPProxyFile }}
28-
{{- end }}
2926
Restart=on-failure
3027
ExecStartPre=/bin/rm -f %t/uyuni-proxy-squid.pid %t/uyuni-proxy-squid.ctr-id
3128
@@ -39,6 +36,9 @@ ExecStart=/bin/sh -c '/usr/bin/podman run \
3936
{{- range .Volumes }}
4037
-v {{ .Name }}:{{ .MountPath }} \
4138
{{- end }}
39+
{{- if .HTTPProxyFile }}
40+
-v {{ .HTTPProxyFile }}:{{ .HTTPProxyFile }}:ro \
41+
{{- end }}
4242
${SQUID_EXTRA_CONF} --name uyuni-proxy-squid \
4343
${UYUNI_IMAGE}'
4444

mgrpxy/shared/templates/ssh.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// SPDX-FileCopyrightText: 2024 SUSE LLC
1+
// SPDX-FileCopyrightText: 2025 SUSE LLC
22
//
33
// SPDX-License-Identifier: Apache-2.0
44

@@ -21,9 +21,6 @@ After=uyuni-proxy-pod.service
2121
2222
[Service]
2323
Environment=PODMAN_SYSTEMD_UNIT=%n
24-
{{- if .HTTPProxyFile }}
25-
EnvironmentFile={{ .HTTPProxyFile }}
26-
{{- end }}
2724
Restart=on-failure
2825
ExecStartPre=/bin/rm -f %t/uyuni-proxy-ssh.pid %t/uyuni-proxy-ssh.ctr-id
2926
@@ -34,6 +31,9 @@ ExecStart=/bin/sh -c '/usr/bin/podman run \
3431
--pod-id-file %t/uyuni-proxy-pod.pod-id -d \
3532
--replace -dt \
3633
-v /etc/uyuni/proxy:/etc/uyuni:ro \
34+
{{- if .HTTPProxyFile }}
35+
-v {{ .HTTPProxyFile }}:{{ .HTTPProxyFile }}:ro \
36+
{{- end }}
3737
--name uyuni-proxy-ssh \
3838
${UYUNI_IMAGE}'
3939

mgrpxy/shared/templates/tftpd.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// SPDX-FileCopyrightText: 2024 SUSE LLC
1+
// SPDX-FileCopyrightText: 2025 SUSE LLC
22
//
33
// SPDX-License-Identifier: Apache-2.0
44

@@ -23,9 +23,6 @@ After=uyuni-proxy-pod.service
2323
2424
[Service]
2525
Environment=PODMAN_SYSTEMD_UNIT=%n
26-
{{- if .HTTPProxyFile }}
27-
EnvironmentFile={{ .HTTPProxyFile }}
28-
{{- end }}
2926
Restart=on-failure
3027
ExecStartPre=/bin/rm -f %t/uyuni-proxy-tftpd.pid %t/uyuni-proxy-tftpd.ctr-id
3128
@@ -39,6 +36,9 @@ ExecStart=/bin/sh -c '/usr/bin/podman run \
3936
{{- range .Volumes }}
4037
-v {{ .Name }}:{{ .MountPath }} \
4138
{{- end }}
39+
{{- if .HTTPProxyFile }}
40+
-v {{ .HTTPProxyFile }}:{{ .HTTPProxyFile }}:ro \
41+
{{- end }}
4242
--name uyuni-proxy-tftpd \
4343
${UYUNI_IMAGE}'
4444
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
- Read env var from http conf file (bsc#1253282)

0 commit comments

Comments
 (0)