env create/delete/gc/list manage a namespace per environment, labelled
zero-scale.io/env, with a ResourceQuota, its own gateway and an optional
wildcard route. A zero-scale-env ConfigMap records the env and may override
the platform's database clusters. Hosts use ${ENV_SUFFIX}; databases in a
non-primary env are named db_<env>_<app>_<hash> and carry an owner comment,
so env delete drops only what the env owns. oauth-setup --auth-host serves
every app's login from one callback host. deploy/ manifests no longer
hardcode a namespace; deploy/kustomization.yaml sets it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016uKdmp7tLySXvQXALz2x9V
- 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
- Introduced GatewayConfig struct to hold OAuth2 configuration in AppConfig.
- Implemented OAuthSetupName method to resolve shared OAuth2 profile name.
- Enhanced LoadConfig function to parse gateway configuration from the config file.
- Added oauth-setup command to create or update shared ingress-nginx OAuth2 setup profiles.
- Implemented ReconcileOAuthSetup function to provision/update OAuth2 credentials and resources.
- Created OAuth2 proxy deployment and service for shared OAuth2 setup.
- Added Ingress configuration for OAuth2 callback routing.
- Updated DeployBinary function to check and upload binaries based on SHA256 hash.
- Enhanced secret management in ProvisionDataLayer to support cross-service references.
- Updated ingress creation to support OAuth2 authentication.
- Implemented `database.go` for MySQL and PostgreSQL provisioning, including password generation and secret management.
- Created `k8s.go` for Kubernetes command execution, resource checks, and secret/configmap management.
- Developed `main.go` to handle CLI commands for applying configurations, checking status, logging, and managing applications.
- Added `storage.go` for binary deployment to the gateway pod and symlink configuration for application entrypoints.
- Enhanced CLI with commands for application management, including listing, deleting, and uploading binaries.