Set ConfigMap defaultMode to 0755 for executable scripts
All checks were successful
Lint Checks / Run linter (push) Successful in 15s

ConfigMaps containing scripts need execute permissions.
Without this, scripts mounted from ConfigMaps fail with
"permission denied" when used as container commands.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
A. F. Dudley 2026-01-20 06:02:26 -05:00
parent 2f4dd4ce12
commit d9c0614ba3

View File

@ -231,7 +231,8 @@ def volumes_for_pod_files(parsed_pod_files, spec, app_name):
volumes = parsed_pod_file["volumes"]
for volume_name in volumes.keys():
if volume_name in spec.get_configmaps():
config_map = client.V1ConfigMapVolumeSource(name=f"{app_name}-{volume_name}")
# Set defaultMode=0o755 to make scripts executable
config_map = client.V1ConfigMapVolumeSource(name=f"{app_name}-{volume_name}", default_mode=0o755)
volume = client.V1Volume(name=volume_name, config_map=config_map)
result.append(volume)
else: