Commit Graph

452 Commits

Author SHA1 Message Date
chrisfu
8d911b2739 chore: add MinIO diagnostics and pod security configuration
- Introduced diagnostics for MinIO failures due to file access issues, with suggested fixes for pod security settings.
- Added podSecurityContext and securityContext configurations to enforce non-root execution for MinIO.
- Updated resource requests/limits for MinIO pods to ensure optimal resource usage.
- Standardized file path references in manifest-summary.json to relative paths.
2026-04-15 00:13:16 -07:00
chrisfu
ebf08b9adb chore: add Sidekiq resource validation and logging enhancements
- Added detailed validation of Sidekiq concurrency, resource requests, and limits.
- Introduced live state comparison for Sidekiq resource configuration.
- Improved logging to track desired and live Sidekiq states for better diagnostics.
2026-04-14 23:19:06 -07:00
chrisfu
a7e03c344d chore: enhance DB connectivity diagnostics and cross-cluster support
- Added split-cluster detection with detailed app and DB context logging.
- Introduced robust DB connectivity checks for DNS resolution and TCP probes.
- Enabled automated cross-cluster DB ILB service creation and validation.
- Improved logging for DB migration failures with enhanced diagnostics and connectivity hints.
2026-04-14 22:33:18 -07:00
chrisfu
e6374e3e46 chore: enhance DB connectivity diagnostics and cross-cluster support
- Added split-cluster detection with detailed app and DB context logging.
- Introduced robust DB connectivity checks for DNS resolution and TCP probes.
- Enabled automated cross-cluster DB ILB service creation and validation.
- Improved logging for DB migration failures with enhanced diagnostics and connectivity hints.
2026-04-14 20:21:41 -07:00
chrisfu
ff5b73a435 chore: add migration diagnostics and improve failure handling
- Introduced `get_gitlab_migrations_diagnostics` for detailed migrations pod diagnostics.
- Enhanced active migration failure detection with detailed logs and diagnostics.
- Improved job context logging with pod restart, status, and waiting reason details.
- Refined stale job repair logic by incorporating diagnostics and failure insights.
2026-04-14 19:29:27 -07:00
chrisfu
e2827c97e6 chore: add migration diagnostics and improve failure handling
- Introduced `get_gitlab_migrations_diagnostics` for detailed migrations pod diagnostics.
- Enhanced active migration failure detection with detailed logs and diagnostics.
- Improved job context logging with pod restart, status, and waiting reason details.
- Refined stale job repair logic by incorporating diagnostics and failure insights.
2026-04-14 19:28:18 -07:00
chrisfu
ad351ba394 chore: enhance migration job handling and Gitaly resource validation
- Added detailed context logging for GitLab blockers, including failed migrations and Gitaly resources.
- Introduced automatic repair for stalled migration jobs by deleting stale jobs and pods.
- Improved Gitaly resource validation with enhanced logging for PVCs and StatefulSet configurations.
- Extended PVC phase handling with detailed storageClass descriptions for better troubleshooting.
2026-04-14 19:15:28 -07:00
chrisfu
444bb3926a chore: enhance Gitaly storageClass validation and repair logic
- Improved detection and logging of mismatched storageClass across CR, StatefulSet, and PVCs.
- Added auto-repair mechanisms for inconsistencies in Gitaly storageClass configuration.
- Enhanced state validation with detailed logs for better troubleshooting.
2026-04-14 18:36:30 -07:00
chrisfu
285d9fc185 chore: remove redundant local declarations in GitLab init script
- Cleaned up unnecessary `local` keyword usage for `_wait_start` and `_now` variables to improve clarity and alignment with the script's style.
2026-04-14 17:11:52 -07:00
chrisfu
7bae08db5d chore: remove redundant local declarations in GitLab init script
- Cleaned up unnecessary `local` keyword usage for `_wait_start` and `_now` variables to improve clarity and alignment with the script's style.
2026-04-14 16:56:41 -07:00
chrisfu
1502527d6f chore: improve Gitaly StatefulSet convergence and enhance legacy repair logic
- Introduced a grace period and explicit replacement of legacy StatefulSet after expiry.
- Enhanced logging to provide clearer details on convergence progress and outcomes.
- Added handling for operator recreation and state validation during legacy repairs.
- Ensured robust detection and resolution of legacy nodeSelector and storageClass issues.
2026-04-14 16:29:55 -07:00
chrisfu
5657ccb4e5 chore: refine Gitaly convergence checks and auto-repair legacy configs
- Added logic to wait for Gitaly StatefulSet corrections after autoclean actions.
- Implemented live state validation for nodeSelector and storageClass updates.
- Enhanced logging and error handling for legacy storage repairs in k8s mode.
- Updated PV and PVC handling to address legacy resource cleanup.
2026-04-14 16:14:30 -07:00
chrisfu
7999b2f81a chore: enhance Redis validation with Kubernetes context and endpoint readiness checks
- Added logging to show Kubernetes context and service inspection details for Redis.
- Improved validation by checking for service endpoints and readiness.
- Enabled IP address bypass for external host DNS checks.
2026-04-14 15:52:15 -07:00
chrisfu
9bf0758d7e chore: enhance Redis validation with Kubernetes context and endpoint readiness checks
- Added logging to show Kubernetes context and service inspection details for Redis.
- Improved validation by checking for service endpoints and readiness.
- Enabled IP address bypass for external host DNS checks.
2026-04-14 15:40:32 -07:00
chrisfu
a37015c887 chore: enhance Garage ILB endpoint resolution and persist config updates
- Added fallback logic to resolve Garage ILB hostname if IP is unavailable.
- Improved handling of `self.inputs` with prioritized merging for better automation.
- Updated config persistence to use `write_config` for milestones and repairs.
- Extended Garage ILB IP retry logic to 5 minutes for GKE provisioning delays.
2026-04-14 14:45:23 -07:00
chrisfu
5fabb94a19 chore: update Garage ILB logic for split-cluster GKE and GitLab object storage
- Changed ILB deployment context to DB cluster (`knoe-cnpg-0`) for GitLab object storage setup.
- Renamed service to `garage-s3-ilb` and updated related references.
- Enhanced logging for Garage ILB IP resolution with retry and error handling.
- Persisted resolved ILB endpoint to config files for improved reliability.
- Refined split-cluster Garage deployment workflows with clearer context management and debugging.
2026-04-14 14:17:41 -07:00
chrisfu
9ab6b3a1cd chore: refactor service_ns initialization in GitLab deployment pipeline
- Moved `service_ns` definition earlier in the initialization process for improved readability and consistency.
- Removed redundant `service_ns` reassignment, optimizing namespace resolution logic.
2026-04-14 14:04:06 -07:00
chrisfu
3db704bc52 chore: add support for resolving Garage ILB endpoint in split-cluster GKE setups
- Introduced `get_endpoint_ip` utility to fetch Garage ILB IPs across k3s, k3d, and k8s modes.
- Updated initialization to deploy Garage on the DB cluster when using split GKE clusters.
- Enhanced logic to persist resolved Garage ILB endpoints for GitLab object storage configurations.
- Added Redis master resolution and removed placeholder Garage endpoints during deployment.
- Updated post-init scripts to include Redis initialization alongside Kong and backup scripts.
2026-04-14 14:02:11 -07:00
chrisfu
8c4a965ded chore: enhance GitLab init to block misconfigurations and repair legacy setups
- Improved `check_gitlab_pre_apply_blocked` to better detect invalid placeholders, legacy storage configurations, and DNS issues for Redis and Garage endpoints.
- Added auto-repair for Garage endpoint secrets and storage class mismatches in k8s mode.
- Introduced warnings and blocking logic for unsupported configurations like `gitlab-gitaly-static`.
- Refined storage class handling to dynamically align with `standard-rwo` in k8s/GKE.
2026-04-14 13:35:11 -07:00
chrisfu
cf293aa751 chore: add pre/post-apply sanity checks for GitLab deployment blockers
- Introduced `check_gitlab_pre_apply_blocked` and `check_gitlab_post_apply_blocked` functions to detect misconfigurations and legacy setups during deployment.
- Added logic to validate DNS resolution for Redis and Garage endpoints, preventing invalid placeholders or inaccessible hosts.
- Enhanced storage checks to identify and optionally repair legacy storage configurations with `GITLAB_REPAIR_BLOCKED_AUTOCLEAN`.
- Updated deployment wait loop to validate readiness and detect blocking states dynamically.
2026-04-14 13:12:56 -07:00
chrisfu
174877201e chore: update GKE storage class and reconcile PVCs for Supabase deployment
- Changed default GKE non-DB PVCs to use CSI `pd-standard` with WFFC mode, deprecating legacy `standard`.
- Added reconciliation logic for APP PVCs to align with updated storage class.
- Enforced single replica for Supabase functions on GKE, disabling autoscaling.
- Updated tests to validate storage class changes, PVC reconciliation, and single-replica logic.
2026-04-14 11:13:14 -07:00
chrisfu
fddaf80823 checkpoint: make node placement config-driven and add GitLab rerun fast-path
- remove hardcoded physical host assumptions in UI/init flows and rely on config-driven selectors\n- optimize GitLab reruns to skip unnecessary operator upgrades/long reconcile waits when unchanged\n- add and update regression/shell tests for fast-path and k8s context/ingress/garage behaviors

Co-authored-by: Junie <junie@jetbrains.com>
2026-04-14 06:43:37 -07:00
chrisfu
492caabf60 chore: make node selector keys configurable and improve scheduling logic
- Refactored `init_gitlab.sh` and `init_gitea.sh` to use configurable node selector keys, removing hardcoded defaults like `gandalf.prole.org`.
- Enhanced scheduling logic to validate required fields and prevent stale node constraints during reruns.
- Added fast-path guards in GitLab init to skip redundant operations when no changes occur in operator or CR specifications.
- Updated Supabase deployment to clear stale topology spread constraints alongside node selectors and affinity.
- Added tests for configurable node selector keys, fast-path guards, and stale constraint cleanups.
2026-04-14 06:01:50 -07:00
chrisfu
9e10ffe8d7 chore: update Supabase deployment defaults and scheduling logic
- Changed default storage class for GKE to `standard` to reduce pressure on SSD/balanced quotas.
- Disabled `enforceGeneralNodeRole` scheduling for APP/DB values to support split cluster setups.
- Updated tests to validate storage class and scheduling logic changes.
2026-04-14 05:07:26 -07:00
chrisfu
df93b0d1c5 chore: update NOTES.txt to use studioIngress and add test for validation 2026-04-13 21:48:56 -07:00
chrisfu
d916aef22a chore: replace log with echo for svc ingress rendering in init_kong.sh 2026-04-13 19:39:21 -07:00
chrisfu
9b9063a5b2 chore: add TLS configuration support for svc ingress and enhance readiness checks
- Introduced `SERVICE_INGRESS_TLS_ENABLED` for configurable svc ingress TLS rendering in `init_kong.sh`.
- Updated ingress templates to include or exclude TLS annotations and blocks dynamically.
- Improved PVC and pod readiness checks in `supabase/deploy.sh` with enriched logging and detailed blockers.
- Added support for configurable storage class resolution for Supabase DB frontdoor PVCs.
- Enhanced deployment workflows to handle split APP/DB cluster setups with context-aware readiness checks.
- Updated test cases to validate svc ingress TLS configuration and storage class logic.
2026-04-13 19:18:27 -07:00
chrisfu
9519f35d65 chore: add enforceGeneralNodeRole scheduling logic and improve frontdoor manifest handling
- Introduced `enforceGeneralNodeRole` to make node affinity and selector enforcement configurable.
- Updated `_split_frontdoor_docs` to handle custom release labels for Kong services.
- Enhanced Helm templates to support dynamic scheduling configurations.
- Added `reconcile_db_frontdoor_studio_pvcs` to migrate PVCs to the target storage class.
- Updated tests to validate custom release labels and scheduling logic.
2026-04-13 16:23:06 -07:00
chrisfu
e24b255160 chore: refactor Supabase manifest generation and split frontdoor logic
- Updated `_extract_k8s_docs` to use `yaml.safe_load_all` for improved parsing and reliability.
- Enhanced `_split_frontdoor_docs` with stricter validation of Deployment, Service, and Ingress specs.
- Added namespace enforcement for frontdoor resources during manifest splitting.
- Refactored and optimized test cases to cover new validation and splitting functionality.
2026-04-13 12:23:02 -07:00
chrisfu
c07b50d7c3 chore: refactor Supabase manifest generation and split frontdoor logic
- Updated `_extract_k8s_docs` to use `yaml.safe_load_all` for improved parsing and reliability.
- Enhanced `_split_frontdoor_docs` with stricter validation of Deployment, Service, and Ingress specs.
- Added namespace enforcement for frontdoor resources during manifest splitting.
- Refactored and optimized test cases to cover new validation and splitting functionality.
2026-04-13 11:45:11 -07:00
chrisfu
7fadc8d00c chore: improve bucket creation logic to handle existing buckets gracefully
- Added detection for "already exists" errors during bucket creation and reused existing buckets when applicable.
- Enhanced logging to provide context when reusing previously created buckets.
2026-04-13 11:04:36 -07:00
chrisfu
d8a6b51420 chore: enhance ingress ownership checks for GitLab in k8s deployments
- Added support for validating existing ingress ownership using `gitlab_release` and `expected_backend_service`.
- Improved conflict detection by distinguishing between same-owner and foreign ingress claims.
- Introduced explicit handling for operator-managed ingress and fallback ingress creation logic.
- Enhanced logging and status return codes for better error reporting and decision-making in deployment scripts.
2026-04-13 04:33:52 -07:00
chrisfu
ee6c2701f9 chore: add context-aware Garage admin handling for k8s deployments
- Introduced `resolve_garage_admin_context` and `kubectl_garage_admin` for dynamic context resolution.
- Enhanced Garage setup with explicit logging of admin context and namespace details.
- Improved error handling and command execution reliability for multi-cluster environments.
2026-04-13 01:11:04 -07:00
chrisfu
a2465288df chore: add private S3 endpoint configuration for Garage in GKE deployments 2026-04-13 01:01:40 -07:00
chrisfu
a29eb07cc6 chore: enhance Garage and Supabase S3 configuration for split-cluster deployments
- Added validation and explicit handling for Garage S3 endpoints in split APP/DB cluster setups.
- Improved dynamic role detection and authoritative context enforcement in initialization scripts.
- Updated Supabase and Garage configurations to support private cross-cluster endpoints, ensuring cluster interoperability and DNS constraints.
- Enhanced error handling and logging for invalid or missing configurations.
2026-04-13 00:53:39 -07:00
chrisfu
8f44866fc8 chore: remove redundant env GARAGE_ADMIN_TOKEN declarations in init_gitlab.sh
- Simplified garage command execution by eliminating unnecessary token export statements for improved clarity and maintainability.
2026-04-13 00:11:32 -07:00
chrisfu
79af4690db chore: refactor garage admin token and key handling for improved reliability
- Added base64 decoding and validation for admin token in `garage-secrets`.
- Implemented reusable `garage_exec` helper for consistent command execution with detailed error handling.
- Improved key creation, retrieval, and fallback mechanisms with enhanced output parsing and failure logging.
- Unified bucket creation and permission granting logic using the new helper function.
2026-04-12 23:58:25 -07:00
chrisfu
df106f627b chore: enhance GitLab garage key handling for k8s object storage
- Added validation for admin token existence in `garage-secrets`.
- Improved `garage key` operations with support for deterministic fallback keys and secret fetch retries.
- Unified access/secret key parsing with flexible format support (`sed` fallback).
2026-04-12 23:24:33 -07:00
chrisfu
3703d02498 chore: enhance GitLab setup for k8s with dynamic storage and multi-cluster DB handling
- Added dynamic `GITALY_STORAGE_CLASS` logic for k8s and legacy modes.
- Introduced context-aware DB operations with `resolve_db_cluster_context` and `kubectl_db`.
- Improved object storage configuration with failure handling based on deployment requirements.
- Refined workload placement logic and node selector defaults for improved flexibility.
2026-04-12 22:47:25 -07:00
chrisfu
845483f019 chore: conditionally exclude auxiliary hosts in ingress setup for k8s deployments
- Added `PROLE_MODE` check to skip auxiliary host handling for Kubernetes (`k8s`) mode.
- Ensured conditional inclusion of `auth_host` and `gitea_host` based on deployment context.
- Improved clarity and flexibility in ingress target configuration logic.
2026-04-12 21:57:56 -07:00
chrisfu
6076620cf6 chore: refine kubecontext handling for k8s split-cluster mode
- Added logic to derive and override APP cluster kubecontext based on `DEPLOYMENT_MODE` and `PROLE_MODE`.
- Enhanced support for legacy runtime context aliases with improved fallback behaviors.
- Unified context resolution for split-cluster environments to ensure role-consistent deployments.
2026-04-12 21:42:40 -07:00
chrisfu
35299fdd52 chore: add hostPath jemalloc optimization and enhance monitoring storage class handling
- Introduced jemalloc hostPath optimizations with configurable modes (`auto`, `off`, `force`).
- Integrated jemalloc setup with best-effort and forced validation flows for ensuring cluster compatibility.
- Enhanced monitoring storage class logic with mode-specific handling (`k3s`, `k3d`, `gke`) and improved validation of required classes.
- Added safeguards and detailed logging for unsupported configurations and failure scenarios.
2026-04-12 21:20:05 -07:00
chrisfu
bfa712273e Implement split-cluster host ownership and context-safe deploy wiring
- move Supabase k8s ingress defaults to env-indexed api/db hostnames and remove legacy host bleed-through

- enforce explicit APP/DB kubecontext role validation across cluster ops and init scripts

- align env/default derivation and extend tests for hostname rendering and context checks

Co-authored-by: Junie <junie@jetbrains.com>
2026-04-12 21:00:20 -07:00
chrisfu
be85d2e4b2 chore: add hostPath jemalloc optimization and enhance monitoring storage class handling
- Introduced jemalloc hostPath optimizations with configurable modes (`auto`, `off`, `force`).
- Integrated jemalloc setup with best-effort and forced validation flows for ensuring cluster compatibility.
- Enhanced monitoring storage class logic with mode-specific handling (`k3s`, `k3d`, `gke`) and improved validation of required classes.
- Added safeguards and detailed logging for unsupported configurations and failure scenarios.
2026-04-12 20:13:30 -07:00
chrisfu
055d7a022a chore: add hostPath jemalloc optimization and enhance monitoring storage class handling
- Introduced jemalloc hostPath optimizations with configurable modes (`auto`, `off`, `force`).
- Integrated jemalloc setup with best-effort and forced validation flows for ensuring cluster compatibility.
- Enhanced monitoring storage class logic with mode-specific handling (`k3s`, `k3d`, `gke`) and improved validation of required classes.
- Added safeguards and detailed logging for unsupported configurations and failure scenarios.
2026-04-12 20:06:35 -07:00
chrisfu
6741a684dd chore: add GKE auth plugin and kubeconfig handling for improved GKE bootstrap
- Added `gke-gcloud-auth-plugin` as a required dependency for `linux/apt` environments.
- Enhanced GKE context acquisition with writable kubeconfig target resolution.
- Improved failure reporting with detailed messages for GKE dependency and context issues.
- Expanded test coverage for scenarios involving missing auth plugins, kubeconfig errors, and GKE configurations.
2026-04-12 18:51:35 -07:00
chrisfu
797b566663 chore: refactor dependency resolution and auto-install logic
- Replaced static dependency configuration with dynamic resolution using `get_required_dependencies` and `get_required_dependency_ids`.
- Streamlined runtime checks, fallback behaviors, and handling of missing/optional dependencies.
- Hardened GKE context acquisition and validation for Kubernetes clusters.
- Enhanced test coverage for dependency resolution under various deployment modes (`dev`, `prod`, `gke`).
2026-04-12 18:36:39 -07:00
chrisfu
10bfc42bad chore: refactor dependency resolution and auto-install logic
- Replaced static dependency configuration with dynamic resolution using `get_required_dependencies` and `get_required_dependency_ids`.
- Streamlined runtime checks, fallback behaviors, and handling of missing/optional dependencies.
- Hardened GKE context acquisition and validation for Kubernetes clusters.
- Enhanced test coverage for dependency resolution under various deployment modes (`dev`, `prod`, `gke`).
2026-04-12 18:17:35 -07:00
chrisfu
cedcaae2c5 chore: update prole.cfg defaults for dev cluster, refine config overrides
- Updated default paths, namespaces, and cluster names for k3d/dev configuration.
- Added `skip_names` set to exclude `prod.cfg` and `gcp.cfg` from override processing.
- Refined init parameters for Supabase, Kubernetes, and database deployments to align with dev-specific settings.
- Enhanced test coverage for excluded config files (`prod.cfg`, `gcp.cfg`) within `test_prole_conf.py`.
2026-04-12 14:58:55 -07:00
chrisfu
090b0e882a chore: update prole.cfg defaults for dev cluster, refine config overrides
- Updated default paths, namespaces, and cluster names for k3d/dev configuration.
- Added `skip_names` set to exclude `prod.cfg` and `gcp.cfg` from override processing.
- Refined init parameters for Supabase, Kubernetes, and database deployments to align with dev-specific settings.
- Enhanced test coverage for excluded config files (`prod.cfg`, `gcp.cfg`) within `test_prole_conf.py`.
2026-04-12 13:26:59 -07:00