Live do-sfo3-lux-k8s/lux-system carries two `status*` deployments:
- `status` — orphan, 92d old, image ghcr.io/hanzoai/status:latest
(no source-of-truth in this repo, references CMs
status-config/status-frontend/status-brand/status-logo
that also have no source; second pod has been
ContainerCreating for 5+ days). Policy violation —
floating :latest tag.
- `status-lux` — canonical, sha-pinned, declared in k8s/status/.
Add k8s/status/kustomization.yaml so the canonical stack is Kustomize-
applyable (was previously raw YAML).
Add k8s/status/orphan-cleanup.sh — production-impacting cleanup
script with all the kubectl delete commands needed to remove the
orphan deployment + its dangling ConfigMaps + PVC. NOT executed in
this commit; flagged in LLM.md for confirmation before run.
LLM.md additions:
- Decomplection audit section recording the lux-system orphan state
- Decomplection audit section recording the luxd-startup.yaml bash bag
+ the operator-side decomplection plan (see luxfi/operator
decomplect/luxnetwork-declarative-startup@d5b3d26)
45 lines
1.9 KiB
Bash
Executable File
45 lines
1.9 KiB
Bash
Executable File
#!/bin/sh
|
|
# orphan-cleanup.sh — remove pre-rebrand status deployment + CMs from lux-k8s.
|
|
#
|
|
# Context (recorded 2026-05-29 in universe LLM.md decomplection section):
|
|
#
|
|
# The lux-system namespace on do-sfo3-lux-k8s currently has TWO status
|
|
# deployments:
|
|
#
|
|
# status — orphan, 92d old, image ghcr.io/hanzoai/status:latest
|
|
# (policy violation — no :latest tags). References
|
|
# ConfigMap "status-config", "status-frontend",
|
|
# "status-brand", "status-logo" which have no source
|
|
# in ~/work/lux/universe/. Its second pod has been
|
|
# ContainerCreating for 5+ days.
|
|
#
|
|
# status-lux — operator-correct, declared in this directory's
|
|
# deployment.yaml + ingressroute.yaml + configmap.yaml.
|
|
# References status-lux-config (declared here).
|
|
#
|
|
# Decomplection rule (per philosophy.md): one and only one way to do
|
|
# everything. Two deployments serving the same concern is one too many.
|
|
# The orphan and its CMs were deployed by hand before the lux/hanzo brand
|
|
# split was applied to this namespace and have no Kustomize source. They
|
|
# must be deleted.
|
|
#
|
|
# Production-impacting: removes a deployment that's been serving stale
|
|
# data for 65d+ — confirm before running.
|
|
set -eu
|
|
|
|
CTX="${KUBECTL_CONTEXT:-do-sfo3-lux-k8s}"
|
|
NS="lux-system"
|
|
|
|
echo "==> Pre-flight: confirm orphan + canonical deployments both exist"
|
|
kubectl --context "$CTX" -n "$NS" get deploy status status-lux >/dev/null
|
|
|
|
echo "==> Delete orphan deployment + orphan ConfigMaps"
|
|
kubectl --context "$CTX" -n "$NS" delete deploy status
|
|
kubectl --context "$CTX" -n "$NS" delete cm status-config status-frontend status-brand status-logo
|
|
|
|
echo "==> Delete orphan PVC if present (status-data, not status-lux-data)"
|
|
kubectl --context "$CTX" -n "$NS" delete pvc status-data --ignore-not-found
|
|
|
|
echo "==> Verify: only status-lux remains"
|
|
kubectl --context "$CTX" -n "$NS" get deploy
|