- Rename ambiguous variable 'l' to 'item' in cluster_info.py (flake8 E741)
- Use underscore in test config variable name (Docker Compose rejects
hyphens in env var names)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add get_volume_resources_for(volume_name) to look up per-volume storage
sizes from the spec. Supports both the original global format and a new
per-volume format:
# Global (unchanged, backwards compatible)
resources:
volumes:
reservations:
storage: 5Gi
# Per-volume (new)
resources:
volumes:
my-data:
reservations:
storage: 10Gi
my-cache:
reservations:
storage: 1Gi
Fallback chain: per-volume -> global -> default (2Gi).
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Read the user: field from compose service definitions and map it to
securityContext.runAsUser on the k8s container spec. Needed for init
containers using images that run as non-root by default (e.g.
bitnami/kubectl runs as UID 1001).
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Deployments were the only resource type missing the `app` label on
their metadata. Services, ConfigMaps, PVCs, and Jobs all had it.
Without it, _delete_resources_by_label() in down() couldn't find
Deployments when cleaning up in a shared namespace.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
When the spec explicitly sets a namespace (shared with other stacks),
down() now deletes only this stack's resources by app label instead of
deleting the entire namespace. Prevents stopping one stack from wiping
all other stacks in the same namespace.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add optional 'namespace' and 'kind-cluster-name' fields to spec
files. When 'namespace' is set, SO uses it instead of deriving one
from the cluster-id. When 'kind-cluster-name' is set, SO uses it
for the kube context instead of the cluster-id. Together these allow
multiple stacks with different cluster-ids (unique resource names)
to share a namespace and kind cluster.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add support for k8s init containers defined in docker-compose files
using the `laconic.init-container` label. Services with this label
set to "true" are built as init containers instead of regular
containers in the pod spec.
This enables stacks to fetch runtime-created ConfigMaps (e.g. from
deployer jobs) before the main containers start, without requiring
manual operator steps between deployments.
Example compose usage:
services:
fetch-config:
image: bitnami/kubectl:latest
labels:
laconic.init-container: "true"
command: ["sh", "-c", "kubectl get configmap ..."]
volumes:
- shared-config:/config
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>