From 86e50fa6c52446e83fcfbfdcdbbf91bb2b9013a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C3=ABl=20Goinvic?= Date: Mon, 20 Oct 2025 14:57:01 +0200 Subject: [PATCH] fix rendered config path consumer --- tests/manifests/test_configs_consistency.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/manifests/test_configs_consistency.py b/tests/manifests/test_configs_consistency.py index e75607e7..023a7219 100644 --- a/tests/manifests/test_configs_consistency.py +++ b/tests/manifests/test_configs_consistency.py @@ -348,6 +348,7 @@ class ValidatedContainerConfig(ValidatedConfig): continue # Determine which secrets are mounted by this container mounted_files = [] + has_rendered_config = False for volume_mount in container_spec.get("volumeMounts", []): current_volume = get_volume_from_mount(workload_spec, volume_mount) @@ -372,6 +373,7 @@ class ValidatedContainerConfig(ValidatedConfig): and current_volume["name"] == "rendered-config" and not container_spec["name"].startswith("render-config") ): + has_rendered_config = True validated_config.sources_of_mounted_paths.append( MountedRenderedConfigEmptyDir.from_workload_spec(workload_spec, volume_mount) ) @@ -386,7 +388,7 @@ class ValidatedContainerConfig(ValidatedConfig): f"Mounted files are not unique in {name}: {validated_config.sources_of_mounted_paths}" ) if container_spec["name"] == name: - if container_spec["name"].startswith("render-config"): + if has_rendered_config: validated_config.paths_consumers.append( RenderedConfigPathConsumer.from_workload_spec(workload_spec, templates) )