test: fix nginx image client template error

Regarding Go templates: when inside a range, the base dot (.) context is
not available, so anything used within the range must be set to a
shell-style variable.

Signed-off-by: Blaine Gardner <blaine.gardner@redhat.com>
This commit is contained in:
Blaine Gardner committed 2023-05-26 12:20:15 -06:00
1 parent 2eb5a9a3f6
commit d0995c8d76
1 file changed
+2 -1
+2 -1
View File
@@ -28,10 +28,11 @@ spec:
seccompProfile:
type: RuntimeDefault
containers:
{{ $NginxImage := .NginxImage }} # base context not available in range below
{{ range $name, $address := .NetworkNamesAndAddresses }}
- name: readiness-check-web-server-{{ $name }}-addr
# use nginx image because it's already used for the web server pod and has a non-root user
image: "{{ .NginxImage }}"
image: "{{ $NginxImage }}"
command:
- sleep
- infinity