Archived
fix: ConfigMap volumes don't force Recreate strategy + resilient hooks
Two fixes for multi-deployment: 1. _pod_has_pvcs now excludes ConfigMap volumes from PVC detection. Pods with only ConfigMap volumes (like maintenance) correctly get RollingUpdate strategy instead of Recreate. 2. call_stack_deploy_start catches SystemExit when stack path doesn't resolve from cwd (common during restart). Most stacks don't have deploy hooks, so this is non-fatal. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.6
parent
6923e1c23b
commit
32f6e57b70
@@ -696,9 +696,15 @@ class ClusterInfo:
|
||||
return name
|
||||
|
||||
def _pod_has_pvcs(self, parsed_pod_file: Any) -> bool:
|
||||
"""Check if a parsed compose file declares named volumes (PVCs)."""
|
||||
"""Check if a parsed compose file declares volumes that become PVCs.
|
||||
|
||||
Excludes volumes that are ConfigMaps (declared in spec.configmaps),
|
||||
since those don't require Recreate strategy.
|
||||
"""
|
||||
volumes = parsed_pod_file.get("volumes", {})
|
||||
return len(volumes) > 0
|
||||
configmaps = set(self.spec.get_configmaps().keys())
|
||||
pvc_volumes = [v for v in volumes if v not in configmaps]
|
||||
return len(pvc_volumes) > 0
|
||||
|
||||
def _build_common_pod_metadata(self, services: dict) -> tuple:
|
||||
"""Build shared annotations, labels, affinity, tolerations for pods.
|
||||
|
||||
Reference in New Issue
Block a user