Commit Graph

20 Commits (fix/kind-mount-propagation)

Author SHA1 Message Date
A. F. Dudley fdde3be5c8 fix: add pre-commit hooks and fix all lint/type/format errors
Process bug fix: no pre-commit existed for this repo's Python code.
Added pyproject.toml with unified dependencies (ruff, mypy, ansible-lint),
.pre-commit-config.yaml with repo-based hooks (ruff) and local uv-run
hooks (mypy, ansible-lint).

Fixed 249 ruff errors (B023, B904, B006, B007, UP008, UP031, C408),
~13 mypy type errors, 11 ansible-lint violations, and ruff-format
across all Python files including stack-orchestrator subtree.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-10 14:56:22 +00:00
A. F. Dudley 7f12270939 bar-6cb: fix PV claimRef, namespace race, and PVC creation resilience
Three related fixes in the k8s deployer restart/up flow:

1. Clear stale claimRefs on Released PVs (_clear_released_pv_claim_refs):
   After namespace deletion, PVs survive in Released state with claimRefs
   pointing to deleted PVC UIDs. New PVCs can't bind until the stale
   claimRef is removed. Now clears them before PVC creation.

2. Wait for namespace termination (_wait_for_namespace_deletion):
   _ensure_namespace() now detects a terminating namespace and polls
   until deletion completes (up to 120s) before creating the new one.
   Replaces the racy 5s sleep in deployment restart.

3. Resilient PVC creation: wrap each PVC creation in error handling so
   one failure doesn't prevent subsequent PVCs from being attempted.
   All errors are collected and reported together.

Closes: bar-6cb, bar-31a, bar-fec

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-10 08:33:45 +00:00
A. F. Dudley 974eed0c73 feat: add `deployment prepare` command (so-076.1)
Refactors K8sDeployer.up() into three composable methods:
- _setup_cluster_and_namespace(): kind cluster, API, namespace, ingress
- _create_infrastructure(): PVs, PVCs, ConfigMaps, Services, NodePorts
- _create_deployment(): Deployment resource (pods)

`prepare` calls the first two only — creates all cluster infrastructure
without starting pods. This eliminates the scale-to-0 workaround where
operators had to run `deployment start` then immediately scale down.

Usage: laconic-so deployment --dir <dir> prepare

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-08 06:56:34 +00:00
A. F. Dudley cc6acd5f09 fix: default skip-cluster-management to true
Destroying the kind cluster on stop/start is almost never the intent.
The cluster holds PVs, ConfigMaps, and networking state that are
expensive to recreate. Default to preserving the cluster; pass
--perform-cluster-management explicitly when a full teardown is needed.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-08 02:41:25 +00:00
A. F. Dudley 806c1bb723 refactor: rename `deployment update` to `deployment update-envs`
The update command only patches environment variables and adds a
restart annotation. It does not update ports, volumes, configmaps,
or any other deployment spec. The old name was misleading — it
implied a full spec update, causing operators to expect changes
that never took effect.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-08 02:33:20 +00:00
A. F. Dudley 4408725b08 Fix repo root path calculation (4 parents from stack path) 2026-02-03 17:15:19 -05:00
A. F. Dudley 22d64f1e97 Add --spec-file option to restart and auto-detect GitOps spec
- Add --spec-file option to specify spec location in repo
- Auto-detect deployment/spec.yml in repo as GitOps location
- Fall back to deployment dir if no repo spec found

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-03 17:15:19 -05:00
A. F. Dudley 14258500bc Fix restart command for GitOps deployments
- Remove init_operation() from restart - don't regenerate spec from
  commands.py defaults, use existing git-tracked spec.yml instead
- Add docs/deployment_patterns.md documenting GitOps workflow
- Add pre-commit rule to CLAUDE.md
- Fix line length issues in helpers.py

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-03 17:15:19 -05:00
A. F. Dudley c197406cc7 feat(deploy): add deployment restart command
Add `laconic-so deployment restart` command that:
- Pulls latest code from stack git repository
- Regenerates spec.yml from stack's commands.py
- Verifies DNS if hostname changed (with --force to skip)
- Syncs deployment directory preserving cluster ID and data
- Stops and restarts deployment with --skip-cluster-management

Also stores stack-source path in deployment.yml during create
for automatic stack location on restart.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-03 17:15:19 -05:00
A. F. Dudley cd3d908d0d Apply pre-commit linting fixes
- Format code with black (line length 88)
- Fix E501 line length errors by breaking long strings and comments
- Fix F841 unused variable (removed unused 'quiet' variable)
- Configure pyright to disable common type issues in existing codebase
  (reportGeneralTypeIssues, reportOptionalMemberAccess, etc.)
- All pre-commit hooks now pass

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-21 20:58:31 -05:00
Prathamesh Musale 8afae1904b Add support for running jobs from a stack (#975)
Lint Checks / Run linter (push) Failing after 5s Details
Part of https://plan.wireit.in/deepstack/browse/VUL-265/

Reviewed-on: https://git.vdb.to/cerc-io/stack-orchestrator/pulls/975
Co-authored-by: Prathamesh Musale <prathamesh.musale0@gmail.com>
Co-committed-by: Prathamesh Musale <prathamesh.musale0@gmail.com>
2025-12-04 06:13:28 +00:00
David Boreham 265699bc38 Allow to disable kind cluster management for testing (#915)
Deploy Test / Run deploy test suite (push) Failing after 5s Details
Webapp Test / Run webapp test suite (push) Failing after 2s Details
Smoke Test / Run basic test suite (push) Failing after 2s Details
Lint Checks / Run linter (push) Failing after 3s Details
Publish / Build and publish (push) Failing after 4s Details
Reviewed-on: https://git.vdb.to/cerc-io/stack-orchestrator/pulls/915
Co-authored-by: David Boreham <david@bozemanpass.com>
Co-committed-by: David Boreham <david@bozemanpass.com>
2024-08-13 17:48:14 +00:00
Roy Crihfield 36d4969b2d Fixes for external stack deployment (#851)
Publish / Build and publish (push) Failing after 11s Details
Deploy Test / Run deploy test suite (push) Failing after 3s Details
Webapp Test / Run webapp test suite (push) Failing after 3s Details
Lint Checks / Run linter (push) Failing after 2s Details
Smoke Test / Run basic test suite (push) Failing after 3s Details
Fixes
- stack path resolution for `build`
- external stack path resolution for deployments
- "extra" config detection
- `deployment ports` command
- `version` command in dist or source install (without build_tag.txt)
- `setup-repos`, so it won't die when an existing repo is not at a branch or exact tag

Used in https://git.vdb.to/cerc-io/fixturenet-eth-stacks/pulls/14

Reviewed-on: https://git.vdb.to/cerc-io/stack-orchestrator/pulls/851
Reviewed-by: David Boreham <dboreham@noreply.git.vdb.to>
2024-07-09 15:37:35 +00:00
Thomas E Lackey 88f66a3626
Add `deployment update` and `deploy-webapp-from-registry` commands. (#676) 2023-12-13 21:02:34 -06:00
Thomas E Lackey 077ea80c70
Add `deployment status` command and fix k8s output for `deployment ps` (#679)
Publish / Build and publish (push) Successful in 59s Details
Deploy Test / Run deploy test suite (push) Successful in 3m13s Details
K8s Deploy Test / Run deploy test suite (push) Failing after 3m16s Details
Webapp Test / Run webapp test suite (push) Failing after 3m48s Details
Smoke Test / Run basic test suite (push) Successful in 4m25s Details
2023-12-06 09:27:47 -07:00
David Boreham 15faed00de
Generate a unique deployment id for each deployment (#680)
Publish / Build and publish (push) Successful in 1m8s Details
Deploy Test / Run deploy test suite (push) Successful in 3m13s Details
K8s Deploy Test / Run deploy test suite (push) Failing after 3m16s Details
Webapp Test / Run webapp test suite (push) Failing after 3m44s Details
Smoke Test / Run basic test suite (push) Successful in 4m40s Details
* Move cluster name generation into a function

* Generate a unique deployment id for each deployment
2023-12-05 22:56:58 -07:00
David Boreham f6624cb33a
Add image push command (#656)
Publish / Build and publish (push) Successful in 57s Details
Deploy Test / Run deploy test suite (push) Successful in 3m6s Details
K8s Deploy Test / Run deploy test suite (push) Failing after 3m10s Details
Webapp Test / Run webapp test suite (push) Failing after 3m37s Details
Smoke Test / Run basic test suite (push) Successful in 4m8s Details
2023-11-20 20:23:55 -07:00
David Boreham c9c6a0eee3
Changes for remote k8s (#655)
Publish / Build and publish (push) Successful in 1m2s Details
Deploy Test / Run deploy test suite (push) Successful in 3m6s Details
K8s Deploy Test / Run deploy test suite (push) Failing after 3m4s Details
Webapp Test / Run webapp test suite (push) Failing after 3m36s Details
Smoke Test / Run basic test suite (push) Successful in 4m4s Details
2023-11-20 09:12:57 -07:00
David Boreham 5e91c2224e
kind test stack (#629)
Publish / Build and publish (push) Successful in 58s Details
Deploy Test / Run deploy test suite (push) Successful in 3m7s Details
Webapp Test / Run webapp test suite (push) Failing after 3m37s Details
Smoke Test / Run basic test suite (push) Successful in 4m1s Details
2023-11-08 01:11:00 -07:00
David Boreham 4456e70c93
Rename app -> stack_orchestrator (#625)
Publish / Build and publish (push) Successful in 1m0s Details
Deploy Test / Run deploy test suite (push) Successful in 3m25s Details
Smoke Test / Run basic test suite (push) Successful in 4m21s Details
2023-11-07 00:06:55 -07:00