Commit Graph

5 Commits

Author SHA1 Message Date
Stephen Schuresko
3a0ec17c7b Treat node-local storage as temporary data only
StorageClasses that keep data on one node's disk (hostpath, local-path,
OpenEBS local PV, Longhorn with 1 replica and strict-local) are now
marked node-local:

- init never records one as platform storage, even with --allow-non-ha.
- doctor lists PVCs on node-local classes that running pods mount. One
  annotated zero-scale.io/data=temporary is a note; one whose workload
  runs on 2+ nodes (a database cluster with a local volume per member)
  is accepted; any other is a failure, and pins its Ingress backend.
- doctor warns when a node-local class is a default StorageClass and
  prints the annotate command that removes the default.
- App volumes take a :tmp mode: scratch space on the gateway pod's own
  disk instead of the shared RWX volume.

doctor also now reports Ingress backends whose Service does not exist,
host+path routed by several Ingresses to different Services, Knative
DomainMappings with no Ingress rule, and judges recorded platform
choices instead of asking for them again.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-27 07:24:02 -04:00
Claude
2161fac218 doctor: report what a single node failure takes down
List every Ingress backend whose running pods sit on one node (or have
none), Services whose externalIPs claim a node's own address (which
steals that node's ingress traffic, as kourier does with .134 today),
and more than one default StorageClass.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016uKdmp7tLySXvQXALz2x9V
2026-10-27 07:17:21 -04:00
claude
fdfd615fd9 Add gateway install/status, ingress host routing and delete-app --purge
- gateway install/upgrade renders an HA gateway (2 replicas, RollingUpdate,
  PDB, hostname spread, downward-API namespace, RWX /opt/apps on the platform
  class); a Helm-managed gateway is recorded and left alone
- gateway status shows which apps run on which replica
- ingress add-host/remove-host/list: one Ingress per host or wildcard, TLS
  from a Secret or a cert-manager ClusterIssuer (wildcards require DNS-01),
  upstream-hash-by $host pinning; hosts stored in the platform ConfigMap
- apply skips the per-app Ingress when routed hosts already cover the app
  in the gateway's namespace and no OAuth is used; per-app Ingresses also pin
  by host
- status, logs and binary updates reach every gateway replica
- delete-app --purge [--drop-database]; Postgres drops only databases whose
  owner comment matches; apply records database_engine for later cleanup
2026-10-27 06:44:55 -04:00
claude
88638b60e5 Add install longhorn and install postgres
- Plans are printed first and applied only with --yes; Helm when available,
  otherwise the pinned release manifests (Longhorn 1.9.1, CNPG 1.26.0 /
  chart 0.24.0, all overridable)
- Replica counts follow schedulable nodes (max 3) with an HA warning below 3
- Longhorn: longhorn-ha (RWO) and longhorn-ha-rwx StorageClasses with Retain,
  optional default-class flag, optional backup target with daily snapshot and
  weekly backup RecurringJobs; existing installs only get the classes
- Postgres: CNPG operator (skipped when present) and a Cluster with pod
  anti-affinity, superuser access for provisioning, and a Ready wait
- Both record their result in the zero-scale-platform ConfigMap
2026-10-27 06:44:55 -04:00
claude
49f4a11bcc Add doctor and init; provision databases from the platform ConfigMap
- internal/platform: detect and grade storage classes (Longhorn, Ceph, Mayastor,
  LINSTOR, Portworx, GKE/Azure/AWS, NFS, local), Postgres operators (CNPG,
  Zalando, Crunchy, Percona, StackGres), MySQL operators (InnoDB Cluster, PXC,
  MariaDB, legacy shared-mysql), ingress classes, gateways and Redis
- Choose picks HA candidates (default class wins, ambiguity is an error with
  the flag to resolve it) and stores them as flat zero-scale-platform keys
- zero-scale-ctl doctor (read-only) and init (diff, confirm or --yes)
- DB provisioning goes through per-operator adapters; SQL travels on stdin,
  the MySQL admin password is read from a Secret and sent on stdin, and
  identifiers and passwords are validated
- Postgres endpoint now names the namespace the cluster is in (was the app's)
- Redis service, ingress class and config-file DB hosts come from the platform
- Legacy fallback with a warning when no platform ConfigMap exists
2026-10-27 06:44:55 -04:00