Set ConfigMap defaultMode to 0755 for executable scripts
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>afd-caddy-ingress
parent
2f4dd4ce12
commit
d9c0614ba3
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Reference in New Issue