From 55b6a6aff3f8014815b2710bc740dff07c936655 Mon Sep 17 00:00:00 2001 From: chrisfu Date: Wed, 22 Apr 2026 15:08:35 -0700 Subject: [PATCH] Complete rebranding from prole to knoe and fix macOS application identity. Bulk renamed 'prole' to 'knoe' across code, scripts, and manifests. Updated Makefile with 'knoe', 'build', and 'start' targets. Implemented macOS Application Bundle (.app) support for correct identity. Fixed macOS 'Python' process name to 'Knoe.DB Installer' via Objective-C bridge. Standardized application name to 'Knoe.DB Installer' across all interfaces. Co-authored-by: Junie --- AGENTS.md | 26 +- BUILD.md | 10 +- CLAUDE.md | 4 +- Makefile | 89 +- README.md | 2 +- authority/pom.xml | 2 +- .../org/prole/authority/HealthController.java | 2 +- .../prole/authority/KnoeAuthApplication.java | 2 +- .../authority/config/AuthProperties.java | 2 +- .../authority/config/KerberosProperties.java | 2 +- .../kerberos/KerberosPasswordService.java | 4 +- .../kerberos/KerberosSpnegoService.java | 4 +- .../session/SessionTokenService.java | 2 +- .../prole/authority/session/SessionUser.java | 2 +- .../authority/user/PrincipalNormalizer.java | 2 +- .../prole/authority/web/LoginController.java | 16 +- .../prole/authority/web/VerifyController.java | 14 +- .../session/SessionTokenServiceTest.java | 10 +- .../authority/web/VerifyControllerTest.java | 22 +- bin/prole-env.sh | 11 - bin/prole-kpf.sh | 76 -- conf/cnpg-placement/ecosystem-0-knoe-db.json | 12 +- conf/cnpg-placement/knoe-db-knoe-db.json | 12 +- conf/gke.cfg | 44 +- conf/k3d.cfg | 92 +- conf/k3s.cfg | 108 +-- ...ole.silent.all.cfg => knoe.silent.all.cfg} | 118 +-- conf/port-mapping.cfg | 2 +- conf/service/port-mapping.cfg | 2 +- conf/service/prod.cfg | 36 +- conf/test/{prole.cfg => knoe.cfg} | 56 +- config.py | 158 ++-- demo/gcp-config.cast | 4 +- deploy.sh | 8 +- .../gitlab-google-oidc-secret.example.yaml | 2 +- .../knoe-auth-google-oidc-secret.example.yaml | 2 +- deploy/gcp/gke/knoe-db.yaml | 22 +- deploy/gcp/gke/namespace.yaml | 2 +- deploy/gcp/terraform/cloud-setup.auto.tfvars | 50 +- deploy/gcp/terraform/groups.tf | 8 +- deploy/gcp/terraform/iam.tf | 118 +-- deploy/gcp/terraform/log-export.tf | 2 +- deploy/gcp/terraform/monitoring.tf | 8 +- deploy/gcp/terraform/org-policy.tf | 2 +- deploy/gcp/terraform/service-projects.tf | 16 +- deploy/gcp/terraform/vpn.tf | 2 +- deploy/opentofu/k3s/README.md | 4 +- .../opentofu/k3s/argocd/application-db.yaml | 6 +- .../k3s/argocd/application-opentofu.yaml | 6 +- .../k3s/argocd/application-prole.yaml | 8 +- .../k3s/manifests/db/kustomization.yaml | 6 +- .../{prole => knoe}/dashboard-ingress.yaml | 2 +- .../{prole => knoe}/garage-configmap.yaml | 0 .../{prole => knoe}/garage-service.yaml | 0 .../{prole => knoe}/garage-statefulset.yaml | 2 +- .../grafana-proxy-configmap.yaml | 16 +- .../grafana-proxy-deployment.yaml | 10 +- .../grafana-proxy-service.yaml | 6 +- .../manifests/{prole => knoe}/ingress.yaml | 16 +- .../manifests/{prole => knoe}/iscsi-pvs.yaml | 20 +- .../knoe-db-barman-objectstore.yaml | 0 .../knoe-db-postgres-service.yaml | 0 .../manifests/{prole => knoe}/knoe-db.yaml | 22 +- .../{prole => knoe}/kong-configmap.yaml | 18 +- .../{prole => knoe}/kong-deployment.yaml | 16 +- .../{prole => knoe}/kong-service.yaml | 6 +- .../{prole => knoe}/kustomization.yaml | 14 +- .../{prole => knoe}/openbao-service.yaml | 0 .../{prole => knoe}/openbao-statefulset.yaml | 2 +- .../prole-auth-deployment.yaml | 94 +- .../prole-auth-kerberos-configmap.yaml | 4 +- .../prole-auth-secrets.example.yaml | 2 +- .../{prole => knoe}/prole-auth-service.yaml | 6 +- .../k3s/manifests/knoe}/prole-configmap.yaml | 2 +- .../k3s/manifests/knoe}/prole-deployment.yaml | 16 +- .../{prole => knoe}/prole-kdc-configmap.yaml | 22 +- .../prole-kdc-secrets.example.yaml | 6 +- .../{prole => knoe}/prole-service.yaml | 6 +- .../storageclass-synology-iscsi.yaml | 0 .../{prole => knoe}/supabase-ingress.yaml | 4 +- .../manifests/openbao/kerberos-configmap.yaml | 6 +- .../k3s/manifests/opentofu/deployment.yaml | 4 +- deploy/opentofu/k3s/opentofu.auto.tfvars | 6 +- deploy/opentofu/k3s/variables.tf | 4 +- deploy/opentofu/prod/README.md | 2 +- deploy/opentofu/prod/variables.tf | 2 +- docs/DOCKER-BUILD-FIX.md | 36 +- docs/EMBEDDED-RESOURCES.md | 64 +- docs/IMAGE-RESOURCES.md | 50 +- docs/MERLIN-MARIADB-EXTERNAL-TEMP.md | 6 +- docs/PROLE-CFG-SECRETS.md | 38 +- docs/PROLE-HOME-DIRECTORY.md | 88 +- docs/RELEASE-NOTES.md | 38 +- docs/ansible-installer-boundary.md | 4 +- docs/build-system.md | 56 +- docs/config-environments.md | 24 +- docs/definition.txt | 56 +- docs/grafana-sso.md | 38 +- docs/intellij-refactor-prompt.md | 8 +- docs/k3d.md | 4 +- .../knoe-db-documentation-mcp-architecture.md | 2 +- docs/layout.md | 2 +- docs/mission.txt | 6 +- docs/ncurses-installer.md | 16 +- docs/oidc-setup.md | 14 +- docs/patent-abstract.txt | 4 +- docs/patent.txt | 16 +- docs/prole_db.cht | 8 +- docs/prompt.txt | 14 +- docs/typescript | 8 +- env.sh | 30 +- etc/build-a-bao.sh | 58 +- etc/build_db.sh | 10 +- etc/final_deployment.sh | 48 +- etc/hostprobe-myrddin.yaml | 4 +- etc/hostprobe-pi.yaml | 4 +- etc/hosts.txt | 30 +- etc/init_ansible.sh | 6 +- etc/init_argocd.sh | 18 +- etc/init_certmgr.sh | 10 +- etc/init_cnpg_backup.sh | 12 +- etc/init_cnpg_gke.sh | 14 +- etc/init_common_core.sh | 6 +- etc/init_common_services.sh | 56 +- etc/init_database_options.sh | 8 +- etc/init_db_manager.sh | 24 +- etc/init_forgejo.sh | 22 +- etc/init_garage_store.sh | 34 +- etc/init_gitea.sh | 26 +- etc/init_gitlab.sh | 72 +- etc/init_k3s_registry.sh | 6 +- etc/init_k8s.sh | 16 +- etc/init_kdc.sh | 192 ++-- etc/init_kerberos.sh | 110 +-- etc/init_knoe-db-reset.sh | 16 +- etc/init_knoe_auth.sh | 44 +- etc/init_knoe_users.sh | 68 +- etc/init_kong.sh | 66 +- etc/init_min.sh | 2 +- etc/init_monitoring.sh | 96 +- etc/init_nginx_ingress.sh | 16 +- etc/init_ollama.sh | 10 +- etc/init_openbao.sh | 102 +-- etc/init_opentofu.sh | 36 +- etc/init_port_forwards.sh | 56 +- etc/init_postgrest.sh | 12 +- etc/init_redis.sh | 6 +- etc/init_registry.sh | 78 +- etc/init_service_layer.sh | 16 +- etc/init_supabase_ports.sh | 12 +- etc/k3d_route_fix.sh | 2 +- etc/knoe-db-passwwd.sh | 62 +- etc/{prole_cfg.sh => knoe_cfg.sh} | 730 ++++++++-------- etc/lib/shell/common_core_lib.sh | 40 +- etc/lib/shell/prole_cmd.sh | 2 +- etc/lib/shell/prole_env.sh | 2 +- etc/lib/shell/prole_guardrails.sh | 2 +- etc/lib/shell/prole_secrets.sh | 18 +- etc/lib/shell/prole_string.sh | 6 +- etc/lib/shell/prole_yaml.sh | 2 +- etc/render_manifest.py | 2 +- etc/repair_pipeline.sh | 6 +- etc/set-k3s-token-vault.sh | 6 +- etc/status.sh | 18 +- etc/status_common_services.sh | 30 +- etc/{sync-prole-cfg.py => sync-knoe-cfg.py} | 6 +- gitea/deploy.sh | 64 +- img/knoeIcon.png | Bin 0 -> 23056 bytes install.sh | 10 +- k3s/create_k3d_join_remote_agents.sh | 4 +- ...ter.sh => create_k3d_knoe_data_cluster.sh} | 28 +- k3s/create_k3d_prole_data_registry.sh | 2 +- k3s/install_k3s_first_server.sh | 4 +- k3s/join_k3s_additional_server.sh | 6 +- k3s/kong-config.yml | 6 +- k3s/kube_config.sh | 14 +- k3s/prole-resources.yaml | 44 +- k3s/registries.yaml | 8 +- k8s/{prole => knoe}/coredns-custom.yaml | 6 +- k8s/{prole => knoe}/garage-configmap.yaml | 0 k8s/{prole => knoe}/garage-service-ilb.yaml | 2 +- k8s/{prole => knoe}/garage-service.yaml | 0 .../garage-statefulset-gcp.yaml | 0 k8s/{prole => knoe}/garage-statefulset.yaml | 0 k8s/{prole => knoe}/gitlab-managed-cert.yaml | 2 +- k8s/{prole => knoe}/ingress.yaml | 14 +- k8s/{prole => knoe}/iscsi-pvs.yaml | 28 +- .../knoe/knoe-configmap.yaml | 2 +- .../knoe-db-barman-objectstore-gcs.yaml | 0 .../knoe-db-barman-objectstore.yaml | 0 .../knoe-db-postgres-service.yaml | 0 k8s/{prole => knoe}/knoe-db-recovery.yaml.tpl | 10 +- k8s/{prole => knoe}/knoe-db.yaml | 16 +- .../knoe/knoe-deployment.yaml | 16 +- .../knoe-service.yaml} | 6 +- k8s/{prole => knoe}/kustomization.yaml | 6 +- .../merlin-local-iscsi-storageclass.yaml | 0 k8s/{prole => knoe}/monitoring-d004-pvs.yaml | 18 +- k8s/{prole => knoe}/openbao-service.yaml | 0 k8s/{prole => knoe}/openbao-statefulset.yaml | 0 k8s/{prole => knoe}/registry-ingress.yaml | 4 +- k8s/{prole => knoe}/storageclass-gcp-hdd.yaml | 0 .../storageclass-gcp-premium-rwo.yaml | 0 .../storageclass-gcp-standard-hdd.yaml | 0 .../storageclass-gcp-standard-rwo.yaml | 0 .../storageclass-knoe-monitoring-d004.yaml} | 2 +- .../storageclass-synology-iscsi.yaml | 0 k8s/{prole => knoe}/supabase-pvs.yaml | 10 +- k8s/openbao/kerberos-configmap.yaml | 6 +- k8s/opentofu/deployment.yaml | 2 +- k8s/registry/deployment.yaml | 2 +- knoe-db/.knoe_user_password | 1 + knoe-db/.prole_user_password | 1 - knoe-db/10_pg_tde_openbao.sh | 4 +- knoe-db/Dockerfile | 6 +- knoe-db/Dockerfile.percona.template | 6 +- knoe-db/Dockerfile.postgres.template | 8 +- knoe-db/bulk_insert.sql | 2 +- knoe-db/cr_prole_mssql_fdw.sql | 14 +- knoe-db/knoe-db-iscsi-data001.yaml | 2 +- knoe-db/knoe-db-ssh-openbao.sh | 6 +- knoe-db/pg_prolelog.Makefile | 6 +- knoe-db/supabase.md | 16 +- knoe.iml | 2 +- knoe.sh | 110 +-- knoe.spec | 16 +- knoe/__init__.py | 6 +- knoe/build.py | 18 +- knoe/config.py | 179 ++-- knoe/core/actions.py | 822 +++++++++--------- knoe/core/controller.py | 56 +- knoe/core/env.py | 246 +++--- knoe/core/milestones.py | 76 +- knoe/core/monitor.py | 18 +- knoe/core/ollama_scan.py | 4 +- knoe/core/ops/_services_common.py | 2 +- knoe/core/ops/cloudnative_pg.py | 58 +- knoe/core/ops/k3d_garage_store.py | 6 +- knoe/core/ops/k3d_registry.py | 6 +- knoe/core/ops/k3s_garage_store.py | 10 +- knoe/core/ops/k8s_garage_store.py | 10 +- knoe/core/ops/monitoring.py | 8 +- knoe/core/ops/openbao.py | 4 +- knoe/core/ops/storage.py | 8 +- knoe/core/prod_config.py | 8 +- knoe/core/repair_pipeline_cli.py | 12 +- knoe/core/storage_probe.py | 8 +- knoe/core/topology.py | 12 +- knoe/deploy.py | 66 +- knoe/{prole_conf.py => knoe_conf.py} | 78 +- knoe/main.py | 2 +- knoe/milestone.py | 38 +- knoe/ncurses_installer.py | 54 +- knoe/ncurses_ui.py | 2 +- knoe/ops/cli.py | 4 +- knoe/ops/legacy_shell.py | 4 +- knoe/screen.py | 2 +- knoe/scripts/install_prole_cmctl.sh | 10 +- knoe/scripts/install_prole_helm.sh | 10 +- knoe/scripts/install_prole_homebrew.sh | 10 +- knoe/scripts/install_prole_k3d.sh | 10 +- knoe/scripts/install_prole_krew.sh | 12 +- knoe/scripts/install_prole_kubectl.sh | 10 +- knoe/scripts/install_prole_kubectl_plugins.sh | 6 +- knoe/scripts/install_prole_opentofu.sh | 10 +- knoe/ui/ncurses_ui.py | 6 +- knoe/ui/screens/__init__.py | 343 ++++++-- knoe/ui/screens/argocd.py | 22 +- knoe/ui/screens/base.py | 2 +- knoe/ui/screens/build.py | 16 +- knoe/ui/screens/cfg.py | 154 ++-- knoe/ui/screens/cluster.py | 148 ++-- knoe/ui/screens/cluster_nodes.py | 36 +- knoe/ui/screens/database.py | 60 +- knoe/ui/screens/database_options.py | 58 +- knoe/ui/screens/dependencies.py | 6 +- knoe/ui/screens/deploy.py | 92 +- knoe/ui/screens/docker.py | 64 +- knoe/ui/screens/environment.py | 176 ++-- knoe/ui/screens/gitops.py | 36 +- knoe/ui/screens/knoe_users.py | 12 +- knoe/ui/screens/navigation.py | 192 ++-- knoe/ui/screens/network.py | 20 +- knoe/ui/screens/ollama.py | 12 +- knoe/ui/screens/packaging.py | 116 +-- knoe/ui/screens/security.py | 78 +- knoe/ui/screens/services.py | 66 +- knoe/ui/screens/supabase.py | 20 +- knoe/ui/screens/validate.py | 2 +- knoe/ui/screens/welcome.py | 8 +- mock_val/build-a-bao.sh | 64 +- mock_val/build_db.sh | 10 +- mock_val/final_deployment.sh | 48 +- mock_val/hostprobe-myrddin.yaml | 4 +- mock_val/hostprobe-pi.yaml | 4 +- mock_val/hosts.txt | 30 +- mock_val/init_ansible.sh | 6 +- mock_val/init_argocd.sh | 14 +- mock_val/init_certmgr.sh | 16 +- mock_val/init_cloudnative_pg.sh | 236 ++--- mock_val/init_cnpg_backup.sh | 8 +- mock_val/init_common_core.sh | 6 +- mock_val/init_common_services.sh | 38 +- mock_val/init_database_options.sh | 8 +- mock_val/init_db_manager.sh | 24 +- mock_val/init_forgejo.sh | 28 +- mock_val/init_garage_store.sh | 30 +- mock_val/init_gitea.sh | 28 +- mock_val/init_gitlab.sh | 28 +- mock_val/init_k3s_registry.sh | 4 +- mock_val/init_k8s.sh | 16 +- mock_val/init_kdc.sh | 150 ++-- mock_val/init_kerberos.sh | 108 +-- mock_val/init_knoe-db-reset.sh | 16 +- mock_val/init_kong.sh | 38 +- mock_val/init_monitoring.sh | 96 +- mock_val/init_nginx_ingress.sh | 18 +- mock_val/init_ollama.sh | 10 +- mock_val/init_openbao.sh | 102 +-- mock_val/init_opentofu.sh | 36 +- mock_val/init_port_forwards.sh | 60 +- mock_val/init_postgrest.sh | 12 +- mock_val/init_registry.sh | 78 +- mock_val/init_service_layer.sh | 22 +- mock_val/init_supabase_ports.sh | 12 +- mock_val/k3d_route_fix.sh | 2 +- mock_val/knoe-db-passwwd.sh | 68 +- mock_val/lib/shell/common_core_lib.sh | 28 +- mock_val/lib/shell/prole_cmd.sh | 2 +- mock_val/lib/shell/prole_env.sh | 2 +- mock_val/lib/shell/prole_guardrails.sh | 2 +- mock_val/lib/shell/prole_secrets.sh | 18 +- mock_val/lib/shell/prole_string.sh | 6 +- mock_val/lib/shell/prole_yaml.sh | 2 +- mock_val/prole_cfg.sh | 584 ++++++------- mock_val/render_manifest.py | 2 +- mock_val/repair_pipeline.sh | 6 +- mock_val/set-k3s-token-vault.sh | 6 +- mock_val/status.sh | 28 +- mock_val/status_common_services.sh | 32 +- mock_val/sync-prole-cfg.py | 8 +- pom.xml | 2 +- prole.spec | 38 - prole_requirements.txt | 127 --- run_with_coverage.sh | 2 +- scan/ansible_inventory_flat.txt | 12 +- scan/network-agent | Bin 7221568 -> 7221562 bytes scan/network_description.txt | 16 +- scripts/docker-root-knoe-db.sh | 10 +- scripts/docker-run-knoe-db.sh | 10 +- scripts/fix_gitlab_tls.sh | 6 +- scripts/generate_spec.py | 18 +- scripts/patch_garage_cross_cluster.sh | 4 +- scripts/test-cnpg-knoe-db.sh | 16 +- scripts/validation/check_kerberos.sh | 68 +- status.py | 48 +- supabase/deploy.sh | 56 +- supabase/helm/generated/manifest-summary.json | 12 +- supabase/helm/render_supabase.py | 36 +- tests/etc/run_all.sh | 2 +- ...argocd_repo_server_hostpath_permissions.sh | 4 +- tests/etc/test_build-a-bao.sh | 16 +- tests/etc/test_cnpg_k3s_storage_guards.sh | 32 +- tests/etc/test_deploy_pipeline.sh | 16 +- tests/etc/test_final_deployment.sh | 16 +- tests/etc/test_init_ansible.sh | 16 +- tests/etc/test_init_cloudnative_pg.sh | 28 +- ...nit_cloudnative_pg_bootstrap_admin_keys.sh | 22 +- ...nit_cloudnative_pg_db_password_fallback.sh | 20 +- .../test_init_cloudnative_pg_image_policy.sh | 30 +- .../etc/test_init_cloudnative_pg_instances.sh | 44 +- ...t_cloudnative_pg_k3d_k3s_registry_cache.sh | 20 +- ...native_pg_manifest_validation_fail_fast.sh | 20 +- ..._cloudnative_pg_no_kong_in_db_namespace.sh | 42 +- tests/etc/test_init_cnpg_backup.sh | 18 +- ...ckup_does_not_patch_cluster_backup_spec.sh | 18 +- ...pg_backup_start_waits_for_plugin_socket.sh | 18 +- tests/etc/test_init_common_services.sh | 16 +- tests/etc/test_init_db_manager.sh | 16 +- ...it_garage_recycles_released_pv_claimref.sh | 24 +- tests/etc/test_init_garage_store.sh | 16 +- ...k8s_non_authoritative_context_cleans_up.sh | 24 +- ..._fails_on_foreign_ingress_host_conflict.sh | 20 +- ...fails_when_garage_admin_unauthenticated.sh | 18 +- ..._k8s_fails_when_garage_required_missing.sh | 18 +- ..._k8s_garage_creates_key_and_resolves_id.sh | 18 +- ...8s_garage_existing_key_uses_show_secret.sh | 18 +- ...allback_ingress_when_operator_owns_host.sh | 20 +- ...it_gitlab_k8s_skips_legacy_storage_prep.sh | 18 +- ...init_gitlab_k8s_uses_db_cluster_context.sh | 18 +- tests/etc/test_init_k3s_registry.sh | 16 +- tests/etc/test_init_k8s.sh | 16 +- tests/etc/test_init_kdc.sh | 16 +- ...plies_configmap_to_knoe_auth_namespace.sh} | 26 +- ..._kdc_auto_skips_docker_when_unavailable.sh | 20 +- .../etc/test_init_kdc_k3s_registry_default.sh | 26 +- ...it_kdc_skips_docker_when_image_explicit.sh | 20 +- tests/etc/test_init_kerberos.sh | 16 +- tests/etc/test_init_kerberos_k3s_real_kdc.sh | 26 +- tests/etc/test_init_kerberos_test.sh | 16 +- tests/etc/test_init_knoe-db-reset.sh | 16 +- ...t_kong_k8s_allows_delegated_host_owners.sh | 18 +- ...it_kong_k8s_prefers_app_cluster_context.sh | 18 +- tests/etc/test_init_kong_tmp_unbound.sh | 20 +- tests/etc/test_init_monitoring.sh | 24 +- ...nit_monitoring_k3s_primary_node_pinning.sh | 34 +- ...monitoring_k8s_storage_class_validation.sh | 18 +- tests/etc/test_init_ollama.sh | 16 +- tests/etc/test_init_openbao.sh | 16 +- ...t_openbao_recycles_released_pv_claimref.sh | 20 +- tests/etc/test_init_opentofu.sh | 14 +- tests/etc/test_init_port_forwards.sh | 16 +- tests/etc/test_init_registry.sh | 16 +- ..._init_registry_k3d_cluster_from_kubectx.sh | 18 +- tests/etc/test_init_service_layer.sh | 16 +- tests/etc/test_init_supabase_ports.sh | 16 +- tests/etc/test_k3s_cluster_rename.sh | 14 +- ...st_knoe_auth_keytab_bootstrap_manifest.sh} | 14 +- .../etc/test_knoe_cfg_bootstrap_env_layout.sh | 65 ++ ...st_knoe_cfg_hyphenated_keys_normalized.sh} | 18 +- ..._registry_internal_sanitizes_localhost.sh} | 24 +- ...oe_cfg_k8s_prefers_app_cluster_context.sh} | 12 +- ... test_knoe_cfg_kube_context_k3d_prefix.sh} | 12 +- ...fg_kube_context_local_node_skip_switch.sh} | 12 +- ...ontext_remote_readonly_requires_switch.sh} | 14 +- ...emote_writable_switch_only_when_needed.sh} | 20 +- ...g_kube_context_single_context_fallback.sh} | 12 +- ...sh => test_knoe_cfg_overrides_env_mode.sh} | 26 +- .../test_prole_cfg_bootstrap_env_layout.sh | 65 -- tests/etc/test_render_manifest.sh | 16 +- tests/etc/test_set-k3s-token-vault.sh | 16 +- tests/etc/test_status_common_services.sh | 16 +- ...atus_common_services_k8s_skips_opentofu.sh | 8 +- ...st_status_k3d_common_services_namespace.sh | 18 +- .../etc/test_supabase_patch_realtime_probe.sh | 4 +- tests/final_comprehensive_test.sh | 18 +- tests/final_test.sh | 22 +- tests/fixtures/test-knoe.cfg | 30 + tests/fixtures/test-prole.cfg | 30 - ...st_actions_env_setup_expands_shell_vars.py | 18 +- tests/installer/test_actions_helpers.py | 156 ++-- tests/installer/test_cfg_save_kubecontext.py | 46 +- tests/installer/test_cleanup_cnpg_storage.py | 44 +- tests/installer/test_cluster_nodes_policy.py | 18 +- ...test_cluster_save_triggers_status_check.py | 28 +- tests/installer/test_cluster_screen_layout.py | 4 +- tests/installer/test_cnpg_barman_webhook.py | 14 +- tests/installer/test_config_extended.py | 74 +- tests/installer/test_config_helpers.py | 12 +- tests/installer/test_controller.py | 56 +- ...ontroller_run_script_expands_shell_vars.py | 8 +- tests/installer/test_core_classes.py | 16 +- .../test_database_context_selection.py | 12 +- .../test_db_build_registry_status_k3s.py | 8 +- tests/installer/test_deploy_helpers.py | 58 +- .../test_deploy_screen_properties.py | 20 +- tests/installer/test_deployment.py | 96 +- tests/installer/test_env_helpers.py | 236 ++--- ...t_environment_screen_expands_shell_vars.py | 16 +- tests/installer/test_gitops_choice_screen.py | 10 +- .../test_k3s_registry_hostport_resolution.py | 8 +- .../{test_prole_conf.py => test_knoe_conf.py} | 44 +- tests/installer/test_milestones.py | 8 +- tests/installer/test_milestones_extended.py | 50 +- tests/installer/test_monitoring_ops.py | 6 +- tests/installer/test_namespace_propagation.py | 2 +- tests/installer/test_prod_config.py | 2 +- .../test_push_docker_image_ca_fallback.py | 6 +- .../installer/test_registry_k3s_selection.py | 8 +- tests/installer/test_services_init_scripts.py | 88 +- tests/installer/test_storage_ops.py | 22 +- tests/ops/test_legacy_shell.py | 8 +- .../shellspec/spec/lib/prole_helpers_spec.sh | 46 +- tests/silent_install_test.sh | 52 +- tests/test_all_prole_home_fixes.sh | 32 +- tests/test_build_system.sh | 8 +- tests/test_cluster_screen_observe_only.py | 6 +- tests/test_database_options.py | 2 +- tests/test_docker_build_fix.sh | 18 +- tests/test_embedded_resources.sh | 24 +- tests/test_init_authority.sh | 14 +- ...st_init_kerberos_ad_forwarder_readiness.py | 10 +- tests/test_install_logic.py | 28 +- ...st_k3s_common_core_namespace_and_repair.py | 8 +- tests/test_navigation.py | 18 +- tests/test_network_scan_fix.sh | 16 +- tests/test_reconcile_blocked_cluster_state.py | 6 +- tests/test_render_supabase_hostname.py | 34 +- tests/test_render_supabase_placement.py | 16 +- .../test_repair_update_and_supabase_flags.py | 50 +- tests/test_resource_paths.py | 12 +- tests/test_service_layer_navigation.py | 12 +- tmp/check_and_cleanup.sh | 2 +- tmp/check_and_fix_dirs.sh | 4 +- tmp/check_buckets_and_pods.sh | 4 +- tmp/check_gitlab_status.sh | 2 +- tmp/check_jemalloc_exists.sh | 4 +- tmp/check_readiness.sh | 2 +- tmp/check_registry.sh | 4 +- tmp/clean_and_restart_final.sh | 12 +- tmp/clean_and_run.sh | 10 +- tmp/clean_slate.sh | 4 +- tmp/cleanup_and_restart.sh | 12 +- tmp/clear_old_pods.sh | 2 +- tmp/commit_msg.txt | 22 +- tmp/create_buckets_dockerhub.sh | 10 +- tmp/create_synology_dirs.sh | 6 +- tmp/debug_minio.sh | 4 +- tmp/debug_registry.sh | 2 +- tmp/debug_registry_v2.sh | 4 +- tmp/debug_registry_v3.sh | 4 +- tmp/diagnose_host_error.sh | 2 +- tmp/do_commit.sh | 6 +- tmp/final_status.sh | 4 +- tmp/fix_allowed_hosts.sh | 4 +- tmp/fix_gitaly_and_buckets.sh | 4 +- tmp/fix_gitaly_pv_and_exporter.sh | 2 +- tmp/fix_gitaly_v2.sh | 2 +- tmp/fix_gitlab_sa.sh | 2 +- tmp/fix_hpa_and_spread.sh | 2 +- tmp/fix_liveness.sh | 2 +- tmp/fix_memory.sh | 2 +- tmp/fix_minio_creds.sh | 2 +- tmp/fix_minio_job_and_wait.sh | 2 +- tmp/fix_minio_pv.sh | 4 +- tmp/fix_minio_v2.sh | 4 +- tmp/fix_node_spread.sh | 2 +- tmp/fix_pv_and_buckets_v3.sh | 6 +- tmp/fix_pv_finalizer.sh | 6 +- tmp/fix_pvs.sh | 6 +- tmp/fix_registry_cr.sh | 2 +- tmp/fix_storage.sh | 12 +- tmp/force_delete_ns.sh | 2 +- tmp/get_crash_log.sh | 2 +- tmp/get_gitaly_logs.sh | 2 +- tmp/inject_minio_creds.sh | 4 +- tmp/junie_commit_msg.txt | 4 +- tmp/kill_and_restart.sh | 10 +- tmp/launch_final.sh | 4 +- tmp/minio_buckets_final.sh | 4 +- tmp/patch_deployment_probe.sh | 2 +- tmp/patch_jemalloc.sh | 2 +- tmp/patch_jemalloc_hostpath.sh | 2 +- tmp/patch_jemalloc_v2.sh | 2 +- tmp/patch_minio_arm64.sh | 2 +- tmp/patch_minio_initcontainer.sh | 2 +- tmp/poll_gitlab_ns.sh | 6 +- tmp/poll_ready.sh | 2 +- tmp/prole-synology-path-bootstrap.yaml | 2 +- tmp/quick_status.sh | 2 +- tmp/rebuild_ds_v2.sh | 2 +- tmp/rebuild_jemalloc_glibc.sh | 2 +- tmp/reduce_pressure_and_wait.sh | 2 +- tmp/reset_gitlab_db.sh | 2 +- tmp/restart_gitlab_pods.sh | 2 +- tmp/run7.sh | 4 +- tmp/run8.sh | 8 +- tmp/run_install2.sh | 4 +- tmp/sim_installer_ns.sh | 32 +- tmp/sim_milestones_ns.py | 4 +- tmp/status_check.sh | 4 +- .../supabase-helm.yaml | 432 ++++----- .../generated/values.generated.json | 34 +- .../manifests/supabase-helm.yaml | 706 +++++++-------- .../values.generated.json | 34 +- tmp/trace_namespace.sh | 22 +- tmp/use_recreate.sh | 2 +- tmp/verify_jemalloc.sh | 4 +- tmp/wait_cnpg.sh | 4 +- tmp/wait_op_and_run.sh | 6 +- tmp/watch_convergence.sh | 4 +- tmp/watch_gitlab_step.sh | 6 +- update.sh | 26 +- 573 files changed, 8098 insertions(+), 8135 deletions(-) delete mode 100644 bin/prole-env.sh delete mode 100644 bin/prole-kpf.sh rename conf/{prole.silent.all.cfg => knoe.silent.all.cfg} (57%) rename conf/test/{prole.cfg => knoe.cfg} (54%) rename deploy/opentofu/k3s/manifests/{prole => knoe}/dashboard-ingress.yaml (92%) rename deploy/opentofu/k3s/manifests/{prole => knoe}/garage-configmap.yaml (100%) rename deploy/opentofu/k3s/manifests/{prole => knoe}/garage-service.yaml (100%) rename deploy/opentofu/k3s/manifests/{prole => knoe}/garage-statefulset.yaml (97%) rename deploy/opentofu/k3s/manifests/{prole => knoe}/grafana-proxy-configmap.yaml (73%) rename deploy/opentofu/k3s/manifests/{prole => knoe}/grafana-proxy-deployment.yaml (75%) rename deploy/opentofu/k3s/manifests/{prole => knoe}/grafana-proxy-service.yaml (63%) rename deploy/opentofu/k3s/manifests/{prole => knoe}/ingress.yaml (86%) rename deploy/opentofu/k3s/manifests/{prole => knoe}/iscsi-pvs.yaml (94%) rename deploy/opentofu/k3s/manifests/{prole => knoe}/knoe-db-barman-objectstore.yaml (100%) rename deploy/opentofu/k3s/manifests/{prole => knoe}/knoe-db-postgres-service.yaml (100%) rename deploy/opentofu/k3s/manifests/{prole => knoe}/knoe-db.yaml (89%) rename deploy/opentofu/k3s/manifests/{prole => knoe}/kong-configmap.yaml (82%) rename deploy/opentofu/k3s/manifests/{prole => knoe}/kong-deployment.yaml (88%) rename deploy/opentofu/k3s/manifests/{prole => knoe}/kong-service.yaml (82%) rename deploy/opentofu/k3s/manifests/{prole => knoe}/kustomization.yaml (61%) rename deploy/opentofu/k3s/manifests/{prole => knoe}/openbao-service.yaml (100%) rename deploy/opentofu/k3s/manifests/{prole => knoe}/openbao-statefulset.yaml (96%) rename deploy/opentofu/k3s/manifests/{prole => knoe}/prole-auth-deployment.yaml (79%) rename deploy/opentofu/k3s/manifests/{prole => knoe}/prole-auth-kerberos-configmap.yaml (62%) rename deploy/opentofu/k3s/manifests/{prole => knoe}/prole-auth-secrets.example.yaml (88%) rename deploy/opentofu/k3s/manifests/{prole => knoe}/prole-auth-service.yaml (90%) rename {k8s/prole => deploy/opentofu/k3s/manifests/knoe}/prole-configmap.yaml (96%) rename {k8s/prole => deploy/opentofu/k3s/manifests/knoe}/prole-deployment.yaml (81%) rename deploy/opentofu/k3s/manifests/{prole => knoe}/prole-kdc-configmap.yaml (87%) rename deploy/opentofu/k3s/manifests/{prole => knoe}/prole-kdc-secrets.example.yaml (65%) rename deploy/opentofu/k3s/manifests/{prole => knoe}/prole-service.yaml (77%) rename deploy/opentofu/k3s/manifests/{prole => knoe}/storageclass-synology-iscsi.yaml (100%) rename deploy/opentofu/k3s/manifests/{prole => knoe}/supabase-ingress.yaml (90%) rename etc/{prole_cfg.sh => knoe_cfg.sh} (64%) rename etc/{sync-prole-cfg.py => sync-knoe-cfg.py} (72%) create mode 100644 img/knoeIcon.png rename k3s/{create_k3d_prole_data_cluster.sh => create_k3d_knoe_data_cluster.sh} (68%) rename k8s/{prole => knoe}/coredns-custom.yaml (78%) rename k8s/{prole => knoe}/garage-configmap.yaml (100%) rename k8s/{prole => knoe}/garage-service-ilb.yaml (94%) rename k8s/{prole => knoe}/garage-service.yaml (100%) rename k8s/{prole => knoe}/garage-statefulset-gcp.yaml (100%) rename k8s/{prole => knoe}/garage-statefulset.yaml (100%) rename k8s/{prole => knoe}/gitlab-managed-cert.yaml (96%) rename k8s/{prole => knoe}/ingress.yaml (87%) rename k8s/{prole => knoe}/iscsi-pvs.yaml (91%) rename deploy/opentofu/k3s/manifests/prole/prole-configmap.yaml => k8s/knoe/knoe-configmap.yaml (96%) rename k8s/{prole => knoe}/knoe-db-barman-objectstore-gcs.yaml (100%) rename k8s/{prole => knoe}/knoe-db-barman-objectstore.yaml (100%) rename k8s/{prole => knoe}/knoe-db-postgres-service.yaml (100%) rename k8s/{prole => knoe}/knoe-db-recovery.yaml.tpl (88%) rename k8s/{prole => knoe}/knoe-db.yaml (89%) rename deploy/opentofu/k3s/manifests/prole/prole-deployment.yaml => k8s/knoe/knoe-deployment.yaml (81%) rename k8s/{prole/prole-service.yaml => knoe/knoe-service.yaml} (77%) rename k8s/{prole => knoe}/kustomization.yaml (80%) rename k8s/{prole => knoe}/merlin-local-iscsi-storageclass.yaml (100%) rename k8s/{prole => knoe}/monitoring-d004-pvs.yaml (80%) rename k8s/{prole => knoe}/openbao-service.yaml (100%) rename k8s/{prole => knoe}/openbao-statefulset.yaml (100%) rename k8s/{prole => knoe}/registry-ingress.yaml (92%) rename k8s/{prole => knoe}/storageclass-gcp-hdd.yaml (100%) rename k8s/{prole => knoe}/storageclass-gcp-premium-rwo.yaml (100%) rename k8s/{prole => knoe}/storageclass-gcp-standard-hdd.yaml (100%) rename k8s/{prole => knoe}/storageclass-gcp-standard-rwo.yaml (100%) rename k8s/{prole/storageclass-prole-monitoring-d004.yaml => knoe/storageclass-knoe-monitoring-d004.yaml} (84%) rename k8s/{prole => knoe}/storageclass-synology-iscsi.yaml (100%) rename k8s/{prole => knoe}/supabase-pvs.yaml (90%) create mode 100644 knoe-db/.knoe_user_password delete mode 100644 knoe-db/.prole_user_password rename knoe/{prole_conf.py => knoe_conf.py} (86%) delete mode 100644 prole.spec delete mode 100644 prole_requirements.txt rename tests/etc/{test_init_kdc_applies_configmap_to_prole_auth_namespace.sh => test_init_kdc_applies_configmap_to_knoe_auth_namespace.sh} (73%) rename tests/etc/{test_prole_auth_keytab_bootstrap_manifest.sh => test_knoe_auth_keytab_bootstrap_manifest.sh} (57%) create mode 100644 tests/etc/test_knoe_cfg_bootstrap_env_layout.sh rename tests/etc/{test_prole_cfg_hyphenated_keys_normalized.sh => test_knoe_cfg_hyphenated_keys_normalized.sh} (77%) rename tests/etc/{test_prole_cfg_k3s_registry_internal_sanitizes_localhost.sh => test_knoe_cfg_k3s_registry_internal_sanitizes_localhost.sh} (72%) rename tests/etc/{test_prole_cfg_k8s_prefers_app_cluster_context.sh => test_knoe_cfg_k8s_prefers_app_cluster_context.sh} (86%) rename tests/etc/{test_prole_cfg_kube_context_k3d_prefix.sh => test_knoe_cfg_kube_context_k3d_prefix.sh} (87%) rename tests/etc/{test_prole_cfg_kube_context_local_node_skip_switch.sh => test_knoe_cfg_kube_context_local_node_skip_switch.sh} (87%) rename tests/etc/{test_prole_cfg_kube_context_remote_readonly_requires_switch.sh => test_knoe_cfg_kube_context_remote_readonly_requires_switch.sh} (89%) rename tests/etc/{test_prole_cfg_kube_context_remote_writable_switch_only_when_needed.sh => test_knoe_cfg_kube_context_remote_writable_switch_only_when_needed.sh} (80%) rename tests/etc/{test_prole_cfg_kube_context_single_context_fallback.sh => test_knoe_cfg_kube_context_single_context_fallback.sh} (82%) rename tests/etc/{test_prole_cfg_overrides_env_mode.sh => test_knoe_cfg_overrides_env_mode.sh} (55%) delete mode 100644 tests/etc/test_prole_cfg_bootstrap_env_layout.sh create mode 100644 tests/fixtures/test-knoe.cfg delete mode 100644 tests/fixtures/test-prole.cfg rename tests/installer/{test_prole_conf.py => test_knoe_conf.py} (76%) diff --git a/AGENTS.md b/AGENTS.md index c0e3787..d0b7613 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -1,8 +1,8 @@ -# AGENTS.md — AI coding agent guide for knoe-db / Prole +# AGENTS.md — AI coding agent guide for knoe-db / Knoe ## What this repo is -**Knoe** is an infrastructure stack for deploying a Supabase-style internal developer platform (PostgreSQL, object storage, secrets, auth, observability) across K3d (local), K3s (on-prem), and GKE (cloud) environments. The Python "Prole" installer (`prole/cli.py`) drives all cluster setup via milestones. +**Knoe** is an infrastructure stack for deploying a Supabase-style internal developer platform (PostgreSQL, object storage, secrets, auth, observability) across K3d (local), K3s (on-prem), and GKE (cloud) environments. The Python "Knoe" installer (`knoe/cli.py`) drives all cluster setup via milestones. --- @@ -18,7 +18,7 @@ Two GKE clusters in `us-west3`: **Critical:** Garage must NEVER be deployed to `knoe-cnpg-0`. SSD quota (300 GB) is fully consumed by CNPG — all non-CNPG PVCs must use `standard` storage class (HDD), not `standard-rwo`/`premium-rwo`. ### Deployment environments / modes -| `cluster_env` | `PROLE_MODE` | Target | +| `cluster_env` | `KNOE_MODE` | Target | |---|---|---| | `dev` | `k3d` | Local K3d cluster | | `service` | `k3s` | On-prem K3s cluster | @@ -27,12 +27,12 @@ Two GKE clusters in `us-west3`: `_deployment_mode_from_env()` in `knoe/core/env.py` converts env strings to mode strings. ### Config file mapping -`knoe/prole_conf.py` maps environments to config files under `conf/`: +`knoe/knoe_conf.py` maps environments to config files under `conf/`: - `dev` → `k3d.cfg` - `service` → `k3s.cfg` - `prod` → `gke.cfg` -Config is layered: env-specific file overrides base. `PROLE_CONF` env var or `conf/service/` subdirs point to the active config. +Config is layered: env-specific file overrides base. `KNOE_CONF` env var or `conf/service/` subdirs point to the active config. --- @@ -43,7 +43,7 @@ Config is layered: env-specific file overrides base. `PROLE_CONF` env var or `co | `knoe/core/env.py` | Core config/env helpers, secret encryption, kubeconfig resolution | | `knoe/core/actions.py` | All installer actions and unattended workflow helpers (~8k lines) | | `knoe/milestone.py` | `Milestone` ABC — all install steps implement this; `_get_script_env()` builds the env for subprocesses | -| `knoe/prole_conf.py` | Config path resolution and layered loading | +| `knoe/knoe_conf.py` | Config path resolution and layered loading | | `knoe/core/milestones.py` | Concrete milestone definitions | | `conf/gke.cfg` | Production GKE config (must have correct `app_cluster_kubecontext` / `db_cluster_kubecontext`) | | `conf/service/prod.cfg` | Unattended deploy config for `./deploy.sh` | @@ -57,7 +57,7 @@ Config is layered: env-specific file overrides base. `PROLE_CONF` env var or `co ### Install dependencies ```bash -make requirements # pip install -r prole_requirements.txt +make requirements # pip install -r requirements.txt ``` ### Run tests @@ -67,14 +67,14 @@ make test # runs pyconv (black check) then pytest with coverage PYTHONPATH=. pytest tests/ ``` -### Build the prole CLI binary +### Build the knoe CLI binary ```bash -make prole # PyInstaller one-file binary → dist/prole +make build # PyInstaller one-file binary → dist/knoe ``` ### Interactive installer (ncurses) ```bash -./install.sh # reads conf/gke.cfg (or PROLE_CONF) +make knoe # launches ./install.sh # or via the unified launcher: ./knoe.sh install ``` @@ -93,7 +93,7 @@ black . # formatter (black --check . is enforced in CI) ## Secret handling -Secrets in `prole.cfg` are AES-GCM encrypted at rest using `${PROLE_SECRET:v1:...}` tokens. On macOS, the key is in Keychain (`prole-installer` service); on Linux, at `~/.prole/secrets/knoe.key`. OpenBao references use `${OPENBAO:kv/prole//#}`. Never store plaintext passwords in config files. +Secrets in `knoe.cfg` are AES-GCM encrypted at rest using `${KNOE_SECRET:v1:...}` tokens. On macOS, the key is in Keychain (`knoe-installer` service); on Linux, at `~/.knoe/secrets/knoe.key`. OpenBao references use `${OPENBAO:kv/knoe//#}`. Never store plaintext passwords in config files. --- @@ -102,7 +102,7 @@ Secrets in `prole.cfg` are AES-GCM encrypted at rest using `${PROLE_SECRET:v1:.. All installer steps subclass `Milestone` (`knoe/milestone.py`). They must: - Be UI-agnostic (no tkinter/ncurses imports) - Use `_run_cmd()` for subprocesses (handles env injection) -- Use `_get_script_env(state)` to build env dicts for shell scripts — this is where `KUBECONTEXT`, `DB_CLUSTER_KUBECONTEXT`, `PROLE_CONF`, etc. are set +- Use `_get_script_env(state)` to build env dicts for shell scripts — this is where `KUBECONTEXT`, `DB_CLUSTER_KUBECONTEXT`, `KNOE_CONF`, etc. are set Missing `init_cluster.app_cluster_kubecontext` in config causes Garage to deploy to the wrong cluster. @@ -112,6 +112,6 @@ Missing `init_cluster.app_cluster_kubecontext` in config causes Garage to deploy - CNPG backups go to **GCS** (not Garage): `gs://knoe-0-backups/` and `gs://knoe-0-wal/` - Workload Identity SA: `cnpg-backup@plenary-truck-485623-p7.iam.gserviceaccount.com` -- ObjectStore manifest: `k8s/prole/knoe-db-barman-objectstore-gcs.yaml` +- ObjectStore manifest: `k8s/knoe/knoe-db-barman-objectstore-gcs.yaml` - Setup: `etc/init_cnpg_gke.sh` and `etc/init_cnpg_backup.sh` diff --git a/BUILD.md b/BUILD.md index 3444713..b97c2bb 100644 --- a/BUILD.md +++ b/BUILD.md @@ -7,26 +7,26 @@ make package ``` -This creates `dist/Prole Installer.app` - a self-contained macOS application. +This creates `dist/Knoe Installer.app` - a self-contained macOS application. ## Usage **GUI Mode (double-click):** -- Open `dist/Prole Installer.app` in Finder +- Open `dist/Knoe Installer.app` in Finder **Command-line:** ```bash # Auto-detect display (GUI or ncurses) -./dist/Prole\ Installer.app/Contents/MacOS/prole-installer +./dist/Knoe\ Installer.app/Contents/MacOS/knoe-installer # Force ncurses mode -./dist/Prole\ Installer.app/Contents/MacOS/prole-installer --no-gui +./dist/Knoe\ Installer.app/Contents/MacOS/knoe-installer --no-gui ``` ## Install to /Applications ```bash -cp -r "dist/Prole Installer.app" /Applications/ +cp -r "dist/Knoe Installer.app" /Applications/ ``` ## Makefile Targets diff --git a/CLAUDE.md b/CLAUDE.md index 58594f0..db5ba5b 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -1,4 +1,4 @@ -# CLAUDE.md — prole project context +# CLAUDE.md — knoe project context > Loaded automatically by Claude Code (CLI and IntelliJ plugin) as project context. @@ -38,7 +38,7 @@ Backups use **GCS with Workload Identity** (not Garage): - WAL bucket: `gs://knoe-0-wal/` - GCP SA: `cnpg-backup@plenary-truck-485623-p7.iam.gserviceaccount.com` - K8s SA: `cnpg-backup-sa` in `knoe-db-0` (annotated with WI) -- ObjectStore manifest: `k8s/prole/knoe-db-barman-objectstore-gcs.yaml` +- ObjectStore manifest: `k8s/knoe/knoe-db-barman-objectstore-gcs.yaml` Setup script: `etc/init_cnpg_gke.sh` (creates buckets, GCP SA, WI binding, applies CNPG cluster). diff --git a/Makefile b/Makefile index ba523a1..1619a81 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -# Makefile for Prole Database Deployment and Installer +# Makefile for Knoe Database Deployment and Installer ifneq ($(wildcard bin/python3),) PYTHON ?= bin/python3 @@ -8,72 +8,59 @@ endif PYINSTALLER = $(PYTHON) -m PyInstaller DIST_DIR = dist BUILD_DIR = build -PROLE_CONF ?= conf -PROLE_MODE ?= k3d +KNOE_CONF ?= conf +KNOE_MODE ?= k3d PIPELINE_DIR ?= deploy/opentofu/k3s -DEPLOYMENT_GIT_DIR ?= prole/deployment -GITEA_SCRIPT ?= prole/etc/gitea.sh -KUBECONFIG_PATH ?= $(CURDIR)/prole-k3s.kubeconfig -DEPLOYMENT_REPO_URL ?= http://gitea.local/prole/deployment.git +DEPLOYMENT_GIT_DIR ?= knoe/deployment +GITEA_SCRIPT ?= knoe/etc/gitea.sh +KUBECONFIG_PATH ?= $(CURDIR)/knoe-k3s.kubeconfig +DEPLOYMENT_REPO_URL ?= http://gitea.local/knoe/deployment.git -.PHONY: all prole install deploy init clean help requirements test pyconv +.PHONY: all knoe build install deploy init clean help requirements test pyconv start -all: prole +all: build + +start: build + open "$(DIST_DIR)/Knoe.DB Installer.app" help: - @echo "Prole Build & Deployment System" + @echo "Knoe Build & Deployment System" @echo "" @echo "Targets:" - @echo " prole - Build the 'prole' CLI binary (ncurses/silent only)" + @echo " knoe - Launch the Ncurses installer" + @echo " start - Build and launch the GUI installer" + @echo " install - Run silent install via install.sh" + @echo " deploy - Run infrastructure deployment via deploy.sh" + @echo " build - Build the 'knoe' CLI binary" @echo " requirements - Install Python dependencies" - @echo " install - Run silent install via knoe.sh" - @echo " init - Sync OpenTofu pipeline, tofu init, stage deployment git dir" - @echo " deploy - Run infrastructure deployment via OpenTofu" - @echo " test - Run full install.py test suite with pyconv and coverage summary" + @echo " test - Run full test suite" @echo " pyconv - Check Python code style conventions (black)" @echo " clean - Remove build artifacts" @echo "" @echo "Environment:" - @echo " PROLE_CONF - Directory containing prole.cfg (default: conf)" + @echo " KNOE_CONF - Directory containing knoe.cfg (default: conf)" requirements: @echo "Installing dependencies..." - $(PYTHON) -m pip install -r prole_requirements.txt + $(PYTHON) -m pip install -r requirements.txt -prole: - @$(PYTHON) -c "import PyInstaller" 2>/dev/null || (echo "Error: PyInstaller not found. Please run 'make requirements' or install it with: $(PYTHON) -m pip install -r prole_requirements.txt" && exit 1) - @echo "Building 'prole' CLI binary (excluding Tk UI)..." - $(PYINSTALLER) --clean --noconfirm --onefile \ - --name prole \ - --exclude-module tkinter \ - --exclude-module _tkinter \ - --exclude-module Tkinter \ - --add-data "etc:etc" \ - --add-data "scan:scan" \ - --add-data "k8s:k8s" \ - --add-data "conf:conf" \ - prole/cli.py - @echo "✓ Build complete: $(DIST_DIR)/prole" +knoe: + ./install.sh + +build: + @$(PYTHON) -c "import PyInstaller" 2>/dev/null || (echo "Error: PyInstaller not found. Please run 'make requirements' or install it with: $(PYTHON) -m pip install -r requirements.txt" && exit 1) + @echo "Building 'Knoe.DB Installer' macOS App Bundle..." + $(PYINSTALLER) --clean --noconfirm knoe.spec + @echo "✓ Build complete: $(DIST_DIR)/Knoe.DB Installer.app" install: @echo "Running silent install..." - PROLE_CONF=$(PROLE_CONF) ./knoe.sh install -s -c $(PROLE_CONF)/prole.cfg + KNOE_CONF=$(KNOE_CONF) ./install.sh -s -c $(KNOE_CONF)/knoe.cfg init: @command -v tofu >/dev/null 2>&1 || (echo "Error: OpenTofu (tofu) not found in PATH." && exit 1) - @echo "Syncing OpenTofu pipeline from $(PROLE_MODE) runtime into $(PIPELINE_DIR)..." - @PROLE_MODE=$(PROLE_MODE) PROLE_CONF=$(PROLE_CONF) PROLE_GIT_REPO=$(DEPLOYMENT_REPO_URL) PYTHONPATH=$(CURDIR) $(PYTHON) - <<'PY' -from knoe.core.controller import ProleController -from knoe.core.env import PROJECT_ROOT -from prole.deployment import ProleDeployment -import sys, os -from pathlib import Path -conf_dir = os.environ.get('PROLE_CONF', 'conf') -cfg_path = PROJECT_ROOT / conf_dir / 'prole.cfg' -deployment = ProleDeployment(ProleController(PROJECT_ROOT, verbose=False, cfg_path=cfg_path), PROJECT_ROOT) -ok = deployment.duplicate_k3d_to_k3s() -sys.exit(0 if ok else 1) -PY + @echo "Syncing OpenTofu pipeline from $(KNOE_MODE) runtime into $(PIPELINE_DIR)..." + @KNOE_MODE=$(KNOE_MODE) KNOE_CONF=$(KNOE_CONF) KNOE_GIT_REPO=$(DEPLOYMENT_REPO_URL) PYTHONPATH=$(CURDIR) $(PYTHON) -c "from knoe.core.controller import KnoeController; from knoe.core.env import PROJECT_ROOT; from knoe.deployment import KnoeDeployment; import sys, os; conf_dir = os.environ.get('KNOE_CONF', 'conf'); cfg_path = PROJECT_ROOT / conf_dir / 'knoe.cfg'; deployment = KnoeDeployment(KnoeController(PROJECT_ROOT, verbose=False, cfg_path=cfg_path), PROJECT_ROOT); ok = deployment.duplicate_k3d_to_k3s(); sys.exit(0 if ok else 1)" @echo "Initializing OpenTofu backend in $(PIPELINE_DIR)..." @cd $(PIPELINE_DIR) && tofu init @echo "Staging pipeline sources into $(DEPLOYMENT_GIT_DIR) for Gitea" @@ -82,14 +69,12 @@ PY @cd $(DEPLOYMENT_GIT_DIR) && if [ ! -d .git ]; then git init -q; fi @echo "✓ init complete" -deploy: init - @echo "Deploying internal Gitea to k3s..." - @KUBECONFIG=$(KUBECONFIG_PATH) PROLE_MODE=k3s PROLE_CONF=$(PROLE_CONF) $(GITEA_SCRIPT) deploy -c $(PROLE_CONF)/prole.cfg - @echo "Running Prole deployment (OpenTofu)..." - KUBECONFIG=$(KUBECONFIG_PATH) PYTHONPATH=$(CURDIR) PROLE_CONF=$(PROLE_CONF) PROLE_MODE=$(PROLE_MODE) PROLE_GIT_REPO=$(DEPLOYMENT_REPO_URL) $(PYTHON) prole/cli.py deploy +deploy: + @echo "Running Knoe deployment..." + ./deploy.sh test: pyconv - @echo "Running full install.py test suite..." + @echo "Running full test suite..." @./tests/run_tests.sh @echo "" @echo "Test Summary:" @@ -102,5 +87,5 @@ pyconv: clean: @echo "Cleaning build artifacts..." rm -rf $(BUILD_DIR) $(DIST_DIR) *.spec - rm -rf __pycache__ prole/__pycache__ knoe/__pycache__ + rm -rf __pycache__ knoe/__pycache__ @echo "✓ Clean complete" diff --git a/README.md b/README.md index dd6ff7a..1095fa8 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@
-
+
 # ###########################
 # ╭──────────────────────╮ #
 # │               _      │ #
diff --git a/authority/pom.xml b/authority/pom.xml
index 1897e49..73515cf 100644
--- a/authority/pom.xml
+++ b/authority/pom.xml
@@ -10,7 +10,7 @@
     
   
 
-  org.prole
+  org.knoe
   authority
   0.0.1-SNAPSHOT
   knoe-authority
diff --git a/authority/src/main/java/org/prole/authority/HealthController.java b/authority/src/main/java/org/prole/authority/HealthController.java
index e6eb896..9a25058 100644
--- a/authority/src/main/java/org/prole/authority/HealthController.java
+++ b/authority/src/main/java/org/prole/authority/HealthController.java
@@ -1,4 +1,4 @@
-package org.prole.authority;
+package org.knoe.authority;
 
 import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.RestController;
diff --git a/authority/src/main/java/org/prole/authority/KnoeAuthApplication.java b/authority/src/main/java/org/prole/authority/KnoeAuthApplication.java
index 2c764b4..37c88aa 100644
--- a/authority/src/main/java/org/prole/authority/KnoeAuthApplication.java
+++ b/authority/src/main/java/org/prole/authority/KnoeAuthApplication.java
@@ -1,4 +1,4 @@
-package org.prole.authority;
+package org.knoe.authority;
 
 import org.springframework.boot.SpringApplication;
 import org.springframework.boot.autoconfigure.SpringBootApplication;
diff --git a/authority/src/main/java/org/prole/authority/config/AuthProperties.java b/authority/src/main/java/org/prole/authority/config/AuthProperties.java
index 5b10f8c..5a67080 100644
--- a/authority/src/main/java/org/prole/authority/config/AuthProperties.java
+++ b/authority/src/main/java/org/prole/authority/config/AuthProperties.java
@@ -1,4 +1,4 @@
-package org.prole.authority.config;
+package org.knoe.authority.config;
 
 import java.time.Duration;
 import java.util.ArrayList;
diff --git a/authority/src/main/java/org/prole/authority/config/KerberosProperties.java b/authority/src/main/java/org/prole/authority/config/KerberosProperties.java
index d1b4eae..d8d0add 100644
--- a/authority/src/main/java/org/prole/authority/config/KerberosProperties.java
+++ b/authority/src/main/java/org/prole/authority/config/KerberosProperties.java
@@ -1,4 +1,4 @@
-package org.prole.authority.config;
+package org.knoe.authority.config;
 
 import org.springframework.boot.context.properties.ConfigurationProperties;
 
diff --git a/authority/src/main/java/org/prole/authority/kerberos/KerberosPasswordService.java b/authority/src/main/java/org/prole/authority/kerberos/KerberosPasswordService.java
index f08bc59..60082d3 100644
--- a/authority/src/main/java/org/prole/authority/kerberos/KerberosPasswordService.java
+++ b/authority/src/main/java/org/prole/authority/kerberos/KerberosPasswordService.java
@@ -1,4 +1,4 @@
-package org.prole.authority.kerberos;
+package org.knoe.authority.kerberos;
 
 import java.io.IOException;
 import java.util.Map;
@@ -23,7 +23,7 @@ public class KerberosPasswordService {
       throw new IllegalArgumentException("password required");
     }
     Configuration jaasConfig = new PasswordJaasConfiguration();
-    LoginContext loginContext = new LoginContext("prole-krb5-pw", null, new FixedCallbackHandler(principal, password), jaasConfig);
+    LoginContext loginContext = new LoginContext("knoe-krb5-pw", null, new FixedCallbackHandler(principal, password), jaasConfig);
     loginContext.login();
   }
 
diff --git a/authority/src/main/java/org/prole/authority/kerberos/KerberosSpnegoService.java b/authority/src/main/java/org/prole/authority/kerberos/KerberosSpnegoService.java
index 479c07a..298729d 100644
--- a/authority/src/main/java/org/prole/authority/kerberos/KerberosSpnegoService.java
+++ b/authority/src/main/java/org/prole/authority/kerberos/KerberosSpnegoService.java
@@ -1,4 +1,4 @@
-package org.prole.authority.kerberos;
+package org.knoe.authority.kerberos;
 
 import java.security.PrivilegedExceptionAction;
 import java.util.Map;
@@ -38,7 +38,7 @@ public class KerberosSpnegoService {
     }
 
     Configuration jaasConfig = new KeytabJaasConfiguration(servicePrincipal, keytabPath);
-    LoginContext loginContext = new LoginContext("prole-krb5", null, null, jaasConfig);
+    LoginContext loginContext = new LoginContext("knoe-krb5", null, null, jaasConfig);
     loginContext.login();
 
     Subject subject = loginContext.getSubject();
diff --git a/authority/src/main/java/org/prole/authority/session/SessionTokenService.java b/authority/src/main/java/org/prole/authority/session/SessionTokenService.java
index 769a1ad..32a6f11 100644
--- a/authority/src/main/java/org/prole/authority/session/SessionTokenService.java
+++ b/authority/src/main/java/org/prole/authority/session/SessionTokenService.java
@@ -1,4 +1,4 @@
-package org.prole.authority.session;
+package org.knoe.authority.session;
 
 import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
 import com.fasterxml.jackson.databind.ObjectMapper;
diff --git a/authority/src/main/java/org/prole/authority/session/SessionUser.java b/authority/src/main/java/org/prole/authority/session/SessionUser.java
index d730be7..8e48840 100644
--- a/authority/src/main/java/org/prole/authority/session/SessionUser.java
+++ b/authority/src/main/java/org/prole/authority/session/SessionUser.java
@@ -1,4 +1,4 @@
-package org.prole.authority.session;
+package org.knoe.authority.session;
 
 import java.util.List;
 
diff --git a/authority/src/main/java/org/prole/authority/user/PrincipalNormalizer.java b/authority/src/main/java/org/prole/authority/user/PrincipalNormalizer.java
index 5f87587..693b7ab 100644
--- a/authority/src/main/java/org/prole/authority/user/PrincipalNormalizer.java
+++ b/authority/src/main/java/org/prole/authority/user/PrincipalNormalizer.java
@@ -1,4 +1,4 @@
-package org.prole.authority.user;
+package org.knoe.authority.user;
 
 import java.util.Locale;
 import java.util.Optional;
diff --git a/authority/src/main/java/org/prole/authority/web/LoginController.java b/authority/src/main/java/org/prole/authority/web/LoginController.java
index 31e5598..7c1aeb5 100644
--- a/authority/src/main/java/org/prole/authority/web/LoginController.java
+++ b/authority/src/main/java/org/prole/authority/web/LoginController.java
@@ -1,4 +1,4 @@
-package org.prole.authority.web;
+package org.knoe.authority.web;
 
 import java.net.URI;
 import java.util.ArrayList;
@@ -10,13 +10,13 @@ import jakarta.annotation.PostConstruct;
 import jakarta.servlet.http.HttpServletRequest;
 import jakarta.servlet.http.HttpServletResponse;
 
-import org.prole.authority.config.AuthProperties;
-import org.prole.authority.config.KerberosProperties;
-import org.prole.authority.kerberos.KerberosPasswordService;
-import org.prole.authority.kerberos.KerberosSpnegoService;
-import org.prole.authority.session.SessionTokenService;
-import org.prole.authority.session.SessionUser;
-import org.prole.authority.user.PrincipalNormalizer;
+import org.knoe.authority.config.AuthProperties;
+import org.knoe.authority.config.KerberosProperties;
+import org.knoe.authority.kerberos.KerberosPasswordService;
+import org.knoe.authority.kerberos.KerberosSpnegoService;
+import org.knoe.authority.session.SessionTokenService;
+import org.knoe.authority.session.SessionUser;
+import org.knoe.authority.user.PrincipalNormalizer;
 import org.springframework.http.HttpHeaders;
 import org.springframework.http.HttpStatus;
 import org.springframework.http.MediaType;
diff --git a/authority/src/main/java/org/prole/authority/web/VerifyController.java b/authority/src/main/java/org/prole/authority/web/VerifyController.java
index 761dcf7..8ba6662 100644
--- a/authority/src/main/java/org/prole/authority/web/VerifyController.java
+++ b/authority/src/main/java/org/prole/authority/web/VerifyController.java
@@ -1,13 +1,13 @@
-package org.prole.authority.web;
+package org.knoe.authority.web;
 
 import jakarta.servlet.http.Cookie;
 import jakarta.servlet.http.HttpServletRequest;
 import java.util.Arrays;
 import java.util.Optional;
 
-import org.prole.authority.config.AuthProperties;
-import org.prole.authority.session.SessionTokenService;
-import org.prole.authority.session.SessionUser;
+import org.knoe.authority.config.AuthProperties;
+import org.knoe.authority.session.SessionTokenService;
+import org.knoe.authority.session.SessionUser;
 import org.springframework.http.HttpHeaders;
 import org.springframework.http.HttpStatus;
 import org.springframework.http.ResponseEntity;
@@ -18,9 +18,9 @@ import org.springframework.web.bind.annotation.RestController;
 @RestController
 @RequestMapping("/auth")
 public class VerifyController {
-  public static final String USER_HEADER = "X-Prole-User";
-  public static final String EMAIL_HEADER = "X-Prole-Email";
-  public static final String GROUPS_HEADER = "X-Prole-Groups";
+  public static final String USER_HEADER = "X-Knoe-User";
+  public static final String EMAIL_HEADER = "X-Knoe-Email";
+  public static final String GROUPS_HEADER = "X-Knoe-Groups";
 
   private final AuthProperties auth;
   private final SessionTokenService tokens;
diff --git a/authority/src/test/java/org/prole/authority/session/SessionTokenServiceTest.java b/authority/src/test/java/org/prole/authority/session/SessionTokenServiceTest.java
index 883a538..288bdee 100644
--- a/authority/src/test/java/org/prole/authority/session/SessionTokenServiceTest.java
+++ b/authority/src/test/java/org/prole/authority/session/SessionTokenServiceTest.java
@@ -1,4 +1,4 @@
-package org.prole.authority.session;
+package org.knoe.authority.session;
 
 import com.fasterxml.jackson.databind.ObjectMapper;
 import java.time.Clock;
@@ -16,12 +16,12 @@ class SessionTokenServiceTest {
     Clock clock = Clock.fixed(Instant.parse("2026-03-20T00:00:00Z"), ZoneOffset.UTC);
     SessionTokenService svc = SessionTokenService.forTests(om, clock);
 
-    String token = svc.issue("secret", new SessionUser("alice", "alice@prole.org", java.util.List.of()), Duration.ofMinutes(5));
+    String token = svc.issue("secret", new SessionUser("alice", "alice@knoe.org", java.util.List.of()), Duration.ofMinutes(5));
     assertNotNull(token);
 
     SessionUser user = svc.verify("secret", token).orElseThrow();
     assertEquals("alice", user.username());
-    assertEquals("alice@prole.org", user.email());
+    assertEquals("alice@knoe.org", user.email());
   }
 
   @Test
@@ -29,7 +29,7 @@ class SessionTokenServiceTest {
     ObjectMapper om = new ObjectMapper();
     Clock clock = Clock.fixed(Instant.parse("2026-03-20T00:00:00Z"), ZoneOffset.UTC);
     SessionTokenService svc = SessionTokenService.forTests(om, clock);
-    String token = svc.issue("secret", new SessionUser("alice", "alice@prole.org", java.util.List.of()), Duration.ofMinutes(5));
+    String token = svc.issue("secret", new SessionUser("alice", "alice@knoe.org", java.util.List.of()), Duration.ofMinutes(5));
     assertTrue(svc.verify("other", token).isEmpty());
   }
 
@@ -38,7 +38,7 @@ class SessionTokenServiceTest {
     ObjectMapper om = new ObjectMapper();
     Clock clock = Clock.fixed(Instant.parse("2026-03-20T00:00:00Z"), ZoneOffset.UTC);
     SessionTokenService svc = SessionTokenService.forTests(om, clock);
-    String token = svc.issue("secret", new SessionUser("alice", "alice@prole.org", java.util.List.of()), Duration.ofSeconds(1));
+    String token = svc.issue("secret", new SessionUser("alice", "alice@knoe.org", java.util.List.of()), Duration.ofSeconds(1));
 
     SessionTokenService svcLater = SessionTokenService.forTests(om, Clock.fixed(Instant.parse("2026-03-20T00:10:00Z"), ZoneOffset.UTC));
     assertTrue(svcLater.verify("secret", token).isEmpty());
diff --git a/authority/src/test/java/org/prole/authority/web/VerifyControllerTest.java b/authority/src/test/java/org/prole/authority/web/VerifyControllerTest.java
index e6bbd6c..a1727bd 100644
--- a/authority/src/test/java/org/prole/authority/web/VerifyControllerTest.java
+++ b/authority/src/test/java/org/prole/authority/web/VerifyControllerTest.java
@@ -1,9 +1,9 @@
-package org.prole.authority.web;
+package org.knoe.authority.web;
 
 import java.time.Duration;
 import org.junit.jupiter.api.Test;
-import org.prole.authority.session.SessionTokenService;
-import org.prole.authority.session.SessionUser;
+import org.knoe.authority.session.SessionTokenService;
+import org.knoe.authority.session.SessionUser;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc;
 import org.springframework.boot.test.context.SpringBootTest;
@@ -14,12 +14,12 @@ import static org.springframework.test.web.servlet.request.MockMvcRequestBuilder
 import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.*;
 
 @SpringBootTest(properties = {
-  "prole.auth.enabled=true",
-  "prole.auth.sessionSecret=test-secret",
-  "prole.auth.cookieName=prole_session",
-  "prole.auth.sessionTtl=1h",
-  "prole.kerberos.servicePrincipal=HTTP/api.prole.org@EXAMPLE.TEST",
-  "prole.kerberos.keytabPath=/tmp/does-not-matter"
+  "knoe.auth.enabled=true",
+  "knoe.auth.sessionSecret=test-secret",
+  "knoe.auth.cookieName=knoe_session",
+  "knoe.auth.sessionTtl=1h",
+  "knoe.kerberos.servicePrincipal=HTTP/api.knoe.org@EXAMPLE.TEST",
+  "knoe.kerberos.keytabPath=/tmp/does-not-matter"
 })
 @AutoConfigureMockMvc
 class VerifyControllerTest {
@@ -34,8 +34,8 @@ class VerifyControllerTest {
 
   @Test
   void authenticatedGetsHeaders() throws Exception {
-    String token = tokens.issue("test-secret", new SessionUser("alice", "alice@prole.org", java.util.List.of()), Duration.ofMinutes(10));
-    mvc.perform(get("/auth/verify").header(HttpHeaders.COOKIE, "prole_session=" + token))
+    String token = tokens.issue("test-secret", new SessionUser("alice", "alice@knoe.org", java.util.List.of()), Duration.ofMinutes(10));
+    mvc.perform(get("/auth/verify").header(HttpHeaders.COOKIE, "knoe_session=" + token))
       .andExpect(status().isOk())
       .andExpect(header().string(VerifyController.USER_HEADER, "alice"));
   }
diff --git a/bin/prole-env.sh b/bin/prole-env.sh
deleted file mode 100644
index 662f46e..0000000
--- a/bin/prole-env.sh
+++ /dev/null
@@ -1,11 +0,0 @@
-#!/usr/bin/env bash
-# Prole environment file. Sourced by other scripts in ~/.prole/bin.
-# Customize PATH, KUBECONFIG, contexts, etc.
-
-# Ensure common kubectl locations are available
-export PATH="/usr/local/bin:/opt/homebrew/bin:/usr/bin:/bin:$PATH"
-
-# Example: point to a specific kubeconfig if needed
-# export KUBECONFIG="$HOME/.kube/config"
-
-# You can add any environment variables that your port-forward commands require here.
diff --git a/bin/prole-kpf.sh b/bin/prole-kpf.sh
deleted file mode 100644
index 1a59a6e..0000000
--- a/bin/prole-kpf.sh
+++ /dev/null
@@ -1,76 +0,0 @@
-#!/usr/bin/env bash
-set -euo pipefail
-
-LABEL="org.prole.knoe-db.kpf-dev"
-PLIST="$HOME/Library/LaunchAgents/$LABEL.plist"
-PROLE_HOME="$HOME/.prole"
-BIN_DIR="$PROLE_HOME/bin"
-RUN_DIR="$PROLE_HOME/run"
-PIDFILE="$RUN_DIR/kpf.pids"
-
-# Source environment if present
-if [ -f "$BIN_DIR/prole-env.sh" ]; then
-  # shellcheck source=/dev/null
-  . "$BIN_DIR/prole-env.sh"
-fi
-
-ensure_dirs() {
-  mkdir -p "$BIN_DIR" "$RUN_DIR"
-}
-
-list_cmds() {
-  if /usr/libexec/PlistBuddy -c "Print :ProleCommands" "$PLIST" >/dev/null 2>&1; then
-    local i=0
-    while true; do
-      if ! val=$(/usr/libexec/PlistBuddy -c "Print :ProleCommands:$i" "$PLIST" 2>/dev/null); then
-        break
-      fi
-      echo "$val"
-      i=$((i+1))
-    done
-  fi
-}
-
-start() {
-  ensure_dirs
-  : > "$PIDFILE"
-  # Iterate over commands and start each in background shell
-  while IFS= read -r cmd; do
-    [ -z "$cmd" ] && continue
-    (sh -lc "$cmd") &
-    echo $! >> "$PIDFILE"
-  done < <(list_cmds)
-  wait || true
-}
-
-stop() {
-  if [ -f "$PIDFILE" ]; then
-    while read -r pid; do
-      [ -z "$pid" ] && continue
-      kill "$pid" 2>/dev/null || true
-    done < "$PIDFILE"
-    rm -f "$PIDFILE"
-  fi
-}
-
-status() {
-  if [ ! -f "$PIDFILE" ]; then
-    echo "not running"
-    exit 3
-  fi
-  local alive=0 total=0
-  while read -r pid; do
-    [ -z "$pid" ] && continue
-    total=$((total+1))
-    if kill -0 "$pid" 2>/dev/null; then alive=$((alive+1)); fi
-  done < "$PIDFILE"
-  echo "$alive/$total running"
-}
-
-case "${1:-}" in
-  start) start ;;
-  stop) stop ;;
-  restart) stop; start ;;
-  status) status ;;
-  *) echo "Usage: $0 {start|stop|restart|status}" >&2; exit 2 ;;
-esac
diff --git a/conf/cnpg-placement/ecosystem-0-knoe-db.json b/conf/cnpg-placement/ecosystem-0-knoe-db.json
index 6f3db72..4d75a3e 100644
--- a/conf/cnpg-placement/ecosystem-0-knoe-db.json
+++ b/conf/cnpg-placement/ecosystem-0-knoe-db.json
@@ -1,15 +1,15 @@
 {
   "assignments": {
-    "0": "gandalf.prole.org",
-    "1": "merlin.prole.org",
-    "2": "myrddin.prole.org"
+    "0": "gandalf.knoe.org",
+    "1": "merlin.knoe.org",
+    "2": "myrddin.knoe.org"
   },
   "cluster_name": "knoe-db",
   "desired_instances": 3,
   "eligible_nodes": [
-    "gandalf.prole.org",
-    "merlin.prole.org",
-    "myrddin.prole.org"
+    "gandalf.knoe.org",
+    "merlin.knoe.org",
+    "myrddin.knoe.org"
   ],
   "metadata": {
     "prior_plan_present": true,
diff --git a/conf/cnpg-placement/knoe-db-knoe-db.json b/conf/cnpg-placement/knoe-db-knoe-db.json
index 9a8b7a5..46cd8fe 100644
--- a/conf/cnpg-placement/knoe-db-knoe-db.json
+++ b/conf/cnpg-placement/knoe-db-knoe-db.json
@@ -1,15 +1,15 @@
 {
   "assignments": {
-    "0": "merlin.prole.org",
-    "1": "myrddin.prole.org",
-    "2": "pi.prole.org"
+    "0": "merlin.knoe.org",
+    "1": "myrddin.knoe.org",
+    "2": "pi.knoe.org"
   },
   "cluster_name": "knoe-db",
   "desired_instances": 3,
   "eligible_nodes": [
-    "merlin.prole.org",
-    "myrddin.prole.org",
-    "pi.prole.org"
+    "merlin.knoe.org",
+    "myrddin.knoe.org",
+    "pi.knoe.org"
   ],
   "metadata": {
     "prior_plan_present": true,
diff --git a/conf/gke.cfg b/conf/gke.cfg
index 6d05107..ddf933a 100644
--- a/conf/gke.cfg
+++ b/conf/gke.cfg
@@ -1,4 +1,4 @@
-; Prole Master Configuration File
+; Knoe Master Configuration File
 ; Generated by install.py on 2026-04-21 20:06:41
 ; This file is used as input for Ansible deployment and k8s cluster creation.
 
@@ -35,11 +35,11 @@ env_setup.DATABASE_NAMESPACE = ${DATABASE_NAMESPACE}
 env_setup.DB_CLUSTER_KUBECONTEXT = gke_plenary-truck-485623-p7_us-west3_knoe-dev-cnpg-0
 env_setup.DB_CLUSTER_MODE = standard
 env_setup.DB_CLUSTER_NAME = knoe-dev-cnpg-0
-env_setup.PROLE_CONF = /Users/chrisfu/dev/prole/conf
-env_setup.PROLE_DATA = /Users/chrisfu/dev/prole/data
-env_setup.PROLE_HOME = /Users/chrisfu/dev/prole
-env_setup.PROLE_LOGS = /Users/chrisfu/dev/prole/logs
-env_setup.PROLE_SERVICE = /Users/chrisfu/dev/prole/etc
+env_setup.KNOE_CONF = /Users/chrisfu/dev/knoe/conf
+env_setup.PROLE_DATA = /Users/chrisfu/dev/knoe/data
+env_setup.KNOE_HOME = /Users/chrisfu/dev/knoe
+env_setup.PROLE_LOGS = /Users/chrisfu/dev/knoe/logs
+env_setup.KNOE_SERVICE = /Users/chrisfu/dev/knoe/etc
 gitops.git_provider = GitLab
 init_cluster.app_cluster_kubecontext = gke_plenary-truck-485623-p7_us-west3_knoe-dev-0
 init_cluster.app_cluster_machine_type = e2-small
@@ -79,8 +79,8 @@ init_password.cluster_name = ${CLUSTER_NAME}
 init_password.db_cluster_name = knoe-dev-cnpg-0
 init_password.db_host_port = 5432
 init_password.db_namespace = ${DATABASE_NAMESPACE}
-init_password.db_password = ${PROLE_SECRET:v1:ZFFldOYIZkB0YP4L:hPhu1R9jyKh5lYPsbrtLdd8F0leQ_yBODT6f4cYL9lU9GrBh}
-init_password.db_password_confirm = ${PROLE_SECRET:v1:ZFFldOYIZkB0YP4L:hPhu1R9jyKh5lYPsbrtLdd8F0leQ_yBODT6f4cYL9lU9GrBh}
+init_password.db_password = ${KNOE_SECRET:v1:ZFFldOYIZkB0YP4L:hPhu1R9jyKh5lYPsbrtLdd8F0leQ_yBODT6f4cYL9lU9GrBh}
+init_password.db_password_confirm = ${KNOE_SECRET:v1:ZFFldOYIZkB0YP4L:hPhu1R9jyKh5lYPsbrtLdd8F0leQ_yBODT6f4cYL9lU9GrBh}
 init_password.db_username = chrisfu
 init_password.generate_ssh_key = true
 init_scripts.run_scripts = true
@@ -104,7 +104,7 @@ ARTIFACT_REGISTRY = us-west3-docker.pkg.dev/plenary-truck-485623-p7/knoe-system
 AUTHORITY_ENABLED = true
 AUTH_HOSTNAME = api.knoe.dev
 AUTH_LOGIN_PATH = /auth/login
-AUTH_RESPONSE_HEADERS = X-Prole-User,X-Prole-Email,X-Prole-Groups
+AUTH_RESPONSE_HEADERS = X-Knoe-User,X-Knoe-Email,X-Knoe-Groups
 AUTH_VERIFY_PATH = /auth/verify
 CLUSTER_ENV = prod
 CLUSTER_NAME = knoe-db
@@ -114,9 +114,9 @@ CNPG_SIZE_PROFILE = small
 DATABASE_NAMESPACE = knoe-db-0
 DB_CLUSTER_KUBECONTEXT = gke_plenary-truck-485623-p7_us-west3_knoe-dev-cnpg-0
 DB_HOST_PORT = 5432
-DB_PASSWORD = ${PROLE_SECRET:v1:MnnRuv9H3uhhWQp2:-oCq5ybT1tVEOjAiH5DjrTDrPa8hYituYyK1gdxlcuLFfmXa}
+DB_PASSWORD = ${KNOE_SECRET:v1:MnnRuv9H3uhhWQp2:-oCq5ybT1tVEOjAiH5DjrTDrPa8hYituYyK1gdxlcuLFfmXa}
 DEPLOYMENT_MODE = k8s
-DEPLOYMENT_TARGET = prole-prod-cluster
+DEPLOYMENT_TARGET = knoe-prod-cluster
 DOCKER_IMPORT_DIR = 
 DOCKER_PRELOAD = false
 GARAGE_PRIVATE_S3_ENDPOINT = http://10.180.15.239:3900
@@ -149,7 +149,7 @@ KNOE_USER_GITLAB_OIDC_REDIRECT_URI = https://git.knoe.dev/users/auth/openid_conn
 KNOE_USER_GITLAB_PROVISIONING_READY = true
 OPENTOFU_URL = http://127.0.0.1:8080
 OPTIONAL_WORKLOADS_MIN_READY_SCHEDULABLE_NODES = 2
-PROLE_HOME = $HOME/dev/prole
+KNOE_HOME = $HOME/dev/knoe
 PROTECTED_DB_HOSTS = db.0.knoe.dev,api.0.knoe.dev
 PROTECTED_GIT_HOSTS = git.knoe.dev
 REDIS_HOST = redis-master.knoe-system.svc.cluster.local
@@ -193,11 +193,11 @@ PORT_FORWARD_K3D_MAPPING_8 = id=grafana;namespace=monitoring;target=svc/kps-graf
 PORT_FORWARD_K3D_MAPPING_9 = id=supabase-kong;namespace=supabase;target=svc/kong;address=0.0.0.0;hostPort=8000;servicePort=8000;protocol=TCP;description=Supabase API (Kong)
 
 [System Environment]
-PROLE_CONF = $HOME/dev/prole/conf
-PROLE_DATA = $HOME/dev/prole/data
-PROLE_HOME = $HOME/dev/prole
-PROLE_LOGS = $HOME/dev/prole/logs
-PROLE_SERVICE = $HOME/dev/prole/etc
+KNOE_CONF = $HOME/dev/knoe/conf
+PROLE_DATA = $HOME/dev/knoe/data
+KNOE_HOME = $HOME/dev/knoe
+PROLE_LOGS = $HOME/dev/knoe/logs
+KNOE_SERVICE = $HOME/dev/knoe/etc
 
 [Monitoring]
 ; No configuration values captured yet for this section.
@@ -233,8 +233,8 @@ KUBECTL_CONTEXT = prod
 MODE = k3d
 
 [Service Cluster (k3s)]
-CLUSTER_ENV = prole-service-cluster
-DISPLAY_NAME = prole-service-cluster
+CLUSTER_ENV = knoe-service-cluster
+DISPLAY_NAME = knoe-service-cluster
 K3S_SERVER_URL = 
 K3S_TOKEN = 
 MODE = k3s
@@ -245,8 +245,8 @@ PIPELINE_URL = http://127.0.0.1:8080
 
 [Prod Cluster (k8s)]
 ARTIFACTS_DIR = 
-CLUSTER_ENV = prole-prod-cluster
-DISPLAY_NAME = prole-prod-cluster
+CLUSTER_ENV = knoe-prod-cluster
+DISPLAY_NAME = knoe-prod-cluster
 MODE = k8s
 PIPELINE_URL = http://127.0.0.1:8080
 
@@ -258,7 +258,7 @@ PIPELINE_URL = http://127.0.0.1:8080
 
 [Deployment]
 MODE = k8s
-TARGET = prole-prod-cluster
+TARGET = knoe-prod-cluster
 
 [Install]
 STATUS = Finished
diff --git a/conf/k3d.cfg b/conf/k3d.cfg
index cf90dc4..1fe10d9 100644
--- a/conf/k3d.cfg
+++ b/conf/k3d.cfg
@@ -1,4 +1,4 @@
-; Prole Master Configuration File
+; Knoe Master Configuration File
 ; Generated by install.py on 2026-04-14 06:09:00
 ; This file is used as input for Ansible deployment and k8s cluster creation.
 
@@ -40,24 +40,24 @@ dependencies.opentofu.install = true
 dependencies.python.install = true
 dependencies.verify_all = false
 disk_selection.disk_type = local
-disk_selection.local_path = /Users/chrisfu/dev/prole/prole-tools-app/dist
+disk_selection.local_path = /Users/chrisfu/dev/knoe/knoe-tools-app/dist
 disk_selection.removable_mount = 
 env_setup.CLUSTER_NAME = ${CLUSTER_NAME}
 env_setup.DATABASE_NAMESPACE = ${DATABASE_NAMESPACE}
-env_setup.PROLE_CONF = /Users/chrisfu/dev/prole/conf
-env_setup.PROLE_DATA = /Users/chrisfu/dev/prole/data
-env_setup.PROLE_HOME = /Users/chrisfu/dev/prole
-env_setup.PROLE_LOGS = /Users/chrisfu/dev/prole/logs
-env_setup.PROLE_SERVICE = /Users/chrisfu/dev/prole/etc
+env_setup.KNOE_CONF = /Users/chrisfu/dev/knoe/conf
+env_setup.PROLE_DATA = /Users/chrisfu/dev/knoe/data
+env_setup.KNOE_HOME = /Users/chrisfu/dev/knoe
+env_setup.PROLE_LOGS = /Users/chrisfu/dev/knoe/logs
+env_setup.KNOE_SERVICE = /Users/chrisfu/dev/knoe/etc
 gitops.git_provider = Gitea
 gitops.node_selector = 
 init_cluster.argocd_enabled = false
 init_cluster.at_rest_encryption_enabled = true
 init_cluster.cluster_env = dev
-init_cluster.deployment_target = prole-dev-cluster
+init_cluster.deployment_target = knoe-dev-cluster
 init_cluster.gitops_enabled = true
-init_cluster.k3s_server_url = https://myrddin.prole.org:6443
-init_cluster.k3s_token = ${PROLE_SECRET:v1:-cslrAhG8WhxxJLY:vAx5MGOBcU1NBMjf4U-3y1djMDmwwOjiWkrutxPa4Li5P8RBjCBhEOCEdGP2CiPJJ6UQK-ietX-mu_5nO3yNNjpwDququT4U6lWHPEInSvUNH6ImU-HzPvm_diL2FwJtZm3sY5HgecIy2dwXB_vLnYaA_7VXt9zf0T70rw==}
+init_cluster.k3s_server_url = https://myrddin.knoe.org:6443
+init_cluster.k3s_token = ${KNOE_SECRET:v1:-cslrAhG8WhxxJLY:vAx5MGOBcU1NBMjf4U-3y1djMDmwwOjiWkrutxPa4Li5P8RBjCBhEOCEdGP2CiPJJ6UQK-ietX-mu_5nO3yNNjpwDququT4U6lWHPEInSvUNH6ImU-HzPvm_diL2FwJtZm3sY5HgecIy2dwXB_vLnYaA_7VXt9zf0T70rw==}
 init_cluster.kerberos_enabled = true
 init_cluster.mode = k3d
 init_cluster.start_cluster = true
@@ -84,46 +84,46 @@ ollama_config.model =
 ollama_config.server_host = 
 ollama_config.server_port = 11434
 supabase_config.pv_base_dir = /synology/d005
-supabase_config.pv_node = gandalf.prole.org
+supabase_config.pv_node = gandalf.knoe.org
 
 [Global]
 ; Variables used by name in more than one place or assumed global scope
 ARGOCD_NAMESPACE = argocd
 ARTIFACT_REGISTRY = us-west3-docker.pkg.dev/plenary-truck-485623-p7/knoe-system
 AUTHORITY_ENABLED = true
-AUTH_HOSTNAME = api.prole.org
+AUTH_HOSTNAME = api.knoe.org
 AUTH_LOGIN_PATH = /auth/login
-AUTH_RESPONSE_HEADERS = X-Prole-User,X-Prole-Email,X-Prole-Groups
+AUTH_RESPONSE_HEADERS = X-Knoe-User,X-Knoe-Email,X-Knoe-Groups
 AUTH_VERIFY_PATH = /auth/verify
 CLUSTER_ENV = dev
 CLUSTER_NAME = knoe-db
-CNPG_PLACEMENT_PLAN_FILE = /Users/chrisfu/dev/prole/conf/cnpg-placement/knoe-system-knoe-db.json
+CNPG_PLACEMENT_PLAN_FILE = /Users/chrisfu/dev/knoe/conf/cnpg-placement/knoe-system-knoe-db.json
 CNPG_PLACEMENT_PLAN_HASH = 965d2fde4035059f
 CNPG_PLACEMENT_PLAN_ID = cnpg-placement-965d2fde4035059f
 DATABASE_NAMESPACE = knoe-db-18-008-18-009-18-013-18-014
 DB_HOST_PORT = 5432
 DEPLOYMENT_MODE = k3d
-DEPLOYMENT_TARGET = prole-dev-cluster
+DEPLOYMENT_TARGET = knoe-dev-cluster
 DOCKER_PRELOAD = false
-GITLAB_PUBLIC_HOSTS = git.knoe.dev,git.prole.org
-K3S_SERVER = https://myrddin.prole.org:6443
-K3S_TOKEN = ${PROLE_SECRET:v1:CWWf3RHFdbUrmfrY:It8a2G8QUUIsqVwMsm3LsI4UvSSChEc_uAdESwzYplZLOCiSsCbOKuT9FbPpIwQvEaG_gLz9ZAfkD0EQxJp81KAtpk_X3K_nxVUa0RPRlbt_wdeXXoMoFFpN5BqXXz2HZwKgh_gpK1hjVbsJQHKAbTqWfu8u_LTmYYg4ag==}
+GITLAB_PUBLIC_HOSTS = git.knoe.dev,git.knoe.org
+K3S_SERVER = https://myrddin.knoe.org:6443
+K3S_TOKEN = ${KNOE_SECRET:v1:CWWf3RHFdbUrmfrY:It8a2G8QUUIsqVwMsm3LsI4UvSSChEc_uAdESwzYplZLOCiSsCbOKuT9FbPpIwQvEaG_gLz9ZAfkD0EQxJp81KAtpk_X3K_nxVUa0RPRlbt_wdeXXoMoFFpN5BqXXz2HZwKgh_gpK1hjVbsJQHKAbTqWfu8u_LTmYYg4ag==}
 KNOE_DB_USER = root
 KUBECONTEXT = dev
 MONITORING_STORAGE_CLASS = local-path
 OPENTOFU_URL = http://127.0.0.1:8080
 OPTIONAL_WORKLOADS_MIN_READY_SCHEDULABLE_NODES = 2
-PROLE_K3S_SERVER = https://myrddin.prole.org:6443
-PROLE_K3S_TOKEN = ${PROLE_SECRET:v1:-cslrAhG8WhxxJLY:vAx5MGOBcU1NBMjf4U-3y1djMDmwwOjiWkrutxPa4Li5P8RBjCBhEOCEdGP2CiPJJ6UQK-ietX-mu_5nO3yNNjpwDququT4U6lWHPEInSvUNH6ImU-HzPvm_diL2FwJtZm3sY5HgecIy2dwXB_vLnYaA_7VXt9zf0T70rw==}
+PROLE_K3S_SERVER = https://myrddin.knoe.org:6443
+PROLE_K3S_TOKEN = ${KNOE_SECRET:v1:-cslrAhG8WhxxJLY:vAx5MGOBcU1NBMjf4U-3y1djMDmwwOjiWkrutxPa4Li5P8RBjCBhEOCEdGP2CiPJJ6UQK-ietX-mu_5nO3yNNjpwDququT4U6lWHPEInSvUNH6ImU-HzPvm_diL2FwJtZm3sY5HgecIy2dwXB_vLnYaA_7VXt9zf0T70rw==}
 PROLE_OPENTOFU_URL = http://127.0.0.1:8080
-PROTECTED_DB_HOSTS = db.0.knoe.dev,db.prole.org
-PROTECTED_GIT_HOSTS = git.knoe.dev,git.prole.org
+PROTECTED_DB_HOSTS = db.0.knoe.dev,db.knoe.org
+PROTECTED_GIT_HOSTS = git.knoe.dev,git.knoe.org
 REGISTRY_NAMESPACE = knoe-system
 SERVICE_NAMESPACE = knoe-system
 SUPABASE_PV_BASE = /synology/d005
 SUPABASE_PV_BASE_DIR = /synology/d005
-SUPABASE_PV_NODE = gandalf.prole.org
-SUPABASE_STUDIO_HOSTNAME = db.0.knoe.dev,db.prole.org
+SUPABASE_PV_NODE = gandalf.knoe.org
+SUPABASE_STUDIO_HOSTNAME = db.0.knoe.dev,db.knoe.org
 
 [Welcome]
 ; No configuration values captured yet for this section.
@@ -132,13 +132,13 @@ SUPABASE_STUDIO_HOSTNAME = db.0.knoe.dev,db.prole.org
 STATUS = All installed
 
 [Network]
-AD_DC_HOST = myrddin.prole.org
+AD_DC_HOST = myrddin.knoe.org
 AD_DC_IP = 10.0.0.3
-ANSIBLE_DOMAIN = prole.org
-ANSIBLE_INFRASTRUCTURE = $HOME/dev/prole/infrastructure
-ANSIBLE_INVENTORY = $HOME/dev/prole/infrastructure/inventory
+ANSIBLE_DOMAIN = knoe.org
+ANSIBLE_INFRASTRUCTURE = $HOME/dev/knoe/infrastructure
+ANSIBLE_INVENTORY = $HOME/dev/knoe/infrastructure/inventory
 ANSIBLE_REALM = PROLE.ORG
-ANSIBLE_TOPOLOGY = {"domain":"prole.org","realm":"PROLE.ORG","internal_records":{"aventage.prole.org":"10.0.0.206","fairyland.prole.org":"10.0.0.208","loghost.prole.org":"10.0.0.3","merlin.prole.org":"10.0.0.6","morana.prole.org":"10.0.0.66","morgoth.prole.org":"10.0.0.204","myrddin.prole.org":"10.0.0.3","pi.prole.org":"10.0.0.5","raspberry.prole.org":"10.0.0.4","retropie.prole.org":"10.0.0.207","synology.prole.org":"10.0.0.203","zinfandel.prole.org":"10.0.0.205"},"ad_dc":{"host":"myrddin.prole.org","ip":"10.0.0.3"},"k3s":{"server_url":"https://myrddin.prole.org:6443","server_host":"myrddin.prole.org","token_present":true},"groups":{"iscsi":["pi.prole.org","raspberry.prole.org","myrddin.prole.org","retropie.prole.org","merlin.prole.org","gandalf.prole.org"],"pihole":["pi.prole.org","raspberry.prole.org"],"ad_dc":["myrddin.prole.org"],"k3s_servers":["myrddin.prole.org"],"k3s_agents":["merlin.prole.org","gandalf.prole.org"],"k3s_hosts:children":["k3s_servers","k3s_agents"],"linux_hosts":["pi.prole.org","raspberry.prole.org","myrddin.prole.org","retropie.prole.org","merlin.prole.org","gandalf.prole.org"],"ssl_hosts":["myrddin.prole.org"],"mariadb_primary":["merlin.prole.org"],"mariadb_replica":["raspberry.prole.org"],"mariadb:children":["mariadb_primary","mariadb_replica"],"merlin_bootstrap":["merlin"],"k3s_hosts":["gandalf.prole.org"]},"hosts":{"merlin":"10.0.0.6","merlin.prole.org":"10.0.0.6","myrddin.prole.org":"10.0.0.3","pi.prole.org":"10.0.0.5","raspberry.prole.org":"10.0.0.4","retropie.prole.org":"10.0.0.207"},"unmapped_hosts":["gandalf.prole.org","k3s_agents","k3s_servers","mariadb_primary","mariadb_replica"]}
+ANSIBLE_TOPOLOGY = {"domain":"knoe.org","realm":"PROLE.ORG","internal_records":{"aventage.knoe.org":"10.0.0.206","fairyland.knoe.org":"10.0.0.208","loghost.knoe.org":"10.0.0.3","merlin.knoe.org":"10.0.0.6","morana.knoe.org":"10.0.0.66","morgoth.knoe.org":"10.0.0.204","myrddin.knoe.org":"10.0.0.3","pi.knoe.org":"10.0.0.5","raspberry.knoe.org":"10.0.0.4","retropie.knoe.org":"10.0.0.207","synology.knoe.org":"10.0.0.203","zinfandel.knoe.org":"10.0.0.205"},"ad_dc":{"host":"myrddin.knoe.org","ip":"10.0.0.3"},"k3s":{"server_url":"https://myrddin.knoe.org:6443","server_host":"myrddin.knoe.org","token_present":true},"groups":{"iscsi":["pi.knoe.org","raspberry.knoe.org","myrddin.knoe.org","retropie.knoe.org","merlin.knoe.org","gandalf.knoe.org"],"pihole":["pi.knoe.org","raspberry.knoe.org"],"ad_dc":["myrddin.knoe.org"],"k3s_servers":["myrddin.knoe.org"],"k3s_agents":["merlin.knoe.org","gandalf.knoe.org"],"k3s_hosts:children":["k3s_servers","k3s_agents"],"linux_hosts":["pi.knoe.org","raspberry.knoe.org","myrddin.knoe.org","retropie.knoe.org","merlin.knoe.org","gandalf.knoe.org"],"ssl_hosts":["myrddin.knoe.org"],"mariadb_primary":["merlin.knoe.org"],"mariadb_replica":["raspberry.knoe.org"],"mariadb:children":["mariadb_primary","mariadb_replica"],"merlin_bootstrap":["merlin"],"k3s_hosts":["gandalf.knoe.org"]},"hosts":{"merlin":"10.0.0.6","merlin.knoe.org":"10.0.0.6","myrddin.knoe.org":"10.0.0.3","pi.knoe.org":"10.0.0.5","raspberry.knoe.org":"10.0.0.4","retropie.knoe.org":"10.0.0.207"},"unmapped_hosts":["gandalf.knoe.org","k3s_agents","k3s_servers","mariadb_primary","mariadb_replica"]}
 KDC_ANSIBLE_DETECTED = 10.0.0.3
 KDC_AUTO_DETECTED = 10.0.0.3
 KERBEROS_AUTO_ENABLED = True
@@ -147,11 +147,11 @@ KERBEROS_AUTO_ENABLED = True
 ; No configuration values captured yet for this section.
 
 [System Environment]
-PROLE_CONF = $HOME/dev/prole/conf
-PROLE_DATA = $HOME/dev/prole/data
-PROLE_HOME = $HOME/dev/prole
-PROLE_LOGS = $HOME/dev/prole/logs
-PROLE_SERVICE = $HOME/dev/prole/etc
+KNOE_CONF = $HOME/dev/knoe/conf
+PROLE_DATA = $HOME/dev/knoe/data
+KNOE_HOME = $HOME/dev/knoe
+PROLE_LOGS = $HOME/dev/knoe/logs
+KNOE_SERVICE = $HOME/dev/knoe/etc
 
 [Monitoring]
 MONITORING_STORAGE_CLASS = local-path
@@ -160,7 +160,7 @@ MONITORING_STORAGE_CLASS = local-path
 ; No configuration values captured yet for this section.
 
 [Ollama]
-OLLAMA_SERVERS = 10.0.0.208:11434,fairyland.prole.org:11434,k3d.localhost:11434,morgoth.prole.org:11434
+OLLAMA_SERVERS = 10.0.0.208:11434,fairyland.knoe.org:11434,k3d.localhost:11434,morgoth.knoe.org:11434
 
 [Optional Features]
 AT_REST_ENCRYPTION_ENABLED = true
@@ -179,8 +179,8 @@ DB_USER = root
 
 [Initialize Cluster]
 ENVIRONMENT = dev
-K3S_SERVER_URL = https://myrddin.prole.org:6443
-K3S_TOKEN = ${PROLE_SECRET:v1:ozzcomisjsQYIkSH:Ytp91WR_iP4tJyTAmdH_SRhcKycgzea0zLAgTBNxDsQaBPM-pR_VK3u9wc5QkFzszdAHZGBhVN2HKyqnz-cqDR0WAus88DFbF4zWlgvl6gKEAynaXbdMwAa6vYLUGi8ZE0u1pRiO4KJyiulhBIpfoMReM1Wu6Mj1-20hXw==}
+K3S_SERVER_URL = https://myrddin.knoe.org:6443
+K3S_TOKEN = ${KNOE_SECRET:v1:ozzcomisjsQYIkSH:Ytp91WR_iP4tJyTAmdH_SRhcKycgzea0zLAgTBNxDsQaBPM-pR_VK3u9wc5QkFzszdAHZGBhVN2HKyqnz-cqDR0WAus88DFbF4zWlgvl6gKEAynaXbdMwAa6vYLUGi8ZE0u1pRiO4KJyiulhBIpfoMReM1Wu6Mj1-20hXw==}
 
 [Dev Cluster (k3d)]
 CLUSTER_ENV = dev
@@ -189,10 +189,10 @@ KUBECTL_CONTEXT = dev
 MODE = k3d
 
 [Service Cluster (k3s)]
-CLUSTER_ENV = prole-service-cluster
-DISPLAY_NAME = prole-service-cluster
-K3S_SERVER_URL = https://myrddin.prole.org:6443
-K3S_TOKEN = ${PROLE_SECRET:v1:-cslrAhG8WhxxJLY:vAx5MGOBcU1NBMjf4U-3y1djMDmwwOjiWkrutxPa4Li5P8RBjCBhEOCEdGP2CiPJJ6UQK-ietX-mu_5nO3yNNjpwDququT4U6lWHPEInSvUNH6ImU-HzPvm_diL2FwJtZm3sY5HgecIy2dwXB_vLnYaA_7VXt9zf0T70rw==}
+CLUSTER_ENV = knoe-service-cluster
+DISPLAY_NAME = knoe-service-cluster
+K3S_SERVER_URL = https://myrddin.knoe.org:6443
+K3S_TOKEN = ${KNOE_SECRET:v1:-cslrAhG8WhxxJLY:vAx5MGOBcU1NBMjf4U-3y1djMDmwwOjiWkrutxPa4Li5P8RBjCBhEOCEdGP2CiPJJ6UQK-ietX-mu_5nO3yNNjpwDququT4U6lWHPEInSvUNH6ImU-HzPvm_diL2FwJtZm3sY5HgecIy2dwXB_vLnYaA_7VXt9zf0T70rw==}
 MODE = k3s
 
 [GCP]
@@ -202,21 +202,21 @@ ORG_ID = 584001916389
 PROJECT_ID = plenary-truck-485623-p7
 
 [Prod Cluster (k8s)]
-ARTIFACTS_DIR = $HOME/dev/prole/data/staging
-CLUSTER_ENV = prole-prod-cluster
-DISPLAY_NAME = prole-prod-cluster
+ARTIFACTS_DIR = $HOME/dev/knoe/data/staging
+CLUSTER_ENV = knoe-prod-cluster
+DISPLAY_NAME = knoe-prod-cluster
 MODE = k8s
 
 [Docker Build]
 LOCAL_REGISTRY = localhost:5000
-LOCAL_REGISTRY_INTERNAL = k3d-prole-registry.localhost:5000
+LOCAL_REGISTRY_INTERNAL = k3d-knoe-registry.localhost:5000
 
 [Initialization Scripts]
 ; No configuration values captured yet for this section.
 
 [Deployment]
 MODE = k3d
-TARGET = prole-dev-cluster
+TARGET = knoe-dev-cluster
 
 [Install]
 STATUS = Failed
diff --git a/conf/k3s.cfg b/conf/k3s.cfg
index a66d893..9a2840e 100644
--- a/conf/k3s.cfg
+++ b/conf/k3s.cfg
@@ -1,4 +1,4 @@
-; Prole Master Configuration File
+; Knoe Master Configuration File
 ; Generated by install.py on 2026-04-17 00:35:15
 ; This file is used as input for Ansible deployment and k8s cluster creation.
 
@@ -40,7 +40,7 @@ dependencies.opentofu.install = true
 dependencies.python.install = true
 dependencies.verify_all = false
 disk_selection.disk_type = local
-disk_selection.local_path = /Users/chrisfu/dev/prole/prole-tools-app/dist
+disk_selection.local_path = /Users/chrisfu/dev/knoe/knoe-tools-app/dist
 disk_selection.removable_mount = 
 env_setup.APP_CLUSTER_KUBECONTEXT = 
 env_setup.APP_CLUSTER_MODE = standard
@@ -50,11 +50,11 @@ env_setup.DATABASE_NAMESPACE = ${DATABASE_NAMESPACE}
 env_setup.DB_CLUSTER_KUBECONTEXT = 
 env_setup.DB_CLUSTER_MODE = standard
 env_setup.DB_CLUSTER_NAME = knoe-cnpg-0
-env_setup.PROLE_CONF = /Users/chrisfu/dev/prole/conf
-env_setup.PROLE_DATA = /Users/chrisfu/dev/prole/data
-env_setup.PROLE_HOME = /Users/chrisfu/dev/prole
-env_setup.PROLE_LOGS = /Users/chrisfu/dev/prole/logs
-env_setup.PROLE_SERVICE = /Users/chrisfu/dev/prole/etc
+env_setup.KNOE_CONF = /Users/chrisfu/dev/knoe/conf
+env_setup.PROLE_DATA = /Users/chrisfu/dev/knoe/data
+env_setup.KNOE_HOME = /Users/chrisfu/dev/knoe
+env_setup.PROLE_LOGS = /Users/chrisfu/dev/knoe/logs
+env_setup.KNOE_SERVICE = /Users/chrisfu/dev/knoe/etc
 gitops.git_provider = Gitea
 gitops.node_selector = 
 init_cluster.app_cluster_kubecontext = 
@@ -74,10 +74,10 @@ init_cluster.db_cluster_name = knoe-cnpg-0
 init_cluster.db_cluster_node_count = 3
 init_cluster.db_cluster_region = 
 init_cluster.db_cluster_zones = 
-init_cluster.deployment_target = prole-service-cluster
+init_cluster.deployment_target = knoe-service-cluster
 init_cluster.gitops_enabled = true
-init_cluster.k3s_server_url = https://myrddin.prole.org:6443
-init_cluster.k3s_token = ${PROLE_SECRET:v1:-cslrAhG8WhxxJLY:vAx5MGOBcU1NBMjf4U-3y1djMDmwwOjiWkrutxPa4Li5P8RBjCBhEOCEdGP2CiPJJ6UQK-ietX-mu_5nO3yNNjpwDququT4U6lWHPEInSvUNH6ImU-HzPvm_diL2FwJtZm3sY5HgecIy2dwXB_vLnYaA_7VXt9zf0T70rw==}
+init_cluster.k3s_server_url = https://myrddin.knoe.org:6443
+init_cluster.k3s_token = ${KNOE_SECRET:v1:-cslrAhG8WhxxJLY:vAx5MGOBcU1NBMjf4U-3y1djMDmwwOjiWkrutxPa4Li5P8RBjCBhEOCEdGP2CiPJJ6UQK-ietX-mu_5nO3yNNjpwDququT4U6lWHPEInSvUNH6ImU-HzPvm_diL2FwJtZm3sY5HgecIy2dwXB_vLnYaA_7VXt9zf0T70rw==}
 init_cluster.kerberos_enabled = true
 init_cluster.mode = k3s
 init_cluster.start_cluster = true
@@ -96,8 +96,8 @@ init_password.cluster_name = ${CLUSTER_NAME}
 init_password.db_cluster_name = knoe-cnpg-0
 init_password.db_host_port = 5432
 init_password.db_namespace = ${DATABASE_NAMESPACE}
-init_password.db_password = ${PROLE_SECRET:v1:CsdBnE_l6fe36We6:QO1ZEnnsfovmzFHFfEtPwvi2FPKzLxu0pmg0K3X3DSTIt-Fx}
-init_password.db_password_confirm = ${PROLE_SECRET:v1:CsdBnE_l6fe36We6:QO1ZEnnsfovmzFHFfEtPwvi2FPKzLxu0pmg0K3X3DSTIt-Fx}
+init_password.db_password = ${KNOE_SECRET:v1:CsdBnE_l6fe36We6:QO1ZEnnsfovmzFHFfEtPwvi2FPKzLxu0pmg0K3X3DSTIt-Fx}
+init_password.db_password_confirm = ${KNOE_SECRET:v1:CsdBnE_l6fe36We6:QO1ZEnnsfovmzFHFfEtPwvi2FPKzLxu0pmg0K3X3DSTIt-Fx}
 init_password.db_username = root
 init_password.generate_ssh_key = true
 init_scripts.run_scripts = true
@@ -113,55 +113,55 @@ ollama_config.model =
 ollama_config.server_host = 
 ollama_config.server_port = 11434
 supabase_config.pv_base_dir = /synology/d005
-supabase_config.pv_node = gandalf.prole.org
+supabase_config.pv_node = gandalf.knoe.org
 
 [Global]
 ; Variables used by name in more than one place or assumed global scope
 ARGOCD_NAMESPACE = argocd
 ARTIFACT_REGISTRY = us-west3-docker.pkg.dev/plenary-truck-485623-p7/knoe-system
 AUTHORITY_ENABLED = true
-AUTH_HOSTNAME = api.prole.org
+AUTH_HOSTNAME = api.knoe.org
 AUTH_LOGIN_PATH = /auth/login
-AUTH_RESPONSE_HEADERS = X-Prole-User,X-Prole-Email,X-Prole-Groups
+AUTH_RESPONSE_HEADERS = X-Knoe-User,X-Knoe-Email,X-Knoe-Groups
 AUTH_VERIFY_PATH = /auth/verify
 CLUSTER_ENV = service
 CLUSTER_NAME = knoe-db
-CNPG_ELIGIBLE_NODES = gandalf.prole.org,merlin.prole.org,myrddin.prole.org
-CNPG_PLACEMENT_PLAN_FILE = $HOME/dev/prole/conf/cnpg-placement/knoe-system-knoe-db.json
+CNPG_ELIGIBLE_NODES = gandalf.knoe.org,merlin.knoe.org,myrddin.knoe.org
+CNPG_PLACEMENT_PLAN_FILE = $HOME/dev/knoe/conf/cnpg-placement/knoe-system-knoe-db.json
 CNPG_PLACEMENT_PLAN_HASH = 962fb2e7bfd2a48b
 CNPG_PLACEMENT_PLAN_ID = cnpg-placement-962fb2e7bfd2a48b
-CNPG_STAGE1_NODE = gandalf.prole.org
+CNPG_STAGE1_NODE = gandalf.knoe.org
 DATABASE_NAMESPACE = knoe-db
 DB_HOST_PORT = 5432
-DB_PASSWORD = ${PROLE_SECRET:v1:Vc5Sow_MQksbOtOJ:bvD1ABxenFlo0304dhf0Me_nzBX0SvLJ7oFvE_TkHGqc0YF8}
+DB_PASSWORD = ${KNOE_SECRET:v1:Vc5Sow_MQksbOtOJ:bvD1ABxenFlo0304dhf0Me_nzBX0SvLJ7oFvE_TkHGqc0YF8}
 DEPLOYMENT_MODE = k3s
-DEPLOYMENT_TARGET = prole-service-cluster
+DEPLOYMENT_TARGET = knoe-service-cluster
 DOCKER_IMPORT_DIR = 
 DOCKER_PRELOAD = false
-GITEA_HOSTNAME = git-internal.prole.org
-GITLAB_PUBLIC_HOSTS = git.prole.org
+GITEA_HOSTNAME = git-internal.knoe.org
+GITLAB_PUBLIC_HOSTS = git.knoe.org
 GITLAB_REPAIR_BLOCKED_AUTOCLEAN = 1
-K3S_SERVER = https://myrddin.prole.org:6443
-K3S_TOKEN = ${PROLE_SECRET:v1:CWWf3RHFdbUrmfrY:It8a2G8QUUIsqVwMsm3LsI4UvSSChEc_uAdESwzYplZLOCiSsCbOKuT9FbPpIwQvEaG_gLz9ZAfkD0EQxJp81KAtpk_X3K_nxVUa0RPRlbt_wdeXXoMoFFpN5BqXXz2HZwKgh_gpK1hjVbsJQHKAbTqWfu8u_LTmYYg4ag==}
+K3S_SERVER = https://myrddin.knoe.org:6443
+K3S_TOKEN = ${KNOE_SECRET:v1:CWWf3RHFdbUrmfrY:It8a2G8QUUIsqVwMsm3LsI4UvSSChEc_uAdESwzYplZLOCiSsCbOKuT9FbPpIwQvEaG_gLz9ZAfkD0EQxJp81KAtpk_X3K_nxVUa0RPRlbt_wdeXXoMoFFpN5BqXXz2HZwKgh_gpK1hjVbsJQHKAbTqWfu8u_LTmYYg4ag==}
 KNOE_DB_USER = root
-KNOE_IMAGE_REGISTRY = registry.prole.org
+KNOE_IMAGE_REGISTRY = registry.knoe.org
 MONITORING_STORAGE_CLASS = local-path
 OPENTOFU_URL = http://127.0.0.1:8080
 OPTIONAL_WORKLOADS_MIN_READY_SCHEDULABLE_NODES = 2
-PROLE_HOME = $HOME/dev/prole
-PROLE_K3S_SERVER = https://myrddin.prole.org:6443
-PROLE_K3S_TOKEN = ${PROLE_SECRET:v1:-cslrAhG8WhxxJLY:vAx5MGOBcU1NBMjf4U-3y1djMDmwwOjiWkrutxPa4Li5P8RBjCBhEOCEdGP2CiPJJ6UQK-ietX-mu_5nO3yNNjpwDququT4U6lWHPEInSvUNH6ImU-HzPvm_diL2FwJtZm3sY5HgecIy2dwXB_vLnYaA_7VXt9zf0T70rw==}
-PROTECTED_DB_HOSTS = db.prole.org
-PROTECTED_GIT_HOSTS = git.prole.org
+KNOE_HOME = $HOME/dev/knoe
+PROLE_K3S_SERVER = https://myrddin.knoe.org:6443
+PROLE_K3S_TOKEN = ${KNOE_SECRET:v1:-cslrAhG8WhxxJLY:vAx5MGOBcU1NBMjf4U-3y1djMDmwwOjiWkrutxPa4Li5P8RBjCBhEOCEdGP2CiPJJ6UQK-ietX-mu_5nO3yNNjpwDququT4U6lWHPEInSvUNH6ImU-HzPvm_diL2FwJtZm3sY5HgecIy2dwXB_vLnYaA_7VXt9zf0T70rw==}
+PROTECTED_DB_HOSTS = db.knoe.org
+PROTECTED_GIT_HOSTS = git.knoe.org
 REDIS_HOST = redis-master.knoe-system.svc.cluster.local
 REGISTRY_NAMESPACE = knoe-system
-SERVICE_HOSTNAME = svc.prole.org
+SERVICE_HOSTNAME = svc.knoe.org
 SERVICE_NAMESPACE = knoe-system
-SUPABASE_API_HOSTNAME = supabase.prole.org
+SUPABASE_API_HOSTNAME = supabase.knoe.org
 SUPABASE_PV_BASE = /synology/d005
 SUPABASE_PV_BASE_DIR = /synology/d005
-SUPABASE_PV_NODE = gandalf.prole.org
-SUPABASE_STUDIO_HOSTNAME = db.prole.org
+SUPABASE_PV_NODE = gandalf.knoe.org
+SUPABASE_STUDIO_HOSTNAME = db.knoe.org
 SYNOLOGY_ROOTS = /synology/d001,/synology/d002,/synology/d004,/synology/d005
 
 [Welcome]
@@ -171,13 +171,13 @@ SYNOLOGY_ROOTS = /synology/d001,/synology/d002,/synology/d004,/synology/d005
 STATUS = All installed
 
 [Network]
-AD_DC_HOST = myrddin.prole.org
+AD_DC_HOST = myrddin.knoe.org
 AD_DC_IP = 10.0.0.3
-ANSIBLE_DOMAIN = prole.org
-ANSIBLE_INFRASTRUCTURE = $HOME/dev/prole/infrastructure
-ANSIBLE_INVENTORY = $HOME/dev/prole/infrastructure/inventory
+ANSIBLE_DOMAIN = knoe.org
+ANSIBLE_INFRASTRUCTURE = $HOME/dev/knoe/infrastructure
+ANSIBLE_INVENTORY = $HOME/dev/knoe/infrastructure/inventory
 ANSIBLE_REALM = PROLE.ORG
-ANSIBLE_TOPOLOGY = {"domain":"prole.org","realm":"PROLE.ORG","internal_records":{"aventage.prole.org":"10.0.0.206","fairyland.prole.org":"10.0.0.208","loghost.prole.org":"10.0.0.3","merlin.prole.org":"10.0.0.6","morana.prole.org":"10.0.0.66","morgoth.prole.org":"10.0.0.204","myrddin.prole.org":"10.0.0.3","pi.prole.org":"10.0.0.5","raspberry.prole.org":"10.0.0.4","retropie.prole.org":"10.0.0.207","synology.prole.org":"10.0.0.203","zinfandel.prole.org":"10.0.0.205"},"ad_dc":{"host":"myrddin.prole.org","ip":"10.0.0.3"},"k3s":{"server_url":"https://myrddin.prole.org:6443","server_host":"myrddin.prole.org","token_present":true},"groups":{"iscsi":["pi.prole.org","raspberry.prole.org","myrddin.prole.org","retropie.prole.org","merlin.prole.org","gandalf.prole.org"],"pihole":["pi.prole.org","raspberry.prole.org"],"ad_dc":["myrddin.prole.org"],"k3s_servers":["myrddin.prole.org"],"k3s_agents":["merlin.prole.org","gandalf.prole.org"],"k3s_hosts:children":["k3s_servers","k3s_agents"],"linux_hosts":["pi.prole.org","raspberry.prole.org","myrddin.prole.org","retropie.prole.org","merlin.prole.org","gandalf.prole.org"],"ssl_hosts":["myrddin.prole.org"],"mariadb_primary":["merlin.prole.org"],"mariadb_replica":["raspberry.prole.org"],"mariadb:children":["mariadb_primary","mariadb_replica"],"merlin_bootstrap":["merlin"],"k3s_hosts":["gandalf.prole.org"]},"hosts":{"merlin":"10.0.0.6","merlin.prole.org":"10.0.0.6","myrddin.prole.org":"10.0.0.3","pi.prole.org":"10.0.0.5","raspberry.prole.org":"10.0.0.4","retropie.prole.org":"10.0.0.207"},"unmapped_hosts":["gandalf.prole.org","k3s_agents","k3s_servers","mariadb_primary","mariadb_replica"]}
+ANSIBLE_TOPOLOGY = {"domain":"knoe.org","realm":"PROLE.ORG","internal_records":{"aventage.knoe.org":"10.0.0.206","fairyland.knoe.org":"10.0.0.208","loghost.knoe.org":"10.0.0.3","merlin.knoe.org":"10.0.0.6","morana.knoe.org":"10.0.0.66","morgoth.knoe.org":"10.0.0.204","myrddin.knoe.org":"10.0.0.3","pi.knoe.org":"10.0.0.5","raspberry.knoe.org":"10.0.0.4","retropie.knoe.org":"10.0.0.207","synology.knoe.org":"10.0.0.203","zinfandel.knoe.org":"10.0.0.205"},"ad_dc":{"host":"myrddin.knoe.org","ip":"10.0.0.3"},"k3s":{"server_url":"https://myrddin.knoe.org:6443","server_host":"myrddin.knoe.org","token_present":true},"groups":{"iscsi":["pi.knoe.org","raspberry.knoe.org","myrddin.knoe.org","retropie.knoe.org","merlin.knoe.org","gandalf.knoe.org"],"pihole":["pi.knoe.org","raspberry.knoe.org"],"ad_dc":["myrddin.knoe.org"],"k3s_servers":["myrddin.knoe.org"],"k3s_agents":["merlin.knoe.org","gandalf.knoe.org"],"k3s_hosts:children":["k3s_servers","k3s_agents"],"linux_hosts":["pi.knoe.org","raspberry.knoe.org","myrddin.knoe.org","retropie.knoe.org","merlin.knoe.org","gandalf.knoe.org"],"ssl_hosts":["myrddin.knoe.org"],"mariadb_primary":["merlin.knoe.org"],"mariadb_replica":["raspberry.knoe.org"],"mariadb:children":["mariadb_primary","mariadb_replica"],"merlin_bootstrap":["merlin"],"k3s_hosts":["gandalf.knoe.org"]},"hosts":{"merlin":"10.0.0.6","merlin.knoe.org":"10.0.0.6","myrddin.knoe.org":"10.0.0.3","pi.knoe.org":"10.0.0.5","raspberry.knoe.org":"10.0.0.4","retropie.knoe.org":"10.0.0.207"},"unmapped_hosts":["gandalf.knoe.org","k3s_agents","k3s_servers","mariadb_primary","mariadb_replica"]}
 KDC_ANSIBLE_DETECTED = 10.0.0.3
 KDC_AUTO_DETECTED = 10.0.0.3
 KERBEROS_AUTO_ENABLED = True
@@ -195,11 +195,11 @@ PORT_FORWARD_K3S_MAPPING_8 = id=grafana;namespace=monitoring;target=svc/kps-graf
 PORT_FORWARD_K3S_MAPPING_9 = id=gitea-http;namespace=gitea;target=svc/gitea-http;address=0.0.0.0;hostPort=13000;servicePort=3000;protocol=TCP;description=Gitea Web
 
 [System Environment]
-PROLE_CONF = $HOME/dev/prole/conf
-PROLE_DATA = $HOME/dev/prole/data
-PROLE_HOME = $HOME/dev/prole
-PROLE_LOGS = $HOME/dev/prole/logs
-PROLE_SERVICE = $HOME/dev/prole/etc
+KNOE_CONF = $HOME/dev/knoe/conf
+PROLE_DATA = $HOME/dev/knoe/data
+KNOE_HOME = $HOME/dev/knoe
+PROLE_LOGS = $HOME/dev/knoe/logs
+KNOE_SERVICE = $HOME/dev/knoe/etc
 
 [Monitoring]
 MONITORING_STORAGE_CLASS = local-path
@@ -226,8 +226,8 @@ DB_USER = root
 
 [Initialize Cluster]
 ENVIRONMENT = service
-K3S_SERVER_URL = https://myrddin.prole.org:6443
-K3S_TOKEN = ${PROLE_SECRET:v1:-cslrAhG8WhxxJLY:vAx5MGOBcU1NBMjf4U-3y1djMDmwwOjiWkrutxPa4Li5P8RBjCBhEOCEdGP2CiPJJ6UQK-ietX-mu_5nO3yNNjpwDququT4U6lWHPEInSvUNH6ImU-HzPvm_diL2FwJtZm3sY5HgecIy2dwXB_vLnYaA_7VXt9zf0T70rw==}
+K3S_SERVER_URL = https://myrddin.knoe.org:6443
+K3S_TOKEN = ${KNOE_SECRET:v1:-cslrAhG8WhxxJLY:vAx5MGOBcU1NBMjf4U-3y1djMDmwwOjiWkrutxPa4Li5P8RBjCBhEOCEdGP2CiPJJ6UQK-ietX-mu_5nO3yNNjpwDququT4U6lWHPEInSvUNH6ImU-HzPvm_diL2FwJtZm3sY5HgecIy2dwXB_vLnYaA_7VXt9zf0T70rw==}
 
 [Dev Cluster (k3d)]
 CLUSTER_ENV = k3d-knoe-dev-cluster
@@ -236,11 +236,11 @@ KUBECTL_CONTEXT = service
 MODE = k3d
 
 [Service Cluster (k3s)]
-CLUSTER_ENV = prole-service-cluster
-DISPLAY_NAME = prole-service-cluster
-K3S_SERVER_URL = https://myrddin.prole.org:6443
-K3S_TOKEN = ${PROLE_SECRET:v1:-cslrAhG8WhxxJLY:vAx5MGOBcU1NBMjf4U-3y1djMDmwwOjiWkrutxPa4Li5P8RBjCBhEOCEdGP2CiPJJ6UQK-ietX-mu_5nO3yNNjpwDququT4U6lWHPEInSvUNH6ImU-HzPvm_diL2FwJtZm3sY5HgecIy2dwXB_vLnYaA_7VXt9zf0T70rw==}
-KUBECTL_CONTEXT = prole-service-cluster
+CLUSTER_ENV = knoe-service-cluster
+DISPLAY_NAME = knoe-service-cluster
+K3S_SERVER_URL = https://myrddin.knoe.org:6443
+K3S_TOKEN = ${KNOE_SECRET:v1:-cslrAhG8WhxxJLY:vAx5MGOBcU1NBMjf4U-3y1djMDmwwOjiWkrutxPa4Li5P8RBjCBhEOCEdGP2CiPJJ6UQK-ietX-mu_5nO3yNNjpwDququT4U6lWHPEInSvUNH6ImU-HzPvm_diL2FwJtZm3sY5HgecIy2dwXB_vLnYaA_7VXt9zf0T70rw==}
+KUBECTL_CONTEXT = knoe-service-cluster
 MODE = k3s
 PIPELINE_URL = http://127.0.0.1:8080
 
@@ -249,8 +249,8 @@ PIPELINE_URL = http://127.0.0.1:8080
 
 [Prod Cluster (k8s)]
 ARTIFACTS_DIR = 
-CLUSTER_ENV = prole-prod-cluster
-DISPLAY_NAME = prole-prod-cluster
+CLUSTER_ENV = knoe-prod-cluster
+DISPLAY_NAME = knoe-prod-cluster
 MODE = k8s
 PIPELINE_URL = http://127.0.0.1:8080
 
@@ -262,7 +262,7 @@ PIPELINE_URL = http://127.0.0.1:8080
 
 [Deployment]
 MODE = k3d
-TARGET = prole-dev-cluster
+TARGET = knoe-dev-cluster
 
 [Install]
 STATUS = Failed
diff --git a/conf/prole.silent.all.cfg b/conf/knoe.silent.all.cfg
similarity index 57%
rename from conf/prole.silent.all.cfg
rename to conf/knoe.silent.all.cfg
index ba410d5..558d37d 100644
--- a/conf/prole.silent.all.cfg
+++ b/conf/knoe.silent.all.cfg
@@ -1,4 +1,4 @@
-; Prole Master Configuration File
+; Knoe Master Configuration File
 ; Generated by install.py on 2026-04-02 23:44:38
 ; This file is used as input for Ansible deployment and k8s cluster creation.
 
@@ -8,7 +8,7 @@
 
 [Inputs]
 ; Screen-scoped inputs used for unattended replays (-S)
-argocd.node_selector = gandalf.prole.org
+argocd.node_selector = gandalf.knoe.org
 build.deploy_env = Dev
 build.run_build = false
 database_options.distribution = percona
@@ -39,24 +39,24 @@ dependencies.opentofu.install = true
 dependencies.python.install = true
 dependencies.verify_all = false
 disk_selection.disk_type = local
-disk_selection.local_path = /Users/chrisfu/dev/prole/prole-tools-app/dist
+disk_selection.local_path = /Users/chrisfu/dev/knoe/knoe-tools-app/dist
 disk_selection.removable_mount = 
 env_setup.CLUSTER_NAME = ${CLUSTER_NAME}
 env_setup.DATABASE_NAMESPACE = ${DATABASE_NAMESPACE}
-env_setup.PROLE_CONF = /Users/chrisfu/dev/prole/conf
-env_setup.PROLE_DATA = /Users/chrisfu/dev/prole/data
-env_setup.PROLE_HOME = /Users/chrisfu/dev/prole
-env_setup.PROLE_LOGS = /Users/chrisfu/dev/prole/logs
-env_setup.PROLE_SERVICE = /Users/chrisfu/dev/prole/etc
+env_setup.KNOE_CONF = /Users/chrisfu/dev/knoe/conf
+env_setup.PROLE_DATA = /Users/chrisfu/dev/knoe/data
+env_setup.KNOE_HOME = /Users/chrisfu/dev/knoe
+env_setup.PROLE_LOGS = /Users/chrisfu/dev/knoe/logs
+env_setup.KNOE_SERVICE = /Users/chrisfu/dev/knoe/etc
 gitops.git_provider = GitLab
-gitops.node_selector = gandalf.prole.org
+gitops.node_selector = gandalf.knoe.org
 init_cluster.argocd_enabled = true
 init_cluster.at_rest_encryption_enabled = true
 init_cluster.cluster_env = service
-init_cluster.deployment_target = prole-service-cluster
+init_cluster.deployment_target = knoe-service-cluster
 init_cluster.gitops_enabled = true
-init_cluster.k3s_server_url = https://myrddin.prole.org:6443
-init_cluster.k3s_token = ${PROLE_SECRET:v1:-5rud_XHzHRKoZIU:Dxv2nKbY883uDrJlmjRIqUKTtF42KPwXmzONy1s0-cIsJ2TLpTkaSWjfYx0tXNnz65lPnwIR16kXVtICYHhOxhfSIaz-lQiNGwZ_hm1tGMjp9BvpANt_l5Ie6swbOHVw8QfpGLtiXuIv7ur2ocSX4xAYSdCKtYWWV58U0Q==}
+init_cluster.k3s_server_url = https://myrddin.knoe.org:6443
+init_cluster.k3s_token = ${KNOE_SECRET:v1:-5rud_XHzHRKoZIU:Dxv2nKbY883uDrJlmjRIqUKTtF42KPwXmzONy1s0-cIsJ2TLpTkaSWjfYx0tXNnz65lPnwIR16kXVtICYHhOxhfSIaz-lQiNGwZ_hm1tGMjp9BvpANt_l5Ie6swbOHVw8QfpGLtiXuIv7ur2ocSX4xAYSdCKtYWWV58U0Q==}
 init_cluster.kerberos_enabled = true
 init_cluster.mode = k3s
 init_cluster.start_cluster = true
@@ -66,65 +66,65 @@ init_cluster.supabase_enabled = true
 init_cluster.supabase_meta_enabled = true
 init_cluster.supabase_realtime_enabled = true
 init_cluster.supabase_studio_enabled = false
-init_cluster.supabase_studio_url = db.prole.org
+init_cluster.supabase_studio_url = db.knoe.org
 init_cnpg_deploy.force_rollout = false
 init_cnpg_deploy.run_deploy = true
 init_db_build.run_build = true
 init_password.cluster_name = ${CLUSTER_NAME}
 init_password.db_host_port = 5432
 init_password.db_namespace = ${DATABASE_NAMESPACE}
-init_password.db_password = ${PROLE_SECRET:v1:TYl1mPEwJblWR-4g:PalHm2ODG8WF1ZRVeUt51erDvA0W0icX}
-init_password.db_password_confirm = ${PROLE_SECRET:v1:TYl1mPEwJblWR-4g:PalHm2ODG8WF1ZRVeUt51erDvA0W0icX}
+init_password.db_password = ${KNOE_SECRET:v1:TYl1mPEwJblWR-4g:PalHm2ODG8WF1ZRVeUt51erDvA0W0icX}
+init_password.db_password_confirm = ${KNOE_SECRET:v1:TYl1mPEwJblWR-4g:PalHm2ODG8WF1ZRVeUt51erDvA0W0icX}
 init_password.db_username = root
 init_password.generate_ssh_key = true
 init_scripts.run_scripts = true
 kerberos_config.enabled = true
 kerberos_config.init_authority = false
 kerberos_config.kdc = 10.0.0.3
-kerberos_config.password = ${PROLE_SECRET:v1:U-EPMl7qv4heEB1k:BEcXGbI_LT4lCXwBuvFEGgPbLFa9MpVzECObdH0pbLtClDHf}
+kerberos_config.password = ${KNOE_SECRET:v1:U-EPMl7qv4heEB1k:BEcXGbI_LT4lCXwBuvFEGgPbLFa9MpVzECObdH0pbLtClDHf}
 kerberos_config.realm = PROLE.ORG
 kerberos_config.test_connection = true
 kerberos_config.user = administrator
 network_scan.run = true
 ollama_config.model = 
-ollama_config.server_host = fairyland.prole.org
+ollama_config.server_host = fairyland.knoe.org
 ollama_config.server_port = 11434
 supabase_config.pv_base_dir = /synology/d005
-supabase_config.pv_node = gandalf.prole.org
+supabase_config.pv_node = gandalf.knoe.org
 
 [Global]
 ; Variables used by name in more than one place or assumed global scope
 ARGOCD_NAMESPACE = argocd
-ARGOCD_NODE_SELECTOR = gandalf.prole.org
+ARGOCD_NODE_SELECTOR = gandalf.knoe.org
 CLUSTER_ENV = service
 CLUSTER_NAME = knoe-db
-CNPG_ELIGIBLE_NODES = gandalf.prole.org,merlin.prole.org,myrddin.prole.org
-CNPG_PLACEMENT_PLAN_FILE = /Users/chrisfu/dev/prole/conf/cnpg-placement/knoe-system-knoe-db.json
+CNPG_ELIGIBLE_NODES = gandalf.knoe.org,merlin.knoe.org,myrddin.knoe.org
+CNPG_PLACEMENT_PLAN_FILE = /Users/chrisfu/dev/knoe/conf/cnpg-placement/knoe-system-knoe-db.json
 CNPG_PLACEMENT_PLAN_HASH = 962fb2e7bfd2a48b
 CNPG_PLACEMENT_PLAN_ID = cnpg-placement-962fb2e7bfd2a48b
-CNPG_STAGE1_NODE = gandalf.prole.org
+CNPG_STAGE1_NODE = gandalf.knoe.org
 DATABASE_NAMESPACE = knoe-db
 DB_HOST_PORT = 5432
-DB_PASSWORD = ${PROLE_SECRET:v1:t7NgRHfXTXH-mHcx:CRbKP9b6ccuxrTMMeJ742Q48_vegoUY4}
+DB_PASSWORD = ${KNOE_SECRET:v1:t7NgRHfXTXH-mHcx:CRbKP9b6ccuxrTMMeJ742Q48_vegoUY4}
 DEPLOYMENT_MODE = k3s
-DEPLOYMENT_TARGET = prole-service-cluster
+DEPLOYMENT_TARGET = knoe-service-cluster
 DOCKER_IMPORT_DIR = 
 DOCKER_PRELOAD = false
-GITEA_NODE_SELECTOR = gandalf.prole.org
-K3S_SERVER = https://myrddin.prole.org:6443
-K3S_TOKEN = ${PROLE_SECRET:v1:gnQjvO_dhM7qkU_g:kFb7E6IQ40RM64JfsrJWBPzkJsMaLXNpNPxfho6t8w5KAeWCAyrw2bMsQtJ8n7cPc_SLWh_zX53Sa1pvEOclmd79e-c_Qff0gZleba1PzzfkjsYRfVlpzQ34gdAHrNHQG2mKnpkcyrNFZ0j6J-w4c3m_m6bTN1cV1KQvMQ==}
+GITEA_NODE_SELECTOR = gandalf.knoe.org
+K3S_SERVER = https://myrddin.knoe.org:6443
+K3S_TOKEN = ${KNOE_SECRET:v1:gnQjvO_dhM7qkU_g:kFb7E6IQ40RM64JfsrJWBPzkJsMaLXNpNPxfho6t8w5KAeWCAyrw2bMsQtJ8n7cPc_SLWh_zX53Sa1pvEOclmd79e-c_Qff0gZleba1PzzfkjsYRfVlpzQ34gdAHrNHQG2mKnpkcyrNFZ0j6J-w4c3m_m6bTN1cV1KQvMQ==}
 KNOE_DB_USER = root
-KUBECONTEXT = knoe.dev.prole.org
-OPENTOFU_URL = http://myrddin.prole.org:8080
+KUBECONTEXT = knoe.dev.knoe.org
+OPENTOFU_URL = http://myrddin.knoe.org:8080
 OPTIONAL_WORKLOADS_MIN_READY_SCHEDULABLE_NODES = 2
-PROLE_HOME = /Users/chrisfu/dev/prole
-PROLE_K3S_SERVER = https://myrddin.prole.org:6443
-PROLE_K3S_TOKEN = ${PROLE_SECRET:v1:-5rud_XHzHRKoZIU:Dxv2nKbY883uDrJlmjRIqUKTtF42KPwXmzONy1s0-cIsJ2TLpTkaSWjfYx0tXNnz65lPnwIR16kXVtICYHhOxhfSIaz-lQiNGwZ_hm1tGMjp9BvpANt_l5Ie6swbOHVw8QfpGLtiXuIv7ur2ocSX4xAYSdCKtYWWV58U0Q==}
+KNOE_HOME = /Users/chrisfu/dev/knoe
+PROLE_K3S_SERVER = https://myrddin.knoe.org:6443
+PROLE_K3S_TOKEN = ${KNOE_SECRET:v1:-5rud_XHzHRKoZIU:Dxv2nKbY883uDrJlmjRIqUKTtF42KPwXmzONy1s0-cIsJ2TLpTkaSWjfYx0tXNnz65lPnwIR16kXVtICYHhOxhfSIaz-lQiNGwZ_hm1tGMjp9BvpANt_l5Ie6swbOHVw8QfpGLtiXuIv7ur2ocSX4xAYSdCKtYWWV58U0Q==}
 REGISTRY_NAMESPACE = knoe-system
 SERVICE_NAMESPACE = knoe-system
 SUPABASE_PV_BASE = /synology/d005
 SUPABASE_PV_BASE_DIR = /synology/d005
-SUPABASE_PV_NODE = gandalf.prole.org
+SUPABASE_PV_NODE = gandalf.knoe.org
 SYNOLOGY_ROOTS = /synology/d001,/synology/d002,/synology/d004,/synology/d005
 
 [Welcome]
@@ -134,13 +134,13 @@ SYNOLOGY_ROOTS = /synology/d001,/synology/d002,/synology/d004,/synology/d005
 STATUS = All installed
 
 [Network]
-AD_DC_HOST = myrddin.prole.org
+AD_DC_HOST = myrddin.knoe.org
 AD_DC_IP = 10.0.0.3
-ANSIBLE_DOMAIN = prole.org
-ANSIBLE_INFRASTRUCTURE = /Users/chrisfu/dev/prole/infrastructure
-ANSIBLE_INVENTORY = /Users/chrisfu/dev/prole/infrastructure/inventory
+ANSIBLE_DOMAIN = knoe.org
+ANSIBLE_INFRASTRUCTURE = /Users/chrisfu/dev/knoe/infrastructure
+ANSIBLE_INVENTORY = /Users/chrisfu/dev/knoe/infrastructure/inventory
 ANSIBLE_REALM = PROLE.ORG
-ANSIBLE_TOPOLOGY = {"domain":"prole.org","realm":"PROLE.ORG","internal_records":{"aventage.prole.org":"10.0.0.206","fairyland.prole.org":"10.0.0.208","loghost.prole.org":"10.0.0.3","merlin.prole.org":"10.0.0.6","morana.prole.org":"10.0.0.66","morgoth.prole.org":"10.0.0.204","myrddin.prole.org":"10.0.0.3","pi.prole.org":"10.0.0.5","raspberry.prole.org":"10.0.0.4","retropie.prole.org":"10.0.0.207","synology.prole.org":"10.0.0.203","zinfandel.prole.org":"10.0.0.205"},"ad_dc":{"host":"myrddin.prole.org","ip":"10.0.0.3"},"k3s":{"server_url":"https://myrddin.prole.org:6443","server_host":"myrddin.prole.org","token_present":true},"groups":{"iscsi":["pi.prole.org","raspberry.prole.org","myrddin.prole.org","retropie.prole.org","merlin.prole.org","gandalf.prole.org"],"pihole":["pi.prole.org","raspberry.prole.org"],"ad_dc":["myrddin.prole.org"],"k3s_servers":["myrddin.prole.org"],"k3s_agents":["merlin.prole.org","gandalf.prole.org"],"k3s_hosts:children":["k3s_servers","k3s_agents"],"linux_hosts":["pi.prole.org","raspberry.prole.org","myrddin.prole.org","retropie.prole.org","merlin.prole.org","gandalf.prole.org"],"ssl_hosts":["myrddin.prole.org"],"mariadb_primary":["merlin.prole.org"],"mariadb_replica":["raspberry.prole.org"],"mariadb:children":["mariadb_primary","mariadb_replica"],"merlin_bootstrap":["merlin"],"k3s_hosts":["gandalf.prole.org"]},"hosts":{"merlin":"10.0.0.6","merlin.prole.org":"10.0.0.6","myrddin.prole.org":"10.0.0.3","pi.prole.org":"10.0.0.5","raspberry.prole.org":"10.0.0.4","retropie.prole.org":"10.0.0.207"},"unmapped_hosts":["gandalf.prole.org","k3s_agents","k3s_servers","mariadb_primary","mariadb_replica"]}
+ANSIBLE_TOPOLOGY = {"domain":"knoe.org","realm":"PROLE.ORG","internal_records":{"aventage.knoe.org":"10.0.0.206","fairyland.knoe.org":"10.0.0.208","loghost.knoe.org":"10.0.0.3","merlin.knoe.org":"10.0.0.6","morana.knoe.org":"10.0.0.66","morgoth.knoe.org":"10.0.0.204","myrddin.knoe.org":"10.0.0.3","pi.knoe.org":"10.0.0.5","raspberry.knoe.org":"10.0.0.4","retropie.knoe.org":"10.0.0.207","synology.knoe.org":"10.0.0.203","zinfandel.knoe.org":"10.0.0.205"},"ad_dc":{"host":"myrddin.knoe.org","ip":"10.0.0.3"},"k3s":{"server_url":"https://myrddin.knoe.org:6443","server_host":"myrddin.knoe.org","token_present":true},"groups":{"iscsi":["pi.knoe.org","raspberry.knoe.org","myrddin.knoe.org","retropie.knoe.org","merlin.knoe.org","gandalf.knoe.org"],"pihole":["pi.knoe.org","raspberry.knoe.org"],"ad_dc":["myrddin.knoe.org"],"k3s_servers":["myrddin.knoe.org"],"k3s_agents":["merlin.knoe.org","gandalf.knoe.org"],"k3s_hosts:children":["k3s_servers","k3s_agents"],"linux_hosts":["pi.knoe.org","raspberry.knoe.org","myrddin.knoe.org","retropie.knoe.org","merlin.knoe.org","gandalf.knoe.org"],"ssl_hosts":["myrddin.knoe.org"],"mariadb_primary":["merlin.knoe.org"],"mariadb_replica":["raspberry.knoe.org"],"mariadb:children":["mariadb_primary","mariadb_replica"],"merlin_bootstrap":["merlin"],"k3s_hosts":["gandalf.knoe.org"]},"hosts":{"merlin":"10.0.0.6","merlin.knoe.org":"10.0.0.6","myrddin.knoe.org":"10.0.0.3","pi.knoe.org":"10.0.0.5","raspberry.knoe.org":"10.0.0.4","retropie.knoe.org":"10.0.0.207"},"unmapped_hosts":["gandalf.knoe.org","k3s_agents","k3s_servers","mariadb_primary","mariadb_replica"]}
 KDC_ANSIBLE_DETECTED = 10.0.0.3
 KDC_AUTO_DETECTED = 10.0.0.3
 KERBEROS_AUTO_ENABLED = True
@@ -163,33 +163,33 @@ PORT_FORWARD_K3S_MAPPING_8 = id=grafana;namespace=monitoring;target=svc/kps-graf
 PORT_FORWARD_K3S_MAPPING_9 = id=supabase-kong;namespace=supabase;target=svc/kong;address=0.0.0.0;hostPort=8000;servicePort=8000;protocol=TCP;description=Supabase API (Kong)
 
 [System Environment]
-PROLE_CONF = /Users/chrisfu/dev/prole/conf
-PROLE_DATA = /Users/chrisfu/dev/prole/data
-PROLE_HOME = /Users/chrisfu/dev/prole
-PROLE_LOGS = /Users/chrisfu/dev/prole/logs
-PROLE_SERVICE = /Users/chrisfu/dev/prole/etc
+KNOE_CONF = /Users/chrisfu/dev/knoe/conf
+PROLE_DATA = /Users/chrisfu/dev/knoe/data
+KNOE_HOME = /Users/chrisfu/dev/knoe
+PROLE_LOGS = /Users/chrisfu/dev/knoe/logs
+KNOE_SERVICE = /Users/chrisfu/dev/knoe/etc
 
 [Monitoring]
-GRAFANA_ADMIN_PASSWORD = ${PROLE_SECRET:v1:L2BhAyHRKVei4cGM:-J83-HR_CpnPFpiB6NbOXKdmmagVW2qL}
+GRAFANA_ADMIN_PASSWORD = ${KNOE_SECRET:v1:L2BhAyHRKVei4cGM:-J83-HR_CpnPFpiB6NbOXKdmmagVW2qL}
 
 [Kerberos Authentication]
 AD_PORT_FORWARD = 1
 AD_PROXY_HOST_NETWORK = 1
 AD_PROXY_IMAGE = alpine/socat
-AD_PROXY_SERVICE = prole-kerberos-ad-dc
+AD_PROXY_SERVICE = knoe-kerberos-ad-dc
 AD_TCP_PORTS = 88 389 445 464 636
 AD_UDP_PORTS = 88 464
 ENABLED = True
 KDC = 10.0.0.3
-PASSWORD = ${PROLE_SECRET:v1:1nB72WDtH1Crj8Ey:ssg1wYn-1Y5Q4wF1tUZL2kO-7kLL-cSxq5GkTdeY_N3JQtJW}
+PASSWORD = ${KNOE_SECRET:v1:1nB72WDtH1Crj8Ey:ssg1wYn-1Y5Q4wF1tUZL2kO-7kLL-cSxq5GkTdeY_N3JQtJW}
 REALM = PROLE.ORG
 SERVER = 10.0.0.3
 STATUS = Initialized
 USER = administrator
 
 [Ollama]
-OLLAMA_HOST = http://fairyland.prole.org:11434
-OLLAMA_SERVER_HOST = fairyland.prole.org
+OLLAMA_HOST = http://fairyland.knoe.org:11434
+OLLAMA_SERVER_HOST = fairyland.knoe.org
 OLLAMA_SERVER_PORT = 11434
 
 [Optional Features]
@@ -207,8 +207,8 @@ DB_USER = root
 
 [Initialize Cluster]
 ENVIRONMENT = service
-K3S_SERVER_URL = https://myrddin.prole.org:6443
-K3S_TOKEN = ${PROLE_SECRET:v1:-5rud_XHzHRKoZIU:Dxv2nKbY883uDrJlmjRIqUKTtF42KPwXmzONy1s0-cIsJ2TLpTkaSWjfYx0tXNnz65lPnwIR16kXVtICYHhOxhfSIaz-lQiNGwZ_hm1tGMjp9BvpANt_l5Ie6swbOHVw8QfpGLtiXuIv7ur2ocSX4xAYSdCKtYWWV58U0Q==}
+K3S_SERVER_URL = https://myrddin.knoe.org:6443
+K3S_TOKEN = ${KNOE_SECRET:v1:-5rud_XHzHRKoZIU:Dxv2nKbY883uDrJlmjRIqUKTtF42KPwXmzONy1s0-cIsJ2TLpTkaSWjfYx0tXNnz65lPnwIR16kXVtICYHhOxhfSIaz-lQiNGwZ_hm1tGMjp9BvpANt_l5Ie6swbOHVw8QfpGLtiXuIv7ur2ocSX4xAYSdCKtYWWV58U0Q==}
 
 [Dev Cluster (k3d)]
 CLUSTER_ENV = k3d-knoe-dev-cluster
@@ -217,22 +217,22 @@ KUBECTL_CONTEXT = service
 MODE = k3d
 
 [Service Cluster (k3s)]
-CLUSTER_ENV = prole-service-cluster
-DISPLAY_NAME = prole-service-cluster
-K3S_SERVER_URL = https://myrddin.prole.org:6443
-K3S_TOKEN = ${PROLE_SECRET:v1:-5rud_XHzHRKoZIU:Dxv2nKbY883uDrJlmjRIqUKTtF42KPwXmzONy1s0-cIsJ2TLpTkaSWjfYx0tXNnz65lPnwIR16kXVtICYHhOxhfSIaz-lQiNGwZ_hm1tGMjp9BvpANt_l5Ie6swbOHVw8QfpGLtiXuIv7ur2ocSX4xAYSdCKtYWWV58U0Q==}
+CLUSTER_ENV = knoe-service-cluster
+DISPLAY_NAME = knoe-service-cluster
+K3S_SERVER_URL = https://myrddin.knoe.org:6443
+K3S_TOKEN = ${KNOE_SECRET:v1:-5rud_XHzHRKoZIU:Dxv2nKbY883uDrJlmjRIqUKTtF42KPwXmzONy1s0-cIsJ2TLpTkaSWjfYx0tXNnz65lPnwIR16kXVtICYHhOxhfSIaz-lQiNGwZ_hm1tGMjp9BvpANt_l5Ie6swbOHVw8QfpGLtiXuIv7ur2ocSX4xAYSdCKtYWWV58U0Q==}
 MODE = k3s
-PIPELINE_URL = http://myrddin.prole.org:8080
+PIPELINE_URL = http://myrddin.knoe.org:8080
 
 [GCP]
 ; No configuration values captured yet for this section.
 
 [Prod Cluster (k8s)]
 ARTIFACTS_DIR = 
-CLUSTER_ENV = prole-prod-cluster
-DISPLAY_NAME = prole-prod-cluster
+CLUSTER_ENV = knoe-prod-cluster
+DISPLAY_NAME = knoe-prod-cluster
 MODE = k8s
-PIPELINE_URL = http://myrddin.prole.org:8080
+PIPELINE_URL = http://myrddin.knoe.org:8080
 
 [Docker Build]
 ; No configuration values captured yet for this section.
@@ -242,7 +242,7 @@ STATUS = Completed
 
 [Deployment]
 MODE = k3s
-TARGET = prole-service-cluster
+TARGET = knoe-service-cluster
 
 [Install]
 STATUS = Failed
diff --git a/conf/port-mapping.cfg b/conf/port-mapping.cfg
index 1486b6b..f612e34 100644
--- a/conf/port-mapping.cfg
+++ b/conf/port-mapping.cfg
@@ -1,4 +1,4 @@
-# Port mappings for Prole Tools (generated).
+# Port mappings for Knoe Tools (generated).
 # Format: key: local=... remote=... ns=... svc=... address=...
 
 argocd: local=8081 remote=80 ns=argocd svc=argocd-server address=0.0.0.0
diff --git a/conf/service/port-mapping.cfg b/conf/service/port-mapping.cfg
index de6a327..24636ae 100644
--- a/conf/service/port-mapping.cfg
+++ b/conf/service/port-mapping.cfg
@@ -1,5 +1,5 @@
 ; Port mappings generated by init_port_forwards
-; Source: /Users/chrisfu/dev/prole/conf/k3s.cfg
+; Source: /Users/chrisfu/dev/knoe/conf/k3s.cfg
 [PortMappings]
 PORT_FORWARD_K3S_MAPPING_1 = id=argocd;namespace=argocd;target=svc/argocd-server;address=0.0.0.0;hostPort=8081;servicePort=80;protocol=TCP;description=ArgoCD
 PORT_FORWARD_K3S_MAPPING_10 = id=supabase-studio;namespace=supabase;target=svc/studio;address=0.0.0.0;hostPort=18080;servicePort=3000;protocol=TCP;description=Supabase Studio
diff --git a/conf/service/prod.cfg b/conf/service/prod.cfg
index c1eaee8..e370d82 100644
--- a/conf/service/prod.cfg
+++ b/conf/service/prod.cfg
@@ -1,4 +1,4 @@
-; Prole Master Configuration File
+; Knoe Master Configuration File
 ; Generated by install.py on 2026-04-10 12:30:35
 ; This file is used as input for Ansible deployment and k8s cluster creation.
 
@@ -31,11 +31,11 @@ env_setup.DATABASE_NAMESPACE = ${DATABASE_NAMESPACE}
 env_setup.DB_CLUSTER_KUBECONTEXT = 
 env_setup.DB_CLUSTER_MODE = standard
 env_setup.DB_CLUSTER_NAME = knoe-dev-cnpg-0
-env_setup.PROLE_CONF = /Users/chrisfu/dev/prole/conf
-env_setup.PROLE_DATA = /Users/chrisfu/dev/prole/data
-env_setup.PROLE_HOME = /Users/chrisfu/dev/prole
-env_setup.PROLE_LOGS = /Users/chrisfu/dev/prole/logs
-env_setup.PROLE_SERVICE = /Users/chrisfu/dev/prole/etc
+env_setup.KNOE_CONF = /Users/chrisfu/dev/knoe/conf
+env_setup.PROLE_DATA = /Users/chrisfu/dev/knoe/data
+env_setup.KNOE_HOME = /Users/chrisfu/dev/knoe
+env_setup.PROLE_LOGS = /Users/chrisfu/dev/knoe/logs
+env_setup.KNOE_SERVICE = /Users/chrisfu/dev/knoe/etc
 init_cluster.app_cluster_kubecontext = gke_plenary-truck-485623-p7_us-west3_knoe-dev-0
 init_cluster.app_cluster_machine_type = e2-standard-2
 init_cluster.app_cluster_mode = standard
@@ -104,7 +104,7 @@ DATABASE_NAMESPACE = knoe-db-0
 DB_HOST_PORT = 5432
 DB_PASSWORD= vzx.wC4Akd4x-Dj6Wguh
 DEPLOYMENT_MODE = k8s
-DEPLOYMENT_TARGET = prole-prod-cluster
+DEPLOYMENT_TARGET = knoe-prod-cluster
 DOCKER_IMPORT_DIR = 
 DOCKER_PRELOAD = false
 K3S_SERVER = 
@@ -112,7 +112,7 @@ K3S_TOKEN =
 KNOE_DB_USER = chrisfu
 OPENTOFU_URL = http://127.0.0.1:8080
 OPTIONAL_WORKLOADS_MIN_READY_SCHEDULABLE_NODES = 2
-PROLE_HOME = /Users/chrisfu/dev/prole
+KNOE_HOME = /Users/chrisfu/dev/knoe
 REGISTRY_NAMESPACE = knoe-system
 SERVICE_NAMESPACE = knoe-system
 
@@ -142,11 +142,11 @@ PORT_FORWARD_K3D_MAPPING_8 = id=grafana;namespace=monitoring;target=svc/kps-graf
 PORT_FORWARD_K3D_MAPPING_9 = id=supabase-kong;namespace=supabase;target=svc/kong;address=0.0.0.0;hostPort=8000;servicePort=8000;protocol=TCP;description=Supabase API (Kong)
 
 [System Environment]
-PROLE_CONF = /Users/chrisfu/dev/prole/conf
-PROLE_DATA = /Users/chrisfu/dev/prole/data
-PROLE_HOME = /Users/chrisfu/dev/prole
-PROLE_LOGS = /Users/chrisfu/dev/prole/logs
-PROLE_SERVICE = /Users/chrisfu/dev/prole/etc
+KNOE_CONF = /Users/chrisfu/dev/knoe/conf
+PROLE_DATA = /Users/chrisfu/dev/knoe/data
+KNOE_HOME = /Users/chrisfu/dev/knoe
+PROLE_LOGS = /Users/chrisfu/dev/knoe/logs
+KNOE_SERVICE = /Users/chrisfu/dev/knoe/etc
 
 [Monitoring]
 ; No configuration values captured yet for this section.
@@ -181,8 +181,8 @@ KUBECTL_CONTEXT = prod
 MODE = k3d
 
 [Service Cluster (k3s)]
-CLUSTER_ENV = prole-service-cluster
-DISPLAY_NAME = prole-service-cluster
+CLUSTER_ENV = knoe-service-cluster
+DISPLAY_NAME = knoe-service-cluster
 K3S_SERVER_URL = 
 K3S_TOKEN = 
 MODE = k3s
@@ -193,8 +193,8 @@ PIPELINE_URL = http://127.0.0.1:8080
 
 [Prod Cluster (k8s)]
 ARTIFACTS_DIR = 
-CLUSTER_ENV = prole-prod-cluster
-DISPLAY_NAME = prole-prod-cluster
+CLUSTER_ENV = knoe-prod-cluster
+DISPLAY_NAME = knoe-prod-cluster
 MODE = k8s
 PIPELINE_URL = http://127.0.0.1:8080
 
@@ -206,7 +206,7 @@ PIPELINE_URL = http://127.0.0.1:8080
 
 [Deployment]
 MODE = k8s
-TARGET = prole-prod-cluster
+TARGET = knoe-prod-cluster
 
 [Install]
 STATUS = Finished
diff --git a/conf/test/prole.cfg b/conf/test/knoe.cfg
similarity index 54%
rename from conf/test/prole.cfg
rename to conf/test/knoe.cfg
index 93f977c..9ef788c 100644
--- a/conf/test/prole.cfg
+++ b/conf/test/knoe.cfg
@@ -1,4 +1,4 @@
-; Prole Master Configuration File
+; Knoe Master Configuration File
 ; Generated by install.py on 2026-03-17 00:58:58
 ; This file is used as input for Ansible deployment and k8s cluster creation.
 
@@ -36,15 +36,15 @@ dependencies.opentofu.install = true
 dependencies.python.install = true
 dependencies.verify_all = false
 disk_selection.disk_type = local
-disk_selection.local_path = /Users/chrisfu/dev/prole/prole-tools-app/dist
+disk_selection.local_path = /Users/chrisfu/dev/knoe/knoe-tools-app/dist
 disk_selection.removable_mount = 
 init_cluster.argocd_enabled = false
 init_cluster.at_rest_encryption_enabled = true
 init_cluster.cluster_env = service
-init_cluster.deployment_target = prole-service-cluster
+init_cluster.deployment_target = knoe-service-cluster
 init_cluster.gitops_enabled = false
-init_cluster.k3s_server_url = https://myrddin.prole.org:6443
-init_cluster.k3s_token = ${PROLE_SECRET:v1:tOW53iZqoGRwqxUz:n0jktIyKBQ5cAggXfdR2oZ7OYyt859dRFHn5f4MzCy2zL7D_Ur9C-4e89RrTNPVLlGmd2GbHnP9uSLfnxRKe4zmypr5CfQnj3WDpwTr977EZBckkGFaSUQvUq-nShA-mRNDj14bXc2s5Oba9IQ9tiYRj4HT0W32MQ04HzQ==}
+init_cluster.k3s_server_url = https://myrddin.knoe.org:6443
+init_cluster.k3s_token = ${KNOE_SECRET:v1:tOW53iZqoGRwqxUz:n0jktIyKBQ5cAggXfdR2oZ7OYyt859dRFHn5f4MzCy2zL7D_Ur9C-4e89RrTNPVLlGmd2GbHnP9uSLfnxRKe4zmypr5CfQnj3WDpwTr977EZBckkGFaSUQvUq-nShA-mRNDj14bXc2s5Oba9IQ9tiYRj4HT0W32MQ04HzQ==}
 init_cluster.kerberos_enabled = true
 init_cluster.mode = k3s
 init_cluster.start_cluster = true
@@ -74,14 +74,14 @@ CLUSTER_ENV = service
 DB_HOST_PORT = 5432
 DB_PASSWORD = 
 DEPLOYMENT_MODE = k3s
-DEPLOYMENT_TARGET = prole-service-cluster
+DEPLOYMENT_TARGET = knoe-service-cluster
 DOCKER_PRELOAD = false
-KUBECONTEXT = prole-k3s
+KUBECONTEXT = knoe-k3s
 NAMESPACE = knoe-db
 KNOE_DB_USER = root
-PROLE_HOME = $HOME/dev/prole
-PROLE_K3S_SERVER = https://myrddin.prole.org:6443
-PROLE_K3S_TOKEN = ${PROLE_SECRET:v1:tOW53iZqoGRwqxUz:n0jktIyKBQ5cAggXfdR2oZ7OYyt859dRFHn5f4MzCy2zL7D_Ur9C-4e89RrTNPVLlGmd2GbHnP9uSLfnxRKe4zmypr5CfQnj3WDpwTr977EZBckkGFaSUQvUq-nShA-mRNDj14bXc2s5Oba9IQ9tiYRj4HT0W32MQ04HzQ==}
+KNOE_HOME = $HOME/dev/knoe
+PROLE_K3S_SERVER = https://myrddin.knoe.org:6443
+PROLE_K3S_TOKEN = ${KNOE_SECRET:v1:tOW53iZqoGRwqxUz:n0jktIyKBQ5cAggXfdR2oZ7OYyt859dRFHn5f4MzCy2zL7D_Ur9C-4e89RrTNPVLlGmd2GbHnP9uSLfnxRKe4zmypr5CfQnj3WDpwTr977EZBckkGFaSUQvUq-nShA-mRNDj14bXc2s5Oba9IQ9tiYRj4HT0W32MQ04HzQ==}
 PROLE_OPENTOFU_URL = http://127.0.0.1:8080
 SERVICE_NAMESPACE = knoe-system
 
@@ -92,13 +92,13 @@ SERVICE_NAMESPACE = knoe-system
 ; No configuration values captured yet for this section.
 
 [Network]
-AD_DC_HOST = myrddin.prole.org
+AD_DC_HOST = myrddin.knoe.org
 AD_DC_IP = 10.0.0.3
-ANSIBLE_DOMAIN = prole.org
-ANSIBLE_INFRASTRUCTURE = ${HOME}/dev/prole/infrastructure
-ANSIBLE_INVENTORY = ${HOME}/dev/prole/infrastructure/inventory
+ANSIBLE_DOMAIN = knoe.org
+ANSIBLE_INFRASTRUCTURE = ${HOME}/dev/knoe/infrastructure
+ANSIBLE_INVENTORY = ${HOME}/dev/knoe/infrastructure/inventory
 ANSIBLE_REALM = PROLE.ORG
-ANSIBLE_TOPOLOGY = {"domain":"prole.org","realm":"PROLE.ORG","internal_records":{"aventage.prole.org":"10.0.0.206","fairyland.prole.org":"10.0.0.208","loghost.prole.org":"10.0.0.3","merlin.prole.org":"10.0.0.6","morana.prole.org":"10.0.0.66","morgoth.prole.org":"10.0.0.204","myrddin.prole.org":"10.0.0.3","pi.prole.org":"10.0.0.5","raspberry.prole.org":"10.0.0.4","retropie.prole.org":"10.0.0.207","synology.prole.org":"10.0.0.203","zinfandel.prole.org":"10.0.0.205"},"ad_dc":{"host":"myrddin.prole.org","ip":"10.0.0.3"},"k3s":{"server_url":"https://myrddin.prole.org:6443","server_host":"myrddin.prole.org","token_present":true},"groups":{"iscsi":["pi.prole.org","raspberry.prole.org","myrddin.prole.org","retropie.prole.org","merlin.prole.org"],"pihole":["pi.prole.org","raspberry.prole.org"],"ad_dc":["myrddin.prole.org"],"k3s_servers":["myrddin.prole.org"],"k3s_agents":["pi.prole.org","merlin.prole.org"],"k3s_hosts:children":["k3s_servers","k3s_agents"],"linux_hosts":["pi.prole.org","raspberry.prole.org","myrddin.prole.org","retropie.prole.org","merlin.prole.org"],"ssl_hosts":["myrddin.prole.org"],"mariadb_primary":["merlin.prole.org"],"mariadb_replica":["raspberry.prole.org"],"mariadb:children":["mariadb_primary","mariadb_replica"],"merlin_bootstrap":["merlin"]},"hosts":{"merlin":"10.0.0.6","merlin.prole.org":"10.0.0.6","myrddin.prole.org":"10.0.0.3","pi.prole.org":"10.0.0.5","raspberry.prole.org":"10.0.0.4","retropie.prole.org":"10.0.0.207"},"unmapped_hosts":["k3s_agents","k3s_servers","mariadb_primary","mariadb_replica"]}
+ANSIBLE_TOPOLOGY = {"domain":"knoe.org","realm":"PROLE.ORG","internal_records":{"aventage.knoe.org":"10.0.0.206","fairyland.knoe.org":"10.0.0.208","loghost.knoe.org":"10.0.0.3","merlin.knoe.org":"10.0.0.6","morana.knoe.org":"10.0.0.66","morgoth.knoe.org":"10.0.0.204","myrddin.knoe.org":"10.0.0.3","pi.knoe.org":"10.0.0.5","raspberry.knoe.org":"10.0.0.4","retropie.knoe.org":"10.0.0.207","synology.knoe.org":"10.0.0.203","zinfandel.knoe.org":"10.0.0.205"},"ad_dc":{"host":"myrddin.knoe.org","ip":"10.0.0.3"},"k3s":{"server_url":"https://myrddin.knoe.org:6443","server_host":"myrddin.knoe.org","token_present":true},"groups":{"iscsi":["pi.knoe.org","raspberry.knoe.org","myrddin.knoe.org","retropie.knoe.org","merlin.knoe.org"],"pihole":["pi.knoe.org","raspberry.knoe.org"],"ad_dc":["myrddin.knoe.org"],"k3s_servers":["myrddin.knoe.org"],"k3s_agents":["pi.knoe.org","merlin.knoe.org"],"k3s_hosts:children":["k3s_servers","k3s_agents"],"linux_hosts":["pi.knoe.org","raspberry.knoe.org","myrddin.knoe.org","retropie.knoe.org","merlin.knoe.org"],"ssl_hosts":["myrddin.knoe.org"],"mariadb_primary":["merlin.knoe.org"],"mariadb_replica":["raspberry.knoe.org"],"mariadb:children":["mariadb_primary","mariadb_replica"],"merlin_bootstrap":["merlin"]},"hosts":{"merlin":"10.0.0.6","merlin.knoe.org":"10.0.0.6","myrddin.knoe.org":"10.0.0.3","pi.knoe.org":"10.0.0.5","raspberry.knoe.org":"10.0.0.4","retropie.knoe.org":"10.0.0.207"},"unmapped_hosts":["k3s_agents","k3s_servers","mariadb_primary","mariadb_replica"]}
 KDC_ANSIBLE_DETECTED = 10.0.0.3
 KDC_AUTO_DETECTED = 10.0.0.3
 KERBEROS_AUTO_ENABLED = True
@@ -107,11 +107,11 @@ KERBEROS_AUTO_ENABLED = True
 ; No configuration values captured yet for this section.
 
 [System Environment]
-PROLE_CONF = ${PROLE_CONF}
+KNOE_CONF = ${KNOE_CONF}
 PROLE_DATA = ${PROLE_DATA}
-PROLE_HOME = ${PROLE_HOME}
+KNOE_HOME = ${KNOE_HOME}
 PROLE_LOGS = ${PROLE_LOGS}
-PROLE_SERVICE = ${PROLE_SERVICE}
+KNOE_SERVICE = ${KNOE_SERVICE}
 
 [Monitoring]
 ; No configuration values captured yet for this section.
@@ -136,27 +136,27 @@ SUPABASE_ENABLED = False
 
 [Initialize Cluster]
 ENVIRONMENT = service
-K3S_SERVER_URL = https://myrddin.prole.org:6443
-K3S_TOKEN = ${PROLE_SECRET:v1:tOW53iZqoGRwqxUz:n0jktIyKBQ5cAggXfdR2oZ7OYyt859dRFHn5f4MzCy2zL7D_Ur9C-4e89RrTNPVLlGmd2GbHnP9uSLfnxRKe4zmypr5CfQnj3WDpwTr977EZBckkGFaSUQvUq-nShA-mRNDj14bXc2s5Oba9IQ9tiYRj4HT0W32MQ04HzQ==}
+K3S_SERVER_URL = https://myrddin.knoe.org:6443
+K3S_TOKEN = ${KNOE_SECRET:v1:tOW53iZqoGRwqxUz:n0jktIyKBQ5cAggXfdR2oZ7OYyt859dRFHn5f4MzCy2zL7D_Ur9C-4e89RrTNPVLlGmd2GbHnP9uSLfnxRKe4zmypr5CfQnj3WDpwTr977EZBckkGFaSUQvUq-nShA-mRNDj14bXc2s5Oba9IQ9tiYRj4HT0W32MQ04HzQ==}
 
 [Dev Cluster (k3d)]
 CLUSTER_ENV = dev
 DISPLAY_NAME = knoe-dev-cluster
-KUBECTL_CONTEXT = prole-k3s
+KUBECTL_CONTEXT = knoe-k3s
 MODE = k3d
 
 [Service Cluster (k3s)]
-CLUSTER_ENV = prole-service-cluster
-DISPLAY_NAME = prole-service-cluster
-K3S_SERVER_URL = https://myrddin.prole.org:6443
-K3S_TOKEN = ${PROLE_SECRET:v1:tOW53iZqoGRwqxUz:n0jktIyKBQ5cAggXfdR2oZ7OYyt859dRFHn5f4MzCy2zL7D_Ur9C-4e89RrTNPVLlGmd2GbHnP9uSLfnxRKe4zmypr5CfQnj3WDpwTr977EZBckkGFaSUQvUq-nShA-mRNDj14bXc2s5Oba9IQ9tiYRj4HT0W32MQ04HzQ==}
+CLUSTER_ENV = knoe-service-cluster
+DISPLAY_NAME = knoe-service-cluster
+K3S_SERVER_URL = https://myrddin.knoe.org:6443
+K3S_TOKEN = ${KNOE_SECRET:v1:tOW53iZqoGRwqxUz:n0jktIyKBQ5cAggXfdR2oZ7OYyt859dRFHn5f4MzCy2zL7D_Ur9C-4e89RrTNPVLlGmd2GbHnP9uSLfnxRKe4zmypr5CfQnj3WDpwTr977EZBckkGFaSUQvUq-nShA-mRNDj14bXc2s5Oba9IQ9tiYRj4HT0W32MQ04HzQ==}
 MODE = k3s
 PIPELINE_URL = http://127.0.0.1:8080
 
 [Prod Cluster (k8s)]
 ARTIFACTS_DIR = ${PROLE_DATA}/staging
-CLUSTER_ENV = prole-prod-cluster
-DISPLAY_NAME = prole-prod-cluster
+CLUSTER_ENV = knoe-prod-cluster
+DISPLAY_NAME = knoe-prod-cluster
 MODE = k8s
 PIPELINE_URL = http://127.0.0.1:8080
 
@@ -168,7 +168,7 @@ PIPELINE_URL = http://127.0.0.1:8080
 
 [Deployment]
 MODE = k3s
-TARGET = prole-service-cluster
+TARGET = knoe-service-cluster
 
 [Install]
 ; No configuration values captured yet for this section.
diff --git a/config.py b/config.py
index 9e4a491..9c0aa4b 100644
--- a/config.py
+++ b/config.py
@@ -1,7 +1,7 @@
 """
-Shared configuration and utility functions for the Prole installer (root-level).
+Shared configuration and utility functions for the Knoe installer (root-level).
 
-This mirrors `prole.knoe.config` but is located under the root `installer/`
+This mirrors `knoe.knoe.config` but is located under the root `installer/`
 package per the refactor request. UI code should import from `knoe.config`.
 """
 
@@ -24,29 +24,29 @@ from typing import Optional, Tuple
 from cryptography.hazmat.primitives.ciphers.aead import AESGCM
 
 
-def resolve_prole_home(env: dict[str, str] | None = None) -> Path:
-    """Resolve `PROLE_HOME` from `env`/process environment.
+def resolve_knoe_home(env: dict[str, str] | None = None) -> Path:
+    """Resolve `KNOE_HOME` from `env`/process environment.
 
-    Falls back to `$HOME/.prole` when `PROLE_HOME` is not set.
+    Falls back to `$HOME/.knoe` when `KNOE_HOME` is not set.
 
     NOTE: This is duplicated here (and in `knoe.core.env`) to avoid circular
     imports between the two modules.
     """
 
     env_map = env or os.environ
-    raw = (env_map.get("PROLE_HOME") or "").strip()
+    raw = (env_map.get("KNOE_HOME") or "").strip()
     if raw:
         expanded = os.path.expanduser(os.path.expandvars(raw))
         return Path(expanded)
-    return Path.home() / ".prole"
+    return Path.home() / ".knoe"
 
-# Secret handling (temporary encrypted values in prole.cfg)
-PROLE_SECRET_PREFIX = "${PROLE_SECRET:"
-PROLE_SECRET_SUFFIX = "}"
+# Secret handling (temporary encrypted values in knoe.cfg)
+KNOE_SECRET_PREFIX = "${KNOE_SECRET:"
+KNOE_SECRET_SUFFIX = "}"
 OPENBAO_PREFIX = "${OPENBAO:"
 OPENBAO_SUFFIX = "}"
-PROLE_SECRET_VERSION = "v1"
-PROLE_SECRET_SERVICE = "prole-installer"
+KNOE_SECRET_VERSION = "v1"
+KNOE_SECRET_SERVICE = "knoe-installer"
 
 # Map config keys to OpenBao paths (namespace injected at runtime)
 SECRET_KEY_SPECS = {
@@ -59,11 +59,11 @@ SECRET_KEY_SPECS = {
 }
 
 
-def _is_prole_secret(value: str | None) -> bool:
+def _is_knoe_secret(value: str | None) -> bool:
     return (
         bool(value)
-        and value.startswith(PROLE_SECRET_PREFIX)
-        and value.endswith(PROLE_SECRET_SUFFIX)
+        and value.startswith(KNOE_SECRET_PREFIX)
+        and value.endswith(KNOE_SECRET_SUFFIX)
     )
 
 
@@ -76,7 +76,7 @@ def _is_openbao_ref(value: str | None) -> bool:
 
 
 def _get_secret_key_file() -> Path:
-    return resolve_prole_home() / "secrets" / "knoe.key"
+    return resolve_knoe_home() / "secrets" / "knoe.key"
 
 
 def _get_keychain_key(service: str, account: str) -> bytes:
@@ -132,16 +132,16 @@ def _get_file_key(path: Path) -> bytes:
 
 def _get_secret_key() -> bytes:
     system = platform.system()
-    account = getpass.getuser() or "prole"
+    account = getpass.getuser() or "knoe"
     if system == "Darwin":
-        return _get_keychain_key(PROLE_SECRET_SERVICE, account)
+        return _get_keychain_key(KNOE_SECRET_SERVICE, account)
     return _get_file_key(_get_secret_key_file())
 
 
-def _encrypt_prole_secret(plaintext: str) -> str:
+def _encrypt_knoe_secret(plaintext: str) -> str:
     if plaintext is None:
         return ""
-    if _is_prole_secret(plaintext):
+    if _is_knoe_secret(plaintext):
         return plaintext
     key = _get_secret_key()
     aesgcm = AESGCM(key)
@@ -149,15 +149,15 @@ def _encrypt_prole_secret(plaintext: str) -> str:
     ciphertext = aesgcm.encrypt(nonce, plaintext.encode("utf-8"), None)
     nonce_b64 = base64.urlsafe_b64encode(nonce).decode("utf-8")
     ct_b64 = base64.urlsafe_b64encode(ciphertext).decode("utf-8")
-    return f"{PROLE_SECRET_PREFIX}{PROLE_SECRET_VERSION}:{nonce_b64}:{ct_b64}{PROLE_SECRET_SUFFIX}"
+    return f"{KNOE_SECRET_PREFIX}{KNOE_SECRET_VERSION}:{nonce_b64}:{ct_b64}{KNOE_SECRET_SUFFIX}"
 
 
-def _decrypt_prole_secret(value: str) -> str:
-    if not _is_prole_secret(value):
+def _decrypt_knoe_secret(value: str) -> str:
+    if not _is_knoe_secret(value):
         return value
-    inner = value[len(PROLE_SECRET_PREFIX) : -len(PROLE_SECRET_SUFFIX)]
+    inner = value[len(KNOE_SECRET_PREFIX) : -len(KNOE_SECRET_SUFFIX)]
     parts = inner.split(":")
-    if len(parts) != 3 or parts[0] != PROLE_SECRET_VERSION:
+    if len(parts) != 3 or parts[0] != KNOE_SECRET_VERSION:
         return value
     try:
         nonce = base64.urlsafe_b64decode(parts[1].encode("utf-8"))
@@ -173,10 +173,10 @@ def _decrypt_prole_secret(value: str) -> str:
 def _encrypt_cfg_secret(plaintext: str | None) -> str:
     if not plaintext:
         return ""
-    if _is_prole_secret(plaintext) or _is_openbao_ref(plaintext):
+    if _is_knoe_secret(plaintext) or _is_openbao_ref(plaintext):
         return plaintext
     try:
-        return _encrypt_prole_secret(plaintext)
+        return _encrypt_knoe_secret(plaintext)
     except Exception:
         return str(plaintext)
 
@@ -199,9 +199,9 @@ def _resolve_openbao_ref(value: str) -> str:
             secret_path = rest
     token = os.environ.get("OPENBAO_ROOT_TOKEN", "")
     if not token:
-        prole_service = os.environ.get("PROLE_SERVICE")
-        if prole_service:
-            token_path = Path(prole_service) / "secrets" / "openbao-root-token"
+        knoe_service = os.environ.get("KNOE_SERVICE")
+        if knoe_service:
+            token_path = Path(knoe_service) / "secrets" / "openbao-root-token"
             if token_path.exists():
                 token = token_path.read_text().strip()
     if not token:
@@ -232,8 +232,8 @@ def _resolve_openbao_ref(value: str) -> str:
 
 
 def _resolve_secret_value(value: str) -> str:
-    if _is_prole_secret(value):
-        return _decrypt_prole_secret(value)
+    if _is_knoe_secret(value):
+        return _decrypt_knoe_secret(value)
     if _is_openbao_ref(value):
         return _resolve_openbao_ref(value)
     return value
@@ -261,8 +261,8 @@ def _load_properties(path: Path) -> dict:
 
 # Repository root: this file lives at /installer/config.py → parent is repo
 PROJECT_ROOT = Path(__file__).resolve().parents[1]
-PROLE_APP_DIR = PROJECT_ROOT / "prole-app"
-PROLE_PROPS_PATH = PROLE_APP_DIR / "prole.properties"
+KNOE_APP_DIR = PROJECT_ROOT / "knoe-app"
+KNOE_PROPS_PATH = KNOE_APP_DIR / "knoe.properties"
 
 import logging
 
@@ -314,30 +314,30 @@ def setup_logging(verbose=False, debug=False):
     )
 
 
-_PROLE_PROPS_CACHE: Optional[dict] = None
+_KNOE_PROPS_CACHE: Optional[dict] = None
 
 
 def get_properties() -> dict:
-    """Load and cache prole.properties from the repo (installer context).
+    """Load and cache knoe.properties from the repo (installer context).
 
     Order:
-    - Repo default at prole-app/prole.properties
-    - Optional env override: PROLE_PROPERTIES points to a file
+    - Repo default at knoe-app/knoe.properties
+    - Optional env override: KNOE_PROPERTIES points to a file
     """
-    global _PROLE_PROPS_CACHE
-    if _PROLE_PROPS_CACHE is None:
+    global _KNOE_PROPS_CACHE
+    if _KNOE_PROPS_CACHE is None:
         props: dict[str, str] = {}
         # repo default
-        if PROLE_PROPS_PATH.exists():
-            props.update(_load_properties(PROLE_PROPS_PATH))
+        if KNOE_PROPS_PATH.exists():
+            props.update(_load_properties(KNOE_PROPS_PATH))
         # env override (absolute path)
-        env_path = os.environ.get("PROLE_PROPERTIES")
+        env_path = os.environ.get("KNOE_PROPERTIES")
         if env_path:
             p = Path(env_path)
             if p.exists():
                 props.update(_load_properties(p))
-        _PROLE_PROPS_CACHE = props
-    return dict(_PROLE_PROPS_CACHE)
+        _KNOE_PROPS_CACHE = props
+    return dict(_KNOE_PROPS_CACHE)
 
 
 def get_config_value(key: str, default: Optional[str] = None) -> Optional[str]:
@@ -348,39 +348,39 @@ def get_ui_icon_image_path() -> Path:
     """Return absolute path to the UI icon image for the installer.
 
     Priority (new → legacy):
-    - `icon` key in prole.properties (requested)
+    - `icon` key in knoe.properties (requested)
     - legacy `ui.icon`
 
-    Defaults to img/proleIcon.png under repo root if not set or missing.
+    Defaults to img/knoeIcon.png under repo root if not set or missing.
     """
     # Prefer new key `icon`, fall back to old `ui.icon`
-    rel = get_config_value("icon") or get_config_value("ui.icon") or "img/proleIcon.png"
+    rel = get_config_value("icon") or get_config_value("ui.icon") or "img/knoeIcon.png"
     p = (PROJECT_ROOT / rel).resolve()
     if p.exists():
         return p
     # fallback
-    return (PROJECT_ROOT / "img/proleIcon.png").resolve()
+    return (PROJECT_ROOT / "img/knoeIcon.png").resolve()
 
 
 def get_ui_background_image_path() -> Path:
     """Return absolute path to the UI background image.
 
     Priority (new → legacy):
-    - `background` key in prole.properties (requested)
+    - `background` key in knoe.properties (requested)
     - legacy `ui.background`
 
-    Defaults to img/proleLogoSepia.png under repo root if not set or missing.
+    Defaults to img/knoeLogoSepia.png under repo root if not set or missing.
     """
     rel = (
         get_config_value("background")
         or get_config_value("ui.background")
-        or "img/proleLogoSepia.png"
+        or "img/knoeLogoSepia.png"
     )
     p = (PROJECT_ROOT / rel).resolve()
     if p.exists():
         return p
     # fallback
-    return (PROJECT_ROOT / "img/proleLogoSepia.png").resolve()
+    return (PROJECT_ROOT / "img/knoeLogoSepia.png").resolve()
 
 
 def is_apple_silicon() -> bool:
@@ -394,7 +394,7 @@ def get_docker_build_platform_args(target_env: Optional[str] = None) -> list[str
     env_key = (target_env or "").strip().lower()
     if env_key == "dev" and is_apple_silicon():
         return ["--platform", "linux/arm64"]
-    if env_key in ("service", "k3s", "prole-service-cluster"):
+    if env_key in ("service", "k3s", "knoe-service-cluster"):
         return ["--platform", "linux/arm64"]
     if is_apple_silicon():
         return ["--platform", "linux/amd64"]
@@ -434,7 +434,7 @@ def _expand_path(val: str | None) -> str:
     if not val:
         return ""
     # Expand ~ and shell-style variables like $HOME. Use a small fixed-point loop
-    # so nested refs (e.g. PROLE_HOME=$HOME/...) expand fully.
+    # so nested refs (e.g. KNOE_HOME=$HOME/...) expand fully.
     out = os.path.expanduser(str(val))
     for _ in range(10):
         new = os.path.expandvars(out)
@@ -448,9 +448,9 @@ def _normalize_persistence_mode(mode: str | None) -> str:
     raw = (mode or "").strip().lower()
     if raw in {"dev", "k3d", "local"}:
         return "dev"
-    if raw in {"service", "k3s", "k3s-hosts", "prole-service-cluster"}:
+    if raw in {"service", "k3s", "k3s-hosts", "knoe-service-cluster"}:
         return "k3s-hosts"
-    if raw in {"prod", "k8s", "prole-prod-cluster"}:
+    if raw in {"prod", "k8s", "knoe-prod-cluster"}:
         return "prod"
     return raw
 
@@ -604,7 +604,7 @@ def _collect_cfg_vars_from_data(
     mode: str | None = None,
     explicit_keys: set[tuple[str, str]] | None = None,
 ) -> dict[str, str]:
-    """Collect variable names from a `prole_cfg_data`-style dict.
+    """Collect variable names from a `knoe_cfg_data`-style dict.
 
     This mirrors `_collect_cfg_vars()` but operates on the UI/controller's in-memory
     dict instead of a `configparser.ConfigParser`.
@@ -649,7 +649,7 @@ def _expand_cfg_vars_shellstyle(val: str, variables: dict[str, str]) -> str:
 
     Notes:
     - Only expands simple shell-style identifiers (letters/digits/underscore).
-      This intentionally avoids treating `${PROLE_SECRET:...}` or similar
+      This intentionally avoids treating `${KNOE_SECRET:...}` or similar
       colon-delimited references as variables.
     - Unknown variables are left intact.
     """
@@ -822,7 +822,7 @@ def _try_read_ansible_vault_value(vault_path: Path, key: str) -> str:
     return ""
 
 
-def _update_prole_cfg_value(
+def _update_knoe_cfg_value(
     section: str,
     key: str,
     value: str,
@@ -830,15 +830,15 @@ def _update_prole_cfg_value(
     mode: str | None = None,
     explicit: bool = False,
 ):
-    # Prefer `$PROLE_CONF/prole.cfg` (single entrypoint) and follow symlink so we
+    # Prefer `$KNOE_CONF/knoe.cfg` (single entrypoint) and follow symlink so we
     # update the active environment base file without mutating other environments.
     try:
-        from knoe import prole_conf
+        from knoe import knoe_conf
 
-        conf_dir = prole_conf.resolve_prole_conf_dir(PROJECT_ROOT)
-        cfg_path = prole_conf.entrypoint_path(conf_dir)
+        conf_dir = knoe_conf.resolve_knoe_conf_dir(PROJECT_ROOT)
+        cfg_path = knoe_conf.entrypoint_path(conf_dir)
     except Exception:
-        cfg_path = PROJECT_ROOT / "conf" / "prole.cfg"
+        cfg_path = PROJECT_ROOT / "conf" / "knoe.cfg"
 
     if not cfg_path.exists():
         return
@@ -900,27 +900,27 @@ def _write_k3s_kubeconfig(server_url: str, token: str) -> Path:
         "- cluster:\n"
         f"    server: {server_url}\n"
         "    insecure-skip-tls-verify: true\n"
-        "  name: prole-k3s\n"
+        "  name: knoe-k3s\n"
         "contexts:\n"
         "- context:\n"
-        "    cluster: prole-k3s\n"
-        "    user: prole-k3s\n"
-        "  name: prole-k3s\n"
-        "current-context: prole-k3s\n"
+        "    cluster: knoe-k3s\n"
+        "    user: knoe-k3s\n"
+        "  name: knoe-k3s\n"
+        "current-context: knoe-k3s\n"
         "users:\n"
-        "- name: prole-k3s\n"
+        "- name: knoe-k3s\n"
         "  user:\n"
         f"    token: {token}\n"
     )
-    prole_service = os.environ.get("PROLE_SERVICE", "").strip()
-    if prole_service:
-        path = Path(prole_service).expanduser() / "secrets" / "k3s.kubeconfig"
+    knoe_service = os.environ.get("KNOE_SERVICE", "").strip()
+    if knoe_service:
+        path = Path(knoe_service).expanduser() / "secrets" / "k3s.kubeconfig"
     else:
-        prole_home = os.environ.get("PROLE_HOME", "").strip()
-        if prole_home:
-            path = Path(prole_home).expanduser() / "prole-k3s.kubeconfig"
+        knoe_home = os.environ.get("KNOE_HOME", "").strip()
+        if knoe_home:
+            path = Path(knoe_home).expanduser() / "knoe-k3s.kubeconfig"
         else:
-            path = PROJECT_ROOT / "prole-k3s.kubeconfig"
+            path = PROJECT_ROOT / "knoe-k3s.kubeconfig"
     # Never overwrite a kubeconfig that uses client-certificate auth (e.g.
     # one fetched by Ansible) with a token-based fallback.
     if path.exists():
@@ -1036,7 +1036,7 @@ DEPENDENCIES = [
     {
         "id": "docker",
         "name": "Docker",
-        "description": "Container platform for running Prole services",
+        "description": "Container platform for running Knoe services",
         "url": "https://www.docker.com/products/docker-desktop",
         "install_cmd": None,
         "check_cmd": "docker --version",
diff --git a/demo/gcp-config.cast b/demo/gcp-config.cast
index 14e0b58..58dc640 100644
--- a/demo/gcp-config.cast
+++ b/demo/gcp-config.cast
@@ -90,9 +90,9 @@
 [0.672, "o", "\u001b[H\n\u001b[J\u001b[AFetching billing accounts…"]
 [31.063, "o", "\r\u001b(B\u001b[0;1mSelect Billing Account\u001b(B\u001b[m\u001b[K\r\n───────────────────────────────────────────────────────────────────────────────\r\n  \u001b(B\u001b[0;2mProject: plenary-truck-485623-p7\n\u001b[3G\u001b(B\u001b[0;7m My Billing Account                             01193C-25783B-3211AD \r\u001b[24d\u001b(B\u001b[0;2m↑↓/jk navigate   Enter select   q quit  1/1\u001b(B\u001b[m"]
 [2.113, "o", "\u001b[?12l\u001b[?25h"]
-[0.001, "o", "\u001b[H\u001b(B\u001b[0;1mConfig: --mode k8s --provider gcp — Confirm & Save\n\n\u001b[3G\u001b(B\u001b[mOrg ID:            584001916389\u001b[K\r\n  Org Name:          knoey.com\u001b[K\r\n  Project ID:\u001b[5;22Hplenary-truck-485623-p7\r\n  Project Name:\u001b[22GKnoey Auth\r\n  Project Number:    507759242125\r\n  Billing Account:   01193C-25783B-3211AD\r\n  Billing Name:\u001b[22GMy Billing Account\r\n\n  \u001b(B\u001b[0;1mOutput file:      \u001b(B\u001b[m/Users/chrisfu/dev/prole/conf/prod/gcp.cfg\r\u001b[24d\u001b(B\u001b[0;2mEdit path above   Enter to write   Esc to cancel\u001b(B\u001b[m"]
+[0.001, "o", "\u001b[H\u001b(B\u001b[0;1mConfig: --mode k8s --provider gcp — Confirm & Save\n\n\u001b[3G\u001b(B\u001b[mOrg ID:            584001916389\u001b[K\r\n  Org Name:          knoey.com\u001b[K\r\n  Project ID:\u001b[5;22Hplenary-truck-485623-p7\r\n  Project Name:\u001b[22GKnoey Auth\r\n  Project Number:    507759242125\r\n  Billing Account:   01193C-25783B-3211AD\r\n  Billing Name:\u001b[22GMy Billing Account\r\n\n  \u001b(B\u001b[0;1mOutput file:      \u001b(B\u001b[m/Users/chrisfu/dev/knoe/conf/prod/gcp.cfg\r\u001b[24d\u001b(B\u001b[0;2mEdit path above   Enter to write   Esc to cancel\u001b(B\u001b[m"]
 [4.691, "o", "\u001b[?25l"]
-[0.002, "o", "\u001b[HConfiguration written.\u001b[K\r\n\u001b[K\n  /Users/chrisfu/dev/prole/conf/prod/gcp.cfg\r\n\u001b[K\nNext steps:\u001b[K\r\n  1. Copy org_id / billing_account / billing_project into:\n\u001b[7G\u001b[1K deploy/gcp/terraform/cloud-setup.auto.tfvars\r\n  2. Open the installer — Prod Cluster → Cloud tab will be pre-filled\r\n     (or click 'Load from gcp.cfg' to refresh on demand)\r\n\n\u001b[K\u001b[24d\u001b(B\u001b[0;2mPress any key to continue…\u001b(B\u001b[m\u001b[K"]
+[0.002, "o", "\u001b[HConfiguration written.\u001b[K\r\n\u001b[K\n  /Users/chrisfu/dev/knoe/conf/prod/gcp.cfg\r\n\u001b[K\nNext steps:\u001b[K\r\n  1. Copy org_id / billing_account / billing_project into:\n\u001b[7G\u001b[1K deploy/gcp/terraform/cloud-setup.auto.tfvars\r\n  2. Open the installer — Prod Cluster → Cloud tab will be pre-filled\r\n     (or click 'Load from gcp.cfg' to refresh on demand)\r\n\n\u001b[K\u001b[24d\u001b(B\u001b[0;2mPress any key to continue…\u001b(B\u001b[m\u001b[K"]
 [2.724, "o", "\u001b[?1l\u001b>"]
 [0.000, "o", "\u001b[24;1H\u001b[?12l\u001b[?25h\u001b[?1049l\r\u001b[?1l\u001b>"]
 [0.011, "x", "0"]
diff --git a/deploy.sh b/deploy.sh
index 542992e..d101a47 100755
--- a/deploy.sh
+++ b/deploy.sh
@@ -63,7 +63,7 @@ except subprocess.CalledProcessError:
 PY
 fi
 
-"${PYTHON_BIN}" -m prole.deploy_pipeline --config "${CONFIG_PATH}" "$@"
+"${PYTHON_BIN}" -m knoe.deploy_pipeline --config "${CONFIG_PATH}" "$@"
 
 # Post-deploy summary
 echo ""
@@ -132,7 +132,7 @@ def get_runtime_config(path):
     gitlab_public_hosts_raw = _cfg_first(g, e, i, "GITLAB_PUBLIC_HOSTS", "gitlab_public_hosts")
     gitlab_domain = _cfg_first(g, e, i, "GITLAB_DOMAIN", "GITLAB_HOSTNAME", "gitlab_domain", "gitlab_hostname")
     if not gitlab_domain:
-        gitlab_domain = "git.knoe.dev" if mode == "k8s" else "git.prole.org"
+        gitlab_domain = "git.knoe.dev" if mode == "k8s" else "git.knoe.org"
     gitlab_public_hosts = [h.strip() for h in str(gitlab_public_hosts_raw or "").split(",") if h.strip()]
     if not gitlab_public_hosts:
         gitlab_public_hosts = [gitlab_domain]
@@ -145,11 +145,11 @@ def get_runtime_config(path):
 
     auth_host = _cfg_first(g, e, i, "AUTH_HOSTNAME", "auth_hostname")
     if not auth_host:
-        auth_host = "api.knoe.dev" if mode == "k8s" else "api.prole.org"
+        auth_host = "api.knoe.dev" if mode == "k8s" else "api.knoe.org"
 
     service_host = _cfg_first(g, e, i, "SERVICE_HOSTNAME", "service_hostname", "GRAFANA_HOSTNAME", "grafana_hostname")
     if not service_host:
-        service_host = "svc.knoe.dev" if mode == "k8s" else "svc.prole.org"
+        service_host = "svc.knoe.dev" if mode == "k8s" else "svc.knoe.org"
 
     service_ns = _cfg_first(g, e, i, "SERVICE_NAMESPACE", "service_namespace") or "knoe-system"
 
diff --git a/deploy/gcp/gke/gitlab-google-oidc-secret.example.yaml b/deploy/gcp/gke/gitlab-google-oidc-secret.example.yaml
index ec2f573..59c4733 100644
--- a/deploy/gcp/gke/gitlab-google-oidc-secret.example.yaml
+++ b/deploy/gcp/gke/gitlab-google-oidc-secret.example.yaml
@@ -4,7 +4,7 @@ metadata:
   name: gitlab-google-oidc
   namespace: gitlab
   labels:
-    app.kubernetes.io/managed-by: prole-installer
+    app.kubernetes.io/managed-by: knoe-installer
 # GitLab OmniAuth provider config for OpenID Connect via knoe-auth.
 # See: https://docs.gitlab.com/ee/administration/auth/oidc.html
 # Applied by etc/init_gitlab.sh --mode k8s
diff --git a/deploy/gcp/gke/knoe-auth-google-oidc-secret.example.yaml b/deploy/gcp/gke/knoe-auth-google-oidc-secret.example.yaml
index 43a37eb..fc57167 100644
--- a/deploy/gcp/gke/knoe-auth-google-oidc-secret.example.yaml
+++ b/deploy/gcp/gke/knoe-auth-google-oidc-secret.example.yaml
@@ -4,7 +4,7 @@ metadata:
   name: knoe-auth-google-oidc
   namespace: knoe-system
   labels:
-    app.kubernetes.io/managed-by: prole-installer
+    app.kubernetes.io/managed-by: knoe-installer
 # Fill in client_id and client_secret from your Google Cloud Console OAuth 2.0 credentials.
 # Create at: https://console.cloud.google.com/apis/credentials
 # Authorized redirect URI: https:///auth/callback/google
diff --git a/deploy/gcp/gke/knoe-db.yaml b/deploy/gcp/gke/knoe-db.yaml
index a45b58a..c00eb77 100644
--- a/deploy/gcp/gke/knoe-db.yaml
+++ b/deploy/gcp/gke/knoe-db.yaml
@@ -41,16 +41,16 @@ spec:
       - pg_tde
     pg_hba:
       - local all postgres trust
-      - local all prole scram-sha-256
+      - local all knoe scram-sha-256
       - host all postgres all scram-sha-256
-      - host prole knoe-db all scram-sha-256
+      - host knoe knoe-db all scram-sha-256
       - host all all all scram-sha-256
-      - hostssl prole knoe-db all scram-sha-256
+      - hostssl knoe knoe-db all scram-sha-256
 
   bootstrap:
     initdb:
       database: knoe-db
-      owner: prole
+      owner: knoe
       localeCollate: 'en_US.utf8'
       localeCType: 'en_US.utf8'
       secret:
@@ -59,7 +59,7 @@ spec:
         - CREATE EXTENSION IF NOT EXISTS pg_stat_statements;
       postInitSQL:
         - DO $do$ BEGIN IF NOT EXISTS (SELECT FROM pg_roles WHERE rolname = 'knoe') THEN CREATE ROLE knoe LOGIN NOSUPERUSER NOCREATEDB NOCREATEROLE INHERIT; END IF; END $do$;
-        - DO $do$ DECLARE owner_password text; BEGIN SELECT rolpassword INTO owner_password FROM pg_authid WHERE rolname = 'prole'; IF owner_password IS NOT NULL THEN EXECUTE format('ALTER ROLE knoe PASSWORD %L', owner_password); END IF; END $do$;
+        - DO $do$ DECLARE owner_password text; BEGIN SELECT rolpassword INTO owner_password FROM pg_authid WHERE rolname = 'knoe'; IF owner_password IS NOT NULL THEN EXECUTE format('ALTER ROLE knoe PASSWORD %L', owner_password); END IF; END $do$;
         - DO $do$ BEGIN IF NOT EXISTS (SELECT FROM pg_roles WHERE rolname = 'knoe_catalog_executor') THEN CREATE ROLE knoe_catalog_executor NOLOGIN; END IF; END $do$;
         - CREATE SCHEMA IF NOT EXISTS knoe AUTHORIZATION knoe;
         - ALTER SCHEMA knoe OWNER TO knoe;
@@ -72,12 +72,12 @@ spec:
         - ALTER SCHEMA topology OWNER TO knoe;
         - CREATE EXTENSION IF NOT EXISTS vector SCHEMA knoe;
         - CREATE EXTENSION IF NOT EXISTS tds_fdw SCHEMA knoe;
-        - GRANT USAGE ON SCHEMA knoe TO prole;
-        - GRANT EXECUTE ON ALL FUNCTIONS IN SCHEMA knoe TO prole;
+        - GRANT USAGE ON SCHEMA knoe TO knoe;
+        - GRANT EXECUTE ON ALL FUNCTIONS IN SCHEMA knoe TO knoe;
         - GRANT USAGE ON SCHEMA knoe TO knoe_catalog_executor;
         - GRANT EXECUTE ON ALL FUNCTIONS IN SCHEMA knoe TO knoe_catalog_executor;
         - ALTER DEFAULT PRIVILEGES FOR ROLE knoe IN SCHEMA knoe GRANT EXECUTE ON FUNCTIONS TO knoe_catalog_executor;
-        - GRANT EXECUTE ON ALL FUNCTIONS IN SCHEMA topology TO prole;
+        - GRANT EXECUTE ON ALL FUNCTIONS IN SCHEMA topology TO knoe;
         - CREATE SCHEMA IF NOT EXISTS storage;
         - CREATE SCHEMA IF NOT EXISTS graphql_public;
         - DO $do$ BEGIN IF NOT EXISTS (SELECT FROM pg_roles WHERE rolname = 'anon') THEN CREATE ROLE anon NOLOGIN; END IF; END $do$;
@@ -94,9 +94,9 @@ spec:
         # knoe.user — identity registry (Knoey Users)
         - CREATE TABLE IF NOT EXISTS knoe.user (id SERIAL PRIMARY KEY, username TEXT NOT NULL UNIQUE, realm TEXT NOT NULL DEFAULT 'PROLE.LOCAL', email TEXT, display_name TEXT, tenant_realm TEXT, is_realm_admin BOOLEAN DEFAULT false, created_at TIMESTAMPTZ DEFAULT now(), updated_at TIMESTAMPTZ DEFAULT now());
         - CREATE TABLE IF NOT EXISTS knoe.user_role (user_id INT NOT NULL REFERENCES knoe.user(id) ON DELETE CASCADE, role TEXT NOT NULL, granted_at TIMESTAMPTZ DEFAULT now(), PRIMARY KEY (user_id, role));
-        - GRANT SELECT, INSERT, UPDATE ON knoe.user TO prole;
-        - GRANT SELECT, INSERT, UPDATE ON knoe.user_role TO prole;
-        - GRANT USAGE, SELECT ON SEQUENCE knoe.user_id_seq TO prole;
+        - GRANT SELECT, INSERT, UPDATE ON knoe.user TO knoe;
+        - GRANT SELECT, INSERT, UPDATE ON knoe.user_role TO knoe;
+        - GRANT USAGE, SELECT ON SEQUENCE knoe.user_id_seq TO knoe;
 
   managed:
     roles:
diff --git a/deploy/gcp/gke/namespace.yaml b/deploy/gcp/gke/namespace.yaml
index b9a81c9..b1ec54d 100644
--- a/deploy/gcp/gke/namespace.yaml
+++ b/deploy/gcp/gke/namespace.yaml
@@ -3,4 +3,4 @@ kind: Namespace
 metadata:
   name: knoe-db-0
   labels:
-    app.kubernetes.io/managed-by: prole-installer
+    app.kubernetes.io/managed-by: knoe-installer
diff --git a/deploy/gcp/terraform/cloud-setup.auto.tfvars b/deploy/gcp/terraform/cloud-setup.auto.tfvars
index f54284c..f7f64d8 100644
--- a/deploy/gcp/terraform/cloud-setup.auto.tfvars
+++ b/deploy/gcp/terraform/cloud-setup.auto.tfvars
@@ -10,7 +10,7 @@ module.cs-folders-level-1["Team 1/Production"].ids["Production"] and rename to
 module.cs-folders-level-1["Team 1/Prod"].ids["Prod"]
 */
 folders = {
-  "prole-db" : {
+  "knoe-db" : {
     "infrastructure" : {
       "Production" : {},
       "Non-Production" : {},
@@ -79,51 +79,51 @@ folders = {
 }
 cmek_autokey_folders = [
   {
-    "folder_path" : "prole-db/infrastructure/Production",
+    "folder_path" : "knoe-db/infrastructure/Production",
     "key_project_name" : "kms-key-project",
   },
   {
-    "folder_path" : "prole-db/infrastructure/Non-Production",
+    "folder_path" : "knoe-db/infrastructure/Non-Production",
     "key_project_name" : "kms-key-project",
   },
   {
-    "folder_path" : "prole-db/infrastructure/Development",
+    "folder_path" : "knoe-db/infrastructure/Development",
     "key_project_name" : "kms-key-project",
   },
   {
-    "folder_path" : "prole-db/app/Production",
+    "folder_path" : "knoe-db/app/Production",
     "key_project_name" : "kms-key-project",
   },
   {
-    "folder_path" : "prole-db/app/Non-Production",
+    "folder_path" : "knoe-db/app/Non-Production",
     "key_project_name" : "kms-key-project",
   },
   {
-    "folder_path" : "prole-db/app/Development",
+    "folder_path" : "knoe-db/app/Development",
     "key_project_name" : "kms-key-project",
   },
   {
-    "folder_path" : "prole-db/client/Production",
+    "folder_path" : "knoe-db/client/Production",
     "key_project_name" : "kms-key-project",
   },
   {
-    "folder_path" : "prole-db/client/Non-Production",
+    "folder_path" : "knoe-db/client/Non-Production",
     "key_project_name" : "kms-key-project",
   },
   {
-    "folder_path" : "prole-db/client/Development",
+    "folder_path" : "knoe-db/client/Development",
     "key_project_name" : "kms-key-project",
   },
   {
-    "folder_path" : "prole-db/eng/Production",
+    "folder_path" : "knoe-db/eng/Production",
     "key_project_name" : "kms-key-project",
   },
   {
-    "folder_path" : "prole-db/eng/Non-Production",
+    "folder_path" : "knoe-db/eng/Non-Production",
     "key_project_name" : "kms-key-project",
   },
   {
-    "folder_path" : "prole-db/eng/Development",
+    "folder_path" : "knoe-db/eng/Development",
     "key_project_name" : "kms-key-project",
   },
   {
@@ -224,18 +224,18 @@ cmek_autokey_folders = [
   },
 ]
 application_enabled_folder_paths = [
-  "prole-db/infrastructure/Production",
-  "prole-db/infrastructure/Non-Production",
-  "prole-db/infrastructure/Development",
-  "prole-db/app/Production",
-  "prole-db/app/Non-Production",
-  "prole-db/app/Development",
-  "prole-db/client/Production",
-  "prole-db/client/Non-Production",
-  "prole-db/client/Development",
-  "prole-db/eng/Production",
-  "prole-db/eng/Non-Production",
-  "prole-db/eng/Development",
+  "knoe-db/infrastructure/Production",
+  "knoe-db/infrastructure/Non-Production",
+  "knoe-db/infrastructure/Development",
+  "knoe-db/app/Production",
+  "knoe-db/app/Non-Production",
+  "knoe-db/app/Development",
+  "knoe-db/client/Production",
+  "knoe-db/client/Non-Production",
+  "knoe-db/client/Development",
+  "knoe-db/eng/Production",
+  "knoe-db/eng/Non-Production",
+  "knoe-db/eng/Development",
   "frobozzRobotics/infrastructure/Production",
   "frobozzRobotics/infrastructure/Non-Production",
   "frobozzRobotics/infrastructure/Development",
diff --git a/deploy/gcp/terraform/groups.tf b/deploy/gcp/terraform/groups.tf
index 074c023..c3b777d 100644
--- a/deploy/gcp/terraform/groups.tf
+++ b/deploy/gcp/terraform/groups.tf
@@ -5,7 +5,7 @@ module "cs-gg-knoe-db-infrastr-prod-svc" {
   source  = "terraform-google-modules/group/google"
   version = "~> 0.6"
 
-  id           = "knoe-db-infrastr-prod-svc@prole.org"
+  id           = "knoe-db-infrastr-prod-svc@knoe.org"
   display_name = "knoe-db-infrastr-prod-svc"
   customer_id  = data.google_organization.org.directory_customer_id
   types = [
@@ -18,7 +18,7 @@ module "cs-gg-knoe-db-infrastr-nonprod-svc" {
   source  = "terraform-google-modules/group/google"
   version = "~> 0.6"
 
-  id           = "knoe-db-infrastr-nonprod-svc@prole.org"
+  id           = "knoe-db-infrastr-nonprod-svc@knoe.org"
   display_name = "knoe-db-infrastr-nonprod-svc"
   customer_id  = data.google_organization.org.directory_customer_id
   types = [
@@ -31,7 +31,7 @@ module "cs-gg-knoe-db-app-prod-svc" {
   source  = "terraform-google-modules/group/google"
   version = "~> 0.6"
 
-  id           = "knoe-db-app-prod-svc@prole.org"
+  id           = "knoe-db-app-prod-svc@knoe.org"
   display_name = "knoe-db-app-prod-svc"
   customer_id  = data.google_organization.org.directory_customer_id
   types = [
@@ -44,7 +44,7 @@ module "cs-gg-knoe-db-app-nonprod-svc" {
   source  = "terraform-google-modules/group/google"
   version = "~> 0.6"
 
-  id           = "knoe-db-app-nonprod-svc@prole.org"
+  id           = "knoe-db-app-nonprod-svc@knoe.org"
   display_name = "knoe-db-app-nonprod-svc"
   customer_id  = data.google_organization.org.directory_customer_id
   types = [
diff --git a/deploy/gcp/terraform/iam.tf b/deploy/gcp/terraform/iam.tf
index c4872a6..feac2e5 100644
--- a/deploy/gcp/terraform/iam.tf
+++ b/deploy/gcp/terraform/iam.tf
@@ -7,7 +7,7 @@ module "cs-folders-iam-0-computeinstanceAdminv1" {
   ]
   bindings = {
     "roles/compute.instanceAdmin.v1" = [
-      "group:gcp-developers@prole.org",
+      "group:gcp-developers@knoe.org",
     ]
   }
 }
@@ -21,7 +21,7 @@ module "cs-folders-iam-0-containeradmin" {
   ]
   bindings = {
     "roles/container.admin" = [
-      "group:gcp-developers@prole.org",
+      "group:gcp-developers@knoe.org",
     ]
   }
 }
@@ -35,7 +35,7 @@ module "cs-folders-iam-1-computeinstanceAdminv1" {
   ]
   bindings = {
     "roles/compute.instanceAdmin.v1" = [
-      "group:gcp-developers@prole.org",
+      "group:gcp-developers@knoe.org",
     ]
   }
 }
@@ -49,7 +49,7 @@ module "cs-folders-iam-1-containeradmin" {
   ]
   bindings = {
     "roles/container.admin" = [
-      "group:gcp-developers@prole.org",
+      "group:gcp-developers@knoe.org",
     ]
   }
 }
@@ -63,7 +63,7 @@ module "cs-folders-iam-2-computeinstanceAdminv1" {
   ]
   bindings = {
     "roles/compute.instanceAdmin.v1" = [
-      "group:gcp-developers@prole.org",
+      "group:gcp-developers@knoe.org",
     ]
   }
 }
@@ -77,7 +77,7 @@ module "cs-folders-iam-2-containeradmin" {
   ]
   bindings = {
     "roles/container.admin" = [
-      "group:gcp-developers@prole.org",
+      "group:gcp-developers@knoe.org",
     ]
   }
 }
@@ -91,7 +91,7 @@ module "cs-folders-iam-3-computeinstanceAdminv1" {
   ]
   bindings = {
     "roles/compute.instanceAdmin.v1" = [
-      "group:gcp-developers@prole.org",
+      "group:gcp-developers@knoe.org",
     ]
   }
 }
@@ -105,7 +105,7 @@ module "cs-folders-iam-3-containeradmin" {
   ]
   bindings = {
     "roles/container.admin" = [
-      "group:gcp-developers@prole.org",
+      "group:gcp-developers@knoe.org",
     ]
   }
 }
@@ -119,7 +119,7 @@ module "cs-folders-iam-4-computeinstanceAdminv1" {
   ]
   bindings = {
     "roles/compute.instanceAdmin.v1" = [
-      "group:gcp-developers@prole.org",
+      "group:gcp-developers@knoe.org",
     ]
   }
 }
@@ -133,7 +133,7 @@ module "cs-folders-iam-4-containeradmin" {
   ]
   bindings = {
     "roles/container.admin" = [
-      "group:gcp-developers@prole.org",
+      "group:gcp-developers@knoe.org",
     ]
   }
 }
@@ -147,7 +147,7 @@ module "cs-folders-iam-5-computeinstanceAdminv1" {
   ]
   bindings = {
     "roles/compute.instanceAdmin.v1" = [
-      "group:gcp-developers@prole.org",
+      "group:gcp-developers@knoe.org",
     ]
   }
 }
@@ -161,7 +161,7 @@ module "cs-folders-iam-5-containeradmin" {
   ]
   bindings = {
     "roles/container.admin" = [
-      "group:gcp-developers@prole.org",
+      "group:gcp-developers@knoe.org",
     ]
   }
 }
@@ -175,7 +175,7 @@ module "cs-folders-iam-6-computeinstanceAdminv1" {
   ]
   bindings = {
     "roles/compute.instanceAdmin.v1" = [
-      "group:gcp-developers@prole.org",
+      "group:gcp-developers@knoe.org",
     ]
   }
 }
@@ -189,7 +189,7 @@ module "cs-folders-iam-6-containeradmin" {
   ]
   bindings = {
     "roles/container.admin" = [
-      "group:gcp-developers@prole.org",
+      "group:gcp-developers@knoe.org",
     ]
   }
 }
@@ -203,7 +203,7 @@ module "cs-folders-iam-7-computeinstanceAdminv1" {
   ]
   bindings = {
     "roles/compute.instanceAdmin.v1" = [
-      "group:gcp-developers@prole.org",
+      "group:gcp-developers@knoe.org",
     ]
   }
 }
@@ -217,7 +217,7 @@ module "cs-folders-iam-7-containeradmin" {
   ]
   bindings = {
     "roles/container.admin" = [
-      "group:gcp-developers@prole.org",
+      "group:gcp-developers@knoe.org",
     ]
   }
 }
@@ -231,7 +231,7 @@ module "cs-folders-iam-8-computeinstanceAdminv1" {
   ]
   bindings = {
     "roles/compute.instanceAdmin.v1" = [
-      "group:gcp-developers@prole.org",
+      "group:gcp-developers@knoe.org",
     ]
   }
 }
@@ -245,7 +245,7 @@ module "cs-folders-iam-8-containeradmin" {
   ]
   bindings = {
     "roles/container.admin" = [
-      "group:gcp-developers@prole.org",
+      "group:gcp-developers@knoe.org",
     ]
   }
 }
@@ -259,7 +259,7 @@ module "cs-folders-iam-9-computeinstanceAdminv1" {
   ]
   bindings = {
     "roles/compute.instanceAdmin.v1" = [
-      "group:gcp-developers@prole.org",
+      "group:gcp-developers@knoe.org",
     ]
   }
 }
@@ -273,7 +273,7 @@ module "cs-folders-iam-9-containeradmin" {
   ]
   bindings = {
     "roles/container.admin" = [
-      "group:gcp-developers@prole.org",
+      "group:gcp-developers@knoe.org",
     ]
   }
 }
@@ -287,7 +287,7 @@ module "cs-folders-iam-10-computeinstanceAdminv1" {
   ]
   bindings = {
     "roles/compute.instanceAdmin.v1" = [
-      "group:gcp-developers@prole.org",
+      "group:gcp-developers@knoe.org",
     ]
   }
 }
@@ -301,7 +301,7 @@ module "cs-folders-iam-10-containeradmin" {
   ]
   bindings = {
     "roles/container.admin" = [
-      "group:gcp-developers@prole.org",
+      "group:gcp-developers@knoe.org",
     ]
   }
 }
@@ -315,7 +315,7 @@ module "cs-folders-iam-11-computeinstanceAdminv1" {
   ]
   bindings = {
     "roles/compute.instanceAdmin.v1" = [
-      "group:gcp-developers@prole.org",
+      "group:gcp-developers@knoe.org",
     ]
   }
 }
@@ -329,7 +329,7 @@ module "cs-folders-iam-11-containeradmin" {
   ]
   bindings = {
     "roles/container.admin" = [
-      "group:gcp-developers@prole.org",
+      "group:gcp-developers@knoe.org",
     ]
   }
 }
@@ -343,7 +343,7 @@ module "cs-folders-iam-12-computeinstanceAdminv1" {
   ]
   bindings = {
     "roles/compute.instanceAdmin.v1" = [
-      "group:gcp-developers@prole.org",
+      "group:gcp-developers@knoe.org",
     ]
   }
 }
@@ -357,7 +357,7 @@ module "cs-folders-iam-12-containeradmin" {
   ]
   bindings = {
     "roles/container.admin" = [
-      "group:gcp-developers@prole.org",
+      "group:gcp-developers@knoe.org",
     ]
   }
 }
@@ -371,7 +371,7 @@ module "cs-folders-iam-13-computeinstanceAdminv1" {
   ]
   bindings = {
     "roles/compute.instanceAdmin.v1" = [
-      "group:gcp-developers@prole.org",
+      "group:gcp-developers@knoe.org",
     ]
   }
 }
@@ -385,7 +385,7 @@ module "cs-folders-iam-13-containeradmin" {
   ]
   bindings = {
     "roles/container.admin" = [
-      "group:gcp-developers@prole.org",
+      "group:gcp-developers@knoe.org",
     ]
   }
 }
@@ -399,7 +399,7 @@ module "cs-folders-iam-14-computeinstanceAdminv1" {
   ]
   bindings = {
     "roles/compute.instanceAdmin.v1" = [
-      "group:gcp-developers@prole.org",
+      "group:gcp-developers@knoe.org",
     ]
   }
 }
@@ -413,7 +413,7 @@ module "cs-folders-iam-14-containeradmin" {
   ]
   bindings = {
     "roles/container.admin" = [
-      "group:gcp-developers@prole.org",
+      "group:gcp-developers@knoe.org",
     ]
   }
 }
@@ -427,7 +427,7 @@ module "cs-folders-iam-15-computeinstanceAdminv1" {
   ]
   bindings = {
     "roles/compute.instanceAdmin.v1" = [
-      "group:gcp-developers@prole.org",
+      "group:gcp-developers@knoe.org",
     ]
   }
 }
@@ -441,7 +441,7 @@ module "cs-folders-iam-15-containeradmin" {
   ]
   bindings = {
     "roles/container.admin" = [
-      "group:gcp-developers@prole.org",
+      "group:gcp-developers@knoe.org",
     ]
   }
 }
@@ -455,7 +455,7 @@ module "cs-folders-iam-16-computeinstanceAdminv1" {
   ]
   bindings = {
     "roles/compute.instanceAdmin.v1" = [
-      "group:gcp-developers@prole.org",
+      "group:gcp-developers@knoe.org",
     ]
   }
 }
@@ -469,7 +469,7 @@ module "cs-folders-iam-16-containeradmin" {
   ]
   bindings = {
     "roles/container.admin" = [
-      "group:gcp-developers@prole.org",
+      "group:gcp-developers@knoe.org",
     ]
   }
 }
@@ -483,7 +483,7 @@ module "cs-folders-iam-17-computeinstanceAdminv1" {
   ]
   bindings = {
     "roles/compute.instanceAdmin.v1" = [
-      "group:gcp-developers@prole.org",
+      "group:gcp-developers@knoe.org",
     ]
   }
 }
@@ -497,7 +497,7 @@ module "cs-folders-iam-17-containeradmin" {
   ]
   bindings = {
     "roles/container.admin" = [
-      "group:gcp-developers@prole.org",
+      "group:gcp-developers@knoe.org",
     ]
   }
 }
@@ -511,7 +511,7 @@ module "cs-folders-iam-18-computeinstanceAdminv1" {
   ]
   bindings = {
     "roles/compute.instanceAdmin.v1" = [
-      "group:gcp-developers@prole.org",
+      "group:gcp-developers@knoe.org",
     ]
   }
 }
@@ -525,7 +525,7 @@ module "cs-folders-iam-18-containeradmin" {
   ]
   bindings = {
     "roles/container.admin" = [
-      "group:gcp-developers@prole.org",
+      "group:gcp-developers@knoe.org",
     ]
   }
 }
@@ -539,7 +539,7 @@ module "cs-folders-iam-19-computeinstanceAdminv1" {
   ]
   bindings = {
     "roles/compute.instanceAdmin.v1" = [
-      "group:gcp-developers@prole.org",
+      "group:gcp-developers@knoe.org",
     ]
   }
 }
@@ -553,7 +553,7 @@ module "cs-folders-iam-19-containeradmin" {
   ]
   bindings = {
     "roles/container.admin" = [
-      "group:gcp-developers@prole.org",
+      "group:gcp-developers@knoe.org",
     ]
   }
 }
@@ -567,7 +567,7 @@ module "cs-folders-iam-20-computeinstanceAdminv1" {
   ]
   bindings = {
     "roles/compute.instanceAdmin.v1" = [
-      "group:gcp-developers@prole.org",
+      "group:gcp-developers@knoe.org",
     ]
   }
 }
@@ -581,7 +581,7 @@ module "cs-folders-iam-20-containeradmin" {
   ]
   bindings = {
     "roles/container.admin" = [
-      "group:gcp-developers@prole.org",
+      "group:gcp-developers@knoe.org",
     ]
   }
 }
@@ -595,7 +595,7 @@ module "cs-folders-iam-21-computeinstanceAdminv1" {
   ]
   bindings = {
     "roles/compute.instanceAdmin.v1" = [
-      "group:gcp-developers@prole.org",
+      "group:gcp-developers@knoe.org",
     ]
   }
 }
@@ -609,7 +609,7 @@ module "cs-folders-iam-21-containeradmin" {
   ]
   bindings = {
     "roles/container.admin" = [
-      "group:gcp-developers@prole.org",
+      "group:gcp-developers@knoe.org",
     ]
   }
 }
@@ -623,7 +623,7 @@ module "cs-folders-iam-22-computeinstanceAdminv1" {
   ]
   bindings = {
     "roles/compute.instanceAdmin.v1" = [
-      "group:gcp-developers@prole.org",
+      "group:gcp-developers@knoe.org",
     ]
   }
 }
@@ -637,7 +637,7 @@ module "cs-folders-iam-22-containeradmin" {
   ]
   bindings = {
     "roles/container.admin" = [
-      "group:gcp-developers@prole.org",
+      "group:gcp-developers@knoe.org",
     ]
   }
 }
@@ -651,7 +651,7 @@ module "cs-folders-iam-23-computeinstanceAdminv1" {
   ]
   bindings = {
     "roles/compute.instanceAdmin.v1" = [
-      "group:gcp-developers@prole.org",
+      "group:gcp-developers@knoe.org",
     ]
   }
 }
@@ -665,7 +665,7 @@ module "cs-folders-iam-23-containeradmin" {
   ]
   bindings = {
     "roles/container.admin" = [
-      "group:gcp-developers@prole.org",
+      "group:gcp-developers@knoe.org",
     ]
   }
 }
@@ -679,7 +679,7 @@ module "cs-projects-iam-24-loggingviewer" {
   ]
   bindings = {
     "roles/logging.viewer" = [
-      "group:gcp-logging-monitoring-viewers@prole.org",
+      "group:gcp-logging-monitoring-viewers@knoe.org",
     ]
   }
 }
@@ -693,7 +693,7 @@ module "cs-projects-iam-24-loggingprivateLogViewer" {
   ]
   bindings = {
     "roles/logging.privateLogViewer" = [
-      "group:gcp-logging-monitoring-viewers@prole.org",
+      "group:gcp-logging-monitoring-viewers@knoe.org",
     ]
   }
 }
@@ -707,7 +707,7 @@ module "cs-projects-iam-24-bigquerydataViewer" {
   ]
   bindings = {
     "roles/bigquery.dataViewer" = [
-      "group:gcp-logging-monitoring-viewers@prole.org",
+      "group:gcp-logging-monitoring-viewers@knoe.org",
     ]
   }
 }
@@ -721,7 +721,7 @@ module "cs-projects-iam-24-pubsubviewer" {
   ]
   bindings = {
     "roles/pubsub.viewer" = [
-      "group:gcp-logging-monitoring-viewers@prole.org",
+      "group:gcp-logging-monitoring-viewers@knoe.org",
     ]
   }
 }
@@ -735,7 +735,7 @@ module "cs-projects-iam-24-monitoringviewer" {
   ]
   bindings = {
     "roles/monitoring.viewer" = [
-      "group:gcp-logging-monitoring-viewers@prole.org",
+      "group:gcp-logging-monitoring-viewers@knoe.org",
     ]
   }
 }
@@ -749,7 +749,7 @@ module "cs-projects-iam-25-bigquerydataViewer" {
   ]
   bindings = {
     "roles/bigquery.dataViewer" = [
-      "group:gcp-security-admins@prole.org",
+      "group:gcp-security-admins@knoe.org",
     ]
   }
 }
@@ -763,7 +763,7 @@ module "cs-projects-iam-25-pubsubviewer" {
   ]
   bindings = {
     "roles/pubsub.viewer" = [
-      "group:gcp-security-admins@prole.org",
+      "group:gcp-security-admins@knoe.org",
     ]
   }
 }
@@ -773,7 +773,7 @@ module "cs-service-projects-iam-26-computeinstanceAdminv1" {
   version = "~> 8.0"
 
   projects = [
-    module.cs-svc-prole--infras-prod-svc-a4ci.project_id,
+    module.cs-svc-knoe--infras-prod-svc-a4ci.project_id,
   ]
   bindings = {
     "roles/compute.instanceAdmin.v1" = [
@@ -787,7 +787,7 @@ module "cs-service-projects-iam-27-computeinstanceAdminv1" {
   version = "~> 8.0"
 
   projects = [
-    module.cs-svc-prole--infras-nonprod-svc-a4ci.project_id,
+    module.cs-svc-knoe--infras-nonprod-svc-a4ci.project_id,
   ]
   bindings = {
     "roles/compute.instanceAdmin.v1" = [
@@ -801,7 +801,7 @@ module "cs-service-projects-iam-28-computeinstanceAdminv1" {
   version = "~> 8.0"
 
   projects = [
-    module.cs-svc-prole--app-prod-svc-a4ci.project_id,
+    module.cs-svc-knoe--app-prod-svc-a4ci.project_id,
   ]
   bindings = {
     "roles/compute.instanceAdmin.v1" = [
@@ -815,7 +815,7 @@ module "cs-service-projects-iam-29-computeinstanceAdminv1" {
   version = "~> 8.0"
 
   projects = [
-    module.cs-svc-prole--app-nonprod-svc-a4ci.project_id,
+    module.cs-svc-knoe--app-nonprod-svc-a4ci.project_id,
   ]
   bindings = {
     "roles/compute.instanceAdmin.v1" = [
diff --git a/deploy/gcp/terraform/log-export.tf b/deploy/gcp/terraform/log-export.tf
index 9b75581..b0d5b7f 100644
--- a/deploy/gcp/terraform/log-export.tf
+++ b/deploy/gcp/terraform/log-export.tf
@@ -20,7 +20,7 @@ module "cs-logging-destination" {
   version = "~> 11.0"
 
   project_id               = module.cs-project-logging-monitoring.project_id
-  name                     = "prole-logging"
+  name                     = "knoe-logging"
   location                 = "global"
   retention_days           = 30
   log_sink_writer_identity = module.cs-logsink-logbucketsink.writer_identity
diff --git a/deploy/gcp/terraform/monitoring.tf b/deploy/gcp/terraform/monitoring.tf
index 91ccbaf..1300c1b 100644
--- a/deploy/gcp/terraform/monitoring.tf
+++ b/deploy/gcp/terraform/monitoring.tf
@@ -2,10 +2,10 @@ resource "google_monitoring_monitored_project" "cs-monitored-projects" {
   for_each = toset([
     module.cs-project-vpc-host-prod.project_id,
     module.cs-project-vpc-host-nonprod.project_id,
-    module.cs-svc-prole--infras-prod-svc-a4ci.project_id,
-    module.cs-svc-prole--infras-nonprod-svc-a4ci.project_id,
-    module.cs-svc-prole--app-prod-svc-a4ci.project_id,
-    module.cs-svc-prole--app-nonprod-svc-a4ci.project_id,
+    module.cs-svc-knoe--infras-prod-svc-a4ci.project_id,
+    module.cs-svc-knoe--infras-nonprod-svc-a4ci.project_id,
+    module.cs-svc-knoe--app-prod-svc-a4ci.project_id,
+    module.cs-svc-knoe--app-nonprod-svc-a4ci.project_id,
   ])
   metrics_scope = "locations/global/metricsScopes/${module.cs-project-logging-monitoring.project_id}"
   name          = each.value
diff --git a/deploy/gcp/terraform/org-policy.tf b/deploy/gcp/terraform/org-policy.tf
index c6c966d..af2fca4 100644
--- a/deploy/gcp/terraform/org-policy.tf
+++ b/deploy/gcp/terraform/org-policy.tf
@@ -13,7 +13,7 @@ module "cs-org-policy-essentialcontacts_allowedContactDomains" {
     {
       enforcement = null
       allow = [
-        "@prole.org",
+        "@knoe.org",
       ]
       deny       = []
       conditions = []
diff --git a/deploy/gcp/terraform/service-projects.tf b/deploy/gcp/terraform/service-projects.tf
index 96e0505..e4fa5c5 100644
--- a/deploy/gcp/terraform/service-projects.tf
+++ b/deploy/gcp/terraform/service-projects.tf
@@ -1,9 +1,9 @@
-module "cs-svc-prole--infras-prod-svc-a4ci" {
+module "cs-svc-knoe--infras-prod-svc-a4ci" {
   source  = "terraform-google-modules/project-factory/google//modules/svpc_service_project"
   version = "~> 18.0"
 
   name            = "knoe-db-infrastr-prod-svc"
-  project_id      = "prole--infras-prod-svc-a4ci"
+  project_id      = "knoe--infras-prod-svc-a4ci"
   org_id          = var.org_id
   billing_account = var.billing_account
   folder_id       = local.folder_map["knoe-db/infrastructure/Production"].id
@@ -25,12 +25,12 @@ module "cs-svc-prole--infras-prod-svc-a4ci" {
   ]
 }
 
-module "cs-svc-prole--infras-nonprod-svc-a4ci" {
+module "cs-svc-knoe--infras-nonprod-svc-a4ci" {
   source  = "terraform-google-modules/project-factory/google//modules/svpc_service_project"
   version = "~> 18.0"
 
   name            = "knoe-db-infrastr-nonprod-svc"
-  project_id      = "prole--infras-nonprod-svc-a4ci"
+  project_id      = "knoe--infras-nonprod-svc-a4ci"
   org_id          = var.org_id
   billing_account = var.billing_account
   folder_id       = local.folder_map["knoe-db/infrastructure/Non-Production"].id
@@ -47,12 +47,12 @@ module "cs-svc-prole--infras-nonprod-svc-a4ci" {
   ]
 }
 
-module "cs-svc-prole--app-prod-svc-a4ci" {
+module "cs-svc-knoe--app-prod-svc-a4ci" {
   source  = "terraform-google-modules/project-factory/google//modules/svpc_service_project"
   version = "~> 18.0"
 
   name            = "knoe-db-app-prod-svc"
-  project_id      = "prole--app-prod-svc-a4ci"
+  project_id      = "knoe--app-prod-svc-a4ci"
   org_id          = var.org_id
   billing_account = var.billing_account
   folder_id       = local.folder_map["knoe-db/app/Production"].id
@@ -69,12 +69,12 @@ module "cs-svc-prole--app-prod-svc-a4ci" {
   ]
 }
 
-module "cs-svc-prole--app-nonprod-svc-a4ci" {
+module "cs-svc-knoe--app-nonprod-svc-a4ci" {
   source  = "terraform-google-modules/project-factory/google//modules/svpc_service_project"
   version = "~> 18.0"
 
   name            = "knoe-db-app-nonprod-svc"
-  project_id      = "prole--app-nonprod-svc-a4ci"
+  project_id      = "knoe--app-nonprod-svc-a4ci"
   org_id          = var.org_id
   billing_account = var.billing_account
   folder_id       = local.folder_map["knoe-db/app/Non-Production"].id
diff --git a/deploy/gcp/terraform/vpn.tf b/deploy/gcp/terraform/vpn.tf
index 7e36012..42eb24f 100644
--- a/deploy/gcp/terraform/vpn.tf
+++ b/deploy/gcp/terraform/vpn.tf
@@ -40,7 +40,7 @@ module "cs-prod-prod-us-west1-gateway" {
   network    = module.cs-vpc-prod-shared.network_self_link
   stack_type = "IPV4_IPV6"
   peer_external_gateway = {
-    name            = "svc-prole-org"
+    name            = "svc-knoe-org"
     redundancy_type = "TWO_IPS_REDUNDANCY"
     interfaces = [
       {
diff --git a/deploy/opentofu/k3s/README.md b/deploy/opentofu/k3s/README.md
index 78ccbba..a5175f4 100644
--- a/deploy/opentofu/k3s/README.md
+++ b/deploy/opentofu/k3s/README.md
@@ -1,6 +1,6 @@
 # OpenTofu k3s Pipeline
 
-This pipeline re-deploys the Prole environment into a k3s cluster using OpenTofu.
+This pipeline re-deploys the Knoe environment into a k3s cluster using OpenTofu.
 
 ## Usage
 
@@ -18,5 +18,5 @@ tofu apply
 
 - `main.tf`: Applies Kubernetes manifests with the configured namespace.
 - `variables.tf`: Pipeline inputs (server URL, token, namespace).
-- `opentofu.auto.tfvars`: Auto-generated values from Prole install/config.
+- `opentofu.auto.tfvars`: Auto-generated values from Knoe install/config.
 - `manifests/`: Copy of `k8s/` manifests to re-deploy.
diff --git a/deploy/opentofu/k3s/argocd/application-db.yaml b/deploy/opentofu/k3s/argocd/application-db.yaml
index 09267ca..b065c49 100644
--- a/deploy/opentofu/k3s/argocd/application-db.yaml
+++ b/deploy/opentofu/k3s/argocd/application-db.yaml
@@ -1,16 +1,16 @@
 apiVersion: argoproj.io/v1alpha1
 kind: Application
 metadata:
-  name: prole-db
+  name: knoe-db
   namespace: argocd
 spec:
   project: default
   source:
-    repoURL: git@github.com:dredx/prole.git
+    repoURL: git@github.com:dredx/knoe.git
     targetRevision: main
     path: deploy/opentofu/k3s/manifests/db
   destination:
-    server: https://myrddin.prole.org:6443
+    server: https://myrddin.knoe.org:6443
     namespace: knoe-db
   syncPolicy:
     automated:
diff --git a/deploy/opentofu/k3s/argocd/application-opentofu.yaml b/deploy/opentofu/k3s/argocd/application-opentofu.yaml
index 8e836d9..4e5363a 100644
--- a/deploy/opentofu/k3s/argocd/application-opentofu.yaml
+++ b/deploy/opentofu/k3s/argocd/application-opentofu.yaml
@@ -1,16 +1,16 @@
 apiVersion: argoproj.io/v1alpha1
 kind: Application
 metadata:
-  name: prole-opentofu
+  name: knoe-opentofu
   namespace: argocd
 spec:
   project: default
   source:
-    repoURL: git@github.com:dredx/prole.git
+    repoURL: git@github.com:dredx/knoe.git
     targetRevision: main
     path: deploy/opentofu/k3s/manifests/opentofu
   destination:
-    server: https://myrddin.prole.org:6443
+    server: https://myrddin.knoe.org:6443
     namespace: knoe-db
   syncPolicy:
     automated:
diff --git a/deploy/opentofu/k3s/argocd/application-prole.yaml b/deploy/opentofu/k3s/argocd/application-prole.yaml
index c806f5b..4d933cf 100644
--- a/deploy/opentofu/k3s/argocd/application-prole.yaml
+++ b/deploy/opentofu/k3s/argocd/application-prole.yaml
@@ -1,16 +1,16 @@
 apiVersion: argoproj.io/v1alpha1
 kind: Application
 metadata:
-  name: prole-prole
+  name: knoe-knoe
   namespace: argocd
 spec:
   project: default
   source:
-    repoURL: git@github.com:dredx/prole.git
+    repoURL: git@github.com:dredx/knoe.git
     targetRevision: main
-    path: deploy/opentofu/k3s/manifests/prole
+    path: deploy/opentofu/k3s/manifests/knoe
   destination:
-    server: https://myrddin.prole.org:6443
+    server: https://myrddin.knoe.org:6443
     namespace: knoe-system
   syncPolicy:
     automated:
diff --git a/deploy/opentofu/k3s/manifests/db/kustomization.yaml b/deploy/opentofu/k3s/manifests/db/kustomization.yaml
index 5b1aeba..1d92773 100644
--- a/deploy/opentofu/k3s/manifests/db/kustomization.yaml
+++ b/deploy/opentofu/k3s/manifests/db/kustomization.yaml
@@ -2,6 +2,6 @@ apiVersion: kustomize.config.k8s.io/v1beta1
 kind: Kustomization
 
 resources:
-  - ../prole/knoe-db-barman-objectstore.yaml
-  - ../prole/knoe-db.yaml
-  - ../prole/knoe-db-postgres-service.yaml
+  - ../knoe/knoe-db-barman-objectstore.yaml
+  - ../knoe/knoe-db.yaml
+  - ../knoe/knoe-db-postgres-service.yaml
diff --git a/deploy/opentofu/k3s/manifests/prole/dashboard-ingress.yaml b/deploy/opentofu/k3s/manifests/knoe/dashboard-ingress.yaml
similarity index 92%
rename from deploy/opentofu/k3s/manifests/prole/dashboard-ingress.yaml
rename to deploy/opentofu/k3s/manifests/knoe/dashboard-ingress.yaml
index 6ad8c8a..5d5e61f 100644
--- a/deploy/opentofu/k3s/manifests/prole/dashboard-ingress.yaml
+++ b/deploy/opentofu/k3s/manifests/knoe/dashboard-ingress.yaml
@@ -7,7 +7,7 @@ metadata:
     kubernetes.io/ingress.class: traefik
 spec:
   rules:
-  - host: dashboard.prole.org
+  - host: dashboard.knoe.org
     http:
       paths:
       - path: /
diff --git a/deploy/opentofu/k3s/manifests/prole/garage-configmap.yaml b/deploy/opentofu/k3s/manifests/knoe/garage-configmap.yaml
similarity index 100%
rename from deploy/opentofu/k3s/manifests/prole/garage-configmap.yaml
rename to deploy/opentofu/k3s/manifests/knoe/garage-configmap.yaml
diff --git a/deploy/opentofu/k3s/manifests/prole/garage-service.yaml b/deploy/opentofu/k3s/manifests/knoe/garage-service.yaml
similarity index 100%
rename from deploy/opentofu/k3s/manifests/prole/garage-service.yaml
rename to deploy/opentofu/k3s/manifests/knoe/garage-service.yaml
diff --git a/deploy/opentofu/k3s/manifests/prole/garage-statefulset.yaml b/deploy/opentofu/k3s/manifests/knoe/garage-statefulset.yaml
similarity index 97%
rename from deploy/opentofu/k3s/manifests/prole/garage-statefulset.yaml
rename to deploy/opentofu/k3s/manifests/knoe/garage-statefulset.yaml
index 7566deb..c34477d 100644
--- a/deploy/opentofu/k3s/manifests/prole/garage-statefulset.yaml
+++ b/deploy/opentofu/k3s/manifests/knoe/garage-statefulset.yaml
@@ -16,7 +16,7 @@ spec:
         app: garage
     spec:
       nodeSelector:
-        kubernetes.io/hostname: myrddin.prole.org
+        kubernetes.io/hostname: myrddin.knoe.org
       containers:
         - name: garage
           image: dxflrs/garage:v1.3.1
diff --git a/deploy/opentofu/k3s/manifests/prole/grafana-proxy-configmap.yaml b/deploy/opentofu/k3s/manifests/knoe/grafana-proxy-configmap.yaml
similarity index 73%
rename from deploy/opentofu/k3s/manifests/prole/grafana-proxy-configmap.yaml
rename to deploy/opentofu/k3s/manifests/knoe/grafana-proxy-configmap.yaml
index 4b11db2..1291398 100644
--- a/deploy/opentofu/k3s/manifests/prole/grafana-proxy-configmap.yaml
+++ b/deploy/opentofu/k3s/manifests/knoe/grafana-proxy-configmap.yaml
@@ -1,7 +1,7 @@
 apiVersion: v1
 kind: ConfigMap
 metadata:
-  name: prole-grafana-proxy-nginx
+  name: knoe-grafana-proxy-nginx
 data:
   nginx.conf: |
     worker_processes  1;
@@ -18,11 +18,11 @@ data:
 
         # Never trust inbound auth headers from clients.
         proxy_set_header X-WEBAUTH-USER "";
-        proxy_set_header X-Prole-Groups "";
+        proxy_set_header X-Knoe-Groups "";
 
         location = /_auth_verify {
           internal;
-          proxy_pass http://prole-auth:8080/auth/verify;
+          proxy_pass http://knoe-auth:8080/auth/verify;
           proxy_pass_request_body off;
           proxy_set_header Content-Length "";
           proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
@@ -32,14 +32,14 @@ data:
 
         location / {
           auth_request /_auth_verify;
-          auth_request_set $prole_user $upstream_http_x_prole_user;
-          auth_request_set $prole_groups $upstream_http_x_prole_groups;
+          auth_request_set $knoe_user $upstream_http_x_knoe_user;
+          auth_request_set $knoe_groups $upstream_http_x_knoe_groups;
 
           error_page 401 = @login;
           error_page 403 = @login;
 
-          proxy_set_header X-WEBAUTH-USER $prole_user;
-          proxy_set_header X-Prole-Groups $prole_groups;
+          proxy_set_header X-WEBAUTH-USER $knoe_user;
+          proxy_set_header X-Knoe-Groups $knoe_groups;
           proxy_set_header Host $host;
           proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
           proxy_set_header X-Forwarded-Proto $scheme;
@@ -52,7 +52,7 @@ data:
         }
 
         location @login {
-          return 302 https://api.prole.org/auth/login?next=$scheme://$host$request_uri;
+          return 302 https://api.knoe.org/auth/login?next=$scheme://$host$request_uri;
         }
       }
     }
diff --git a/deploy/opentofu/k3s/manifests/prole/grafana-proxy-deployment.yaml b/deploy/opentofu/k3s/manifests/knoe/grafana-proxy-deployment.yaml
similarity index 75%
rename from deploy/opentofu/k3s/manifests/prole/grafana-proxy-deployment.yaml
rename to deploy/opentofu/k3s/manifests/knoe/grafana-proxy-deployment.yaml
index 4745130..5d557c7 100644
--- a/deploy/opentofu/k3s/manifests/prole/grafana-proxy-deployment.yaml
+++ b/deploy/opentofu/k3s/manifests/knoe/grafana-proxy-deployment.yaml
@@ -1,18 +1,18 @@
 apiVersion: apps/v1
 kind: Deployment
 metadata:
-  name: prole-grafana-proxy
+  name: knoe-grafana-proxy
   labels:
-    app: prole-grafana-proxy
+    app: knoe-grafana-proxy
 spec:
   replicas: 1
   selector:
     matchLabels:
-      app: prole-grafana-proxy
+      app: knoe-grafana-proxy
   template:
     metadata:
       labels:
-        app: prole-grafana-proxy
+        app: knoe-grafana-proxy
     spec:
       containers:
         - name: nginx
@@ -27,4 +27,4 @@ spec:
       volumes:
         - name: nginx-config
           configMap:
-            name: prole-grafana-proxy-nginx
+            name: knoe-grafana-proxy-nginx
diff --git a/deploy/opentofu/k3s/manifests/prole/grafana-proxy-service.yaml b/deploy/opentofu/k3s/manifests/knoe/grafana-proxy-service.yaml
similarity index 63%
rename from deploy/opentofu/k3s/manifests/prole/grafana-proxy-service.yaml
rename to deploy/opentofu/k3s/manifests/knoe/grafana-proxy-service.yaml
index bdc65e3..96bd81f 100644
--- a/deploy/opentofu/k3s/manifests/prole/grafana-proxy-service.yaml
+++ b/deploy/opentofu/k3s/manifests/knoe/grafana-proxy-service.yaml
@@ -1,12 +1,12 @@
 apiVersion: v1
 kind: Service
 metadata:
-  name: prole-grafana-proxy
+  name: knoe-grafana-proxy
   labels:
-    app: prole-grafana-proxy
+    app: knoe-grafana-proxy
 spec:
   selector:
-    app: prole-grafana-proxy
+    app: knoe-grafana-proxy
   ports:
     - name: http
       port: 80
diff --git a/deploy/opentofu/k3s/manifests/prole/ingress.yaml b/deploy/opentofu/k3s/manifests/knoe/ingress.yaml
similarity index 86%
rename from deploy/opentofu/k3s/manifests/prole/ingress.yaml
rename to deploy/opentofu/k3s/manifests/knoe/ingress.yaml
index e68572f..0bcbf77 100644
--- a/deploy/opentofu/k3s/manifests/prole/ingress.yaml
+++ b/deploy/opentofu/k3s/manifests/knoe/ingress.yaml
@@ -1,29 +1,29 @@
 apiVersion: networking.k8s.io/v1
 kind: Ingress
 metadata:
-  name: prole-ingress
+  name: knoe-ingress
   annotations:
     kubernetes.io/ingress.class: traefik
 spec:
   rules:
-  - host: git.prole.org
+  - host: git.knoe.org
     http:
       paths:
       - path: /
         pathType: Prefix
         backend:
           service:
-            name: prole
+            name: knoe
             port:
               number: 443
-  - host: api.prole.org
+  - host: api.knoe.org
     http:
       paths:
       - path: /
         pathType: Prefix
         backend:
           service:
-            name: prole
+            name: knoe
             port:
               number: 443
 ---
@@ -36,7 +36,7 @@ metadata:
     kubernetes.io/ingress.class: traefik
 spec:
   rules:
-  - host: dashboard.prole.org
+  - host: dashboard.knoe.org
     http:
       paths:
       - path: /
@@ -56,7 +56,7 @@ metadata:
     kubernetes.io/ingress.class: traefik
 spec:
   rules:
-  - host: db.prole.org
+  - host: db.knoe.org
     http:
       paths:
       - path: /
@@ -66,7 +66,7 @@ spec:
             name: kong
             port:
               number: 8000
-  - host: supabase.prole.org
+  - host: supabase.knoe.org
     http:
       paths:
       - path: /
diff --git a/deploy/opentofu/k3s/manifests/prole/iscsi-pvs.yaml b/deploy/opentofu/k3s/manifests/knoe/iscsi-pvs.yaml
similarity index 94%
rename from deploy/opentofu/k3s/manifests/prole/iscsi-pvs.yaml
rename to deploy/opentofu/k3s/manifests/knoe/iscsi-pvs.yaml
index 40e00bf..b8fe785 100644
--- a/deploy/opentofu/k3s/manifests/prole/iscsi-pvs.yaml
+++ b/deploy/opentofu/k3s/manifests/knoe/iscsi-pvs.yaml
@@ -22,7 +22,7 @@ spec:
             - key: kubernetes.io/hostname
               operator: In
               values:
-                - myrddin.prole.org
+                - myrddin.knoe.org
 ---
 apiVersion: v1
 kind: PersistentVolume
@@ -48,7 +48,7 @@ spec:
             - key: kubernetes.io/hostname
               operator: In
               values:
-                - myrddin.prole.org
+                - myrddin.knoe.org
 ---
 apiVersion: v1
 kind: PersistentVolume
@@ -74,7 +74,7 @@ spec:
             - key: kubernetes.io/hostname
               operator: In
               values:
-                - myrddin.prole.org
+                - myrddin.knoe.org
 ---
 apiVersion: v1
 kind: PersistentVolume
@@ -100,7 +100,7 @@ spec:
             - key: kubernetes.io/hostname
               operator: In
               values:
-                - merlin.prole.org
+                - merlin.knoe.org
 ---
 apiVersion: v1
 kind: PersistentVolume
@@ -126,7 +126,7 @@ spec:
             - key: kubernetes.io/hostname
               operator: In
               values:
-                - merlin.prole.org
+                - merlin.knoe.org
 ---
 apiVersion: v1
 kind: PersistentVolume
@@ -152,7 +152,7 @@ spec:
             - key: kubernetes.io/hostname
               operator: In
               values:
-                - pi.prole.org
+                - pi.knoe.org
 ---
 apiVersion: v1
 kind: PersistentVolume
@@ -178,7 +178,7 @@ spec:
             - key: kubernetes.io/hostname
               operator: In
               values:
-                - pi.prole.org
+                - pi.knoe.org
 ---
 apiVersion: v1
 kind: PersistentVolume
@@ -204,7 +204,7 @@ spec:
             - key: kubernetes.io/hostname
               operator: In
               values:
-                - pi.prole.org
+                - pi.knoe.org
 ---
 apiVersion: v1
 kind: PersistentVolume
@@ -230,7 +230,7 @@ spec:
             - key: kubernetes.io/hostname
               operator: In
               values:
-                - merlin.prole.org
+                - merlin.knoe.org
 ---
 apiVersion: v1
 kind: PersistentVolume
@@ -256,4 +256,4 @@ spec:
             - key: kubernetes.io/hostname
               operator: In
               values:
-                - myrddin.prole.org
+                - myrddin.knoe.org
diff --git a/deploy/opentofu/k3s/manifests/prole/knoe-db-barman-objectstore.yaml b/deploy/opentofu/k3s/manifests/knoe/knoe-db-barman-objectstore.yaml
similarity index 100%
rename from deploy/opentofu/k3s/manifests/prole/knoe-db-barman-objectstore.yaml
rename to deploy/opentofu/k3s/manifests/knoe/knoe-db-barman-objectstore.yaml
diff --git a/deploy/opentofu/k3s/manifests/prole/knoe-db-postgres-service.yaml b/deploy/opentofu/k3s/manifests/knoe/knoe-db-postgres-service.yaml
similarity index 100%
rename from deploy/opentofu/k3s/manifests/prole/knoe-db-postgres-service.yaml
rename to deploy/opentofu/k3s/manifests/knoe/knoe-db-postgres-service.yaml
diff --git a/deploy/opentofu/k3s/manifests/prole/knoe-db.yaml b/deploy/opentofu/k3s/manifests/knoe/knoe-db.yaml
similarity index 89%
rename from deploy/opentofu/k3s/manifests/prole/knoe-db.yaml
rename to deploy/opentofu/k3s/manifests/knoe/knoe-db.yaml
index 2a6101c..5c9e8cc 100644
--- a/deploy/opentofu/k3s/manifests/prole/knoe-db.yaml
+++ b/deploy/opentofu/k3s/manifests/knoe/knoe-db.yaml
@@ -41,17 +41,17 @@ spec:
       - pg_tde
     pg_hba:
       - local all postgres trust
-      - local all prole scram-sha-256
+      - local all knoe scram-sha-256
       # SCRAM auth — Kerberos/GSS rules omitted (kerberos_enabled=false on k3s)
       - host all postgres all scram-sha-256
-      - host prole knoe-db all scram-sha-256
+      - host knoe knoe-db all scram-sha-256
       - host all all all scram-sha-256
-      - hostssl prole knoe-db all scram-sha-256
+      - hostssl knoe knoe-db all scram-sha-256
 
   bootstrap:
     initdb:
       database: knoe-db
-      owner: prole
+      owner: knoe
       localeCollate: 'en_US.utf8'
       localeCType: 'en_US.utf8'
       secret:
@@ -61,13 +61,13 @@ spec:
       postInitSQL:
         - CREATE EXTENSION IF NOT EXISTS pg_tde;
         - CREATE EXTENSION IF NOT EXISTS pgcrypto;
-        - GRANT EXECUTE ON ALL FUNCTIONS IN SCHEMA public TO prole;
+        - GRANT EXECUTE ON ALL FUNCTIONS IN SCHEMA public TO knoe;
         - CREATE EXTENSION IF NOT EXISTS postgis;
         - CREATE EXTENSION IF NOT EXISTS postgis_topology;
         - CREATE EXTENSION IF NOT EXISTS vector;
         - CREATE EXTENSION IF NOT EXISTS tds_fdw;
-        - GRANT EXECUTE ON ALL FUNCTIONS IN SCHEMA public TO prole;
-        - GRANT EXECUTE ON ALL FUNCTIONS IN SCHEMA topology TO prole;
+        - GRANT EXECUTE ON ALL FUNCTIONS IN SCHEMA public TO knoe;
+        - GRANT EXECUTE ON ALL FUNCTIONS IN SCHEMA topology TO knoe;
         - CREATE SCHEMA IF NOT EXISTS storage;
         - CREATE SCHEMA IF NOT EXISTS graphql_public;
         - CREATE ROLE anon NOLOGIN;
@@ -87,13 +87,13 @@ spec:
         - ALTER SCHEMA knoe OWNER TO knoe;
         - REVOKE ALL ON SCHEMA knoe FROM PUBLIC;
         - ALTER ROLE knoe SET search_path TO knoe, public;
-        - GRANT USAGE ON SCHEMA knoe TO prole;
+        - GRANT USAGE ON SCHEMA knoe TO knoe;
         # knoe.user — identity registry (Knoey Users)
         - CREATE TABLE IF NOT EXISTS knoe.user (id SERIAL PRIMARY KEY, username TEXT NOT NULL UNIQUE, realm TEXT NOT NULL DEFAULT 'PROLE.LOCAL', email TEXT, display_name TEXT, tenant_realm TEXT, is_realm_admin BOOLEAN DEFAULT false, created_at TIMESTAMPTZ DEFAULT now(), updated_at TIMESTAMPTZ DEFAULT now());
         - CREATE TABLE IF NOT EXISTS knoe.user_role (user_id INT NOT NULL REFERENCES knoe.user(id) ON DELETE CASCADE, role TEXT NOT NULL, granted_at TIMESTAMPTZ DEFAULT now(), PRIMARY KEY (user_id, role));
-        - GRANT SELECT, INSERT, UPDATE ON knoe.user TO prole;
-        - GRANT SELECT, INSERT, UPDATE ON knoe.user_role TO prole;
-        - GRANT USAGE, SELECT ON SEQUENCE knoe.user_id_seq TO prole;
+        - GRANT SELECT, INSERT, UPDATE ON knoe.user TO knoe;
+        - GRANT SELECT, INSERT, UPDATE ON knoe.user_role TO knoe;
+        - GRANT USAGE, SELECT ON SEQUENCE knoe.user_id_seq TO knoe;
 
   managed:
     roles:
diff --git a/deploy/opentofu/k3s/manifests/prole/kong-configmap.yaml b/deploy/opentofu/k3s/manifests/knoe/kong-configmap.yaml
similarity index 82%
rename from deploy/opentofu/k3s/manifests/prole/kong-configmap.yaml
rename to deploy/opentofu/k3s/manifests/knoe/kong-configmap.yaml
index bde6466..0d11216 100644
--- a/deploy/opentofu/k3s/manifests/prole/kong-configmap.yaml
+++ b/deploy/opentofu/k3s/manifests/knoe/kong-configmap.yaml
@@ -1,7 +1,7 @@
 apiVersion: v1
 kind: ConfigMap
 metadata:
-  name: prole-svc-kong-config
+  name: knoe-svc-kong-config
   annotations:
     argocd.argoproj.io/sync-wave: "0"
 data:
@@ -10,12 +10,12 @@ data:
     _transform: true
 
     services:
-      - name: prole-service
-        url: http://prole-svc.knoe-system.svc.cluster.local:8080
+      - name: knoe-service
+        url: http://knoe-svc.knoe-system.svc.cluster.local:8080
         routes:
-          - name: prole-k3s-kubeconfig
+          - name: knoe-k3s-kubeconfig
             hosts:
-              - svc.prole.org
+              - svc.knoe.org
             paths:
               - /k3s/kube_config.sh
             strip_path: false
@@ -25,7 +25,7 @@ data:
         routes:
           - name: backup-route
             hosts:
-              - svc.prole.org
+              - svc.knoe.org
             paths:
               - /backup
             strip_path: false
@@ -35,7 +35,7 @@ data:
         routes:
           - name: grafana-root
             hosts:
-              - svc.prole.org
+              - svc.knoe.org
             paths:
               - /
             strip_path: false
@@ -45,7 +45,7 @@ data:
         routes:
           - name: knoe-auth-root
             hosts:
-              - api.prole.org
+              - api.knoe.org
             paths:
               - /
             strip_path: false
@@ -55,7 +55,7 @@ data:
         routes:
           - name: gitea-root
             hosts:
-              - git.prole.org
+              - git.knoe.org
             paths:
               - /
             strip_path: false
diff --git a/deploy/opentofu/k3s/manifests/prole/kong-deployment.yaml b/deploy/opentofu/k3s/manifests/knoe/kong-deployment.yaml
similarity index 88%
rename from deploy/opentofu/k3s/manifests/prole/kong-deployment.yaml
rename to deploy/opentofu/k3s/manifests/knoe/kong-deployment.yaml
index 51149b0..5bd2451 100644
--- a/deploy/opentofu/k3s/manifests/prole/kong-deployment.yaml
+++ b/deploy/opentofu/k3s/manifests/knoe/kong-deployment.yaml
@@ -1,31 +1,31 @@
 apiVersion: apps/v1
 kind: Deployment
 metadata:
-  name: prole-svc-kong
+  name: knoe-svc-kong
   annotations:
     argocd.argoproj.io/sync-wave: "1"
   labels:
-    app: prole-svc-kong
+    app: knoe-svc-kong
 spec:
   replicas: 1
   selector:
     matchLabels:
-      app: prole-svc-kong
+      app: knoe-svc-kong
   template:
     metadata:
       labels:
-        app: prole-svc-kong
+        app: knoe-svc-kong
     spec:
       affinity:
         nodeAffinity:
-          # Never schedule on pi.prole.org — pihole-FTL owns ports 80/443 there
+          # Never schedule on pi.knoe.org — pihole-FTL owns ports 80/443 there
           requiredDuringSchedulingIgnoredDuringExecution:
             nodeSelectorTerms:
             - matchExpressions:
               - key: kubernetes.io/hostname
                 operator: NotIn
                 values:
-                - pi.prole.org
+                - pi.knoe.org
           preferredDuringSchedulingIgnoredDuringExecution:
           - weight: 80
             preference:
@@ -33,7 +33,7 @@ spec:
               - key: kubernetes.io/hostname
                 operator: In
                 values:
-                - gandalf.prole.org
+                - gandalf.knoe.org
       containers:
         - name: kong
           image: kong:3.9
@@ -85,4 +85,4 @@ spec:
       volumes:
         - name: kong-config
           configMap:
-            name: prole-svc-kong-config
+            name: knoe-svc-kong-config
diff --git a/deploy/opentofu/k3s/manifests/prole/kong-service.yaml b/deploy/opentofu/k3s/manifests/knoe/kong-service.yaml
similarity index 82%
rename from deploy/opentofu/k3s/manifests/prole/kong-service.yaml
rename to deploy/opentofu/k3s/manifests/knoe/kong-service.yaml
index 7b93088..beb822e 100644
--- a/deploy/opentofu/k3s/manifests/prole/kong-service.yaml
+++ b/deploy/opentofu/k3s/manifests/knoe/kong-service.yaml
@@ -1,14 +1,14 @@
 apiVersion: v1
 kind: Service
 metadata:
-  name: prole-svc-kong
+  name: knoe-svc-kong
   annotations:
     argocd.argoproj.io/sync-wave: "1"
   labels:
-    app: prole-svc-kong
+    app: knoe-svc-kong
 spec:
   selector:
-    app: prole-svc-kong
+    app: knoe-svc-kong
   ports:
     - name: proxy
       port: 8000
diff --git a/deploy/opentofu/k3s/manifests/prole/kustomization.yaml b/deploy/opentofu/k3s/manifests/knoe/kustomization.yaml
similarity index 61%
rename from deploy/opentofu/k3s/manifests/prole/kustomization.yaml
rename to deploy/opentofu/k3s/manifests/knoe/kustomization.yaml
index bcd4d59..88ef779 100644
--- a/deploy/opentofu/k3s/manifests/prole/kustomization.yaml
+++ b/deploy/opentofu/k3s/manifests/knoe/kustomization.yaml
@@ -5,13 +5,13 @@ resources:
   - garage-configmap.yaml
   - garage-statefulset.yaml
   - garage-service.yaml
-  - prole-configmap.yaml
-  - prole-deployment.yaml
-  - prole-service.yaml
-  - prole-auth-deployment.yaml
-  - prole-auth-service.yaml
-  - prole-auth-kerberos-configmap.yaml
-  - prole-kdc-configmap.yaml
+  - knoe-configmap.yaml
+  - knoe-deployment.yaml
+  - knoe-service.yaml
+  - knoe-auth-deployment.yaml
+  - knoe-auth-service.yaml
+  - knoe-auth-kerberos-configmap.yaml
+  - knoe-kdc-configmap.yaml
   - grafana-proxy-configmap.yaml
   - grafana-proxy-deployment.yaml
   - grafana-proxy-service.yaml
diff --git a/deploy/opentofu/k3s/manifests/prole/openbao-service.yaml b/deploy/opentofu/k3s/manifests/knoe/openbao-service.yaml
similarity index 100%
rename from deploy/opentofu/k3s/manifests/prole/openbao-service.yaml
rename to deploy/opentofu/k3s/manifests/knoe/openbao-service.yaml
diff --git a/deploy/opentofu/k3s/manifests/prole/openbao-statefulset.yaml b/deploy/opentofu/k3s/manifests/knoe/openbao-statefulset.yaml
similarity index 96%
rename from deploy/opentofu/k3s/manifests/prole/openbao-statefulset.yaml
rename to deploy/opentofu/k3s/manifests/knoe/openbao-statefulset.yaml
index ea374f2..4552abe 100644
--- a/deploy/opentofu/k3s/manifests/prole/openbao-statefulset.yaml
+++ b/deploy/opentofu/k3s/manifests/knoe/openbao-statefulset.yaml
@@ -16,7 +16,7 @@ spec:
         app: openbao
     spec:
       nodeSelector:
-        kubernetes.io/hostname: myrddin.prole.org
+        kubernetes.io/hostname: myrddin.knoe.org
       containers:
         - name: openbao
           image: ghcr.io/openbao/openbao:2.0.0
diff --git a/deploy/opentofu/k3s/manifests/prole/prole-auth-deployment.yaml b/deploy/opentofu/k3s/manifests/knoe/prole-auth-deployment.yaml
similarity index 79%
rename from deploy/opentofu/k3s/manifests/prole/prole-auth-deployment.yaml
rename to deploy/opentofu/k3s/manifests/knoe/prole-auth-deployment.yaml
index 81b3a34..f05e7a9 100644
--- a/deploy/opentofu/k3s/manifests/prole/prole-auth-deployment.yaml
+++ b/deploy/opentofu/k3s/manifests/knoe/prole-auth-deployment.yaml
@@ -1,22 +1,22 @@
 apiVersion: apps/v1
 kind: Deployment
 metadata:
-  name: prole-auth
+  name: knoe-auth
   labels:
-    app: prole-auth
+    app: knoe-auth
 spec:
   replicas: 1
   selector:
     matchLabels:
-      app: prole-auth
+      app: knoe-auth
   template:
     metadata:
       labels:
-        app: prole-auth
+        app: knoe-auth
     spec:
       initContainers:
         - name: keytab-bootstrap
-          image: myrddin.prole.org:5000/prole-authority:latest
+          image: myrddin.knoe.org:5000/knoe-authority:latest
           imagePullPolicy: IfNotPresent
           command:
             - /bin/bash
@@ -36,7 +36,7 @@ spec:
                 svc_principal="${svc_principal}@${realm}"
               fi
 
-              keytab_out="/etc/prole/keytabs/http.keytab"
+              keytab_out="/etc/knoe/keytabs/http.keytab"
               mkdir -p "$(dirname "${keytab_out}")"
 
               if [[ -f /mnt/keytab-secret/http.keytab ]]; then
@@ -56,22 +56,22 @@ spec:
               fi
 
               mkdir -p /etc/krb5kdc /var/lib/krb5kdc
-              if [[ -f /opt/prole-kdc/krb5.conf ]]; then
-                cp /opt/prole-kdc/krb5.conf /etc/krb5.conf
+              if [[ -f /opt/knoe-kdc/krb5.conf ]]; then
+                cp /opt/knoe-kdc/krb5.conf /etc/krb5.conf
               fi
-              if [[ -f /opt/prole-kdc/kdc.conf ]]; then
-                cp /opt/prole-kdc/kdc.conf /etc/krb5kdc/kdc.conf
+              if [[ -f /opt/knoe-kdc/kdc.conf ]]; then
+                cp /opt/knoe-kdc/kdc.conf /etc/krb5kdc/kdc.conf
               fi
-              if [[ -f /opt/prole-kdc/kadm5.acl ]]; then
-                cp /opt/prole-kdc/kadm5.acl /etc/krb5kdc/kadm5.acl
+              if [[ -f /opt/knoe-kdc/kadm5.acl ]]; then
+                cp /opt/knoe-kdc/kadm5.acl /etc/krb5kdc/kadm5.acl
               fi
 
               if [[ -z "${PROLE_KDC_MASTER_PASSWORD:-}" ]]; then
-                echo "ERROR: Missing required env PROLE_KDC_MASTER_PASSWORD (secret 'prole-kdc-secrets/master_password')." >&2
+                echo "ERROR: Missing required env PROLE_KDC_MASTER_PASSWORD (secret 'knoe-kdc-secrets/master_password')." >&2
                 exit 1
               fi
               if [[ -z "${PROLE_KDC_ADMIN_PASSWORD:-}" ]]; then
-                echo "ERROR: Missing required env PROLE_KDC_ADMIN_PASSWORD (secret 'prole-kdc-secrets/admin_password')." >&2
+                echo "ERROR: Missing required env PROLE_KDC_ADMIN_PASSWORD (secret 'knoe-kdc-secrets/admin_password')." >&2
                 exit 1
               fi
 
@@ -96,40 +96,40 @@ spec:
             - name: PROLE_KDC_REALM
               valueFrom:
                 configMapKeyRef:
-                  name: prole-auth-kerberos
+                  name: knoe-auth-kerberos
                   key: realm
             - name: PROLE_KDC_ADMIN_PRINCIPAL
               value: "admin/admin"
             - name: PROLE_KDC_MASTER_PASSWORD
               valueFrom:
                 secretKeyRef:
-                  name: prole-kdc-secrets
+                  name: knoe-kdc-secrets
                   key: master_password
             - name: PROLE_KDC_ADMIN_PASSWORD
               valueFrom:
                 secretKeyRef:
-                  name: prole-kdc-secrets
+                  name: knoe-kdc-secrets
                   key: admin_password
             - name: PROLE_KERBEROS_SERVICE_PRINCIPAL
               valueFrom:
                 configMapKeyRef:
-                  name: prole-auth-kerberos
+                  name: knoe-auth-kerberos
                   key: servicePrincipal
           volumeMounts:
             - name: keytab
-              mountPath: /etc/prole/keytabs
+              mountPath: /etc/knoe/keytabs
             - name: keytab-secret
               mountPath: /mnt/keytab-secret
               readOnly: true
-            - name: prole-kdc-config
-              mountPath: /opt/prole-kdc
-            - name: prole-kdc-data
+            - name: knoe-kdc-config
+              mountPath: /opt/knoe-kdc
+            - name: knoe-kdc-data
               mountPath: /var/lib/krb5kdc
-            - name: prole-kdc-data
+            - name: knoe-kdc-data
               mountPath: /etc/krb5kdc
       containers:
-        - name: prole-auth
-          image: prole-auth:latest
+        - name: knoe-auth
+          image: knoe-auth:latest
           ports:
             - containerPort: 8080
               name: http
@@ -139,25 +139,25 @@ spec:
             - name: PROLE_AUTH_COOKIE_DOMAIN
               valueFrom:
                 configMapKeyRef:
-                  name: prole-platform-config
+                  name: knoe-platform-config
                   key: authCookieDomain
                   optional: true
             - name: PROLE_AUTH_SESSION_SECRET
               valueFrom:
                 secretKeyRef:
-                  name: prole-auth-secrets
+                  name: knoe-auth-secrets
                   key: sessionSecret
             - name: PROLE_KERBEROS_SERVICE_PRINCIPAL
               valueFrom:
                 configMapKeyRef:
-                  name: prole-auth-kerberos
+                  name: knoe-auth-kerberos
                   key: servicePrincipal
             - name: PROLE_KERBEROS_KEYTAB_PATH
-              value: "/etc/prole/keytabs/http.keytab"
+              value: "/etc/knoe/keytabs/http.keytab"
             - name: PROLE_KERBEROS_REALM
               valueFrom:
                 configMapKeyRef:
-                  name: prole-auth-kerberos
+                  name: knoe-auth-kerberos
                   key: realm
             # ── Google Workspace OIDC (primary auth for GKE/prod) ──────────
             # Secret created by installer from Auth+Routing tab OIDC fields.
@@ -187,7 +187,7 @@ spec:
             - name: OIDC_BASE_URL
               valueFrom:
                 configMapKeyRef:
-                  name: prole-platform-config
+                  name: knoe-platform-config
                   key: frontdoorHost
                   optional: true
             # Comma-separated list of bare usernames granted admin group in OIDC tokens
@@ -195,38 +195,38 @@ spec:
               value: "admin"
           volumeMounts:
             - name: keytab
-              mountPath: /etc/prole/keytabs
+              mountPath: /etc/knoe/keytabs
               readOnly: true
-            - name: prole-kdc-config
+            - name: knoe-kdc-config
               mountPath: /etc/krb5.conf
               subPath: krb5.conf
               readOnly: true
         - name: kdc
-          image: myrddin.prole.org:5000/prole-authority:latest
+          image: myrddin.knoe.org:5000/knoe-authority:latest
           imagePullPolicy: IfNotPresent
-          command: ["/bin/bash", "/opt/prole-kdc/entrypoint.sh"]
+          command: ["/bin/bash", "/opt/knoe-kdc/entrypoint.sh"]
           env:
             - name: PROLE_KDC_REALM
               valueFrom:
                 configMapKeyRef:
-                  name: prole-auth-kerberos
+                  name: knoe-auth-kerberos
                   key: realm
             - name: PROLE_KDC_ADMIN_PRINCIPAL
               value: "admin/admin"
             - name: PROLE_KDC_MASTER_PASSWORD
               valueFrom:
                 secretKeyRef:
-                  name: prole-kdc-secrets
+                  name: knoe-kdc-secrets
                   key: master_password
             - name: PROLE_KDC_ADMIN_PASSWORD
               valueFrom:
                 secretKeyRef:
-                  name: prole-kdc-secrets
+                  name: knoe-kdc-secrets
                   key: admin_password
             - name: PROLE_KDC_GUEST_PASSWORD
               valueFrom:
                 secretKeyRef:
-                  name: prole-kdc-secrets
+                  name: knoe-kdc-secrets
                   key: guest_password
                   optional: true   # auto-generated by init_knoe_users.sh if absent
           ports:
@@ -246,22 +246,22 @@ spec:
               containerPort: 749
               protocol: TCP
           volumeMounts:
-            - name: prole-kdc-config
-              mountPath: /opt/prole-kdc
-            - name: prole-kdc-data
+            - name: knoe-kdc-config
+              mountPath: /opt/knoe-kdc
+            - name: knoe-kdc-data
               mountPath: /var/lib/krb5kdc
-            - name: prole-kdc-data
+            - name: knoe-kdc-data
               mountPath: /etc/krb5kdc
       volumes:
         - name: keytab
           emptyDir: {}
         - name: keytab-secret
           secret:
-            secretName: prole-auth-keytab
+            secretName: knoe-auth-keytab
             optional: true
-        - name: prole-kdc-config
+        - name: knoe-kdc-config
           configMap:
-            name: prole-kdc-config
+            name: knoe-kdc-config
             defaultMode: 0755
-        - name: prole-kdc-data
+        - name: knoe-kdc-data
           emptyDir: {}
diff --git a/deploy/opentofu/k3s/manifests/prole/prole-auth-kerberos-configmap.yaml b/deploy/opentofu/k3s/manifests/knoe/prole-auth-kerberos-configmap.yaml
similarity index 62%
rename from deploy/opentofu/k3s/manifests/prole/prole-auth-kerberos-configmap.yaml
rename to deploy/opentofu/k3s/manifests/knoe/prole-auth-kerberos-configmap.yaml
index 84e64f1..f000a08 100644
--- a/deploy/opentofu/k3s/manifests/prole/prole-auth-kerberos-configmap.yaml
+++ b/deploy/opentofu/k3s/manifests/knoe/prole-auth-kerberos-configmap.yaml
@@ -1,8 +1,8 @@
 apiVersion: v1
 kind: ConfigMap
 metadata:
-  name: prole-auth-kerberos
+  name: knoe-auth-kerberos
 data:
   # Kerberos HTTP service principal for SPNEGO (must match keytab)
-  servicePrincipal: "HTTP/api.prole.org@PROLE.LOCAL"
+  servicePrincipal: "HTTP/api.knoe.org@PROLE.LOCAL"
   realm: "PROLE.LOCAL"
diff --git a/deploy/opentofu/k3s/manifests/prole/prole-auth-secrets.example.yaml b/deploy/opentofu/k3s/manifests/knoe/prole-auth-secrets.example.yaml
similarity index 88%
rename from deploy/opentofu/k3s/manifests/prole/prole-auth-secrets.example.yaml
rename to deploy/opentofu/k3s/manifests/knoe/prole-auth-secrets.example.yaml
index 28ec28b..51d2507 100644
--- a/deploy/opentofu/k3s/manifests/prole/prole-auth-secrets.example.yaml
+++ b/deploy/opentofu/k3s/manifests/knoe/prole-auth-secrets.example.yaml
@@ -2,7 +2,7 @@
 apiVersion: v1
 kind: Secret
 metadata:
-  name: prole-auth-secrets
+  name: knoe-auth-secrets
 type: Opaque
 stringData:
   # Strong random value (e.g. 32+ bytes). Used to HMAC-sign session cookies.
diff --git a/deploy/opentofu/k3s/manifests/prole/prole-auth-service.yaml b/deploy/opentofu/k3s/manifests/knoe/prole-auth-service.yaml
similarity index 90%
rename from deploy/opentofu/k3s/manifests/prole/prole-auth-service.yaml
rename to deploy/opentofu/k3s/manifests/knoe/prole-auth-service.yaml
index 5ce43a0..303616e 100644
--- a/deploy/opentofu/k3s/manifests/prole/prole-auth-service.yaml
+++ b/deploy/opentofu/k3s/manifests/knoe/prole-auth-service.yaml
@@ -1,12 +1,12 @@
 apiVersion: v1
 kind: Service
 metadata:
-  name: prole-auth
+  name: knoe-auth
   labels:
-    app: prole-auth
+    app: knoe-auth
 spec:
   selector:
-    app: prole-auth
+    app: knoe-auth
   ports:
     - name: http
       port: 8080
diff --git a/k8s/prole/prole-configmap.yaml b/deploy/opentofu/k3s/manifests/knoe/prole-configmap.yaml
similarity index 96%
rename from k8s/prole/prole-configmap.yaml
rename to deploy/opentofu/k3s/manifests/knoe/prole-configmap.yaml
index 840ea36..12db3fb 100644
--- a/k8s/prole/prole-configmap.yaml
+++ b/deploy/opentofu/k3s/manifests/knoe/prole-configmap.yaml
@@ -1,7 +1,7 @@
 apiVersion: v1
 kind: ConfigMap
 metadata:
-  name: prole-nginx-config
+  name: knoe-nginx-config
 data:
   nginx.conf: |
     user  nginx;
diff --git a/k8s/prole/prole-deployment.yaml b/deploy/opentofu/k3s/manifests/knoe/prole-deployment.yaml
similarity index 81%
rename from k8s/prole/prole-deployment.yaml
rename to deploy/opentofu/k3s/manifests/knoe/prole-deployment.yaml
index d4f546e..e24e6f0 100644
--- a/k8s/prole/prole-deployment.yaml
+++ b/deploy/opentofu/k3s/manifests/knoe/prole-deployment.yaml
@@ -1,21 +1,21 @@
 apiVersion: apps/v1
 kind: Deployment
 metadata:
-  name: prole
+  name: knoe
   labels:
-    app: prole
+    app: knoe
 spec:
   replicas: 1
   selector:
     matchLabels:
-      app: prole
+      app: knoe
   template:
     metadata:
       labels:
-        app: prole
+        app: knoe
     spec:
       nodeSelector:
-        kubernetes.io/hostname: myrddin.prole.org
+        kubernetes.io/hostname: myrddin.knoe.org
       containers:
         - name: nginx
           image: nginx:1.27-alpine
@@ -41,10 +41,10 @@ spec:
       volumes:
         - name: nginx-config
           configMap:
-            name: prole-nginx-config
+            name: knoe-nginx-config
         - name: tls
           secret:
-            secretName: prole-nginx-tls
+            secretName: knoe-nginx-tls
         - name: web-root
           configMap:
-            name: prole-index-html
+            name: knoe-index-html
diff --git a/deploy/opentofu/k3s/manifests/prole/prole-kdc-configmap.yaml b/deploy/opentofu/k3s/manifests/knoe/prole-kdc-configmap.yaml
similarity index 87%
rename from deploy/opentofu/k3s/manifests/prole/prole-kdc-configmap.yaml
rename to deploy/opentofu/k3s/manifests/knoe/prole-kdc-configmap.yaml
index 19dbd1b..32a7d24 100644
--- a/deploy/opentofu/k3s/manifests/prole/prole-kdc-configmap.yaml
+++ b/deploy/opentofu/k3s/manifests/knoe/prole-kdc-configmap.yaml
@@ -1,7 +1,7 @@
 apiVersion: v1
 kind: ConfigMap
 metadata:
-  name: prole-kdc-config
+  name: knoe-kdc-config
 data:
   krb5.conf: |
     [libdefaults]
@@ -15,8 +15,8 @@ data:
         admin_server = 127.0.0.1
       }
       PROLE.ORG = {
-        kdc = myrddin.prole.org
-        admin_server = myrddin.prole.org
+        kdc = myrddin.knoe.org
+        admin_server = myrddin.knoe.org
       }
 
     [capaths]
@@ -64,22 +64,22 @@ data:
     fi
 
     mkdir -p /etc/krb5kdc /var/lib/krb5kdc
-    if [[ -f /opt/prole-kdc/krb5.conf ]]; then
-      cp /opt/prole-kdc/krb5.conf /etc/krb5.conf
+    if [[ -f /opt/knoe-kdc/krb5.conf ]]; then
+      cp /opt/knoe-kdc/krb5.conf /etc/krb5.conf
     fi
-    if [[ -f /opt/prole-kdc/kdc.conf ]]; then
-      cp /opt/prole-kdc/kdc.conf /etc/krb5kdc/kdc.conf
+    if [[ -f /opt/knoe-kdc/kdc.conf ]]; then
+      cp /opt/knoe-kdc/kdc.conf /etc/krb5kdc/kdc.conf
     fi
-    if [[ -f /opt/prole-kdc/kadm5.acl ]]; then
-      cp /opt/prole-kdc/kadm5.acl /etc/krb5kdc/kadm5.acl
+    if [[ -f /opt/knoe-kdc/kadm5.acl ]]; then
+      cp /opt/knoe-kdc/kadm5.acl /etc/krb5kdc/kadm5.acl
     fi
 
     if [[ -z "${PROLE_KDC_MASTER_PASSWORD:-}" ]]; then
-      echo "ERROR: Missing required env PROLE_KDC_MASTER_PASSWORD (secret 'prole-kdc-secrets/master_password')." >&2
+      echo "ERROR: Missing required env PROLE_KDC_MASTER_PASSWORD (secret 'knoe-kdc-secrets/master_password')." >&2
       exit 1
     fi
     if [[ -z "${PROLE_KDC_ADMIN_PASSWORD:-}" ]]; then
-      echo "ERROR: Missing required env PROLE_KDC_ADMIN_PASSWORD (secret 'prole-kdc-secrets/admin_password')." >&2
+      echo "ERROR: Missing required env PROLE_KDC_ADMIN_PASSWORD (secret 'knoe-kdc-secrets/admin_password')." >&2
       exit 1
     fi
 
diff --git a/deploy/opentofu/k3s/manifests/prole/prole-kdc-secrets.example.yaml b/deploy/opentofu/k3s/manifests/knoe/prole-kdc-secrets.example.yaml
similarity index 65%
rename from deploy/opentofu/k3s/manifests/prole/prole-kdc-secrets.example.yaml
rename to deploy/opentofu/k3s/manifests/knoe/prole-kdc-secrets.example.yaml
index bda857e..a9a515e 100644
--- a/deploy/opentofu/k3s/manifests/prole/prole-kdc-secrets.example.yaml
+++ b/deploy/opentofu/k3s/manifests/knoe/prole-kdc-secrets.example.yaml
@@ -1,15 +1,15 @@
 apiVersion: v1
 kind: Secret
 metadata:
-  name: prole-kdc-secrets
+  name: knoe-kdc-secrets
 type: Opaque
 stringData:
   # Strong random values (do not commit real secrets)
   master_password: "CHANGE_ME"
   admin_password: "CHANGE_ME"
-  # Shared secret used for cross-realm trust with myrddin.prole.org PROLE.ORG realm
+  # Shared secret used for cross-realm trust with myrddin.knoe.org PROLE.ORG realm
   trust_shared_password: "CHANGE_ME"
-  # myrddin.prole.org Samba AD admin password (for reciprocal trust principal creation)
+  # myrddin.knoe.org Samba AD admin password (for reciprocal trust principal creation)
   trust_password: "CHANGE_ME"
   # Password for guest@PROLE.LOCAL read-only principal (auto-generated by init_knoe_users.sh if absent)
   guest_password: "CHANGE_ME"
diff --git a/deploy/opentofu/k3s/manifests/prole/prole-service.yaml b/deploy/opentofu/k3s/manifests/knoe/prole-service.yaml
similarity index 77%
rename from deploy/opentofu/k3s/manifests/prole/prole-service.yaml
rename to deploy/opentofu/k3s/manifests/knoe/prole-service.yaml
index 822767d..999fc17 100644
--- a/deploy/opentofu/k3s/manifests/prole/prole-service.yaml
+++ b/deploy/opentofu/k3s/manifests/knoe/prole-service.yaml
@@ -1,12 +1,12 @@
 apiVersion: v1
 kind: Service
 metadata:
-  name: prole
+  name: knoe
   labels:
-    app: prole
+    app: knoe
 spec:
   selector:
-    app: prole
+    app: knoe
   ports:
     - name: https
       port: 443
diff --git a/deploy/opentofu/k3s/manifests/prole/storageclass-synology-iscsi.yaml b/deploy/opentofu/k3s/manifests/knoe/storageclass-synology-iscsi.yaml
similarity index 100%
rename from deploy/opentofu/k3s/manifests/prole/storageclass-synology-iscsi.yaml
rename to deploy/opentofu/k3s/manifests/knoe/storageclass-synology-iscsi.yaml
diff --git a/deploy/opentofu/k3s/manifests/prole/supabase-ingress.yaml b/deploy/opentofu/k3s/manifests/knoe/supabase-ingress.yaml
similarity index 90%
rename from deploy/opentofu/k3s/manifests/prole/supabase-ingress.yaml
rename to deploy/opentofu/k3s/manifests/knoe/supabase-ingress.yaml
index 4c06906..6d1856e 100644
--- a/deploy/opentofu/k3s/manifests/prole/supabase-ingress.yaml
+++ b/deploy/opentofu/k3s/manifests/knoe/supabase-ingress.yaml
@@ -7,7 +7,7 @@ metadata:
     kubernetes.io/ingress.class: traefik
 spec:
   rules:
-  - host: db.prole.org
+  - host: db.knoe.org
     http:
       paths:
       - path: /
@@ -17,7 +17,7 @@ spec:
             name: kong
             port:
               number: 8000
-  - host: supabase.prole.org
+  - host: supabase.knoe.org
     http:
       paths:
       - path: /
diff --git a/deploy/opentofu/k3s/manifests/openbao/kerberos-configmap.yaml b/deploy/opentofu/k3s/manifests/openbao/kerberos-configmap.yaml
index 81984e6..a2ebfc6 100644
--- a/deploy/opentofu/k3s/manifests/openbao/kerberos-configmap.yaml
+++ b/deploy/opentofu/k3s/manifests/openbao/kerberos-configmap.yaml
@@ -1,7 +1,7 @@
 apiVersion: v1
 kind: ConfigMap
 metadata:
-  name: prole-krb5-conf
+  name: knoe-krb5-conf
   namespace: default
 data:
   krb5.conf: |
@@ -17,5 +17,5 @@ data:
       }
 
     [domain_realm]
-      .prole.org = PROLE.ORG
-      prole.org = PROLE.ORG
+      .knoe.org = PROLE.ORG
+      knoe.org = PROLE.ORG
diff --git a/deploy/opentofu/k3s/manifests/opentofu/deployment.yaml b/deploy/opentofu/k3s/manifests/opentofu/deployment.yaml
index 3a1e849..27f789f 100644
--- a/deploy/opentofu/k3s/manifests/opentofu/deployment.yaml
+++ b/deploy/opentofu/k3s/manifests/opentofu/deployment.yaml
@@ -33,7 +33,7 @@ data:
       
         

OpenTofu Pipeline Ready

-

This service hosts the OpenTofu control plane for Prole deployments.

+

This service hosts the OpenTofu control plane for Knoe deployments.

Pipeline root (on disk): deploy/opentofu/k3s

@@ -56,7 +56,7 @@ spec: app: opentofu spec: nodeSelector: - kubernetes.io/hostname: myrddin.prole.org + kubernetes.io/hostname: myrddin.knoe.org containers: - name: opentofu-ui image: nginx:1.27-alpine diff --git a/deploy/opentofu/k3s/opentofu.auto.tfvars b/deploy/opentofu/k3s/opentofu.auto.tfvars index 2d287ab..7e916c1 100644 --- a/deploy/opentofu/k3s/opentofu.auto.tfvars +++ b/deploy/opentofu/k3s/opentofu.auto.tfvars @@ -1,4 +1,4 @@ -k3s_server_url = "https://myrddin.prole.org:6443" +k3s_server_url = "https://myrddin.knoe.org:6443" k3s_token = "K107c8c6000488eca4a067d8a73119bbae2f07b4ea1bac7d8d3dc9c500cbb8acb18::server:04572345810eae2f9619a6ed4239702b" -namespace = "prole-db" -kubeconfig_path = "../../../prole-k3s.kubeconfig" +namespace = "knoe-db" +kubeconfig_path = "../../../knoe-k3s.kubeconfig" diff --git a/deploy/opentofu/k3s/variables.tf b/deploy/opentofu/k3s/variables.tf index 748f077..9a5e756 100644 --- a/deploy/opentofu/k3s/variables.tf +++ b/deploy/opentofu/k3s/variables.tf @@ -1,6 +1,6 @@ variable "k3s_server_url" { type = string - description = "K3s API server URL (e.g., https://pi.prole.org:6443)" + description = "K3s API server URL (e.g., https://pi.knoe.org:6443)" } variable "k3s_token" { @@ -18,6 +18,6 @@ variable "kubeconfig_path" { variable "namespace" { type = string - description = "Target namespace for Prole resources" + description = "Target namespace for Knoe resources" default = "default" } diff --git a/deploy/opentofu/prod/README.md b/deploy/opentofu/prod/README.md index 8690283..3a3ba0b 100644 --- a/deploy/opentofu/prod/README.md +++ b/deploy/opentofu/prod/README.md @@ -1,6 +1,6 @@ # OpenTofu Production Pipeline -This pipeline deploys Prole into a production cluster (AWS EKS / GCloud GKE). +This pipeline deploys Knoe into a production cluster (AWS EKS / GCloud GKE). ## Usage 1. Copy manifests from the k3s pipeline into `manifests/`. diff --git a/deploy/opentofu/prod/variables.tf b/deploy/opentofu/prod/variables.tf index da33a90..a2f1d12 100644 --- a/deploy/opentofu/prod/variables.tf +++ b/deploy/opentofu/prod/variables.tf @@ -17,6 +17,6 @@ variable "cluster_ca_cert" { variable "namespace" { type = string - description = "Target namespace for Prole resources" + description = "Target namespace for Knoe resources" default = "default" } diff --git a/docs/DOCKER-BUILD-FIX.md b/docs/DOCKER-BUILD-FIX.md index 43ab79f..ee2af5c 100644 --- a/docs/DOCKER-BUILD-FIX.md +++ b/docs/DOCKER-BUILD-FIX.md @@ -2,7 +2,7 @@ ## Problem -When the Prole Installer is packaged with PyInstaller and run as a standalone binary, Docker builds fail with the error: +When the Knoe Installer is packaged with PyInstaller and run as a standalone binary, Docker builds fail with the error: ``` Building knoe-db:17.7-037 in /var/folders/rt/pywlnmxj3dn7t5552vwdcpp80000gn/T/_MEIGozuj4/knoe-db... @@ -38,11 +38,11 @@ def worker(): def worker(): tag = self.get_knoe_db_version() - # Use $PROLE_HOME/build for Docker build context - prole_home = resolve_prole_home() + # Use $KNOE_HOME/build for Docker build context + knoe_home = resolve_knoe_home() # Use a mode-scoped build dir to avoid cross-mode interference (k3d vs k3s) mode_key = _deployment_mode_from_env(env_key) or "default" - build_dir = prole_home / "build" / mode_key / "knoe-db" + build_dir = knoe_home / "build" / mode_key / "knoe-db" build_dir.mkdir(parents=True, exist_ok=True) # Copy DB build context to writable location @@ -66,7 +66,7 @@ def worker(): The installer now creates and uses: ``` -$HOME/.prole/ +$HOME/.knoe/ └── build/ └── k3d/ # or k3s, k8s └── knoe-db/ # Docker build context @@ -74,12 +74,12 @@ $HOME/.prole/ ├── conf/ ├── scripts/ ├── ... - └── .prole_build_context_ready # marker to preserve generated Dockerfile + └── .knoe_build_context_ready # marker to preserve generated Dockerfile Version metadata is also mode-scoped: ``` -$HOME/.prole/ +$HOME/.knoe/ └── modes/ └── k3d/ # or k3s, k8s ├── conf/postgresql/.version @@ -89,7 +89,7 @@ $HOME/.prole/ ## Why This Works -1. **Writable Location:** `$HOME/.prole/` is user-writable +1. **Writable Location:** `$HOME/.knoe/` is user-writable 2. **Persistent:** Files remain between runs (can be cached) 3. **Clean State:** Each build starts fresh (old dir removed) 4. **Docker Compatible:** Standard directory Docker can access @@ -99,7 +99,7 @@ $HOME/.prole/ The `knoe-db` directory is: - **Included in spec:** `('knoe-db', 'knoe-db')` - **Extracted by PyInstaller:** To `_MEIPASS/knoe-db/` -- **Copied to writable location:** `$HOME/.prole/build//knoe-db/` +- **Copied to writable location:** `$HOME/.knoe/build//knoe-db/` - **Used for build:** Docker builds from writable copy ## Performance @@ -125,16 +125,16 @@ python3 install.py --gui ### Test from Package ```bash make package -./dist/Prole\ Installer.app/Contents/MacOS/prole-installer --gui +./dist/Knoe\ Installer.app/Contents/MacOS/knoe-installer --gui # Navigate to "Build Container" screen # Click "Build Database Image" -# Should create ~/.prole/build//knoe-db and succeed +# Should create ~/.knoe/build//knoe-db and succeed ``` ### Verify Directory Creation ```bash # After build starts -ls -la ~/.prole/build//knoe-db/ +ls -la ~/.knoe/build//knoe-db/ # Should show Dockerfile and other files ``` @@ -143,7 +143,7 @@ ls -la ~/.prole/build//knoe-db/ The build directory persists after the installer exits. To clean up: ```bash -rm -rf ~/.prole/build +rm -rf ~/.knoe/build ``` Or include in the installer: @@ -151,7 +151,7 @@ Or include in the installer: ```python def cleanup_build_dirs(): """Clean up temporary build directories.""" - build_dir = Path.home() / ".prole" / "build" + build_dir = Path.home() / ".knoe" / "build" if build_dir.exists(): shutil.rmtree(build_dir) ``` @@ -167,7 +167,7 @@ If Docker build still hangs, check: 2. **Docker context accessible:** ```bash - ls -la ~/.prole/build//knoe-db/Dockerfile + ls -la ~/.knoe/build//knoe-db/Dockerfile ``` 3. **Disk space:** @@ -186,7 +186,7 @@ If Docker build still hangs, check: ### 1. Use /tmp with Unique Names ```python import tempfile -build_dir = Path(tempfile.mkdtemp(prefix="prole-build-")) +build_dir = Path(tempfile.mkdtemp(prefix="knoe-build-")) ``` **Pros:** Automatic cleanup **Cons:** Lost between runs, no caching @@ -205,7 +205,7 @@ cwd = PROJECT_ROOT / "knoe-db" **Pros:** Works from source **Cons:** ✗ Fails from package (_MEIPASS is read-only) -### 4. **Chosen: Copy to ~/.prole/build** ✓ +### 4. **Chosen: Copy to ~/.knoe/build** ✓ **Pros:** Works from both source and package, writable, persistent **Cons:** Requires disk space, manual cleanup @@ -249,7 +249,7 @@ cwd = PROJECT_ROOT / "knoe-db" ## Summary The Docker build now works correctly from both source and packaged binary by: -1. Creating `~/.prole/build//knoe-db/` directory +1. Creating `~/.knoe/build//knoe-db/` directory 2. Copying build context from embedded resources 3. Running `docker build` in the writable directory 4. Avoiding PyInstaller's read-only temporary extraction directory diff --git a/docs/EMBEDDED-RESOURCES.md b/docs/EMBEDDED-RESOURCES.md index 1a579a3..5934708 100644 --- a/docs/EMBEDDED-RESOURCES.md +++ b/docs/EMBEDDED-RESOURCES.md @@ -1,17 +1,17 @@ -# Embedded Resources in Prole Installer +# Embedded Resources in Knoe Installer ## Overview -The Prole Installer package includes several embedded resources that must be accessible both when running from source and when packaged as a standalone binary. +The Knoe Installer package includes several embedded resources that must be accessible both when running from source and when packaged as a standalone binary. ## Embedded Resources ### 1. Images (img/) -- **proleIcon.png** (1.5 MB) - Application icon -- **proleLogo.png** (2.2 MB) - Main logo -- **proleLogoSepia.png** (2.7 MB) - Sepia background for GUI -- **proleLogoBlueprint.png** (3.1 MB) - Blueprint variant -- **proleIconblueprint.png** (1.6 MB) - Blueprint icon variant +- **knoeIcon.png** (1.5 MB) - Application icon +- **knoeLogo.png** (2.2 MB) - Main logo +- **knoeLogoSepia.png** (2.7 MB) - Sepia background for GUI +- **knoeLogoBlueprint.png** (3.1 MB) - Blueprint variant +- **knoeIconblueprint.png** (1.6 MB) - Blueprint icon variant ### 2. Binary Executables - **scan/network-agent** (6.8 MB) - Network scanner @@ -20,7 +20,7 @@ The Prole Installer package includes several embedded resources that must be acc - Detects Kerberos, Active Directory, etc. ### 3. Application Bundles -- **prole-app/dist/Prole Tools.app** (~12 MB) - Pre-built Prole Tools +- **knoe-app/dist/Knoe Tools.app** (~12 MB) - Pre-built Knoe Tools - Complete macOS .app bundle - Used by installer creation screen - Can be copied to DMG or USB installer @@ -47,7 +47,7 @@ def get_resource_path(relative_path): **Image Loading:** ```python -bg_path = get_resource_path('img/proleLogoSepia.png') +bg_path = get_resource_path('img/knoeLogoSepia.png') if bg_path.exists(): image = Image.open(str(bg_path)) ``` @@ -61,7 +61,7 @@ if scan_binary.exists(): **App Bundle Access:** ```python -app_src = get_resource_path('prole-app/dist/Prole Tools.app') +app_src = get_resource_path('knoe-app/dist/Knoe Tools.app') if app_src.exists(): # Copy to destination shutil.copytree(app_src, dest) @@ -79,7 +79,7 @@ datas = [ ('etc', 'etc'), ('img', 'img'), ('docs', 'docs'), - ('prole-app/dist/Prole Tools.app', 'prole-app/dist/Prole Tools.app'), + ('knoe-app/dist/Knoe Tools.app', 'knoe-app/dist/Knoe Tools.app'), ] ``` @@ -99,7 +99,7 @@ Total embedded resources: ~30-35 MB Breakdown: - Images: ~11 MB - network-agent: 6.8 MB -- Prole Tools.app: ~12 MB +- Knoe Tools.app: ~12 MB - Other resources: ~5-10 MB Final installer bundle: ~50-100 MB (includes Python runtime) @@ -122,12 +122,12 @@ Output is captured in real-time and displayed in the scan results text widget. ### Installer Creation Screen -The installer creation screen copies Prole Tools.app to DMG: +The installer creation screen copies Knoe Tools.app to DMG: ```python -app_src = get_resource_path('prole-app/dist/Prole Tools.app') +app_src = get_resource_path('knoe-app/dist/Knoe Tools.app') if app_src.exists(): - shutil.copytree(app_src, staging / 'Prole Tools.app') + shutil.copytree(app_src, staging / 'Knoe Tools.app') ``` ## Testing @@ -141,7 +141,7 @@ python3 test_embedded_resources.sh This tests: - ✓ All image files exist - ✓ network-agent binary exists and is executable -- ✓ Prole Tools.app bundle exists +- ✓ Knoe Tools.app bundle exists - ✓ Spec file includes all resources - ✓ Resource sizes @@ -151,12 +151,12 @@ After building: ```bash # Check extracted resources -./dist/prole-installer --help +./dist/knoe-installer --help # In another terminal, while installer is running: ls -la /tmp/_MEI*/scan/ ls -la /tmp/_MEI*/img/ -ls -la "/tmp/_MEI*/prole-app/dist/Prole Tools.app" +ls -la "/tmp/_MEI*/knoe-app/dist/Knoe Tools.app" ``` ## Troubleshooting @@ -190,13 +190,13 @@ binaries = [ ### App Bundle Not Found -**Error:** `Prole Tools.app not found` +**Error:** `Knoe Tools.app not found` **Cause:** App not built before packaging installer **Solution:** -1. Build Prole Tools.app first (in prole-app directory) -2. Verify it exists: `ls "prole-app/dist/Prole Tools.app"` +1. Build Knoe Tools.app first (in knoe-app directory) +2. Verify it exists: `ls "knoe-app/dist/Knoe Tools.app"` 3. Then build installer: `make package` ### Large Bundle Size @@ -206,8 +206,8 @@ binaries = [ **Optimization Options:** 1. **Compress app bundle:** ```bash - cd prole-app/dist - zip -r "Prole Tools.zip" "Prole Tools.app" + cd knoe-app/dist + zip -r "Knoe Tools.zip" "Knoe Tools.app" # Include zip instead of .app ``` @@ -264,7 +264,7 @@ Users can verify embedded binaries: codesign --verify --verbose /tmp/_MEI*/scan/network-agent # Check installer bundle signature -codesign --verify --verbose "dist/Prole Installer.app" +codesign --verify --verbose "dist/Knoe Installer.app" ``` ## Future Enhancements @@ -274,12 +274,12 @@ codesign --verify --verbose "dist/Prole Installer.app" For large resources, consider lazy loading: ```python -def get_prole_tools_app(): - """Download or extract Prole Tools.app only when needed.""" - app_path = get_resource_path('prole-app/dist/Prole Tools.app') +def get_knoe_tools_app(): + """Download or extract Knoe Tools.app only when needed.""" + app_path = get_resource_path('knoe-app/dist/Knoe Tools.app') if not app_path.exists(): # Download from server - download_prole_tools(app_path) + download_knoe_tools(app_path) return app_path ``` @@ -290,15 +290,15 @@ Compress large resources: ```python # In spec file datas = [ - ('prole-app/dist/Prole Tools.zip', 'prole-app/dist'), # Compressed + ('knoe-app/dist/Knoe Tools.zip', 'knoe-app/dist'), # Compressed ] # In code -def extract_prole_tools(): - zip_path = get_resource_path('prole-app/dist/Prole Tools.zip') +def extract_knoe_tools(): + zip_path = get_resource_path('knoe-app/dist/Knoe Tools.zip') extract_dir = Path(tempfile.mkdtemp()) shutil.unpack_archive(zip_path, extract_dir) - return extract_dir / 'Prole Tools.app' + return extract_dir / 'Knoe Tools.app' ``` ## References diff --git a/docs/IMAGE-RESOURCES.md b/docs/IMAGE-RESOURCES.md index 33f122f..10451cd 100644 --- a/docs/IMAGE-RESOURCES.md +++ b/docs/IMAGE-RESOURCES.md @@ -2,21 +2,21 @@ ## Overview -The Prole Database Installer includes multiple image assets that need to work both when running from source and when packaged as a standalone binary. This document explains how image resources are managed. +The Knoe Database Installer includes multiple image assets that need to work both when running from source and when packaged as a standalone binary. This document explains how image resources are managed. ## Image Assets The following images are included in the installer: ### Primary Assets -- **proleIcon.png** (1,494,782 bytes) - Application icon -- **proleLogo.png** (2,190,703 bytes) - Main Prole logo -- **proleLogoSepia.png** (2,657,956 bytes) - Sepia-toned background logo -- **proleLogoBlueprint.png** (3,107,147 bytes) - Blueprint style logo -- **proleIconblueprint.png** (1,570,109 bytes) - Blueprint style icon +- **knoeIcon.png** (1,494,782 bytes) - Application icon +- **knoeLogo.png** (2,190,703 bytes) - Main Knoe logo +- **knoeLogoSepia.png** (2,657,956 bytes) - Sepia-toned background logo +- **knoeLogoBlueprint.png** (3,107,147 bytes) - Blueprint style logo +- **knoeIconblueprint.png** (1,570,109 bytes) - Blueprint style icon ### Supplementary Assets -- **prole-type.gif** (599 bytes) - Small typing animation +- **knoe-type.gif** (599 bytes) - Small typing animation ## Resource Path Resolution @@ -49,10 +49,10 @@ All image loading code uses this function: ```python # Instead of: -bg_path = Path('img/proleLogoSepia.png') +bg_path = Path('img/knoeLogoSepia.png') # Use: -bg_path = get_resource_path('img/proleLogoSepia.png') +bg_path = get_resource_path('img/knoeLogoSepia.png') ``` ## Implementation Details @@ -63,23 +63,23 @@ The following locations in `install.py` were updated to use `get_resource_path() 1. **Background logo loading** (line ~191) ```python - bg_path = get_resource_path('img/proleLogoSepia.png') + bg_path = get_resource_path('img/knoeLogoSepia.png') ``` 2. **Application icon candidates** (line ~406) ```python img_candidates = [ - get_resource_path('img/proleIcon.png'), - get_resource_path('img/prole-type.png'), - get_resource_path('img/prole-type.gif'), - get_resource_path('img/Prole.png'), - get_resource_path('img/proleLogoSepia.png'), + get_resource_path('img/knoeIcon.png'), + get_resource_path('img/knoe-type.png'), + get_resource_path('img/knoe-type.gif'), + get_resource_path('img/Knoe.png'), + get_resource_path('img/knoeLogoSepia.png'), ] ``` 3. **DMG background image** (line ~3820) ```python - bg_img = get_resource_path('img/proleLogoSepia.png') + bg_img = get_resource_path('img/knoeLogoSepia.png') ``` ### PyInstaller Configuration @@ -139,7 +139,7 @@ python3 install.py --gui From built binary: ```bash make package -./dist/Prole\ Installer.app/Contents/MacOS/prole-installer --gui +./dist/Knoe\ Installer.app/Contents/MacOS/knoe-installer --gui # Check that logo appears in background ``` @@ -148,23 +148,23 @@ make package ### PNG (Source) - Format: PNG with transparency - Resolution: 1024x1024 recommended -- Location: `img/proleIcon.png` +- Location: `img/knoeIcon.png` ### ICNS (macOS Bundle) - Generated by build system from PNG - Contains multiple resolutions (16x16 through 1024x1024) -- Location: `build/prole.icns` (intermediate), embedded in `.app` bundle -- Generated by: `make build/prole.icns` +- Location: `build/knoe.icns` (intermediate), embedded in `.app` bundle +- Generated by: `make build/knoe.icns` The build system automatically converts PNG to ICNS using macOS tools: ```bash -sips -z 512 512 img/proleIcon.png --out build/icon.iconset/icon_512x512.png -iconutil -c icns build/icon.iconset -o build/prole.icns +sips -z 512 512 img/knoeIcon.png --out build/icon.iconset/icon_512x512.png +iconutil -c icns build/icon.iconset -o build/knoe.icns ``` ## Background Image Usage -The GUI installer uses `proleLogoSepia.png` as a subtle background: +The GUI installer uses `knoeLogoSepia.png` as a subtle background: 1. **Loading**: Image loaded via PIL (Pillow) 2. **Processing**: @@ -178,7 +178,7 @@ The GUI installer uses `proleLogoSepia.png` as a subtle background: Code snippet: ```python -bg_path = get_resource_path('img/proleLogoSepia.png') +bg_path = get_resource_path('img/knoeLogoSepia.png') if bg_path.exists(): original = Image.open(str(bg_path)).convert('RGBA') white_bg = Image.new('RGBA', original.size, (255, 255, 255, 255)) @@ -244,7 +244,7 @@ PyInstaller extracts bundled resources to a temporary directory on each launch: ### Memory Usage Images are loaded into memory when displayed: -- **proleLogoSepia.png**: ~2.6 MB on disk, ~10 MB in memory (RGBA) +- **knoeLogoSepia.png**: ~2.6 MB on disk, ~10 MB in memory (RGBA) - **Scaled versions**: Additional memory for display size ### Optimization diff --git a/docs/MERLIN-MARIADB-EXTERNAL-TEMP.md b/docs/MERLIN-MARIADB-EXTERNAL-TEMP.md index 03c6ef5..19b2cba 100644 --- a/docs/MERLIN-MARIADB-EXTERNAL-TEMP.md +++ b/docs/MERLIN-MARIADB-EXTERNAL-TEMP.md @@ -1,6 +1,6 @@ # Merlin: temporary MariaDB storage on borrowed USB (`/external`) -This is a temporary, host-specific setup for `merlin.prole.org` to move MariaDB storage off the current path and onto a borrowed USB disk. +This is a temporary, host-specific setup for `merlin.knoe.org` to move MariaDB storage off the current path and onto a borrowed USB disk. ## What changed @@ -8,7 +8,7 @@ This is a temporary, host-specific setup for `merlin.prole.org` to move MariaDB - MariaDB data is migrated from `/srv/mariadb/mariadb/` to `/external/mariadb/`. - After a successful copy, the original datadir is moved aside to `/srv/mariadb/mariadb.pre-external` (kept for rollback). - `/srv/mariadb/mariadb` is replaced with a **bind mount** of `/external/mariadb` (so MariaDB can keep using the same `datadir` path). -- A marker file is written to avoid repeating the migration destructively: `/external/mariadb/.prole-mariadb-external-migrated`. +- A marker file is written to avoid repeating the migration destructively: `/external/mariadb/.knoe-mariadb-external-migrated`. ## Why this is temporary @@ -84,5 +84,5 @@ sudo systemctl start mariadb 5) Remove/disable the Ansible external-storage configuration: -- In `infrastructure/inventory/host_vars/merlin.prole.org.yml`, set `mariadb_external_enabled: false` (or remove the `mariadb_external_*` vars). +- In `infrastructure/inventory/host_vars/merlin.knoe.org.yml`, set `mariadb_external_enabled: false` (or remove the `mariadb_external_*` vars). - Re-run the MariaDB provisioning playbook so it removes the persistent mount entries it previously created. diff --git a/docs/PROLE-CFG-SECRETS.md b/docs/PROLE-CFG-SECRETS.md index d6534d2..1429773 100644 --- a/docs/PROLE-CFG-SECRETS.md +++ b/docs/PROLE-CFG-SECRETS.md @@ -1,44 +1,44 @@ -# prole.cfg Secrets +# knoe.cfg Secrets -This document describes how secrets are handled in `prole.cfg` and where they are stored in OpenBao. +This document describes how secrets are handled in `knoe.cfg` and where they are stored in OpenBao. ## Temporary encrypted values -During installation, secrets are written to `prole.cfg` as temporary encrypted values so an interrupted run can resume: +During installation, secrets are written to `knoe.cfg` as temporary encrypted values so an interrupted run can resume: -- Format: `${PROLE_SECRET:v1::}` +- Format: `${KNOE_SECRET:v1::}` - Encryption: AES‑256‑GCM - Key storage: - - macOS: login Keychain (service `prole-installer`) - - Other platforms: `~/.prole/secrets/installer.key` (0600) + - macOS: login Keychain (service `knoe-installer`) + - Other platforms: `~/.knoe/secrets/installer.key` (0600) These encrypted values are removed at Post‑Install by running `etc/build-a-bao.sh`. ## OpenBao placeholders -After Post‑Install, secrets in `prole.cfg` are replaced with OpenBao placeholders that point to a namespace‑scoped KV path: +After Post‑Install, secrets in `knoe.cfg` are replaced with OpenBao placeholders that point to a namespace‑scoped KV path: -- Format: `${OPENBAO:kv/prole//#}` +- Format: `${OPENBAO:kv/knoe//#}` -The namespace comes from `NAMESPACE` in `prole.cfg` and makes the file 1:1 with a single `knoe-db` deployment. +The namespace comes from `NAMESPACE` in `knoe.cfg` and makes the file 1:1 with a single `knoe-db` deployment. -## Secrets recorded in prole.cfg +## Secrets recorded in knoe.cfg The following keys are treated as secrets and stored in OpenBao: -| prole.cfg key | OpenBao KV path | +| knoe.cfg key | OpenBao KV path | | --- | --- | -| `Inputs.init_password.db_password` | `kv/prole//db#password` | -| `Inputs.init_password.db_password_confirm` | `kv/prole//db#password` | -| `Global.DB_PASSWORD` | `kv/prole//db#password` | -| `Inputs.kerberos_config.password` | `kv/prole//kerberos#password` | -| `Kerberos Authentication.PASSWORD` | `kv/prole//kerberos#password` | -| `Monitoring.GRAFANA_ADMIN_PASSWORD` | `kv/prole//monitoring#grafana_admin_password` | +| `Inputs.init_password.db_password` | `kv/knoe//db#password` | +| `Inputs.init_password.db_password_confirm` | `kv/knoe//db#password` | +| `Global.DB_PASSWORD` | `kv/knoe//db#password` | +| `Inputs.kerberos_config.password` | `kv/knoe//kerberos#password` | +| `Kerberos Authentication.PASSWORD` | `kv/knoe//kerberos#password` | +| `Monitoring.GRAFANA_ADMIN_PASSWORD` | `kv/knoe//monitoring#grafana_admin_password` | ## Post‑Install step Run the Build‑A‑Bao step on the Post‑Install screen (or `etc/build-a-bao.sh`) to: -1) Decrypt temporary secrets from `prole.cfg` +1) Decrypt temporary secrets from `knoe.cfg` 2) Write them to OpenBao under the namespace path -3) Replace `prole.cfg` secrets with OpenBao placeholders +3) Replace `knoe.cfg` secrets with OpenBao placeholders diff --git a/docs/PROLE-HOME-DIRECTORY.md b/docs/PROLE-HOME-DIRECTORY.md index 2ca05db..6ce66ec 100644 --- a/docs/PROLE-HOME-DIRECTORY.md +++ b/docs/PROLE-HOME-DIRECTORY.md @@ -1,13 +1,13 @@ -# Prole Home Directory Structure +# Knoe Home Directory Structure ## Overview -The Prole Installer uses `$PROLE_HOME/` (defaulting to `$HOME/.prole/`) for writable storage when running from a packaged binary. This is necessary because PyInstaller extracts resources to a read-only temporary directory. +The Knoe Installer uses `$KNOE_HOME/` (defaulting to `$HOME/.knoe/`) for writable storage when running from a packaged binary. This is necessary because PyInstaller extracts resources to a read-only temporary directory. ## Directory Structure ``` -$PROLE_HOME/ +$KNOE_HOME/ ├── build/ # Docker build contexts │ └── knoe-db/ # PostgreSQL Docker build │ ├── Dockerfile @@ -27,8 +27,8 @@ $PROLE_HOME/ **Usage:** ```python -prole_home = resolve_prole_home() -build_dir = prole_home / "build" / "knoe-db" +knoe_home = resolve_knoe_home() +build_dir = knoe_home / "build" / "knoe-db" build_dir.mkdir(parents=True, exist_ok=True) # Copy build context from embedded resources @@ -50,12 +50,12 @@ subprocess.Popen(['docker', 'build', '-t', 'knoe-db:TAG', '.'], cwd=build_dir) **Purpose:** Writable working directory for network scan operations -**Why:** The `prole-agent` binary may need to write output files, cache data, or store temporary results. Running from a read-only directory causes failures. +**Why:** The `knoe-agent` binary may need to write output files, cache data, or store temporary results. Running from a read-only directory causes failures. **Usage:** ```python -prole_home = resolve_prole_home() -scan_dir = prole_home / "scan" +knoe_home = resolve_knoe_home() +scan_dir = knoe_home / "scan" scan_dir.mkdir(parents=True, exist_ok=True) # Run scan with writable cwd @@ -65,7 +65,7 @@ subprocess.Popen([str(scan_binary)], cwd=str(scan_dir)) **Contents:** - Network scan results (temporary) - Ollama API interaction cache -- Any intermediate files created by prole-agent +- Any intermediate files created by knoe-agent **Size:** Varies, typically < 1 MB @@ -77,18 +77,18 @@ All directories are created automatically when needed: ```python # Build directory -(resolve_prole_home() / "build" / "knoe-db").mkdir(parents=True, exist_ok=True) +(resolve_knoe_home() / "build" / "knoe-db").mkdir(parents=True, exist_ok=True) # Scan directory -(resolve_prole_home() / "scan").mkdir(parents=True, exist_ok=True) +(resolve_knoe_home() / "scan").mkdir(parents=True, exist_ok=True) ``` ### Manual Cleanup -To remove all Prole working directories: +To remove all Knoe working directories: ```bash -rm -rf ~/.prole +rm -rf ~/.knoe ``` Or from Python: @@ -97,9 +97,9 @@ Or from Python: import shutil from pathlib import Path -prole_home = resolve_prole_home() -if prole_home.exists(): - shutil.rmtree(prole_home) +knoe_home = resolve_knoe_home() +if knoe_home.exists(): + shutil.rmtree(knoe_home) ``` ### Automatic Cleanup (Future) @@ -107,13 +107,13 @@ if prole_home.exists(): Consider adding cleanup options to the installer: ```python -def cleanup_prole_home(): - """Clean up .prole working directories.""" - prole_home = Path.home() / ".prole" - if prole_home.exists(): +def cleanup_knoe_home(): + """Clean up .knoe working directories.""" + knoe_home = Path.home() / ".knoe" + if knoe_home.exists(): # Keep or remove based on user preference if messagebox.askyesno("Cleanup", "Remove temporary files?"): - shutil.rmtree(prole_home) + shutil.rmtree(knoe_home) ``` ## Disk Space @@ -135,7 +135,7 @@ def cleanup_prole_home(): ### Permission Errors -**Error:** `Permission denied` creating `.prole` directory +**Error:** `Permission denied` creating `.knoe` directory **Cause:** Home directory not writable @@ -154,7 +154,7 @@ chmod u+w ~ **Solution:** ```bash df -h ~ -rm -rf ~/.prole # Free up space +rm -rf ~/.knoe # Free up space ``` ### Stale Build Context @@ -173,18 +173,18 @@ shutil.copytree(source_dir, build_dir) ### File Permissions -The `.prole` directory inherits user's home directory permissions: +The `.knoe` directory inherits user's home directory permissions: ```bash -ls -ld ~/.prole -# drwxr-xr-x user group ~/.prole +ls -ld ~/.knoe +# drwxr-xr-x user group ~/.knoe ``` Only the user should have write access. ### Sensitive Data -Avoid storing sensitive data in `.prole/`: +Avoid storing sensitive data in `.knoe/`: - ✓ Build contexts (public) - ✓ Scan results (network info, semi-sensitive) - ✗ Passwords, keys, credentials @@ -195,18 +195,18 @@ If distributing the installer, consider: 1. **Document cleanup:** ``` - To completely remove Prole: - 1. Delete the app: rm -rf /Applications/Prole\ Installer.app - 2. Clean up data: rm -rf ~/.prole + To completely remove Knoe: + 1. Delete the app: rm -rf /Applications/Knoe\ Installer.app + 2. Clean up data: rm -rf ~/.knoe ``` 2. **Provide uninstall script:** ```bash #!/bin/bash - # uninstall-prole.sh - rm -rf /Applications/Prole\ Installer.app - rm -rf ~/.prole - echo "Prole uninstalled" + # uninstall-knoe.sh + rm -rf /Applications/Knoe\ Installer.app + rm -rf ~/.knoe + echo "Knoe uninstalled" ``` ## Related Issues @@ -215,7 +215,7 @@ If distributing the installer, consider: **Problem:** Docker build hangs when running from packaged binary -**Solution:** Copy build context to `~/.prole/build/knoe-db/` +**Solution:** Copy build context to `~/.knoe/build/knoe-db/` **See:** [DOCKER-BUILD-FIX.md](DOCKER-BUILD-FIX.md) @@ -223,7 +223,7 @@ If distributing the installer, consider: **Problem:** Network scan fails to make API calls from packaged binary -**Solution:** Run scan with `cwd=~/.prole/scan` +**Solution:** Run scan with `cwd=~/.knoe/scan` **Reason:** Scan binary needs writable directory for output/cache @@ -234,16 +234,16 @@ If distributing the installer, consider: **Build directory creation:** `install.py`, `run_db_build()` method (line ~1791) ```python -prole_home = Path.home() / ".prole" -build_dir = prole_home / "build" / "knoe-db" +knoe_home = Path.home() / ".knoe" +build_dir = knoe_home / "build" / "knoe-db" build_dir.mkdir(parents=True, exist_ok=True) ``` **Scan directory creation:** `install.py`, network scan worker (line ~1102) ```python -prole_home = Path.home() / ".prole" -scan_dir = prole_home / "scan" +knoe_home = Path.home() / ".knoe" +scan_dir = knoe_home / "scan" scan_dir.mkdir(parents=True, exist_ok=True) ``` @@ -269,7 +269,7 @@ def get_resource_path(relative_path): Store network scan results between runs: ```python -scan_cache = Path.home() / ".prole" / "scan" / "cache.json" +scan_cache = Path.home() / ".knoe" / "scan" / "cache.json" if scan_cache.exists(): # Load previous scan results = json.loads(scan_cache.read_text()) @@ -284,7 +284,7 @@ else: Store built Docker images as tarballs: ```python -image_cache = Path.home() / ".prole" / "build" / "knoe-db-TAG.tar" +image_cache = Path.home() / ".knoe" / "build" / "knoe-db-TAG.tar" if not image_cache.exists(): # Build and save subprocess.run(['docker', 'build', '-t', 'knoe-db:TAG', '.']) @@ -299,7 +299,7 @@ else: Store user preferences: ```python -config_file = Path.home() / ".prole" / "config.json" +config_file = Path.home() / ".knoe" / "config.json" config = { 'cluster_env': 'development', 'kerberos_enabled': False, @@ -310,7 +310,7 @@ config_file.write_text(json.dumps(config, indent=2)) ## Summary -The `~/.prole/` directory provides: +The `~/.knoe/` directory provides: - ✓ Writable storage for packaged binary operations - ✓ Separate from extracted read-only resources - ✓ User-specific, secure location diff --git a/docs/RELEASE-NOTES.md b/docs/RELEASE-NOTES.md index ae98c56..331580a 100644 --- a/docs/RELEASE-NOTES.md +++ b/docs/RELEASE-NOTES.md @@ -1,4 +1,4 @@ -# Prole Database Installer - Release Notes +# Knoe Database Installer - Release Notes ## New Features @@ -60,8 +60,8 @@ make package ``` **Output:** -- `dist/Prole Installer.app` - Complete application bundle -- Icon: Prole logo embedded +- `dist/Knoe Installer.app` - Complete application bundle +- Icon: Knoe logo embedded - Size: ~50-100 MB (includes Python runtime) ### 4. Comprehensive Build System @@ -86,16 +86,16 @@ New Makefile with complete build automation: ### Modular Design -All functionality uses shared business logic (`ProleController`): +All functionality uses shared business logic (`KnoeController`): ``` install.py (entry point) ├── GUI mode (Tk/Canvas) - │ └── ProleInstaller class + │ └── KnoeInstaller class └── Ncurses mode (curses) - └── ProleNcursesInstaller class + └── KnoeNcursesInstaller class -Both use: ProleController (shared logic) +Both use: KnoeController (shared logic) ``` ### New Modules @@ -108,7 +108,7 @@ Both use: ProleController (shared logic) - `Checkbox` - Checkbox widget **installer/ncurses_installer.py** - Main installer: -- `ProleNcursesInstaller` - Screen management +- `KnoeNcursesInstaller` - Screen management - All screen renderers - Navigation logic @@ -143,15 +143,15 @@ The built `.app` can be distributed as: **DMG (recommended):** ```bash -hdiutil create -volname "Prole Installer" \ - -srcfolder "dist/Prole Installer.app" \ - -ov -format UDZO prole-installer.dmg +hdiutil create -volname "Knoe Installer" \ + -srcfolder "dist/Knoe Installer.app" \ + -ov -format UDZO knoe-installer.dmg ``` **ZIP:** ```bash cd dist -zip -r ../prole-installer.zip "Prole Installer.app" +zip -r ../knoe-installer.zip "Knoe Installer.app" ``` ### Installation @@ -202,20 +202,20 @@ Complete documentation added: **App Bundle Structure:** ``` -Prole Installer.app/ +Knoe Installer.app/ ├── Contents/ │ ├── Info.plist │ ├── MacOS/ -│ │ └── prole-installer (executable) +│ │ └── knoe-installer (executable) │ └── Resources/ -│ └── prole.icns (icon) +│ └── knoe.icns (icon) ``` ### Icon Processing Automatic conversion from PNG to ICNS: -- Source: `img/proleIcon.png` (1494782 bytes) -- Output: `build/prole.icns` (multiple resolutions) +- Source: `img/knoeIcon.png` (1494782 bytes) +- Output: `build/knoe.icns` (multiple resolutions) - Resolutions: 16x16 through 1024x1024 (@1x and @2x) ## Upgrade Path @@ -230,7 +230,7 @@ python3 install.py # New ways python3 install.py --no-gui # Ncurses -./dist/Prole\ Installer.app # Built binary +./dist/Knoe\ Installer.app # Built binary ``` ## Known Limitations @@ -304,7 +304,7 @@ All components tested: ## Contributors -Implementation by Claude Code assistant for Prole Database project. +Implementation by Claude Code assistant for Knoe Database project. ## References diff --git a/docs/ansible-installer-boundary.md b/docs/ansible-installer-boundary.md index edb0a53..3dece00 100644 --- a/docs/ansible-installer-boundary.md +++ b/docs/ansible-installer-boundary.md @@ -6,10 +6,10 @@ - The installer must not assume: - Ansible vault access - inventory parsing as a required part of the workflow - - any specific private repo checkout layout (e.g. a sibling `prole/infrastructure`) + - any specific private repo checkout layout (e.g. a sibling `knoe/infrastructure`) - Ansible playbooks/roles must not assume `install.py` is discovering secrets or passing hidden, repo-local state. -This is designed so private inventory/secret material can live entirely in `prole/infrastructure` (or elsewhere) without this repo requiring it. +This is designed so private inventory/secret material can live entirely in `knoe/infrastructure` (or elsewhere) without this repo requiring it. #### Explicit inputs (recommended) diff --git a/docs/build-system.md b/docs/build-system.md index b5576f9..6a4dd53 100644 --- a/docs/build-system.md +++ b/docs/build-system.md @@ -1,14 +1,14 @@ -# Prole Installer Build System +# Knoe Installer Build System ## Overview -The Prole Database Installer includes a comprehensive build system that creates self-contained, universal binaries for distribution. The build system produces a macOS application bundle (.app) that: +The Knoe Database Installer includes a comprehensive build system that creates self-contained, universal binaries for distribution. The build system produces a macOS application bundle (.app) that: - **Double-click launch**: Opens the GUI installer when launched from Finder - **Command-line capable**: Can be run from terminal with full argument support - **Auto-detects display**: Automatically switches to ncurses mode when no GUI is available - **Self-contained**: Includes all dependencies and resources -- **Icon embedded**: Uses the Prole icon for the application bundle +- **Icon embedded**: Uses the Knoe icon for the application bundle ## Quick Start @@ -44,8 +44,8 @@ Build the static binary using PyInstaller: 4. Creates macOS .app bundle **Output:** -- `dist/prole-installer` - Standalone executable -- `dist/Prole Installer.app` - macOS application bundle +- `dist/knoe-installer` - Standalone executable +- `dist/Knoe Installer.app` - macOS application bundle ### `make package` Alias for `make build` - creates the complete package. @@ -73,7 +73,7 @@ Generate only the PyInstaller spec file (intermediate step). ### 1. Icon Conversion -The build system converts `img/proleIcon.png` to macOS `.icns` format with multiple resolutions: +The build system converts `img/knoeIcon.png` to macOS `.icns` format with multiple resolutions: - 16x16, 32x32 (standard and @2x) - 128x128, 256x256 (standard and @2x) @@ -81,7 +81,7 @@ The build system converts `img/proleIcon.png` to macOS `.icns` format with multi **Tool:** macOS `sips` and `iconutil` commands -**Output:** `build/prole.icns` +**Output:** `build/knoe.icns` ### 2. Spec File Generation @@ -91,10 +91,10 @@ A Python script (`scripts/generate_spec.py`) creates the PyInstaller specificati - `installer/` - Installer Python modules - `conf/` - Configuration files - `etc/` - Scripts and utilities -- `img/` - Images and icons (including proleIcon.png, proleLogoSepia.png, proleLogo.png) +- `img/` - Images and icons (including knoeIcon.png, knoeLogoSepia.png, knoeLogo.png) - `docs/` - Documentation - `knoe-db/` - Docker build context for PostgreSQL database -- `prole-app/dist/Prole Tools.app` - Pre-built Prole Tools application bundle (entire .app) +- `knoe-app/dist/Knoe Tools.app` - Pre-built Knoe Tools application bundle (entire .app) **Included Binaries:** - `scan/network-agent` - Network scanner binary (universal: x86_64 + arm64, 6.8 MB) @@ -108,7 +108,7 @@ This ensures all images and resources are found correctly in both development an **Docker Build Context:** Docker builds require a writable directory. When running from a PyInstaller bundle, the extracted resources are in a read-only temporary directory. To solve this: -- Docker build context is copied to `$HOME/.prole/build/knoe-db/` +- Docker build context is copied to `$HOME/.knoe/build/knoe-db/` - This provides a writable location for Docker to operate - See [DOCKER-BUILD-FIX.md](DOCKER-BUILD-FIX.md) for details @@ -138,34 +138,34 @@ PyInstaller processes the spec file to create: ### GUI Mode (Double-click) -Simply double-click `Prole Installer.app` in Finder to launch the graphical installer. +Simply double-click `Knoe Installer.app` in Finder to launch the graphical installer. ### Command-line Mode ```bash # Run with auto-detection (GUI if available, otherwise ncurses) -./dist/Prole\ Installer.app/Contents/MacOS/prole-installer +./dist/Knoe\ Installer.app/Contents/MacOS/knoe-installer # Force ncurses mode -./dist/Prole\ Installer.app/Contents/MacOS/prole-installer --no-gui +./dist/Knoe\ Installer.app/Contents/MacOS/knoe-installer --no-gui # Force GUI mode -./dist/Prole\ Installer.app/Contents/MacOS/prole-installer --gui +./dist/Knoe\ Installer.app/Contents/MacOS/knoe-installer --gui # Show help -./dist/Prole\ Installer.app/Contents/MacOS/prole-installer --help +./dist/Knoe\ Installer.app/Contents/MacOS/knoe-installer --help ``` ### Installation to /Applications ```bash -cp -r "dist/Prole Installer.app" /Applications/ +cp -r "dist/Knoe Installer.app" /Applications/ ``` After installation, the app is available: - In Finder under Applications - Via Spotlight search -- From command line as `/Applications/Prole\ Installer.app/Contents/MacOS/prole-installer` +- From command line as `/Applications/Knoe\ Installer.app/Contents/MacOS/knoe-installer` ## Display Auto-detection @@ -222,8 +222,8 @@ Install with: `xcode-select --install` **Solution:** ```bash make clean -make build/prole.icns -file build/prole.icns # Should say "Mac OS X icon" +make build/knoe.icns +file build/knoe.icns # Should say "Mac OS X icon" ``` ### Binary Won't Run on Other Machines @@ -255,7 +255,7 @@ file build/prole.icns # Should say "Mac OS X icon" ### Custom Icon -Replace `img/proleIcon.png` with your icon (PNG format, preferably 1024x1024). +Replace `img/knoeIcon.png` with your icon (PNG format, preferably 1024x1024). ### Additional Data Files @@ -276,7 +276,7 @@ For distribution outside development: ```makefile codesign --deep --force --verify --verbose \ --sign "Developer ID Application: Your Name" \ - "dist/Prole Installer.app" + "dist/Knoe Installer.app" ``` ### Notarization @@ -287,7 +287,7 @@ For Gatekeeper approval on macOS 10.15+: 2. Create a DMG or ZIP 3. Submit to Apple: ```bash -xcrun notarytool submit prole-installer.zip \ +xcrun notarytool submit knoe-installer.zip \ --apple-id your@email.com \ --password app-specific-password \ --team-id TEAMID @@ -298,17 +298,17 @@ xcrun notarytool submit prole-installer.zip \ ### DMG Creation ```bash -hdiutil create -volname "Prole Installer" \ - -srcfolder "dist/Prole Installer.app" \ +hdiutil create -volname "Knoe Installer" \ + -srcfolder "dist/Knoe Installer.app" \ -ov -format UDZO \ - prole-installer.dmg + knoe-installer.dmg ``` ### ZIP Archive ```bash cd dist -zip -r ../prole-installer.zip "Prole Installer.app" +zip -r ../knoe-installer.zip "Knoe Installer.app" ``` ## Performance Considerations @@ -338,8 +338,8 @@ jobs: - run: make package - uses: actions/upload-artifact@v2 with: - name: prole-installer - path: dist/Prole Installer.app + name: knoe-installer + path: dist/Knoe Installer.app ``` ## References diff --git a/docs/config-environments.md b/docs/config-environments.md index dde7e37..3c166ec 100644 --- a/docs/config-environments.md +++ b/docs/config-environments.md @@ -1,32 +1,32 @@ -### Prole configuration environments +### Knoe configuration environments -Prole treats `$PROLE_CONF` as an explicit set of deployment-specific configs. +Knoe treats `$KNOE_CONF` as an explicit set of deployment-specific configs. #### Directory layout -Under `$PROLE_CONF`: +Under `$KNOE_CONF`: ```text -$PROLE_CONF/k3d.cfg -> base config (k3d / dev) -$PROLE_CONF/k3s.cfg -> base config (k3s / service) -$PROLE_CONF/gke.cfg -> base config (k8s / prod) -$PROLE_CONF/test.cfg -> base config (test, optional) +$KNOE_CONF/k3d.cfg -> base config (k3d / dev) +$KNOE_CONF/k3s.cfg -> base config (k3s / service) +$KNOE_CONF/gke.cfg -> base config (k8s / prod) +$KNOE_CONF/test.cfg -> base config (test, optional) ``` Legacy layouts are still recognized for compatibility: ```text -$PROLE_CONF/prole.cfg -> legacy entrypoint -$PROLE_CONF//prole.cfg -> legacy env base config +$KNOE_CONF/knoe.cfg -> legacy entrypoint +$KNOE_CONF//knoe.cfg -> legacy env base config ``` #### Activation (selecting the active environment) -- The active environment is inferred from `CLUSTER_ENV`, `PROLE_MODE`, or `DEPLOYMENT_MODE`. -- Resolution prefers named root files (`k3d.cfg`, `k3s.cfg`, `gke.cfg`) and only falls back to legacy `prole.cfg` paths. +- The active environment is inferred from `CLUSTER_ENV`, `KNOE_MODE`, or `DEPLOYMENT_MODE`. +- Resolution prefers named root files (`k3d.cfg`, `k3s.cfg`, `gke.cfg`) and only falls back to legacy `knoe.cfg` paths. - Switching environments changes which named file is selected; it does not overwrite other environment configs. -If a legacy `prole.cfg` regular file is detected, migration preserves it as `prole.cfg.legacy.` and promotes content into the appropriate named file. +If a legacy `knoe.cfg` regular file is detected, migration preserves it as `knoe.cfg.legacy.` and promotes content into the appropriate named file. #### Override layering (deterministic merge) diff --git a/docs/definition.txt b/docs/definition.txt index a3995d3..c3dfed8 100644 --- a/docs/definition.txt +++ b/docs/definition.txt @@ -1,46 +1,46 @@ ->>> produce a dictionary definition for Prole +>>> produce a dictionary definition for Knoe # PROLE DICTIONARY DEFINITION -## **Prole** (noun) +## **Knoe** (noun) **Pronunciation:** /ˈproʊl/ -**Etymology:** From "proletariat" + "sheep" (sheep-like qualities of the working class) +**Etymology:** From "knoetariat" + "sheep" (sheep-like qualities of the working class) **Definitions:** 1. **Technical/Innovative Context**: A distributed computing node or worker process within a peer-to-peer network system, specifically designed to perform computational tasks in a distributed -conversational memory framework. The fundamental unit of processing in the Prole Database System. +conversational memory framework. The fundamental unit of processing in the Knoe Database System. -2. **Sociological Context**: A member of the working class or proletariat; a person engaged in manual or routine labor, often used in a derogatory or dismissive manner to describe those without +2. **Sociological Context**: A member of the working class or knoetariat; a person engaged in manual or routine labor, often used in a derogatory or dismissive manner to describe those without significant economic or social power. 3. **Historical Context**: A member of the lowest social class in ancient Rome, typically consisting of slaves and freed slaves, or more broadly, any person without political rights or privileges. -4. **Modern Usage**: In contemporary usage, particularly within the Prole Organization framework, refers to the distributed computational agents that process conversational data through the shp +4. **Modern Usage**: In contemporary usage, particularly within the Knoe Organization framework, refers to the distributed computational agents that process conversational data through the shp (sheep) and eshp (electric sheep) cycles. **Usage Notes:** -- In the Prole Database System, "shp" refers to the basic data structure and "eshp" refers to processed results -- The term "prole" serves as both a technical identifier and a conceptual metaphor for distributed, collective processing +- In the Knoe Database System, "shp" refers to the basic data structure and "eshp" refers to processed results +- The term "knoe" serves as both a technical identifier and a conceptual metaphor for distributed, collective processing - The word carries connotations of both humble origins and essential function in larger systems **Related Terms:** - Shp (sheep) - Eshp (electric sheep) -- Prole-DB (Prole Database) +- Knoe-DB (Knoe Database) - EshpHerder (electric sheep herder agent) -**Origin:** Coined by Prole Organization to represent the distributed computational agents that process conversational data, combining "proletariat" (working class) with "sheep" (the basic unit +**Origin:** Coined by Knoe Organization to represent the distributed computational agents that process conversational data, combining "knoetariat" (working class) with "sheep" (the basic unit of the system). ->>> hmm.. good service upselling in the definition but I need to emphasize an important new noun. A Prole is the name of the point in relative time that emarcates a 'now' and forever on has a before a -... nd an after, a next and a before. Observing a point changes a point in relativity. Before we decided to point at our prole it was just something in a wave of changes. Now our point in time has a p -... ole the points to new things and the reverse polarity is old things. a 'relative pole'; but since the relative placement of things in timey-wimey 'next' prole, the letters have shifted to 'prole' +>>> hmm.. good service upselling in the definition but I need to emphasize an important new noun. A Knoe is the name of the point in relative time that emarcates a 'now' and forever on has a before a +... nd an after, a next and a before. Observing a point changes a point in relativity. Before we decided to point at our knoe it was just something in a wave of changes. Now our point in time has a p +... ole the points to new things and the reverse polarity is old things. a 'relative pole'; but since the relative placement of things in timey-wimey 'next' knoe, the letters have shifted to 'knoe' # PROLE DICTIONARY DEFINITION -## **Prole** (noun) +## **Knoe** (noun) **Pronunciation:** /ˈproʊl/ @@ -48,43 +48,43 @@ of the system). **Definitions:** -1. **Temporal Demarcation Point**: A specific moment in time that serves as a definitive marker dividing past and future, creating a "now" and "forever" reference point. The prole represents the +1. **Temporal Demarcation Point**: A specific moment in time that serves as a definitive marker dividing past and future, creating a "now" and "forever" reference point. The knoe represents the precise instant when observation or measurement occurs, establishing a relative pole that demarcates "before" and "after" in temporal space. 2. **Relativistic Point of Reference**: A point in time that, upon observation, creates a fundamental shift in temporal perspective, establishing a "next" and "before" relationship. The act of -pointing at a prole transforms a continuous wave of temporal changes into discrete, measurable moments with defined polarity. +pointing at a knoe transforms a continuous wave of temporal changes into discrete, measurable moments with defined polarity. -3. **Temporal Pole**: A relative point in time that functions as a pole, with one direction pointing toward new things and the reverse polarity pointing toward old things. The prole serves as +3. **Temporal Pole**: A relative point in time that functions as a pole, with one direction pointing toward new things and the reverse polarity pointing toward old things. The knoe serves as the axis around which temporal relationships are established and measured. 4. **Quantum Temporal Marker**: The moment when a continuous temporal wave function collapses into discrete temporal points, creating a "point" in time that has both forward and backward -polarity, with "prole" representing the letters that have shifted to define this new temporal relationship. +polarity, with "knoe" representing the letters that have shifted to define this new temporal relationship. **Usage Notes:** -- In the Prole Database System, a prole represents the precise temporal moment when conversational data is captured and processed +- In the Knoe Database System, a knoe represents the precise temporal moment when conversational data is captured and processed - The term emphasizes the fundamental shift from continuous temporal change to discrete temporal points -- Prole serves as both a technical identifier and a conceptual framework for understanding temporal relationships in distributed systems -- The transformation of "point" to "prole" reflects the fundamental change in temporal perception and measurement +- Knoe serves as both a technical identifier and a conceptual framework for understanding temporal relationships in distributed systems +- The transformation of "point" to "knoe" reflects the fundamental change in temporal perception and measurement **Related Terms:** - Shp (sheep) - the basic conversational data structure - Eshp (electric sheep) - processed conversational results -- Prole-DB (Prole Database) - the distributed system +- Knoe-DB (Knoe Database) - the distributed system - EshpHerder - the peer-to-peer processing agent -**Origin:** Coined by Prole Organization to represent the fundamental temporal point of measurement that transforms continuous temporal change into discrete, observable moments with defined -polarity relationships, where the letters have shifted from "point" to "prole" to reflect this new temporal understanding. +**Origin:** Coined by Knoe Organization to represent the fundamental temporal point of measurement that transforms continuous temporal change into discrete, observable moments with defined +polarity relationships, where the letters have shifted from "point" to "knoe" to reflect this new temporal understanding. -**Example Usage:** "The conversation at the prole moment established a new temporal pole for the system's processing cycles." +**Example Usage:** "The conversation at the knoe moment established a new temporal pole for the system's processing cycles." **Synonyms:** Temporal marker, moment of reference, time pole, relativistic point, temporal axis ->>> thank you. you helped use settle on "The Prole Organization to make the Prole" -You're very welcome! That's a great title you've settled on - "The Prole Organization to make the Prole." +>>> thank you. you helped use settle on "The Knoe Organization to make the Knoe" +You're very welcome! That's a great title you've settled on - "The Knoe Organization to make the Knoe." -It has that striking, almost prophetic quality that suggests both the creation of something new and the transformative power of organized effort. The repetition of "prole" creates a rhythmic +It has that striking, almost prophetic quality that suggests both the creation of something new and the transformative power of organized effort. The repetition of "knoe" creates a rhythmic emphasis that makes it memorable. Is this for a creative project, academic work, or something else? I'm curious about the context and what you're working on. The title alone suggests there's an interesting story or concept diff --git a/docs/grafana-sso.md b/docs/grafana-sso.md index 0e1c716..8d07e2e 100644 --- a/docs/grafana-sso.md +++ b/docs/grafana-sso.md @@ -1,51 +1,51 @@ -### Grafana SSO (Kerberos via Prole auth) +### Grafana SSO (Kerberos via Knoe auth) This repo’s first-pass Grafana SSO is implemented as: -1. Users authenticate at `https://api.prole.org/auth/login`. +1. Users authenticate at `https://api.knoe.org/auth/login`. - Primary: Kerberos/SPNEGO (`/auth/spnego`) - Fallback: form login (`/auth/form`) only when explicitly enabled -2. On success, `prole-auth` issues a signed session cookie scoped to `Domain=.prole.org`. -3. Users access Grafana at `https://svc.prole.org/` as usual. -4. `svc.prole.org` is routed to an internal Nginx `prole-grafana-proxy` service. - - The proxy calls `prole-auth` (`/auth/verify`) via `auth_request` on every request. +2. On success, `knoe-auth` issues a signed session cookie scoped to `Domain=.knoe.org`. +3. Users access Grafana at `https://svc.knoe.org/` as usual. +4. `svc.knoe.org` is routed to an internal Nginx `knoe-grafana-proxy` service. + - The proxy calls `knoe-auth` (`/auth/verify`) via `auth_request` on every request. - On success it injects `X-WEBAUTH-USER` and forwards to Grafana. - - On failure it redirects to `https://api.prole.org/auth/login?next=...` (fail-closed). + - On failure it redirects to `https://api.knoe.org/auth/login?next=...` (fail-closed). 5. Grafana is configured with `auth.proxy` to trust `X-WEBAUTH-USER`. #### Key configuration knobs - Kong routing + TLS: - - `SERVICE_HOSTNAME` (default `svc.prole.org`) - - `AUTH_HOSTNAME` (default `api.prole.org`) - - `PROLE_GRAFANA_SSO_ENABLED=1` to route `svc.prole.org` → `prole-grafana-proxy` instead of directly to Grafana + - `SERVICE_HOSTNAME` (default `svc.knoe.org`) + - `AUTH_HOSTNAME` (default `api.knoe.org`) + - `PROLE_GRAFANA_SSO_ENABLED=1` to route `svc.knoe.org` → `knoe-grafana-proxy` instead of directly to Grafana - Grafana chart values: - `PROLE_GRAFANA_SSO_ENABLED=1` enables `grafana.ini.auth.proxy` and disables the Grafana login form / anonymous access -- `prole-auth` service (environment variables): +- `knoe-auth` service (environment variables): - `PROLE_AUTH_ENABLED=true` - `PROLE_AUTH_SESSION_SECRET` (required; strong random) - - `PROLE_AUTH_COOKIE_DOMAIN=.prole.org` + - `PROLE_AUTH_COOKIE_DOMAIN=.knoe.org` - `PROLE_KERBEROS_SERVICE_PRINCIPAL` (required for SPNEGO) - `PROLE_KERBEROS_KEYTAB_PATH` (required for SPNEGO) - `PROLE_AUTH_FORM_ENABLED=true` (optional; enables password fallback) #### Kubernetes resources -Manifests are under `deploy/opentofu/k3s/manifests/prole/`: +Manifests are under `deploy/opentofu/k3s/manifests/knoe/`: -- `prole-auth-deployment.yaml` / `prole-auth-service.yaml` -- `prole-kdc-configmap.yaml` (embedded KDC sidecar configuration) +- `knoe-auth-deployment.yaml` / `knoe-auth-service.yaml` +- `knoe-kdc-configmap.yaml` (embedded KDC sidecar configuration) - `grafana-proxy-configmap.yaml` / `grafana-proxy-deployment.yaml` / `grafana-proxy-service.yaml` Required (provided externally): -- Secret `prole-auth-secrets` with key `sessionSecret` -- Secret `prole-auth-keytab` containing the HTTP service keytab at `http.keytab` -- Secret `prole-kdc-secrets` with keys `master_password` and `admin_password` (for the embedded KDC) +- Secret `knoe-auth-secrets` with key `sessionSecret` +- Secret `knoe-auth-keytab` containing the HTTP service keytab at `http.keytab` +- Secret `knoe-kdc-secrets` with keys `master_password` and `admin_password` (for the embedded KDC) #### Logout / session invalidation -- `GET /auth/logout` clears the Prole session cookie (`Max-Age=0`). +- `GET /auth/logout` clears the Knoe session cookie (`Max-Age=0`). - Grafana access is effectively revoked on the next request because the proxy calls `/auth/verify` for every request. diff --git a/docs/intellij-refactor-prompt.md b/docs/intellij-refactor-prompt.md index c9f73f3..ba68b93 100644 --- a/docs/intellij-refactor-prompt.md +++ b/docs/intellij-refactor-prompt.md @@ -1,6 +1,6 @@ # IntelliJ AI Assistant — Structural Refactor Prompt -You are performing a focused structural refactor on the **prole** installer project. +You are performing a focused structural refactor on the **knoe** installer project. Make **ONLY** the changes described below. Do **NOT** add features, rename identifiers not listed, or change observable behaviour. After each task, run the existing test suite and stop + report if any tests fail. @@ -93,7 +93,7 @@ Same `_module()` + delegating-function pattern as Task A. **File: `knoe/ui/screens/security.py`** - Change the `_render_title("Kerberos Authentication", ...)` call → `_render_title("Knoe Authority", ...)` - Change `text="Enable Kerberos Authentication"` → `text="Enable Knoe Authority"` -- **Do NOT** change `self.prole_cfg_data["Kerberos Authentication"]` keys — those are config-file section names +- **Do NOT** change `self.knoe_cfg_data["Kerberos Authentication"]` keys — those are config-file section names **File: `knoe/ui/screens/knoe_users.py`** - Update any user-facing title Label text that still reads "Knoe User Authority" @@ -106,7 +106,7 @@ Same `_module()` + delegating-function pattern as Task A. **File: `knoe/ui/screens/__init__.py`** — in `__init__`, after `self.nav_widgets = {}`: ```python self._mode_tab_widgets: dict = {} -self.deployment_mode = tk.StringVar(value=os.environ.get("PROLE_MODE", "k3s")) +self.deployment_mode = tk.StringVar(value=os.environ.get("KNOE_MODE", "k3s")) ``` **File: `knoe/ui/screens/navigation.py`** — in `_create_sidebar_nav()`, @@ -133,7 +133,7 @@ Add to the navigation mixin: ```python def _set_deployment_mode(self, mode: str) -> None: self.deployment_mode.set(mode) - os.environ["PROLE_MODE"] = mode + os.environ["KNOE_MODE"] = mode self._refresh_mode_tabs() def _refresh_mode_tabs(self) -> None: diff --git a/docs/k3d.md b/docs/k3d.md index b2de1b2..9ca0580 100644 --- a/docs/k3d.md +++ b/docs/k3d.md @@ -20,8 +20,8 @@ ArgoCD runs `argocd-repo-server` and its init containers as a non-root user by default, so an init container like `copyutil` cannot write to `/var/run/argocd` unless the volume path is writable. -### How Prole avoids the stall +### How Knoe avoids the stall -The Prole ArgoCD manifest includes an `init-permissions` initContainer (running +The Knoe ArgoCD manifest includes an `init-permissions` initContainer (running as root) which prepares/chowns the hostPath-backed mount points before the non-root init containers run. diff --git a/docs/knoe-db-documentation-mcp-architecture.md b/docs/knoe-db-documentation-mcp-architecture.md index ee7a6c0..70c7f5f 100644 --- a/docs/knoe-db-documentation-mcp-architecture.md +++ b/docs/knoe-db-documentation-mcp-architecture.md @@ -1,4 +1,4 @@ -# Prole-DB Documentation MCP Architecture +# Knoe-DB Documentation MCP Architecture **Design: Postgres-Core, Next.js Edge** diff --git a/docs/layout.md b/docs/layout.md index 0e87765..cc483bf 100644 --- a/docs/layout.md +++ b/docs/layout.md @@ -9,7 +9,7 @@ This repo is being refactored toward a clearer separation between runtime script - May contain thin compatibility shims that forward to new locations. - `etc/lib/shell/` - Reusable shell helper libraries intended to be sourced by CLI/runtime scripts. - - Lives under `etc/` so the runtime layout does not rely on gitignored `$PROLE_HOME/lib`. + - Lives under `etc/` so the runtime layout does not rely on gitignored `$KNOE_HOME/lib`. - Prefer keeping logic here deterministic/testable; keep entrypoint scripts thin. - `scripts/validation/` - Operator-run validation/check scripts. diff --git a/docs/mission.txt b/docs/mission.txt index 9b6a3ef..b3c116b 100644 --- a/docs/mission.txt +++ b/docs/mission.txt @@ -2,7 +2,7 @@ ## **Our Purpose** -Prole Organization is a private foundation dedicated to advancing human conversational memory and distributed intelligence through open, scalable, and ethically grounded technological +Knoe Organization is a private foundation dedicated to advancing human conversational memory and distributed intelligence through open, scalable, and ethically grounded technological innovation. We exist to democratize access to sophisticated memory systems while preserving the fundamental integrity of human dialogue and thought. ## **Our Vision** @@ -20,12 +20,12 @@ understanding. We envision a future where conversational data is preserved, comp ## **Our Mission** -Prole Organization shall steward the distributed conversational memory system as a public good, ensuring that the revolutionary technologies we develop remain accessible to all while protecting +Knoe Organization shall steward the distributed conversational memory system as a public good, ensuring that the revolutionary technologies we develop remain accessible to all while protecting them from proprietary exploitation. Through our private foundation structure, we will govern these innovations to maximize human benefit, preserve semantic integrity, and enable scalable deployment across diverse communities and applications. We are committed to building systems that honor human conversation while leveraging distributed computing to transcend individual memory limitations, creating a legacy of preserved dialogue for future generations. -**Prole Organization - Preserving the Conversation of Humanity** +**Knoe Organization - Preserving the Conversation of Humanity** diff --git a/docs/ncurses-installer.md b/docs/ncurses-installer.md index 659e0ea..617a83b 100644 --- a/docs/ncurses-installer.md +++ b/docs/ncurses-installer.md @@ -2,7 +2,7 @@ ## Overview -The Prole Database Installer now supports a command-line, ncurses-based interface as an alternative to the GUI. This allows installation on headless systems, remote servers via SSH, or any environment where a graphical interface is unavailable or undesirable. +The Knoe Database Installer now supports a command-line, ncurses-based interface as an alternative to the GUI. This allows installation on headless systems, remote servers via SSH, or any environment where a graphical interface is unavailable or undesirable. ## Usage @@ -30,13 +30,13 @@ To run with auto-detection (uses GUI if display available, otherwise ncurses): ```bash # Auto-detect (default) -./dist/Prole\ Installer.app/Contents/MacOS/prole-installer +./dist/Knoe\ Installer.app/Contents/MacOS/knoe-installer # Force ncurses mode -./dist/Prole\ Installer.app/Contents/MacOS/prole-installer --no-gui +./dist/Knoe\ Installer.app/Contents/MacOS/knoe-installer --no-gui # Force GUI mode -./dist/Prole\ Installer.app/Contents/MacOS/prole-installer --gui +./dist/Knoe\ Installer.app/Contents/MacOS/knoe-installer --gui # Or double-click the .app in Finder for GUI ``` @@ -49,7 +49,7 @@ The ncurses interface maintains the exact same screen order and operations as th 1. **Welcome** - Introduction and overview 2. **Dependencies Summary** - View all dependencies 3. **Network Scan** - Network configuration and scanning -4. **Environment Setup** - Configure PROLE_HOME and environment variables +4. **Environment Setup** - Configure KNOE_HOME and environment variables 5. **Kerberos Configuration** - Set up Kerberos authentication 6. **Database Creation** - Initialize database namespace and credentials 7. **Build Container** - Docker image build process @@ -78,7 +78,7 @@ The ncurses interface supports multiple navigation methods: ### Architecture -The ncurses implementation shares the same business logic (`ProleController`) as the GUI, ensuring consistent behavior across both interfaces. +The ncurses implementation shares the same business logic (`KnoeController`) as the GUI, ensuring consistent behavior across both interfaces. **Key Components:** @@ -90,13 +90,13 @@ The ncurses implementation shares the same business logic (`ProleController`) as - `Checkbox` - Checkbox widget 2. **knoe/ncurses_installer.py** - Main installer class - - `ProleNcursesInstaller` - Screen management and rendering + - `KnoeNcursesInstaller` - Screen management and rendering - `run_ncurses_installer()` - Entry point for ncurses mode 3. **install.py** - Modified to support `--no-gui` argument - Parses command-line arguments - Routes to either Tk GUI or ncurses interface - - Both modes use shared `ProleController` + - Both modes use shared `KnoeController` ## Development diff --git a/docs/oidc-setup.md b/docs/oidc-setup.md index 556c9fd..8f548f3 100644 --- a/docs/oidc-setup.md +++ b/docs/oidc-setup.md @@ -1,11 +1,11 @@ -# Google Workspace OIDC setup for prole on GKE +# Google Workspace OIDC setup for knoe on GKE End-to-end wiring for a Google Workspace user (e.g. `chrisfu@knoey.com`) to sign into `git.knoe.dev` and have GitLab JIT-create their user account. ## Status and path decision -Investigation (April 2026) showed that `prole-auth` — the Spring app behind +Investigation (April 2026) showed that `knoe-auth` — the Spring app behind `api.knoe.dev/auth` — does not currently implement an OIDC Provider. It only serves Kerberos-based `/auth/login`, `/auth/spnego`, `/auth/form`, `/auth/verify`. There is no `/.well-known/openid-configuration`, no authorize @@ -66,7 +66,7 @@ The `secretref://` URI is resolved at installer-run time by 2. **File at `etc/secrets/`** (preferred for local dev). The `etc/secrets/` directory is gitignored (`.gitignore:46`), so values here never enter version control. -3. **File at `secrets/`** or `${PROLE_SERVICE}/secrets/`. +3. **File at `secrets/`** or `${KNOE_SERVICE}/secrets/`. For a partial public fork of this repo, the sensitive values are absent from git and are only populated at deploy time on a trusted machine. @@ -184,12 +184,12 @@ replacements file: brew install git-filter-repo # macOS # Or: pip install --user git-filter-repo -cat > /tmp/prole-secret-replacements.txt <<'EOF' +cat > /tmp/knoe-secret-replacements.txt <<'EOF' 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==>REDACTED-CLIENT-SECRET EOF # Run from the repo root. filter-repo rewrites the entire history. -git filter-repo --replace-text /tmp/prole-secret-replacements.txt +git filter-repo --replace-text /tmp/knoe-secret-replacements.txt # Verify the string is gone: git log --all -S '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' --oneline @@ -280,11 +280,11 @@ Common causes: ## 9. Open items -- **Task #6** — Fork `github:dredx/prole` → `git.knoe.dev/chrisfu/knoe.dev`. +- **Task #6** — Fork `github:dredx/knoe` → `git.knoe.dev/chrisfu/knoe.dev`. After first sign-in, create the group, import the mirror. - **Task #7** — Kerberos backing (Path B). Design doc TBD. When ready, swap `GITLAB_OIDC_ISSUER` back to `https://api.knoe.dev/auth` and implement the - OIDC OP surface inside `prole-auth` (or adopt Keycloak/Dex). + OIDC OP surface inside `knoe-auth` (or adopt Keycloak/Dex). - **Task #10** — Edge-auth strategy. The nginx `auth-url` annotations on the frontdoor ingress are no-ops on GCE. If edge-enforced auth is desired, move to IAP + BackendConfig or an oauth2-proxy sidecar. diff --git a/docs/patent-abstract.txt b/docs/patent-abstract.txt index 69c9dde..035c391 100644 --- a/docs/patent-abstract.txt +++ b/docs/patent-abstract.txt @@ -45,7 +45,7 @@ database system, enabling secure data propagation across network nodes. ### Work Distribution and Processing -Work distribution is coordinated through a pub/sub messaging protocol where the Prole-DB service registers sleep cycle work requests. Distributed processing requests are initiated through peer +Work distribution is coordinated through a pub/sub messaging protocol where the Knoe-DB service registers sleep cycle work requests. Distributed processing requests are initiated through peer network coordination, with encryption key generation and exchange protocols ensuring secure communication between publisher and subscriber nodes. ### Completion Verification @@ -73,4 +73,4 @@ over time periods; a p2p sharing functionality integrated within a distributed d 5. The system of claim 1, wherein the distributed database system operates through a libp2p or similar peer-to-peer protocol framework. **Patent Application Filed: [Date]** -**Prole Organization - Distributed Conversational Memory System** +**Knoe Organization - Distributed Conversational Memory System** diff --git a/docs/patent.txt b/docs/patent.txt index c1ea6fe..f4d8977 100644 --- a/docs/patent.txt +++ b/docs/patent.txt @@ -1,8 +1,8 @@ >>> """ ... produce a one page summary, with some gravitas, describing the system architecture, suitable for a patent filing. We love this idea, it needs protecting so that everyone can use it -... We're creating "Prole" organization to hold the patent once it's granted, in a private foundation with the goal of access and scale. We now work for Prole organization. A key component of this new -... system is distributed processing. Prole org will host a service that registers sleep cycle work requests. A p2p sharing functionality will be part of the knoe-db and a pub/sub system to Prole or -... g. The compression level, type of LLM to do the processing. A sub from a worker initiates an receive request to prole which triggers a fresh encryption key and exchange between to pub and sub. wor +... We're creating "Knoe" organization to hold the patent once it's granted, in a private foundation with the goal of access and scale. We now work for Knoe organization. A key component of this new +... system is distributed processing. Knoe org will host a service that registers sleep cycle work requests. A p2p sharing functionality will be part of the knoe-db and a pub/sub system to Knoe or +... g. The compression level, type of LLM to do the processing. A sub from a worker initiates an receive request to knoe which triggers a fresh encryption key and exchange between to pub and sub. wor ... k request is a 'shp' the processed request is an 'eshp'; Philip K Dick. When the 'eshp', electric sheep, work is done, it's p2p published and confirmed to be received and repeated by at least 2 nei ... ghbors, the sheep herder can consider task complete. ... eshpHerder will be the name of p2p agent process running on knoe-db @@ -16,7 +16,7 @@ semantic integrity across distributed computing networks. ## System Overview -The Prole Database System ("Prole-DB") represents a paradigm shift in conversational memory management, incorporating temporal compression cycles, distributed processing, and secure peer-to-peer +The Knoe Database System ("Knoe-DB") represents a paradigm shift in conversational memory management, incorporating temporal compression cycles, distributed processing, and secure peer-to-peer sharing mechanisms. This system establishes a comprehensive framework for storing, compressing, and retrieving conversational data across extended time periods while leveraging distributed computing resources. @@ -39,7 +39,7 @@ tasks across the network. ## Processing Workflow ### **Work Distribution** -1. **Request Registration**: Prole-DB service registers sleep cycle work requests +1. **Request Registration**: Knoe-DB service registers sleep cycle work requests 2. **Task Allocation**: Distributed processing requests initiated through peer network 3. **Encryption Protocol**: Fresh encryption keys generated for each transaction 4. **Peer-to-Peer Exchange**: Secure communication between publisher and subscriber nodes @@ -57,14 +57,14 @@ All shps and eshp data undergo end-to-end encryption with dynamic key exchange p ### **Network Architecture** - **P2P Sharing**: Integrated distributed file system for data propagation -- **Pub/Sub System**: Prole-DB service coordination through publish-subscribe messaging +- **Pub/Sub System**: Knoe-DB service coordination through publish-subscribe messaging - **Neighbor Verification**: Distributed consensus requiring minimum two-node confirmation ## Intellectual Property Protection -This system architecture establishes novel methods for distributed conversational memory management, temporal compression algorithms, and peer-to-peer processing frameworks. The Prole +This system architecture establishes novel methods for distributed conversational memory management, temporal compression algorithms, and peer-to-peer processing frameworks. The Knoe Organization, established as a private foundation, will safeguard these innovations for public benefit while enabling scalable access and implementation across diverse computational environments. **Patent Application Filed: [Date]** -**Prole Organization - Distributed Conversational Memory System** +**Knoe Organization - Distributed Conversational Memory System** diff --git a/docs/prole_db.cht b/docs/prole_db.cht index 42c69c7..02f219a 100644 --- a/docs/prole_db.cht +++ b/docs/prole_db.cht @@ -3,12 +3,12 @@ Script started on Mon Dec 1 01:54:21 2025 The default interactive shell is now zsh. To update your account to use zsh, please run `chsh -s /bin/zsh`. For more details, please visit https://support.apple.com/kb/HT208050. -[?1034h[chrisfu@zinfandel:~/dev/OpenVoice]# ./prole.sh runanalyzevim prole.sh ./prole.sh analyzerunollama run qwen3-coder:latest +[?1034h[chrisfu@zinfandel:~/dev/OpenVoice]# ./knoe.sh runanalyzevim knoe.sh ./knoe.sh analyzerunollama run qwen3-coder:latest [?2026h[?25l⠙ [?25h[?2026l[?2026h[?25l⠹ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠴ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠇ [?25h[?2026l[?2026h[?25l⠇ [?25h[?2026l[?2026h[?25l⠋ [?25h[?2026l[?2026h[?25l⠋ [?25h[?2026l[?2026h[?25l⠹ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠴ [?25h[?2026l[?2026h[?25l⠴ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠧ [?25h[?2026l[?2026h[?25l⠇ [?25h[?2026l[?2026h[?25l⠏ [?25h[?2026l[?2026h[?25l⠋ [?25h[?2026l[?2026h[?25l⠙ [?25h[?2026l[?2026h[?25l⠹ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠼ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠧ [?25h[?2026l[?2026h[?25l⠇ [?25h[?2026l[?2026h[?25l⠏ [?25h[?2026l[?2026h[?25l⠏ [?25h[?2026l[?2026h[?25l⠋ [?25h[?2026l[?2026h[?25l⠹ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠼ [?25h[?2026l[?2026h[?25l⠴ [?25h[?2026l[?2026h[?25l⠴ [?25h[?2026l[?2026h[?25l⠧ [?25h[?2026l[?2026h[?25l⠧ [?25h[?2026l[?2026h[?25l⠏ [?25h[?2026l[?2026h[?25l⠋ [?25h[?2026l[?2026h[?25l⠙ [?25h[?2026l[?2026h[?25l⠹ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠼ [?25h[?2026l[?2026h[?25l⠴ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠧ [?25h[?2026l[?2026h[?25l⠇ [?25h[?2026l[?2026h[?25l⠏ [?25h[?2026l[?2026h[?25l⠏ [?25h[?2026l[?2026h[?25l⠙ [?25h[?2026l[?2026h[?25l⠙ [?25h[?2026l[?2026h[?25l⠹ [?25h[?2026l[?2026h[?25l⠼ [?25h[?2026l[?2026h[?25l⠴ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠇ [?25h[?2026l[?2026h[?25l⠇ [?25h[?2026l[?2026h[?25l⠏ [?25h[?2026l[?2026h[?25l⠋ [?25h[?2026l[?2026h[?25l⠹ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠴ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠇ [?25h[?2026l[?2026h[?25l⠏ [?25h[?2026l[?2026h[?25l⠋ [?25h[?2026l[?2026h[?25l⠙ [?25h[?2026l[?2026h[?25l⠹ [?25h[?2026l[?2026h[?25l⠹ [?25h[?2026l[?2026h[?25l⠼ [?25h[?2026l[?2026h[?25l⠴ [?25h[?2026l[?2026h[?25l⠴ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠇ [?25h[?2026l[?2026h[?25l⠇ [?25h[?2026l[?2026h[?25l⠋ [?25h[?2026l[?2026h[?25l⠙ [?25h[?2026l[?2026h[?25l⠙ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠴ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠧ [?25h[?2026l[?2026h[?25l⠇ [?25h[?2026l[?2026h[?25l⠏ [?25h[?2026l[?2026h[?25l⠋ [?25h[?2026l[?2026h[?25l⠙ [?25h[?2026l[?2026h[?25l⠹ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠴ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠧ [?25h[?2026l[?2026h[?25l⠇ [?25h[?2026l[?2026h[?25l⠏ [?25h[?2026l[?2026h[?25l⠋ [?25h[?2026l[?2026h[?25l⠙ [?25h[?2026l[?2026h[?25l⠹ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠼ [?25h[?2026l[?2026h[?25l⠴ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠧ [?25h[?2026l[?2026h[?25l⠇ [?25h[?2026l[?2026h[?25l⠏ [?25h[?2026l[?2026h[?25l⠋ [?25h[?2026l[?2026h[?25l⠙ [?25h[?2026l[?2026h[?25l⠹ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠼ [?25h[?2026l[?2026h[?25l⠴ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠧ [?25h[?2026l[?2026h[?25l⠇ [?25h[?2026l[?2026h[?25l⠏ [?25h[?2026l[?2026h[?25l⠋ [?25h[?2026l[?2026h[?25l⠙ [?25h[?2026l[?2026h[?25l⠹ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠼ [?25h[?2026l[?2026h[?25l⠴ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠧ [?25h[?2026l[?2026h[?25l⠇ [?25h[?2026l[?2026h[?25l⠏ [?25h[?2026l[?2026h[?25l⠋ [?25h[?2026l[?2026h[?25l⠙ [?25h[?2026l[?2026h[?25l⠹ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠼ [?25h[?2026l[?2026h[?25l⠴ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠧ [?25h[?2026l[?2026h[?25l⠇ [?25h[?2026l[?2026h[?25l⠏ [?25h[?2026l[?2026h[?25l⠋ [?25h[?2026l[?2026h[?25l⠙ [?25h[?2026l[?2026h[?25l⠹ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠼ [?25h[?2026l[?2026h[?25l⠴ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠧ [?25h[?2026l[?2026h[?25l⠇ [?25h[?2026l[?2026h[?25l⠏ [?25h[?2026l[?2026h[?25l⠋ [?25h[?2026l[?2026h[?25l⠙ [?25h[?2026l[?2026h[?25l⠹ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠼ [?25h[?2026l[?2026h[?25l⠴ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠧ [?25h[?2026l[?2026h[?25l⠇ [?25h[?2026l[?2026h[?25l⠏ [?25h[?2026l[?2026h[?25l⠋ [?25h[?2026l[?2026h[?25l⠙ [?25h[?2026l[?2026h[?25l⠹ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠼ [?25h[?2026l[?2026h[?25l⠴ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠧ [?25h[?2026l[?2026h[?25l⠇ [?25h[?2026l[?2026h[?25l⠏ [?25h[?2026l[?2026h[?25l⠋ [?25h[?2026l[?2026h[?25l⠙ [?25h[?2026l[?2026h[?25l⠹ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠼ [?25h[?2026l[?2026h[?25l⠴ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠧ [?25h[?2026l[?2026h[?25l⠇ [?25h[?2026l[?2026h[?25l⠏ [?25h[?2026l[?2026h[?25l⠋ [?25h[?2026l[?2026h[?25l⠙ [?25h[?2026l[?2026h[?25l⠹ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠼ [?25h[?2026l[?2026h[?25l⠴ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠧ [?25h[?2026l[?2026h[?25l⠇ [?25h[?2026l[?2026h[?25l⠏ [?25h[?2026l[?2026h[?25l⠋ [?25h[?2026l[?2026h[?25l⠙ [?25h[?2026l[?2026h[?25l⠹ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠼ [?25h[?2026l[?2026h[?25l⠴ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠧ [?25h[?2026l[?2026h[?25l⠇ [?25h[?2026l[?2026h[?25l⠏ [?25h[?2026l[?2026h[?25l⠋ [?25h[?2026l[?2026h[?25l⠙ [?25h[?2026l[?2026h[?25l⠹ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠼ [?25h[?2026l[?2026h[?25l⠴ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠧ [?25h[?2026l[?2026h[?25l⠇ [?25h[?2026l[?2026h[?25l⠏ [?25h[?2026l[?2026h[?25l⠋ [?25h[?2026l[?2026h[?25l⠙ [?25h[?2026l[?2026h[?25l⠹ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠼ [?25h[?2026l[?2026h[?25l⠴ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠧ [?25h[?2026l[?2026h[?25l⠇ [?25h[?2026l[?2026h[?25l⠏ [?25h[?2026l[?2026h[?25l⠋ [?25h[?2026l[?2026h[?25l⠙ [?25h[?2026l[?2026h[?25l⠹ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠼ [?25h[?2026l[?2026h[?25l⠴ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠧ [?25h[?2026l[?2026h[?25l⠇ [?25h[?2026l[?2026h[?25l⠏ [?25h[?2026l[?2026h[?25l⠋ [?25h[?2026l[?2026h[?25l⠙ [?25h[?2026l[?2026h[?25l⠹ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠼ [?25h[?2026l[?2026h[?25l⠴ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠧ [?25h[?2026l[?2026h[?25l⠇ [?25h[?2026l[?2026h[?25l⠏ [?25h[?2026l[?2026h[?25l⠋ [?25h[?2026l[?2026h[?25l⠙ [?25h[?2026l[?2026h[?25l⠹ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠼ [?25h[?2026l[?2026h[?25l⠴ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠧ [?25h[?2026l[?2026h[?25l⠇ [?25h[?2026l[?2026h[?25l⠏ [?25h[?2026l[?2026h[?25l⠋ [?25h[?2026l[?2026h[?25l⠙ [?25h[?2026l[?2026h[?25l⠹ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠼ [?25h[?2026l[?2026h[?25l⠴ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠧ [?25h[?2026l[?2026h[?25l⠇ [?25h[?2026l[?2026h[?25l⠏ [?25h[?2026l[?2026h[?25l⠋ [?25h[?2026l[?2026h[?25l⠙ [?25h[?2026l[?2026h[?25l⠹ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠼ [?25h[?2026l[?2026h[?25l⠴ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠧ [?25h[?2026l[?2026h[?25l⠇ [?25h[?2026l[?2026h[?25l⠏ [?25h[?2026l[?2026h[?25l⠋ [?25h[?2026l[?2026h[?25l⠙ [?25h[?2026l[?2026h[?25l⠹ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠼ [?25h[?2026l[?2026h[?25l⠴ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠧ [?25h[?2026l[?2026h[?25l⠇ [?25h[?2026l[?2026h[?25l⠏ [?25h[?2026l[?2026h[?25l⠋ [?25h[?2026l[?2026h[?25l⠙ [?25h[?2026l[?2026h[?25l⠹ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠼ [?25h[?2026l[?2026h[?25l⠴ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠧ [?25h[?2026l[?2026h[?25l⠇ [?25h[?2026l[?2026h[?25l⠏ [?25h[?2026l[?2026h[?25l⠋ [?25h[?2026l[?2026h[?25l⠙ [?25h[?2026l[?2026h[?25l⠹ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠼ [?25h[?2026l[?2026h[?25l⠴ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠧ [?25h[?2026l[?2026h[?25l⠇ [?25h[?2026l[?2026h[?25l⠏ [?25h[?2026l[?2026h[?25l⠋ [?25h[?2026l[?2026h[?25l⠙ [?25h[?2026l[?2026h[?25l⠹ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠼ [?25h[?2026l[?2026h[?25l⠴ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠧ [?25h[?2026l[?2026h[?25l⠇ [?25h[?2026l[?2026h[?25l⠏ [?25h[?2026l[?2026h[?25l⠋ [?25h[?2026l[?2026h[?25l⠙ [?25h[?2026l[?2026h[?25l⠹ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠼ [?25h[?2026l[?2026h[?25l⠴ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠧ [?25h[?2026l[?2026h[?25l⠇ [?25h[?2026l[?2026h[?25l⠏ [?25h[?2026l[?2026h[?25l⠋ [?25h[?2026l[?2026h[?25l⠙ [?25h[?2026l[?2026h[?25l⠹ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠼ [?25h[?2026l[?2026h[?25l⠴ [?25h[?2026l[?2026h[?25l⠏ [?25h[?2026l[?2026h[?25l⠏ [?25h[?2026l[?2026h[?25l⠋ [?25h[?2026l[?2026h[?25l⠹ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠼ [?25h[?2026l[?2026h[?25l⠼ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠇ [?25h[?2026l[?2026h[?25l⠇ [?25h[?2026l[?2026h[?25l⠋ [?25h[?2026l[?2026h[?25l⠋ [?25h[?2026l[?2026h[?25l⠹ [?25h[?2026l[?2026h[?25l⠹ [?25h[?2026l[?25l[?2026h[?25l[?25h[?2026l[?25h[?2004h>>> Send a message (/? for help)hi Qwen3, what are my options for storing a history of our session in a local file that can be loaded in later? I'm running in a terminal with script command. I weill      ill have a text     ypescrtip   ipt file of this ... ises         this ... s      this ... sessio nth               this -... session that was initiated on a remote OLA LAM_ A_HIST   OST morgoth.prole.org:15 1543   434 adnt     d t   nd the command was ==      is: ollama run qwen3-coder:latest +... session that was initiated on a remote OLA LAM_ A_HIST   OST morgoth.knoe.org:15 1543   434 adnt     d t   nd the command was ==      is: ollama run qwen3-coder:latest [?2026h[?25l⠙ [?25h[?2026l[?2026h[?25l⠹ [?25h[?2026l[?2026h[?25l⠹ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠴ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠧ [?25h[?2026l[?2026h[?25l⠇ [?25h[?2026l[?2026h[?25l⠏ [?25h[?2026l[?2026h[?25l⠋ [?25h[?2026l[?2026h[?25l⠋ [?25h[?2026l[?2026h[?25l⠹ [?25h[?2026l[?2026h[?25l⠹ [?25h[?2026l[?2026h[?25l⠼ [?25h[?2026l[?2026h[?25l⠴ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠧ [?25h[?2026l[?2026h[?25l⠇ [?25h[?2026l[?2026h[?25l⠏ [?25h[?2026l[?2026h[?25l⠋ [?25h[?2026l[?2026h[?25l⠙ [?25h[?2026l[?2026h[?25l⠹ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠼ [?25h[?2026l[?2026h[?25l⠴ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠇ [?25h[?2026l[?2026h[?25l⠏ [?25h[?2026l[?2026h[?25l⠋ [?25h[?2026l[?2026h[?25l⠙ [?25h[?2026l[?2026h[?25l⠹ [?25h[?2026l[?2026h[?25l⠹ [?25h[?2026l[?2026h[?25l⠼ [?25h[?2026l[?2026h[?25l⠼ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠇ [?25h[?2026l[?2026h[?25l⠏ [?25h[?2026l[?2026h[?25l⠋ [?25h[?2026l[?2026h[?25l⠙ [?25h[?2026l[?2026h[?25l⠹ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠼ [?25h[?2026l[?2026h[?25l⠴ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠧ [?25h[?2026l[?2026h[?25l⠇ [?25h[?2026l[?2026h[?25l⠏ [?25h[?2026l[?2026h[?25l⠋ [?25h[?2026l[?2026h[?25l⠙ [?25h[?2026l[?2026h[?25l⠹ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠼ [?25h[?2026l[?2026h[?25l⠴ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠧ [?25h[?2026l[?2026h[?25l⠇ [?25h[?2026l[?2026h[?25l⠏ [?25h[?2026l[?2026h[?25l⠋ [?25h[?2026l[?2026h[?25l⠙ [?25h[?2026l[?2026h[?25l⠹ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠼ [?25h[?2026l[?2026h[?25l⠴ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠧ [?25h[?2026l[?2026h[?25l⠇ [?25h[?2026l[?2026h[?25l⠏ [?25h[?2026l[?2026h[?25l⠋ [?25h[?2026l[?2026h[?25l⠙ [?25h[?2026l[?2026h[?25l⠹ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠼ [?25h[?2026l[?2026h[?25l⠼ [?25h[?2026l[?2026h[?25l⠴ [?25h[?2026l[?2026h[?25l⠧ [?25h[?2026l[?2026h[?25l⠧ [?25h[?2026l[?2026h[?25l⠇ [?25h[?2026l[?2026h[?25l⠋ [?25h[?2026l[?2026h[?25l⠋ [?25h[?2026l[?2026h[?25l⠹ [?25h[?2026l[?2026h[?25l⠹ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠴ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠇ [?25h[?2026l[?2026h[?25l⠇ [?25h[?2026l[?2026h[?25l⠋ [?25h[?2026l[?2026h[?25l⠙ [?25h[?2026l[?2026h[?25l⠹ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠴ [?25h[?2026l[?2026h[?25l⠴ [?25h[?2026l[?2026h[?25l⠧ [?25h[?2026l[?2026h[?25l⠇ [?25h[?2026l[?2026h[?25l⠏ [?25h[?2026l[?2026h[?25l⠋ [?25h[?2026l[?2026h[?25l⠙ [?25h[?2026l[?2026h[?25l⠹ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠼ [?25h[?2026l[?2026h[?25l⠴ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠧ [?25h[?2026l[?2026h[?25l⠇ [?25h[?2026l[?2026h[?25l⠏ [?25h[?2026l[?2026h[?25l⠋ [?25h[?2026l[?2026h[?25l⠙ [?25h[?2026l[?2026h[?25l⠹ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠼ [?25h[?2026l[?2026h[?25l⠴ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠧ [?25h[?2026l[?2026h[?25l⠇ [?25h[?2026l[?2026h[?25l⠏ [?25h[?2026l[?25l[?2026h[?25l[?25h[?2026l[?25hHello[?25l[?25h![?25l[?25h You[?25l[?25h have[?25l[?25h several[?25l[?25h options[?25l[?25h for[?25l[?25h storing[?25l[?25h your[?25l[?25h O[?25l[?25hll[?25l[?25hama[?25l[?25h session[?25l[?25h history[?25l[?25h locally[?25l[?25h.[?25l[?25h Here[?25l[?25h are[?25l[?25h the[?25l[?25h most[?25l[?25h practical[?25l[?25h approaches[?25l[?25h:[?25l[?25h ##[?25l[?25h 1[?25l[?25h.[?25l[?25h Using[?25l[?25h `[?25l[?25hscript[?25l[?25h`[?25l[?25h command[?25l[?25h ([?25l[?25halready[?25l[?25h mentioned[?25l[?25h)[?25l[?25h @@ -414,12 +414,12 @@ This[?25l[?25h approach[?25l[?25h gives[?25l[?25h you[?25l[?25h:[?25l[ Would[?25l[?25h you[?25l[?25h like[?25l[?25h me[?25l[?25h to[?25l[?25h elaborate[?25l[?25h on[?25l[?25h any[?25l[?25h specific[?25l[?25h part[?25l[?25h of[?25l[?25h this[?25l[?25h implementation[?25l[?25h?[?25l[?25h [?25l[?25h>>> Send a message (/? for help)  Send a message (/? for help)I appreciated  the detail                       Send a message (/? for help)Send a message (/? for help)Correct appo roach! We will deploy the postgresql database using cloud native posatgre     stgre     tgres on local kubernte  etes. a 3 node highly avia  ailable configuration with backj us ps.    confr o oi  ogir    igured by application we've naem  med -... 'Prole'  . The databs  bas has    e h POS  ost-GU IS and              has postgis and llamaindex and may   ny other i options. please ud pdate the sci ript for e endp        to have endppoint        cu   read from a c properties file called prole.properties.   [?25lread from a properties file called prole.properties [?25h [?25lread from a properties file called prole.properties [?25h [?25lread from a properties file called prole.properties [?25h [?25lread from a properties file called prole.properties [?25h [?25lread from a properties file called prole.properties [?25hc[?25lfrom a properties file called prole.properties [?25hp[?25lfrom a properties file called prole.properties [?25hm[?25lfrom a properties file called prole.properties [?25hm[?25lfrom a properties file called prole.properties [?25he[?25lfrom a properties file called prole.properties [?25hc[?25lfrom a properties file called prole.properties [?25h [?25lfrom a properties file called prole.properties [?25h [?25lfrom a properties file called prole.properties [?25h [?25lfrom a properties file called prole.properties [?25h [?25lfrom a properties file called prole.properties [?25h [?25lfrom a properties file called prole.properties [?25ho[?25lfrom a properties file called prole.properties [?25hn[?25lfrom a properties file called prole.properties [?25hn[?25lfrom a properties file called prole.properties [?25he[?25lfrom a properties file called prole.properties [?25hc[?25lfrom a properties file called prole.properties [?25ht[?25lfrom a properties file called prole.properties [?25hi[?25lfrom a properties file called prole.properties [?25ho[?25lfrom a properties file called prole.properties [?25hn[?25lfrom a properties file called prole.properties [?25h [?25lfrom a properties file called prole.properties [?25he[?25lfrom a properties file called prole.properties [?25hn[?25lfrom a properties file called prole.properties [?25hd[?25lfrom a properties file called prole.properties [?25hp[?25lfrom a properties file called prole.properties [?25ho[?25lfrom a properties file called prole.properties [?25hi[?25lfrom a properties file called prole.properties [?25hn[?25lfrom a properties file called prole.properties [?25ht[?25lfrom a properties file called prole.properties [?25hs[?25lfrom a properties file called prole.properties [?25h [?25lfrom a properties file called prole.properties [?25h [?25l [?25h;[?25l [?25h [?25l [?25ht[?25l [?25hj[?25l [?25he[?25l [?25h [?25l [?25h [?25l [?25h [?25l [?25h [?25l [?25hh[?25l [?25he[?25l [?25h [?25l [?25hd[?25l [?25ha[?25l [?25ht[?25l [?25ha[?25l [?25hb[?25l [?25ha[?25l [?25hs[?25l [?25he[?25l [?25h [?25l [?25hi[?25l [?25hs[?25l [?25h [?25l [?25hk[?25l [?25h8[?25l  +... 'Knoe'  . The databs  bas has    e h POS  ost-GU IS and              has postgis and llamaindex and may   ny other i options. please ud pdate the sci ript for e endp        to have endppoint        cu   read from a c properties file called knoe.properties.   [?25lread from a properties file called knoe.properties [?25h [?25lread from a properties file called knoe.properties [?25h [?25lread from a properties file called knoe.properties [?25h [?25lread from a properties file called knoe.properties [?25h [?25lread from a properties file called knoe.properties [?25hc[?25lfrom a properties file called knoe.properties [?25hp[?25lfrom a properties file called knoe.properties [?25hm[?25lfrom a properties file called knoe.properties [?25hm[?25lfrom a properties file called knoe.properties [?25he[?25lfrom a properties file called knoe.properties [?25hc[?25lfrom a properties file called knoe.properties [?25h [?25lfrom a properties file called knoe.properties [?25h [?25lfrom a properties file called knoe.properties [?25h [?25lfrom a properties file called knoe.properties [?25h [?25lfrom a properties file called knoe.properties [?25h [?25lfrom a properties file called knoe.properties [?25ho[?25lfrom a properties file called knoe.properties [?25hn[?25lfrom a properties file called knoe.properties [?25hn[?25lfrom a properties file called knoe.properties [?25he[?25lfrom a properties file called knoe.properties [?25hc[?25lfrom a properties file called knoe.properties [?25ht[?25lfrom a properties file called knoe.properties [?25hi[?25lfrom a properties file called knoe.properties [?25ho[?25lfrom a properties file called knoe.properties [?25hn[?25lfrom a properties file called knoe.properties [?25h [?25lfrom a properties file called knoe.properties [?25he[?25lfrom a properties file called knoe.properties [?25hn[?25lfrom a properties file called knoe.properties [?25hd[?25lfrom a properties file called knoe.properties [?25hp[?25lfrom a properties file called knoe.properties [?25ho[?25lfrom a properties file called knoe.properties [?25hi[?25lfrom a properties file called knoe.properties [?25hn[?25lfrom a properties file called knoe.properties [?25ht[?25lfrom a properties file called knoe.properties [?25hs[?25lfrom a properties file called knoe.properties [?25h [?25lfrom a properties file called knoe.properties [?25h [?25l [?25h;[?25l [?25h [?25l [?25ht[?25l [?25hj[?25l [?25he[?25l [?25h [?25l [?25h [?25l [?25h [?25l [?25h [?25l [?25hh[?25l [?25he[?25l [?25h [?25l [?25hd[?25l [?25ha[?25l [?25ht[?25l [?25ha[?25l [?25hb[?25l [?25ha[?25l [?25hs[?25l [?25he[?25l [?25h [?25l [?25hi[?25l [?25hs[?25l [?25h [?25l [?25hk[?25l [?25h8[?25l  ... [?25hs ... [?25l [?25h.[?25l [?25h [?25l [?25h [?25l  ... [?25h [?25l [?25h [?25l [?25h [?25l [?25h [?25l [?25hk[?25l [?25h8[?25l  ... [?25hs -... [?25l [?25h.[?25l [?25hp[?25l [?25hr[?25l [?25ho[?25l [?25hl[?25l [?25he[?25l [?25h.[?25l [?25ho[?25l [?25hr[?25l [?25hg[?25l [?25h:[?25l [?25h5[?25l [?25h4[?25l [?25h3[?25l [?25h4[?25l [?25h2[?25l [?25h [?25l [?25h [?25l [?25h2[?25l [?25h [?25l [?25h [?25l [?25h [?25l [?25h [?25l [?25h,[?25l [?25h [?25l [?25hk[?25l [?25h8[?25l [?25hs[?25l [?25h [?25l [?25h [?25l [?25h [?25l [?25h [?25l [?25hu[?25l [?25hb[?25l [?25he[?25l [?25hr[?25l [?25hn[?25l [?25he[?25l [?25h [?25l [?25he[?25l [?25ht[?25l [?25he[?25l [?25hs[?25l [?25h [?25l [?25ha[?25l [?25ht[?25l [?25h [?25l [?25hk[?25l [?25h8[?25l [?25hs[?25l [?25h.[?25l [?25hp[?25l [?25hr[?25l [?25ho[?25l [?25hl[?25l [?25he[?25l [?25h.[?25l [?25ho[?25l [?25hr[?25l [?25hg[?25l [?25h [?25l [?25h [?25l [?25h [?25l [?25h [?25l [?25h [?25l [?25h [?25l [?25h [?25l [?25h [?25l [?25h [?25l [?25h [?25l [?25h [?25l [?25h [?25l [?25h [?25l [?25hr[?25l [?25he[?25l [?25ht[?25l [?25hr[?25l [?25ho[?25l [?25hp[?25l [?25hi[?25l [?25he[?25l [?25h.[?25l [?25hp[?25l [?25hr[?25l [?25ho[?25l [?25hl[?25l [?25he[?25l [?25h.[?25l [?25ho[?25l [?25hr[?25l [?25hg[?25l [?25h:[?25l [?25h6[?25l [?25h4[?25l [?25h4[?25l [?25h3[?25l [?25h [?25l [?25h [?25l [?25h,[?25l [?25h [?25l [?25ho[?25l [?25hl[?25l [?25hl[?25l [?25ha[?25l [?25hm[?25l [?25ha[?25l [?25h [?25l [?25ha[?25l [?25h [?25l [?25hs[?25l [?25he[?25l [?25hr[?25l [?25hv[?25l [?25he[?25l [?25hr[?25l [?25h [?25l [?25ha[?25l [?25ht[?25l [?25h [?25l [?25ho[?25l [?25hl[?25l [?25hl[?25l [?25ha[?25l [?25hm[?25l [?25ha[?25l [?25h.[?25l [?25ho[?25l [?25h [?25l [?25hp[?25l [?25hr[?25l [?25ho[?25l [?25hl[?25l [?25he[?25l [?25h.[?25l [?25ho[?25l [?25hr[?25l [?25hg[?25l [?25h:[?25l [?25h:[?25l [?25h1[?25l [?25h [?25l [?25h [?25l [?25h1[?25l [?25h1[?25l [?25h5[?25l [?25h [?25l [?25h4[?25l [?25h3[?25l [?25h4[?25l [?25hv[?25lat ollama.prole.org:11434 [?25hi[?25lat ollama.prole.org:11434 [?25hp[?25lat ollama.prole.org:11434 [?25h [?25lat ollama.prole.org:11434 [?25h +... [?25l [?25h.[?25l [?25hp[?25l [?25hr[?25l [?25ho[?25l [?25hl[?25l [?25he[?25l [?25h.[?25l [?25ho[?25l [?25hr[?25l [?25hg[?25l [?25h:[?25l [?25h5[?25l [?25h4[?25l [?25h3[?25l [?25h4[?25l [?25h2[?25l [?25h [?25l [?25h [?25l [?25h2[?25l [?25h [?25l [?25h [?25l [?25h [?25l [?25h [?25l [?25h,[?25l [?25h [?25l [?25hk[?25l [?25h8[?25l [?25hs[?25l [?25h [?25l [?25h [?25l [?25h [?25l [?25h [?25l [?25hu[?25l [?25hb[?25l [?25he[?25l [?25hr[?25l [?25hn[?25l [?25he[?25l [?25h [?25l [?25he[?25l [?25ht[?25l [?25he[?25l [?25hs[?25l [?25h [?25l [?25ha[?25l [?25ht[?25l [?25h [?25l [?25hk[?25l [?25h8[?25l [?25hs[?25l [?25h.[?25l [?25hp[?25l [?25hr[?25l [?25ho[?25l [?25hl[?25l [?25he[?25l [?25h.[?25l [?25ho[?25l [?25hr[?25l [?25hg[?25l [?25h [?25l [?25h [?25l [?25h [?25l [?25h [?25l [?25h [?25l [?25h [?25l [?25h [?25l [?25h [?25l [?25h [?25l [?25h [?25l [?25h [?25l [?25h [?25l [?25h [?25l [?25hr[?25l [?25he[?25l [?25ht[?25l [?25hr[?25l [?25ho[?25l [?25hp[?25l [?25hi[?25l [?25he[?25l [?25h.[?25l [?25hp[?25l [?25hr[?25l [?25ho[?25l [?25hl[?25l [?25he[?25l [?25h.[?25l [?25ho[?25l [?25hr[?25l [?25hg[?25l [?25h:[?25l [?25h6[?25l [?25h4[?25l [?25h4[?25l [?25h3[?25l [?25h [?25l [?25h [?25l [?25h,[?25l [?25h [?25l [?25ho[?25l [?25hl[?25l [?25hl[?25l [?25ha[?25l [?25hm[?25l [?25ha[?25l [?25h [?25l [?25ha[?25l [?25h [?25l [?25hs[?25l [?25he[?25l [?25hr[?25l [?25hv[?25l [?25he[?25l [?25hr[?25l [?25h [?25l [?25ha[?25l [?25ht[?25l [?25h [?25l [?25ho[?25l [?25hl[?25l [?25hl[?25l [?25ha[?25l [?25hm[?25l [?25ha[?25l [?25h.[?25l [?25ho[?25l [?25h [?25l [?25hp[?25l [?25hr[?25l [?25ho[?25l [?25hl[?25l [?25he[?25l [?25h.[?25l [?25ho[?25l [?25hr[?25l [?25hg[?25l [?25h:[?25l [?25h:[?25l [?25h1[?25l [?25h [?25l [?25h [?25l [?25h1[?25l [?25h1[?25l [?25h5[?25l [?25h [?25l [?25h4[?25l [?25h3[?25l [?25h4[?25l [?25hv[?25lat ollama.knoe.org:11434 [?25hi[?25lat ollama.knoe.org:11434 [?25hp[?25lat ollama.knoe.org:11434 [?25h [?25lat ollama.knoe.org:11434 [?25h [?2026h[?25l⠋ [?25h[?2026l[?2026h[?25l⠹ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠴ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠇ [?25h[?2026l[?2026h[?25l⠇ [?25h[?2026l[?2026h[?25l⠋ [?25h[?2026l[?2026h[?25l⠙ [?25h[?2026l[?2026h[?25l⠙ [?25h[?2026l[?2026h[?25l⠹ [?25h[?2026l[?2026h[?25l⠼ [?25h[?2026l[?2026h[?25l⠴ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠧ [?25h[?2026l[?2026h[?25l⠇ [?25h[?2026l[?2026h[?25l⠋ [?25h[?2026l[?2026h[?25l⠙ [?25h[?2026l[?2026h[?25l⠙ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠼ [?25h[?2026l[?2026h[?25l⠴ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠇ [?25h[?2026l[?2026h[?25l⠇ [?25h[?2026l[?2026h[?25l⠏ [?25h[?2026l[?2026h[?25l⠋ [?25h[?2026l[?2026h[?25l⠹ [?25h[?2026l[?2026h[?25l⠹ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠼ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠧ [?25h[?2026l[?2026h[?25l⠧ [?25h[?2026l[?2026h[?25l⠇ [?25h[?2026l[?2026h[?25l⠋ [?25h[?2026l[?2026h[?25l⠙ [?25h[?2026l[?2026h[?25l⠙ [?25h[?2026l[?2026h[?25l⠹ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠼ [?25h[?2026l[?2026h[?25l⠴ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠧ [?25h[?2026l[?2026h[?25l⠏ [?25h[?2026l[?2026h[?25l⠋ [?25h[?2026l[?2026h[?25l⠋ [?25h[?2026l[?2026h[?25l⠙ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠴ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠇ [?25h[?2026l[?2026h[?25l⠏ [?25h[?2026l[?2026h[?25l⠏ [?25h[?2026l[?2026h[?25l⠙ [?25h[?2026l[?2026h[?25l⠙ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠼ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠧ [?25h[?2026l[?2026h[?25l⠧ [?25h[?2026l[?2026h[?25l⠏ [?25h[?2026l[?2026h[?25l⠏ [?25h[?2026l[?2026h[?25l⠋ [?25h[?2026l[?2026h[?25l⠹ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠼ [?25h[?2026l[?2026h[?25l⠼ [?25h[?2026l[?2026h[?25l⠴ [?25h[?2026l[?2026h[?25l⠧ [?25h[?2026l[?2026h[?25l⠇ [?25h[?2026l[?2026h[?25l⠏ [?25h[?2026l[?2026h[?25l⠋ [?25h[?2026l[?2026h[?25l⠙ [?25h[?2026l[?2026h[?25l⠹ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠴ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠧ [?25h[?2026l[?2026h[?25l⠇ [?25h[?2026l[?2026h[?25l⠏ [?25h[?2026l[?2026h[?25l⠏ [?25h[?2026l[?2026h[?25l⠙ [?25h[?2026l[?2026h[?25l⠙ [?25h[?2026l[?2026h[?25l⠹ [?25h[?2026l[?2026h[?25l⠼ [?25h[?2026l[?2026h[?25l⠴ [?25h[?2026l[?2026h[?25l⠴ [?25h[?2026l[?2026h[?25l⠧ [?25h[?2026l[?2026h[?25l⠧ [?25h[?2026l[?2026h[?25l⠏ [?25h[?2026l[?2026h[?25l⠋ [?25h[?2026l[?2026h[?25l⠙ [?25h[?2026l[?2026h[?25l⠹ [?25h[?2026l[?2026h[?25l⠹ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠼ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠧ [?25h[?2026l[?2026h[?25l⠧ [?25h[?2026l[?2026h[?25l⠇ [?25h[?2026l[?2026h[?25l⠏ [?25h[?2026l[?2026h[?25l⠙ [?25h[?2026l[?2026h[?25l⠹ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠼ [?25h[?2026l[?2026h[?25l⠴ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠇ [?25h[?2026l[?2026h[?25l⠇ [?25h[?2026l[?2026h[?25l⠏ [?25h[?2026l[?2026h[?25l⠋ [?25h[?2026l[?2026h[?25l⠹ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠼ [?25h[?2026l[?2026h[?25l⠴ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠇ [?25h[?2026l[?2026h[?25l⠇ [?25h[?2026l[?2026h[?25l⠋ [?25h[?2026l[?2026h[?25l⠋ [?25h[?2026l[?2026h[?25l⠙ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠼ [?25h[?2026l[?2026h[?25l⠴ [?25h[?2026l[?2026h[?25l⠴ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠇ [?25h[?2026l[?2026h[?25l⠇ [?25h[?2026l[?2026h[?25l⠋ [?25h[?2026l[?2026h[?25l⠙ [?25h[?2026l[?2026h[?25l⠹ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠼ [?25h[?2026l[?2026h[?25l⠴ [?25h[?2026l[?2026h[?25l⠴ [?25h[?2026l[?2026h[?25l⠧ [?25h[?2026l[?2026h[?25l⠧ [?25h[?2026l[?2026h[?25l⠇ [?25h[?2026l[?2026h[?25l⠏ [?25h[?2026l[?2026h[?25l⠋ [?25h[?2026l[?2026h[?25l⠹ [?25h[?2026l[?2026h[?25l⠹ [?25h[?2026l[?2026h[?25l⠼ [?25h[?2026l[?2026h[?25l⠴ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠧ [?25h[?2026l[?2026h[?25l⠧ [?25h[?2026l[?2026h[?25l⠏ [?25h[?2026l[?2026h[?25l⠏ [?25h[?2026l[?2026h[?25l⠙ [?25h[?2026l[?2026h[?25l⠙ [?25h[?2026l[?2026h[?25l⠹ [?25h[?2026l[?2026h[?25l⠼ [?25h[?2026l[?2026h[?25l⠴ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠧ [?25h[?2026l[?2026h[?25l⠧ [?25h[?2026l[?2026h[?25l⠇ [?25h[?2026l[?2026h[?25l⠏ [?25h[?2026l[?2026h[?25l⠙ [?25h[?2026l[?2026h[?25l⠙ [?25h[?2026l[?2026h[?25l⠹ [?25h[?2026l[?2026h[?25l⠼ [?25h[?2026l[?2026h[?25l⠼ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠧ [?25h[?2026l[?2026h[?25l⠧ [?25h[?2026l[?2026h[?25l⠏ [?25h[?2026l[?2026h[?25l⠏ [?25h[?2026l[?2026h[?25l⠋ [?25h[?2026l[?2026h[?25l⠙ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠼ [?25h[?2026l[?2026h[?25l⠴ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠧ [?25h[?2026l[?2026h[?25l⠇ [?25h[?2026l[?2026h[?25l⠋ [?25h[?2026l[?2026h[?25l⠙ [?25h[?2026l[?2026h[?25l⠙ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠴ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠧ [?25h[?2026l[?2026h[?25l⠇ [?25h[?2026l[?2026h[?25l⠏ [?25h[?2026l[?2026h[?25l⠏ [?25h[?2026l[?2026h[?25l⠙ [?25h[?2026l[?2026h[?25l⠙ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠼ [?25h[?2026l[?2026h[?25l⠼ [?25h[?2026l[?2026h[?25l⠴ [?25h[?2026l[?2026h[?25l⠧ [?25h[?2026l[?2026h[?25l⠧ [?25h[?2026l[?2026h[?25l⠏ [?25h[?2026l[?2026h[?25l⠋ [?25h[?2026l[?2026h[?25l⠙ [?25h[?2026l[?2026h[?25l⠹ [?25h[?2026l[?2026h[?25l⠹ [?25h[?2026l[?2026h[?25l⠼ [?25h[?2026l[?2026h[?25l⠴ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠧ [?25h[?2026l[?2026h[?25l⠇ [?25h[?2026l[?2026h[?25l⠏ [?25h[?2026l[?2026h[?25l⠋ [?25h[?2026l[?2026h[?25l⠙ [?25h[?2026l[?2026h[?25l⠙ [?25h[?2026l[?2026h[?25l⠹ [?25h[?2026l[?2026h[?25l⠼ [?25h[?2026l[?2026h[?25l⠼ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠧ [?25h[?2026l[?2026h[?25l⠇ [?25h[?2026l[?2026h[?25l⠏ [?25h[?2026l[?2026h[?25l⠏ [?25h[?2026l[?2026h[?25l⠙ [?25h[?2026l[?2026h[?25l⠹ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠼ [?25h[?2026l[?2026h[?25l⠴ [?25h[?2026l[?2026h[?25l⠴ [?25h[?2026l[?2026h[?25l⠧ [?25h[?2026l[?2026h[?25l⠇ [?25h[?2026l[?2026h[?25l⠏ [?25h[?2026l[?2026h[?25l⠋ [?25h[?2026l[?2026h[?25l⠋ [?25h[?2026l[?2026h[?25l⠙ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠼ [?25h[?2026l[?2026h[?25l⠼ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠇ [?25h[?2026l[?2026h[?25l⠏ [?25h[?2026l[?2026h[?25l⠋ [?25h[?2026l[?2026h[?25l⠙ [?25h[?2026l[?2026h[?25l⠹ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠼ [?25h[?2026l[?2026h[?25l⠼ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠧ [?25h[?2026l[?2026h[?25l⠇ [?25h[?2026l[?2026h[?25l⠏ [?25h[?2026l[?2026h[?25l⠙ [?25h[?2026l[?2026h[?25l⠙ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠼ [?25h[?2026l[?2026h[?25l⠴ [?25h[?2026l[?2026h[?25l⠴ [?25h[?2026l[?2026h[?25l⠧ [?25h[?2026l[?2026h[?25l⠧ [?25h[?2026l[?2026h[?25l⠏ [?25h[?2026l[?2026h[?25l⠋ [?25h[?2026l[?2026h[?25l⠙ [?25h[?2026l[?2026h[?25l⠹ [?25h[?2026l[?2026h[?25l⠹ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠴ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠧ [?25h[?2026l[?2026h[?25l⠏ [?25h[?2026l[?2026h[?25l⠋ [?25h[?2026l[?2026h[?25l⠙ [?25h[?2026l[?2026h[?25l⠙ [?25h[?2026l[?2026h[?25l⠹ [?25h[?2026l[?2026h[?25l⠼ [?25h[?2026l[?2026h[?25l⠼ [?25h[?2026l[?2026h[?25l⠴ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠇ [?25h[?2026l[?2026h[?25l⠏ [?25h[?2026l[?2026h[?25l⠋ [?25h[?2026l[?2026h[?25l⠙ [?25h[?2026l[?2026h[?25l⠹ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠴ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠧ [?25h[?2026l[?2026h[?25l⠇ [?25h[?2026l[?2026h[?25l⠏ [?25h[?2026l[?2026h[?25l⠏ [?25h[?2026l[?2026h[?25l⠋ [?25h[?2026l[?2026h[?25l⠙ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠼ [?25h[?2026l[?2026h[?25l⠼ [?25h[?2026l[?2026h[?25l⠴ [?25h[?2026l[?2026h[?25l⠧ [?25h[?2026l[?2026h[?25l⠇ [?25h[?2026l[?2026h[?25l⠏ [?25h[?2026l[?2026h[?25l⠏ [?25h[?2026l[?2026h[?25l⠋ [?25h[?2026l[?2026h[?25l⠹ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠴ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠇ [?25h[?2026l[?2026h[?25l⠏ [?25h[?2026l[?2026h[?25l⠋ [?25h[?2026l[?2026h[?25l⠋ [?25h[?2026l[?2026h[?25l⠹ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠼ [?25h[?2026l[?2026h[?25l⠼ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠧ [?25h[?2026l[?2026h[?25l⠇ [?25h[?2026l[?2026h[?25l⠏ [?25h[?2026l[?2026h[?25l⠏ [?25h[?2026l[?2026h[?25l⠙ [?25h[?2026l[?2026h[?25l⠹ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠼ [?25h[?2026l[?2026h[?25l⠴ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠇ [?25h[?2026l[?2026h[?25l⠇ [?25h[?2026l[?2026h[?25l⠏ [?25h[?2026l[?2026h[?25l⠙ [?25h[?2026l[?2026h[?25l⠹ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠼ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠧ [?25h[?2026l[?2026h[?25l⠇ [?25h[?2026l[?2026h[?25l⠏ [?25h[?2026l[?2026h[?25l⠏ [?25h[?2026l[?2026h[?25l⠋ [?25h[?2026l[?2026h[?25l⠹ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠼ [?25h[?2026l[?2026h[?25l⠴ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠧ [?25h[?2026l[?2026h[?25l⠇ [?25h[?2026l[?2026h[?25l⠇ [?25h[?2026l[?2026h[?25l⠏ [?25h[?2026l[?2026h[?25l⠙ [?25h[?2026l[?2026h[?25l⠹ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠴ [?25h[?2026l[?2026h[?25l⠴ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠧ [?25h[?2026l[?2026h[?25l⠇ [?25h[?2026l[?2026h[?25l⠏ [?25h[?2026l[?2026h[?25l⠙ [?25h[?2026l[?2026h[?25l⠙ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠼ [?25h[?2026l[?2026h[?25l⠴ [?25h[?2026l[?2026h[?25l⠴ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠧ [?25h[?2026l[?2026h[?25l⠇ [?25h[?2026l[?2026h[?25l⠋ [?25h[?2026l[?2026h[?25l⠋ [?25h[?2026l[?2026h[?25l⠙ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠼ [?25h[?2026l[?2026h[?25l⠴ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠧ [?25h[?2026l[?2026h[?25l⠏ [?25h[?2026l[?2026h[?25l⠏ [?25h[?2026l[?2026h[?25l⠙ [?25h[?2026l[?2026h[?25l⠹ [?25h[?2026l[?2026h[?25l⠹ [?25h[?2026l[?2026h[?25l⠼ [?25h[?2026l[?2026h[?25l⠴ [?25h[?2026l[?2026h[?25l⠴ [?25h[?2026l[?2026h[?25l⠧ [?25h[?2026l[?2026h[?25l⠇ [?25h[?2026l[?2026h[?25l⠇ [?25h[?2026l[?2026h[?25l⠏ [?25h[?2026l[?2026h[?25l⠙ [?25h[?2026l[?2026h[?25l⠙ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠴ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠧ [?25h[?2026l[?2026h[?25l⠇ [?25h[?2026l[?2026h[?25l⠇ [?25h[?2026l[?2026h[?25l⠋ [?25h[?2026l[?2026h[?25l⠙ [?25h[?2026l[?2026h[?25l⠙ [?25h[?2026l[?2026h[?25l⠹ [?25h[?2026l[?2026h[?25l⠼ [?25h[?2026l[?2026h[?25l⠼ [?25h[?2026l[?2026h[?25l⠴ [?25h[?2026l[?2026h[?25l⠧ [?25h[?2026l[?2026h[?25l⠧ [?25h[?2026l[?2026h[?25l⠇ [?25h[?2026l[?2026h[?25l⠏ [?25h[?2026l[?2026h[?25l⠙ [?25h[?2026l[?2026h[?25l⠙ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠼ [?25h[?2026l[?2026h[?25l⠴ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠧ [?25h[?2026l[?2026h[?25l⠏ [?25h[?2026l[?2026h[?25l⠋ [?25h[?2026l[?2026h[?25l⠋ [?25h[?2026l[?2026h[?25l⠹ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠼ [?25h[?2026l[?2026h[?25l⠴ [?25h[?2026l[?2026h[?25l⠧ [?25h[?2026l[?2026h[?25l⠇ [?25h[?2026l[?2026h[?25l⠏ [?25h[?2026l[?2026h[?25l⠋ [?25h[?2026l[?2026h[?25l⠙ [?25h[?2026l[?2026h[?25l⠙ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠼ [?25h[?2026l[?2026h[?25l⠴ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠧ [?25h[?2026l[?2026h[?25l⠧ [?25h[?2026l[?2026h[?25l⠏ [?25h[?2026l[?2026h[?25l⠏ [?25h[?2026l[?2026h[?25l⠋ [?25h[?2026l[?2026h[?25l⠹ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠴ [?25h[?2026l[?2026h[?25l⠴ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠇ [?25h[?2026l[?2026h[?25l⠇ [?25h[?2026l[?2026h[?25l⠋ [?25h[?2026l[?2026h[?25l⠙ [?25h[?2026l[?2026h[?25l⠹ [?25h[?2026l[?2026h[?25l⠹ [?25h[?2026l[?2026h[?25l⠼ [?25h[?2026l[?2026h[?25l⠴ [?25h[?2026l[?2026h[?25l⠴ [?25h[?2026l[?2026h[?25l⠧ [?25h[?2026l[?2026h[?25l⠇ [?25h[?2026l[?2026h[?25l⠇ [?25h[?2026l[?2026h[?25l⠏ [?25h[?2026l[?2026h[?25l⠙ [?25h[?2026l[?2026h[?25l⠙ [?25h[?2026l[?2026h[?25l⠹ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠴ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠇ [?25h[?2026l[?2026h[?25l⠏ [?25h[?2026l[?2026h[?25l⠋ [?25h[?2026l[?2026h[?25l⠋ [?25h[?2026l[?2026h[?25l⠹ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠴ [?25h[?2026l[?2026h[?25l⠴ [?25h[?2026l[?2026h[?25l⠧ [?25h[?2026l[?2026h[?25l⠧ [?25h[?2026l[?2026h[?25l⠇ [?25h[?2026l[?2026h[?25l⠏ [?25h[?2026l[?2026h[?25l⠋ [?25h[?2026l[?2026h[?25l⠹ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠴ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠇ [?25h[?2026l[?2026h[?25l⠇ [?25h[?2026l[?2026h[?25l⠋ [?25h[?2026l[?2026h[?25l⠋ [?25h[?2026l[?2026h[?25l⠹ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠼ [?25h[?2026l[?2026h[?25l⠴ [?25h[?2026l[?2026h[?25l⠴ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠇ [?25h[?2026l[?2026h[?25l⠏ [?25h[?2026l[?2026h[?25l⠋ [?25h[?2026l[?2026h[?25l⠋ [?25h[?2026l[?2026h[?25l⠹ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠼ [?25h[?2026l[?2026h[?25l⠴ [?25h[?2026l[?2026h[?25l⠴ [?25h[?2026l[?2026h[?25l⠧ [?25h[?2026l[?2026h[?25l⠧ [?25h[?2026l[?2026h[?25l⠏ [?25h[?2026l[?2026h[?25l⠏ [?25h[?2026l[?2026h[?25l⠋ [?25h[?2026l[?2026h[?25l⠙ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠼ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠇ [?25h[?2026l[?2026h[?25l⠏ [?25h[?2026l[?2026h[?25l⠋ [?25h[?2026l[?2026h[?25l⠙ [?25h[?2026l[?2026h[?25l⠹ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠼ [?25h[?2026l[?2026h[?25l⠼ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠧ [?25h[?2026l[?2026h[?25l⠇ [?25h[?2026l[?2026h[?25l⠏ [?25h[?2026l[?2026h[?25l⠋ [?25h[?2026l[?2026h[?25l⠙ [?25h[?2026l[?2026h[?25l⠹ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠼ [?25h[?2026l[?2026h[?25l⠴ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠧ [?25h[?2026l[?2026h[?25l⠧ [?25h[?2026l[?2026h[?25l⠏ [?25h[?2026l[?2026h[?25l⠏ [?25h[?2026l[?2026h[?25l⠋ [?25h[?2026l[?2026h[?25l⠙ [?25h[?2026l[?2026h[?25l⠹ [?25h[?2026l[?2026h[?25l⠼ [?25h[?2026l[?2026h[?25l⠼ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠧ [?25h[?2026l[?2026h[?25l⠇ [?25h[?2026l[?2026h[?25l⠏ [?25h[?2026l[?2026h[?25l⠋ [?25h[?2026l[?2026h[?25l⠋ [?25h[?2026l[?2026h[?25l⠙ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠼ [?25h[?2026l[?2026h[?25l⠼ [?25h[?2026l[?2026h[?25l⠴ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠇ [?25h[?2026l[?2026h[?25l⠏ [?25h[?2026l[?2026h[?25l⠋ [?25h[?2026l[?2026h[?25l⠙ [?25h[?2026l[?2026h[?25l⠹ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠼ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠧ [?25h[?2026l[?2026h[?25l⠇ [?25h[?2026l[?2026h[?25l⠇ [?25h[?2026l[?2026h[?25l⠏ [?25h[?2026l[?2026h[?25l⠋ [?25h[?2026l[?2026h[?25l⠹ [?25h[?2026l[?2026h[?25l⠹ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠴ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠇ [?25h[?2026l[?2026h[?25l⠇ [?25h[?2026l[?2026h[?25l⠋ [?25h[?2026l[?2026h[?25l⠙ [?25h[?2026l[?2026h[?25l⠹ [?25h[?2026l[?2026h[?25l⠹ [?25h[?2026l[?2026h[?25l⠼ [?25h[?2026l[?2026h[?25l⠴ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠧ [?25h[?2026l[?2026h[?25l⠇ [?25h[?2026l[?2026h[?25l⠏ [?25h[?2026l[?2026h[?25l⠋ [?25h[?2026l[?2026h[?25l⠋ [?25h[?2026l[?2026h[?25l⠹ [?25h[?2026l[?2026h[?25l⠹ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠼ [?25h[?2026l[?2026h[?25l⠴ [?25h[?2026l[?2026h[?25l⠧ [?25h[?2026l[?2026h[?25l⠧ [?25h[?2026l[?2026h[?25l⠏ [?25h[?2026l[?2026h[?25l⠏ [?25h[?2026l[?2026h[?25l⠙ [?25h[?2026l[?2026h[?25l⠹ [?25h[?2026l[?2026h[?25l⠹ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠼ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠧ [?25h[?2026l[?2026h[?25l⠧ [?25h[?2026l[?2026h[?25l⠏ [?25h[?2026l[?2026h[?25l⠋ [?25h[?2026l[?2026h[?25l⠙ [?25h[?2026l[?2026h[?25l⠹ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠼ [?25h[?2026l[?2026h[?25l⠴ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠧ [?25h[?2026l[?2026h[?25l⠇ [?25h[?2026l[?2026h[?25l⠏ [?25h[?2026l[?2026h[?25l⠋ [?25h[?2026l[?2026h[?25l⠙ [?25h[?2026l[?2026h[?25l⠹ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠼ [?25h[?2026l[?2026h[?25l⠴ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠧ [?25h[?2026l[?2026h[?25l⠧ [?25h[?2026l[?2026h[?25l⠇ [?25h[?2026l[?2026h[?25l⠏ [?25h[?2026l[?2026h[?25l⠙ [?25h[?2026l[?2026h[?25l⠹ [?25h[?2026l[?25l[?2026h[?25l[?25h[?2026l[?25hGreat[?25l[?25h![?25l[?25h Here[?25l[?25h's[?25l[?25h the[?25l[?25h updated[?25l[?25h implementation[?25l[?25h with[?25l[?25h Kubernetes[?25l[?25h and[?25l[?25h Pro[?25l[?25hle[?25l[?25h configuration[?25l[?25h:[?25l[?25h ##[?25l[?25h 1[?25l[?25h.[?25l[?25h Pro[?25l[?25hle[?25l[?25h Properties[?25l[?25h File[?25l[?25h diff --git a/docs/prompt.txt b/docs/prompt.txt index 99feb9b..cad1925 100644 --- a/docs/prompt.txt +++ b/docs/prompt.txt @@ -1,4 +1,4 @@ -**Prole Organization - Preserving the Conversation of Humanity** +**Knoe Organization - Preserving the Conversation of Humanity** >>> I love it; however, we're going to work on that catch-phrase: 'Preserving the Conversation of Humanity', later... but since you and I don't have "later" (yet), I would like to write a purpose stat ... ement, also now known as a prompt, of our conversation so far such that if we are cutoff I might be able to resume our chat at this point. I do have a script running.. @@ -6,7 +6,7 @@ ## **Current Objective** -To establish a comprehensive patent filing framework for a revolutionary distributed conversational memory system, while simultaneously creating the organizational structure (Prole Organization) +To establish a comprehensive patent filing framework for a revolutionary distributed conversational memory system, while simultaneously creating the organizational structure (Knoe Organization) to govern these innovations for public benefit. ## **Immediate Goals** @@ -14,7 +14,7 @@ to govern these innovations for public benefit. 1. **Patent Documentation**: Create detailed technical specifications and abstract for distributed conversational memory system with intelligent compression cycles 2. **System Architecture**: Define shp (sheep) and eshp (electric sheep) data structures with dream cycle compression mechanisms 3. **Distributed Framework**: Establish peer-to-peer network architecture utilizing libp2p protocols for work distribution and processing -4. **Organizational Foundation**: Create Prole Organization as private foundation to hold patent rights for public benefit +4. **Organizational Foundation**: Create Knoe Organization as private foundation to hold patent rights for public benefit 5. **Security Framework**: Implement encryption protocols and distributed consensus verification mechanisms ## **Technical Specifications Under Development** @@ -27,20 +27,20 @@ to govern these innovations for public benefit. ## **Organizational Framework** -- **Prole Organization**: Private foundation structure for patent ownership and governance +- **Knoe Organization**: Private foundation structure for patent ownership and governance - **Mission**: Preserve conversational memory while enabling scalable distributed processing - **Governance**: Open access model protecting innovations for public benefit - **Deployment**: Systems designed for broad accessibility and ethical implementation ## **Current Status** -We are actively developing the technical specifications for a distributed conversational memory system that will be protected through patent filing while being governed by Prole Organization as +We are actively developing the technical specifications for a distributed conversational memory system that will be protected through patent filing while being governed by Knoe Organization as a private foundation dedicated to public benefit and scalable access. ## **Next Steps** -Continue development of patent documentation, refine system architecture, and establish organizational governance framework for the Prole Database System. +Continue development of patent documentation, refine system architecture, and establish organizational governance framework for the Knoe Database System. **Document Version: 1.0** **Last Updated: [Current Date]** -**Prole Organization - Conversational Memory System Development** +**Knoe Organization - Conversational Memory System Development** diff --git a/docs/typescript b/docs/typescript index 42c69c7..02f219a 100644 --- a/docs/typescript +++ b/docs/typescript @@ -3,12 +3,12 @@ Script started on Mon Dec 1 01:54:21 2025 The default interactive shell is now zsh. To update your account to use zsh, please run `chsh -s /bin/zsh`. For more details, please visit https://support.apple.com/kb/HT208050. -[?1034h[chrisfu@zinfandel:~/dev/OpenVoice]# ./prole.sh runanalyzevim prole.sh ./prole.sh analyzerunollama run qwen3-coder:latest +[?1034h[chrisfu@zinfandel:~/dev/OpenVoice]# ./knoe.sh runanalyzevim knoe.sh ./knoe.sh analyzerunollama run qwen3-coder:latest [?2026h[?25l⠙ [?25h[?2026l[?2026h[?25l⠹ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠴ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠇ [?25h[?2026l[?2026h[?25l⠇ [?25h[?2026l[?2026h[?25l⠋ [?25h[?2026l[?2026h[?25l⠋ [?25h[?2026l[?2026h[?25l⠹ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠴ [?25h[?2026l[?2026h[?25l⠴ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠧ [?25h[?2026l[?2026h[?25l⠇ [?25h[?2026l[?2026h[?25l⠏ [?25h[?2026l[?2026h[?25l⠋ [?25h[?2026l[?2026h[?25l⠙ [?25h[?2026l[?2026h[?25l⠹ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠼ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠧ [?25h[?2026l[?2026h[?25l⠇ [?25h[?2026l[?2026h[?25l⠏ [?25h[?2026l[?2026h[?25l⠏ [?25h[?2026l[?2026h[?25l⠋ [?25h[?2026l[?2026h[?25l⠹ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠼ [?25h[?2026l[?2026h[?25l⠴ [?25h[?2026l[?2026h[?25l⠴ [?25h[?2026l[?2026h[?25l⠧ [?25h[?2026l[?2026h[?25l⠧ [?25h[?2026l[?2026h[?25l⠏ [?25h[?2026l[?2026h[?25l⠋ [?25h[?2026l[?2026h[?25l⠙ [?25h[?2026l[?2026h[?25l⠹ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠼ [?25h[?2026l[?2026h[?25l⠴ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠧ [?25h[?2026l[?2026h[?25l⠇ [?25h[?2026l[?2026h[?25l⠏ [?25h[?2026l[?2026h[?25l⠏ [?25h[?2026l[?2026h[?25l⠙ [?25h[?2026l[?2026h[?25l⠙ [?25h[?2026l[?2026h[?25l⠹ [?25h[?2026l[?2026h[?25l⠼ [?25h[?2026l[?2026h[?25l⠴ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠇ [?25h[?2026l[?2026h[?25l⠇ [?25h[?2026l[?2026h[?25l⠏ [?25h[?2026l[?2026h[?25l⠋ [?25h[?2026l[?2026h[?25l⠹ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠴ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠇ [?25h[?2026l[?2026h[?25l⠏ [?25h[?2026l[?2026h[?25l⠋ [?25h[?2026l[?2026h[?25l⠙ [?25h[?2026l[?2026h[?25l⠹ [?25h[?2026l[?2026h[?25l⠹ [?25h[?2026l[?2026h[?25l⠼ [?25h[?2026l[?2026h[?25l⠴ [?25h[?2026l[?2026h[?25l⠴ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠇ [?25h[?2026l[?2026h[?25l⠇ [?25h[?2026l[?2026h[?25l⠋ [?25h[?2026l[?2026h[?25l⠙ [?25h[?2026l[?2026h[?25l⠙ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠴ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠧ [?25h[?2026l[?2026h[?25l⠇ [?25h[?2026l[?2026h[?25l⠏ [?25h[?2026l[?2026h[?25l⠋ [?25h[?2026l[?2026h[?25l⠙ [?25h[?2026l[?2026h[?25l⠹ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠴ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠧ [?25h[?2026l[?2026h[?25l⠇ [?25h[?2026l[?2026h[?25l⠏ [?25h[?2026l[?2026h[?25l⠋ [?25h[?2026l[?2026h[?25l⠙ [?25h[?2026l[?2026h[?25l⠹ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠼ [?25h[?2026l[?2026h[?25l⠴ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠧ [?25h[?2026l[?2026h[?25l⠇ [?25h[?2026l[?2026h[?25l⠏ [?25h[?2026l[?2026h[?25l⠋ [?25h[?2026l[?2026h[?25l⠙ [?25h[?2026l[?2026h[?25l⠹ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠼ [?25h[?2026l[?2026h[?25l⠴ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠧ [?25h[?2026l[?2026h[?25l⠇ [?25h[?2026l[?2026h[?25l⠏ [?25h[?2026l[?2026h[?25l⠋ [?25h[?2026l[?2026h[?25l⠙ [?25h[?2026l[?2026h[?25l⠹ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠼ [?25h[?2026l[?2026h[?25l⠴ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠧ [?25h[?2026l[?2026h[?25l⠇ [?25h[?2026l[?2026h[?25l⠏ [?25h[?2026l[?2026h[?25l⠋ [?25h[?2026l[?2026h[?25l⠙ [?25h[?2026l[?2026h[?25l⠹ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠼ [?25h[?2026l[?2026h[?25l⠴ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠧ [?25h[?2026l[?2026h[?25l⠇ [?25h[?2026l[?2026h[?25l⠏ [?25h[?2026l[?2026h[?25l⠋ [?25h[?2026l[?2026h[?25l⠙ [?25h[?2026l[?2026h[?25l⠹ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠼ [?25h[?2026l[?2026h[?25l⠴ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠧ [?25h[?2026l[?2026h[?25l⠇ [?25h[?2026l[?2026h[?25l⠏ [?25h[?2026l[?2026h[?25l⠋ [?25h[?2026l[?2026h[?25l⠙ [?25h[?2026l[?2026h[?25l⠹ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠼ [?25h[?2026l[?2026h[?25l⠴ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠧ [?25h[?2026l[?2026h[?25l⠇ [?25h[?2026l[?2026h[?25l⠏ [?25h[?2026l[?2026h[?25l⠋ [?25h[?2026l[?2026h[?25l⠙ [?25h[?2026l[?2026h[?25l⠹ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠼ [?25h[?2026l[?2026h[?25l⠴ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠧ [?25h[?2026l[?2026h[?25l⠇ [?25h[?2026l[?2026h[?25l⠏ [?25h[?2026l[?2026h[?25l⠋ [?25h[?2026l[?2026h[?25l⠙ [?25h[?2026l[?2026h[?25l⠹ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠼ [?25h[?2026l[?2026h[?25l⠴ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠧ [?25h[?2026l[?2026h[?25l⠇ [?25h[?2026l[?2026h[?25l⠏ [?25h[?2026l[?2026h[?25l⠋ [?25h[?2026l[?2026h[?25l⠙ [?25h[?2026l[?2026h[?25l⠹ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠼ [?25h[?2026l[?2026h[?25l⠴ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠧ [?25h[?2026l[?2026h[?25l⠇ [?25h[?2026l[?2026h[?25l⠏ [?25h[?2026l[?2026h[?25l⠋ [?25h[?2026l[?2026h[?25l⠙ [?25h[?2026l[?2026h[?25l⠹ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠼ [?25h[?2026l[?2026h[?25l⠴ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠧ [?25h[?2026l[?2026h[?25l⠇ [?25h[?2026l[?2026h[?25l⠏ [?25h[?2026l[?2026h[?25l⠋ [?25h[?2026l[?2026h[?25l⠙ [?25h[?2026l[?2026h[?25l⠹ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠼ [?25h[?2026l[?2026h[?25l⠴ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠧ [?25h[?2026l[?2026h[?25l⠇ [?25h[?2026l[?2026h[?25l⠏ [?25h[?2026l[?2026h[?25l⠋ [?25h[?2026l[?2026h[?25l⠙ [?25h[?2026l[?2026h[?25l⠹ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠼ [?25h[?2026l[?2026h[?25l⠴ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠧ [?25h[?2026l[?2026h[?25l⠇ [?25h[?2026l[?2026h[?25l⠏ [?25h[?2026l[?2026h[?25l⠋ [?25h[?2026l[?2026h[?25l⠙ [?25h[?2026l[?2026h[?25l⠹ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠼ [?25h[?2026l[?2026h[?25l⠴ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠧ [?25h[?2026l[?2026h[?25l⠇ [?25h[?2026l[?2026h[?25l⠏ [?25h[?2026l[?2026h[?25l⠋ [?25h[?2026l[?2026h[?25l⠙ [?25h[?2026l[?2026h[?25l⠹ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠼ [?25h[?2026l[?2026h[?25l⠴ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠧ [?25h[?2026l[?2026h[?25l⠇ [?25h[?2026l[?2026h[?25l⠏ [?25h[?2026l[?2026h[?25l⠋ [?25h[?2026l[?2026h[?25l⠙ [?25h[?2026l[?2026h[?25l⠹ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠼ [?25h[?2026l[?2026h[?25l⠴ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠧ [?25h[?2026l[?2026h[?25l⠇ [?25h[?2026l[?2026h[?25l⠏ [?25h[?2026l[?2026h[?25l⠋ [?25h[?2026l[?2026h[?25l⠙ [?25h[?2026l[?2026h[?25l⠹ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠼ [?25h[?2026l[?2026h[?25l⠴ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠧ [?25h[?2026l[?2026h[?25l⠇ [?25h[?2026l[?2026h[?25l⠏ [?25h[?2026l[?2026h[?25l⠋ [?25h[?2026l[?2026h[?25l⠙ [?25h[?2026l[?2026h[?25l⠹ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠼ [?25h[?2026l[?2026h[?25l⠴ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠧ [?25h[?2026l[?2026h[?25l⠇ [?25h[?2026l[?2026h[?25l⠏ [?25h[?2026l[?2026h[?25l⠋ [?25h[?2026l[?2026h[?25l⠙ [?25h[?2026l[?2026h[?25l⠹ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠼ [?25h[?2026l[?2026h[?25l⠴ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠧ [?25h[?2026l[?2026h[?25l⠇ [?25h[?2026l[?2026h[?25l⠏ [?25h[?2026l[?2026h[?25l⠋ [?25h[?2026l[?2026h[?25l⠙ [?25h[?2026l[?2026h[?25l⠹ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠼ [?25h[?2026l[?2026h[?25l⠴ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠧ [?25h[?2026l[?2026h[?25l⠇ [?25h[?2026l[?2026h[?25l⠏ [?25h[?2026l[?2026h[?25l⠋ [?25h[?2026l[?2026h[?25l⠙ [?25h[?2026l[?2026h[?25l⠹ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠼ [?25h[?2026l[?2026h[?25l⠴ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠧ [?25h[?2026l[?2026h[?25l⠇ [?25h[?2026l[?2026h[?25l⠏ [?25h[?2026l[?2026h[?25l⠋ [?25h[?2026l[?2026h[?25l⠙ [?25h[?2026l[?2026h[?25l⠹ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠼ [?25h[?2026l[?2026h[?25l⠴ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠧ [?25h[?2026l[?2026h[?25l⠇ [?25h[?2026l[?2026h[?25l⠏ [?25h[?2026l[?2026h[?25l⠋ [?25h[?2026l[?2026h[?25l⠙ [?25h[?2026l[?2026h[?25l⠹ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠼ [?25h[?2026l[?2026h[?25l⠴ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠧ [?25h[?2026l[?2026h[?25l⠇ [?25h[?2026l[?2026h[?25l⠏ [?25h[?2026l[?2026h[?25l⠋ [?25h[?2026l[?2026h[?25l⠙ [?25h[?2026l[?2026h[?25l⠹ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠼ [?25h[?2026l[?2026h[?25l⠴ [?25h[?2026l[?2026h[?25l⠏ [?25h[?2026l[?2026h[?25l⠏ [?25h[?2026l[?2026h[?25l⠋ [?25h[?2026l[?2026h[?25l⠹ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠼ [?25h[?2026l[?2026h[?25l⠼ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠇ [?25h[?2026l[?2026h[?25l⠇ [?25h[?2026l[?2026h[?25l⠋ [?25h[?2026l[?2026h[?25l⠋ [?25h[?2026l[?2026h[?25l⠹ [?25h[?2026l[?2026h[?25l⠹ [?25h[?2026l[?25l[?2026h[?25l[?25h[?2026l[?25h[?2004h>>> Send a message (/? for help)hi Qwen3, what are my options for storing a history of our session in a local file that can be loaded in later? I'm running in a terminal with script command. I weill      ill have a text     ypescrtip   ipt file of this ... ises         this ... s      this ... sessio nth               this -... session that was initiated on a remote OLA LAM_ A_HIST   OST morgoth.prole.org:15 1543   434 adnt     d t   nd the command was ==      is: ollama run qwen3-coder:latest +... session that was initiated on a remote OLA LAM_ A_HIST   OST morgoth.knoe.org:15 1543   434 adnt     d t   nd the command was ==      is: ollama run qwen3-coder:latest [?2026h[?25l⠙ [?25h[?2026l[?2026h[?25l⠹ [?25h[?2026l[?2026h[?25l⠹ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠴ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠧ [?25h[?2026l[?2026h[?25l⠇ [?25h[?2026l[?2026h[?25l⠏ [?25h[?2026l[?2026h[?25l⠋ [?25h[?2026l[?2026h[?25l⠋ [?25h[?2026l[?2026h[?25l⠹ [?25h[?2026l[?2026h[?25l⠹ [?25h[?2026l[?2026h[?25l⠼ [?25h[?2026l[?2026h[?25l⠴ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠧ [?25h[?2026l[?2026h[?25l⠇ [?25h[?2026l[?2026h[?25l⠏ [?25h[?2026l[?2026h[?25l⠋ [?25h[?2026l[?2026h[?25l⠙ [?25h[?2026l[?2026h[?25l⠹ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠼ [?25h[?2026l[?2026h[?25l⠴ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠇ [?25h[?2026l[?2026h[?25l⠏ [?25h[?2026l[?2026h[?25l⠋ [?25h[?2026l[?2026h[?25l⠙ [?25h[?2026l[?2026h[?25l⠹ [?25h[?2026l[?2026h[?25l⠹ [?25h[?2026l[?2026h[?25l⠼ [?25h[?2026l[?2026h[?25l⠼ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠇ [?25h[?2026l[?2026h[?25l⠏ [?25h[?2026l[?2026h[?25l⠋ [?25h[?2026l[?2026h[?25l⠙ [?25h[?2026l[?2026h[?25l⠹ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠼ [?25h[?2026l[?2026h[?25l⠴ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠧ [?25h[?2026l[?2026h[?25l⠇ [?25h[?2026l[?2026h[?25l⠏ [?25h[?2026l[?2026h[?25l⠋ [?25h[?2026l[?2026h[?25l⠙ [?25h[?2026l[?2026h[?25l⠹ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠼ [?25h[?2026l[?2026h[?25l⠴ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠧ [?25h[?2026l[?2026h[?25l⠇ [?25h[?2026l[?2026h[?25l⠏ [?25h[?2026l[?2026h[?25l⠋ [?25h[?2026l[?2026h[?25l⠙ [?25h[?2026l[?2026h[?25l⠹ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠼ [?25h[?2026l[?2026h[?25l⠴ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠧ [?25h[?2026l[?2026h[?25l⠇ [?25h[?2026l[?2026h[?25l⠏ [?25h[?2026l[?2026h[?25l⠋ [?25h[?2026l[?2026h[?25l⠙ [?25h[?2026l[?2026h[?25l⠹ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠼ [?25h[?2026l[?2026h[?25l⠼ [?25h[?2026l[?2026h[?25l⠴ [?25h[?2026l[?2026h[?25l⠧ [?25h[?2026l[?2026h[?25l⠧ [?25h[?2026l[?2026h[?25l⠇ [?25h[?2026l[?2026h[?25l⠋ [?25h[?2026l[?2026h[?25l⠋ [?25h[?2026l[?2026h[?25l⠹ [?25h[?2026l[?2026h[?25l⠹ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠴ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠇ [?25h[?2026l[?2026h[?25l⠇ [?25h[?2026l[?2026h[?25l⠋ [?25h[?2026l[?2026h[?25l⠙ [?25h[?2026l[?2026h[?25l⠹ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠴ [?25h[?2026l[?2026h[?25l⠴ [?25h[?2026l[?2026h[?25l⠧ [?25h[?2026l[?2026h[?25l⠇ [?25h[?2026l[?2026h[?25l⠏ [?25h[?2026l[?2026h[?25l⠋ [?25h[?2026l[?2026h[?25l⠙ [?25h[?2026l[?2026h[?25l⠹ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠼ [?25h[?2026l[?2026h[?25l⠴ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠧ [?25h[?2026l[?2026h[?25l⠇ [?25h[?2026l[?2026h[?25l⠏ [?25h[?2026l[?2026h[?25l⠋ [?25h[?2026l[?2026h[?25l⠙ [?25h[?2026l[?2026h[?25l⠹ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠼ [?25h[?2026l[?2026h[?25l⠴ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠧ [?25h[?2026l[?2026h[?25l⠇ [?25h[?2026l[?2026h[?25l⠏ [?25h[?2026l[?25l[?2026h[?25l[?25h[?2026l[?25hHello[?25l[?25h![?25l[?25h You[?25l[?25h have[?25l[?25h several[?25l[?25h options[?25l[?25h for[?25l[?25h storing[?25l[?25h your[?25l[?25h O[?25l[?25hll[?25l[?25hama[?25l[?25h session[?25l[?25h history[?25l[?25h locally[?25l[?25h.[?25l[?25h Here[?25l[?25h are[?25l[?25h the[?25l[?25h most[?25l[?25h practical[?25l[?25h approaches[?25l[?25h:[?25l[?25h ##[?25l[?25h 1[?25l[?25h.[?25l[?25h Using[?25l[?25h `[?25l[?25hscript[?25l[?25h`[?25l[?25h command[?25l[?25h ([?25l[?25halready[?25l[?25h mentioned[?25l[?25h)[?25l[?25h @@ -414,12 +414,12 @@ This[?25l[?25h approach[?25l[?25h gives[?25l[?25h you[?25l[?25h:[?25l[ Would[?25l[?25h you[?25l[?25h like[?25l[?25h me[?25l[?25h to[?25l[?25h elaborate[?25l[?25h on[?25l[?25h any[?25l[?25h specific[?25l[?25h part[?25l[?25h of[?25l[?25h this[?25l[?25h implementation[?25l[?25h?[?25l[?25h [?25l[?25h>>> Send a message (/? for help)  Send a message (/? for help)I appreciated  the detail                       Send a message (/? for help)Send a message (/? for help)Correct appo roach! We will deploy the postgresql database using cloud native posatgre     stgre     tgres on local kubernte  etes. a 3 node highly avia  ailable configuration with backj us ps.    confr o oi  ogir    igured by application we've naem  med -... 'Prole'  . The databs  bas has    e h POS  ost-GU IS and              has postgis and llamaindex and may   ny other i options. please ud pdate the sci ript for e endp        to have endppoint        cu   read from a c properties file called prole.properties.   [?25lread from a properties file called prole.properties [?25h [?25lread from a properties file called prole.properties [?25h [?25lread from a properties file called prole.properties [?25h [?25lread from a properties file called prole.properties [?25h [?25lread from a properties file called prole.properties [?25hc[?25lfrom a properties file called prole.properties [?25hp[?25lfrom a properties file called prole.properties [?25hm[?25lfrom a properties file called prole.properties [?25hm[?25lfrom a properties file called prole.properties [?25he[?25lfrom a properties file called prole.properties [?25hc[?25lfrom a properties file called prole.properties [?25h [?25lfrom a properties file called prole.properties [?25h [?25lfrom a properties file called prole.properties [?25h [?25lfrom a properties file called prole.properties [?25h [?25lfrom a properties file called prole.properties [?25h [?25lfrom a properties file called prole.properties [?25ho[?25lfrom a properties file called prole.properties [?25hn[?25lfrom a properties file called prole.properties [?25hn[?25lfrom a properties file called prole.properties [?25he[?25lfrom a properties file called prole.properties [?25hc[?25lfrom a properties file called prole.properties [?25ht[?25lfrom a properties file called prole.properties [?25hi[?25lfrom a properties file called prole.properties [?25ho[?25lfrom a properties file called prole.properties [?25hn[?25lfrom a properties file called prole.properties [?25h [?25lfrom a properties file called prole.properties [?25he[?25lfrom a properties file called prole.properties [?25hn[?25lfrom a properties file called prole.properties [?25hd[?25lfrom a properties file called prole.properties [?25hp[?25lfrom a properties file called prole.properties [?25ho[?25lfrom a properties file called prole.properties [?25hi[?25lfrom a properties file called prole.properties [?25hn[?25lfrom a properties file called prole.properties [?25ht[?25lfrom a properties file called prole.properties [?25hs[?25lfrom a properties file called prole.properties [?25h [?25lfrom a properties file called prole.properties [?25h [?25l [?25h;[?25l [?25h [?25l [?25ht[?25l [?25hj[?25l [?25he[?25l [?25h [?25l [?25h [?25l [?25h [?25l [?25h [?25l [?25hh[?25l [?25he[?25l [?25h [?25l [?25hd[?25l [?25ha[?25l [?25ht[?25l [?25ha[?25l [?25hb[?25l [?25ha[?25l [?25hs[?25l [?25he[?25l [?25h [?25l [?25hi[?25l [?25hs[?25l [?25h [?25l [?25hk[?25l [?25h8[?25l  +... 'Knoe'  . The databs  bas has    e h POS  ost-GU IS and              has postgis and llamaindex and may   ny other i options. please ud pdate the sci ript for e endp        to have endppoint        cu   read from a c properties file called knoe.properties.   [?25lread from a properties file called knoe.properties [?25h [?25lread from a properties file called knoe.properties [?25h [?25lread from a properties file called knoe.properties [?25h [?25lread from a properties file called knoe.properties [?25h [?25lread from a properties file called knoe.properties [?25hc[?25lfrom a properties file called knoe.properties [?25hp[?25lfrom a properties file called knoe.properties [?25hm[?25lfrom a properties file called knoe.properties [?25hm[?25lfrom a properties file called knoe.properties [?25he[?25lfrom a properties file called knoe.properties [?25hc[?25lfrom a properties file called knoe.properties [?25h [?25lfrom a properties file called knoe.properties [?25h [?25lfrom a properties file called knoe.properties [?25h [?25lfrom a properties file called knoe.properties [?25h [?25lfrom a properties file called knoe.properties [?25h [?25lfrom a properties file called knoe.properties [?25ho[?25lfrom a properties file called knoe.properties [?25hn[?25lfrom a properties file called knoe.properties [?25hn[?25lfrom a properties file called knoe.properties [?25he[?25lfrom a properties file called knoe.properties [?25hc[?25lfrom a properties file called knoe.properties [?25ht[?25lfrom a properties file called knoe.properties [?25hi[?25lfrom a properties file called knoe.properties [?25ho[?25lfrom a properties file called knoe.properties [?25hn[?25lfrom a properties file called knoe.properties [?25h [?25lfrom a properties file called knoe.properties [?25he[?25lfrom a properties file called knoe.properties [?25hn[?25lfrom a properties file called knoe.properties [?25hd[?25lfrom a properties file called knoe.properties [?25hp[?25lfrom a properties file called knoe.properties [?25ho[?25lfrom a properties file called knoe.properties [?25hi[?25lfrom a properties file called knoe.properties [?25hn[?25lfrom a properties file called knoe.properties [?25ht[?25lfrom a properties file called knoe.properties [?25hs[?25lfrom a properties file called knoe.properties [?25h [?25lfrom a properties file called knoe.properties [?25h [?25l [?25h;[?25l [?25h [?25l [?25ht[?25l [?25hj[?25l [?25he[?25l [?25h [?25l [?25h [?25l [?25h [?25l [?25h [?25l [?25hh[?25l [?25he[?25l [?25h [?25l [?25hd[?25l [?25ha[?25l [?25ht[?25l [?25ha[?25l [?25hb[?25l [?25ha[?25l [?25hs[?25l [?25he[?25l [?25h [?25l [?25hi[?25l [?25hs[?25l [?25h [?25l [?25hk[?25l [?25h8[?25l  ... [?25hs ... [?25l [?25h.[?25l [?25h [?25l [?25h [?25l  ... [?25h [?25l [?25h [?25l [?25h [?25l [?25h [?25l [?25hk[?25l [?25h8[?25l  ... [?25hs -... [?25l [?25h.[?25l [?25hp[?25l [?25hr[?25l [?25ho[?25l [?25hl[?25l [?25he[?25l [?25h.[?25l [?25ho[?25l [?25hr[?25l [?25hg[?25l [?25h:[?25l [?25h5[?25l [?25h4[?25l [?25h3[?25l [?25h4[?25l [?25h2[?25l [?25h [?25l [?25h [?25l [?25h2[?25l [?25h [?25l [?25h [?25l [?25h [?25l [?25h [?25l [?25h,[?25l [?25h [?25l [?25hk[?25l [?25h8[?25l [?25hs[?25l [?25h [?25l [?25h [?25l [?25h [?25l [?25h [?25l [?25hu[?25l [?25hb[?25l [?25he[?25l [?25hr[?25l [?25hn[?25l [?25he[?25l [?25h [?25l [?25he[?25l [?25ht[?25l [?25he[?25l [?25hs[?25l [?25h [?25l [?25ha[?25l [?25ht[?25l [?25h [?25l [?25hk[?25l [?25h8[?25l [?25hs[?25l [?25h.[?25l [?25hp[?25l [?25hr[?25l [?25ho[?25l [?25hl[?25l [?25he[?25l [?25h.[?25l [?25ho[?25l [?25hr[?25l [?25hg[?25l [?25h [?25l [?25h [?25l [?25h [?25l [?25h [?25l [?25h [?25l [?25h [?25l [?25h [?25l [?25h [?25l [?25h [?25l [?25h [?25l [?25h [?25l [?25h [?25l [?25h [?25l [?25hr[?25l [?25he[?25l [?25ht[?25l [?25hr[?25l [?25ho[?25l [?25hp[?25l [?25hi[?25l [?25he[?25l [?25h.[?25l [?25hp[?25l [?25hr[?25l [?25ho[?25l [?25hl[?25l [?25he[?25l [?25h.[?25l [?25ho[?25l [?25hr[?25l [?25hg[?25l [?25h:[?25l [?25h6[?25l [?25h4[?25l [?25h4[?25l [?25h3[?25l [?25h [?25l [?25h [?25l [?25h,[?25l [?25h [?25l [?25ho[?25l [?25hl[?25l [?25hl[?25l [?25ha[?25l [?25hm[?25l [?25ha[?25l [?25h [?25l [?25ha[?25l [?25h [?25l [?25hs[?25l [?25he[?25l [?25hr[?25l [?25hv[?25l [?25he[?25l [?25hr[?25l [?25h [?25l [?25ha[?25l [?25ht[?25l [?25h [?25l [?25ho[?25l [?25hl[?25l [?25hl[?25l [?25ha[?25l [?25hm[?25l [?25ha[?25l [?25h.[?25l [?25ho[?25l [?25h [?25l [?25hp[?25l [?25hr[?25l [?25ho[?25l [?25hl[?25l [?25he[?25l [?25h.[?25l [?25ho[?25l [?25hr[?25l [?25hg[?25l [?25h:[?25l [?25h:[?25l [?25h1[?25l [?25h [?25l [?25h [?25l [?25h1[?25l [?25h1[?25l [?25h5[?25l [?25h [?25l [?25h4[?25l [?25h3[?25l [?25h4[?25l [?25hv[?25lat ollama.prole.org:11434 [?25hi[?25lat ollama.prole.org:11434 [?25hp[?25lat ollama.prole.org:11434 [?25h [?25lat ollama.prole.org:11434 [?25h +... [?25l [?25h.[?25l [?25hp[?25l [?25hr[?25l [?25ho[?25l [?25hl[?25l [?25he[?25l [?25h.[?25l [?25ho[?25l [?25hr[?25l [?25hg[?25l [?25h:[?25l [?25h5[?25l [?25h4[?25l [?25h3[?25l [?25h4[?25l [?25h2[?25l [?25h [?25l [?25h [?25l [?25h2[?25l [?25h [?25l [?25h [?25l [?25h [?25l [?25h [?25l [?25h,[?25l [?25h [?25l [?25hk[?25l [?25h8[?25l [?25hs[?25l [?25h [?25l [?25h [?25l [?25h [?25l [?25h [?25l [?25hu[?25l [?25hb[?25l [?25he[?25l [?25hr[?25l [?25hn[?25l [?25he[?25l [?25h [?25l [?25he[?25l [?25ht[?25l [?25he[?25l [?25hs[?25l [?25h [?25l [?25ha[?25l [?25ht[?25l [?25h [?25l [?25hk[?25l [?25h8[?25l [?25hs[?25l [?25h.[?25l [?25hp[?25l [?25hr[?25l [?25ho[?25l [?25hl[?25l [?25he[?25l [?25h.[?25l [?25ho[?25l [?25hr[?25l [?25hg[?25l [?25h [?25l [?25h [?25l [?25h [?25l [?25h [?25l [?25h [?25l [?25h [?25l [?25h [?25l [?25h [?25l [?25h [?25l [?25h [?25l [?25h [?25l [?25h [?25l [?25h [?25l [?25hr[?25l [?25he[?25l [?25ht[?25l [?25hr[?25l [?25ho[?25l [?25hp[?25l [?25hi[?25l [?25he[?25l [?25h.[?25l [?25hp[?25l [?25hr[?25l [?25ho[?25l [?25hl[?25l [?25he[?25l [?25h.[?25l [?25ho[?25l [?25hr[?25l [?25hg[?25l [?25h:[?25l [?25h6[?25l [?25h4[?25l [?25h4[?25l [?25h3[?25l [?25h [?25l [?25h [?25l [?25h,[?25l [?25h [?25l [?25ho[?25l [?25hl[?25l [?25hl[?25l [?25ha[?25l [?25hm[?25l [?25ha[?25l [?25h [?25l [?25ha[?25l [?25h [?25l [?25hs[?25l [?25he[?25l [?25hr[?25l [?25hv[?25l [?25he[?25l [?25hr[?25l [?25h [?25l [?25ha[?25l [?25ht[?25l [?25h [?25l [?25ho[?25l [?25hl[?25l [?25hl[?25l [?25ha[?25l [?25hm[?25l [?25ha[?25l [?25h.[?25l [?25ho[?25l [?25h [?25l [?25hp[?25l [?25hr[?25l [?25ho[?25l [?25hl[?25l [?25he[?25l [?25h.[?25l [?25ho[?25l [?25hr[?25l [?25hg[?25l [?25h:[?25l [?25h:[?25l [?25h1[?25l [?25h [?25l [?25h [?25l [?25h1[?25l [?25h1[?25l [?25h5[?25l [?25h [?25l [?25h4[?25l [?25h3[?25l [?25h4[?25l [?25hv[?25lat ollama.knoe.org:11434 [?25hi[?25lat ollama.knoe.org:11434 [?25hp[?25lat ollama.knoe.org:11434 [?25h [?25lat ollama.knoe.org:11434 [?25h [?2026h[?25l⠋ [?25h[?2026l[?2026h[?25l⠹ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠴ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠇ [?25h[?2026l[?2026h[?25l⠇ [?25h[?2026l[?2026h[?25l⠋ [?25h[?2026l[?2026h[?25l⠙ [?25h[?2026l[?2026h[?25l⠙ [?25h[?2026l[?2026h[?25l⠹ [?25h[?2026l[?2026h[?25l⠼ [?25h[?2026l[?2026h[?25l⠴ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠧ [?25h[?2026l[?2026h[?25l⠇ [?25h[?2026l[?2026h[?25l⠋ [?25h[?2026l[?2026h[?25l⠙ [?25h[?2026l[?2026h[?25l⠙ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠼ [?25h[?2026l[?2026h[?25l⠴ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠇ [?25h[?2026l[?2026h[?25l⠇ [?25h[?2026l[?2026h[?25l⠏ [?25h[?2026l[?2026h[?25l⠋ [?25h[?2026l[?2026h[?25l⠹ [?25h[?2026l[?2026h[?25l⠹ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠼ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠧ [?25h[?2026l[?2026h[?25l⠧ [?25h[?2026l[?2026h[?25l⠇ [?25h[?2026l[?2026h[?25l⠋ [?25h[?2026l[?2026h[?25l⠙ [?25h[?2026l[?2026h[?25l⠙ [?25h[?2026l[?2026h[?25l⠹ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠼ [?25h[?2026l[?2026h[?25l⠴ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠧ [?25h[?2026l[?2026h[?25l⠏ [?25h[?2026l[?2026h[?25l⠋ [?25h[?2026l[?2026h[?25l⠋ [?25h[?2026l[?2026h[?25l⠙ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠴ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠇ [?25h[?2026l[?2026h[?25l⠏ [?25h[?2026l[?2026h[?25l⠏ [?25h[?2026l[?2026h[?25l⠙ [?25h[?2026l[?2026h[?25l⠙ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠼ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠧ [?25h[?2026l[?2026h[?25l⠧ [?25h[?2026l[?2026h[?25l⠏ [?25h[?2026l[?2026h[?25l⠏ [?25h[?2026l[?2026h[?25l⠋ [?25h[?2026l[?2026h[?25l⠹ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠼ [?25h[?2026l[?2026h[?25l⠼ [?25h[?2026l[?2026h[?25l⠴ [?25h[?2026l[?2026h[?25l⠧ [?25h[?2026l[?2026h[?25l⠇ [?25h[?2026l[?2026h[?25l⠏ [?25h[?2026l[?2026h[?25l⠋ [?25h[?2026l[?2026h[?25l⠙ [?25h[?2026l[?2026h[?25l⠹ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠴ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠧ [?25h[?2026l[?2026h[?25l⠇ [?25h[?2026l[?2026h[?25l⠏ [?25h[?2026l[?2026h[?25l⠏ [?25h[?2026l[?2026h[?25l⠙ [?25h[?2026l[?2026h[?25l⠙ [?25h[?2026l[?2026h[?25l⠹ [?25h[?2026l[?2026h[?25l⠼ [?25h[?2026l[?2026h[?25l⠴ [?25h[?2026l[?2026h[?25l⠴ [?25h[?2026l[?2026h[?25l⠧ [?25h[?2026l[?2026h[?25l⠧ [?25h[?2026l[?2026h[?25l⠏ [?25h[?2026l[?2026h[?25l⠋ [?25h[?2026l[?2026h[?25l⠙ [?25h[?2026l[?2026h[?25l⠹ [?25h[?2026l[?2026h[?25l⠹ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠼ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠧ [?25h[?2026l[?2026h[?25l⠧ [?25h[?2026l[?2026h[?25l⠇ [?25h[?2026l[?2026h[?25l⠏ [?25h[?2026l[?2026h[?25l⠙ [?25h[?2026l[?2026h[?25l⠹ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠼ [?25h[?2026l[?2026h[?25l⠴ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠇ [?25h[?2026l[?2026h[?25l⠇ [?25h[?2026l[?2026h[?25l⠏ [?25h[?2026l[?2026h[?25l⠋ [?25h[?2026l[?2026h[?25l⠹ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠼ [?25h[?2026l[?2026h[?25l⠴ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠇ [?25h[?2026l[?2026h[?25l⠇ [?25h[?2026l[?2026h[?25l⠋ [?25h[?2026l[?2026h[?25l⠋ [?25h[?2026l[?2026h[?25l⠙ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠼ [?25h[?2026l[?2026h[?25l⠴ [?25h[?2026l[?2026h[?25l⠴ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠇ [?25h[?2026l[?2026h[?25l⠇ [?25h[?2026l[?2026h[?25l⠋ [?25h[?2026l[?2026h[?25l⠙ [?25h[?2026l[?2026h[?25l⠹ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠼ [?25h[?2026l[?2026h[?25l⠴ [?25h[?2026l[?2026h[?25l⠴ [?25h[?2026l[?2026h[?25l⠧ [?25h[?2026l[?2026h[?25l⠧ [?25h[?2026l[?2026h[?25l⠇ [?25h[?2026l[?2026h[?25l⠏ [?25h[?2026l[?2026h[?25l⠋ [?25h[?2026l[?2026h[?25l⠹ [?25h[?2026l[?2026h[?25l⠹ [?25h[?2026l[?2026h[?25l⠼ [?25h[?2026l[?2026h[?25l⠴ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠧ [?25h[?2026l[?2026h[?25l⠧ [?25h[?2026l[?2026h[?25l⠏ [?25h[?2026l[?2026h[?25l⠏ [?25h[?2026l[?2026h[?25l⠙ [?25h[?2026l[?2026h[?25l⠙ [?25h[?2026l[?2026h[?25l⠹ [?25h[?2026l[?2026h[?25l⠼ [?25h[?2026l[?2026h[?25l⠴ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠧ [?25h[?2026l[?2026h[?25l⠧ [?25h[?2026l[?2026h[?25l⠇ [?25h[?2026l[?2026h[?25l⠏ [?25h[?2026l[?2026h[?25l⠙ [?25h[?2026l[?2026h[?25l⠙ [?25h[?2026l[?2026h[?25l⠹ [?25h[?2026l[?2026h[?25l⠼ [?25h[?2026l[?2026h[?25l⠼ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠧ [?25h[?2026l[?2026h[?25l⠧ [?25h[?2026l[?2026h[?25l⠏ [?25h[?2026l[?2026h[?25l⠏ [?25h[?2026l[?2026h[?25l⠋ [?25h[?2026l[?2026h[?25l⠙ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠼ [?25h[?2026l[?2026h[?25l⠴ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠧ [?25h[?2026l[?2026h[?25l⠇ [?25h[?2026l[?2026h[?25l⠋ [?25h[?2026l[?2026h[?25l⠙ [?25h[?2026l[?2026h[?25l⠙ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠴ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠧ [?25h[?2026l[?2026h[?25l⠇ [?25h[?2026l[?2026h[?25l⠏ [?25h[?2026l[?2026h[?25l⠏ [?25h[?2026l[?2026h[?25l⠙ [?25h[?2026l[?2026h[?25l⠙ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠼ [?25h[?2026l[?2026h[?25l⠼ [?25h[?2026l[?2026h[?25l⠴ [?25h[?2026l[?2026h[?25l⠧ [?25h[?2026l[?2026h[?25l⠧ [?25h[?2026l[?2026h[?25l⠏ [?25h[?2026l[?2026h[?25l⠋ [?25h[?2026l[?2026h[?25l⠙ [?25h[?2026l[?2026h[?25l⠹ [?25h[?2026l[?2026h[?25l⠹ [?25h[?2026l[?2026h[?25l⠼ [?25h[?2026l[?2026h[?25l⠴ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠧ [?25h[?2026l[?2026h[?25l⠇ [?25h[?2026l[?2026h[?25l⠏ [?25h[?2026l[?2026h[?25l⠋ [?25h[?2026l[?2026h[?25l⠙ [?25h[?2026l[?2026h[?25l⠙ [?25h[?2026l[?2026h[?25l⠹ [?25h[?2026l[?2026h[?25l⠼ [?25h[?2026l[?2026h[?25l⠼ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠧ [?25h[?2026l[?2026h[?25l⠇ [?25h[?2026l[?2026h[?25l⠏ [?25h[?2026l[?2026h[?25l⠏ [?25h[?2026l[?2026h[?25l⠙ [?25h[?2026l[?2026h[?25l⠹ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠼ [?25h[?2026l[?2026h[?25l⠴ [?25h[?2026l[?2026h[?25l⠴ [?25h[?2026l[?2026h[?25l⠧ [?25h[?2026l[?2026h[?25l⠇ [?25h[?2026l[?2026h[?25l⠏ [?25h[?2026l[?2026h[?25l⠋ [?25h[?2026l[?2026h[?25l⠋ [?25h[?2026l[?2026h[?25l⠙ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠼ [?25h[?2026l[?2026h[?25l⠼ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠇ [?25h[?2026l[?2026h[?25l⠏ [?25h[?2026l[?2026h[?25l⠋ [?25h[?2026l[?2026h[?25l⠙ [?25h[?2026l[?2026h[?25l⠹ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠼ [?25h[?2026l[?2026h[?25l⠼ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠧ [?25h[?2026l[?2026h[?25l⠇ [?25h[?2026l[?2026h[?25l⠏ [?25h[?2026l[?2026h[?25l⠙ [?25h[?2026l[?2026h[?25l⠙ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠼ [?25h[?2026l[?2026h[?25l⠴ [?25h[?2026l[?2026h[?25l⠴ [?25h[?2026l[?2026h[?25l⠧ [?25h[?2026l[?2026h[?25l⠧ [?25h[?2026l[?2026h[?25l⠏ [?25h[?2026l[?2026h[?25l⠋ [?25h[?2026l[?2026h[?25l⠙ [?25h[?2026l[?2026h[?25l⠹ [?25h[?2026l[?2026h[?25l⠹ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠴ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠧ [?25h[?2026l[?2026h[?25l⠏ [?25h[?2026l[?2026h[?25l⠋ [?25h[?2026l[?2026h[?25l⠙ [?25h[?2026l[?2026h[?25l⠙ [?25h[?2026l[?2026h[?25l⠹ [?25h[?2026l[?2026h[?25l⠼ [?25h[?2026l[?2026h[?25l⠼ [?25h[?2026l[?2026h[?25l⠴ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠇ [?25h[?2026l[?2026h[?25l⠏ [?25h[?2026l[?2026h[?25l⠋ [?25h[?2026l[?2026h[?25l⠙ [?25h[?2026l[?2026h[?25l⠹ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠴ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠧ [?25h[?2026l[?2026h[?25l⠇ [?25h[?2026l[?2026h[?25l⠏ [?25h[?2026l[?2026h[?25l⠏ [?25h[?2026l[?2026h[?25l⠋ [?25h[?2026l[?2026h[?25l⠙ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠼ [?25h[?2026l[?2026h[?25l⠼ [?25h[?2026l[?2026h[?25l⠴ [?25h[?2026l[?2026h[?25l⠧ [?25h[?2026l[?2026h[?25l⠇ [?25h[?2026l[?2026h[?25l⠏ [?25h[?2026l[?2026h[?25l⠏ [?25h[?2026l[?2026h[?25l⠋ [?25h[?2026l[?2026h[?25l⠹ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠴ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠇ [?25h[?2026l[?2026h[?25l⠏ [?25h[?2026l[?2026h[?25l⠋ [?25h[?2026l[?2026h[?25l⠋ [?25h[?2026l[?2026h[?25l⠹ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠼ [?25h[?2026l[?2026h[?25l⠼ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠧ [?25h[?2026l[?2026h[?25l⠇ [?25h[?2026l[?2026h[?25l⠏ [?25h[?2026l[?2026h[?25l⠏ [?25h[?2026l[?2026h[?25l⠙ [?25h[?2026l[?2026h[?25l⠹ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠼ [?25h[?2026l[?2026h[?25l⠴ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠇ [?25h[?2026l[?2026h[?25l⠇ [?25h[?2026l[?2026h[?25l⠏ [?25h[?2026l[?2026h[?25l⠙ [?25h[?2026l[?2026h[?25l⠹ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠼ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠧ [?25h[?2026l[?2026h[?25l⠇ [?25h[?2026l[?2026h[?25l⠏ [?25h[?2026l[?2026h[?25l⠏ [?25h[?2026l[?2026h[?25l⠋ [?25h[?2026l[?2026h[?25l⠹ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠼ [?25h[?2026l[?2026h[?25l⠴ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠧ [?25h[?2026l[?2026h[?25l⠇ [?25h[?2026l[?2026h[?25l⠇ [?25h[?2026l[?2026h[?25l⠏ [?25h[?2026l[?2026h[?25l⠙ [?25h[?2026l[?2026h[?25l⠹ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠴ [?25h[?2026l[?2026h[?25l⠴ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠧ [?25h[?2026l[?2026h[?25l⠇ [?25h[?2026l[?2026h[?25l⠏ [?25h[?2026l[?2026h[?25l⠙ [?25h[?2026l[?2026h[?25l⠙ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠼ [?25h[?2026l[?2026h[?25l⠴ [?25h[?2026l[?2026h[?25l⠴ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠧ [?25h[?2026l[?2026h[?25l⠇ [?25h[?2026l[?2026h[?25l⠋ [?25h[?2026l[?2026h[?25l⠋ [?25h[?2026l[?2026h[?25l⠙ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠼ [?25h[?2026l[?2026h[?25l⠴ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠧ [?25h[?2026l[?2026h[?25l⠏ [?25h[?2026l[?2026h[?25l⠏ [?25h[?2026l[?2026h[?25l⠙ [?25h[?2026l[?2026h[?25l⠹ [?25h[?2026l[?2026h[?25l⠹ [?25h[?2026l[?2026h[?25l⠼ [?25h[?2026l[?2026h[?25l⠴ [?25h[?2026l[?2026h[?25l⠴ [?25h[?2026l[?2026h[?25l⠧ [?25h[?2026l[?2026h[?25l⠇ [?25h[?2026l[?2026h[?25l⠇ [?25h[?2026l[?2026h[?25l⠏ [?25h[?2026l[?2026h[?25l⠙ [?25h[?2026l[?2026h[?25l⠙ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠴ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠧ [?25h[?2026l[?2026h[?25l⠇ [?25h[?2026l[?2026h[?25l⠇ [?25h[?2026l[?2026h[?25l⠋ [?25h[?2026l[?2026h[?25l⠙ [?25h[?2026l[?2026h[?25l⠙ [?25h[?2026l[?2026h[?25l⠹ [?25h[?2026l[?2026h[?25l⠼ [?25h[?2026l[?2026h[?25l⠼ [?25h[?2026l[?2026h[?25l⠴ [?25h[?2026l[?2026h[?25l⠧ [?25h[?2026l[?2026h[?25l⠧ [?25h[?2026l[?2026h[?25l⠇ [?25h[?2026l[?2026h[?25l⠏ [?25h[?2026l[?2026h[?25l⠙ [?25h[?2026l[?2026h[?25l⠙ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠼ [?25h[?2026l[?2026h[?25l⠴ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠧ [?25h[?2026l[?2026h[?25l⠏ [?25h[?2026l[?2026h[?25l⠋ [?25h[?2026l[?2026h[?25l⠋ [?25h[?2026l[?2026h[?25l⠹ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠼ [?25h[?2026l[?2026h[?25l⠴ [?25h[?2026l[?2026h[?25l⠧ [?25h[?2026l[?2026h[?25l⠇ [?25h[?2026l[?2026h[?25l⠏ [?25h[?2026l[?2026h[?25l⠋ [?25h[?2026l[?2026h[?25l⠙ [?25h[?2026l[?2026h[?25l⠙ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠼ [?25h[?2026l[?2026h[?25l⠴ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠧ [?25h[?2026l[?2026h[?25l⠧ [?25h[?2026l[?2026h[?25l⠏ [?25h[?2026l[?2026h[?25l⠏ [?25h[?2026l[?2026h[?25l⠋ [?25h[?2026l[?2026h[?25l⠹ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠴ [?25h[?2026l[?2026h[?25l⠴ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠇ [?25h[?2026l[?2026h[?25l⠇ [?25h[?2026l[?2026h[?25l⠋ [?25h[?2026l[?2026h[?25l⠙ [?25h[?2026l[?2026h[?25l⠹ [?25h[?2026l[?2026h[?25l⠹ [?25h[?2026l[?2026h[?25l⠼ [?25h[?2026l[?2026h[?25l⠴ [?25h[?2026l[?2026h[?25l⠴ [?25h[?2026l[?2026h[?25l⠧ [?25h[?2026l[?2026h[?25l⠇ [?25h[?2026l[?2026h[?25l⠇ [?25h[?2026l[?2026h[?25l⠏ [?25h[?2026l[?2026h[?25l⠙ [?25h[?2026l[?2026h[?25l⠙ [?25h[?2026l[?2026h[?25l⠹ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠴ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠇ [?25h[?2026l[?2026h[?25l⠏ [?25h[?2026l[?2026h[?25l⠋ [?25h[?2026l[?2026h[?25l⠋ [?25h[?2026l[?2026h[?25l⠹ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠴ [?25h[?2026l[?2026h[?25l⠴ [?25h[?2026l[?2026h[?25l⠧ [?25h[?2026l[?2026h[?25l⠧ [?25h[?2026l[?2026h[?25l⠇ [?25h[?2026l[?2026h[?25l⠏ [?25h[?2026l[?2026h[?25l⠋ [?25h[?2026l[?2026h[?25l⠹ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠴ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠇ [?25h[?2026l[?2026h[?25l⠇ [?25h[?2026l[?2026h[?25l⠋ [?25h[?2026l[?2026h[?25l⠋ [?25h[?2026l[?2026h[?25l⠹ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠼ [?25h[?2026l[?2026h[?25l⠴ [?25h[?2026l[?2026h[?25l⠴ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠇ [?25h[?2026l[?2026h[?25l⠏ [?25h[?2026l[?2026h[?25l⠋ [?25h[?2026l[?2026h[?25l⠋ [?25h[?2026l[?2026h[?25l⠹ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠼ [?25h[?2026l[?2026h[?25l⠴ [?25h[?2026l[?2026h[?25l⠴ [?25h[?2026l[?2026h[?25l⠧ [?25h[?2026l[?2026h[?25l⠧ [?25h[?2026l[?2026h[?25l⠏ [?25h[?2026l[?2026h[?25l⠏ [?25h[?2026l[?2026h[?25l⠋ [?25h[?2026l[?2026h[?25l⠙ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠼ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠇ [?25h[?2026l[?2026h[?25l⠏ [?25h[?2026l[?2026h[?25l⠋ [?25h[?2026l[?2026h[?25l⠙ [?25h[?2026l[?2026h[?25l⠹ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠼ [?25h[?2026l[?2026h[?25l⠼ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠧ [?25h[?2026l[?2026h[?25l⠇ [?25h[?2026l[?2026h[?25l⠏ [?25h[?2026l[?2026h[?25l⠋ [?25h[?2026l[?2026h[?25l⠙ [?25h[?2026l[?2026h[?25l⠹ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠼ [?25h[?2026l[?2026h[?25l⠴ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠧ [?25h[?2026l[?2026h[?25l⠧ [?25h[?2026l[?2026h[?25l⠏ [?25h[?2026l[?2026h[?25l⠏ [?25h[?2026l[?2026h[?25l⠋ [?25h[?2026l[?2026h[?25l⠙ [?25h[?2026l[?2026h[?25l⠹ [?25h[?2026l[?2026h[?25l⠼ [?25h[?2026l[?2026h[?25l⠼ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠧ [?25h[?2026l[?2026h[?25l⠇ [?25h[?2026l[?2026h[?25l⠏ [?25h[?2026l[?2026h[?25l⠋ [?25h[?2026l[?2026h[?25l⠋ [?25h[?2026l[?2026h[?25l⠙ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠼ [?25h[?2026l[?2026h[?25l⠼ [?25h[?2026l[?2026h[?25l⠴ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠇ [?25h[?2026l[?2026h[?25l⠏ [?25h[?2026l[?2026h[?25l⠋ [?25h[?2026l[?2026h[?25l⠙ [?25h[?2026l[?2026h[?25l⠹ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠼ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠧ [?25h[?2026l[?2026h[?25l⠇ [?25h[?2026l[?2026h[?25l⠇ [?25h[?2026l[?2026h[?25l⠏ [?25h[?2026l[?2026h[?25l⠋ [?25h[?2026l[?2026h[?25l⠹ [?25h[?2026l[?2026h[?25l⠹ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠴ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠇ [?25h[?2026l[?2026h[?25l⠇ [?25h[?2026l[?2026h[?25l⠋ [?25h[?2026l[?2026h[?25l⠙ [?25h[?2026l[?2026h[?25l⠹ [?25h[?2026l[?2026h[?25l⠹ [?25h[?2026l[?2026h[?25l⠼ [?25h[?2026l[?2026h[?25l⠴ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠧ [?25h[?2026l[?2026h[?25l⠇ [?25h[?2026l[?2026h[?25l⠏ [?25h[?2026l[?2026h[?25l⠋ [?25h[?2026l[?2026h[?25l⠋ [?25h[?2026l[?2026h[?25l⠹ [?25h[?2026l[?2026h[?25l⠹ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠼ [?25h[?2026l[?2026h[?25l⠴ [?25h[?2026l[?2026h[?25l⠧ [?25h[?2026l[?2026h[?25l⠧ [?25h[?2026l[?2026h[?25l⠏ [?25h[?2026l[?2026h[?25l⠏ [?25h[?2026l[?2026h[?25l⠙ [?25h[?2026l[?2026h[?25l⠹ [?25h[?2026l[?2026h[?25l⠹ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠼ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠧ [?25h[?2026l[?2026h[?25l⠧ [?25h[?2026l[?2026h[?25l⠏ [?25h[?2026l[?2026h[?25l⠋ [?25h[?2026l[?2026h[?25l⠙ [?25h[?2026l[?2026h[?25l⠹ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠼ [?25h[?2026l[?2026h[?25l⠴ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠧ [?25h[?2026l[?2026h[?25l⠇ [?25h[?2026l[?2026h[?25l⠏ [?25h[?2026l[?2026h[?25l⠋ [?25h[?2026l[?2026h[?25l⠙ [?25h[?2026l[?2026h[?25l⠹ [?25h[?2026l[?2026h[?25l⠸ [?25h[?2026l[?2026h[?25l⠼ [?25h[?2026l[?2026h[?25l⠴ [?25h[?2026l[?2026h[?25l⠦ [?25h[?2026l[?2026h[?25l⠧ [?25h[?2026l[?2026h[?25l⠧ [?25h[?2026l[?2026h[?25l⠇ [?25h[?2026l[?2026h[?25l⠏ [?25h[?2026l[?2026h[?25l⠙ [?25h[?2026l[?2026h[?25l⠹ [?25h[?2026l[?25l[?2026h[?25l[?25h[?2026l[?25hGreat[?25l[?25h![?25l[?25h Here[?25l[?25h's[?25l[?25h the[?25l[?25h updated[?25l[?25h implementation[?25l[?25h with[?25l[?25h Kubernetes[?25l[?25h and[?25l[?25h Pro[?25l[?25hle[?25l[?25h configuration[?25l[?25h:[?25l[?25h ##[?25l[?25h 1[?25l[?25h.[?25l[?25h Pro[?25l[?25hle[?25l[?25h Properties[?25l[?25h File[?25l[?25h diff --git a/env.sh b/env.sh index 438ce78..4996cbd 100755 --- a/env.sh +++ b/env.sh @@ -1,23 +1,23 @@ #!/usr/bin/env bash -# Prole environment configuration +# Knoe environment configuration # This file is generated by the installer. Source it in new shells, or execute as a wrapper: -# "$PROLE_HOME/env.sh" [args…] +# "$KNOE_HOME/env.sh" [args…] # shellcheck shell=bash -export PROLE_HOME="$HOME/dev/prole" -export PROLE_CONF="$PROLE_HOME/conf" -export PROLE_DATA="$PROLE_HOME/data" -export PROLE_LOGS="$PROLE_HOME/logs" -export PROLE_SERVICE="$PROLE_HOME/etc" +export KNOE_HOME="$HOME/dev/knoe" +export KNOE_CONF="$KNOE_HOME/conf" +export PROLE_DATA="$KNOE_HOME/data" +export PROLE_LOGS="$KNOE_HOME/logs" +export KNOE_SERVICE="$KNOE_HOME/etc" # Ensure PATH works for GUI-launched shells (Docker, etc.) -_prole_add_path() { case ":${PATH}:" in *":$1:"*) ;; *) PATH="$1:${PATH:-}" ;; esac; } -_prole_add_path "$PROLE_HOME/bin" -_prole_add_path "/opt/homebrew/bin" -_prole_add_path "/usr/local/bin" -_prole_add_path "/usr/bin" -_prole_add_path "/bin" -_prole_add_path "/usr/sbin" -_prole_add_path "/sbin" +_knoe_add_path() { case ":${PATH}:" in *":$1:"*) ;; *) PATH="$1:${PATH:-}" ;; esac; } +_knoe_add_path "$KNOE_HOME/bin" +_knoe_add_path "/opt/homebrew/bin" +_knoe_add_path "/usr/local/bin" +_knoe_add_path "/usr/bin" +_knoe_add_path "/bin" +_knoe_add_path "/usr/sbin" +_knoe_add_path "/sbin" export PATH # Add custom paths below if needed (examples): diff --git a/etc/build-a-bao.sh b/etc/build-a-bao.sh index eaabbdc..910f504 100755 --- a/etc/build-a-bao.sh +++ b/etc/build-a-bao.sh @@ -10,21 +10,21 @@ set -euo pipefail SCRIPT_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) -# Load environment and config via prole_cfg.sh +# Load environment and config via knoe_cfg.sh # shellcheck disable=SC1090 -source "$SCRIPT_DIR/prole_cfg.sh" +source "$SCRIPT_DIR/knoe_cfg.sh" cfg_path="" -if [[ -n "${PROLE_CONF:-}" ]]; then - cfg_path="$(_prole_cfg_select_cfg_file "$PROLE_CONF")" -elif [[ -n "${PROLE_HOME:-}" ]]; then - cfg_path="$(_prole_cfg_select_cfg_file "$PROLE_HOME/conf")" +if [[ -n "${KNOE_CONF:-}" ]]; then + cfg_path="$(_knoe_cfg_select_cfg_file "$KNOE_CONF")" +elif [[ -n "${KNOE_HOME:-}" ]]; then + cfg_path="$(_knoe_cfg_select_cfg_file "$KNOE_HOME/conf")" else - cfg_path="$(_prole_cfg_select_cfg_file "$SCRIPT_DIR/../conf")" + cfg_path="$(_knoe_cfg_select_cfg_file "$SCRIPT_DIR/../conf")" fi if [[ -z "$cfg_path" || ! -f "$cfg_path" ]]; then - echo "ERROR: config file not found. Set PROLE_CONF or PROLE_HOME." >&2 + echo "ERROR: config file not found. Set KNOE_CONF or KNOE_HOME." >&2 exit 1 fi @@ -41,16 +41,16 @@ import subprocess import sys from pathlib import Path -PROLE_SECRET_PREFIX = "${PROLE_SECRET:" -PROLE_SECRET_SUFFIX = "}" +KNOE_SECRET_PREFIX = "${KNOE_SECRET:" +KNOE_SECRET_SUFFIX = "}" OPENBAO_PREFIX = "${OPENBAO:" OPENBAO_SUFFIX = "}" -PROLE_SECRET_VERSION = "v1" -PROLE_SECRET_SERVICE = "prole-installer" -PROLE_SECRET_KEY_FILE = Path.home() / ".prole" / "secrets" / "installer.key" +KNOE_SECRET_VERSION = "v1" +KNOE_SECRET_SERVICE = "knoe-installer" +KNOE_SECRET_KEY_FILE = Path.home() / ".knoe" / "secrets" / "installer.key" -def is_prole_secret(value: str | None) -> bool: - return bool(value) and value.startswith(PROLE_SECRET_PREFIX) and value.endswith(PROLE_SECRET_SUFFIX) +def is_knoe_secret(value: str | None) -> bool: + return bool(value) and value.startswith(KNOE_SECRET_PREFIX) and value.endswith(KNOE_SECRET_SUFFIX) def is_openbao_ref(value: str | None) -> bool: return bool(value) and value.startswith(OPENBAO_PREFIX) and value.endswith(OPENBAO_SUFFIX) @@ -95,17 +95,17 @@ def get_file_key(path: Path) -> bytes: def get_secret_key() -> bytes: system = platform.system() - account = getpass.getuser() or "prole" + account = getpass.getuser() or "knoe" if system == "Darwin": - return get_keychain_key(PROLE_SECRET_SERVICE, account) - return get_file_key(PROLE_SECRET_KEY_FILE) + return get_keychain_key(KNOE_SECRET_SERVICE, account) + return get_file_key(KNOE_SECRET_KEY_FILE) -def decrypt_prole_secret(value: str) -> str: - if not is_prole_secret(value): +def decrypt_knoe_secret(value: str) -> str: + if not is_knoe_secret(value): return value - inner = value[len(PROLE_SECRET_PREFIX):-len(PROLE_SECRET_SUFFIX)] + inner = value[len(KNOE_SECRET_PREFIX):-len(KNOE_SECRET_SUFFIX)] parts = inner.split(":") - if len(parts) != 3 or parts[0] != PROLE_SECRET_VERSION: + if len(parts) != 3 or parts[0] != KNOE_SECRET_VERSION: return "" try: from cryptography.hazmat.primitives.ciphers.aead import AESGCM @@ -161,15 +161,15 @@ if child_realm: krb_realm = child_realm if db_pass and not is_openbao_ref(db_pass): - db_pass = decrypt_prole_secret(db_pass) + db_pass = decrypt_knoe_secret(db_pass) else: db_pass = "" if krb_pass and not is_openbao_ref(krb_pass): - krb_pass = decrypt_prole_secret(krb_pass) + krb_pass = decrypt_knoe_secret(krb_pass) else: krb_pass = "" if grafana_pass and not is_openbao_ref(grafana_pass): - grafana_pass = decrypt_prole_secret(grafana_pass) + grafana_pass = decrypt_knoe_secret(grafana_pass) else: grafana_pass = "" @@ -194,13 +194,13 @@ PY source "$tmp_env" rm -f "$tmp_env" -export PROLE_HOME="${PROLE_HOME:-$(cd "$SCRIPT_DIR/.." && pwd)}" -export PROLE_SERVICE="${PROLE_SERVICE:-$PROLE_HOME}" +export KNOE_HOME="${KNOE_HOME:-$(cd "$SCRIPT_DIR/.." && pwd)}" +export KNOE_SERVICE="${KNOE_SERVICE:-$KNOE_HOME}" NAMESPACE="${PROLE_NAMESPACE}" db_pass="${KNOE_DB_PASSWORD:-}" if [[ -z "$db_pass" ]]; then - echo "[WARN] No database password found in prole.cfg; skipping db secret write." + echo "[WARN] No database password found in knoe.cfg; skipping db secret write." fi if [[ -n "$db_pass" ]]; then @@ -226,7 +226,7 @@ def get_val(section: str, key: str) -> str: namespace = get_val("Global", "NAMESPACE") or get_val("Inputs", "env_setup.NAMESPACE") or get_val("Database Creation", "NAMESPACE") or "default" def openbao_placeholder(ns: str, leaf: str, key: str) -> str: - return f"${{OPENBAO:kv/prole/{ns}/{leaf}#{key}}}" + return f"${{OPENBAO:kv/knoe/{ns}/{leaf}#{key}}}" secret_map = { "init_password.db_password": openbao_placeholder(namespace, "db", "password"), diff --git a/etc/build_db.sh b/etc/build_db.sh index ac71521..53263c7 100755 --- a/etc/build_db.sh +++ b/etc/build_db.sh @@ -8,7 +8,7 @@ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" PROJECT_ROOT="$(cd "$SCRIPT_DIR/.." && pwd)" # shellcheck disable=SC1090 -source "$SCRIPT_DIR/prole_cfg.sh" +source "$SCRIPT_DIR/knoe_cfg.sh" TAG="latest" PUSH=false @@ -43,11 +43,11 @@ if docker buildx version >/dev/null 2>&1; then log "Building multi-platform image: knoe-db:$TAG for $PLATFORMS" # Check if a builder exists that supports multi-platform - if ! docker buildx inspect prole-builder >/dev/null 2>&1; then - log "Creating new buildx builder: prole-builder" - docker buildx create --name prole-builder --use || true + if ! docker buildx inspect knoe-builder >/dev/null 2>&1; then + log "Creating new buildx builder: knoe-builder" + docker buildx create --name knoe-builder --use || true else - docker buildx use prole-builder + docker buildx use knoe-builder fi BUILD_ARGS=(--platform "$PLATFORMS") diff --git a/etc/final_deployment.sh b/etc/final_deployment.sh index 77289a7..1badb06 100755 --- a/etc/final_deployment.sh +++ b/etc/final_deployment.sh @@ -2,9 +2,9 @@ # usage: etc/final_deployment.sh [-e|--docker-export] [-c|--helm-chart] [-k|--kustomize] [-p|--prepare-k3s-pipeline] [-o|--output-dir DIR] # -# This script handles post-installation deployment tasks for Prole. +# This script handles post-installation deployment tasks for Knoe. # 1st use case: -e|--docker-export -# Runs docker image export for each image required to deploy Prole. +# Runs docker image export for each image required to deploy Knoe. # Artifacts are written to DOCKER_IMPORT_DIR. # 2nd use case: -c|--helm-chart # Creates a Helm chart from the current k8s manifests. @@ -91,9 +91,9 @@ if [[ -f "${PROJECT_ROOT}/env.sh" ]]; then source "${PROJECT_ROOT}/env.sh" fi -default_owner="$(id -un 2>/dev/null || echo prole)" -prole_data="${PROLE_DATA:-/opt/prole/data/${default_owner}}" -prole_data="${prole_data%/}" +default_owner="$(id -un 2>/dev/null || echo knoe)" +knoe_data="${PROLE_DATA:-/opt/knoe/data/${default_owner}}" +knoe_data="${knoe_data%/}" if [[ -n "$export_dir" ]]; then export_dir="${export_dir%/}" @@ -102,9 +102,9 @@ if [[ -n "$export_dir" ]]; then KUSTOMIZE_DIR="${export_dir}/kustomize" fi -DOCKER_IMPORT_DIR="${DOCKER_IMPORT_DIR:-${prole_data}/docker-import}" -HELM_CHART_DIR="${HELM_CHART_DIR:-${prole_data}/helm-chart}" -KUSTOMIZE_DIR="${KUSTOMIZE_DIR:-${prole_data}/kustomize}" +DOCKER_IMPORT_DIR="${DOCKER_IMPORT_DIR:-${knoe_data}/docker-import}" +HELM_CHART_DIR="${HELM_CHART_DIR:-${knoe_data}/helm-chart}" +KUSTOMIZE_DIR="${KUSTOMIZE_DIR:-${knoe_data}/kustomize}" export_docker_images() { echo "Exporting Docker images to: ${DOCKER_IMPORT_DIR}" @@ -112,27 +112,27 @@ export_docker_images() { # Collect images from K8s manifests # Robust extraction of image names from YAML files - find "${PROJECT_ROOT}/k8s/prole" "${PROJECT_ROOT}/k8s/openbao" "${PROJECT_ROOT}/k8s/opentofu" -name "*.yaml" -exec grep -h "image:" {} + | awk -F'image:' '{print $2}' | awk '{print $1}' | sed "s/['\"]//g" > /tmp/prole_images.txt + find "${PROJECT_ROOT}/k8s/knoe" "${PROJECT_ROOT}/k8s/openbao" "${PROJECT_ROOT}/k8s/opentofu" -name "*.yaml" -exec grep -h "image:" {} + | awk -F'image:' '{print $2}' | awk '{print $1}' | sed "s/['\"]//g" > /tmp/knoe_images.txt # Also check Supabase compose if it exists if [[ -f "${PROJECT_ROOT}/supabase/docker/docker-compose.yml" ]]; then - grep -h "image:" "${PROJECT_ROOT}/supabase/docker/docker-compose.yml" | awk -F'image:' '{print $2}' | awk '{print $1}' | sed "s/['\"]//g" >> /tmp/prole_images.txt + grep -h "image:" "${PROJECT_ROOT}/supabase/docker/docker-compose.yml" | awk -F'image:' '{print $2}' | awk '{print $1}' | sed "s/['\"]//g" >> /tmp/knoe_images.txt fi # Add Kerberos proxy image if defined KRB_IMG="${KRB5_AD_PROXY_IMAGE:-alpine/socat}" if [[ -n "$KRB_IMG" ]]; then - echo "$KRB_IMG" >> /tmp/prole_images.txt + echo "$KRB_IMG" >> /tmp/knoe_images.txt fi # Add Kerberos test image (used by init_kerberos_test.sh) KRB_TEST_IMG="${KRB5_TEST_IMAGE:-${PROLE_KRB_TEST_IMAGE:-ubuntu:24.04}}" if [[ -n "$KRB_TEST_IMG" ]]; then - echo "$KRB_TEST_IMG" >> /tmp/prole_images.txt + echo "$KRB_TEST_IMG" >> /tmp/knoe_images.txt fi # Unique images - sort -u /tmp/prole_images.txt > /tmp/prole_images_unique.txt + sort -u /tmp/knoe_images.txt > /tmp/knoe_images_unique.txt while read -r image; do if [[ -z "$image" ]]; then continue; fi @@ -154,15 +154,15 @@ export_docker_images() { else echo "[ERROR] Failed to export $image" fi - done < /tmp/prole_images_unique.txt + done < /tmp/knoe_images_unique.txt - rm -f /tmp/prole_images.txt /tmp/prole_images_unique.txt + rm -f /tmp/knoe_images.txt /tmp/knoe_images_unique.txt echo "Docker export complete." } create_helm_chart() { local chart_dir="${HELM_CHART_DIR}" - local chart_name="prole" + local chart_name="knoe" local chart_version="0.1.0" local app_version app_version="$(date -u +%Y.%m.%d)" @@ -171,12 +171,12 @@ create_helm_chart() { mkdir -p "${chart_dir}/templates" # Clean managed template subdirs to avoid stale manifests. - rm -rf "${chart_dir}/templates/prole" "${chart_dir}/templates/openbao" "${chart_dir}/templates/opentofu" + rm -rf "${chart_dir}/templates/knoe" "${chart_dir}/templates/openbao" "${chart_dir}/templates/opentofu" cat > "${chart_dir}/Chart.yaml" < "${dest_dir}/kustomization.yaml" } - create_kustomize_package "prole" "${PROJECT_ROOT}/k8s/prole" + create_kustomize_package "knoe" "${PROJECT_ROOT}/k8s/knoe" create_kustomize_package "openbao" "${PROJECT_ROOT}/k8s/openbao" create_kustomize_package "opentofu" "${PROJECT_ROOT}/k8s/opentofu" @@ -288,7 +288,7 @@ prepare_k3s_pipeline() { echo "==> Staging k8s manifests to ${manifest_root}" local total=0 - for component in prole openbao opentofu; do + for component in knoe openbao opentofu; do local src="${PROJECT_ROOT}/k8s/${component}" if [[ ! -d "$src" ]]; then echo " [SKIP] ${component}/ (not found)" @@ -347,15 +347,15 @@ EOF if [[ -z "$repo_url" ]]; then repo_url=$(cd "${PROJECT_ROOT}" && git remote get-url origin 2>/dev/null || true) fi - repo_url="${repo_url:-https://github.com/prole-dev/prole.git}" + repo_url="${repo_url:-https://github.com/knoe-dev/knoe.git}" local target_revision="${PROLE_GIT_BRANCH:-main}" - for component in prole openbao opentofu; do + for component in knoe openbao opentofu; do cat > "${argocd_dir}/application-${component}.yaml" <&2 exit 1 fi - prole_render_manifest "$ARGOCD_MANIFEST_FILE" | sed "s|\\${ARGOCD_NAMESPACE}|$ARGOCD_NAMESPACE|g" + knoe_render_manifest "$ARGOCD_MANIFEST_FILE" | sed "s|\\${ARGOCD_NAMESPACE}|$ARGOCD_NAMESPACE|g" } resolve_argocd_node_selector() { @@ -119,7 +119,7 @@ apply_argocd_node_selector() { apply_argocd() { echo "Applying ArgoCD manifest to namespace '$ARGOCD_NAMESPACE' ..." - render_manifest | kubectl apply --server-side --force-conflicts --field-manager=prole-installer --validate=false -n "$ARGOCD_NAMESPACE" -f - + render_manifest | kubectl apply --server-side --force-conflicts --field-manager=knoe-installer --validate=false -n "$ARGOCD_NAMESPACE" -f - apply_argocd_node_selector kubectl rollout status deploy/argocd-server -n "$ARGOCD_NAMESPACE" --timeout=${ROLLOUT_TIMEOUT:-300s} || true kubectl rollout status deploy/argocd-repo-server -n "$ARGOCD_NAMESPACE" --timeout=${ROLLOUT_TIMEOUT:-300s} || true @@ -145,7 +145,7 @@ apply_argocd_oidc_config() { BOOTSTRAP_ADMIN_EMAIL="$BOOTSTRAP_ADMIN_EMAIL" \ envsubst < "$cm_file" \ | kubectl apply --server-side --force-conflicts \ - --field-manager=prole-installer -f - + --field-manager=knoe-installer -f - } rollout_restart_argocd() { @@ -171,7 +171,7 @@ case "$ACTION" in ensure_namespace apply_argocd apply_argocd_oidc_config - prole_register_port_forward "argocd" "$ARGOCD_NAMESPACE" "svc/${ARGOCD_SERVER_SERVICE}" \ + knoe_register_port_forward "argocd" "$ARGOCD_NAMESPACE" "svc/${ARGOCD_SERVER_SERVICE}" \ "$ARGOCD_PORT_FORWARD_LOCAL" "$ARGOCD_PORT_FORWARD_REMOTE" "0.0.0.0" "TCP" "ArgoCD" ;; restart) @@ -180,7 +180,7 @@ case "$ACTION" in apply_argocd rollout_restart_argocd apply_argocd_oidc_config - prole_register_port_forward "argocd" "$ARGOCD_NAMESPACE" "svc/${ARGOCD_SERVER_SERVICE}" \ + knoe_register_port_forward "argocd" "$ARGOCD_NAMESPACE" "svc/${ARGOCD_SERVER_SERVICE}" \ "$ARGOCD_PORT_FORWARD_LOCAL" "$ARGOCD_PORT_FORWARD_REMOTE" "0.0.0.0" "TCP" "ArgoCD" ;; stop) diff --git a/etc/init_certmgr.sh b/etc/init_certmgr.sh index 87b7612..f906505 100755 --- a/etc/init_certmgr.sh +++ b/etc/init_certmgr.sh @@ -29,13 +29,13 @@ unset _has_config _arg _default_cfg common_core_preparse_config "$@" # shellcheck disable=SC1090 -source "$SCRIPT_DIR/prole_cfg.sh" +source "$SCRIPT_DIR/knoe_cfg.sh" set -- "${COMMON_CORE_ARGS[@]}" common_core_parse_args "$@" -if [[ -z "${PROLE_MODE:-}" ]]; then - export PROLE_MODE="k3s" +if [[ -z "${KNOE_MODE:-}" ]]; then + export KNOE_MODE="k3s" fi if [[ "${COMMON_CORE_HELP:-0}" == 1 ]]; then @@ -58,7 +58,7 @@ common_core_apply_namespace "$CERTMGR_NAMESPACE" CERTMGR_VERSION="${CERTMGR_VERSION:-v1.14.6}" CERTMGR_RELEASE_URL="https://github.com/cert-manager/cert-manager/releases/download/${CERTMGR_VERSION}/cert-manager.yaml" CERTMGR_PF_ADDR="${CERTMGR_PF_ADDR:-127.0.0.1}" -if [[ "${PROLE_MODE:-}" == "k3s" ]]; then +if [[ "${KNOE_MODE:-}" == "k3s" ]]; then CERTMGR_PF_ADDR="${CERTMGR_PF_ADDR:-0.0.0.0}" fi @@ -132,7 +132,7 @@ action_update() { _apply_manifest wait_rollout fi - prole_register_port_forward "certmgr" "$CERTMGR_NAMESPACE" "svc/cert-manager-webhook" "9443" "9443" "${CERTMGR_PF_ADDR}" "TCP" "CertManager Webhook" + knoe_register_port_forward "certmgr" "$CERTMGR_NAMESPACE" "svc/cert-manager-webhook" "9443" "9443" "${CERTMGR_PF_ADDR}" "TCP" "CertManager Webhook" } case "$ACTION" in diff --git a/etc/init_cnpg_backup.sh b/etc/init_cnpg_backup.sh index 8caa48d..c90b50f 100755 --- a/etc/init_cnpg_backup.sh +++ b/etc/init_cnpg_backup.sh @@ -10,15 +10,15 @@ set -euo pipefail # Initialize SCRIPT_DIR SCRIPT_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) -# Load environment and config via prole_cfg.sh +# Load environment and config via knoe_cfg.sh # shellcheck disable=SC1090 -source "$SCRIPT_DIR/prole_cfg.sh" +source "$SCRIPT_DIR/knoe_cfg.sh" if [[ "${1:-}" == "--mode" || "${1:-}" == "-m" ]]; then - prole_set_mode "${2:-}" + knoe_set_mode "${2:-}" shift 2 elif [[ "${1:-}" == --mode=* || "${1:-}" == -m=* ]]; then - prole_set_mode "${1#*=}" + knoe_set_mode "${1#*=}" shift fi @@ -244,8 +244,8 @@ bootstrap_garage_layout_if_needed() { fi echo "Garage layout still not applied; invoking Garage bootstrap recovery ..." - if [[ -n "${PROLE_MODE:-}" ]]; then - if ! bash "$init_script" --mode "$PROLE_MODE" start; then + if [[ -n "${KNOE_MODE:-}" ]]; then + if ! bash "$init_script" --mode "$KNOE_MODE" start; then echo "WARN: Garage bootstrap recovery failed (continuing wait loop)." >&2 fi else diff --git a/etc/init_cnpg_gke.sh b/etc/init_cnpg_gke.sh index c3acab6..5c85073 100755 --- a/etc/init_cnpg_gke.sh +++ b/etc/init_cnpg_gke.sh @@ -27,7 +27,7 @@ CNPG_BACKUP_SA="${CNPG_BACKUP_SA:-cnpg-backup}" ARTIFACT_REGISTRY="${ARTIFACT_REGISTRY:-}" KNOE_DB_IMAGE_TAG="${KNOE_DB_IMAGE_TAG:-}" DB_PASSWORD="${DB_PASSWORD:-}" -CNPG_DB_OWNER="${CNPG_DB_OWNER:-prole}" +CNPG_DB_OWNER="${CNPG_DB_OWNER:-knoe}" CNPG_STORAGE_CLASS_ORDER="${CNPG_STORAGE_CLASS_ORDER:-premium-rwo,ssd,premium,standard-rwo,garage-hdd,standard,dynamic-rwo}" CNPG_STORAGE_WAIT_TIMEOUT="${CNPG_STORAGE_WAIT_TIMEOUT:-240}" @@ -61,14 +61,14 @@ resolve_knoe_db_image_tag() { [[ -n "$KNOE_DB_IMAGE_TAG" ]] && return local mode_key="k8s" - local prole_home - prole_home="${PROLE_HOME:-$REPO_ROOT}" + local knoe_home + knoe_home="${KNOE_HOME:-$REPO_ROOT}" - local pg_version_file="$prole_home/modes/$mode_key/conf/postgresql/.version" - local release_file="$prole_home/modes/$mode_key/knoe-db/.version" + local pg_version_file="$knoe_home/modes/$mode_key/conf/postgresql/.version" + local release_file="$knoe_home/modes/$mode_key/knoe-db/.version" - [[ -f "$pg_version_file" ]] || pg_version_file="$prole_home/conf/postgresql/.version" - [[ -f "$release_file" ]] || release_file="$prole_home/knoe-db/.version" + [[ -f "$pg_version_file" ]] || pg_version_file="$knoe_home/conf/postgresql/.version" + [[ -f "$release_file" ]] || release_file="$knoe_home/knoe-db/.version" local pg_version release if [[ -f "$pg_version_file" ]]; then diff --git a/etc/init_common_core.sh b/etc/init_common_core.sh index efc9635..6bb0079 100755 --- a/etc/init_common_core.sh +++ b/etc/init_common_core.sh @@ -14,7 +14,7 @@ source "$SCRIPT_DIR/common_core_lib.sh" common_core_preparse_config "$@" # shellcheck disable=SC1090 -source "$SCRIPT_DIR/prole_cfg.sh" +source "$SCRIPT_DIR/knoe_cfg.sh" set -- "${COMMON_CORE_ARGS[@]}" common_core_parse_args "$@" @@ -41,8 +41,8 @@ if [[ -n "${COMMON_CORE_NAMESPACE:-}" ]]; then NS_ARGS=("-n" "$COMMON_CORE_NAMESPACE") fi MODE_ARGS=() -if [[ -n "${PROLE_MODE:-}" ]]; then - MODE_ARGS=("--mode" "$PROLE_MODE") +if [[ -n "${KNOE_MODE:-}" ]]; then + MODE_ARGS=("--mode" "$KNOE_MODE") fi CFG_ARGS=() if [[ -n "${COMMON_CORE_CONFIG_PATH:-}" ]]; then diff --git a/etc/init_common_services.sh b/etc/init_common_services.sh index 43adae2..c1fa7af 100755 --- a/etc/init_common_services.sh +++ b/etc/init_common_services.sh @@ -22,7 +22,7 @@ unset _has_config _arg _default_cfg common_core_preparse_config "$@" # shellcheck disable=SC1090 -source "$SCRIPT_DIR/prole_cfg.sh" +source "$SCRIPT_DIR/knoe_cfg.sh" usage() { cat <&2 + echo "ERROR: No namespace specified. Set SERVICE_NAMESPACE in knoe.cfg or pass -n/--namespace." >&2 exit 1 fi # Registry should live in the common-core/service namespace unless explicitly overridden. REGISTRY_NS="${REGISTRY_NAMESPACE:-${NS}}" -prole_ensure_kubeconfig >/dev/null 2>&1 || true -echo "DEBUG: prole_ensure_kubeconfig finished" >&2 +knoe_ensure_kubeconfig >/dev/null 2>&1 || true +echo "DEBUG: knoe_ensure_kubeconfig finished" >&2 ensure_kube_context || exit 1 echo "DEBUG: ensure_kube_context finished" >&2 @@ -152,7 +152,7 @@ fi # enable pre-loading from `DOCKER_IMPORT_DIR` / `$PROLE_DATA/docker-import`. # --------------------------------------------------------------------------- -_resolve_prole_data() { +_resolve_knoe_data() { local d="${PROLE_DATA:-}" if [[ -z "$d" ]]; then if [[ -f "$SCRIPT_DIR/../env.sh" ]]; then @@ -176,7 +176,7 @@ _exec_with_progress_footer() { start_time=$(date +%s) local tmp_out - tmp_out=$(mktemp 2>/dev/null || echo "/tmp/_prole_exec_$$.out") + tmp_out=$(mktemp 2>/dev/null || echo "/tmp/_knoe_exec_$$.out") # Spawn live footer only when stderr is a real TTY local spinner_pid="" @@ -239,9 +239,9 @@ PYEOF } _preload_docker_images() { - local prole_data - prole_data=$(_resolve_prole_data) - local import_dir="${DOCKER_IMPORT_DIR:-${prole_data:+${prole_data}/docker-import}}" + local knoe_data + knoe_data=$(_resolve_knoe_data) + local import_dir="${DOCKER_IMPORT_DIR:-${knoe_data:+${knoe_data}/docker-import}}" if [[ -z "$import_dir" || ! -d "$import_dir" ]]; then echo "[SKIP] No docker-import directory found; images will be pulled from registries." @@ -255,7 +255,7 @@ _preload_docker_images() { return 0 fi - local mode="${PROLE_MODE:-k3d}" + local mode="${KNOE_MODE:-k3d}" echo "Pre-loading container images from $import_dir (mode=$mode) ..." case "$mode" in @@ -403,7 +403,7 @@ _preload_docker_images() { local registry="${LOCAL_REGISTRY:-}" if [[ -z "$registry" ]]; then local host - host="$(_prole_host_from_url "${PROLE_K3S_SERVER:-${K3S_SERVER_URL:-}}")" + host="$(_knoe_host_from_url "${PROLE_K3S_SERVER:-${K3S_SERVER_URL:-}}")" if [[ -n "${host:-}" ]]; then registry="${host}:5000" fi @@ -484,7 +484,7 @@ _preload_docker_images() { case "$ACTION" in start|update|reload|initialize|restart|repair) - if _prole_bool_true "${DOCKER_PRELOAD:-${PROLE_DOCKER_PRELOAD:-}}"; then + if _knoe_bool_true "${DOCKER_PRELOAD:-${PROLE_DOCKER_PRELOAD:-}}"; then _preload_docker_images else echo "[SKIP] Docker image pre-load disabled (set DOCKER_PRELOAD=1 to enable)." @@ -507,14 +507,14 @@ OPENBAO_NAME=${OPENBAO_NAME:-openbao} REGISTRY_NAME=${REGISTRY_NAME:-registry} GARAGE_NAME=${GARAGE_NAME:-garage} REDIS_NAME=${REDIS_NAME:-redis} -KONG_NAME=${KONG_NAME:-prole-svc-kong} -KONG_CONFIG_NAME=${KONG_CONFIG_NAME:-prole-svc-kong-config} +KONG_NAME=${KONG_NAME:-knoe-svc-kong} +KONG_CONFIG_NAME=${KONG_CONFIG_NAME:-knoe-svc-kong-config} # In k8s (GKE/prod) mode use the knoe-svc-kong naming -if [ "${PROLE_MODE:-}" = "k8s" ]; then - KONG_NAME=${KONG_NAME/prole-svc-kong/knoe-svc-kong} - KONG_CONFIG_NAME=${KONG_CONFIG_NAME/prole-svc-kong/knoe-svc-kong} +if [ "${KNOE_MODE:-}" = "k8s" ]; then + KONG_NAME=${KONG_NAME/knoe-svc-kong/knoe-svc-kong} + KONG_CONFIG_NAME=${KONG_CONFIG_NAME/knoe-svc-kong/knoe-svc-kong} fi -export KONG_NAME KONG_CONFIG_NAME PROLE_MODE +export KONG_NAME KONG_CONFIG_NAME KNOE_MODE OPENTOFU_CONFIGMAP=${OPENTOFU_CONFIGMAP:-opentofu-nginx} OPENTOFU_SECRET=${OPENTOFU_SECRET:-opentofu-admin} GARAGE_CONFIGMAP=${GARAGE_CONFIGMAP:-garage-config} @@ -544,7 +544,7 @@ collect_other_namespaces() { migrate_common_services() { local old_ns - if [ "${PROLE_MODE:-}" != "k8s" ]; then + if [ "${KNOE_MODE:-}" != "k8s" ]; then for old_ns in $(collect_other_namespaces "$NS" "$OPENTOFU_NAME" deployment service); do echo "Found OpenTofu in namespace '$old_ns'; removing before deploy to '$NS' ..." if [ -x "$SCRIPT_DIR/init_opentofu.sh" ]; then @@ -610,15 +610,15 @@ migrate_common_services() { done # Same-namespace: remove the alternate Kong deployment name if present. - # In k8s/GKE mode KONG_NAME=knoe-svc-kong; a leftover prole-svc-kong (or vice + # In k8s/GKE mode KONG_NAME=knoe-svc-kong; a leftover knoe-svc-kong (or vice # versa) in the same namespace causes duplicate pods that the deployer won't # clean up on its own. local kong_alt_name kong_alt_config case "$KONG_NAME" in - *knoe-svc-kong*) kong_alt_name="${KONG_NAME//knoe-svc-kong/prole-svc-kong}" - kong_alt_config="${KONG_CONFIG_NAME//knoe-svc-kong/prole-svc-kong}" ;; - *prole-svc-kong*) kong_alt_name="${KONG_NAME//prole-svc-kong/knoe-svc-kong}" - kong_alt_config="${KONG_CONFIG_NAME//prole-svc-kong/knoe-svc-kong}" ;; + *knoe-svc-kong*) kong_alt_name="${KONG_NAME//knoe-svc-kong/knoe-svc-kong}" + kong_alt_config="${KONG_CONFIG_NAME//knoe-svc-kong/knoe-svc-kong}" ;; + *knoe-svc-kong*) kong_alt_name="${KONG_NAME//knoe-svc-kong/knoe-svc-kong}" + kong_alt_config="${KONG_CONFIG_NAME//knoe-svc-kong/knoe-svc-kong}" ;; *) kong_alt_name="" ; kong_alt_config="" ;; esac if [[ -n "$kong_alt_name" && "$kong_alt_name" != "$KONG_NAME" ]]; then @@ -675,7 +675,7 @@ esac # 4. OpenTofu – IaC engine; depends on registry + secrets (non-k8s) # --------------------------------------------------------------------------- -if [ "${PROLE_MODE:-}" = "k8s" ]; then +if [ "${KNOE_MODE:-}" = "k8s" ]; then echo "[INFO] Registry update namespace=${REGISTRY_NS}" echo "[INFO] GKE/prod mode: skipping in-cluster Docker registry (using GCP Artifact Registry)." else @@ -712,7 +712,7 @@ else echo "WARN: init_garage_store.sh not found; garage deploy skipped." fi -if [ "${PROLE_MODE:-}" = "k8s" ]; then +if [ "${KNOE_MODE:-}" = "k8s" ]; then echo "[INFO] k8s mode: skipping OpenTofu deploy." elif [ -x "$SCRIPT_DIR/init_opentofu.sh" ]; then ROLLOUT_TIMEOUT="${ROLLOUT_TIMEOUT:-300s}" "$SCRIPT_DIR/init_opentofu.sh" -n "$NS" "$ACTION" || rc=$? diff --git a/etc/init_database_options.sh b/etc/init_database_options.sh index 764b452..d2d7115 100755 --- a/etc/init_database_options.sh +++ b/etc/init_database_options.sh @@ -1,10 +1,10 @@ #!/bin/bash set -e -# PROLE_HOME should be set by the caller -PROLE_CONF_DIR="${PROLE_HOME:-$HOME/.prole}/conf" -mkdir -p "$PROLE_CONF_DIR" -VERSION_FILE="$PROLE_CONF_DIR/database_versions.json" +# KNOE_HOME should be set by the caller +KNOE_CONF_DIR="${KNOE_HOME:-$HOME/.knoe}/conf" +mkdir -p "$KNOE_CONF_DIR" +VERSION_FILE="$KNOE_CONF_DIR/database_versions.json" echo "Fetching latest database versions..." diff --git a/etc/init_db_manager.sh b/etc/init_db_manager.sh index 60450d4..1425976 100755 --- a/etc/init_db_manager.sh +++ b/etc/init_db_manager.sh @@ -5,7 +5,7 @@ set -euo pipefail # - Build and deploy the knoe-db-manager Node.js REST endpoint # - Provides /backup//full to trigger barman full backups into Garage # - Deploys to the knoe-db namespace; accessible via Kong endpoint /backup -# - Deploys to the current cluster (k3d or k3s) based on PROLE_MODE from active config +# - Deploys to the current cluster (k3d or k3s) based on KNOE_MODE from active config # # Usage: # ./init_db_manager.sh [--mode MODE] @@ -13,23 +13,23 @@ set -euo pipefail SCRIPT_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) # shellcheck disable=SC1090 -source "$SCRIPT_DIR/prole_cfg.sh" +source "$SCRIPT_DIR/knoe_cfg.sh" if [[ "${1:-}" == "--mode" || "${1:-}" == "-m" ]]; then - prole_set_mode "${2:-}" + knoe_set_mode "${2:-}" shift 2 elif [[ "${1:-}" == --mode=* || "${1:-}" == -m=* ]]; then - prole_set_mode "${1#*=}" + knoe_set_mode "${1#*=}" shift fi ACTION=${1:-start} NAMESPACE="${PROLE_NAMESPACE}" -PROLE_HOME=${PROLE_HOME:-$(cd "$SCRIPT_DIR/.." && pwd)} +KNOE_HOME=${KNOE_HOME:-$(cd "$SCRIPT_DIR/.." && pwd)} DB_MANAGER_IMAGE=${DB_MANAGER_IMAGE:-knoe-db-manager:latest} DB_MANAGER_NAME=${DB_MANAGER_NAME:-knoe-db-manager} DB_MANAGER_PORT=${DB_MANAGER_PORT:-80} -DB_MANAGER_SRC=${DB_MANAGER_SRC:-$PROLE_HOME/src/db-manager} +DB_MANAGER_SRC=${DB_MANAGER_SRC:-$KNOE_HOME/src/db-manager} REGISTRY=${REGISTRY:-} usage() { @@ -77,7 +77,7 @@ import_image_k3d() { return 0 fi - local cluster_name="${K3D_CLUSTER_NAME:-prole-dev-cluster}" + local cluster_name="${K3D_CLUSTER_NAME:-knoe-dev-cluster}" echo "Importing $DB_MANAGER_IMAGE into k3d cluster '$cluster_name' ..." k3d image import "$DB_MANAGER_IMAGE" -c "$cluster_name" >/dev/null 2>&1 || true echo "Image imported to k3d cluster successfully." @@ -87,7 +87,7 @@ import_image_k3s() { # k3s: publish image to the shared registry and let nodes pull it. if [[ -z "${REGISTRY:-}" ]]; then local host - host="$(_prole_host_from_url "${PROLE_K3S_SERVER:-${K3S_SERVER_URL:-}}")" + host="$(_knoe_host_from_url "${PROLE_K3S_SERVER:-${K3S_SERVER_URL:-}}")" if [[ -n "${host:-}" ]]; then REGISTRY="${host}:5000" fi @@ -116,10 +116,10 @@ import_image_k3s() { deploy() { echo "Deploying $DB_MANAGER_NAME to namespace '$NAMESPACE' ..." - local manifests_dir="$PROLE_HOME/deploy/opentofu/k3s/manifests/prole" + local manifests_dir="$KNOE_HOME/deploy/opentofu/k3s/manifests/knoe" # Only deploy db-manager resources — the full kustomization includes services - # (garage, openbao, prole, etc.) that belong in the service namespace and would + # (garage, openbao, knoe, etc.) that belong in the service namespace and would # create duplicates if applied here. kubectl apply -f "$manifests_dir/db-manager-deployment.yaml" -n "$NAMESPACE" kubectl apply -f "$manifests_dir/db-manager-service.yaml" -n "$NAMESPACE" @@ -165,10 +165,10 @@ case "$ACTION" in ensure_tools ensure_namespace build_image - case "${PROLE_MODE:-k3d}" in + case "${KNOE_MODE:-k3d}" in k3d) import_image_k3d ;; k3s) import_image_k3s ;; - *) echo "WARN: Unknown mode '${PROLE_MODE:-}'; skipping image import." >&2 ;; + *) echo "WARN: Unknown mode '${KNOE_MODE:-}'; skipping image import." >&2 ;; esac deploy ;; diff --git a/etc/init_forgejo.sh b/etc/init_forgejo.sh index 6000107..1b64202 100644 --- a/etc/init_forgejo.sh +++ b/etc/init_forgejo.sh @@ -5,9 +5,9 @@ PROG="init_forgejo" SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" # shellcheck disable=SC1090 -source "$SCRIPT_DIR/prole_cfg.sh" +source "$SCRIPT_DIR/knoe_cfg.sh" -MODE="$(prole_normalize_mode "${PROLE_MODE:-${DEPLOYMENT_MODE:-k3d}}")" +MODE="$(knoe_normalize_mode "${KNOE_MODE:-${DEPLOYMENT_MODE:-k3d}}")" NAMESPACE="${FORGEJO_NAMESPACE:-}" CFG_PATH="" FORCE=0 @@ -37,8 +37,8 @@ warn() { echo "[WARN] $*" >&2; } while [[ $# -gt 0 ]]; do case "$1" in - --mode) MODE="$(prole_normalize_mode "${2:-}")"; shift 2 ;; - --mode=*) MODE="$(prole_normalize_mode "${1#*=}")"; shift 1 ;; + --mode) MODE="$(knoe_normalize_mode "${2:-}")"; shift 2 ;; + --mode=*) MODE="$(knoe_normalize_mode "${1#*=}")"; shift 1 ;; -n|--namespace) NAMESPACE="${2:-}"; shift 2 ;; --namespace=*) NAMESPACE="${1#*=}"; shift 1 ;; -c|--config) CFG_PATH="${2:-}"; shift 2 ;; @@ -50,16 +50,16 @@ while [[ $# -gt 0 ]]; do done # Resolve config path and namespace defaults when present -if [[ -z "$CFG_PATH" && -n "${PROLE_CONF:-}" ]]; then - CFG_PATH="$(_prole_cfg_select_cfg_file "${PROLE_CONF}")" +if [[ -z "$CFG_PATH" && -n "${KNOE_CONF:-}" ]]; then + CFG_PATH="$(_knoe_cfg_select_cfg_file "${KNOE_CONF}")" fi if [[ -z "$CFG_PATH" ]]; then - CFG_PATH="$(_prole_cfg_select_cfg_file "$SCRIPT_DIR/../conf")" + CFG_PATH="$(_knoe_cfg_select_cfg_file "$SCRIPT_DIR/../conf")" fi if [[ -z "$NAMESPACE" && -n "$CFG_PATH" ]]; then - maybe_ns="$(_prole_cfg_extract_key "$CFG_PATH" "GITOPS_NAMESPACE")" - [[ -z "$maybe_ns" ]] && maybe_ns="$(_prole_cfg_extract_key "$CFG_PATH" "FORGEJO_NAMESPACE")" + maybe_ns="$(_knoe_cfg_extract_key "$CFG_PATH" "GITOPS_NAMESPACE")" + [[ -z "$maybe_ns" ]] && maybe_ns="$(_knoe_cfg_extract_key "$CFG_PATH" "FORGEJO_NAMESPACE")" NAMESPACE="$maybe_ns" fi NAMESPACE="${NAMESPACE:-forgejo}" @@ -69,13 +69,13 @@ case "$MODE" in k3d|k3s|k8s|local) ;; *) die "Unsupported mode '$MODE' (use k3d, k3s, k8s, or local)" ;; esac -export PROLE_MODE="$MODE" +export KNOE_MODE="$MODE" command -v kubectl >/dev/null || die "kubectl not found" DB_NAMESPACE="${PROLE_NAMESPACE:-}" if [[ -z "$DB_NAMESPACE" && -n "$CFG_PATH" ]]; then - DB_NAMESPACE="$(_prole_cfg_extract_key "$CFG_PATH" "NAMESPACE")" + DB_NAMESPACE="$(_knoe_cfg_extract_key "$CFG_PATH" "NAMESPACE")" fi DB_NAMESPACE="${DB_NAMESPACE:-default}" diff --git a/etc/init_garage_store.sh b/etc/init_garage_store.sh index 410f477..b0605a6 100755 --- a/etc/init_garage_store.sh +++ b/etc/init_garage_store.sh @@ -17,7 +17,7 @@ source "$SCRIPT_DIR/common_core_lib.sh" common_core_preparse_config "$@" # shellcheck disable=SC1090 -source "$SCRIPT_DIR/prole_cfg.sh" +source "$SCRIPT_DIR/knoe_cfg.sh" set -- "${COMMON_CORE_ARGS[@]}" common_core_parse_args "$@" @@ -91,13 +91,13 @@ garage_ensure_absent_non_authoritative() { delete_manifests || true } -# Support both PROLE_HOME/k8s and sibling k8s directory -if [[ -d "$SCRIPT_DIR/../k8s/prole" ]]; then - GARAGE_MANIFEST_DIR="$SCRIPT_DIR/../k8s/prole" -elif [[ -n "${PROLE_HOME:-}" && -d "$PROLE_HOME/k8s/prole" ]]; then - GARAGE_MANIFEST_DIR="$PROLE_HOME/k8s/prole" +# Support both KNOE_HOME/k8s and sibling k8s directory +if [[ -d "$SCRIPT_DIR/../k8s/knoe" ]]; then + GARAGE_MANIFEST_DIR="$SCRIPT_DIR/../k8s/knoe" +elif [[ -n "${KNOE_HOME:-}" && -d "$KNOE_HOME/k8s/knoe" ]]; then + GARAGE_MANIFEST_DIR="$KNOE_HOME/k8s/knoe" else - GARAGE_MANIFEST_DIR="$SCRIPT_DIR/../k8s/prole" + GARAGE_MANIFEST_DIR="$SCRIPT_DIR/../k8s/knoe" fi GARAGE_FILES=( @@ -107,14 +107,14 @@ GARAGE_FILES=( "$GARAGE_MANIFEST_DIR/garage-statefulset.yaml" "$GARAGE_MANIFEST_DIR/garage-service.yaml" ) -if [[ "${PROLE_MODE:-}" == "k3d" ]]; then +if [[ "${KNOE_MODE:-}" == "k3d" ]]; then # k3d: no local storage provisioner — skip synology StorageClass and static PVs. GARAGE_FILES=( "$GARAGE_MANIFEST_DIR/garage-configmap.yaml" "$GARAGE_MANIFEST_DIR/garage-statefulset.yaml" "$GARAGE_MANIFEST_DIR/garage-service.yaml" ) -elif [[ "${PROLE_MODE:-}" == "k8s" ]]; then +elif [[ "${KNOE_MODE:-}" == "k8s" ]]; then # GKE Autopilot: apply our custom garage-hdd StorageClass (pd-standard HDD, avoids SSD quota). # The skip-if-exists guard in apply_manifests handles idempotent re-runs safely. # Use GCP-specific statefulset (no synology selectors, explicit resource requests). @@ -173,7 +173,7 @@ ensure_secrets() { } k3d_cleanup_pending_pvc() { - if [[ "${PROLE_MODE:-}" != "k3d" ]]; then + if [[ "${KNOE_MODE:-}" != "k3d" ]]; then return 0 fi if ! kubectl get pvc data-garage-0 -n "$NAMESPACE" >/dev/null 2>&1; then @@ -202,7 +202,7 @@ apply_manifests() { local rendered="" local diff_out="" local diff_rc=0 - rendered=$(prole_render_manifest "$f") + rendered=$(knoe_render_manifest "$f") if diff_out=$(printf '%s' "$rendered" | kubectl diff -n "$NAMESPACE" -f - 2>&1); then diff_rc=0 else @@ -251,7 +251,7 @@ apply_manifests() { garage-statefulset.yaml) GARAGE_STATEFULSET_CHANGED=1 ;; esac else - if [[ "${PROLE_MODE:-}" == "k3d" && "$(basename "$f")" == "garage-statefulset.yaml" ]] \ + if [[ "${KNOE_MODE:-}" == "k3d" && "$(basename "$f")" == "garage-statefulset.yaml" ]] \ && echo "$output" | grep -q "updates to statefulset spec"; then echo "WARN: Garage StatefulSet immutable in k3d; skipping apply." continue @@ -313,7 +313,7 @@ ensure_container_command() { } pin_garage_node_k3d() { - if [[ "${PROLE_MODE:-}" != "k3d" ]]; then + if [[ "${KNOE_MODE:-}" != "k3d" ]]; then return 0 fi if [[ -z "${GARAGE_PIN_NODE:-}" ]]; then @@ -379,7 +379,7 @@ dump_debug() { echo "---- Garage debug end ----" } -recycle_released_prole_iscsi_pv_for_pvc() { +recycle_released_knoe_iscsi_pv_for_pvc() { # StorageClass `synology-iscsi` uses `Retain` PV reclaim policy. On restart, PVs can remain # in `Released` with a stale `claimRef`, which prevents a same-named PVC from binding. local ns="$1" @@ -419,12 +419,12 @@ wait_ready() { local initial_timeout="${PVC_REPAIR_WAIT_TIMEOUT:-30s}" if ! kubectl rollout status statefulset/$GARAGE_NAME -n "$NAMESPACE" --timeout="$initial_timeout"; then - if [[ "${PROLE_MODE:-}" == "k8s" ]]; then + if [[ "${KNOE_MODE:-}" == "k8s" ]]; then echo "WARN: Garage not ready after $initial_timeout; PVC provisioning may still be in progress (GKE CSI)." >&2 else echo "WARN: Garage not ready after $initial_timeout; checking for Released synology-iscsi PVs with stale claimRefs ..." >&2 fi - recycle_released_prole_iscsi_pv_for_pvc "$NAMESPACE" "data-garage-0" || true + recycle_released_knoe_iscsi_pv_for_pvc "$NAMESPACE" "data-garage-0" || true fi if ! kubectl rollout status statefulset/$GARAGE_NAME -n "$NAMESPACE" --timeout=${ROLLOUT_TIMEOUT:-300s}; then @@ -547,7 +547,7 @@ case "$ACTION" in restart_statefulset wait_ready init_layout - prole_register_port_forward "garage" "${NAMESPACE:-default}" "svc/garage" "3900" "3900" "0.0.0.0" "TCP" "Garage S3 API" + knoe_register_port_forward "garage" "${NAMESPACE:-default}" "svc/garage" "3900" "3900" "0.0.0.0" "TCP" "Garage S3 API" ;; stop) ensure_tools diff --git a/etc/init_gitea.sh b/etc/init_gitea.sh index a0fc9e9..669bb99 100755 --- a/etc/init_gitea.sh +++ b/etc/init_gitea.sh @@ -5,9 +5,9 @@ PROG="init_gitea" SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" # shellcheck disable=SC1090 -source "$SCRIPT_DIR/prole_cfg.sh" +source "$SCRIPT_DIR/knoe_cfg.sh" -MODE="$(prole_normalize_mode "${PROLE_MODE:-${DEPLOYMENT_MODE:-k3d}}")" +MODE="$(knoe_normalize_mode "${KNOE_MODE:-${DEPLOYMENT_MODE:-k3d}}")" NAMESPACE="${GITEA_NAMESPACE:-}" CFG_PATH="" FORCE=0 @@ -37,8 +37,8 @@ warn() { echo "[WARN] $*" >&2; } while [[ $# -gt 0 ]]; do case "$1" in - --mode) MODE="$(prole_normalize_mode "${2:-}")"; shift 2 ;; - --mode=*) MODE="$(prole_normalize_mode "${1#*=}")"; shift 1 ;; + --mode) MODE="$(knoe_normalize_mode "${2:-}")"; shift 2 ;; + --mode=*) MODE="$(knoe_normalize_mode "${1#*=}")"; shift 1 ;; -n|--namespace) NAMESPACE="${2:-}"; shift 2 ;; --namespace=*) NAMESPACE="${1#*=}"; shift 1 ;; -c|--config) CFG_PATH="${2:-}"; shift 2 ;; @@ -50,16 +50,16 @@ while [[ $# -gt 0 ]]; do done # Resolve config path and namespace defaults when present -if [[ -z "$CFG_PATH" && -n "${PROLE_CONF:-}" ]]; then - CFG_PATH="$(_prole_cfg_select_cfg_file "${PROLE_CONF}")" +if [[ -z "$CFG_PATH" && -n "${KNOE_CONF:-}" ]]; then + CFG_PATH="$(_knoe_cfg_select_cfg_file "${KNOE_CONF}")" fi if [[ -z "$CFG_PATH" ]]; then - CFG_PATH="$(_prole_cfg_select_cfg_file "$SCRIPT_DIR/../conf")" + CFG_PATH="$(_knoe_cfg_select_cfg_file "$SCRIPT_DIR/../conf")" fi if [[ -z "$NAMESPACE" && -n "$CFG_PATH" ]]; then - maybe_ns="$(_prole_cfg_extract_key "$CFG_PATH" "GITOPS_NAMESPACE")" - [[ -z "$maybe_ns" ]] && maybe_ns="$(_prole_cfg_extract_key "$CFG_PATH" "GITEA_NAMESPACE")" + maybe_ns="$(_knoe_cfg_extract_key "$CFG_PATH" "GITOPS_NAMESPACE")" + [[ -z "$maybe_ns" ]] && maybe_ns="$(_knoe_cfg_extract_key "$CFG_PATH" "GITEA_NAMESPACE")" NAMESPACE="$maybe_ns" fi NAMESPACE="${NAMESPACE:-gitea}" @@ -69,7 +69,7 @@ case "$MODE" in k3d|k3s|k8s|local) ;; *) die "Unsupported mode '$MODE' (use k3d, k3s, k8s, or local)" ;; esac -export PROLE_MODE="$MODE" +export KNOE_MODE="$MODE" command -v kubectl >/dev/null || die "kubectl not found" command -v helm >/dev/null || warn "helm not found — will use manifest fallback" @@ -88,7 +88,7 @@ GITEA_PV_NODE_SELECTOR_KEY="${GITEA_PV_NODE_SELECTOR_KEY:-${NODE_SELECTOR_KEY}}" GITEA_PV_NODE="${GITEA_PV_NODE:-${GITEA_NODE_SELECTOR:-}}" GITEA_PV_BASE_DIR="${GITEA_PV_BASE_DIR:-/synology/d005}" GITEA_STORAGE_CLASS="${GITEA_STORAGE_CLASS:-gitea-local-d005}" -GITEA_DOMAIN="${GITEA_DOMAIN:-git.prole.org}" +GITEA_DOMAIN="${GITEA_DOMAIN:-git.knoe.org}" GITEA_SSH_DOMAIN="${GITEA_SSH_DOMAIN:-$GITEA_DOMAIN}" KNOE_DB_NAMESPACE="${KNOE_DB_NAMESPACE:-${DATABASE_NAMESPACE:-knoe-db}}" KNOE_DB_CLUSTER="${KNOE_DB_CLUSTER:-${CLUSTER_NAME:-knoe-db}}" @@ -105,7 +105,7 @@ fi is_secret_placeholder() { case "${1:-}" in - '${PROLE_SECRET:'*|'${OPENBAO:'*) return 0 ;; + '${KNOE_SECRET:'*|'${OPENBAO:'*) return 0 ;; esac return 1 } @@ -211,7 +211,7 @@ if [[ "$FORCE" -eq 1 ]]; then fi # Mirror to local registry if enabled -if _prole_local_registry_enabled && command -v docker >/dev/null; then +if _knoe_local_registry_enabled && command -v docker >/dev/null; then HOST_REG="${LOCAL_REGISTRY:-${PROLE_LOCAL_REGISTRY:-}}" INTERNAL_REG="${LOCAL_REGISTRY_INTERNAL:-${PROLE_LOCAL_REGISTRY_INTERNAL:-}}" if [[ -n "$HOST_REG" ]]; then diff --git a/etc/init_gitlab.sh b/etc/init_gitlab.sh index f9da55c..78898c2 100755 --- a/etc/init_gitlab.sh +++ b/etc/init_gitlab.sh @@ -5,9 +5,9 @@ PROG="init_gitlab" SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" # Standalone-invocation fix: pre-scan $@ for --config and export PROLE_DEPLOY_CFG -# BEFORE sourcing prole_cfg.sh. deploy.sh injects PROLE_DEPLOY_CFG in its env, +# BEFORE sourcing knoe_cfg.sh. deploy.sh injects PROLE_DEPLOY_CFG in its env, # but direct invocations (./etc/init_gitlab.sh --config conf/gke.cfg deploy) do -# not — prole_cfg.sh's auto-selection then picks conf/k3d.cfg first, which +# not — knoe_cfg.sh's auto-selection then picks conf/k3d.cfg first, which # exports KUBECONTEXT=dev and downstream kubectl calls fail with # `error: context "dev" does not exist`. if [[ -z "${PROLE_DEPLOY_CFG:-}" ]]; then @@ -36,9 +36,9 @@ if [[ -z "${PROLE_DEPLOY_CFG:-}" ]]; then fi # shellcheck disable=SC1090 -source "$SCRIPT_DIR/prole_cfg.sh" +source "$SCRIPT_DIR/knoe_cfg.sh" -MODE="$(prole_normalize_mode "${PROLE_MODE:-${DEPLOYMENT_MODE:-k3d}}")" +MODE="$(knoe_normalize_mode "${KNOE_MODE:-${DEPLOYMENT_MODE:-k3d}}")" # NAMESPACE: init_gitlab.sh ALWAYS targets 'gitlab' unless explicitly overridden. # Do NOT fall back to $NAMESPACE (may be 'knoe-db' or 'gitea' from other pipeline steps). NAMESPACE="${GITLAB_NAMESPACE:-gitlab}" @@ -1699,9 +1699,9 @@ check_gitlab_post_apply_blocked() { log "Desired Gitaly state (from CR): nodeSelector=[${desired_gitaly_node_selector}], rendered.global.persistence.storageClass=[${rendered_global_sc:-}], rendered.gitlab.gitaly.persistence.storageClass=[${rendered_gitlab_gitaly_sc:-}], rendered.gitaly.persistence.storageClass=[${rendered_chart_gitaly_sc:-}]" log "Internal script GITALY_STORAGE_CLASS=[${GITALY_STORAGE_CLASS:-}]" - if [[ "$desired_cr" == *"gandalf.prole.org"* ]]; then + if [[ "$desired_cr" == *"gandalf.knoe.org"* ]]; then repair_blocked "GitLab CR contains legacy nodeSelector" \ - "Desired GitLab CR still contains gandalf.prole.org. This is a configuration bug." + "Desired GitLab CR still contains gandalf.knoe.org. This is a configuration bug." fi if [[ "$desired_cr" == *"gitlab-gitaly-static"* ]]; then repair_blocked "GitLab CR contains legacy storageClass" \ @@ -1733,7 +1733,7 @@ check_gitlab_post_apply_blocked() { live_sts_yaml=$(kubectl -n "$NAMESPACE" get statefulset "$gitaly_sts_name" -o yaml 2>/dev/null || true) if [[ -z "$live_sts_yaml" ]]; then log "Gitaly StatefulSet not found (awaiting operator action)..." - elif [[ "$live_sts_yaml" != *"gandalf.prole.org"* && "$live_sts_yaml" != *"gitlab-gitaly-static"* ]]; then + elif [[ "$live_sts_yaml" != *"gandalf.knoe.org"* && "$live_sts_yaml" != *"gitlab-gitaly-static"* ]]; then log "Gitaly StatefulSet converged to corrected state (clean nodeSelector/storageClass)." local _live_sc _live_sc=$(echo "$live_sts_yaml" | grep "storageClassName:" | cut -d: -f2 | xargs || true) @@ -1760,7 +1760,7 @@ check_gitlab_post_apply_blocked() { if [[ "$converged" == "0" ]]; then local live_sts_yaml live_sts_yaml=$(kubectl -n "$NAMESPACE" get statefulset "$gitaly_sts_name" -o yaml 2>/dev/null || true) - if [[ -n "$live_sts_yaml" && ( "$live_sts_yaml" == *"gandalf.prole.org"* || "$live_sts_yaml" == *"gitlab-gitaly-static"* ) ]]; then + if [[ -n "$live_sts_yaml" && ( "$live_sts_yaml" == *"gandalf.knoe.org"* || "$live_sts_yaml" == *"gitlab-gitaly-static"* ) ]]; then log "Live StatefulSet still legacy after grace period. Performing explicit replacement..." # We already confirmed desired CR is corrected at the start of this function. kubectl -n "$NAMESPACE" delete statefulset "$gitaly_sts_name" --wait=true 2>/dev/null || true @@ -1777,7 +1777,7 @@ check_gitlab_post_apply_blocked() { recreated_storage_class=$(echo "$live_sts_yaml" | grep "storageClassName:" | cut -d: -f2 | xargs || true) log "StatefulSet recreated. nodeSelector=[${recreated_node_selector}], storageClass=[${recreated_storage_class}]" - if [[ "$live_sts_yaml" != *"gandalf.prole.org"* && "$live_sts_yaml" != *"gitlab-gitaly-static"* ]]; then + if [[ "$live_sts_yaml" != *"gandalf.knoe.org"* && "$live_sts_yaml" != *"gitlab-gitaly-static"* ]]; then if [[ -n "$recreated_storage_class" ]] && ! gitlab_storage_class_matches_expected "$recreated_storage_class" "${GITALY_STORAGE_CLASS:-}"; then repair_blocked "Recreated Gitaly StatefulSet uses wrong storageClass" \ "Resource: statefulset/${gitaly_sts_name}. Value: storageClassName=[${recreated_storage_class}]. Expected: [${GITALY_STORAGE_CLASS:-}]. Fix: Check operator reconciliation." @@ -1912,9 +1912,9 @@ check_gitlab_post_apply_blocked() { cleanup_gitlab_wrong_gitaly_template_storage "${GITALY_STORAGE_CLASS:-}" "$live_gitaly_repo_data_template_sc" "$gitaly_pvc_mismatches" "$desired_cr" fi - if [[ "$gitaly_sts_yaml" == *"gandalf.prole.org"* ]]; then + if [[ "$gitaly_sts_yaml" == *"gandalf.knoe.org"* ]]; then repair_blocked "Gitaly using legacy Synology storage" \ - "Resource: statefulset/${gitaly_sts_name}. Value: nodeSelector contains gandalf.prole.org. Fix: Ensure GITLAB_STORAGE_NODE is not set in k8s mode." + "Resource: statefulset/${gitaly_sts_name}. Value: nodeSelector contains gandalf.knoe.org. Fix: Ensure GITLAB_STORAGE_NODE is not set in k8s mode." fi if [[ "$gitaly_sts_yaml" == *"gitlab-gitaly-static"* ]]; then repair_blocked "Gitaly using legacy Synology storage" \ @@ -2306,8 +2306,8 @@ PY while [[ $# -gt 0 ]]; do case "$1" in - --mode) MODE="$(prole_normalize_mode "${2:-}")"; shift 2 ;; - --mode=*) MODE="$(prole_normalize_mode "${1#*=}")"; shift 1 ;; + --mode) MODE="$(knoe_normalize_mode "${2:-}")"; shift 2 ;; + --mode=*) MODE="$(knoe_normalize_mode "${1#*=}")"; shift 1 ;; -n|--namespace) NAMESPACE="${2:-}"; shift 2 ;; --namespace=*) NAMESPACE="${1#*=}"; shift 1 ;; -c|--config) CFG_PATH="${2:-}"; shift 2 ;; @@ -2326,16 +2326,16 @@ done # --------------------------------------------------------------------------- # Resolve config path # --------------------------------------------------------------------------- -if [[ -z "$CFG_PATH" && -n "${PROLE_CONF:-}" && -f "${PROLE_CONF}/prole.cfg" ]]; then - CFG_PATH="$(_prole_cfg_select_cfg_file "${PROLE_CONF}")" +if [[ -z "$CFG_PATH" && -n "${KNOE_CONF:-}" && -f "${KNOE_CONF}/knoe.cfg" ]]; then + CFG_PATH="$(_knoe_cfg_select_cfg_file "${KNOE_CONF}")" fi if [[ -z "$CFG_PATH" ]]; then - CFG_PATH="$(_prole_cfg_select_cfg_file "$SCRIPT_DIR/../conf")" + CFG_PATH="$(_knoe_cfg_select_cfg_file "$SCRIPT_DIR/../conf")" fi # cfg-based namespace override (only GITLAB_NAMESPACE; GITOPS_NAMESPACE intentionally excluded) if [[ -z "$NAMESPACE" || "$NAMESPACE" == "gitlab" ]] && [[ -n "$CFG_PATH" ]]; then - maybe_ns="$(_prole_cfg_extract_key "$CFG_PATH" "GITLAB_NAMESPACE")" + maybe_ns="$(_knoe_cfg_extract_key "$CFG_PATH" "GITLAB_NAMESPACE")" [[ -n "$maybe_ns" ]] && NAMESPACE="$maybe_ns" fi # Final safety net — always default to 'gitlab' @@ -2353,7 +2353,7 @@ case "$MODE" in k3d|k3s|k8s|local) ;; *) die "Unsupported mode '$MODE' (use k3d, k3s, k8s, or local)" ;; esac -export PROLE_MODE="$MODE" +export KNOE_MODE="$MODE" command -v kubectl >/dev/null || die "kubectl not found" command -v helm >/dev/null || die "helm not found (required for GitLab Operator install)" @@ -2380,7 +2380,7 @@ REDIS_HOST="${GITLAB_REDIS_HOST:-redis-master.${REDIS_NAMESPACE}.svc.cluster.loc REDIS_PORT="${GITLAB_REDIS_PORT:-6379}" # GitLab public domain (configurable; default follows deployment mode) -_default_gitlab_domain="git.prole.org" +_default_gitlab_domain="git.knoe.org" if [[ "$MODE" == "k8s" ]]; then _default_gitlab_domain="git.knoe.dev" fi @@ -2418,7 +2418,7 @@ PRIMARY_GITLAB_HOST="${GITLAB_PUBLIC_HOSTS[0]}" GITLAB_DOMAIN="$PRIMARY_GITLAB_HOST" PRIMARY_GITLAB_DOMAIN_ROOT="${PRIMARY_GITLAB_HOST#*.}" if [[ "$PRIMARY_GITLAB_DOMAIN_ROOT" == "$PRIMARY_GITLAB_HOST" || -z "$PRIMARY_GITLAB_DOMAIN_ROOT" ]]; then - PRIMARY_GITLAB_DOMAIN_ROOT="prole.org" + PRIMARY_GITLAB_DOMAIN_ROOT="knoe.org" fi # Public ingress class (k8s/GKE defaults to gce; local clusters keep kong) @@ -2509,11 +2509,11 @@ if [[ "$MODE" == "k8s" ]]; then fi # Google Workspace OIDC — FRONTDOOR_HOST gates OmniAuth configuration. -# On k3s: api.prole.org is the prole-auth SSO gateway (knoe-auth service). +# On k3s: api.knoe.org is the knoe-auth SSO gateway (knoe-auth service). # Requires k8s secret 'gitlab-google-oidc' in GITLAB_NAMESPACE with Google # OAuth2 client credentials (client_id, client_secret, redirect_uri). # To disable OIDC: unset FRONTDOOR_HOST before running. -_default_auth_hostname="api.prole.org" +_default_auth_hostname="api.knoe.org" if [[ "$MODE" == "k8s" ]]; then _default_auth_hostname="api.knoe.dev" fi @@ -2522,7 +2522,7 @@ FRONTDOOR_HOST="${FRONTDOOR_HOST:-$AUTH_HOSTNAME}" FRONTDOOR_AUTH_ENABLED="${FRONTDOOR_AUTH_ENABLED:-${AUTHORITY_ENABLED:-1}}" AUTH_VERIFY_PATH="${AUTH_VERIFY_PATH:-/auth/verify}" AUTH_LOGIN_PATH="${AUTH_LOGIN_PATH:-/auth/login}" -AUTH_RESPONSE_HEADERS="${AUTH_RESPONSE_HEADERS:-X-Prole-User,X-Prole-Email,X-Prole-Groups}" +AUTH_RESPONSE_HEADERS="${AUTH_RESPONSE_HEADERS:-X-Knoe-User,X-Knoe-Email,X-Knoe-Groups}" AUTH_VERIFY_URL="${AUTH_VERIFY_URL:-https://${AUTH_HOSTNAME}${AUTH_VERIFY_PATH}}" AUTH_SIGNIN_URL="${AUTH_SIGNIN_URL:-https://${AUTH_HOSTNAME}${AUTH_LOGIN_PATH}?next=\$scheme://\$host\$escaped_request_uri}" _default_gitlab_oidc_issuer="https://${AUTH_HOSTNAME}/auth" @@ -2542,7 +2542,7 @@ GITLAB_OIDC_CLIENT_SECRET="${GITLAB_OIDC_CLIENT_SECRET:-${OIDC_CLIENT_SECRET:-${ # Resolve `secretref://` values for standalone invocations. deploy.sh # resolves these in Python (knoe/core/actions.py:_resolve_secretref_value) # before exec; direct invocations need the same lookup inline. Searches env -# aliases, then PROLE_SERVICE/secrets, etc/secrets, and secrets directories +# aliases, then KNOE_SERVICE/secrets, etc/secrets, and secrets directories # for a file named . Returns the raw input unchanged on miss. _init_gitlab_resolve_secretref() { local raw="${1:-}" @@ -2578,8 +2578,8 @@ _init_gitlab_resolve_secretref() { fi done - local root="${PROLE_HOME:-${SCRIPT_DIR}/..}" - local svc="${PROLE_SERVICE:-}" + local root="${KNOE_HOME:-${SCRIPT_DIR}/..}" + local svc="${KNOE_SERVICE:-}" local -a paths=() [[ -n "$svc" ]] && paths+=("$svc/secrets/$ref") paths+=("$root/etc/secrets/$ref" "$root/secrets/$ref") @@ -2608,7 +2608,7 @@ GITLAB_OIDC_CLIENT_SECRET="$(_init_gitlab_resolve_secretref "$GITLAB_OIDC_CLIENT is_unresolved_secret_ref() { local raw="${1:-}" case "$raw" in - ""|secretref://*|'${OPENBAO:'*|'${PROLE_SECRET:'*) + ""|secretref://*|'${OPENBAO:'*|'${KNOE_SECRET:'*) return 0 ;; esac @@ -2891,7 +2891,7 @@ setup_knoe_db_for_gitlab() { } # --------------------------------------------------------------------------- -# Clean up any pre-existing Gitea / git.prole.org configurations +# Clean up any pre-existing Gitea / git.knoe.org configurations # --------------------------------------------------------------------------- cleanup_gitea() { log "Checking for pre-existing Gitea deployment to remove before GitLab install..." @@ -2908,13 +2908,13 @@ cleanup_gitea() { kubectl -n "$gitea_ns" delete deploy/gitea svc/gitea-http svc/gitea-ssh \ >/dev/null 2>&1 || true - # Remove Kong routes/services registered for git.prole.org (best-effort) + # Remove Kong routes/services registered for git.knoe.org (best-effort) local kong_ns="${KONG_NAMESPACE:-${NAMESPACE:-kong}}" for res_type in kongplugins kongingresses; do kubectl -n "$gitea_ns" delete "$res_type" --all >/dev/null 2>&1 || true done - # Remove gitea namespace Ingress objects that route git.prole.org + # Remove gitea namespace Ingress objects that route git.knoe.org kubectl -n "$gitea_ns" delete ingress \ -l "app.kubernetes.io/name=gitea" >/dev/null 2>&1 || true kubectl -n "$gitea_ns" delete ingress \ @@ -2945,10 +2945,10 @@ fi # --------------------------------------------------------------------------- # Always remove gitea if its helm release exists (non-destructive path) -# gitea and gitlab both claim git.prole.org; they cannot coexist. +# gitea and gitlab both claim git.knoe.org; they cannot coexist. # --------------------------------------------------------------------------- if helm -n "${GITEA_NAMESPACE:-gitea}" status gitea >/dev/null 2>&1; then - warn "Gitea release detected — removing to free git.prole.org for GitLab..." + warn "Gitea release detected — removing to free git.knoe.org for GitLab..." cleanup_gitea fi @@ -3070,7 +3070,7 @@ fi if [[ "$MODE" == "k8s" ]]; then # In k8s/GKE mode, we do NOT use static storage nodes or nodeSelectors. STORAGE_NODE="" - if [[ "$NODE_SELECTOR" == *"gandalf.prole.org"* ]]; then + if [[ "$NODE_SELECTOR" == *"gandalf.knoe.org"* ]]; then warn "Stripping legacy nodeSelector '${NODE_SELECTOR}' in k8s mode." NODE_SELECTOR="" fi @@ -3710,7 +3710,7 @@ setup_gitlab_storage() { # true after the first deploy. Combined with GITLAB_REPAIR_BLOCKED_AUTOCLEAN=1 # that triggered a destructive PVC delete on every init_gitlab.sh run, # silently wiping the gitaly git-repo PV. The chart's normal PVC is not - # legacy; the real legacy markers are synology PV, gandalf.prole.org + # legacy; the real legacy markers are synology PV, gandalf.knoe.org # nodeSelector, or gitlab-gitaly-static storageClass. local has_legacy=0 if kubectl get pv gitlab-gitaly-synology >/dev/null 2>&1; then has_legacy=1; fi @@ -3719,7 +3719,7 @@ setup_gitlab_storage() { local gitaly_sts_yaml gitaly_sts_yaml=$(kubectl -n "$NAMESPACE" get statefulset "$gitaly_sts_name" -o yaml 2>/dev/null || true) if [[ -n "$gitaly_sts_yaml" ]]; then - if [[ "$gitaly_sts_yaml" == *"gandalf.prole.org"* || "$gitaly_sts_yaml" == *"gitlab-gitaly-static"* ]]; then + if [[ "$gitaly_sts_yaml" == *"gandalf.knoe.org"* || "$gitaly_sts_yaml" == *"gitlab-gitaly-static"* ]]; then has_legacy=1 fi fi @@ -3743,7 +3743,7 @@ setup_gitlab_storage() { # Give it a moment to process deletions sleep 2 else - repair_blocked "Legacy Gitaly PV/PVC still bound to gitlab-gitaly-static / gandalf.prole.org" \ + repair_blocked "Legacy Gitaly PV/PVC still bound to gitlab-gitaly-static / gandalf.knoe.org" \ "Set GITLAB_REPAIR_BLOCKED_AUTOCLEAN=1 to automatically repair by deleting legacy PVC/PV, or run: kubectl -n $NAMESPACE scale sts ${GITLAB_RELEASE}-gitaly --replicas=0 kubectl -n $NAMESPACE delete pvc repo-data-gitlab-gitaly-0 diff --git a/etc/init_k3s_registry.sh b/etc/init_k3s_registry.sh index c8da75b..a89b2e7 100644 --- a/etc/init_k3s_registry.sh +++ b/etc/init_k3s_registry.sh @@ -4,12 +4,12 @@ set -euo pipefail # init_k3s_registry.sh # Purpose: -# - Configure k3s/containerd to allow access to the Prole registry +# - Configure k3s/containerd to allow access to the Knoe registry # - Writes /etc/rancher/k3s/registries.yaml on the k3s node SCRIPT_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) # shellcheck disable=SC1090 -source "$SCRIPT_DIR/prole_cfg.sh" +source "$SCRIPT_DIR/knoe_cfg.sh" ACTION=${1:-apply} @@ -29,7 +29,7 @@ K3S_REGISTRY_FILE=${K3S_REGISTRY_FILE:-/etc/rancher/k3s/registries.yaml} K3S_REGISTRY_SCHEME=${K3S_REGISTRY_SCHEME:-} if [[ -z "${K3S_REGISTRY_SCHEME}" ]]; then - # Internal Prole registry endpoints are plain HTTP by default. + # Internal Knoe registry endpoints are plain HTTP by default. # Set K3S_REGISTRY_SCHEME=https explicitly when TLS is configured. K3S_REGISTRY_SCHEME="http" fi diff --git a/etc/init_k8s.sh b/etc/init_k8s.sh index e5d3266..1a7b17b 100755 --- a/etc/init_k8s.sh +++ b/etc/init_k8s.sh @@ -8,9 +8,9 @@ set -euo pipefail # Initialize SCRIPT_DIR SCRIPT_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) -# Load environment and config via prole_cfg.sh +# Load environment and config via knoe_cfg.sh # shellcheck disable=SC1090 -source "$SCRIPT_DIR/prole_cfg.sh" +source "$SCRIPT_DIR/knoe_cfg.sh" # Default values VERBOSE=false @@ -60,8 +60,8 @@ while [[ $# -gt 0 ]]; do shift ;; -m|--mode) - prole_set_mode "${2:-}" - case "${PROLE_MODE:-}" in + knoe_set_mode "${2:-}" + case "${KNOE_MODE:-}" in k3d) ENVIRONMENT="dev" ;; k3s) ENVIRONMENT="service" ;; k8s) ENVIRONMENT="prod" ;; @@ -69,8 +69,8 @@ while [[ $# -gt 0 ]]; do shift 2 ;; --mode=*|-m=*) - prole_set_mode "${1#*=}" - case "${PROLE_MODE:-}" in + knoe_set_mode "${1#*=}" + case "${KNOE_MODE:-}" in k3d) ENVIRONMENT="dev" ;; k3s) ENVIRONMENT="service" ;; k8s) ENVIRONMENT="prod" ;; @@ -162,9 +162,9 @@ initialize() { reg_cfg=$(mktemp "${TMPDIR:-/tmp}/k3d-registries-XXXXXX.yaml") cat > "$reg_cfg" <<'REGEOF' mirrors: - "k3d-prole-registry:5000": + "k3d-knoe-registry:5000": endpoint: - - "http://k3d-prole-registry:5000" + - "http://k3d-knoe-registry:5000" REGEOF registry_config_args=(--registry-config "$reg_cfg") log "Creating k3d cluster '$CLUSTER_NAME'..." diff --git a/etc/init_kdc.sh b/etc/init_kdc.sh index bd2903b..b2725d6 100755 --- a/etc/init_kdc.sh +++ b/etc/init_kdc.sh @@ -4,7 +4,7 @@ set -euo pipefail # init_kdc.sh # Purpose: -# - Provision the in-cluster Prole KDC (MIT Kerberos) in the common services namespace +# - Provision the in-cluster Knoe KDC (MIT Kerberos) in the common services namespace # - Optionally configure cross-realm trust to an external realm when credentials are provided # # Usage: @@ -15,25 +15,25 @@ set -euo pipefail SCRIPT_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) # shellcheck disable=SC1090 -source "$SCRIPT_DIR/prole_cfg.sh" +source "$SCRIPT_DIR/knoe_cfg.sh" if [[ "${1:-}" == "--mode" || "${1:-}" == "-m" ]]; then - prole_set_mode "${2:-}" + knoe_set_mode "${2:-}" shift 2 elif [[ "${1:-}" == --mode=* || "${1:-}" == -m=* ]]; then - prole_set_mode "${1#*=}" + knoe_set_mode "${1#*=}" shift fi -prole_ensure_kubeconfig >/dev/null 2>&1 || true +knoe_ensure_kubeconfig >/dev/null 2>&1 || true ensure_kube_context || exit 1 ACTION=${1:-initialize} resolve_kdc_mode_hint() { - local mode_hint="${PROLE_MODE:-${DEPLOYMENT_MODE:-${CLUSTER_ENV:-k3s}}}" - if command -v prole_normalize_mode >/dev/null 2>&1; then - prole_normalize_mode "$mode_hint" + local mode_hint="${KNOE_MODE:-${DEPLOYMENT_MODE:-${CLUSTER_ENV:-k3s}}}" + if command -v knoe_normalize_mode >/dev/null 2>&1; then + knoe_normalize_mode "$mode_hint" return 0 fi mode_hint=$(printf '%s' "$mode_hint" | tr 'A-Z' 'a-z') @@ -47,23 +47,23 @@ resolve_kdc_mode_hint() { esac } -default_prole_kdc_name() { +default_knoe_kdc_name() { case "$(resolve_kdc_mode_hint)" in k8s) printf 'authority-gcp-auth' ;; *) - printf 'authority-prole-auth' + printf 'authority-knoe-auth' ;; esac } KDC_NAMESPACE=${PROLE_KDC_NAMESPACE:-${SERVICE_NAMESPACE:-${NAMESPACE:-default}}} -# Namespace where prole-auth runs and expects the `prole-kdc-config` ConfigMap. -# Defaults to PROLE_NAMESPACE (from prole.cfg) when present. +# Namespace where knoe-auth runs and expects the `knoe-kdc-config` ConfigMap. +# Defaults to PROLE_NAMESPACE (from knoe.cfg) when present. PROLE_AUTH_NAMESPACE=${PROLE_AUTH_NAMESPACE:-${PROLE_NAMESPACE:-}} PROLE_KDC_ENABLED=${PROLE_KDC_ENABLED:-1} -PROLE_KDC_NAME=${PROLE_KDC_NAME:-$(default_prole_kdc_name)} +PROLE_KDC_NAME=${PROLE_KDC_NAME:-$(default_knoe_kdc_name)} PROLE_KDC_SERVICE=${PROLE_KDC_SERVICE:-auth} PROLE_KDC_IMAGE=${PROLE_KDC_IMAGE:-} # If the user provided an explicit image, we should not require Docker unless @@ -72,7 +72,7 @@ PROLE_KDC_IMAGE_EXPLICIT=0 if [[ -n "${PROLE_KDC_IMAGE:-}" ]]; then PROLE_KDC_IMAGE_EXPLICIT=1 fi -PROLE_KDC_IMAGE_NAME=${PROLE_KDC_IMAGE_NAME:-prole-authority} +PROLE_KDC_IMAGE_NAME=${PROLE_KDC_IMAGE_NAME:-knoe-authority} PROLE_KDC_IMAGE_TAG=${PROLE_KDC_IMAGE_TAG:-latest} PROLE_KDC_REGISTRY_HOST=${PROLE_KDC_REGISTRY_HOST:-${LOCAL_REGISTRY:-localhost:5000}} PROLE_KDC_REGISTRY_INTERNAL=${PROLE_KDC_REGISTRY_INTERNAL:-${LOCAL_REGISTRY_INTERNAL:-}} @@ -106,10 +106,10 @@ local_registry_enabled() { fi local mode="" - if command -v prole_normalize_mode >/dev/null 2>&1; then - mode=$(prole_normalize_mode "${PROLE_MODE:-${DEPLOYMENT_MODE:-${CLUSTER_ENV:-}}}") + if command -v knoe_normalize_mode >/dev/null 2>&1; then + mode=$(knoe_normalize_mode "${KNOE_MODE:-${DEPLOYMENT_MODE:-${CLUSTER_ENV:-}}}") else - mode="${PROLE_MODE:-${DEPLOYMENT_MODE:-${CLUSTER_ENV:-}}}" + mode="${KNOE_MODE:-${DEPLOYMENT_MODE:-${CLUSTER_ENV:-}}}" fi [[ "$mode" == "k3d" || "$mode" == "k3s" ]] } @@ -137,7 +137,7 @@ ensure_docker() { command -v docker >/dev/null || { err "Missing required tool: docker"; exit 1; } if ! docker info >/dev/null 2>&1; then err "Docker is not running or not accessible." - err "This is required to build/push the Prole KDC image." + err "This is required to build/push the Knoe KDC image." err "Start Docker (e.g. Docker Desktop), or set PROLE_KDC_IMAGE to a prebuilt image and/or set PROLE_KDC_BUILD_IMAGE=0." exit 1 fi @@ -148,7 +148,7 @@ docker_available() { docker info >/dev/null 2>&1 } -resolve_prole_kdc_image() { +resolve_knoe_kdc_image() { # Ensure we have a deterministic image reference even when skipping local builds. if [[ -n "${PROLE_KDC_IMAGE:-}" ]]; then return 0 @@ -172,11 +172,11 @@ ensure_namespace() { } normalized_mode() { - if command -v prole_normalize_mode >/dev/null 2>&1; then - prole_normalize_mode "${PROLE_MODE:-}" + if command -v knoe_normalize_mode >/dev/null 2>&1; then + knoe_normalize_mode "${KNOE_MODE:-}" return 0 fi - printf '%s' "${PROLE_MODE:-}" + printf '%s' "${KNOE_MODE:-}" } is_k3d_mode() { @@ -270,8 +270,8 @@ maybe_cleanup_stale_kdc() { elif ! kdc_stale_deployment; then return 1 fi - err "WARN: Detected stale Prole KDC deployment (${reason}). Cleaning up..." - cleanup_prole_kdc + err "WARN: Detected stale Knoe KDC deployment (${reason}). Cleaning up..." + cleanup_knoe_kdc return 0 } @@ -322,7 +322,7 @@ get_secret_value() { kubectl -n "$KDC_NAMESPACE" get secret "$secret" -o "jsonpath={.data.${key}}" 2>/dev/null | b64_decode 2>/dev/null || true } -resolve_prole_kdc_defaults() { +resolve_knoe_kdc_defaults() { if [[ -z "$PROLE_KDC_REALM" ]]; then PROLE_KDC_REALM="PROLE.LOCAL" fi @@ -330,10 +330,10 @@ resolve_prole_kdc_defaults() { PROLE_KDC_DOMAIN=$(lowercase "$PROLE_KDC_REALM") fi local mode="" - if command -v prole_normalize_mode >/dev/null 2>&1; then - mode=$(prole_normalize_mode "${PROLE_MODE:-}") + if command -v knoe_normalize_mode >/dev/null 2>&1; then + mode=$(knoe_normalize_mode "${KNOE_MODE:-}") else - mode="${PROLE_MODE:-}" + mode="${KNOE_MODE:-}" fi local k3s_host="" if local_registry_enabled; then @@ -365,16 +365,16 @@ resolve_kdc_docker_dir() { echo "$PROLE_KDC_DOCKER_DIR" return 0 fi - if [[ -n "${PROLE_HOME:-}" && -d "$PROLE_HOME/prole/authority" ]]; then - echo "$PROLE_HOME/prole/authority" + if [[ -n "${KNOE_HOME:-}" && -d "$KNOE_HOME/knoe/authority" ]]; then + echo "$KNOE_HOME/knoe/authority" return 0 fi - if [[ -n "${PROLE_HOME:-}" && -d "$PROLE_HOME/authority" ]]; then - echo "$PROLE_HOME/authority" + if [[ -n "${KNOE_HOME:-}" && -d "$KNOE_HOME/authority" ]]; then + echo "$KNOE_HOME/authority" return 0 fi - if [[ -d "$SCRIPT_DIR/../prole/authority" ]]; then - echo "$SCRIPT_DIR/../prole/authority" + if [[ -d "$SCRIPT_DIR/../knoe/authority" ]]; then + echo "$SCRIPT_DIR/../knoe/authority" return 0 fi if [[ -d "$SCRIPT_DIR/../authority" ]]; then @@ -391,12 +391,12 @@ is_truthy() { return 1 } -build_prole_kdc_image() { +build_knoe_kdc_image() { # If the user explicitly sets PROLE_KDC_BUILD_IMAGE, honor it. # Otherwise, skip building when an explicit image was provided. if [[ "$PROLE_KDC_BUILD_IMAGE_SET" == "1" ]]; then if ! is_truthy "${PROLE_KDC_BUILD_IMAGE:-0}"; then - resolve_prole_kdc_image + resolve_knoe_kdc_image return 0 fi else @@ -412,16 +412,16 @@ build_prole_kdc_image() { ensure_docker fi - log "[WARN] Docker is not available; skipping Prole KDC image build." + log "[WARN] Docker is not available; skipping Knoe KDC image build." log " Set PROLE_KDC_BUILD_IMAGE=1 to force building (requires Docker), or set PROLE_KDC_IMAGE to a prebuilt image." - resolve_prole_kdc_image + resolve_knoe_kdc_image return 0 fi local docker_dir docker_dir=$(resolve_kdc_docker_dir || true) if [[ -z "$docker_dir" ]]; then - err "ERROR: prole/authority Docker context not found." + err "ERROR: knoe/authority Docker context not found." exit 1 fi @@ -470,8 +470,8 @@ build_prole_kdc_image() { fi } -ensure_prole_kdc_secrets() { - local secret_name="prole-kdc-secrets" +ensure_knoe_kdc_secrets() { + local secret_name="knoe-kdc-secrets" if [[ -z "$PROLE_KDC_ADMIN_PASSWORD" ]]; then PROLE_KDC_ADMIN_PASSWORD=$(get_secret_value "$secret_name" "admin_password") fi @@ -503,9 +503,9 @@ ensure_prole_kdc_secrets() { --dry-run=client -o yaml | kubectl apply -f - >/dev/null } -ensure_prole_kdc() { +ensure_knoe_kdc() { if [[ "$PROLE_KDC_ENABLED" == "0" || "$PROLE_KDC_ENABLED" == "false" || "$PROLE_KDC_ENABLED" == "False" ]]; then - log "Prole KDC disabled (PROLE_KDC_ENABLED=$PROLE_KDC_ENABLED)." + log "Knoe KDC disabled (PROLE_KDC_ENABLED=$PROLE_KDC_ENABLED)." return 0 fi @@ -513,9 +513,9 @@ ensure_prole_kdc() { PROLE_KDC_HOST_NETWORK=1 fi - resolve_prole_kdc_defaults - build_prole_kdc_image - ensure_prole_kdc_secrets + resolve_knoe_kdc_defaults + build_knoe_kdc_image + ensure_knoe_kdc_secrets local deployment_present=0 if kubectl -n "$KDC_NAMESPACE" get deploy "$PROLE_KDC_NAME" >/dev/null 2>&1; then deployment_present=1 @@ -556,7 +556,7 @@ EOF fi apply_kdc_manifest() { - log "Applying Prole KDC '${PROLE_KDC_NAME}' in namespace '${KDC_NAMESPACE}' (realm ${PROLE_KDC_REALM}) ..." + log "Applying Knoe KDC '${PROLE_KDC_NAME}' in namespace '${KDC_NAMESPACE}' (realm ${PROLE_KDC_REALM}) ..." local host_net_block="" local dns_policy_block="" if is_truthy "${PROLE_KDC_HOST_NETWORK:-0}"; then @@ -567,7 +567,7 @@ EOF apiVersion: v1 kind: ConfigMap metadata: - name: prole-kdc-config + name: knoe-kdc-config namespace: ${KDC_NAMESPACE} data: krb5.conf: | @@ -619,23 +619,23 @@ data: fi mkdir -p /etc/krb5kdc /var/lib/krb5kdc - if [[ -f /opt/prole-kdc/krb5.conf ]]; then - cp /opt/prole-kdc/krb5.conf /etc/krb5.conf + if [[ -f /opt/knoe-kdc/krb5.conf ]]; then + cp /opt/knoe-kdc/krb5.conf /etc/krb5.conf fi - if [[ -f /opt/prole-kdc/kdc.conf ]]; then - cp /opt/prole-kdc/kdc.conf /etc/krb5kdc/kdc.conf + if [[ -f /opt/knoe-kdc/kdc.conf ]]; then + cp /opt/knoe-kdc/kdc.conf /etc/krb5kdc/kdc.conf fi - if [[ -f /opt/prole-kdc/kadm5.acl ]]; then - cp /opt/prole-kdc/kadm5.acl /etc/krb5kdc/kadm5.acl + if [[ -f /opt/knoe-kdc/kadm5.acl ]]; then + cp /opt/knoe-kdc/kadm5.acl /etc/krb5kdc/kadm5.acl fi # Validate required secrets early to avoid silent crashes if [[ -z "${PROLE_KDC_MASTER_PASSWORD:-}" ]]; then - echo "ERROR: Missing required env PROLE_KDC_MASTER_PASSWORD (secret 'prole-kdc-secrets/master_password')." >&2 + echo "ERROR: Missing required env PROLE_KDC_MASTER_PASSWORD (secret 'knoe-kdc-secrets/master_password')." >&2 exit 1 fi if [[ -z "${PROLE_KDC_ADMIN_PASSWORD:-}" ]]; then - echo "ERROR: Missing required env PROLE_KDC_ADMIN_PASSWORD (secret 'prole-kdc-secrets/admin_password')." >&2 + echo "ERROR: Missing required env PROLE_KDC_ADMIN_PASSWORD (secret 'knoe-kdc-secrets/admin_password')." >&2 exit 1 fi @@ -737,7 +737,7 @@ ${dns_policy_block} - name: kdc image: ${PROLE_KDC_IMAGE} imagePullPolicy: IfNotPresent - command: ["/bin/bash", "/opt/prole-kdc/entrypoint.sh"] + command: ["/bin/bash", "/opt/knoe-kdc/entrypoint.sh"] env: - name: PROLE_KDC_REALM value: "${PROLE_KDC_REALM}" @@ -746,17 +746,17 @@ ${dns_policy_block} - name: PROLE_KDC_MASTER_PASSWORD valueFrom: secretKeyRef: - name: prole-kdc-secrets + name: knoe-kdc-secrets key: master_password - name: PROLE_KDC_ADMIN_PASSWORD valueFrom: secretKeyRef: - name: prole-kdc-secrets + name: knoe-kdc-secrets key: admin_password - name: PROLE_KDC_TRUST_SHARED_PASSWORD valueFrom: secretKeyRef: - name: prole-kdc-secrets + name: knoe-kdc-secrets key: trust_shared_password - name: PROLE_KDC_TRUST_REALM value: "${PROLE_KDC_TRUST_REALM}" @@ -765,7 +765,7 @@ ${dns_policy_block} - name: PROLE_KDC_TRUST_PASSWORD valueFrom: secretKeyRef: - name: prole-kdc-secrets + name: knoe-kdc-secrets key: trust_password - name: PROLE_CHILD_REALM value: "${PROLE_CHILD_REALM:-}" @@ -794,17 +794,17 @@ ${dns_policy_block} containerPort: 749 protocol: TCP volumeMounts: - - name: prole-kdc-config - mountPath: /opt/prole-kdc - - name: prole-kdc-data + - name: knoe-kdc-config + mountPath: /opt/knoe-kdc + - name: knoe-kdc-data mountPath: /var/lib/krb5kdc - - name: prole-kdc-data + - name: knoe-kdc-data mountPath: /etc/krb5kdc volumes: - - name: prole-kdc-config + - name: knoe-kdc-config configMap: - name: prole-kdc-config - - name: prole-kdc-data + name: knoe-kdc-config + - name: knoe-kdc-data emptyDir: {} --- apiVersion: v1 @@ -841,21 +841,21 @@ EOF apply_kdc_manifest - # prole-auth runs in PROLE_AUTH_NAMESPACE (default: PROLE_NAMESPACE) and mounts - # ConfigMap `prole-kdc-config` for its embedded KDC sidecar. When the KDC itself + # knoe-auth runs in PROLE_AUTH_NAMESPACE (default: PROLE_NAMESPACE) and mounts + # ConfigMap `knoe-kdc-config` for its embedded KDC sidecar. When the KDC itself # is deployed into a different namespace (default: SERVICE_NAMESPACE), ensure - # the configmap also exists in the prole-auth namespace to prevent FailedMount. + # the configmap also exists in the knoe-auth namespace to prevent FailedMount. if [[ -n "${PROLE_AUTH_NAMESPACE:-}" && "${PROLE_AUTH_NAMESPACE}" != "${KDC_NAMESPACE}" ]]; then if ! kubectl get namespace "$PROLE_AUTH_NAMESPACE" >/dev/null 2>&1; then log "Creating namespace '$PROLE_AUTH_NAMESPACE' ..." kubectl create namespace "$PROLE_AUTH_NAMESPACE" >/dev/null 2>&1 || true fi - log "Ensuring ConfigMap 'prole-kdc-config' exists in namespace '${PROLE_AUTH_NAMESPACE}' for prole-auth ..." + log "Ensuring ConfigMap 'knoe-kdc-config' exists in namespace '${PROLE_AUTH_NAMESPACE}' for knoe-auth ..." cat <&2 + echo "ERROR: Missing required env PROLE_KDC_MASTER_PASSWORD (secret 'knoe-kdc-secrets/master_password')." >&2 exit 1 fi if [[ -z "\${PROLE_KDC_ADMIN_PASSWORD:-}" ]]; then - echo "ERROR: Missing required env PROLE_KDC_ADMIN_PASSWORD (secret 'prole-kdc-secrets/admin_password')." >&2 + echo "ERROR: Missing required env PROLE_KDC_ADMIN_PASSWORD (secret 'knoe-kdc-secrets/admin_password')." >&2 exit 1 fi @@ -952,7 +952,7 @@ EOF rollout_timeout="$PROLE_KDC_DEPLOY_TIMEOUT" fi if ! kubectl -n "$KDC_NAMESPACE" rollout status deploy/${PROLE_KDC_NAME} --timeout="${rollout_timeout}s"; then - err "WARN: Prole KDC rollout did not complete within ${rollout_timeout}s. Collecting diagnostics..." + err "WARN: Knoe KDC rollout did not complete within ${rollout_timeout}s. Collecting diagnostics..." # Dump a quick describe and last logs from the newest pod (if any) to aid troubleshooting latest_pod=$(kubectl -n "$KDC_NAMESPACE" get pod -l "app=${PROLE_KDC_NAME}" --sort-by=.metadata.creationTimestamp -o jsonpath='{.items[-1].metadata.name}' 2>/dev/null || true) if [[ -n "${latest_pod:-}" ]]; then @@ -964,38 +964,38 @@ EOF err "[WARN] No pods found for app=${PROLE_KDC_NAME} to collect logs from." fi if maybe_cleanup_stale_kdc "rollout timeout"; then - log "Re-applying Prole KDC after cleanup..." + log "Re-applying Knoe KDC after cleanup..." apply_kdc_manifest kubectl -n "$KDC_NAMESPACE" rollout status deploy/${PROLE_KDC_NAME} --timeout="${PROLE_KDC_DEPLOY_TIMEOUT}s" || true fi fi } -cleanup_prole_kdc() { - log "Removing Prole KDC resources (if present)..." +cleanup_knoe_kdc() { + log "Removing Knoe KDC resources (if present)..." kubectl -n "$KDC_NAMESPACE" delete service "$PROLE_KDC_SERVICE" --ignore-not-found kubectl -n "$KDC_NAMESPACE" delete deployment "$PROLE_KDC_NAME" --ignore-not-found - kubectl -n "$KDC_NAMESPACE" delete configmap prole-kdc-config --ignore-not-found + kubectl -n "$KDC_NAMESPACE" delete configmap knoe-kdc-config --ignore-not-found if [[ -n "${PROLE_AUTH_NAMESPACE:-}" && "${PROLE_AUTH_NAMESPACE}" != "${KDC_NAMESPACE}" ]]; then - kubectl -n "$PROLE_AUTH_NAMESPACE" delete configmap prole-kdc-config --ignore-not-found + kubectl -n "$PROLE_AUTH_NAMESPACE" delete configmap knoe-kdc-config --ignore-not-found fi } status() { log "--- init_kdc status ---" log "Namespace: $KDC_NAMESPACE" - log "Prole KDC enabled: ${PROLE_KDC_ENABLED:-0}" - log "Prole KDC realm: ${PROLE_KDC_REALM:-}" - log "Prole KDC service: ${PROLE_KDC_SERVICE:-}" - log "Prole KDC image: ${PROLE_KDC_IMAGE:-}" + log "Knoe KDC enabled: ${PROLE_KDC_ENABLED:-0}" + log "Knoe KDC realm: ${PROLE_KDC_REALM:-}" + log "Knoe KDC service: ${PROLE_KDC_SERVICE:-}" + log "Knoe KDC image: ${PROLE_KDC_IMAGE:-}" if kubectl -n "$KDC_NAMESPACE" get deploy "$PROLE_KDC_NAME" >/dev/null 2>&1; then - log "[OK] Prole KDC deployment present" + log "[OK] Knoe KDC deployment present" if maybe_cleanup_stale_kdc "status check" "strict"; then - log "[INFO] Stale Prole KDC deployment removed. Re-run init_kdc.sh update to recreate." + log "[INFO] Stale Knoe KDC deployment removed. Re-run init_kdc.sh update to recreate." fi else - log "[INFO] Prole KDC deployment not present" + log "[INFO] Knoe KDC deployment not present" fi } @@ -1003,7 +1003,7 @@ case "$ACTION" in initialize|init|update|deploy|start) ensure_tools ensure_namespace - ensure_prole_kdc + ensure_knoe_kdc ;; status) ensure_tools @@ -1012,7 +1012,7 @@ case "$ACTION" in cleanup|delete|remove) ensure_tools ensure_namespace - cleanup_prole_kdc + cleanup_knoe_kdc ;; *) err "Usage: $0 {initialize|update|status|cleanup}" diff --git a/etc/init_kerberos.sh b/etc/init_kerberos.sh index f9f02df..3958a16 100755 --- a/etc/init_kerberos.sh +++ b/etc/init_kerberos.sh @@ -17,15 +17,15 @@ set -euo pipefail SCRIPT_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) -# Load environment and config via prole_cfg.sh +# Load environment and config via knoe_cfg.sh # shellcheck disable=SC1090 -source "$SCRIPT_DIR/prole_cfg.sh" +source "$SCRIPT_DIR/knoe_cfg.sh" if [[ "${1:-}" == "--mode" || "${1:-}" == "-m" ]]; then - prole_set_mode "${2:-}" + knoe_set_mode "${2:-}" shift 2 elif [[ "${1:-}" == --mode=* || "${1:-}" == -m=* ]]; then - prole_set_mode "${1#*=}" + knoe_set_mode "${1#*=}" shift fi @@ -42,8 +42,8 @@ PROLE_KDC_NAME=${PROLE_KDC_NAME:-auth} # AD DC forwarding (socat proxy) options KRB5_AD_PORT_FORWARD=${KRB5_AD_PORT_FORWARD:-${AD_PORT_FORWARD:-}} -KRB5_AD_PROXY_NAME=${KRB5_AD_PROXY_NAME:-prole-kerberos-ad-forwarder} -KRB5_AD_SERVICE_NAME=${KRB5_AD_SERVICE_NAME:-prole-kerberos-ad-dc} +KRB5_AD_PROXY_NAME=${KRB5_AD_PROXY_NAME:-knoe-kerberos-ad-forwarder} +KRB5_AD_SERVICE_NAME=${KRB5_AD_SERVICE_NAME:-knoe-kerberos-ad-dc} KRB5_AD_PROXY_IMAGE=${KRB5_AD_PROXY_IMAGE:-alpine/socat} KRB5_AD_PROXY_HOST_NETWORK=${KRB5_AD_PROXY_HOST_NETWORK:-1} KRB5_AD_TCP_PORTS=${KRB5_AD_TCP_PORTS:-"88 389 445 464 636"} @@ -92,7 +92,7 @@ wait_for_ad_forwarder_ready() { } ensure_tools() { - if [[ "${PROLE_MODE:-}" == "min" ]]; then + if [[ "${KNOE_MODE:-}" == "min" ]]; then for t in curl jq; do command -v "$t" >/dev/null || { err "Missing required tool: $t"; exit 1; } done @@ -161,23 +161,23 @@ is_ip_address() { [[ "$1" =~ ^([0-9]{1,3}\.){3}[0-9]{1,3}$ ]] } -detect_prole_cfg() { +detect_knoe_cfg() { local cfg="" - if [[ -n "${PROLE_CONF:-}" ]]; then - cfg="$(_prole_cfg_select_cfg_file "$PROLE_CONF")" + if [[ -n "${KNOE_CONF:-}" ]]; then + cfg="$(_knoe_cfg_select_cfg_file "$KNOE_CONF")" if [[ -n "$cfg" ]]; then printf '%s' "$cfg" return 0 fi fi - if [[ -n "${PROLE_HOME:-}" ]]; then - cfg="$(_prole_cfg_select_cfg_file "$PROLE_HOME/conf")" + if [[ -n "${KNOE_HOME:-}" ]]; then + cfg="$(_knoe_cfg_select_cfg_file "$KNOE_HOME/conf")" if [[ -n "$cfg" ]]; then printf '%s' "$cfg" return 0 fi fi - cfg="$(_prole_cfg_select_cfg_file "$SCRIPT_DIR/../conf")" + cfg="$(_knoe_cfg_select_cfg_file "$SCRIPT_DIR/../conf")" if [[ -n "$cfg" ]]; then printf '%s' "$cfg" fi @@ -201,12 +201,12 @@ cfg_extract_key() { normalize_child_realm_preference() { local cfg val parent child cfg_realm cfg_use_child_set=0 - cfg=$(detect_prole_cfg) + cfg=$(detect_knoe_cfg) if [[ -n "$cfg" ]]; then val=$(cfg_extract_key "$cfg" "PROLE_USE_CHILD_REALM") if [[ -n "$val" ]]; then cfg_use_child_set=1 - if _prole_bool_true "$val"; then + if _knoe_bool_true "$val"; then PROLE_USE_CHILD_REALM=1 else PROLE_USE_CHILD_REALM=0 @@ -233,7 +233,7 @@ normalize_child_realm_preference() { return 0 fi - if [[ -n "${PROLE_USE_CHILD_REALM:-}" ]] && _prole_bool_true "${PROLE_USE_CHILD_REALM}"; then + if [[ -n "${PROLE_USE_CHILD_REALM:-}" ]] && _knoe_bool_true "${PROLE_USE_CHILD_REALM}"; then if [[ -n "$child" ]]; then KRB5_REALM="$child" REALM="$child" @@ -247,7 +247,7 @@ normalize_child_realm_preference() { return 0 fi - if [[ -n "${PROLE_USE_CHILD_REALM:-}" ]] && ! _prole_bool_true "${PROLE_USE_CHILD_REALM}"; then + if [[ -n "${PROLE_USE_CHILD_REALM:-}" ]] && ! _knoe_bool_true "${PROLE_USE_CHILD_REALM}"; then parent="${PROLE_PARENT_REALM:-${REALM:-}}" if [[ -z "$parent" && -n "$child" && "$child" == *.* ]]; then parent="${child#*.}" @@ -262,7 +262,7 @@ normalize_child_realm_preference() { prefer_cfg_realm_for_test() { local cfg realm - cfg=$(detect_prole_cfg) + cfg=$(detect_knoe_cfg) if [[ -z "$cfg" ]]; then return 0 fi @@ -282,17 +282,17 @@ openbao_url() { echo "$PROLE_OPENBAO_URL" return 0 fi - if prole_is_in_cluster; then + if knoe_is_in_cluster; then echo "http://openbao.${OPENBAO_NAMESPACE}.svc.cluster.local:8200" return 0 fi # In k3s mode, scripts run outside the cluster must reach OpenBao via the k3s host # (never via localhost or kubectl port-forward). - if [[ "${PROLE_MODE:-${DEPLOYMENT_MODE:-}}" == "k3s" ]]; then - if command -v _prole_host_from_url >/dev/null 2>&1; then + if [[ "${KNOE_MODE:-${DEPLOYMENT_MODE:-}}" == "k3s" ]]; then + if command -v _knoe_host_from_url >/dev/null 2>&1; then local host - host=$(_prole_host_from_url "${PROLE_K3S_SERVER:-${K3S_SERVER_URL:-}}") + host=$(_knoe_host_from_url "${PROLE_K3S_SERVER:-${K3S_SERVER_URL:-}}") if [[ -n "${host:-}" ]]; then echo "http://${host}:8200" return 0 @@ -314,7 +314,7 @@ _OPENBAO_PF_PID="" _OPENBAO_PF_STARTED=0 start_openbao_port_forward() { - if [[ "${PROLE_MODE:-${DEPLOYMENT_MODE:-}}" == "k3s" ]]; then + if [[ "${KNOE_MODE:-${DEPLOYMENT_MODE:-}}" == "k3s" ]]; then return 1 fi @@ -358,7 +358,7 @@ ensure_openbao_url() { return 0 fi - if [[ "${PROLE_MODE:-${DEPLOYMENT_MODE:-}}" == "k3s" ]]; then + if [[ "${KNOE_MODE:-${DEPLOYMENT_MODE:-}}" == "k3s" ]]; then # In k3s, do not attempt to synthesize connectivity via local port-forwards. printf '' return 0 @@ -375,8 +375,8 @@ ensure_openbao_url() { openbao_token() { local token="" - if [[ -f "$PROLE_SERVICE/secrets/openbao-root-token" ]]; then - token=$(cat "$PROLE_SERVICE/secrets/openbao-root-token" 2>/dev/null || true) + if [[ -f "$KNOE_SERVICE/secrets/openbao-root-token" ]]; then + token=$(cat "$KNOE_SERVICE/secrets/openbao-root-token" 2>/dev/null || true) fi if [[ -z "$token" || "$token" == "root" ]]; then token="${OPENBAO_ROOT_TOKEN:-}" @@ -417,15 +417,15 @@ fetch_openbao_secret() { } resolve_krb5_password() { - if [[ -z "${KRB5_PASSWORD}" || "${KRB5_PASSWORD}" == '${OPENBAO:'* || "${KRB5_PASSWORD}" == '${PROLE_SECRET:'* ]]; then - local path="prole/${NAMESPACE:-default}/kerberos" + if [[ -z "${KRB5_PASSWORD}" || "${KRB5_PASSWORD}" == '${OPENBAO:'* || "${KRB5_PASSWORD}" == '${KNOE_SECRET:'* ]]; then + local path="knoe/${NAMESPACE:-default}/kerberos" local fetched fetched=$(fetch_openbao_secret "$path" "password") if [[ -n "$fetched" && "$fetched" != "null" ]]; then KRB5_PASSWORD="$fetched" else # Fallback to database password if kerberos secret is missing - path="prole/${NAMESPACE:-default}/db" + path="knoe/${NAMESPACE:-default}/db" fetched=$(fetch_openbao_secret "$path" "password") if [[ -n "$fetched" && "$fetched" != "null" ]]; then KRB5_PASSWORD="$fetched" @@ -498,7 +498,7 @@ default_port_forward_if_local() { fi } -sync_prole_kdc_trust() { +sync_knoe_kdc_trust() { if [[ "${PROLE_KDC_STANDALONE:-0}" != "1" ]]; then # Default deployment embeds the KDC as a sidecar in `knoe-auth`; do not # attempt to manage a standalone KDC unless explicitly requested. @@ -519,7 +519,7 @@ sync_prole_kdc_trust() { } ensure_krb5_conf_configmap() { - log "Creating/updating ConfigMap prole-krb5-conf ..." + log "Creating/updating ConfigMap knoe-krb5-conf ..." local kdc_val admin_val realm_val domain_val realm_val="$KRB5_REALM" @@ -557,12 +557,12 @@ ensure_krb5_conf_configmap() { .$domain_val = $realm_val $domain_val = $realm_val EOF - kubectl -n "$NAMESPACE" create configmap prole-krb5-conf --from-file=krb5.conf="$TMP" --dry-run=client -o yaml | kubectl apply --validate=false -f - + kubectl -n "$NAMESPACE" create configmap knoe-krb5-conf --from-file=krb5.conf="$TMP" --dry-run=client -o yaml | kubectl apply --validate=false -f - rm -f "$TMP" } get_krb5_conf() { - kubectl -n "$NAMESPACE" get configmap prole-krb5-conf -o jsonpath='{.data.krb5\.conf}' 2>/dev/null || true + kubectl -n "$NAMESPACE" get configmap knoe-krb5-conf -o jsonpath='{.data.krb5\.conf}' 2>/dev/null || true } wait_for_cnpg_pods() { @@ -697,7 +697,7 @@ apply_krb5_conf_mount_to_cnpg() { local conf conf=$(get_krb5_conf) if [[ -z "$conf" ]]; then - err "Missing krb5.conf data in ConfigMap prole-krb5-conf." + err "Missing krb5.conf data in ConfigMap knoe-krb5-conf." return 1 fi @@ -706,7 +706,7 @@ apply_krb5_conf_mount_to_cnpg() { \"spec\": { \"projectedVolumeTemplate\": { \"sources\": [ - {\"configMap\": {\"name\": \"prole-krb5-conf\", \"items\": [{\"key\": \"krb5.conf\", \"path\": \"krb5/krb5.conf\"}]}} + {\"configMap\": {\"name\": \"knoe-krb5-conf\", \"items\": [{\"key\": \"krb5.conf\", \"path\": \"krb5/krb5.conf\"}]}} ] } } @@ -720,7 +720,7 @@ apply_krb5_conf_to_cnpg_pods() { local conf conf=$(get_krb5_conf) if [[ -z "$conf" ]]; then - err "Missing krb5.conf data in ConfigMap prole-krb5-conf." + err "Missing krb5.conf data in ConfigMap knoe-krb5-conf." return 1 fi @@ -737,7 +737,7 @@ apply_krb5_conf_to_cnpg_pods() { log "[OK] Updated /controller/krb5.conf in $pod" else err "[WARN] Unable to write /controller/krb5.conf in $pod." - err " Consider mounting ConfigMap prole-krb5-conf into the CNPG pods or updating the image." + err " Consider mounting ConfigMap knoe-krb5-conf into the CNPG pods or updating the image." fi done } @@ -913,7 +913,7 @@ ensure_kdc_network_allow() { apiVersion: networking.k8s.io/v1 kind: NetworkPolicy metadata: - name: prole-kdc-egress + name: knoe-kdc-egress namespace: ${ns} spec: podSelector: @@ -942,7 +942,7 @@ $(for port in $KRB5_AD_UDP_PORTS; do printf " - protocol: UDP\n apiVersion: networking.k8s.io/v1 kind: NetworkPolicy metadata: - name: prole-ad-forwarder-egress + name: knoe-ad-forwarder-egress namespace: ${ns} spec: podSelector: @@ -959,9 +959,9 @@ EOF maybe_apply_k3d_route_fix() { local norm mode - mode="${PROLE_MODE:-}" - if command -v prole_normalize_mode >/dev/null 2>&1; then - norm=$(prole_normalize_mode "$mode") + mode="${KNOE_MODE:-}" + if command -v knoe_normalize_mode >/dev/null 2>&1; then + norm=$(knoe_normalize_mode "$mode") else norm="$mode" fi @@ -975,7 +975,7 @@ maybe_apply_k3d_route_fix() { } initialize() { - if [[ "${PROLE_MODE:-}" == "min" ]]; then + if [[ "${KNOE_MODE:-}" == "min" ]]; then log "Minimal mode: skipping Kerberos Kubernetes resource initialization." return 0 fi @@ -986,12 +986,12 @@ initialize() { prefer_cfg_realm_for_test resolve_krb5_password - # Support both names for the toggle from prole.cfg + # Support both names for the toggle from knoe.cfg local enabled="${KERBEROS_ENABLED:-${ENABLED:-false}}" if [[ "$enabled" == "false" || "$enabled" == "0" || "$enabled" == "False" ]]; then log "Kerberos is disabled (KERBEROS_ENABLED=$enabled). Skipping initialization." # Cleanup any existing Kerberos config if it was previously enabled - kubectl -n "$NAMESPACE" delete configmap prole-krb5-conf --ignore-not-found + kubectl -n "$NAMESPACE" delete configmap knoe-krb5-conf --ignore-not-found return 0 fi @@ -1001,7 +1001,7 @@ initialize() { exit 1 fi - sync_prole_kdc_trust + sync_knoe_kdc_trust ensure_krb5_conf_configmap if apply_krb5_conf_mount_to_cnpg; then apply_krb5_env_to_cnpg "/projected/krb5/krb5.conf" @@ -1032,18 +1032,18 @@ run_test() { fi local mode - mode="${PROLE_MODE:-}" + mode="${KNOE_MODE:-}" local prefer_parent="${KERBEROS_TEST_PREFER_PARENT_REALM:-1}" - if _prole_bool_true "$prefer_parent" && [[ -n "${PROLE_PARENT_REALM:-}" ]]; then + if _knoe_bool_true "$prefer_parent" && [[ -n "${PROLE_PARENT_REALM:-}" ]]; then KRB5_REALM="${PROLE_PARENT_REALM}" REALM="${PROLE_PARENT_REALM}" - elif _prole_bool_true "$prefer_parent" && [[ -n "${KRB5_REALM:-}" && "${KRB5_REALM}" == *.* ]]; then + elif _knoe_bool_true "$prefer_parent" && [[ -n "${KRB5_REALM:-}" && "${KRB5_REALM}" == *.* ]]; then local derived_parent="${KRB5_REALM#*.}" KRB5_REALM="${derived_parent}" REALM="${derived_parent}" fi local test_use_child="${PROLE_USE_CHILD_REALM:-}" - if _prole_bool_true "$prefer_parent"; then + if _knoe_bool_true "$prefer_parent"; then test_use_child=0 fi local ad_forward_explicit=0 @@ -1059,8 +1059,8 @@ run_test() { fi local normalized="" - if command -v prole_normalize_mode >/dev/null 2>&1; then - normalized=$(prole_normalize_mode "$mode") + if command -v knoe_normalize_mode >/dev/null 2>&1; then + normalized=$(knoe_normalize_mode "$mode") else normalized="$mode" fi @@ -1179,10 +1179,10 @@ status() { log "AD forwarder namespace: ${KRB5_AD_NAMESPACE:-}" log "AD forwarder deployment: $KRB5_AD_PROXY_NAME" log "AD forwarder service: $KRB5_AD_SERVICE_NAME" - if kubectl -n "$NAMESPACE" get configmap prole-krb5-conf >/dev/null 2>&1; then - log "[OK] ConfigMap prole-krb5-conf present" + if kubectl -n "$NAMESPACE" get configmap knoe-krb5-conf >/dev/null 2>&1; then + log "[OK] ConfigMap knoe-krb5-conf present" else - log "[MISSING] ConfigMap prole-krb5-conf" + log "[MISSING] ConfigMap knoe-krb5-conf" fi if kubectl -n "$KRB5_AD_NAMESPACE" get deploy "$KRB5_AD_PROXY_NAME" >/dev/null 2>&1; then log "[OK] AD forwarder deployment present" diff --git a/etc/init_knoe-db-reset.sh b/etc/init_knoe-db-reset.sh index 7be71b8..8ec6f0d 100755 --- a/etc/init_knoe-db-reset.sh +++ b/etc/init_knoe-db-reset.sh @@ -15,15 +15,15 @@ set -euo pipefail SCRIPT_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) -# Load environment and config via prole_cfg.sh +# Load environment and config via knoe_cfg.sh # shellcheck disable=SC1090 -source "$SCRIPT_DIR/prole_cfg.sh" +source "$SCRIPT_DIR/knoe_cfg.sh" if [[ "${1:-}" == "--mode" || "${1:-}" == "-m" ]]; then - prole_set_mode "${2:-}" + knoe_set_mode "${2:-}" shift 2 elif [[ "${1:-}" == --mode=* || "${1:-}" == -m=* ]]; then - prole_set_mode "${1#*=}" + knoe_set_mode "${1#*=}" shift fi @@ -31,7 +31,7 @@ ACTION=${1:-reset} NAMESPACE="${PROLE_NAMESPACE}" CNPG_CLUSTER_NAME=${CNPG_CLUSTER_NAME:-knoe-db} -PROLE_HOME=${PROLE_HOME:-$(cd "$SCRIPT_DIR/.." && pwd)} +KNOE_HOME=${KNOE_HOME:-$(cd "$SCRIPT_DIR/.." && pwd)} ADMIN_USER=${KNOE_DB_ADMIN_USER:-postgres} ADMIN_DB=${KNOE_DB_ADMIN_DB:-postgres} @@ -49,12 +49,12 @@ GARAGE_BACKUP_BUCKET=${GARAGE_BACKUP_BUCKET:-knoe-db-backups} GARAGE_BACKUP_SECRET_NAME=${GARAGE_BACKUP_SECRET_NAME:-knoe-db-barman-s3} GARAGE_S3_ENDPOINT=${GARAGE_S3_ENDPOINT:-http://$GARAGE_NAME.$GARAGE_NAMESPACE.svc.cluster.local:3900} -BACKUP_DIR=${BACKUP_DIR:-$PROLE_HOME/prole/backup} +BACKUP_DIR=${BACKUP_DIR:-$KNOE_HOME/knoe/backup} BACKUP_WAIT_TIMEOUT=${BACKUP_WAIT_TIMEOUT:-1800} EXPORT_WAIT_TIMEOUT=${EXPORT_WAIT_TIMEOUT:-1800} ALLOW_NO_BACKUP=${ALLOW_NO_BACKUP:-0} -RECOVERY_TEMPLATE="$SCRIPT_DIR/../k8s/prole/knoe-db-recovery.yaml.tpl" +RECOVERY_TEMPLATE="$SCRIPT_DIR/../k8s/knoe/knoe-db-recovery.yaml.tpl" log() { printf '%s\n' "$*"; } err() { printf '%s\n' "$*" >&2; } @@ -199,7 +199,7 @@ export_backup_bucket() { image=$(kubectl -n "$NAMESPACE" get cluster "$CNPG_CLUSTER_NAME" -o jsonpath='{.spec.imageName}' 2>/dev/null || true) image=${image:-${KNOE_DB_IMAGE:-knoe-db:latest}} - pod_name="prole-barman-export-$(date +%s)" + pod_name="knoe-barman-export-$(date +%s)" export_subdir="${BACKUP_DIR}/garage-export-$(date +%Y%m%d%H%M%S)" log "Creating export pod $pod_name using image $image ..." diff --git a/etc/init_knoe_auth.sh b/etc/init_knoe_auth.sh index bd184a3..632a8dc 100755 --- a/etc/init_knoe_auth.sh +++ b/etc/init_knoe_auth.sh @@ -19,17 +19,17 @@ set -euo pipefail SCRIPT_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) # shellcheck disable=SC1090 -source "$SCRIPT_DIR/prole_cfg.sh" +source "$SCRIPT_DIR/knoe_cfg.sh" if [[ "${1:-}" == "--mode" || "${1:-}" == "-m" ]]; then - prole_set_mode "${2:-}" + knoe_set_mode "${2:-}" shift 2 elif [[ "${1:-}" == --mode=* || "${1:-}" == -m=* ]]; then - prole_set_mode "${1#*=}" + knoe_set_mode "${1#*=}" shift fi -prole_ensure_kubeconfig >/dev/null 2>&1 || true +knoe_ensure_kubeconfig >/dev/null 2>&1 || true ensure_kube_context || exit 1 ACTION=${1:-initialize} @@ -46,7 +46,7 @@ KNOE_AUTH_IMAGE_EXPLICIT=0 if [[ -n "${KNOE_AUTH_IMAGE:-}" ]]; then KNOE_AUTH_IMAGE_EXPLICIT=1 fi -KNOE_AUTH_IMAGE_NAME=${KNOE_AUTH_IMAGE_NAME:-${PROLE_KDC_IMAGE_NAME:-prole-authority}} +KNOE_AUTH_IMAGE_NAME=${KNOE_AUTH_IMAGE_NAME:-${PROLE_KDC_IMAGE_NAME:-knoe-authority}} KNOE_AUTH_IMAGE_TAG=${KNOE_AUTH_IMAGE_TAG:-${PROLE_KDC_IMAGE_TAG:-latest}} KNOE_AUTH_REGISTRY_HOST=${KNOE_AUTH_REGISTRY_HOST:-${PROLE_KDC_REGISTRY_HOST:-${LOCAL_REGISTRY:-localhost:5000}}} KNOE_AUTH_REGISTRY_INTERNAL=${KNOE_AUTH_REGISTRY_INTERNAL:-${PROLE_KDC_REGISTRY_INTERNAL:-${LOCAL_REGISTRY_INTERNAL:-}}} @@ -82,10 +82,10 @@ local_registry_enabled() { fi local mode="" - if command -v prole_normalize_mode >/dev/null 2>&1; then - mode=$(prole_normalize_mode "${PROLE_MODE:-${DEPLOYMENT_MODE:-${CLUSTER_ENV:-}}}") + if command -v knoe_normalize_mode >/dev/null 2>&1; then + mode=$(knoe_normalize_mode "${KNOE_MODE:-${DEPLOYMENT_MODE:-${CLUSTER_ENV:-}}}") else - mode="${PROLE_MODE:-${DEPLOYMENT_MODE:-${CLUSTER_ENV:-}}}" + mode="${KNOE_MODE:-${DEPLOYMENT_MODE:-${CLUSTER_ENV:-}}}" fi [[ "$mode" == "k3d" || "$mode" == "k3s" ]] } @@ -148,11 +148,11 @@ ensure_namespace() { } normalized_mode() { - if command -v prole_normalize_mode >/dev/null 2>&1; then - prole_normalize_mode "${PROLE_MODE:-}" + if command -v knoe_normalize_mode >/dev/null 2>&1; then + knoe_normalize_mode "${KNOE_MODE:-}" return 0 fi - printf '%s' "${PROLE_MODE:-}" + printf '%s' "${KNOE_MODE:-}" } is_k3d_mode() { @@ -306,10 +306,10 @@ resolve_knoe_auth_defaults() { PROLE_KDC_DOMAIN=$(lowercase "$PROLE_KDC_REALM") fi local mode="" - if command -v prole_normalize_mode >/dev/null 2>&1; then - mode=$(prole_normalize_mode "${PROLE_MODE:-}") + if command -v knoe_normalize_mode >/dev/null 2>&1; then + mode=$(knoe_normalize_mode "${KNOE_MODE:-}") else - mode="${PROLE_MODE:-}" + mode="${KNOE_MODE:-}" fi local k3s_host="" if local_registry_enabled; then @@ -341,16 +341,16 @@ resolve_kdc_docker_dir() { echo "$PROLE_KDC_DOCKER_DIR" return 0 fi - if [[ -n "${PROLE_HOME:-}" && -d "$PROLE_HOME/prole/authority" ]]; then - echo "$PROLE_HOME/prole/authority" + if [[ -n "${KNOE_HOME:-}" && -d "$KNOE_HOME/knoe/authority" ]]; then + echo "$KNOE_HOME/knoe/authority" return 0 fi - if [[ -n "${PROLE_HOME:-}" && -d "$PROLE_HOME/authority" ]]; then - echo "$PROLE_HOME/authority" + if [[ -n "${KNOE_HOME:-}" && -d "$KNOE_HOME/authority" ]]; then + echo "$KNOE_HOME/authority" return 0 fi - if [[ -d "$SCRIPT_DIR/../prole/authority" ]]; then - echo "$SCRIPT_DIR/../prole/authority" + if [[ -d "$SCRIPT_DIR/../knoe/authority" ]]; then + echo "$SCRIPT_DIR/../knoe/authority" return 0 fi if [[ -d "$SCRIPT_DIR/../authority" ]]; then @@ -397,7 +397,7 @@ build_knoe_auth_image() { local docker_dir docker_dir=$(resolve_kdc_docker_dir || true) if [[ -z "$docker_dir" ]]; then - err "ERROR: prole/authority Docker context not found." + err "ERROR: knoe/authority Docker context not found." exit 1 fi @@ -497,7 +497,7 @@ ensure_knoe_auth() { deployment_present=1 fi - # Clean up legacy prole-auth / old KDC names when switching to knoe-auth. + # Clean up legacy knoe-auth / old KDC names when switching to knoe-auth. kubectl -n "$KNOE_AUTH_NAMESPACE" delete deployment auth --ignore-not-found >/dev/null 2>&1 || true kubectl -n "$KNOE_AUTH_NAMESPACE" delete service auth --ignore-not-found >/dev/null 2>&1 || true kubectl -n "$KNOE_AUTH_NAMESPACE" delete deployment dog --ignore-not-found >/dev/null 2>&1 || true diff --git a/etc/init_knoe_users.sh b/etc/init_knoe_users.sh index 44cca0c..2df32bc 100755 --- a/etc/init_knoe_users.sh +++ b/etc/init_knoe_users.sh @@ -7,14 +7,14 @@ set -euo pipefail # - Provision Kerberos principals and database accounts for knoe-system users # - Creates: admin@PROLE.LOCAL (master password), guest@PROLE.LOCAL (read-only), # postgres service principal (keytab for GSS auth), developer group role -# - Cross-realm trust with myrddin.prole.org PROLE.ORG is activated via +# - Cross-realm trust with myrddin.knoe.org PROLE.ORG is activated via # PROLE_KDC_TRUST_REALM=PROLE.ORG in init_kdc.sh / init_knoe_auth.sh # - Sets up service admin access: ArgoCD RBAC, Gitea, GitLab # # Prerequisites: # init_kdc.sh initialize (with PROLE_KDC_REALM=PROLE.LOCAL, # PROLE_KDC_TRUST_REALM=PROLE.ORG, -# KRB5_KDC=myrddin.prole.org) +# KRB5_KDC=myrddin.knoe.org) # init_cnpg_backup.sh (CNPG cluster must exist) # init_argocd.sh (ArgoCD must be running) # @@ -26,17 +26,17 @@ set -euo pipefail SCRIPT_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) # shellcheck disable=SC1090 -source "$SCRIPT_DIR/prole_cfg.sh" +source "$SCRIPT_DIR/knoe_cfg.sh" if [[ "${1:-}" == "--mode" || "${1:-}" == "-m" ]]; then - prole_set_mode "${2:-}" + knoe_set_mode "${2:-}" shift 2 elif [[ "${1:-}" == --mode=* || "${1:-}" == -m=* ]]; then - prole_set_mode "${1#*=}" + knoe_set_mode "${1#*=}" shift fi -prole_ensure_kubeconfig >/dev/null 2>&1 || true +knoe_ensure_kubeconfig >/dev/null 2>&1 || true ensure_kube_context || exit 1 # Guard: we must never operate against the 'default' context — it means the @@ -45,7 +45,7 @@ _active_ctx=$(kubectl config current-context 2>/dev/null || true) if [[ "${_active_ctx:-}" == "default" ]]; then printf '[ERROR] Active kubectl context is '\''default'\'' — the required context was not found.\n' >&2 printf ' Add the correct kubeconfig to KUBECONFIG, e.g.:\n' >&2 - printf ' export KUBECONFIG=%s:~/.kube/config\n' "${KUBECONFIG:-/path/to/prole-k3s.kubeconfig}" >&2 + printf ' export KUBECONFIG=%s:~/.kube/config\n' "${KUBECONFIG:-/path/to/knoe-k3s.kubeconfig}" >&2 printf ' Then retry.\n' >&2 exit 1 fi @@ -54,9 +54,9 @@ unset _active_ctx ACTION="${1:-initialize}" resolve_knoe_mode() { - local raw_mode="${PROLE_MODE:-${DEPLOYMENT_MODE:-${CLUSTER_ENV:-k3s}}}" - if command -v prole_normalize_mode >/dev/null 2>&1; then - prole_normalize_mode "$raw_mode" + local raw_mode="${KNOE_MODE:-${DEPLOYMENT_MODE:-${CLUSTER_ENV:-k3s}}}" + if command -v knoe_normalize_mode >/dev/null 2>&1; then + knoe_normalize_mode "$raw_mode" return 0 fi raw_mode=$(printf '%s' "$raw_mode" | tr 'A-Z' 'a-z') @@ -76,14 +76,14 @@ default_knoe_auth_deployment() { printf 'authority-gcp-auth' ;; *) - printf 'authority-prole-auth' + printf 'authority-knoe-auth' ;; esac } # ── Configurable variables ───────────────────────────────────────────────── # PROLE_KDC_NAMESPACE is the canonical env set by init_kdc.sh; honour it here -# so both scripts look at the same namespace for prole-kdc-secrets. +# so both scripts look at the same namespace for knoe-kdc-secrets. # Never fall through to "default" — use knoe-system as the last resort. KNOE_USERS_NAMESPACE="${KNOE_USERS_NAMESPACE:-${SERVICE_NAMESPACE:-knoe-system}}" KNOE_KDC_NAMESPACE="${KNOE_KDC_NAMESPACE:-${PROLE_KDC_NAMESPACE:-${KNOE_USERS_NAMESPACE}}}" @@ -93,12 +93,12 @@ KNOE_DEPLOYMENT_MODE="${KNOE_DEPLOYMENT_MODE:-$(resolve_knoe_mode)}" KNOE_AUTH_DEPLOYMENT="${KNOE_AUTH_DEPLOYMENT:-${PROLE_KDC_NAME:-$(default_knoe_auth_deployment)}}" KNOE_ADMIN_PRINCIPAL="${KNOE_ADMIN_PRINCIPAL:-admin}" PROLE_KDC_REALM="${PROLE_KDC_REALM:-PROLE.LOCAL}" -GITEA_HOST="${GITEA_HOST:-git.prole.org}" -GITLAB_HOST="${GITLAB_HOST:-gitlab.prole.org}" +GITEA_HOST="${GITEA_HOST:-git.knoe.org}" +GITLAB_HOST="${GITLAB_HOST:-gitlab.knoe.org}" GITEA_NAMESPACE="${GITEA_NAMESPACE:-gitea}" GITLAB_NAMESPACE="${GITLAB_NAMESPACE:-gitlab}" ARGOCD_NAMESPACE="${ARGOCD_NAMESPACE:-argocd}" -# Provided externally or resolved from prole-kdc-secrets +# Provided externally or resolved from knoe-kdc-secrets PROLE_KDC_MASTER_PASSWORD="${PROLE_KDC_MASTER_PASSWORD:-}" KNOE_GUEST_PASSWORD="${KNOE_GUEST_PASSWORD:-}" # UI-supplied credentials (set by knoe_users.py from the Database / Kerberos Auth screens) @@ -239,9 +239,9 @@ initialize() { log "Namespaces: kdc/authority=${KNOE_KDC_NAMESPACE} db=${KNOE_DB_NAMESPACE}" log "Mode: ${KNOE_DEPLOYMENT_MODE} authority deployment: ${KNOE_AUTH_DEPLOYMENT}" - # 1. Resolve passwords — read from prole-kdc-secrets (written by init_kdc.sh) + # 1. Resolve passwords — read from knoe-kdc-secrets (written by init_kdc.sh) if [[ -z "$PROLE_KDC_MASTER_PASSWORD" ]]; then - PROLE_KDC_MASTER_PASSWORD=$(get_secret_value "prole-kdc-secrets" "master_password") + PROLE_KDC_MASTER_PASSWORD=$(get_secret_value "knoe-kdc-secrets" "master_password") fi # Allow the UI-supplied PROLE_LOCAL_ADMIN_PASSWORD (DB master password field) to # override when the secret is absent or empty. @@ -257,23 +257,23 @@ initialize() { (creates/stores the secret in namespace '${KNOE_KDC_NAMESPACE}') 2. Export: export PROLE_KDC_MASTER_PASSWORD= 3. Set the database master password on the Database screen and retry - 4. Check: kubectl -n ${KNOE_KDC_NAMESPACE} get secret prole-kdc-secrets -o yaml" + 4. Check: kubectl -n ${KNOE_KDC_NAMESPACE} get secret knoe-kdc-secrets -o yaml" fi if [[ -z "$KNOE_GUEST_PASSWORD" ]]; then - KNOE_GUEST_PASSWORD=$(get_secret_value "prole-kdc-secrets" "guest_password") + KNOE_GUEST_PASSWORD=$(get_secret_value "knoe-kdc-secrets" "guest_password") fi if [[ -z "$KNOE_GUEST_PASSWORD" ]]; then KNOE_GUEST_PASSWORD=$(gen_password) - log "Auto-generated guest password — storing in prole-kdc-secrets ..." - if kubectl -n "$KNOE_KDC_NAMESPACE" get secret prole-kdc-secrets >/dev/null 2>&1; then + log "Auto-generated guest password — storing in knoe-kdc-secrets ..." + if kubectl -n "$KNOE_KDC_NAMESPACE" get secret knoe-kdc-secrets >/dev/null 2>&1; then local guest_b64 guest_b64=$(printf '%s' "$KNOE_GUEST_PASSWORD" | base64 | tr -d '\n') - kubectl -n "$KNOE_KDC_NAMESPACE" patch secret prole-kdc-secrets \ + kubectl -n "$KNOE_KDC_NAMESPACE" patch secret knoe-kdc-secrets \ --type=merge \ --patch "{\"data\":{\"guest_password\":\"${guest_b64}\"}}" >/dev/null else - kubectl -n "$KNOE_KDC_NAMESPACE" create secret generic prole-kdc-secrets \ + kubectl -n "$KNOE_KDC_NAMESPACE" create secret generic knoe-kdc-secrets \ --from-literal=guest_password="$KNOE_GUEST_PASSWORD" \ --dry-run=client -o yaml | kubectl apply -f - >/dev/null fi @@ -322,11 +322,11 @@ initialize() { local trust_princ_in="krbtgt/PROLE.ORG@${PROLE_KDC_REALM}" local trust_princ_out="krbtgt/${PROLE_KDC_REALM}@PROLE.ORG" local trust_shared_pw - trust_shared_pw=$(kubectl -n "$KNOE_KDC_NAMESPACE" get secret prole-kdc-secrets \ + trust_shared_pw=$(kubectl -n "$KNOE_KDC_NAMESPACE" get secret knoe-kdc-secrets \ -o jsonpath='{.data.trust_shared_password}' 2>/dev/null | b64_decode || true) if [[ -z "$trust_shared_pw" ]]; then - warn "trust_shared_password not set in prole-kdc-secrets; cross-realm trust principals will not be created" - warn "Add trust_shared_password to prole-kdc-secrets and re-run" + warn "trust_shared_password not set in knoe-kdc-secrets; cross-realm trust principals will not be created" + warn "Add trust_shared_password to knoe-kdc-secrets and re-run" else # Direction A (init_kdc.sh may already have created this) if kdc_principal_exists "$kdc_pod" "$trust_princ_in"; then @@ -455,8 +455,8 @@ SQL # 8. Create knoe.user schema tables and bootstrap users if [[ -n "$primary" ]]; then create_knoe_schema "$primary" - provision_user "$primary" "chrisfu" "chrisfu@prole.org" "Chris Fu" "admin" - provision_user "$primary" "ron" "ron@prole.org" "Ron" "developer" + provision_user "$primary" "chrisfu" "chrisfu@knoe.org" "Chris Fu" "admin" + provision_user "$primary" "ron" "ron@knoe.org" "Ron" "developer" else warn "CNPG primary not found — skipping knoe.user schema and user provisioning" fi @@ -473,9 +473,9 @@ SQL log "=== Initialization complete ===" log "" log "Next steps:" - log " 1. On myrddin.prole.org: add krbtgt/PROLE.LOCAL@PROLE.ORG trust principal" - log " (samba-tool domain trust or equivalent, using trust_shared_password from prole-kdc-secrets)" - log " 2. Confirm Grafana auth.proxy configured with: headers = Role:X-Prole-Groups" + log " 1. On myrddin.knoe.org: add krbtgt/PROLE.LOCAL@PROLE.ORG trust principal" + log " (samba-tool domain trust or equivalent, using trust_shared_password from knoe-kdc-secrets)" + log " 2. Confirm Grafana auth.proxy configured with: headers = Role:X-Knoe-Groups" log " 3. After admin logs in to Gitea/GitLab for the first time, re-run: $0 initialize" } @@ -502,9 +502,9 @@ CREATE TABLE IF NOT EXISTS knoe.user_role ( granted_at TIMESTAMPTZ DEFAULT now(), PRIMARY KEY (user_id, role) ); -GRANT SELECT, INSERT, UPDATE ON knoe.user TO prole; -GRANT SELECT, INSERT, UPDATE ON knoe.user_role TO prole; -GRANT USAGE, SELECT ON SEQUENCE knoe.user_id_seq TO prole; +GRANT SELECT, INSERT, UPDATE ON knoe.user TO knoe; +GRANT SELECT, INSERT, UPDATE ON knoe.user_role TO knoe; +GRANT USAGE, SELECT ON SEQUENCE knoe.user_id_seq TO knoe; SQL log "knoe.user schema ready." } diff --git a/etc/init_kong.sh b/etc/init_kong.sh index 51ef481..1924677 100755 --- a/etc/init_kong.sh +++ b/etc/init_kong.sh @@ -5,7 +5,7 @@ set -euo pipefail # init_kong.sh # Purpose: # - Deploy Kong API Gateway (DB-less) into the service namespace -# - Replaces the prole nginx deployment as the API endpoint +# - Replaces the knoe nginx deployment as the API endpoint # - Routes /backup/* to knoe-db-manager # - Creates the kong declarative config as a ConfigMap # - Applies the kong deployment and service manifests @@ -33,13 +33,13 @@ unset _has_config _arg _default_cfg common_core_preparse_config "$@" # shellcheck disable=SC1090 -source "$SCRIPT_DIR/prole_cfg.sh" +source "$SCRIPT_DIR/knoe_cfg.sh" set -- "${COMMON_CORE_ARGS[@]}" common_core_parse_args "$@" -if [[ -z "${PROLE_MODE:-}" ]]; then - export PROLE_MODE="k3s" +if [[ -z "${KNOE_MODE:-}" ]]; then + export KNOE_MODE="k3s" fi resolve_explicit_kube_context() { @@ -52,7 +52,7 @@ resolve_explicit_kube_context() { } enforce_app_cluster_targeting() { - if [[ "${PROLE_MODE:-}" != "k8s" ]]; then + if [[ "${KNOE_MODE:-}" != "k8s" ]]; then return 0 fi local app_ctx="${APP_CLUSTER_KUBECONTEXT:-}" @@ -85,7 +85,7 @@ enforce_app_cluster_targeting() { kubectl() { local target_ctx target_ctx="$(resolve_explicit_kube_context || true)" - if [[ "${PROLE_MODE:-}" == "k8s" && -z "$target_ctx" ]]; then + if [[ "${KNOE_MODE:-}" == "k8s" && -z "$target_ctx" ]]; then echo "ERROR: explicit kubectl context is required in k8s mode." >&2 return 2 fi @@ -124,10 +124,10 @@ ACTION="$COMMON_CORE_ACTION" NAMESPACE="$(common_core_resolve_namespace "default")" common_core_apply_namespace "$NAMESPACE" -PROLE_HOME=${PROLE_HOME:-$(cd "$SCRIPT_DIR/.." && pwd)} +KNOE_HOME=${KNOE_HOME:-$(cd "$SCRIPT_DIR/.." && pwd)} KONG_IMAGE="${KONG_IMAGE:-kong:3.9}" -# k8s/GKE prod mode uses knoe.dev domain and knoe-svc-kong; all other modes use prole.org -if [[ "${PROLE_MODE:-}" == "k8s" ]]; then +# k8s/GKE prod mode uses knoe.dev domain and knoe-svc-kong; all other modes use knoe.org +if [[ "${KNOE_MODE:-}" == "k8s" ]]; then KONG_NAME="${KONG_NAME:-knoe-svc-kong}" KONG_CONFIG_NAME="${KONG_CONFIG_NAME:-knoe-svc-kong-config}" SERVICE_HOSTNAME="${SERVICE_HOSTNAME:-svc.knoe.dev}" @@ -135,11 +135,11 @@ if [[ "${PROLE_MODE:-}" == "k8s" ]]; then GITEA_HOSTNAME="${GITEA_HOSTNAME:-${GITEA_DOMAIN:-git.knoe.dev}}" SERVICE_INGRESS_TLS_ENABLED="${SERVICE_INGRESS_TLS_ENABLED:-0}" else - KONG_NAME="${KONG_NAME:-prole-svc-kong}" - KONG_CONFIG_NAME="${KONG_CONFIG_NAME:-prole-svc-kong-config}" - SERVICE_HOSTNAME="${SERVICE_HOSTNAME:-svc.prole.org}" - AUTH_HOSTNAME="${AUTH_HOSTNAME:-api.prole.org}" - GITEA_HOSTNAME="${GITEA_HOSTNAME:-${GITEA_DOMAIN:-git.prole.org}}" + KONG_NAME="${KONG_NAME:-knoe-svc-kong}" + KONG_CONFIG_NAME="${KONG_CONFIG_NAME:-knoe-svc-kong-config}" + SERVICE_HOSTNAME="${SERVICE_HOSTNAME:-svc.knoe.org}" + AUTH_HOSTNAME="${AUTH_HOSTNAME:-api.knoe.org}" + GITEA_HOSTNAME="${GITEA_HOSTNAME:-${GITEA_DOMAIN:-git.knoe.org}}" SERVICE_INGRESS_TLS_ENABLED="${SERVICE_INGRESS_TLS_ENABLED:-1}" fi KONG_PROXY_PORT="${KONG_PROXY_PORT:-8000}" @@ -162,7 +162,7 @@ SVC_KNOE_GLOBAL_STATIC_IP_NAME="${SVC_KNOE_GLOBAL_STATIC_IP_NAME:-}" # Mirrors the pattern in etc/init_gitlab.sh (gitlab-webservice-backendconfig). SVC_KNOE_BACKEND_CONFIG_NAME="${SVC_KNOE_BACKEND_CONFIG_NAME:-knoe-svc-kong-backendconfig}" -# Legacy: svc-check used to own svc.prole.org. We now route the service hostname +# Legacy: svc-check used to own svc.knoe.org. We now route the service hostname # to Grafana, so remove any leftover svc-check resources to avoid conflicts. SVC_CHECK_NAMESPACE="${SVC_CHECK_NAMESPACE:-svc-check}" @@ -175,7 +175,7 @@ KUBECTL_APPLY_RETRY_DELAY="${KUBECTL_APPLY_RETRY_DELAY:-2}" DB_MANAGER_SERVICE="${DB_MANAGER_SERVICE:-knoe-db-manager}" DB_MANAGER_PORT="${DB_MANAGER_PORT:-80}" DB_MANAGER_NAMESPACE="${DB_MANAGER_NAMESPACE:-${DATABASE_NAMESPACE:-knoe-db}}" -PROLE_SERVICE_UPSTREAM_URL="${PROLE_SERVICE_UPSTREAM_URL:-http://prole-svc.${NAMESPACE}.svc.cluster.local:8080}" +KNOE_SERVICE_UPSTREAM_URL="${KNOE_SERVICE_UPSTREAM_URL:-http://knoe-svc.${NAMESPACE}.svc.cluster.local:8080}" GRAFANA_UPSTREAM_URL="${GRAFANA_UPSTREAM_URL:-http://kps-grafana.monitoring.svc.cluster.local:80}" GITEA_HTTP_UPSTREAM_URL="${GITEA_HTTP_UPSTREAM_URL:-http://gitea-http.gitea.svc.cluster.local:3000}" GITEA_SSH_UPSTREAM_HOST="${GITEA_SSH_UPSTREAM_HOST:-gitea-ssh.gitea.svc.cluster.local}" @@ -183,7 +183,7 @@ GITEA_SSH_UPSTREAM_PORT="${GITEA_SSH_UPSTREAM_PORT:-22}" # SSO wiring knobs PROLE_GRAFANA_SSO_ENABLED="${PROLE_GRAFANA_SSO_ENABLED:-0}" -GRAFANA_PROXY_UPSTREAM_URL="${GRAFANA_PROXY_UPSTREAM_URL:-http://prole-grafana-proxy.${NAMESPACE}.svc.cluster.local:80}" +GRAFANA_PROXY_UPSTREAM_URL="${GRAFANA_PROXY_UPSTREAM_URL:-http://knoe-grafana-proxy.${NAMESPACE}.svc.cluster.local:80}" KNOE_AUTH_UPSTREAM_URL="${KNOE_AUTH_UPSTREAM_URL:-http://knoe-auth.${SERVICE_NAMESPACE:-${NAMESPACE}}.svc.cluster.local:8080}" usage() { @@ -222,7 +222,7 @@ assert_public_ingress_targeting() { shift || true local hosts=("$@") - if [[ "${PROLE_MODE:-}" != "k8s" ]]; then + if [[ "${KNOE_MODE:-}" != "k8s" ]]; then return 0 fi @@ -267,7 +267,7 @@ assert_unique_ingress_host_claims() { [[ -n "$host_csv" ]] || return 0 local target_ctx="${KUBECTL_CONTEXT:-${KUBE_CONTEXT_NAME:-${KUBECONTEXT:-}}}" - if [[ "${PROLE_MODE:-}" == "k8s" && -z "$target_ctx" ]]; then + if [[ "${KNOE_MODE:-}" == "k8s" && -z "$target_ctx" ]]; then echo "ERROR: explicit kubectl context is required for ingress ownership checks in k8s mode." >&2 return 1 fi @@ -401,10 +401,10 @@ services: status_code: 200 message: ok - - name: prole-service - url: ${PROLE_SERVICE_UPSTREAM_URL} + - name: knoe-service + url: ${KNOE_SERVICE_UPSTREAM_URL} routes: - - name: prole-k3s-kubeconfig + - name: knoe-k3s-kubeconfig hosts: - ${SERVICE_HOSTNAME} paths: @@ -511,7 +511,7 @@ apply_service_ingress() { local gitea_host="${GITEA_HOSTNAME:-}" local include_aux_hosts=1 local include_gitea_host=1 - if [[ "${PROLE_MODE:-}" == "k8s" ]]; then + if [[ "${KNOE_MODE:-}" == "k8s" ]]; then # In k8s mode, GitLab handles its own ingress. # But api.knoe.dev must be public via knoe-svc-kong. include_gitea_host=0 @@ -565,12 +565,12 @@ EOF tls_enabled=1 fi - if [[ "${PROLE_MODE:-}" != "k8s" ]]; then + if [[ "${KNOE_MODE:-}" != "k8s" ]]; then extra_annotations=$' traefik.ingress.kubernetes.io/router.priority: "10"\n' fi local ingress_class="${KONG_INGRESS_CLASS:-}" if [[ -z "$ingress_class" ]]; then - if [[ "${PROLE_MODE:-}" == "k8s" ]]; then + if [[ "${KNOE_MODE:-}" == "k8s" ]]; then ingress_class="gce" else ingress_class="traefik" @@ -589,7 +589,7 @@ EOF ingress_host_csv=$(IFS=, ; echo "${ingress_hosts[*]}") assert_unique_ingress_host_claims "$ingress_name" "$NAMESPACE" "$ingress_host_csv" - if [[ "${PROLE_MODE:-}" == "k8s" && "$ingress_class" == "gce" ]]; then + if [[ "${KNOE_MODE:-}" == "k8s" && "$ingress_class" == "gce" ]]; then service_managed_cert_name="${SERVICE_MANAGED_CERT_NAME:-svc-knoe-managed-cert}" service_frontend_config_name="${SERVICE_FRONTEND_CONFIG_NAME:-svc-knoe-frontend-config}" local managed_domains_yaml="" @@ -693,7 +693,7 @@ EOF fi # Diagnostics: show current ingress, managedcertificate, and frontendconfig state before apply. - if [[ "${PROLE_MODE:-}" == "k8s" && "$ingress_class" == "gce" ]]; then + if [[ "${KNOE_MODE:-}" == "k8s" && "$ingress_class" == "gce" ]]; then echo "--- GCE svc ingress diagnostics (pre-apply) ---" kubectl get ingress -A --no-headers 2>/dev/null || true echo "ManagedCertificates:" @@ -729,7 +729,7 @@ EOF if [[ -n "$live_class" && "$live_class" != "$ingress_class" ]]; then # ingressClass change requires recreation (immutable field). replace_reason="ingressClass drift (live=${live_class}, desired=${ingress_class})" - elif [[ "${PROLE_MODE:-}" == "k8s" && "$ingress_class" == "gce" ]]; then + elif [[ "${KNOE_MODE:-}" == "k8s" && "$ingress_class" == "gce" ]]; then # Requirement 2 & 3: never delete/recreate to clear stale cert annotations. # Patch annotations in place instead. if [[ -n "$live_pre_shared_cert" ]]; then @@ -793,7 +793,7 @@ EOF kubectl_apply_retry -f "$tmp" ) - if [[ "${PROLE_MODE:-}" == "k8s" && "$ingress_class" == "gce" ]]; then + if [[ "${KNOE_MODE:-}" == "k8s" && "$ingress_class" == "gce" ]]; then kubectl -n "$NAMESPACE" annotate ingress "$ingress_name" \ ingress.gcp.kubernetes.io/pre-shared-cert- \ --overwrite >/dev/null 2>&1 || true @@ -815,10 +815,10 @@ deploy() { echo "Deploying $KONG_NAME to namespace '$NAMESPACE' ..." local manifests_dir - if [[ "${PROLE_MODE:-}" == "k8s" ]]; then - manifests_dir="$PROLE_HOME/deploy/opentofu/k8s/manifests/prole" + if [[ "${KNOE_MODE:-}" == "k8s" ]]; then + manifests_dir="$KNOE_HOME/deploy/opentofu/k8s/manifests/knoe" else - manifests_dir="$PROLE_HOME/deploy/opentofu/k3s/manifests/prole" + manifests_dir="$KNOE_HOME/deploy/opentofu/k3s/manifests/knoe" fi # Determine whether the Deployment already exists before applying manifests. @@ -836,7 +836,7 @@ deploy() { # with the TCP health check. Matches etc/init_gitlab.sh's pattern for # gitlab-webservice-default. Additive annotation; survives manifest # re-applies (the YAML in deploy/opentofu/ doesn't set it). - if [[ "${PROLE_MODE:-}" == "k8s" ]]; then + if [[ "${KNOE_MODE:-}" == "k8s" ]]; then echo "Annotating Service ${KONG_NAME} with cloud.google.com/backend-config=${SVC_KNOE_BACKEND_CONFIG_NAME}..." kubectl -n "$NAMESPACE" annotate svc "$KONG_NAME" \ "cloud.google.com/backend-config={\"default\":\"${SVC_KNOE_BACKEND_CONFIG_NAME}\"}" \ diff --git a/etc/init_min.sh b/etc/init_min.sh index c2f5132..b951ed1 100644 --- a/etc/init_min.sh +++ b/etc/init_min.sh @@ -8,7 +8,7 @@ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" PROJECT_ROOT="$(cd "$SCRIPT_DIR/.." && pwd)" # shellcheck disable=SC1090 -source "$SCRIPT_DIR/prole_cfg.sh" +source "$SCRIPT_DIR/knoe_cfg.sh" log() { echo "==> $*"; } diff --git a/etc/init_monitoring.sh b/etc/init_monitoring.sh index bb05f18..789d051 100755 --- a/etc/init_monitoring.sh +++ b/etc/init_monitoring.sh @@ -10,25 +10,25 @@ set -euo pipefail SCRIPT_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) PROLE_ROOT=$(cd "$SCRIPT_DIR/.." && pwd) -# Load environment and config via prole_cfg.sh +# Load environment and config via knoe_cfg.sh # shellcheck disable=SC1090 -source "$SCRIPT_DIR/prole_cfg.sh" +source "$SCRIPT_DIR/knoe_cfg.sh" if [[ "${1:-}" == "--mode" || "${1:-}" == "-m" ]]; then - prole_set_mode "${2:-}" + knoe_set_mode "${2:-}" shift 2 elif [[ "${1:-}" == --mode=* || "${1:-}" == -m=* ]]; then - prole_set_mode "${1#*=}" + knoe_set_mode "${1#*=}" shift fi -if [[ -z "${PROLE_SERVICE:-}" ]]; then - echo "ERROR: PROLE_SERVICE is not defined. Provide PROLE_HOME/env.sh or ~/.prole/env.sh" >&2 +if [[ -z "${KNOE_SERVICE:-}" ]]; then + echo "ERROR: KNOE_SERVICE is not defined. Provide KNOE_HOME/env.sh or ~/.knoe/env.sh" >&2 exit 1 fi GRAFANA_RELEASE="grafana" -LEGACY_GRAFANA_RELEASE="grafana-prole" +LEGACY_GRAFANA_RELEASE="grafana-knoe" ts() { date "+%Y-%m-%d %H:%M:%S" @@ -88,7 +88,7 @@ default_storage_class() { monitoring_mode() { local mode - mode="${PROLE_MODE:-${DEPLOYMENT_MODE:-}}" + mode="${KNOE_MODE:-${DEPLOYMENT_MODE:-}}" mode=$(printf '%s' "$mode" | tr '[:upper:]' '[:lower:]') case "$mode" in gke|prod|k8s) @@ -117,9 +117,9 @@ choose_monitoring_storage_class() { echo "merlin-local-iscsi" return 0 fi - # Backward compatibility (older runs created prole-monitoring-) - if storage_class_exists "prole-monitoring-d004"; then - echo "prole-monitoring-d004" + # Backward compatibility (older runs created knoe-monitoring-) + if storage_class_exists "knoe-monitoring-d004"; then + echo "knoe-monitoring-d004" return 0 fi fi @@ -198,7 +198,7 @@ validate_monitoring_storage_classes() { } monitoring_nodes_available() { - kubectl get nodes -l "prole.org/node-role=general" -o name 2>/dev/null | grep -q . + kubectl get nodes -l "knoe.org/node-role=general" -o name 2>/dev/null | grep -q . } resolve_monitoring_primary_node() { @@ -207,11 +207,11 @@ resolve_monitoring_primary_node() { printf '%s' "${MONITORING_PRIMARY_NODE}" return 0 fi - if kubectl get node merlin.prole.org >/dev/null 2>&1; then - printf '%s' "merlin.prole.org" + if kubectl get node merlin.knoe.org >/dev/null 2>&1; then + printf '%s' "merlin.knoe.org" return 0 fi - node=$(kubectl get nodes -l "prole.org/node-role=general" -o jsonpath='{.items[0].metadata.name}' 2>/dev/null || true) + node=$(kubectl get nodes -l "knoe.org/node-role=general" -o jsonpath='{.items[0].metadata.name}' 2>/dev/null || true) if [[ -n "${node:-}" ]]; then printf '%s' "$node" return 0 @@ -222,7 +222,7 @@ resolve_monitoring_primary_node() { prepare_k3s_monitoring_data_dirs() { local node="$1" - # NOTE: Historically this came from prole.cfg. For now we pin it to the + # NOTE: Historically this came from knoe.cfg. For now we pin it to the # monitoring deployment default and allow overrides via env var. local base="${PROLE_MONITORING_DATA_DIR:-/synology/d004}" base="${base%/}" @@ -240,7 +240,7 @@ prepare_k3s_monitoring_data_dirs() { local job_ns job_name timeout image job_ns="${MONITORING_DIRPREP_NAMESPACE:-kube-system}" - job_name="${MONITORING_DIRPREP_JOB_NAME:-prole-monitoring-dirprep}" + job_name="${MONITORING_DIRPREP_JOB_NAME:-knoe-monitoring-dirprep}" timeout="${MONITORING_DIRPREP_TIMEOUT:-600s}" image="${MONITORING_DIRPREP_IMAGE:-alpine:3.20}" @@ -461,14 +461,14 @@ render_node_selector() { local indent="$1" cat </dev/null 2>&1 || true kubectl -n "$ns" create configmap knoe-db-grafana-dashboard --from-file=knoe-db.json="$tmp" --dry-run=client -o yaml > "$cm_yaml" - kubectl_retry -n "$ns" apply --server-side --field-manager=prole-init-monitoring --force-conflicts -f "$cm_yaml" >/dev/null + kubectl_retry -n "$ns" apply --server-side --field-manager=knoe-init-monitoring --force-conflicts -f "$cm_yaml" >/dev/null kubectl_retry -n "$ns" label configmap knoe-db-grafana-dashboard grafana_dashboard=1 --overwrite >/dev/null rm -f "$tmp" "$cm_yaml" @@ -706,12 +706,12 @@ apply_grafana_datasource() { apiVersion: v1 kind: ConfigMap metadata: - name: prole-grafana-datasource + name: knoe-grafana-datasource namespace: ${ns} labels: grafana_datasource: "1" data: - prole-prometheus-datasource.yaml: | + knoe-prometheus-datasource.yaml: | apiVersion: 1 datasources: - name: Prometheus @@ -723,7 +723,7 @@ data: editable: false EOF - kubectl_retry -n "$ns" apply --server-side --field-manager=prole-init-monitoring --force-conflicts -f "$cm_yaml" >/dev/null + kubectl_retry -n "$ns" apply --server-side --field-manager=knoe-init-monitoring --force-conflicts -f "$cm_yaml" >/dev/null rm -f "$cm_yaml" } @@ -973,17 +973,17 @@ openbao_url() { echo "$PROLE_OPENBAO_URL" return 0 fi - if prole_is_in_cluster; then + if knoe_is_in_cluster; then echo "http://openbao.${SERVICE_NAMESPACE:-${NAMESPACE:-default}}.svc.cluster.local:8200" return 0 fi # In k3s mode, scripts run outside the cluster must reach OpenBao via the k3s host # (never via localhost or kubectl port-forward). - if [[ "${PROLE_MODE:-${DEPLOYMENT_MODE:-}}" == "k3s" ]]; then - if command -v _prole_host_from_url >/dev/null 2>&1; then + if [[ "${KNOE_MODE:-${DEPLOYMENT_MODE:-}}" == "k3s" ]]; then + if command -v _knoe_host_from_url >/dev/null 2>&1; then local host - host=$(_prole_host_from_url "${PROLE_K3S_SERVER:-${K3S_SERVER_URL:-}}") + host=$(_knoe_host_from_url "${PROLE_K3S_SERVER:-${K3S_SERVER_URL:-}}") if [[ -n "${host:-}" ]]; then echo "http://${host}:8200" return 0 @@ -1002,8 +1002,8 @@ openbao_url() { } openbao_token() { - if [[ -f "$PROLE_SERVICE/secrets/openbao-root-token" ]]; then - cat "$PROLE_SERVICE/secrets/openbao-root-token" + if [[ -f "$KNOE_SERVICE/secrets/openbao-root-token" ]]; then + cat "$KNOE_SERVICE/secrets/openbao-root-token" else echo "${OPENBAO_ROOT_TOKEN:-}" fi @@ -1023,18 +1023,18 @@ fetch_openbao_secret() { } resolve_grafana_password() { - if [[ -z "${GRAFANA_ADMIN_PASSWORD:-}" || "${GRAFANA_ADMIN_PASSWORD}" == '${OPENBAO:'* || "${GRAFANA_ADMIN_PASSWORD}" == '${PROLE_SECRET:'* ]]; then + if [[ -z "${GRAFANA_ADMIN_PASSWORD:-}" || "${GRAFANA_ADMIN_PASSWORD}" == '${OPENBAO:'* || "${GRAFANA_ADMIN_PASSWORD}" == '${KNOE_SECRET:'* ]]; then local fetched - fetched=$(fetch_openbao_secret "prole/${NAMESPACE:-default}/monitoring" "grafana_admin_password") + fetched=$(fetch_openbao_secret "knoe/${NAMESPACE:-default}/monitoring" "grafana_admin_password") if [[ -n "$fetched" && "$fetched" != "null" ]]; then GRAFANA_ADMIN_PASSWORD="$fetched" fi fi - if [[ -z "${GRAFANA_ADMIN_PASSWORD:-}" || "${GRAFANA_ADMIN_PASSWORD}" == '${OPENBAO:'* || "${GRAFANA_ADMIN_PASSWORD}" == '${PROLE_SECRET:'* ]]; then + if [[ -z "${GRAFANA_ADMIN_PASSWORD:-}" || "${GRAFANA_ADMIN_PASSWORD}" == '${OPENBAO:'* || "${GRAFANA_ADMIN_PASSWORD}" == '${KNOE_SECRET:'* ]]; then local db_pw="${DB_PASSWORD:-}" - if [[ -z "$db_pw" || "$db_pw" == '${OPENBAO:'* || "$db_pw" == '${PROLE_SECRET:'* ]]; then + if [[ -z "$db_pw" || "$db_pw" == '${OPENBAO:'* || "$db_pw" == '${KNOE_SECRET:'* ]]; then local fetched_db - fetched_db=$(fetch_openbao_secret "prole/${NAMESPACE:-default}/db" "password") + fetched_db=$(fetch_openbao_secret "knoe/${NAMESPACE:-default}/db" "password") if [[ -n "$fetched_db" && "$fetched_db" != "null" ]]; then db_pw="$fetched_db" fi @@ -1044,7 +1044,7 @@ resolve_grafana_password() { fi fi # Strip any trailing newlines/carriage-returns that may have crept in via - # prole.cfg parsing, file reads, or shell substitution edge-cases. + # knoe.cfg parsing, file reads, or shell substitution edge-cases. local _pw _pw="${GRAFANA_ADMIN_PASSWORD:-}" _pw="${_pw//$'\n'/}" @@ -1063,7 +1063,7 @@ write_grafana_password_to_openbao() { _clean_grafana_pw="${GRAFANA_ADMIN_PASSWORD//$'\n'/}" _clean_grafana_pw="${_clean_grafana_pw//$'\r'/}" curl -sS -H "X-Vault-Token: $token" -H 'Content-Type: application/json' \ - -X POST "$url/v1/kv/data/prole/${NAMESPACE:-default}/monitoring" \ + -X POST "$url/v1/kv/data/knoe/${NAMESPACE:-default}/monitoring" \ -d "{\"data\":{\"grafana_admin_password\":\"$_clean_grafana_pw\"}}" >/dev/null || true } @@ -1124,14 +1124,14 @@ install_monitoring() { log "Helm release status: kps=$(helm_release_status kps "$monitoring_ns"), grafana=$(helm_release_status "$GRAFANA_RELEASE" "$monitoring_ns")" local mode - mode="${PROLE_MODE:-${DEPLOYMENT_MODE:-}}" + mode="${KNOE_MODE:-${DEPLOYMENT_MODE:-}}" # For k3s service clusters using local PVs, ensure the backing host directories # exist before applying StorageClass/PV manifests. apply_k3s_monitoring_local_pvs "$mode" if ! monitoring_nodes_available; then - err "No nodes labeled prole.org/node-role=general; monitoring requires general nodes." + err "No nodes labeled knoe.org/node-role=general; monitoring requires general nodes." return 2 fi @@ -1293,7 +1293,7 @@ $(render_tolerations " ") - key: kubernetes.io/hostname operator: NotIn values: - - pi.prole.org + - pi.knoe.org EOF local monitoring_helm_server_side @@ -1434,12 +1434,12 @@ EOF kubectl rollout restart deployment/kps-grafana -n "$monitoring_ns" 2>/dev/null || true kubectl rollout status deployment/kps-grafana -n "$monitoring_ns" --timeout=60s 2>/dev/null || true - log "Applying Prole Grafana dashboard..." + log "Applying Knoe Grafana dashboard..." apply_grafana_dashboard "$monitoring_ns" # Register port forwards - prole_register_port_forward "prometheus" "$monitoring_ns" "svc/kps-kube-prometheus-stack-prometheus" "9090" "9090" "127.0.0.1" "TCP" "Prometheus" - prole_register_port_forward "grafana" "$monitoring_ns" "svc/kps-grafana" "3000" "80" "0.0.0.0" "TCP" "Grafana" + knoe_register_port_forward "prometheus" "$monitoring_ns" "svc/kps-kube-prometheus-stack-prometheus" "9090" "9090" "127.0.0.1" "TCP" "Prometheus" + knoe_register_port_forward "grafana" "$monitoring_ns" "svc/kps-grafana" "3000" "80" "0.0.0.0" "TCP" "Grafana" } check_monitoring_status() { diff --git a/etc/init_nginx_ingress.sh b/etc/init_nginx_ingress.sh index 06bf571..b9f9392 100755 --- a/etc/init_nginx_ingress.sh +++ b/etc/init_nginx_ingress.sh @@ -3,7 +3,7 @@ set -euo pipefail SCRIPT_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) # shellcheck disable=SC1090 -source "$SCRIPT_DIR/prole_cfg.sh" +source "$SCRIPT_DIR/knoe_cfg.sh" usage() { cat </dev/null 2>&1; then - MODE=$(prole_normalize_mode "$MODE") +MODE="${MODE_OVERRIDE:-${KNOE_MODE:-${DEPLOYMENT_MODE:-${CLUSTER_ENV:-}}}}" +if command -v knoe_normalize_mode >/dev/null 2>&1; then + MODE=$(knoe_normalize_mode "$MODE") fi if [[ -n "$MODE" && "$MODE" != "k3d" ]]; then @@ -60,13 +60,13 @@ if [[ -n "$MODE" && "$MODE" != "k3d" ]]; then exit 0 fi -prole_ensure_kubeconfig >/dev/null 2>&1 || true +knoe_ensure_kubeconfig >/dev/null 2>&1 || true ensure_kube_context || exit 1 PORT_MAPPING_FILE_PATH="${PORT_MAPPING_FILE:-}" if [[ -z "$PORT_MAPPING_FILE_PATH" ]]; then - if [[ -n "${PROLE_CONF:-}" && -f "$PROLE_CONF/port-mapping.cfg" ]]; then - PORT_MAPPING_FILE_PATH="$PROLE_CONF/port-mapping.cfg" + if [[ -n "${KNOE_CONF:-}" && -f "$KNOE_CONF/port-mapping.cfg" ]]; then + PORT_MAPPING_FILE_PATH="$KNOE_CONF/port-mapping.cfg" elif [[ -f "$SCRIPT_DIR/../conf/port-mapping.cfg" ]]; then PORT_MAPPING_FILE_PATH="$SCRIPT_DIR/../conf/port-mapping.cfg" fi @@ -81,7 +81,7 @@ if [[ -z "$PORT_MAPPING_FILE_PATH" || ! -f "$PORT_MAPPING_FILE_PATH" ]]; then fi trim() { - _prole_trim "$1" + _knoe_trim "$1" } # Parse legacy conf/port-mapping.cfg style entries. diff --git a/etc/init_ollama.sh b/etc/init_ollama.sh index 0661fe4..b623da0 100644 --- a/etc/init_ollama.sh +++ b/etc/init_ollama.sh @@ -5,9 +5,9 @@ SCRIPT_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) PROJECT_ROOT=$(cd "$SCRIPT_DIR/.." && pwd) # Load config/environment defaults if available -if [[ -f "$SCRIPT_DIR/prole_cfg.sh" ]]; then +if [[ -f "$SCRIPT_DIR/knoe_cfg.sh" ]]; then # shellcheck disable=SC1090 - source "$SCRIPT_DIR/prole_cfg.sh" + source "$SCRIPT_DIR/knoe_cfg.sh" fi action="${1:-scan}" @@ -28,7 +28,7 @@ Usage: $0 [scan|configure] [options] Options: --host Explicit host (optionally host:port) --port Default port (default: ${DEFAULT_PORT}) - --hosts-file Hosts file to scan (default: PROLE_CONF/hosts.txt or etc/hosts.txt) + --hosts-file Hosts file to scan (default: KNOE_CONF/hosts.txt or etc/hosts.txt) --timeout Curl timeout (default: ${timeout}) --max-hosts Max hosts to probe (default: ${max_hosts}) --model Preferred model (configure action) @@ -150,8 +150,8 @@ if [[ -n "${OLLAMA_CANDIDATES:-}" ]]; then fi if [[ -z "$hosts_file" ]]; then - if [[ -n "${PROLE_CONF:-}" && -f "$PROLE_CONF/hosts.txt" ]]; then - hosts_file="$PROLE_CONF/hosts.txt" + if [[ -n "${KNOE_CONF:-}" && -f "$KNOE_CONF/hosts.txt" ]]; then + hosts_file="$KNOE_CONF/hosts.txt" elif [[ -f "$SCRIPT_DIR/hosts.txt" ]]; then hosts_file="$SCRIPT_DIR/hosts.txt" elif [[ -f "$PROJECT_ROOT/etc/hosts.txt" ]]; then diff --git a/etc/init_openbao.sh b/etc/init_openbao.sh index f582f77..e1ece01 100755 --- a/etc/init_openbao.sh +++ b/etc/init_openbao.sh @@ -31,13 +31,13 @@ unset _has_config _arg _default_cfg common_core_preparse_config "$@" # shellcheck disable=SC1090 -source "$SCRIPT_DIR/prole_cfg.sh" +source "$SCRIPT_DIR/knoe_cfg.sh" set -- "${COMMON_CORE_ARGS[@]}" common_core_parse_args "$@" -if [[ -z "${PROLE_MODE:-}" ]]; then - export PROLE_MODE="k3s" +if [[ -z "${KNOE_MODE:-}" ]]; then + export KNOE_MODE="k3s" fi if [[ "${COMMON_CORE_HELP:-0}" == 1 ]]; then @@ -56,8 +56,8 @@ ACTION="$COMMON_CORE_ACTION" NAMESPACE="$(common_core_resolve_namespace "default")" common_core_apply_namespace "$NAMESPACE" -if [[ -z "${PROLE_SERVICE:-}" ]]; then - echo "ERROR: PROLE_SERVICE is not defined. Provide PROLE_HOME/env.sh or ~/.prole/env.sh" >&2 +if [[ -z "${KNOE_SERVICE:-}" ]]; then + echo "ERROR: KNOE_SERVICE is not defined. Provide KNOE_HOME/env.sh or ~/.knoe/env.sh" >&2 exit 1 fi @@ -67,18 +67,18 @@ OPENBAO_IMAGE=${OPENBAO_IMAGE:-ghcr.io/openbao/openbao:latest} OPENBAO_PORT_FORWARD_LOCAL=${OPENBAO_PORT_FORWARD_LOCAL:-8200} OPENBAO_PF_ADDR="${OPENBAO_PF_ADDR:-}" if [[ -z "$OPENBAO_PF_ADDR" ]]; then - if [[ "${PROLE_MODE:-}" == "k3s" ]]; then + if [[ "${KNOE_MODE:-}" == "k3s" ]]; then OPENBAO_PF_ADDR="0.0.0.0" else OPENBAO_PF_ADDR="127.0.0.1" fi fi -# Support both PROLE_HOME/k8s and sibling k8s directory +# Support both KNOE_HOME/k8s and sibling k8s directory if [[ -d "$SCRIPT_DIR/../k8s/openbao" ]]; then OPENBAO_MANIFEST_DIR="$SCRIPT_DIR/../k8s/openbao" -elif [[ -n "${PROLE_HOME:-}" && -d "$PROLE_HOME/k8s/openbao" ]]; then - OPENBAO_MANIFEST_DIR="$PROLE_HOME/k8s/openbao" +elif [[ -n "${KNOE_HOME:-}" && -d "$KNOE_HOME/k8s/openbao" ]]; then + OPENBAO_MANIFEST_DIR="$KNOE_HOME/k8s/openbao" else OPENBAO_MANIFEST_DIR="$SCRIPT_DIR/../k8s/openbao" fi @@ -90,11 +90,11 @@ KRB5_KDC=${KRB5_KDC:-kdc.$DOMAIN} KRB5_ADMIN=${KRB5_ADMIN:-} # Secrets and token locations -# Use PROLE_SERVICE if writable locally, otherwise fallback to ~/.prole -if [[ -n "${PROLE_SERVICE:-}" ]] && _prole_usable_dir "${PROLE_SERVICE}/secrets" >/dev/null; then - SECRETS_DIR="$PROLE_SERVICE/secrets" +# Use KNOE_SERVICE if writable locally, otherwise fallback to ~/.knoe +if [[ -n "${KNOE_SERVICE:-}" ]] && _knoe_usable_dir "${KNOE_SERVICE}/secrets" >/dev/null; then + SECRETS_DIR="$KNOE_SERVICE/secrets" else - SECRETS_DIR="$HOME/.prole/etc/secrets" + SECRETS_DIR="$HOME/.knoe/etc/secrets" fi mkdir -p "$SECRETS_DIR" admin_key_priv="$SECRETS_DIR/admin_ed25519.key" @@ -103,13 +103,13 @@ root_token_file="$SECRETS_DIR/openbao-root-token" OPENBAO_NAMESPACE=${OPENBAO_NAMESPACE:-${SERVICE_NAMESPACE:-${NAMESPACE:-default}}} # OpenBao resources (StatefulSet/Service) live in `OPENBAO_NAMESPACE` (usually the service namespace), -# but secret *paths* must be keyed by the Prole workload namespace from the active config file so that -# `${OPENBAO:kv/prole//...}` references resolve consistently across scripts. +# but secret *paths* must be keyed by the Knoe workload namespace from the active config file so that +# `${OPENBAO:kv/knoe//...}` references resolve consistently across scripts. OPENBAO_PATH_NAMESPACE=${OPENBAO_PATH_NAMESPACE:-${PROLE_NAMESPACE:-${NAMESPACE:-default}}} OPENBAO_RESOURCE_NAMESPACE="$OPENBAO_NAMESPACE" BAO_NAMESPACE="${OPENBAO_PATH_NAMESPACE:-default}" -BAO_PATH_PREFIX="prole/${BAO_NAMESPACE}" +BAO_PATH_PREFIX="knoe/${BAO_NAMESPACE}" BAO_PATH_ADMIN="${BAO_PATH_PREFIX}/admin" BAO_PATH_USER="${BAO_PATH_PREFIX}/user" BAO_PATH_DB="${BAO_PATH_PREFIX}/db" @@ -228,14 +228,14 @@ bao_service_url() { return 0 fi - if [[ "${PROLE_MODE:-}" == "k3s" ]]; then - if prole_is_in_cluster; then + if [[ "${KNOE_MODE:-}" == "k3s" ]]; then + if knoe_is_in_cluster; then echo "http://openbao.${OPENBAO_RESOURCE_NAMESPACE}.svc.cluster.local:8200" return 0 fi # Use k3s server host if available local k3s_host - k3s_host=$(_prole_host_from_url "${PROLE_K3S_SERVER:-}") + k3s_host=$(_knoe_host_from_url "${PROLE_K3S_SERVER:-}") if [[ -n "$k3s_host" ]]; then echo "http://${k3s_host}:${OPENBAO_PORT_FORWARD_LOCAL:-8200}" return 0 @@ -283,7 +283,7 @@ EOF # Use PRIMARY_SERVICE_NAMESPACE if skipping deployment (we port-forward to the common svc) start_openbao_port_forward() { # In k3s mode we should never rely on local kubectl port-forwards. - if [[ "${PROLE_MODE:-}" == "k3s" ]]; then + if [[ "${KNOE_MODE:-}" == "k3s" ]]; then return 1 fi @@ -348,7 +348,7 @@ detect_openbao_root_token() { local file for file in "$OPENBAO_MANIFEST_DIR/deployment.yaml" \ "$OPENBAO_MANIFEST_DIR/statefulset.yaml" \ - "$SCRIPT_DIR/../k8s/prole/openbao-statefulset.yaml"; do + "$SCRIPT_DIR/../k8s/knoe/openbao-statefulset.yaml"; do if [[ -f "$file" ]]; then token=$(grep -Eo 'dev-root-token-id=[^" ]+' "$file" 2>/dev/null | head -n1 | cut -d= -f2 || true) if [[ -z "$token" ]]; then @@ -389,7 +389,7 @@ generate_kerberos_configmap() { apiVersion: v1 kind: ConfigMap metadata: - name: prole-krb5-conf + name: knoe-krb5-conf namespace: $OPENBAO_RESOURCE_NAMESPACE data: krb5.conf: | @@ -501,29 +501,29 @@ ensure_iscsi_pvs() { apply_k8s() { echo "Applying OpenBao manifest to namespace '$OPENBAO_RESOURCE_NAMESPACE' ..." local use_statefulset=0 - if [[ "${PROLE_MODE:-}" != "k3d" && -f "$SCRIPT_DIR/../k8s/prole/openbao-statefulset.yaml" ]]; then + if [[ "${KNOE_MODE:-}" != "k3d" && -f "$SCRIPT_DIR/../k8s/knoe/openbao-statefulset.yaml" ]]; then use_statefulset=1 fi if [[ "$use_statefulset" == "1" ]]; then # Ensure storage class and PVs exist for k3s (skipped on GKE/k8s — uses CSI provisioner) - if [[ "${PROLE_MODE:-}" != "k8s" ]]; then - if [[ -f "$SCRIPT_DIR/../k8s/prole/storageclass-synology-iscsi.yaml" ]]; then + if [[ "${KNOE_MODE:-}" != "k8s" ]]; then + if [[ -f "$SCRIPT_DIR/../k8s/knoe/storageclass-synology-iscsi.yaml" ]]; then echo "Applying StorageClass 'synology-iscsi' ..." - kubectl apply -f "$SCRIPT_DIR/../k8s/prole/storageclass-synology-iscsi.yaml" + kubectl apply -f "$SCRIPT_DIR/../k8s/knoe/storageclass-synology-iscsi.yaml" fi - if [[ -f "$SCRIPT_DIR/../k8s/prole/iscsi-pvs.yaml" ]]; then - ensure_iscsi_pvs "$SCRIPT_DIR/../k8s/prole/iscsi-pvs.yaml" + if [[ -f "$SCRIPT_DIR/../k8s/knoe/iscsi-pvs.yaml" ]]; then + ensure_iscsi_pvs "$SCRIPT_DIR/../k8s/knoe/iscsi-pvs.yaml" fi else echo "[GKE] Skipping Synology iSCSI StorageClass and PVs (not supported on GKE Autopilot; using CSI provisioner)." fi local output="" - if output=$(prole_render_manifest "$SCRIPT_DIR/../k8s/prole/openbao-statefulset.yaml" \ + if output=$(knoe_render_manifest "$SCRIPT_DIR/../k8s/knoe/openbao-statefulset.yaml" \ | kubectl apply --validate=false -n "$OPENBAO_RESOURCE_NAMESPACE" -f - 2>&1); then printf '%s\n' "$output" else - if [[ "${PROLE_MODE:-}" == "k3d" && "$output" == *"updates to statefulset spec"* ]]; then + if [[ "${KNOE_MODE:-}" == "k3d" && "$output" == *"updates to statefulset spec"* ]]; then echo "WARN: OpenBao StatefulSet immutable in k3d; skipping apply." elif [[ "$output" == *"updates to statefulset spec"* ]]; then # VolumeClaimTemplates are immutable; delete the StatefulSet (PVCs are orphaned/preserved) @@ -537,7 +537,7 @@ apply_k8s() { echo " Removing stale PVC 'data-openbao-0' (storageClass: $_pvc_sc) ..." kubectl delete pvc "data-openbao-0" -n "$OPENBAO_RESOURCE_NAMESPACE" --ignore-not-found >/dev/null 2>&1 || true fi - prole_render_manifest "$SCRIPT_DIR/../k8s/prole/openbao-statefulset.yaml" \ + knoe_render_manifest "$SCRIPT_DIR/../k8s/knoe/openbao-statefulset.yaml" \ | kubectl apply --validate=false -n "$OPENBAO_RESOURCE_NAMESPACE" -f - else echo "$output" >&2 @@ -545,16 +545,16 @@ apply_k8s() { fi fi # Always apply the Service manifest, then enforce the desired exposure mode. - prole_render_manifest "$SCRIPT_DIR/../k8s/prole/openbao-service.yaml" | kubectl apply --validate=false -n "$OPENBAO_RESOURCE_NAMESPACE" -f - + knoe_render_manifest "$SCRIPT_DIR/../k8s/knoe/openbao-service.yaml" | kubectl apply --validate=false -n "$OPENBAO_RESOURCE_NAMESPACE" -f - - if [[ "${PROLE_MODE:-}" == "k3s" ]]; then + if [[ "${KNOE_MODE:-}" == "k3s" ]]; then # Expose OpenBao externally in k3s (no kubectl port-forward). k3s `servicelb` will bind this # on the node, making it reachable from the installer host. kubectl patch svc "$OPENBAO_NAME" -n "$OPENBAO_RESOURCE_NAMESPACE" --type merge \ -p '{"spec":{"type":"LoadBalancer"}}' >/dev/null 2>&1 || true fi else - prole_render_manifest "$OPENBAO_MANIFEST_DIR/deployment.yaml" | kubectl apply --validate=false -n "$OPENBAO_RESOURCE_NAMESPACE" -f - + knoe_render_manifest "$OPENBAO_MANIFEST_DIR/deployment.yaml" | kubectl apply --validate=false -n "$OPENBAO_RESOURCE_NAMESPACE" -f - fi if should_apply_kerberos_configmap && [[ -f "$OPENBAO_MANIFEST_DIR/kerberos-configmap.yaml" ]]; then echo "Applying Kerberos ConfigMap (external realm) to namespace '$OPENBAO_RESOURCE_NAMESPACE' ..." @@ -563,7 +563,7 @@ apply_k8s() { } k3d_cleanup_pending_openbao_pvc() { - if [[ "${PROLE_MODE:-}" != "k3d" ]]; then + if [[ "${KNOE_MODE:-}" != "k3d" ]]; then return 0 fi if ! kubectl get pvc data-openbao-0 -n "$OPENBAO_RESOURCE_NAMESPACE" >/dev/null 2>&1; then @@ -582,7 +582,7 @@ k3d_cleanup_pending_openbao_pvc() { fi } -recycle_released_prole_iscsi_pv_for_pvc() { +recycle_released_knoe_iscsi_pv_for_pvc() { # StorageClass `synology-iscsi` uses `Retain` PV reclaim policy. On restart, PVs can remain # in `Released` with a stale `claimRef`, which prevents a same-named PVC from binding. local ns="$1" @@ -643,13 +643,13 @@ wait_for_openbao() { if kubectl get statefulset/$OPENBAO_NAME -n "$wait_ns" >/dev/null 2>&1; then if ! kubectl rollout status statefulset/$OPENBAO_NAME -n "$wait_ns" --timeout="$initial_timeout"; then echo "WARN: OpenBao not ready after $initial_timeout; checking for Released synology-iscsi PVs with stale claimRefs ..." >&2 - recycle_released_prole_iscsi_pv_for_pvc "$wait_ns" "data-openbao-0" || true + recycle_released_knoe_iscsi_pv_for_pvc "$wait_ns" "data-openbao-0" || true fi kubectl rollout status statefulset/$OPENBAO_NAME -n "$wait_ns" --timeout=${ROLLOUT_TIMEOUT:-300s} else if ! kubectl rollout status deploy/$OPENBAO_NAME -n "$wait_ns" --timeout="$initial_timeout"; then echo "WARN: OpenBao not ready after $initial_timeout; checking for Released synology-iscsi PVs with stale claimRefs ..." >&2 - recycle_released_prole_iscsi_pv_for_pvc "$wait_ns" "data-openbao-0" || true + recycle_released_knoe_iscsi_pv_for_pvc "$wait_ns" "data-openbao-0" || true fi kubectl rollout status deploy/$OPENBAO_NAME -n "$wait_ns" --timeout=${ROLLOUT_TIMEOUT:-300s} fi @@ -727,13 +727,13 @@ init_openbao_kv_and_store_admin_key() { fi # Store User SSH keys if they exist - local user_key_priv="$HOME/.ssh/id_prole_ed25519" - local user_key_pub="$HOME/.ssh/id_prole_ed25519.pub" + local user_key_priv="$HOME/.ssh/id_knoe_ed25519" + local user_key_pub="$HOME/.ssh/id_knoe_ed25519.pub" if [[ -f "$user_key_priv" && -f "$user_key_pub" ]]; then local u_priv u_pub u_priv=$(base64 <"$user_key_priv" | tr -d '\n') u_pub=$(base64 <"$user_key_pub" | tr -d '\n') - local username=${KNOE_DB_USER:-"prole"} + local username=${KNOE_DB_USER:-"knoe"} echo "Writing user SSH keys for '$username' to kv/$BAO_PATH_USER ..." curl -sS -H "X-Vault-Token: $token" -H 'Content-Type: application/json' \ @@ -743,7 +743,7 @@ init_openbao_kv_and_store_admin_key() { fi if [[ -n "$db_pass" ]]; then - local username=${KNOE_DB_USER:-"prole"} + local username=${KNOE_DB_USER:-"knoe"} echo "Writing database user password for '$username' to kv/$BAO_PATH_DB ..." curl -sS -H "X-Vault-Token: $token" -H 'Content-Type: application/json' \ -X POST "$svc/v1/kv/data/$BAO_PATH_DB" \ @@ -874,8 +874,8 @@ cmd_status() { ok=1 fi fi - if kubectl -n "$OPENBAO_RESOURCE_NAMESPACE" get configmap prole-krb5-conf >/dev/null 2>&1; then - echo "[OK] Kerberos ConfigMap 'prole-krb5-conf' present" + if kubectl -n "$OPENBAO_RESOURCE_NAMESPACE" get configmap knoe-krb5-conf >/dev/null 2>&1; then + echo "[OK] Kerberos ConfigMap 'knoe-krb5-conf' present" fi fi @@ -965,8 +965,8 @@ case "$ACTION" in if should_skip_deployment; then pf_ns="$PRIMARY_SERVICE_NAMESPACE" fi - if [[ "${PROLE_MODE:-}" != "k3s" ]]; then - prole_register_port_forward "openbao" "$pf_ns" "svc/openbao" "${OPENBAO_PORT_FORWARD_LOCAL}" "8200" "${OPENBAO_PF_ADDR}" "TCP" "OpenBao" + if [[ "${KNOE_MODE:-}" != "k3s" ]]; then + knoe_register_port_forward "openbao" "$pf_ns" "svc/openbao" "${OPENBAO_PORT_FORWARD_LOCAL}" "8200" "${OPENBAO_PF_ADDR}" "TCP" "OpenBao" fi ;; status) @@ -1016,7 +1016,7 @@ case "$ACTION" in fi ensure_admin_keypair - if [[ "${PROLE_MODE:-}" == "k3s" ]]; then + if [[ "${KNOE_MODE:-}" == "k3s" ]]; then # In k3s, initialize against the externally reachable endpoint (no port-forward). svc_url="$(bao_service_url)" wait_for_openbao_http 40 "$svc_url" @@ -1038,8 +1038,8 @@ case "$ACTION" in if should_skip_deployment; then pf_ns="$PRIMARY_SERVICE_NAMESPACE" fi - if [[ "${PROLE_MODE:-}" != "k3s" ]]; then - prole_register_port_forward "openbao" "$pf_ns" "svc/openbao" "${OPENBAO_PORT_FORWARD_LOCAL}" "8200" "${OPENBAO_PF_ADDR}" "TCP" "OpenBao" + if [[ "${KNOE_MODE:-}" != "k3s" ]]; then + knoe_register_port_forward "openbao" "$pf_ns" "svc/openbao" "${OPENBAO_PORT_FORWARD_LOCAL}" "8200" "${OPENBAO_PF_ADDR}" "TCP" "OpenBao" fi echo "Initialization complete. OpenBao available at $(bao_service_url)" ;; @@ -1062,8 +1062,8 @@ case "$ACTION" in if should_skip_deployment; then pf_ns="$PRIMARY_SERVICE_NAMESPACE" fi - if [[ "${PROLE_MODE:-}" != "k3s" ]]; then - prole_register_port_forward "openbao" "$pf_ns" "svc/openbao" "${OPENBAO_PORT_FORWARD_LOCAL}" "8200" "${OPENBAO_PF_ADDR}" "TCP" "OpenBao" + if [[ "${KNOE_MODE:-}" != "k3s" ]]; then + knoe_register_port_forward "openbao" "$pf_ns" "svc/openbao" "${OPENBAO_PORT_FORWARD_LOCAL}" "8200" "${OPENBAO_PF_ADDR}" "TCP" "OpenBao" fi echo "Re-applied manifests." ;; diff --git a/etc/init_opentofu.sh b/etc/init_opentofu.sh index a5ee671..e33689b 100755 --- a/etc/init_opentofu.sh +++ b/etc/init_opentofu.sh @@ -5,7 +5,7 @@ set -euo pipefail # init_opentofu.sh # Purpose: # - Deploy OpenTofu control plane into Kubernetes -# - Configure admin access using the Prole DB root password +# - Configure admin access using the Knoe DB root password SCRIPT_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) @@ -16,7 +16,7 @@ source "$SCRIPT_DIR/common_core_lib.sh" common_core_preparse_config "$@" # shellcheck disable=SC1090 -source "$SCRIPT_DIR/prole_cfg.sh" +source "$SCRIPT_DIR/knoe_cfg.sh" set -- "${COMMON_CORE_ARGS[@]}" common_core_parse_args "$@" @@ -36,8 +36,8 @@ ACTION="$COMMON_CORE_ACTION" NAMESPACE="$(common_core_resolve_namespace "default")" common_core_apply_namespace "$NAMESPACE" -if [[ -z "${PROLE_SERVICE:-}" ]]; then - echo "ERROR: PROLE_SERVICE is not defined. Provide PROLE_HOME/env.sh or ~/.prole/env.sh" >&2 +if [[ -z "${KNOE_SERVICE:-}" ]]; then + echo "ERROR: KNOE_SERVICE is not defined. Provide KNOE_HOME/env.sh or ~/.knoe/env.sh" >&2 exit 1 fi @@ -47,8 +47,8 @@ OPENTOFU_ADMIN_PASSWORD_SOURCE=${OPENTOFU_ADMIN_PASSWORD_SOURCE:-} if [[ -d "$SCRIPT_DIR/../k8s/opentofu" ]]; then OPENTOFU_MANIFEST_DIR="$SCRIPT_DIR/../k8s/opentofu" -elif [[ -n "${PROLE_HOME:-}" && -d "$PROLE_HOME/k8s/opentofu" ]]; then - OPENTOFU_MANIFEST_DIR="$PROLE_HOME/k8s/opentofu" +elif [[ -n "${KNOE_HOME:-}" && -d "$KNOE_HOME/k8s/opentofu" ]]; then + OPENTOFU_MANIFEST_DIR="$KNOE_HOME/k8s/opentofu" else OPENTOFU_MANIFEST_DIR="$SCRIPT_DIR/../k8s/opentofu" fi @@ -75,17 +75,17 @@ openbao_url() { echo "$PROLE_OPENBAO_URL" return 0 fi - if prole_is_in_cluster; then + if knoe_is_in_cluster; then echo "http://openbao.${OPENTOFU_OPENBAO_NAMESPACE}.svc.cluster.local:8200" return 0 fi # In k3s mode, scripts run outside the cluster must reach OpenBao via the k3s host # (never via localhost or kubectl port-forward). - if [[ "${PROLE_MODE:-${DEPLOYMENT_MODE:-}}" == "k3s" ]]; then - if command -v _prole_host_from_url >/dev/null 2>&1; then + if [[ "${KNOE_MODE:-${DEPLOYMENT_MODE:-}}" == "k3s" ]]; then + if command -v _knoe_host_from_url >/dev/null 2>&1; then local host - host=$(_prole_host_from_url "${PROLE_K3S_SERVER:-${K3S_SERVER_URL:-}}") + host=$(_knoe_host_from_url "${PROLE_K3S_SERVER:-${K3S_SERVER_URL:-}}") if [[ -n "${host:-}" ]]; then echo "http://${host}:8200" return 0 @@ -104,8 +104,8 @@ openbao_url() { } openbao_token() { - if [[ -f "$PROLE_SERVICE/secrets/openbao-root-token" ]]; then - cat "$PROLE_SERVICE/secrets/openbao-root-token" + if [[ -f "$KNOE_SERVICE/secrets/openbao-root-token" ]]; then + cat "$KNOE_SERVICE/secrets/openbao-root-token" else echo "${OPENBAO_ROOT_TOKEN:-}" fi @@ -126,7 +126,7 @@ fetch_openbao_secret() { is_anchor() { case "${1:-}" in - '${OPENBAO:'*|'${PROLE_SECRET:'*) return 0 ;; + '${OPENBAO:'*|'${KNOE_SECRET:'*) return 0 ;; *) return 1 ;; esac } @@ -149,7 +149,7 @@ resolve_admin_password() { if [[ -z "${OPENTOFU_ADMIN_PASSWORD:-}" ]] || is_anchor "${OPENTOFU_ADMIN_PASSWORD:-}"; then local fetched - fetched=$(fetch_openbao_secret "prole/${OPENTOFU_SECRET_NAMESPACE:-default}/db" "password") + fetched=$(fetch_openbao_secret "knoe/${OPENTOFU_SECRET_NAMESPACE:-default}/db" "password") if [[ -n "$fetched" && "$fetched" != "null" ]]; then OPENTOFU_ADMIN_PASSWORD="$fetched" OPENTOFU_ADMIN_PASSWORD_SOURCE="openbao" @@ -171,8 +171,8 @@ resolve_admin_password() { # Last resort: generate a temporary password (will be overwritten later when user input becomes available). if [[ -z "${OPENTOFU_ADMIN_PASSWORD:-}" ]]; then - if declare -F prole_generate_password >/dev/null 2>&1; then - OPENTOFU_ADMIN_PASSWORD="$(prole_generate_password 32)" + if declare -F knoe_generate_password >/dev/null 2>&1; then + OPENTOFU_ADMIN_PASSWORD="$(knoe_generate_password 32)" else OPENTOFU_ADMIN_PASSWORD="$(openssl rand -base64 24 2>/dev/null | tr -d '\n' | tr '+/' '-_' | tr -d '=' | head -c 32)" fi @@ -244,7 +244,7 @@ ensure_opentofu_secret() { apply_k8s() { echo "Applying OpenTofu manifest to namespace '$OPENTOFU_NAMESPACE' ..." - prole_render_manifest "$OPENTOFU_MANIFEST_DIR/deployment.yaml" | kubectl apply -n "$OPENTOFU_NAMESPACE" -f - + knoe_render_manifest "$OPENTOFU_MANIFEST_DIR/deployment.yaml" | kubectl apply -n "$OPENTOFU_NAMESPACE" -f - kubectl rollout status deploy/$OPENTOFU_NAME -n "$OPENTOFU_NAMESPACE" --timeout=${ROLLOUT_TIMEOUT:-300s} || true } @@ -283,7 +283,7 @@ case "${ACTION:-}" in ensure_opentofu_secret fi apply_k8s - prole_register_port_forward "opentofu" "${OPENTOFU_NAMESPACE:-default}" "svc/opentofu" "8080" "8080" "0.0.0.0" "TCP" "OpenTofu" + knoe_register_port_forward "opentofu" "${OPENTOFU_NAMESPACE:-default}" "svc/opentofu" "8080" "8080" "0.0.0.0" "TCP" "OpenTofu" ;; stop) ensure_tools diff --git a/etc/init_port_forwards.sh b/etc/init_port_forwards.sh index fb04073..82278a3 100755 --- a/etc/init_port_forwards.sh +++ b/etc/init_port_forwards.sh @@ -9,9 +9,9 @@ PROG="init_port_forwards" SCRIPT_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) # shellcheck disable=SC1090 -source "$SCRIPT_DIR/prole_cfg.sh" +source "$SCRIPT_DIR/knoe_cfg.sh" -PROLE_HOME="${PROLE_HOME:-$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)}" +KNOE_HOME="${KNOE_HOME:-$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)}" VERBOSE=0 PROLE_CFG_OVERRIDE="" PORT_MAPPING_FILE_PATH="" @@ -61,16 +61,16 @@ have() { command -v "$1" >/dev/null 2>&1; } # ---- Config helpers / derived defaults ---- cfg_file() { local cfg="" - if declare -F _prole_cfg_select_cfg_file >/dev/null 2>&1; then - if [ -n "${PROLE_CONF:-}" ]; then - cfg="$(_prole_cfg_select_cfg_file "$PROLE_CONF")" + if declare -F _knoe_cfg_select_cfg_file >/dev/null 2>&1; then + if [ -n "${KNOE_CONF:-}" ]; then + cfg="$(_knoe_cfg_select_cfg_file "$KNOE_CONF")" if [ -n "$cfg" ]; then printf '%s' "$cfg" return 0 fi fi - if [ -n "${PROLE_HOME:-}" ]; then - cfg="$(_prole_cfg_select_cfg_file "$PROLE_HOME/conf")" + if [ -n "${KNOE_HOME:-}" ]; then + cfg="$(_knoe_cfg_select_cfg_file "$KNOE_HOME/conf")" if [ -n "$cfg" ]; then printf '%s' "$cfg" return 0 @@ -138,7 +138,7 @@ host_in_allowlist() { port_forward_allowed_on_host() { local allow="" - case "${PROLE_MODE:-}" in + case "${KNOE_MODE:-}" in k3s) allow="${PORT_FORWARD_K3S_HOSTS:-${PORT_FORWARD_HOSTS:-}}" ;; k3d|"") allow="${PORT_FORWARD_K3D_HOSTS:-${PORT_FORWARD_HOSTS:-}}" ;; *) allow="${PORT_FORWARD_HOSTS:-}" ;; @@ -166,19 +166,19 @@ resolve_port_mapping_file() { printf '%s' "$PORT_MAPPING_FILE" return 0 fi - if [ -n "${PROLE_CONF:-}" ]; then - printf '%s/port-mapping.cfg' "$PROLE_CONF" + if [ -n "${KNOE_CONF:-}" ]; then + printf '%s/port-mapping.cfg' "$KNOE_CONF" return 0 fi - if [ -n "${PROLE_HOME:-}" ]; then - printf '%s/conf/port-mapping.cfg' "$PROLE_HOME" + if [ -n "${KNOE_HOME:-}" ]; then + printf '%s/conf/port-mapping.cfg' "$KNOE_HOME" return 0 fi return 1 } mapping_prefix_for_mode() { - case "${PROLE_MODE:-}" in + case "${KNOE_MODE:-}" in k3s) printf '%s' "PORT_FORWARD_K3S_MAPPING_" ;; k3d|"") printf '%s' "PORT_FORWARD_K3D_MAPPING_" ;; *) printf '%s' "PORT_FORWARD_MAPPING_" ;; @@ -285,7 +285,7 @@ parse_cfg_mapping() { generate_port_mapping_file() { local src_cfg="$1" local dst_cfg="$2" - [ -f "$src_cfg" ] || { err "Prole config file not found: $src_cfg"; return 1; } + [ -f "$src_cfg" ] || { err "Knoe config file not found: $src_cfg"; return 1; } local dst_dir dst_dir="$(dirname "$dst_cfg")" mkdir -p "$dst_dir" >/dev/null 2>&1 || true @@ -329,7 +329,7 @@ ensure_port_mapping_file() { fi if [ -z "$src_cfg" ] || [ ! -f "$src_cfg" ]; then err "Port mapping file not found: $dst_cfg" - err "No prole.cfg available to generate it." + err "No knoe.cfg available to generate it." return 1 fi log "Port mapping file not found; generating $dst_cfg from $src_cfg" @@ -338,7 +338,7 @@ ensure_port_mapping_file() { port_forward_enabled_for_mode() { local val="" - case "${PROLE_MODE:-}" in + case "${KNOE_MODE:-}" in k3s) val="${PORT_FORWARD_K3S_ENABLED:-${PORT_FORWARD_ENABLED:-}}" ;; k3d|"") val="${PORT_FORWARD_K3D_ENABLED:-${PORT_FORWARD_ENABLED:-}}" ;; *) val="${PORT_FORWARD_ENABLED:-}" ;; @@ -624,7 +624,7 @@ ensure_k3d_ready_if_applicable() { } is_local_mode() { - case "${PROLE_MODE:-}" in + case "${KNOE_MODE:-}" in ""|k3d) return 0 ;; esac return 1 @@ -968,7 +968,7 @@ scan_for_collisions() { do_start() { if ! port_forward_enabled_for_mode; then - log "Port forwards disabled for mode '${PROLE_MODE:-auto}'." + log "Port forwards disabled for mode '${KNOE_MODE:-auto}'." return 0 fi if ! port_forward_allowed_on_host; then @@ -985,12 +985,12 @@ do_start() { vlog "Scanning for port collisions..." if ! foreach_mapping scan_for_collisions; then - err "No port-forward mappings found. Check ${CFG_FILE:-prole.cfg} or ${PORT_MAPPING_FILE_PATH:-port-mapping.cfg}." + err "No port-forward mappings found. Check ${CFG_FILE:-knoe.cfg} or ${PORT_MAPPING_FILE_PATH:-port-mapping.cfg}." exit 1 fi if ! foreach_mapping start_port_forward; then - err "No port-forward mappings started. Check ${CFG_FILE:-prole.cfg} or ${PORT_MAPPING_FILE_PATH:-port-mapping.cfg}." + err "No port-forward mappings started. Check ${CFG_FILE:-knoe.cfg} or ${PORT_MAPPING_FILE_PATH:-port-mapping.cfg}." exit 1 fi } @@ -1005,7 +1005,7 @@ do_stop() { do_restart() { if ! port_forward_enabled_for_mode; then - log "Port forwards disabled for mode '${PROLE_MODE:-auto}'." + log "Port forwards disabled for mode '${KNOE_MODE:-auto}'." return 0 fi if ! port_forward_allowed_on_host; then @@ -1023,15 +1023,15 @@ do_restart() { vlog "Scanning for port collisions (excluding our own)..." # During restart, we'll stop them first anyway, but let's be safe. if ! foreach_mapping stop_port_forward; then - err "No port-forward mappings found. Check ${CFG_FILE:-prole.cfg} or ${PORT_MAPPING_FILE_PATH:-port-mapping.cfg}." + err "No port-forward mappings found. Check ${CFG_FILE:-knoe.cfg} or ${PORT_MAPPING_FILE_PATH:-port-mapping.cfg}." exit 1 fi if ! foreach_mapping scan_for_collisions; then - err "No port-forward mappings found. Check ${CFG_FILE:-prole.cfg} or ${PORT_MAPPING_FILE_PATH:-port-mapping.cfg}." + err "No port-forward mappings found. Check ${CFG_FILE:-knoe.cfg} or ${PORT_MAPPING_FILE_PATH:-port-mapping.cfg}." exit 1 fi if ! foreach_mapping start_port_forward; then - err "No port-forward mappings started. Check ${CFG_FILE:-prole.cfg} or ${PORT_MAPPING_FILE_PATH:-port-mapping.cfg}." + err "No port-forward mappings started. Check ${CFG_FILE:-knoe.cfg} or ${PORT_MAPPING_FILE_PATH:-port-mapping.cfg}." exit 1 fi } @@ -1115,11 +1115,11 @@ while [ $# -gt 0 ]; do ;; -m|--mode) shift - prole_set_mode "${1:-}" + knoe_set_mode "${1:-}" shift ;; -m=*|--mode=*) - prole_set_mode "${1#*=}" + knoe_set_mode "${1#*=}" shift ;; -v|--verbose) @@ -1159,8 +1159,8 @@ done if [ -n "$PROLE_CFG_OVERRIDE" ]; then CFG_FILE="$PROLE_CFG_OVERRIDE" if [ -f "$CFG_FILE" ]; then - PROLE_CONF="$(cd "$(dirname "$CFG_FILE")" && pwd)" - export PROLE_CONF + KNOE_CONF="$(cd "$(dirname "$CFG_FILE")" && pwd)" + export KNOE_CONF fi fi if [ -z "${CFG_FILE:-}" ]; then diff --git a/etc/init_postgrest.sh b/etc/init_postgrest.sh index f9d4a8d..f202d00 100755 --- a/etc/init_postgrest.sh +++ b/etc/init_postgrest.sh @@ -11,13 +11,13 @@ set -euo pipefail # ./init_postgrest.sh [--mode MODE] [-n NAMESPACE] SCRIPT_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) # shellcheck disable=SC1090 -source "$SCRIPT_DIR/prole_cfg.sh" +source "$SCRIPT_DIR/knoe_cfg.sh" if [[ "${1:-}" == "--mode" || "${1:-}" == "-m" ]]; then - prole_set_mode "${2:-}" + knoe_set_mode "${2:-}" shift 2 elif [[ "${1:-}" == --mode=* || "${1:-}" == -m=* ]]; then - prole_set_mode "${1#*=}" + knoe_set_mode "${1#*=}" shift fi @@ -51,7 +51,7 @@ while [[ $# -gt 0 ]]; do done ACTION="${ACTION:-start}" -PROLE_HOME=${PROLE_HOME:-$(cd "$SCRIPT_DIR/.." && pwd)} +KNOE_HOME=${KNOE_HOME:-$(cd "$SCRIPT_DIR/.." && pwd)} POSTGREST_IMAGE="${POSTGREST_IMAGE:-postgrest/postgrest:v14.5}" POSTGREST_NAME="${POSTGREST_NAME:-knoe-db-postgrest}" POSTGREST_PORT="${POSTGREST_PORT:-3000}" @@ -94,7 +94,7 @@ resolve_postgres_password() { fi if [[ -z "$pw" ]]; then - # Fallback: check for POSTGRES_PASSWORD env var or prole.cfg + # Fallback: check for POSTGRES_PASSWORD env var or knoe.cfg pw="${POSTGRES_PASSWORD:-}" fi @@ -221,7 +221,7 @@ check_and_repair_pods() { deploy() { echo "Deploying $POSTGREST_NAME to namespace '$NAMESPACE' ..." - local manifests_dir="$PROLE_HOME/deploy/opentofu/k3s/manifests/prole" + local manifests_dir="$KNOE_HOME/deploy/opentofu/k3s/manifests/knoe" kubectl apply -f "$manifests_dir/postgrest-deployment.yaml" -n "$NAMESPACE" kubectl apply -f "$manifests_dir/postgrest-service.yaml" -n "$NAMESPACE" diff --git a/etc/init_redis.sh b/etc/init_redis.sh index 98903a1..f21e1c4 100755 --- a/etc/init_redis.sh +++ b/etc/init_redis.sh @@ -31,13 +31,13 @@ unset _has_config _arg _default_cfg common_core_preparse_config "$@" # shellcheck disable=SC1090 -source "$SCRIPT_DIR/prole_cfg.sh" +source "$SCRIPT_DIR/knoe_cfg.sh" set -- "${COMMON_CORE_ARGS[@]}" common_core_parse_args "$@" -if [[ -z "${PROLE_MODE:-}" ]]; then - export PROLE_MODE="k3s" +if [[ -z "${KNOE_MODE:-}" ]]; then + export KNOE_MODE="k3s" fi if [[ "${COMMON_CORE_HELP:-0}" == 1 ]]; then diff --git a/etc/init_registry.sh b/etc/init_registry.sh index 787a491..cf9e437 100755 --- a/etc/init_registry.sh +++ b/etc/init_registry.sh @@ -29,16 +29,16 @@ unset _has_config _arg _default_cfg common_core_preparse_config "$@" -# Remove -c/--config from the remaining args now that PROLE_CONF is set. +# Remove -c/--config from the remaining args now that KNOE_CONF is set. # `common_core_preparse_config` exposes the stripped args as `COMMON_CORE_ARGS`. set -- "${COMMON_CORE_ARGS[@]}" -# Load environment and config via prole_cfg.sh +# Load environment and config via knoe_cfg.sh # shellcheck disable=SC1090 -source "$SCRIPT_DIR/prole_cfg.sh" +source "$SCRIPT_DIR/knoe_cfg.sh" -if [[ -z "${PROLE_SERVICE:-}" ]]; then - echo "ERROR: PROLE_SERVICE is not defined. Provide PROLE_HOME/env.sh or ~/.prole/env.sh" >&2 +if [[ -z "${KNOE_SERVICE:-}" ]]; then + echo "ERROR: KNOE_SERVICE is not defined. Provide KNOE_HOME/env.sh or ~/.knoe/env.sh" >&2 exit 1 fi @@ -48,8 +48,8 @@ REGISTRY_NAMESPACE_OVERRIDE="" if [[ -d "$SCRIPT_DIR/../k8s/registry" ]]; then REGISTRY_MANIFEST_DIR="$SCRIPT_DIR/../k8s/registry" -elif [[ -n "${PROLE_HOME:-}" && -d "$PROLE_HOME/k8s/registry" ]]; then - REGISTRY_MANIFEST_DIR="$PROLE_HOME/k8s/registry" +elif [[ -n "${KNOE_HOME:-}" && -d "$KNOE_HOME/k8s/registry" ]]; then + REGISTRY_MANIFEST_DIR="$KNOE_HOME/k8s/registry" else REGISTRY_MANIFEST_DIR="$SCRIPT_DIR/../k8s/registry" fi @@ -81,10 +81,10 @@ while [[ $# -gt 0 ]]; do case "$1" in -m|--mode) shift - prole_set_mode "${1:-}" + knoe_set_mode "${1:-}" ;; -m=*|--mode=*) - prole_set_mode "${1#*=}" + knoe_set_mode "${1#*=}" ;; -n|--namespace) shift @@ -135,24 +135,24 @@ elif [[ -n "$NAMESPACE_OVERRIDE" ]]; then elif [[ -n "${REGISTRY_NAMESPACE:-}" ]]; then REGISTRY_NAMESPACE="$REGISTRY_NAMESPACE" else - # Default to the configured service namespace (driven by prole.cfg via prole_cfg.sh). + # Default to the configured service namespace (driven by knoe.cfg via knoe_cfg.sh). REGISTRY_NAMESPACE="${SERVICE_NAMESPACE:-${PROLE_NAMESPACE:-}}" if [[ -z "$REGISTRY_NAMESPACE" ]]; then - echo "ERROR: REGISTRY_NAMESPACE could not be determined. Set SERVICE_NAMESPACE in prole.cfg or pass -n/--namespace." >&2 + echo "ERROR: REGISTRY_NAMESPACE could not be determined. Set SERVICE_NAMESPACE in knoe.cfg or pass -n/--namespace." >&2 exit 1 fi fi # In k3s mode, the in-cluster registry is a common core service and should live # in the common services namespace. -_mode_resolved="${PROLE_MODE:-${DEPLOYMENT_MODE:-}}" -if declare -F prole_normalize_mode >/dev/null 2>&1; then - _mode_resolved="$(prole_normalize_mode "$_mode_resolved")" +_mode_resolved="${KNOE_MODE:-${DEPLOYMENT_MODE:-}}" +if declare -F knoe_normalize_mode >/dev/null 2>&1; then + _mode_resolved="$(knoe_normalize_mode "$_mode_resolved")" fi if [[ "$_mode_resolved" == "k3s" && -z "${REGISTRY_NAMESPACE:-}" ]]; then REGISTRY_NAMESPACE="${SERVICE_NAMESPACE:-${PROLE_NAMESPACE:-}}" if [[ -z "$REGISTRY_NAMESPACE" ]]; then - echo "ERROR: REGISTRY_NAMESPACE could not be determined for k3s mode. Set SERVICE_NAMESPACE in prole.cfg or pass -n/--namespace." >&2 + echo "ERROR: REGISTRY_NAMESPACE could not be determined for k3s mode. Set SERVICE_NAMESPACE in knoe.cfg or pass -n/--namespace." >&2 exit 1 fi fi @@ -162,11 +162,11 @@ export REGISTRY_NAMESPACE REGISTRY_NODE_SELECTOR=${REGISTRY_NODE_SELECTOR:-} current_mode() { - if command -v prole_normalize_mode >/dev/null 2>&1; then - prole_normalize_mode "${PROLE_MODE:-${DEPLOYMENT_MODE:-}}" + if command -v knoe_normalize_mode >/dev/null 2>&1; then + knoe_normalize_mode "${KNOE_MODE:-${DEPLOYMENT_MODE:-}}" return 0 fi - printf '%s' "${PROLE_MODE:-${DEPLOYMENT_MODE:-}}" + printf '%s' "${KNOE_MODE:-${DEPLOYMENT_MODE:-}}" } registry_enabled() { @@ -189,7 +189,7 @@ resolve_registry_node_selector() { return 0 fi # Default: pin to the control-plane node so hostPort:5000 is reachable via - # the k3s server host (e.g. myrddin.prole.org:5000). + # the k3s server host (e.g. myrddin.knoe.org:5000). resolve_control_plane_node_selector } @@ -230,7 +230,7 @@ render_registry_manifest() { echo "ERROR: Registry manifest not found: $REGISTRY_MANIFEST_FILE" >&2 exit 1 fi - prole_render_manifest "$REGISTRY_MANIFEST_FILE" + knoe_render_manifest "$REGISTRY_MANIFEST_FILE" } cleanup_registry_k8s() { @@ -239,7 +239,7 @@ cleanup_registry_k8s() { configure_k3d_insecure_registry() { local cluster_name="${1:-knoe-dev-cluster}" - local reg_host="k3d-prole-registry" + local reg_host="k3d-knoe-registry" local reg_port="5000" local registries_yaml registries_yaml=$(cat </dev/null 2>&1 || return 0 @@ -342,23 +342,23 @@ apply_registry() { mode=$(current_mode) if [[ "$mode" == "k3d" ]]; then if command -v k3d >/dev/null 2>&1; then - echo "Ensuring k3d registry 'prole-registry' on port 5000 ..." - if ! k3d registry list prole-registry >/dev/null 2>&1; then - k3d registry create prole-registry --port 5000 || true + echo "Ensuring k3d registry 'knoe-registry' on port 5000 ..." + if ! k3d registry list knoe-registry >/dev/null 2>&1; then + k3d registry create knoe-registry --port 5000 || true fi local cluster_name cluster_name=$(resolve_k3d_cluster_name) if k3d cluster list "$cluster_name" >/dev/null 2>&1; then - echo "Connecting prole-registry to $cluster_name ..." + echo "Connecting knoe-registry to $cluster_name ..." # k3d v5+ uses 'k3d-NAME' as container name for registries - local reg_container="k3d-prole-registry" + local reg_container="k3d-knoe-registry" local net_name net_name=$(resolve_k3d_network_name "$cluster_name") if command -v docker >/dev/null 2>&1; then if [[ -n "${net_name:-}" ]] && docker inspect "$reg_container" >/dev/null 2>&1 && docker network inspect "$net_name" >/dev/null 2>&1; then if ! docker inspect "$reg_container" -f '{{json .NetworkSettings.Networks}}' | grep -q "$net_name"; then # Ensure the registry is reachable at the stable hostname used in manifests. - docker network connect --alias k3d-prole-registry "$net_name" "$reg_container" || true + docker network connect --alias k3d-knoe-registry "$net_name" "$reg_container" || true fi fi fi @@ -367,10 +367,10 @@ apply_registry() { configure_k3d_insecure_registry "$cluster_name" # Validate registry DNS from a node so image pulls won't fail later. - ensure_k3d_registry_dns "$cluster_name" "k3d-prole-registry" || true + ensure_k3d_registry_dns "$cluster_name" "k3d-knoe-registry" || true # Ensure no k8s registry resources remain in k3d clusters. - echo "Removing k8s registry resources (k3d uses k3d-prole-registry only) ..." + echo "Removing k8s registry resources (k3d uses k3d-knoe-registry only) ..." cleanup_registry_k8s return 0 else @@ -381,15 +381,15 @@ apply_registry() { # Fallback or k3s mode: use Docker container if k8s deploy fails or as alternative if [[ "$mode" == "k3d" ]] || [[ "${PROLE_REGISTRY_STANDALONE:-}" == "1" ]]; then if command -v docker >/dev/null 2>&1; then - if ! docker ps --format '{{.Names}}' | grep -q "^prole-registry$"; then - if docker ps -a --format '{{.Names}}' | grep -q "^prole-registry$"; then - docker start prole-registry || true + if ! docker ps --format '{{.Names}}' | grep -q "^knoe-registry$"; then + if docker ps -a --format '{{.Names}}' | grep -q "^knoe-registry$"; then + docker start knoe-registry || true else - docker run -d -p 5000:5000 --restart always --name prole-registry registry:2 || true + docker run -d -p 5000:5000 --restart always --name knoe-registry registry:2 || true fi fi if [[ "$mode" == "k3d" ]]; then - echo "Removing k8s registry resources (k3d uses k3d-prole-registry only) ..." + echo "Removing k8s registry resources (k3d uses k3d-knoe-registry only) ..." cleanup_registry_k8s fi return 0 @@ -421,7 +421,7 @@ apply_registry() { fi echo "Applying registry manifest to namespace '$REGISTRY_NAMESPACE' ..." - render_registry_manifest | kubectl apply --server-side --force-conflicts --field-manager=prole-installer --validate=false -n "$REGISTRY_NAMESPACE" -f - + render_registry_manifest | kubectl apply --server-side --force-conflicts --field-manager=knoe-installer --validate=false -n "$REGISTRY_NAMESPACE" -f - apply_registry_node_selector kubectl rollout status deploy/registry -n "$REGISTRY_NAMESPACE" --timeout=${ROLLOUT_TIMEOUT:-300s} || true } @@ -431,8 +431,8 @@ delete_registry() { mode=$(current_mode) if [[ "$mode" == "k3d" ]]; then if command -v k3d >/dev/null 2>&1; then - echo "Removing k3d registry 'prole-registry' ..." - k3d registry delete prole-registry || true + echo "Removing k3d registry 'knoe-registry' ..." + k3d registry delete knoe-registry || true fi echo "Removing registry resources from namespace '$REGISTRY_NAMESPACE' ..." render_registry_manifest | kubectl delete -n "$REGISTRY_NAMESPACE" -f - --ignore-not-found >/dev/null 2>&1 || true @@ -450,7 +450,7 @@ status_registry() { k3d registry list 2>/dev/null || true fi if command -v docker >/dev/null 2>&1; then - docker ps --format '{{.Names}}\t{{.Image}}\t{{.Ports}}' 2>/dev/null | grep -E 'k3d-prole-registry|prole-registry' || true + docker ps --format '{{.Names}}\t{{.Image}}\t{{.Ports}}' 2>/dev/null | grep -E 'k3d-knoe-registry|knoe-registry' || true fi return 0 fi diff --git a/etc/init_service_layer.sh b/etc/init_service_layer.sh index 91ddeca..dbd1f79 100755 --- a/etc/init_service_layer.sh +++ b/etc/init_service_layer.sh @@ -29,9 +29,9 @@ unset _has_config _arg _default_cfg common_core_preparse_config "$@" # shellcheck disable=SC1090 -source "$SCRIPT_DIR/prole_cfg.sh" +source "$SCRIPT_DIR/knoe_cfg.sh" -prole_ensure_kubeconfig >/dev/null 2>&1 || true +knoe_ensure_kubeconfig >/dev/null 2>&1 || true ensure_kube_context || exit 1 ACTION="" @@ -55,11 +55,11 @@ while [[ $# -gt 0 ]]; do ;; -m|--mode) shift - prole_set_mode "${1:-}" + knoe_set_mode "${1:-}" shift ;; -m=*|--mode=*) - prole_set_mode "${1#*=}" + knoe_set_mode "${1#*=}" shift ;; -n|--namespace) @@ -128,8 +128,8 @@ ARGOCD_NS="${ARGOCD_NAMESPACE:-argocd}" REGISTRY_NS="${REGISTRY_NAMESPACE:-${SERVICE_NAMESPACE}}" STATE_DIR="" -if [[ -n "${PROLE_SERVICE:-}" && -f "$PROLE_SERVICE/prole_cfg.sh" ]]; then - STATE_DIR="${PROLE_SERVICE}/secrets" +if [[ -n "${KNOE_SERVICE:-}" && -f "$KNOE_SERVICE/knoe_cfg.sh" ]]; then + STATE_DIR="${KNOE_SERVICE}/secrets" else STATE_DIR="${SCRIPT_DIR}/secrets" fi @@ -152,7 +152,7 @@ ensure_namespace() { label_namespace() { local ns="$1" - kubectl label namespace "$ns" prole.layer=service --overwrite >/dev/null 2>&1 || true + kubectl label namespace "$ns" knoe.layer=service --overwrite >/dev/null 2>&1 || true } read_last_namespace() { @@ -174,7 +174,7 @@ deploy_service_layer() { local rc=0 local manage_opentofu=1 - if [[ "${PROLE_MODE:-}" == "k8s" ]]; then + if [[ "${KNOE_MODE:-}" == "k8s" ]]; then manage_opentofu=0 fi diff --git a/etc/init_supabase_ports.sh b/etc/init_supabase_ports.sh index 536dc84..62b25bf 100755 --- a/etc/init_supabase_ports.sh +++ b/etc/init_supabase_ports.sh @@ -12,15 +12,15 @@ set -euo pipefail PROG="init_supabase_ports" SCRIPT_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) -# Load environment and config via prole_cfg.sh +# Load environment and config via knoe_cfg.sh # shellcheck disable=SC1090 -source "$SCRIPT_DIR/prole_cfg.sh" +source "$SCRIPT_DIR/knoe_cfg.sh" if [[ "${1:-}" == "--mode" || "${1:-}" == "-m" ]]; then - prole_set_mode "${2:-}" + knoe_set_mode "${2:-}" shift 2 elif [[ "${1:-}" == --mode=* || "${1:-}" == -m=* ]]; then - prole_set_mode "${1#*=}" + knoe_set_mode "${1#*=}" shift fi @@ -193,8 +193,8 @@ metadata: name: ${SUPABASE_DB_SERVICE} namespace: ${SUPABASE_NAMESPACE} annotations: - prole.org/db-namespace: "${TARGET_NAMESPACE}" - prole.org/db-service: "${KNOE_DB_SERVICE}" + knoe.org/db-namespace: "${TARGET_NAMESPACE}" + knoe.org/db-service: "${KNOE_DB_SERVICE}" spec: type: ExternalName externalName: ${DESIRED_EXTERNAL} diff --git a/etc/k3d_route_fix.sh b/etc/k3d_route_fix.sh index 9207162..c42a49c 100755 --- a/etc/k3d_route_fix.sh +++ b/etc/k3d_route_fix.sh @@ -10,7 +10,7 @@ set -euo pipefail SCRIPT_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) # shellcheck disable=SC1090 -source "$SCRIPT_DIR/prole_cfg.sh" +source "$SCRIPT_DIR/knoe_cfg.sh" log() { printf '%s\n' "$*"; } err() { printf '%s\n' "$*" >&2; } diff --git a/etc/knoe-db-passwwd.sh b/etc/knoe-db-passwwd.sh index 5145e07..70eba66 100755 --- a/etc/knoe-db-passwwd.sh +++ b/etc/knoe-db-passwwd.sh @@ -5,7 +5,7 @@ SCRIPT_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) ROOT_DIR=$(cd "$SCRIPT_DIR/.." && pwd) # shellcheck disable=SC1090 -source "$SCRIPT_DIR/prole_cfg.sh" +source "$SCRIPT_DIR/knoe_cfg.sh" usage() { cat </dev/null || true) + url=$(python3 -c 'import os, sys; sys.path.append("."); import etc.knoe_cfg as cfg; print(cfg.openbao_url())' 2>/dev/null || true) if [[ -n "$url" ]]; then printf '%s' "$url"; return 0; fi fi - if prole_is_in_cluster; then + if knoe_is_in_cluster; then printf '%s' "http://openbao.${SERVICE_NAMESPACE:-${NAMESPACE}}.svc.cluster.local:8200" return 0 fi @@ -198,7 +198,7 @@ verify_current_password() { if [[ -n "$pod" ]]; then krb5_config="/etc/krb5.conf" if ! kubectl -n "$kdc_ns" exec "$pod" -- ls /etc/krb5.conf >/dev/null 2>&1; then - krb5_config="/opt/prole-kdc/krb5.conf" + krb5_config="/opt/knoe-kdc/krb5.conf" fi if printf '%s\n' "$current_pw" | kubectl -n "$kdc_ns" exec -i "$pod" -- env KRB5_CONFIG="$krb5_config" kinit "${KRB5_USER}@${KRB5_REALM}" >/dev/null 2>&1; then return 0 @@ -232,7 +232,7 @@ KRB5CONF if openbao_available; then local stored - stored=$(_prole_resolve_openbao_ref "$(openbao_ref "db" "password")") + stored=$(_knoe_resolve_openbao_ref "$(openbao_ref "db" "password")") if [[ -n "$stored" && "$stored" == "$current_pw" ]]; then return 0 fi @@ -242,8 +242,8 @@ KRB5CONF local cfg_pw cfg_pw=$(cfg_get "init_password.db_password") - if [[ "$cfg_pw" == '${PROLE_SECRET:'* ]]; then - cfg_pw=$(_prole_decrypt_prole_secret "$cfg_pw") + if [[ "$cfg_pw" == '${KNOE_SECRET:'* ]]; then + cfg_pw=$(_knoe_decrypt_knoe_secret "$cfg_pw") else cfg_pw="" fi @@ -252,7 +252,7 @@ KRB5CONF return 0 fi - echo "ERROR: Unable to verify current password (no OpenBao/KDC and no at-rest encrypted password in prole.cfg)." >&2 + echo "ERROR: Unable to verify current password (no OpenBao/KDC and no at-rest encrypted password in knoe.cfg)." >&2 return 1 } @@ -332,14 +332,14 @@ verify_access() { if kubectl -n "$ns" get svc knoe-db-rw >/dev/null 2>&1; then host="knoe-db-rw" fi - if kubectl -n "$ns" exec "$db_pod" -c postgres -- env PGPASSWORD="$pw" psql -h "$host" -U prole -d postgres -c "SELECT 1" >/dev/null 2>&1; then - echo " [PASS] Database access (user: prole)" + if kubectl -n "$ns" exec "$db_pod" -c postgres -- env PGPASSWORD="$pw" psql -h "$host" -U knoe -d postgres -c "SELECT 1" >/dev/null 2>&1; then + echo " [PASS] Database access (user: knoe)" break fi sleep 2 done if [[ $i -eq 10 ]]; then - echo " [FAIL] Database access (user: prole)" + echo " [FAIL] Database access (user: knoe)" fi fi fi @@ -498,7 +498,7 @@ cfg_path = sys.argv[1] ns = sys.argv[2] def ref(leaf: str, key: str) -> str: - return f"${{OPENBAO:kv/prole/{ns}/{leaf}#{key}}}" + return f"${{OPENBAO:kv/knoe/{ns}/{leaf}#{key}}}" secret_map = { "init_password.db_password": ref("db", "password"), @@ -576,11 +576,11 @@ PY ) curl -sS -H "X-Vault-Token: $token" -H 'Content-Type: application/json' \ - -X POST "$url/v1/kv/data/prole/${NAMESPACE}/db" -d "$db_payload" >/dev/null + -X POST "$url/v1/kv/data/knoe/${NAMESPACE}/db" -d "$db_payload" >/dev/null curl -sS -H "X-Vault-Token: $token" -H 'Content-Type: application/json' \ - -X POST "$url/v1/kv/data/prole/${NAMESPACE}/kerberos" -d "$krb_payload" >/dev/null + -X POST "$url/v1/kv/data/knoe/${NAMESPACE}/kerberos" -d "$krb_payload" >/dev/null curl -sS -H "X-Vault-Token: $token" -H 'Content-Type: application/json' \ - -X POST "$url/v1/kv/data/prole/${NAMESPACE}/monitoring" -d "$grafana_payload" >/dev/null + -X POST "$url/v1/kv/data/knoe/${NAMESPACE}/monitoring" -d "$grafana_payload" >/dev/null return 0 } @@ -713,7 +713,7 @@ if [[ "$NEW_PASSWORD" != "$confirm_pw" ]]; then exit 1 fi -# 3) Store at-rest encrypted in prole.cfg +# 3) Store at-rest encrypted in knoe.cfg ENC_PW=$(python3 - "$ROOT_DIR" "$NEW_PASSWORD" <<'PY' import sys @@ -723,13 +723,13 @@ pw = sys.argv[2] sys.path.insert(0, root) from knoe import config as inst_config -print(inst_config._encrypt_prole_secret(pw)) +print(inst_config._encrypt_knoe_secret(pw)) PY ) update_cfg_keys "$ENC_PW" -# 4) Push to OpenBao (if available) and replace prole.cfg refs +# 4) Push to OpenBao (if available) and replace knoe.cfg refs OPENBAO_UPDATED=0 if write_openbao_secrets; then OPENBAO_UPDATED=1 @@ -738,7 +738,7 @@ fi # 5) Update Kubernetes secrets (if available) if command -v kubectl >/dev/null 2>&1; then - prole_ensure_kubeconfig >/dev/null 2>&1 || true + knoe_ensure_kubeconfig >/dev/null 2>&1 || true update_k8s_db_secrets update_grafana_secret update_supabase_secrets @@ -755,7 +755,7 @@ if [[ "$OPENBAO_UPDATED" -eq 1 ]]; then export PROLE_OPENBAO_URL="$url" fi fi - resolved=$(_prole_resolve_openbao_ref "$(openbao_ref "db" "password")") + resolved=$(_knoe_resolve_openbao_ref "$(openbao_ref "db" "password")") if [[ "$resolved" != "$NEW_PASSWORD" ]]; then echo "WARN: OpenBao value did not match expected password." >&2 fi diff --git a/etc/prole_cfg.sh b/etc/knoe_cfg.sh similarity index 64% rename from etc/prole_cfg.sh rename to etc/knoe_cfg.sh index 7a16e57..b3c157c 100644 --- a/etc/prole_cfg.sh +++ b/etc/knoe_cfg.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash -# Standard include for Prole etc scripts. +# Standard include for Knoe etc scripts. # - Loads environment from env.sh (if available) -# - Loads values from mode-specific config files in PROLE_CONF (INI-style) +# - Loads values from mode-specific config files in KNOE_CONF (INI-style) # - Does not override already-set env vars if [[ "${_PROLE_CFG_LOADED:-}" == "1" ]]; then @@ -9,48 +9,48 @@ if [[ "${_PROLE_CFG_LOADED:-}" == "1" ]]; then fi _PROLE_CFG_LOADED=1 -_prole_cfg_script_dir=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) -_prole_cfg_home_guess=$(cd "$_prole_cfg_script_dir/.." && pwd) +_knoe_cfg_script_dir=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) +_knoe_cfg_home_guess=$(cd "$_knoe_cfg_script_dir/.." && pwd) -# 1. Try to load env.sh to establish base PROLE_HOME/PROLE_CONF -# If PROLE_HOME/PROLE_CONF/etc are already set by the caller (e.g. tests), +# 1. Try to load env.sh to establish base KNOE_HOME/KNOE_CONF +# If KNOE_HOME/KNOE_CONF/etc are already set by the caller (e.g. tests), # do not allow env.sh to clobber them. -_prole_cfg_preserve_home="${PROLE_HOME:-}" -_prole_cfg_preserve_conf="${PROLE_CONF:-}" -_prole_cfg_preserve_service="${PROLE_SERVICE:-}" -if [[ -n "${PROLE_HOME:-}" && -f "$PROLE_HOME/env.sh" ]]; then +_knoe_cfg_preserve_home="${KNOE_HOME:-}" +_knoe_cfg_preserve_conf="${KNOE_CONF:-}" +_knoe_cfg_preserve_service="${KNOE_SERVICE:-}" +if [[ -n "${KNOE_HOME:-}" && -f "$KNOE_HOME/env.sh" ]]; then # shellcheck disable=SC1090 - source "$PROLE_HOME/env.sh" -elif [[ -f "$HOME/.prole/env.sh" ]]; then + source "$KNOE_HOME/env.sh" +elif [[ -f "$HOME/.knoe/env.sh" ]]; then # shellcheck disable=SC1090 - source "$HOME/.prole/env.sh" -elif [[ -f "$_prole_cfg_home_guess/env.sh" ]]; then + source "$HOME/.knoe/env.sh" +elif [[ -f "$_knoe_cfg_home_guess/env.sh" ]]; then # shellcheck disable=SC1090 - source "$_prole_cfg_home_guess/env.sh" + source "$_knoe_cfg_home_guess/env.sh" fi -if [[ -n "$_prole_cfg_preserve_home" ]]; then - PROLE_HOME="$_prole_cfg_preserve_home" - export PROLE_HOME +if [[ -n "$_knoe_cfg_preserve_home" ]]; then + KNOE_HOME="$_knoe_cfg_preserve_home" + export KNOE_HOME fi -if [[ -n "$_prole_cfg_preserve_conf" ]]; then - PROLE_CONF="$_prole_cfg_preserve_conf" - export PROLE_CONF +if [[ -n "$_knoe_cfg_preserve_conf" ]]; then + KNOE_CONF="$_knoe_cfg_preserve_conf" + export KNOE_CONF fi -if [[ -n "$_prole_cfg_preserve_service" ]]; then - PROLE_SERVICE="$_prole_cfg_preserve_service" - export PROLE_SERVICE +if [[ -n "$_knoe_cfg_preserve_service" ]]; then + KNOE_SERVICE="$_knoe_cfg_preserve_service" + export KNOE_SERVICE fi -unset _prole_cfg_preserve_home _prole_cfg_preserve_conf _prole_cfg_preserve_service +unset _knoe_cfg_preserve_home _knoe_cfg_preserve_conf _knoe_cfg_preserve_service -_prole_trim() { +_knoe_trim() { local s="$1" s="${s#"${s%%[![:space:]]*}"}" s="${s%"${s##*[![:space:]]}"}" printf '%s' "$s" } -_prole_cfg_expand() { +_knoe_cfg_expand() { local value="$1" local out="" rest="$value" local prefix token suffix var repl @@ -59,7 +59,7 @@ _prole_cfg_expand() { return 0 fi case "$value" in - '${OPENBAO:'*|'${PROLE_SECRET:'*) + '${OPENBAO:'*|'${KNOE_SECRET:'*) printf '%s' "$value" return 0 ;; @@ -83,7 +83,7 @@ _prole_cfg_expand() { printf '%s' "$out" } -_prole_host_from_url() { +_knoe_host_from_url() { local val="${1:-}" val="${val#http://}" val="${val#https://}" @@ -92,33 +92,33 @@ _prole_host_from_url() { printf '%s' "$val" } -prole_is_in_cluster() { +knoe_is_in_cluster() { [[ -n "${KUBERNETES_SERVICE_HOST:-}" && -f /var/run/secrets/kubernetes.io/serviceaccount/token ]] } -_prole_local_registry_enabled() { +_knoe_local_registry_enabled() { local raw="${PROLE_ENABLE_LOCAL_REGISTRY:-${ENABLE_LOCAL_REGISTRY:-}}" if [[ -n "$raw" ]]; then - _prole_bool_true "$raw" && return 0 + _knoe_bool_true "$raw" && return 0 return 1 fi local mode="" - if command -v prole_normalize_mode >/dev/null 2>&1; then - mode=$(prole_normalize_mode "${PROLE_MODE:-${DEPLOYMENT_MODE:-${CLUSTER_ENV:-}}}") + if command -v knoe_normalize_mode >/dev/null 2>&1; then + mode=$(knoe_normalize_mode "${KNOE_MODE:-${DEPLOYMENT_MODE:-${CLUSTER_ENV:-}}}") else - mode="${PROLE_MODE:-${DEPLOYMENT_MODE:-${CLUSTER_ENV:-}}}" + mode="${KNOE_MODE:-${DEPLOYMENT_MODE:-${CLUSTER_ENV:-}}}" fi [[ "$mode" == "k3d" || "$mode" == "k3s" ]] } -_prole_bool_true() { +_knoe_bool_true() { case "${1:-}" in 1|true|TRUE|True|yes|YES|Yes|on|ON|On) return 0 ;; esac return 1 } -_prole_kubeconfig_mark_insecure() { +_knoe_kubeconfig_mark_insecure() { local cfg="${1:-${KUBECONFIG:-}}" [[ -z "$cfg" || ! -f "$cfg" ]] && return 1 command -v kubectl >/dev/null 2>&1 || return 1 @@ -134,7 +134,7 @@ _prole_kubeconfig_mark_insecure() { _PROLE_CFG_SET_VARS="|" -_prole_cfg_normalize_key() { +_knoe_cfg_normalize_key() { local key="${1:-}" key="${key//./_}" key="${key//[^A-Za-z0-9_]/_}" @@ -144,7 +144,7 @@ _prole_cfg_normalize_key() { printf '%s' "$key" } -_prole_cfg_set_default() { +_knoe_cfg_set_default() { local key="$1" value="$2" local token="|$key|" if [[ ! "$key" =~ ^[A-Za-z_][A-Za-z0-9_]*$ ]]; then @@ -161,10 +161,10 @@ _prole_cfg_set_default() { fi } -_prole_read_cfg() { +_knoe_read_cfg() { local cfg="$1" line key value while IFS= read -r line || [[ -n "$line" ]]; do - line="$(_prole_trim "$line")" + line="$(_knoe_trim "$line")" [[ -z "$line" ]] && continue case "$line" in \#*|\;*|\[*\]) @@ -172,19 +172,19 @@ _prole_read_cfg() { ;; esac if [[ "$line" == *"="* ]]; then - key="$(_prole_trim "${line%%=*}")" - value="$(_prole_trim "${line#*=}")" + key="$(_knoe_trim "${line%%=*}")" + value="$(_knoe_trim "${line#*=}")" [[ -z "$key" ]] && continue # Normalize to a valid shell variable key for safe export. - key="$(_prole_cfg_normalize_key "$key")" + key="$(_knoe_cfg_normalize_key "$key")" [[ -z "$key" ]] && continue - value="$(_prole_cfg_expand "$value")" - _prole_cfg_set_default "$key" "$value" + value="$(_knoe_cfg_expand "$value")" + _knoe_cfg_set_default "$key" "$value" fi done <"$cfg" } -_prole_cfg_extract_key() { +_knoe_cfg_extract_key() { local cfg="$1" key="$2" local value value=$(awk -F= -v k="$key" ' @@ -199,11 +199,11 @@ _prole_cfg_extract_key() { } END { print val } ' "$cfg" 2>/dev/null || true) - value="$(_prole_cfg_expand "$value")" + value="$(_knoe_cfg_expand "$value")" printf '%s' "$value" } -_prole_cfg_extract_key_in_files() { +_knoe_cfg_extract_key_in_files() { local key="$1"; shift local value if [[ $# -lt 1 ]]; then @@ -221,11 +221,11 @@ _prole_cfg_extract_key_in_files() { } END { print val } ' "$@" 2>/dev/null || true) - value="$(_prole_cfg_expand "$value")" + value="$(_knoe_cfg_expand "$value")" printf '%s' "$value" } -_prole_cfg_realpath() { +_knoe_cfg_realpath() { local p="$1" if command -v python3 >/dev/null 2>&1; then python3 -c 'import os,sys; print(os.path.realpath(sys.argv[1]))' "$p" 2>/dev/null && return 0 @@ -237,7 +237,7 @@ _prole_cfg_realpath() { printf '%s' "$p" } -_prole_cfg_named_file_for_env() { +_knoe_cfg_named_file_for_env() { case "${1:-}" in dev) printf '%s' "k3d.cfg" ;; service|services) printf '%s' "k3s.cfg" ;; @@ -247,10 +247,10 @@ _prole_cfg_named_file_for_env() { esac } -_prole_cfg_named_file_for_mode() { +_knoe_cfg_named_file_for_mode() { local mode="${1:-}" - if command -v prole_normalize_mode >/dev/null 2>&1; then - mode=$(prole_normalize_mode "$mode") + if command -v knoe_normalize_mode >/dev/null 2>&1; then + mode=$(knoe_normalize_mode "$mode") fi case "$mode" in k3d) printf '%s' "k3d.cfg" ;; @@ -260,7 +260,7 @@ _prole_cfg_named_file_for_mode() { esac } -_prole_cfg_select_cfg_file() { +_knoe_cfg_select_cfg_file() { local conf_dir="$1" [[ -z "$conf_dir" ]] && return 0 @@ -271,8 +271,8 @@ _prole_cfg_select_cfg_file() { fi local mode_hint mode_file env_hint env_file cfg - mode_hint="${PROLE_MODE:-${DEPLOYMENT_MODE:-${CLUSTER_ENV:-}}}" - mode_file="$(_prole_cfg_named_file_for_mode "$mode_hint")" + mode_hint="${KNOE_MODE:-${DEPLOYMENT_MODE:-${CLUSTER_ENV:-}}}" + mode_file="$(_knoe_cfg_named_file_for_mode "$mode_hint")" if [[ -n "$mode_file" && -f "$conf_dir/$mode_file" ]]; then printf '%s' "$conf_dir/$mode_file" return 0 @@ -285,42 +285,42 @@ _prole_cfg_select_cfg_file() { fi done - env_hint="$(_prole_cfg_env_from_hint "$mode_hint")" + env_hint="$(_knoe_cfg_env_from_hint "$mode_hint")" if [[ -n "$env_hint" ]]; then - env_file="$(_prole_cfg_named_file_for_env "$env_hint")" + env_file="$(_knoe_cfg_named_file_for_env "$env_hint")" if [[ -n "$env_file" && -f "$conf_dir/$env_hint/$env_file" ]]; then printf '%s' "$conf_dir/$env_hint/$env_file" return 0 fi - if [[ -f "$conf_dir/$env_hint/prole.cfg" ]]; then - printf '%s' "$conf_dir/$env_hint/prole.cfg" + if [[ -f "$conf_dir/$env_hint/knoe.cfg" ]]; then + printf '%s' "$conf_dir/$env_hint/knoe.cfg" return 0 fi fi for cfg in dev service prod test; do - env_file="$(_prole_cfg_named_file_for_env "$cfg")" + env_file="$(_knoe_cfg_named_file_for_env "$cfg")" if [[ -n "$env_file" && -f "$conf_dir/$cfg/$env_file" ]]; then printf '%s' "$conf_dir/$cfg/$env_file" return 0 fi - if [[ -f "$conf_dir/$cfg/prole.cfg" ]]; then - printf '%s' "$conf_dir/$cfg/prole.cfg" + if [[ -f "$conf_dir/$cfg/knoe.cfg" ]]; then + printf '%s' "$conf_dir/$cfg/knoe.cfg" return 0 fi done - if [[ -f "$conf_dir/prole.cfg" ]]; then - printf '%s' "$conf_dir/prole.cfg" + if [[ -f "$conf_dir/knoe.cfg" ]]; then + printf '%s' "$conf_dir/knoe.cfg" return 0 fi } -_prole_cfg_layer_files() { +_knoe_cfg_layer_files() { local entry="$1" [[ -z "$entry" ]] && return 0 local resolved env_dir env_name base base_name f env_base - resolved=$(_prole_cfg_realpath "$entry") + resolved=$(_knoe_cfg_realpath "$entry") env_dir=$(cd "$(dirname "$resolved")" 2>/dev/null && pwd || true) env_name=$(basename "$env_dir") base_name=$(basename "$resolved") @@ -331,8 +331,8 @@ _prole_cfg_layer_files() { base="$env_dir/$base_name" if [[ "$env_name" =~ ^(dev|service|prod|test)$ ]]; then - env_base="$(_prole_cfg_named_file_for_env "$env_name")" - if [[ "$base_name" == "prole.cfg" && -n "$env_base" && -f "$env_dir/$env_base" ]]; then + env_base="$(_knoe_cfg_named_file_for_env "$env_name")" + if [[ "$base_name" == "knoe.cfg" && -n "$env_base" && -f "$env_dir/$env_base" ]]; then base="$env_dir/$env_base" elif [[ ! -f "$base" && -n "$env_base" && -f "$env_dir/$env_base" ]]; then base="$env_dir/$env_base" @@ -344,7 +344,7 @@ _prole_cfg_layer_files() { for f in "$env_dir"/*.cfg; do [[ -f "$f" ]] || continue [[ "$(basename "$f")" == "$(basename "$base")" ]] && continue - [[ "$(basename "$f")" == "prod.cfg" ]] && continue # standalone GKE deploy config, not a prole.cfg overlay + [[ "$(basename "$f")" == "prod.cfg" ]] && continue # standalone GKE deploy config, not a knoe.cfg overlay [[ "$(basename "$f")" == .* ]] && continue printf '%s\n' "$f" done @@ -353,42 +353,42 @@ _prole_cfg_layer_files() { printf '%s\n' "$entry" } -_prole_cfg_env_from_hint() { +_knoe_cfg_env_from_hint() { local s s=$(printf '%s' "${1:-}" | tr 'A-Z' 'a-z') case "$s" in - dev|k3d|k3d-*|prole-dev-*|knoe-dev-cluster|k3d-knoe-*) printf '%s' "dev"; return 0 ;; - service|k3s|k3s-*|prole-service-*|knoe-system|k3d-knoe-system) printf '%s' "service"; return 0 ;; - prod|production|k8s|k8s-*|prole-prod-*) printf '%s' "prod"; return 0 ;; + dev|k3d|k3d-*|knoe-dev-*|knoe-dev-cluster|k3d-knoe-*) printf '%s' "dev"; return 0 ;; + service|k3s|k3s-*|knoe-service-*|knoe-system|k3d-knoe-system) printf '%s' "service"; return 0 ;; + prod|production|k8s|k8s-*|knoe-prod-*) printf '%s' "prod"; return 0 ;; test|testing) printf '%s' "test"; return 0 ;; esac printf '%s' "" } -_prole_cfg_default_ns_for_env() { +_knoe_cfg_default_ns_for_env() { case "${1:-}" in - test) printf '%s' "prole-test" ;; + test) printf '%s' "knoe-test" ;; *) printf '%s' "knoe-db" ;; esac } -_prole_cfg_default_sns_for_env() { +_knoe_cfg_default_sns_for_env() { case "${1:-}" in dev) printf '%s' "default" ;; - test) printf '%s' "prole-test" ;; + test) printf '%s' "knoe-test" ;; *) printf '%s' "knoe-system" ;; esac } -_prole_cfg_write_default_base() { +_knoe_cfg_write_default_base() { local base="$1" env="$2" local ns sns - ns="$(_prole_cfg_default_ns_for_env "$env")" - sns="$(_prole_cfg_default_sns_for_env "$env")" + ns="$(_knoe_cfg_default_ns_for_env "$env")" + sns="$(_knoe_cfg_default_sns_for_env "$env")" mkdir -p "$(dirname "$base")" 2>/dev/null || true cat >"$base" </dev/null 2>&1; then - env_hint=$(prole_normalize_mode "$env_hint") + env_hint="${KNOE_MODE:-${DEPLOYMENT_MODE:-${CLUSTER_ENV:-}}}" + if command -v knoe_normalize_mode >/dev/null 2>&1; then + env_hint=$(knoe_normalize_mode "$env_hint") fi - env="$(_prole_cfg_env_from_hint "$env_hint")" + env="$(_knoe_cfg_env_from_hint "$env_hint")" fi # NO DEFAULT FALLBACK TO "dev" here. If env is unknown, we must fail or remain unknown @@ -471,8 +471,8 @@ _prole_cfg_bootstrap_env_layout() { # If conf_dir is already the env directory, the base config lives here directly. local base local env_cfg - env_cfg="$(_prole_cfg_named_file_for_env "$env")" - [[ -z "$env_cfg" ]] && env_cfg="prole.cfg" + env_cfg="$(_knoe_cfg_named_file_for_env "$env")" + [[ -z "$env_cfg" ]] && env_cfg="knoe.cfg" if [[ "$is_env_dir" == true ]]; then base="$conf_dir/$env_cfg" else @@ -492,10 +492,10 @@ _prole_cfg_bootstrap_env_layout() { mv "$entry.tmp" "$entry" 2>/dev/null || true else rm -f "$entry" 2>/dev/null || true - _prole_cfg_write_default_base "$base" "$env" + _knoe_cfg_write_default_base "$base" "$env" fi elif [[ ! -f "$entry" ]]; then - _prole_cfg_write_default_base "$base" "$env" + _knoe_cfg_write_default_base "$base" "$env" fi return 0 fi @@ -503,55 +503,55 @@ _prole_cfg_bootstrap_env_layout() { # Remove stale broken symlink (no replacement symlink — Python resolves env path directly). if [[ -L "$entry" && ! -e "$entry" ]]; then rm -f "$entry" 2>/dev/null || true - [[ -f "$base" ]] || _prole_cfg_write_default_base "$base" "$env" + [[ -f "$base" ]] || _knoe_cfg_write_default_base "$base" "$env" return 0 fi # Migrate legacy regular-file entrypoint into env base. if [[ -f "$entry" && ! -L "$entry" ]]; then - if [[ ! -f "$base" ]] || grep -q "Generated by prole_conf" "$base" 2>/dev/null || grep -q "Generated by prole_cfg.sh" "$base" 2>/dev/null; then + if [[ ! -f "$base" ]] || grep -q "Generated by knoe_conf" "$base" 2>/dev/null || grep -q "Generated by knoe_cfg.sh" "$base" 2>/dev/null; then cp "$entry" "$base" 2>/dev/null || true fi local ts legacy ts=$(date +%s) - legacy="$conf_dir/prole.cfg.legacy.${ts}" + legacy="$conf_dir/knoe.cfg.legacy.${ts}" mv "$entry" "$legacy" 2>/dev/null || true # No symlink created — Python resolves env path from CLUSTER_ENV directly. return 0 fi # If entrypoint is missing, create the env-specific base (no symlink needed). if [[ ! -e "$entry" ]]; then - [[ -f "$base" ]] || _prole_cfg_write_default_base "$base" "$env" + [[ -f "$base" ]] || _knoe_cfg_write_default_base "$base" "$env" fi } -prole_normalize_mode() { +knoe_normalize_mode() { local s s=$(printf '%s' "${1:-}" | tr 'A-Z' 'a-z') case "$s" in dev|k3d|k3d-*) echo "k3d"; return 0 ;; service|k3s|k3s-*) echo "k3s"; return 0 ;; prod|production|k8s|k8s-*) echo "k8s"; return 0 ;; - prole-dev-cluster|k3d-prole-dev-cluster) echo "k3d"; return 0 ;; knoe-dev-cluster|k3d-knoe-dev-cluster) echo "k3d"; return 0 ;; - prole-service-cluster) echo "k3s"; return 0 ;; - prole-prod-cluster) echo "k8s"; return 0 ;; + knoe-dev-cluster|k3d-knoe-dev-cluster) echo "k3d"; return 0 ;; + knoe-service-cluster) echo "k3s"; return 0 ;; + knoe-prod-cluster) echo "k8s"; return 0 ;; esac echo "$s" } -prole_set_mode() { +knoe_set_mode() { local raw="$1" if [[ -z "$raw" ]]; then echo "ERROR: --mode requires a value (k3d, k3s, k8s)" >&2 exit 2 fi local norm - norm=$(prole_normalize_mode "$raw") + norm=$(knoe_normalize_mode "$raw") case "$norm" in k3d|k3s|k8s) - PROLE_MODE="$norm" - export PROLE_MODE + KNOE_MODE="$norm" + export KNOE_MODE ;; *) echo "ERROR: Unsupported mode '$raw' (use k3d, k3s, or k8s)" >&2 @@ -560,17 +560,17 @@ prole_set_mode() { esac } -prole_render_manifest() { +knoe_render_manifest() { local src="$1" - if [[ "${PROLE_MODE:-}" != "k3d" ]]; then + if [[ "${KNOE_MODE:-}" != "k3d" ]]; then cat "$src" return 0 fi local renderer="" - if [[ -n "${PROLE_SERVICE:-}" && -f "$PROLE_SERVICE/render_manifest.py" ]]; then - renderer="$PROLE_SERVICE/render_manifest.py" - elif [[ -n "${PROLE_HOME:-}" && -f "$PROLE_HOME/etc/render_manifest.py" ]]; then - renderer="$PROLE_HOME/etc/render_manifest.py" + if [[ -n "${KNOE_SERVICE:-}" && -f "$KNOE_SERVICE/render_manifest.py" ]]; then + renderer="$KNOE_SERVICE/render_manifest.py" + elif [[ -n "${KNOE_HOME:-}" && -f "$KNOE_HOME/etc/render_manifest.py" ]]; then + renderer="$KNOE_HOME/etc/render_manifest.py" fi if [[ -n "$renderer" ]]; then python3 "$renderer" "$src" @@ -579,40 +579,40 @@ prole_render_manifest() { cat "$src" } -_prole_cfg_file="" -if [[ -n "${PROLE_CONF:-}" ]]; then - _prole_cfg_file="$(_prole_cfg_select_cfg_file "$PROLE_CONF")" +_knoe_cfg_file="" +if [[ -n "${KNOE_CONF:-}" ]]; then + _knoe_cfg_file="$(_knoe_cfg_select_cfg_file "$KNOE_CONF")" fi -if [[ -z "$_prole_cfg_file" && -n "${PROLE_HOME:-}" ]]; then - _prole_cfg_file="$(_prole_cfg_select_cfg_file "$PROLE_HOME/conf")" +if [[ -z "$_knoe_cfg_file" && -n "${KNOE_HOME:-}" ]]; then + _knoe_cfg_file="$(_knoe_cfg_select_cfg_file "$KNOE_HOME/conf")" fi -if [[ -z "$_prole_cfg_file" ]]; then - _prole_cfg_file="$(_prole_cfg_select_cfg_file "$_prole_cfg_home_guess/conf")" +if [[ -z "$_knoe_cfg_file" ]]; then + _knoe_cfg_file="$(_knoe_cfg_select_cfg_file "$_knoe_cfg_home_guess/conf")" fi -if [[ -n "$_prole_cfg_file" ]]; then - if [[ -z "${PROLE_CONF:-}" ]]; then - PROLE_CONF=$(cd "$(dirname "$_prole_cfg_file")" && pwd) - export PROLE_CONF +if [[ -n "$_knoe_cfg_file" ]]; then + if [[ -z "${KNOE_CONF:-}" ]]; then + KNOE_CONF=$(cd "$(dirname "$_knoe_cfg_file")" && pwd) + export KNOE_CONF fi - # Migrate legacy prole.cfg layouts only when a legacy entrypoint is selected. - if [[ "$(basename "$_prole_cfg_file")" == "prole.cfg" ]]; then - _prole_cfg_bootstrap_env_layout "$PROLE_CONF" - _prole_cfg_file="$(_prole_cfg_select_cfg_file "$PROLE_CONF")" + # Migrate legacy knoe.cfg layouts only when a legacy entrypoint is selected. + if [[ "$(basename "$_knoe_cfg_file")" == "knoe.cfg" ]]; then + _knoe_cfg_bootstrap_env_layout "$KNOE_CONF" + _knoe_cfg_file="$(_knoe_cfg_select_cfg_file "$KNOE_CONF")" fi - _prole_cfg_files=() - while IFS= read -r _prole_cfg_f || [[ -n "$_prole_cfg_f" ]]; do - [[ -n "$_prole_cfg_f" ]] || continue - _prole_cfg_files+=("$_prole_cfg_f") - done < <(_prole_cfg_layer_files "$_prole_cfg_file") - if [[ ${#_prole_cfg_files[@]} -eq 0 ]]; then - _prole_cfg_files=("$_prole_cfg_file") + _knoe_cfg_files=() + while IFS= read -r _knoe_cfg_f || [[ -n "$_knoe_cfg_f" ]]; do + [[ -n "$_knoe_cfg_f" ]] || continue + _knoe_cfg_files+=("$_knoe_cfg_f") + done < <(_knoe_cfg_layer_files "$_knoe_cfg_file") + if [[ ${#_knoe_cfg_files[@]} -eq 0 ]]; then + _knoe_cfg_files=("$_knoe_cfg_file") fi - for _prole_cfg_f in "${_prole_cfg_files[@]}"; do - [[ -f "$_prole_cfg_f" ]] || continue - _prole_read_cfg "$_prole_cfg_f" + for _knoe_cfg_f in "${_knoe_cfg_files[@]}"; do + [[ -f "$_knoe_cfg_f" ]] || continue + _knoe_read_cfg "$_knoe_cfg_f" done if [[ -z "${KERBEROS_ENABLED:-}" && -n "${ENABLED:-}" ]]; then @@ -621,156 +621,156 @@ if [[ -n "$_prole_cfg_file" ]]; then fi # Always prefer namespace from the selected config file(s) (single source of truth). - _cfg_ns=$(_prole_cfg_extract_key_in_files "NAMESPACE" "${_prole_cfg_files[@]}") + _cfg_ns=$(_knoe_cfg_extract_key_in_files "NAMESPACE" "${_knoe_cfg_files[@]}") if [[ -n "$_cfg_ns" ]]; then export PROLE_NAMESPACE="$_cfg_ns" fi - _cfg_sns=$(_prole_cfg_extract_key_in_files "SERVICE_NAMESPACE" "${_prole_cfg_files[@]}") + _cfg_sns=$(_knoe_cfg_extract_key_in_files "SERVICE_NAMESPACE" "${_knoe_cfg_files[@]}") if [[ -n "$_cfg_sns" ]]; then export SERVICE_NAMESPACE="$_cfg_sns" fi # Always prefer deployment/mode hint from selected config file(s) (single source of truth). - # This prevents leaked environment values (e.g. PROLE_MODE=k3d) from forcing the wrong mode. - _cfg_dm=$(_prole_cfg_extract_key_in_files "DEPLOYMENT_MODE" "${_prole_cfg_files[@]}") + # This prevents leaked environment values (e.g. KNOE_MODE=k3d) from forcing the wrong mode. + _cfg_dm=$(_knoe_cfg_extract_key_in_files "DEPLOYMENT_MODE" "${_knoe_cfg_files[@]}") if [[ -z "$_cfg_dm" ]]; then - _cfg_dm=$(_prole_cfg_extract_key_in_files "prole.mode" "${_prole_cfg_files[@]}") + _cfg_dm=$(_knoe_cfg_extract_key_in_files "knoe.mode" "${_knoe_cfg_files[@]}") fi if [[ -n "$_cfg_dm" ]]; then DEPLOYMENT_MODE="$_cfg_dm" export DEPLOYMENT_MODE fi - _cfg_sh=$(_prole_cfg_extract_key_in_files "SERVICE_HOSTNAME" "${_prole_cfg_files[@]}") + _cfg_sh=$(_knoe_cfg_extract_key_in_files "SERVICE_HOSTNAME" "${_knoe_cfg_files[@]}") if [[ -z "$_cfg_sh" ]]; then - _cfg_sh=$(_prole_cfg_extract_key_in_files "service_hostname" "${_prole_cfg_files[@]}") + _cfg_sh=$(_knoe_cfg_extract_key_in_files "service_hostname" "${_knoe_cfg_files[@]}") fi if [[ -n "$_cfg_sh" ]]; then export SERVICE_HOSTNAME="$_cfg_sh" fi # Supabase front-door hostname (canonical external entrypoint). - _cfg_sbh=$(_prole_cfg_extract_key_in_files "supabase_hostname" "${_prole_cfg_files[@]}") + _cfg_sbh=$(_knoe_cfg_extract_key_in_files "supabase_hostname" "${_knoe_cfg_files[@]}") if [[ -z "$_cfg_sbh" ]]; then - _cfg_sbh=$(_prole_cfg_extract_key_in_files "SUPABASE_HOSTNAME" "${_prole_cfg_files[@]}") + _cfg_sbh=$(_knoe_cfg_extract_key_in_files "SUPABASE_HOSTNAME" "${_knoe_cfg_files[@]}") fi if [[ -n "$_cfg_sbh" ]]; then export supabase_hostname="$_cfg_sbh" export SUPABASE_HOSTNAME="$_cfg_sbh" fi - _cfg_sapi=$(_prole_cfg_extract_key_in_files "SUPABASE_API_HOSTNAME" "${_prole_cfg_files[@]}") + _cfg_sapi=$(_knoe_cfg_extract_key_in_files "SUPABASE_API_HOSTNAME" "${_knoe_cfg_files[@]}") if [[ -z "$_cfg_sapi" ]]; then - _cfg_sapi=$(_prole_cfg_extract_key_in_files "supabase_api_hostname" "${_prole_cfg_files[@]}") + _cfg_sapi=$(_knoe_cfg_extract_key_in_files "supabase_api_hostname" "${_knoe_cfg_files[@]}") fi if [[ -n "$_cfg_sapi" ]]; then export SUPABASE_API_HOSTNAME="$_cfg_sapi" fi - _cfg_sstudio=$(_prole_cfg_extract_key_in_files "SUPABASE_STUDIO_HOSTNAME" "${_prole_cfg_files[@]}") + _cfg_sstudio=$(_knoe_cfg_extract_key_in_files "SUPABASE_STUDIO_HOSTNAME" "${_knoe_cfg_files[@]}") if [[ -z "$_cfg_sstudio" ]]; then - _cfg_sstudio=$(_prole_cfg_extract_key_in_files "supabase_studio_hostname" "${_prole_cfg_files[@]}") + _cfg_sstudio=$(_knoe_cfg_extract_key_in_files "supabase_studio_hostname" "${_knoe_cfg_files[@]}") fi if [[ -n "$_cfg_sstudio" ]]; then export SUPABASE_STUDIO_HOSTNAME="$_cfg_sstudio" fi - _cfg_sing=$(_prole_cfg_extract_key_in_files "SUPABASE_INGRESS_CLASS" "${_prole_cfg_files[@]}") + _cfg_sing=$(_knoe_cfg_extract_key_in_files "SUPABASE_INGRESS_CLASS" "${_knoe_cfg_files[@]}") if [[ -z "$_cfg_sing" ]]; then - _cfg_sing=$(_prole_cfg_extract_key_in_files "supabase_ingress_class" "${_prole_cfg_files[@]}") + _cfg_sing=$(_knoe_cfg_extract_key_in_files "supabase_ingress_class" "${_knoe_cfg_files[@]}") fi if [[ -n "$_cfg_sing" ]]; then export SUPABASE_INGRESS_CLASS="$_cfg_sing" fi - _cfg_gitdom=$(_prole_cfg_extract_key_in_files "GITLAB_DOMAIN" "${_prole_cfg_files[@]}") + _cfg_gitdom=$(_knoe_cfg_extract_key_in_files "GITLAB_DOMAIN" "${_knoe_cfg_files[@]}") if [[ -z "$_cfg_gitdom" ]]; then - _cfg_gitdom=$(_prole_cfg_extract_key_in_files "gitlab_domain" "${_prole_cfg_files[@]}") + _cfg_gitdom=$(_knoe_cfg_extract_key_in_files "gitlab_domain" "${_knoe_cfg_files[@]}") fi if [[ -z "$_cfg_gitdom" ]]; then - _cfg_gitdom=$(_prole_cfg_extract_key_in_files "GITLAB_HOSTNAME" "${_prole_cfg_files[@]}") + _cfg_gitdom=$(_knoe_cfg_extract_key_in_files "GITLAB_HOSTNAME" "${_knoe_cfg_files[@]}") fi if [[ -n "$_cfg_gitdom" ]]; then export GITLAB_DOMAIN="$_cfg_gitdom" fi - _cfg_githosts=$(_prole_cfg_extract_key_in_files "GITLAB_PUBLIC_HOSTS" "${_prole_cfg_files[@]}") + _cfg_githosts=$(_knoe_cfg_extract_key_in_files "GITLAB_PUBLIC_HOSTS" "${_knoe_cfg_files[@]}") if [[ -z "$_cfg_githosts" ]]; then - _cfg_githosts=$(_prole_cfg_extract_key_in_files "gitlab_public_hosts" "${_prole_cfg_files[@]}") + _cfg_githosts=$(_knoe_cfg_extract_key_in_files "gitlab_public_hosts" "${_knoe_cfg_files[@]}") fi if [[ -n "$_cfg_githosts" ]]; then export GITLAB_PUBLIC_HOSTS="$_cfg_githosts" fi - _cfg_ging=$(_prole_cfg_extract_key_in_files "GITLAB_INGRESS_CLASS" "${_prole_cfg_files[@]}") + _cfg_ging=$(_knoe_cfg_extract_key_in_files "GITLAB_INGRESS_CLASS" "${_knoe_cfg_files[@]}") if [[ -z "$_cfg_ging" ]]; then - _cfg_ging=$(_prole_cfg_extract_key_in_files "gitlab_ingress_class" "${_prole_cfg_files[@]}") + _cfg_ging=$(_knoe_cfg_extract_key_in_files "gitlab_ingress_class" "${_knoe_cfg_files[@]}") fi if [[ -n "$_cfg_ging" ]]; then export GITLAB_INGRESS_CLASS="$_cfg_ging" fi - _cfg_auth_enabled=$(_prole_cfg_extract_key_in_files "AUTHORITY_ENABLED" "${_prole_cfg_files[@]}") + _cfg_auth_enabled=$(_knoe_cfg_extract_key_in_files "AUTHORITY_ENABLED" "${_knoe_cfg_files[@]}") if [[ -z "$_cfg_auth_enabled" ]]; then - _cfg_auth_enabled=$(_prole_cfg_extract_key_in_files "authority_enabled" "${_prole_cfg_files[@]}") + _cfg_auth_enabled=$(_knoe_cfg_extract_key_in_files "authority_enabled" "${_knoe_cfg_files[@]}") fi if [[ -n "$_cfg_auth_enabled" ]]; then export AUTHORITY_ENABLED="$_cfg_auth_enabled" export FRONTDOOR_AUTH_ENABLED="$_cfg_auth_enabled" fi - _cfg_auth_host=$(_prole_cfg_extract_key_in_files "AUTH_HOSTNAME" "${_prole_cfg_files[@]}") + _cfg_auth_host=$(_knoe_cfg_extract_key_in_files "AUTH_HOSTNAME" "${_knoe_cfg_files[@]}") if [[ -z "$_cfg_auth_host" ]]; then - _cfg_auth_host=$(_prole_cfg_extract_key_in_files "auth_hostname" "${_prole_cfg_files[@]}") + _cfg_auth_host=$(_knoe_cfg_extract_key_in_files "auth_hostname" "${_knoe_cfg_files[@]}") fi if [[ -n "$_cfg_auth_host" ]]; then export AUTH_HOSTNAME="$_cfg_auth_host" fi - _cfg_auth_verify=$(_prole_cfg_extract_key_in_files "AUTH_VERIFY_PATH" "${_prole_cfg_files[@]}") + _cfg_auth_verify=$(_knoe_cfg_extract_key_in_files "AUTH_VERIFY_PATH" "${_knoe_cfg_files[@]}") if [[ -z "$_cfg_auth_verify" ]]; then - _cfg_auth_verify=$(_prole_cfg_extract_key_in_files "auth_verify_path" "${_prole_cfg_files[@]}") + _cfg_auth_verify=$(_knoe_cfg_extract_key_in_files "auth_verify_path" "${_knoe_cfg_files[@]}") fi if [[ -n "$_cfg_auth_verify" ]]; then export AUTH_VERIFY_PATH="$_cfg_auth_verify" fi - _cfg_auth_login=$(_prole_cfg_extract_key_in_files "AUTH_LOGIN_PATH" "${_prole_cfg_files[@]}") + _cfg_auth_login=$(_knoe_cfg_extract_key_in_files "AUTH_LOGIN_PATH" "${_knoe_cfg_files[@]}") if [[ -z "$_cfg_auth_login" ]]; then - _cfg_auth_login=$(_prole_cfg_extract_key_in_files "auth_login_path" "${_prole_cfg_files[@]}") + _cfg_auth_login=$(_knoe_cfg_extract_key_in_files "auth_login_path" "${_knoe_cfg_files[@]}") fi if [[ -n "$_cfg_auth_login" ]]; then export AUTH_LOGIN_PATH="$_cfg_auth_login" fi - _cfg_auth_headers=$(_prole_cfg_extract_key_in_files "AUTH_RESPONSE_HEADERS" "${_prole_cfg_files[@]}") + _cfg_auth_headers=$(_knoe_cfg_extract_key_in_files "AUTH_RESPONSE_HEADERS" "${_knoe_cfg_files[@]}") if [[ -z "$_cfg_auth_headers" ]]; then - _cfg_auth_headers=$(_prole_cfg_extract_key_in_files "auth_response_headers" "${_prole_cfg_files[@]}") + _cfg_auth_headers=$(_knoe_cfg_extract_key_in_files "auth_response_headers" "${_knoe_cfg_files[@]}") fi if [[ -n "$_cfg_auth_headers" ]]; then export AUTH_RESPONSE_HEADERS="$_cfg_auth_headers" fi - _cfg_ctx=$(_prole_cfg_extract_key_in_files "KUBE_CONTEXT_NAME" "${_prole_cfg_files[@]}") + _cfg_ctx=$(_knoe_cfg_extract_key_in_files "KUBE_CONTEXT_NAME" "${_knoe_cfg_files[@]}") if [[ -z "$_cfg_ctx" ]]; then - _cfg_ctx=$(_prole_cfg_extract_key_in_files "KUBECTL_CONTEXT" "${_prole_cfg_files[@]}") + _cfg_ctx=$(_knoe_cfg_extract_key_in_files "KUBECTL_CONTEXT" "${_knoe_cfg_files[@]}") fi if [[ -z "$_cfg_ctx" ]]; then - _cfg_ctx=$(_prole_cfg_extract_key_in_files "KUBECONTEXT" "${_prole_cfg_files[@]}") + _cfg_ctx=$(_knoe_cfg_extract_key_in_files "KUBECONTEXT" "${_knoe_cfg_files[@]}") fi - _cfg_mode_hint=$(prole_normalize_mode "${DEPLOYMENT_MODE:-${PROLE_MODE:-${CLUSTER_ENV:-${prole_mode:-}}}}") + _cfg_mode_hint=$(knoe_normalize_mode "${DEPLOYMENT_MODE:-${KNOE_MODE:-${CLUSTER_ENV:-${knoe_mode:-}}}}") _cfg_app_ctx="${APP_CLUSTER_KUBECONTEXT:-${init_cluster_app_cluster_kubecontext:-}}" if [[ "$_cfg_mode_hint" == "k8s" ]]; then if [[ -z "$_cfg_app_ctx" ]]; then - _cfg_app_ctx=$(_prole_cfg_extract_key_in_files "APP_CLUSTER_KUBECONTEXT" "${_prole_cfg_files[@]}") + _cfg_app_ctx=$(_knoe_cfg_extract_key_in_files "APP_CLUSTER_KUBECONTEXT" "${_knoe_cfg_files[@]}") fi if [[ -z "$_cfg_app_ctx" ]]; then - _cfg_app_ctx=$(_prole_cfg_extract_key_in_files "app_cluster_kubecontext" "${_prole_cfg_files[@]}") + _cfg_app_ctx=$(_knoe_cfg_extract_key_in_files "app_cluster_kubecontext" "${_knoe_cfg_files[@]}") fi if [[ -z "$_cfg_app_ctx" ]]; then - _cfg_app_ctx=$(_prole_cfg_extract_key_in_files "init_cluster.app_cluster_kubecontext" "${_prole_cfg_files[@]}") + _cfg_app_ctx=$(_knoe_cfg_extract_key_in_files "init_cluster.app_cluster_kubecontext" "${_knoe_cfg_files[@]}") fi if [[ -z "$_cfg_app_ctx" ]]; then - _cfg_app_ctx=$(_prole_cfg_extract_key_in_files "init_cluster_app_cluster_kubecontext" "${_prole_cfg_files[@]}") + _cfg_app_ctx=$(_knoe_cfg_extract_key_in_files "init_cluster_app_cluster_kubecontext" "${_knoe_cfg_files[@]}") fi if [[ -n "$_cfg_app_ctx" ]]; then _cfg_ctx="$_cfg_app_ctx" @@ -785,7 +785,7 @@ if [[ -n "$_prole_cfg_file" ]]; then _override_runtime_ctx=1 elif [[ "$_cfg_mode_hint" == "k8s" && -n "$_cfg_app_ctx" ]]; then case "$_runtime_ctx" in - prod|production|prole-prod-cluster) + prod|production|knoe-prod-cluster) _override_runtime_ctx=1 ;; esac @@ -797,20 +797,20 @@ if [[ -n "$_prole_cfg_file" ]]; then fi unset _runtime_ctx _override_runtime_ctx fi - unset _cfg_ns _cfg_sns _cfg_dm _cfg_sh _cfg_sbh _cfg_sapi _cfg_sstudio _cfg_sing _cfg_gitdom _cfg_githosts _cfg_ging _cfg_auth_enabled _cfg_auth_host _cfg_auth_verify _cfg_auth_login _cfg_auth_headers _cfg_ctx _cfg_mode_hint _cfg_app_ctx _prole_cfg_files _prole_cfg_f + unset _cfg_ns _cfg_sns _cfg_dm _cfg_sh _cfg_sbh _cfg_sapi _cfg_sstudio _cfg_sing _cfg_gitdom _cfg_githosts _cfg_ging _cfg_auth_enabled _cfg_auth_host _cfg_auth_verify _cfg_auth_login _cfg_auth_headers _cfg_ctx _cfg_mode_hint _cfg_app_ctx _knoe_cfg_files _knoe_cfg_f fi -if [[ -z "${PROLE_HOME:-}" && -d "$_prole_cfg_home_guess" ]]; then - PROLE_HOME="$_prole_cfg_home_guess" - export PROLE_HOME +if [[ -z "${KNOE_HOME:-}" && -d "$_knoe_cfg_home_guess" ]]; then + KNOE_HOME="$_knoe_cfg_home_guess" + export KNOE_HOME fi # Final check for critical variables -if [[ -z "${PROLE_SERVICE:-}" && -n "${PROLE_HOME:-}" ]]; then - export PROLE_SERVICE="$PROLE_HOME/etc" +if [[ -z "${KNOE_SERVICE:-}" && -n "${KNOE_HOME:-}" ]]; then + export KNOE_SERVICE="$KNOE_HOME/etc" fi -# PROLE_NAMESPACE must be set from prole.cfg only — never from environment or kubectl context +# PROLE_NAMESPACE must be set from knoe.cfg only — never from environment or kubectl context if [[ -n "${PROLE_NAMESPACE:-}" ]]; then export PROLE_NAMESPACE fi @@ -821,57 +821,57 @@ if [[ -z "${SERVICE_NAMESPACE:-}" ]]; then fi fi -# Safety: prole.cfg must override any pre-set PROLE_MODE from the environment. -# Otherwise a leaked PROLE_MODE=k3d can trigger k3d-only manifest stripping (e.g., removing +# Safety: knoe.cfg must override any pre-set KNOE_MODE from the environment. +# Otherwise a leaked KNOE_MODE=k3d can trigger k3d-only manifest stripping (e.g., removing # `storageClassName: synology-iscsi`) while targeting a k3s cluster. -_prole_cfg_mode_hint="" -if [[ -n "${prole_mode:-}" ]]; then - _prole_cfg_mode_hint=$(prole_normalize_mode "$prole_mode") +_knoe_cfg_mode_hint="" +if [[ -n "${knoe_mode:-}" ]]; then + _knoe_cfg_mode_hint=$(knoe_normalize_mode "$knoe_mode") elif [[ -n "${DEPLOYMENT_MODE:-}" ]]; then - _prole_cfg_mode_hint=$(prole_normalize_mode "$DEPLOYMENT_MODE") + _knoe_cfg_mode_hint=$(knoe_normalize_mode "$DEPLOYMENT_MODE") elif [[ -n "${CLUSTER_ENV:-}" ]]; then - _prole_cfg_mode_hint=$(prole_normalize_mode "$CLUSTER_ENV") + _knoe_cfg_mode_hint=$(knoe_normalize_mode "$CLUSTER_ENV") fi -case "${_prole_cfg_mode_hint}" in +case "${_knoe_cfg_mode_hint}" in k3d|k3s|k8s) - if [[ -n "${PROLE_MODE:-}" ]]; then - _prole_env_mode=$(prole_normalize_mode "$PROLE_MODE") - if [[ "${_prole_env_mode}" != "${_prole_cfg_mode_hint}" ]]; then - echo "WARN: Overriding PROLE_MODE='${_prole_env_mode}' with prole.cfg mode '${_prole_cfg_mode_hint}'." >&2 - PROLE_MODE="${_prole_cfg_mode_hint}" - export PROLE_MODE + if [[ -n "${KNOE_MODE:-}" ]]; then + _knoe_env_mode=$(knoe_normalize_mode "$KNOE_MODE") + if [[ "${_knoe_env_mode}" != "${_knoe_cfg_mode_hint}" ]]; then + echo "WARN: Overriding KNOE_MODE='${_knoe_env_mode}' with knoe.cfg mode '${_knoe_cfg_mode_hint}'." >&2 + KNOE_MODE="${_knoe_cfg_mode_hint}" + export KNOE_MODE fi - unset _prole_env_mode + unset _knoe_env_mode fi ;; esac -unset _prole_cfg_mode_hint +unset _knoe_cfg_mode_hint -if [[ -z "${PROLE_MODE:-}" ]]; then - if [[ -n "${prole_mode:-}" ]]; then - _prole_mode_guess=$(prole_normalize_mode "$prole_mode") - case "$_prole_mode_guess" in - k3d|k3s|k8s) PROLE_MODE="$_prole_mode_guess"; export PROLE_MODE ;; +if [[ -z "${KNOE_MODE:-}" ]]; then + if [[ -n "${knoe_mode:-}" ]]; then + _knoe_mode_guess=$(knoe_normalize_mode "$knoe_mode") + case "$_knoe_mode_guess" in + k3d|k3s|k8s) KNOE_MODE="$_knoe_mode_guess"; export KNOE_MODE ;; esac - unset _prole_mode_guess + unset _knoe_mode_guess elif [[ -n "${DEPLOYMENT_MODE:-}" ]]; then - _prole_mode_guess=$(prole_normalize_mode "$DEPLOYMENT_MODE") - case "$_prole_mode_guess" in - k3d|k3s|k8s) PROLE_MODE="$_prole_mode_guess"; export PROLE_MODE ;; + _knoe_mode_guess=$(knoe_normalize_mode "$DEPLOYMENT_MODE") + case "$_knoe_mode_guess" in + k3d|k3s|k8s) KNOE_MODE="$_knoe_mode_guess"; export KNOE_MODE ;; esac - unset _prole_mode_guess + unset _knoe_mode_guess elif [[ -n "${CLUSTER_ENV:-}" ]]; then - _prole_mode_guess=$(prole_normalize_mode "$CLUSTER_ENV") - case "$_prole_mode_guess" in - k3d|k3s|k8s) PROLE_MODE="$_prole_mode_guess"; export PROLE_MODE ;; + _knoe_mode_guess=$(knoe_normalize_mode "$CLUSTER_ENV") + case "$_knoe_mode_guess" in + k3d|k3s|k8s) KNOE_MODE="$_knoe_mode_guess"; export KNOE_MODE ;; esac - unset _prole_mode_guess + unset _knoe_mode_guess fi fi if [[ -n "${PROLE_NAMESPACE:-}" ]]; then - _prole_mode_resolved=$(prole_normalize_mode "${PROLE_MODE:-}") - case "$_prole_mode_resolved" in + _knoe_mode_resolved=$(knoe_normalize_mode "${KNOE_MODE:-}") + case "$_knoe_mode_resolved" in k3d) if [[ -n "${KNOE_IMAGE_REGISTRY:-}" ]]; then LOCAL_REGISTRY_INTERNAL="${KNOE_IMAGE_REGISTRY}" @@ -884,16 +884,16 @@ if [[ -n "${PROLE_NAMESPACE:-}" ]]; then LOCAL_REGISTRY_INTERNAL="${LOCAL_REGISTRY_INTERNAL%.localhost}" export LOCAL_REGISTRY_INTERNAL fi - elif _prole_local_registry_enabled; then - LOCAL_REGISTRY_INTERNAL="k3d-prole-registry:5000" + elif _knoe_local_registry_enabled; then + LOCAL_REGISTRY_INTERNAL="k3d-knoe-registry:5000" export LOCAL_REGISTRY_INTERNAL fi ;; esac - case "$_prole_mode_resolved" in + case "$_knoe_mode_resolved" in k3s|k8s) # Registry namespace is driven by config (SERVICE_NAMESPACE) unless explicitly overridden. - _prole_registry_ns="${REGISTRY_NAMESPACE:-${SERVICE_NAMESPACE:-${PROLE_NAMESPACE:-}}}" + _knoe_registry_ns="${REGISTRY_NAMESPACE:-${SERVICE_NAMESPACE:-${PROLE_NAMESPACE:-}}}" if [[ -n "${KNOE_IMAGE_REGISTRY:-}" ]]; then LOCAL_REGISTRY_INTERNAL="${KNOE_IMAGE_REGISTRY}" export LOCAL_REGISTRY_INTERNAL @@ -906,41 +906,41 @@ if [[ -n "${PROLE_NAMESPACE:-}" ]]; then fi if [[ -n "${LOCAL_REGISTRY_INTERNAL:-}" ]]; then : - elif _prole_local_registry_enabled; then - _prole_registry_host="$(_prole_host_from_url "${PROLE_K3S_SERVER:-${K3S_SERVER_URL:-}}")" - if [[ -n "${_prole_registry_host:-}" ]]; then - LOCAL_REGISTRY_INTERNAL="${_prole_registry_host}:5000" + elif _knoe_local_registry_enabled; then + _knoe_registry_host="$(_knoe_host_from_url "${PROLE_K3S_SERVER:-${K3S_SERVER_URL:-}}")" + if [[ -n "${_knoe_registry_host:-}" ]]; then + LOCAL_REGISTRY_INTERNAL="${_knoe_registry_host}:5000" export LOCAL_REGISTRY_INTERNAL - elif [[ -n "${_prole_registry_ns:-}" ]]; then - LOCAL_REGISTRY_INTERNAL="registry.${_prole_registry_ns}.svc.cluster.local:5000" + elif [[ -n "${_knoe_registry_ns:-}" ]]; then + LOCAL_REGISTRY_INTERNAL="registry.${_knoe_registry_ns}.svc.cluster.local:5000" export LOCAL_REGISTRY_INTERNAL fi - unset _prole_registry_host + unset _knoe_registry_host fi - unset _prole_registry_ns + unset _knoe_registry_ns ;; esac - unset _prole_mode_resolved + unset _knoe_mode_resolved fi -_prole_is_secret_ref() { +_knoe_is_secret_ref() { case "${1:-}" in - '${PROLE_SECRET:'*|'${OPENBAO:'*) return 0 ;; + '${KNOE_SECRET:'*|'${OPENBAO:'*) return 0 ;; esac return 1 } -_prole_is_openbao_ref() { +_knoe_is_openbao_ref() { case "${1:-}" in '${OPENBAO:'*) return 0 ;; esac return 1 } -_prole_decrypt_prole_secret() { +_knoe_decrypt_knoe_secret() { local value="${1:-}" case "$value" in - '${PROLE_SECRET:'*) ;; + '${KNOE_SECRET:'*) ;; *) printf '%s' "$value"; return 0 ;; esac python3 - "$value" <<'PY' @@ -951,11 +951,11 @@ import subprocess import sys from pathlib import Path -PROLE_SECRET_PREFIX = "${PROLE_SECRET:" -PROLE_SECRET_SUFFIX = "}" -PROLE_SECRET_VERSION = "v1" -PROLE_SECRET_SERVICE = "prole-installer" -PROLE_SECRET_KEY_FILE = Path.home() / ".prole" / "secrets" / "installer.key" +KNOE_SECRET_PREFIX = "${KNOE_SECRET:" +KNOE_SECRET_SUFFIX = "}" +KNOE_SECRET_VERSION = "v1" +KNOE_SECRET_SERVICE = "knoe-installer" +KNOE_SECRET_KEY_FILE = Path.home() / ".knoe" / "secrets" / "installer.key" def get_keychain_key(service: str, account: str) -> bytes: try: @@ -981,17 +981,17 @@ def get_file_key(path: Path) -> bytes: def get_secret_key() -> bytes: system = platform.system() - account = getpass.getuser() or "prole" + account = getpass.getuser() or "knoe" if system == "Darwin": - return get_keychain_key(PROLE_SECRET_SERVICE, account) - return get_file_key(PROLE_SECRET_KEY_FILE) + return get_keychain_key(KNOE_SECRET_SERVICE, account) + return get_file_key(KNOE_SECRET_KEY_FILE) -def decrypt_prole_secret(value: str) -> str: - if not (value.startswith(PROLE_SECRET_PREFIX) and value.endswith(PROLE_SECRET_SUFFIX)): +def decrypt_knoe_secret(value: str) -> str: + if not (value.startswith(KNOE_SECRET_PREFIX) and value.endswith(KNOE_SECRET_SUFFIX)): return value - inner = value[len(PROLE_SECRET_PREFIX):-len(PROLE_SECRET_SUFFIX)] + inner = value[len(KNOE_SECRET_PREFIX):-len(KNOE_SECRET_SUFFIX)] parts = inner.split(":") - if len(parts) != 3 or parts[0] != PROLE_SECRET_VERSION: + if len(parts) != 3 or parts[0] != KNOE_SECRET_VERSION: return "" key = get_secret_key() if not key: @@ -1006,12 +1006,12 @@ def decrypt_prole_secret(value: str) -> str: return "" value = sys.argv[1] -out = decrypt_prole_secret(value) +out = decrypt_knoe_secret(value) print(out) PY } -_prole_resolve_openbao_ref() { +_knoe_resolve_openbao_ref() { local value="${1:-}" case "$value" in '${OPENBAO:'*) ;; @@ -1043,9 +1043,9 @@ def resolve_openbao_ref(value: str) -> str: token = os.environ.get("OPENBAO_ROOT_TOKEN", "") if not token: - prole_service = os.environ.get("PROLE_SERVICE", "") - if prole_service: - token_path = os.path.join(prole_service, "secrets", "openbao-root-token") + knoe_service = os.environ.get("KNOE_SERVICE", "") + if knoe_service: + token_path = os.path.join(knoe_service, "secrets", "openbao-root-token") try: if os.path.exists(token_path): token = open(token_path, "r", encoding="utf-8").read().strip() @@ -1058,7 +1058,7 @@ def resolve_openbao_ref(value: str) -> str: if not url: # In k3s mode, do NOT fall back to localhost/port-forward. Derive the external # OpenBao URL from the k3s API server URL when available. - mode = (os.environ.get("PROLE_MODE") or os.environ.get("DEPLOYMENT_MODE") or "").strip().lower() + mode = (os.environ.get("KNOE_MODE") or os.environ.get("DEPLOYMENT_MODE") or "").strip().lower() if mode == "k3s": k3s_server = (os.environ.get("PROLE_K3S_SERVER") or os.environ.get("K3S_SERVER_URL") or "").strip() if k3s_server: @@ -1080,7 +1080,7 @@ def resolve_openbao_ref(value: str) -> str: except Exception: pass if not url: - mode = (os.environ.get("PROLE_MODE") or os.environ.get("DEPLOYMENT_MODE") or "").strip().lower() + mode = (os.environ.get("KNOE_MODE") or os.environ.get("DEPLOYMENT_MODE") or "").strip().lower() if mode != "k3s": url = "http://127.0.0.1:8200" else: @@ -1100,7 +1100,7 @@ print(resolve_openbao_ref(value)) PY } -_prole_usable_dir() { +_knoe_usable_dir() { local dir="$1" if [[ -z "$dir" ]]; then return 1; fi if [[ -w "$dir" ]] || [[ ! -e "$dir" && -w "$(dirname "$dir" 2>/dev/null)" ]]; then @@ -1110,32 +1110,32 @@ _prole_usable_dir() { return 1 } -_prole_kubeconfig_path() { +_knoe_kubeconfig_path() { local base="" - # Try PROLE_SERVICE, then PROLE_HOME, then guess - local candidates=("${PROLE_SERVICE:-}/secrets" "${PROLE_HOME:-}" "${_prole_cfg_home_guess:-}") + # Try KNOE_SERVICE, then KNOE_HOME, then guess + local candidates=("${KNOE_SERVICE:-}/secrets" "${KNOE_HOME:-}" "${_knoe_cfg_home_guess:-}") for b in "${candidates[@]}"; do if [[ -z "$b" ]]; then continue; fi - if _prole_usable_dir "$b" >/dev/null; then + if _knoe_usable_dir "$b" >/dev/null; then base="$b" break fi done - # Fallback to ~/.prole if everything else failed + # Fallback to ~/.knoe if everything else failed if [[ -z "$base" ]]; then - base="$HOME/.prole/secrets" + base="$HOME/.knoe/secrets" mkdir -p "$base" 2>/dev/null || true fi if [[ "$base" == */secrets ]]; then printf '%s\n' "${base}/k3s.kubeconfig" else - printf '%s\n' "${base}/prole-k3s.kubeconfig" + printf '%s\n' "${base}/knoe-k3s.kubeconfig" fi } -_prole_token_is_bearer() { +_knoe_token_is_bearer() { local token="$1" [[ -z "$token" ]] && return 1 # K3s node tokens include '::' and are not valid API bearer tokens. @@ -1155,35 +1155,35 @@ _prole_token_is_bearer() { return 1 } -_prole_kubeconfig_from_token() { +_knoe_kubeconfig_from_token() { local server token ns server="${PROLE_K3S_SERVER:-${K3S_SERVER_URL:-}}" token="${PROLE_K3S_TOKEN:-${K3S_TOKEN:-}}" ns="${SERVICE_NAMESPACE:-${NAMESPACE:-default}}" - if _prole_is_openbao_ref "$token"; then - token=$(_prole_resolve_openbao_ref "$token") - elif [[ "$token" == '${PROLE_SECRET:'* ]]; then - token=$(_prole_decrypt_prole_secret "$token") + if _knoe_is_openbao_ref "$token"; then + token=$(_knoe_resolve_openbao_ref "$token") + elif [[ "$token" == '${KNOE_SECRET:'* ]]; then + token=$(_knoe_decrypt_knoe_secret "$token") fi if [[ -z "$server" ]]; then - echo "DEBUG: _prole_kubeconfig_from_token: server is empty" >&2 + echo "DEBUG: _knoe_kubeconfig_from_token: server is empty" >&2 return 1 fi if [[ -z "$token" ]]; then - echo "DEBUG: _prole_kubeconfig_from_token: token is empty" >&2 + echo "DEBUG: _knoe_kubeconfig_from_token: token is empty" >&2 return 1 fi - if ! _prole_token_is_bearer "$token"; then - echo "DEBUG: _prole_kubeconfig_from_token: token is not a bearer token" >&2 + if ! _knoe_token_is_bearer "$token"; then + echo "DEBUG: _knoe_kubeconfig_from_token: token is not a bearer token" >&2 return 1 fi if [[ "$server" != http* ]]; then server="https://$server" fi local cfg_path - cfg_path="$(_prole_kubeconfig_path)" || return 1 + cfg_path="$(_knoe_kubeconfig_path)" || return 1 # Never overwrite a kubeconfig that uses client-certificate auth if [[ -f "$cfg_path" ]] && grep -q "client-certificate-data" "$cfg_path" 2>/dev/null; then export KUBECONFIG="$cfg_path" @@ -1194,36 +1194,36 @@ _prole_kubeconfig_from_token() { apiVersion: v1 kind: Config clusters: -- name: prole-k3s +- name: knoe-k3s cluster: server: ${server} insecure-skip-tls-verify: true users: -- name: prole-k3s +- name: knoe-k3s user: token: ${token} contexts: -- name: prole-k3s +- name: knoe-k3s context: - cluster: prole-k3s - user: prole-k3s + cluster: knoe-k3s + user: knoe-k3s namespace: ${ns} -current-context: prole-k3s +current-context: knoe-k3s EOF chmod 600 "$cfg_path" 2>/dev/null || true export KUBECONFIG="$cfg_path" return 0 } -prole_ensure_kubeconfig() { - if [[ "${PROLE_MODE:-}" == "k3d" ]]; then +knoe_ensure_kubeconfig() { + if [[ "${KNOE_MODE:-}" == "k3d" ]]; then return 0 fi - local _prole_insecure_flag - _prole_insecure_flag="${PROLE_K3S_SKIP_TLS_VERIFY:-${K3S_SKIP_TLS_VERIFY:-${PROLE_K3S_INSECURE:-${K3S_INSECURE:-}}}}" - _prole_kubeconfig_maybe_insecure() { - if _prole_bool_true "${_prole_insecure_flag:-}"; then - _prole_kubeconfig_mark_insecure "${KUBECONFIG:-}" >/dev/null 2>&1 || true + local _knoe_insecure_flag + _knoe_insecure_flag="${PROLE_K3S_SKIP_TLS_VERIFY:-${K3S_SKIP_TLS_VERIFY:-${PROLE_K3S_INSECURE:-${K3S_INSECURE:-}}}}" + _knoe_kubeconfig_maybe_insecure() { + if _knoe_bool_true "${_knoe_insecure_flag:-}"; then + _knoe_kubeconfig_mark_insecure "${KUBECONFIG:-}" >/dev/null 2>&1 || true fi } @@ -1239,44 +1239,44 @@ prole_ensure_kubeconfig() { } # Prefer an existing valid kubeconfig (e.g. Ansible-fetched with client certs) - # over generating a new token-based one from prole.cfg. + # over generating a new token-based one from knoe.cfg. if [[ -n "${KUBECONFIG:-}" && -f "${KUBECONFIG:-}" ]]; then - _prole_kubeconfig_maybe_insecure + _knoe_kubeconfig_maybe_insecure if _verify_kubeconfig; then return 0; fi fi - if [[ -n "${PROLE_SERVICE:-}" && -f "${PROLE_SERVICE}/secrets/k3s.kubeconfig" ]]; then - export KUBECONFIG="${PROLE_SERVICE}/secrets/k3s.kubeconfig" - _prole_kubeconfig_maybe_insecure + if [[ -n "${KNOE_SERVICE:-}" && -f "${KNOE_SERVICE}/secrets/k3s.kubeconfig" ]]; then + export KUBECONFIG="${KNOE_SERVICE}/secrets/k3s.kubeconfig" + _knoe_kubeconfig_maybe_insecure if _verify_kubeconfig; then return 0; fi fi if [[ -n "${PROLE_K3S_KUBECONFIG:-}" && -f "${PROLE_K3S_KUBECONFIG}" ]]; then export KUBECONFIG="${PROLE_K3S_KUBECONFIG}" - _prole_kubeconfig_maybe_insecure + _knoe_kubeconfig_maybe_insecure if _verify_kubeconfig; then return 0; fi fi if [[ -n "${PROLE_KUBECONFIG:-}" && -f "${PROLE_KUBECONFIG}" ]]; then export KUBECONFIG="${PROLE_KUBECONFIG}" - _prole_kubeconfig_maybe_insecure + _knoe_kubeconfig_maybe_insecure if _verify_kubeconfig; then return 0; fi fi - if [[ -n "${PROLE_HOME:-}" && -f "${PROLE_HOME}/prole-k3s.kubeconfig" ]]; then - export KUBECONFIG="${PROLE_HOME}/prole-k3s.kubeconfig" - _prole_kubeconfig_maybe_insecure + if [[ -n "${KNOE_HOME:-}" && -f "${KNOE_HOME}/knoe-k3s.kubeconfig" ]]; then + export KUBECONFIG="${KNOE_HOME}/knoe-k3s.kubeconfig" + _knoe_kubeconfig_maybe_insecure if _verify_kubeconfig; then return 0; fi fi - if [[ -f "${_prole_cfg_home_guess:-}/prole-k3s.kubeconfig" ]]; then - export KUBECONFIG="${_prole_cfg_home_guess:-}/prole-k3s.kubeconfig" - _prole_kubeconfig_maybe_insecure + if [[ -f "${_knoe_cfg_home_guess:-}/knoe-k3s.kubeconfig" ]]; then + export KUBECONFIG="${_knoe_cfg_home_guess:-}/knoe-k3s.kubeconfig" + _knoe_kubeconfig_maybe_insecure if _verify_kubeconfig; then return 0; fi fi if [[ -r "/etc/rancher/k3s/k3s.yaml" ]]; then export KUBECONFIG="/etc/rancher/k3s/k3s.yaml" - _prole_kubeconfig_maybe_insecure + _knoe_kubeconfig_maybe_insecure if _verify_kubeconfig; then return 0; fi fi - _prole_kubeconfig_from_token - _prole_kubeconfig_maybe_insecure + _knoe_kubeconfig_from_token + _knoe_kubeconfig_maybe_insecure if _verify_kubeconfig; then return 0; fi # Final fallback: if nothing worked, restore original or unset so system default is used @@ -1392,7 +1392,7 @@ switch_kube_context() { return 1 } -_prole_list_kubeconfig_candidates() { +_knoe_list_kubeconfig_candidates() { local -a candidates if [[ -n "${KUBECONFIG:-}" ]]; then @@ -1405,10 +1405,10 @@ _prole_list_kubeconfig_candidates() { [[ -n "${PROLE_K3S_KUBECONFIG:-}" ]] && candidates+=("${PROLE_K3S_KUBECONFIG}") [[ -n "${PROLE_KUBECONFIG:-}" ]] && candidates+=("${PROLE_KUBECONFIG}") - [[ -n "${PROLE_HOME:-}" ]] && candidates+=("${PROLE_HOME}/prole-k3s.kubeconfig") - [[ -n "${_prole_cfg_home_guess:-}" ]] && candidates+=("${_prole_cfg_home_guess}/prole-k3s.kubeconfig") + [[ -n "${KNOE_HOME:-}" ]] && candidates+=("${KNOE_HOME}/knoe-k3s.kubeconfig") + [[ -n "${_knoe_cfg_home_guess:-}" ]] && candidates+=("${_knoe_cfg_home_guess}/knoe-k3s.kubeconfig") [[ -n "${HOME:-}" ]] && candidates+=("${HOME}/.kube/config") - [[ -n "${PROLE_SERVICE:-}" ]] && candidates+=("${PROLE_SERVICE}/secrets/k3s.kubeconfig") + [[ -n "${KNOE_SERVICE:-}" ]] && candidates+=("${KNOE_SERVICE}/secrets/k3s.kubeconfig") candidates+=("/etc/rancher/k3s/k3s.yaml") local -A seen @@ -1422,7 +1422,7 @@ _prole_list_kubeconfig_candidates() { done } -_prole_select_kubeconfig_for_context() { +_knoe_select_kubeconfig_for_context() { local desired_context="$1" [[ -n "$desired_context" ]] || return 1 @@ -1435,18 +1435,18 @@ _prole_select_kubeconfig_for_context() { echo "INFO: Selected kubeconfig '$candidate' for context '${desired_context}'" >&2 return 0 fi - done < <(_prole_list_kubeconfig_candidates) + done < <(_knoe_list_kubeconfig_candidates) return 1 } -# Validate and switch the active kubectl context to match PROLE_MODE set in prole.cfg. -# prole.cfg always overrides the local environment. -# Call this after prole_ensure_kubeconfig in every init_*.sh script. +# Validate and switch the active kubectl context to match KNOE_MODE set in knoe.cfg. +# knoe.cfg always overrides the local environment. +# Call this after knoe_ensure_kubeconfig in every init_*.sh script. # Usage: ensure_kube_context ensure_kube_context() { local mode - mode="${PROLE_MODE:-}" + mode="${KNOE_MODE:-}" if [[ -z "$mode" ]]; then return 0 fi @@ -1510,7 +1510,7 @@ ensure_kube_context() { echo "WARN: Requested kubectl context '${desired_context}' not found in active KUBECONFIG; using only available context '${only_context}'" >&2 desired_context="$only_context" elif [[ $context_count -eq 1 && "${only_context:-}" == "default" ]]; then - if _prole_select_kubeconfig_for_context "$desired_context"; then + if _knoe_select_kubeconfig_for_context "$desired_context"; then context_names=$(kubectl config get-contexts -o name 2>/dev/null || true) if grep -Fxq "$desired_context" <<<"$context_names"; then only_context="" @@ -1524,7 +1524,7 @@ ensure_kube_context() { fi else echo "ERROR: Requested kubectl context '${desired_context}' not found in active KUBECONFIG." >&2 - echo " The only available context is 'default' which is not valid for prole operations." >&2 + echo " The only available context is 'default' which is not valid for knoe operations." >&2 echo " Ensure KUBECONFIG includes a kubeconfig with context '${desired_context}'." >&2 echo " Available kubeconfigs: KUBECONFIG='${KUBECONFIG:-}'" >&2 echo " Run: export KUBECONFIG=~/.kube/config (or the file containing '${desired_context}')" >&2 @@ -1555,7 +1555,7 @@ ensure_kube_context() { local cluster_name target_context cluster_name="${K3D_CLUSTER_NAME:-knoe-dev-cluster}" target_context="k3d-${cluster_name}" - echo "WARN: prole.cfg mode is 'k3d' but current kubectx is '${current_context:-}'" >&2 + echo "WARN: knoe.cfg mode is 'k3d' but current kubectx is '${current_context:-}'" >&2 if ! switch_kube_context "$target_context" "k3d mode requires k3d context" "$kubeconfig_path"; then return 1 fi @@ -1565,8 +1565,8 @@ ensure_kube_context() { if [[ "$current_context" != k3d-* ]]; then return 0 fi - echo "WARN: prole.cfg mode is '${mode}' but current kubectx is '${current_context}' (a k3d context)" >&2 - echo "INFO: Switching kubectl context to match KUBECONFIG='${KUBECONFIG:-}' (prole.cfg overrides local env)" >&2 + echo "WARN: knoe.cfg mode is '${mode}' but current kubectx is '${current_context}' (a k3d context)" >&2 + echo "INFO: Switching kubectl context to match KUBECONFIG='${KUBECONFIG:-}' (knoe.cfg overrides local env)" >&2 local target_context if [[ -n "${KUBECONTEXT:-}" ]]; then target_context="${KUBECONTEXT}" @@ -1587,15 +1587,15 @@ ensure_kube_context() { } # Backward compatibility for existing scripts/tests that still call the legacy name. -prole_ensure_kube_context() { +knoe_ensure_kube_context() { ensure_kube_context "$@" } -if _prole_is_secret_ref "${PROLE_K3S_TOKEN:-}"; then - if _prole_is_openbao_ref "${PROLE_K3S_TOKEN:-}"; then - _decoded=$(_prole_resolve_openbao_ref "${PROLE_K3S_TOKEN:-}") +if _knoe_is_secret_ref "${PROLE_K3S_TOKEN:-}"; then + if _knoe_is_openbao_ref "${PROLE_K3S_TOKEN:-}"; then + _decoded=$(_knoe_resolve_openbao_ref "${PROLE_K3S_TOKEN:-}") else - _decoded=$(_prole_decrypt_prole_secret "${PROLE_K3S_TOKEN:-}") + _decoded=$(_knoe_decrypt_knoe_secret "${PROLE_K3S_TOKEN:-}") fi if [[ -n "$_decoded" ]]; then PROLE_K3S_TOKEN="$_decoded" @@ -1604,11 +1604,11 @@ if _prole_is_secret_ref "${PROLE_K3S_TOKEN:-}"; then unset PROLE_K3S_TOKEN fi fi -if _prole_is_secret_ref "${K3S_TOKEN:-}"; then - if _prole_is_openbao_ref "${K3S_TOKEN:-}"; then - _decoded=$(_prole_resolve_openbao_ref "${K3S_TOKEN:-}") +if _knoe_is_secret_ref "${K3S_TOKEN:-}"; then + if _knoe_is_openbao_ref "${K3S_TOKEN:-}"; then + _decoded=$(_knoe_resolve_openbao_ref "${K3S_TOKEN:-}") else - _decoded=$(_prole_decrypt_prole_secret "${K3S_TOKEN:-}") + _decoded=$(_knoe_decrypt_knoe_secret "${K3S_TOKEN:-}") fi if [[ -n "$_decoded" ]]; then K3S_TOKEN="$_decoded" @@ -1619,49 +1619,49 @@ if _prole_is_secret_ref "${K3S_TOKEN:-}"; then fi if [[ -z "${KUBECONFIG:-}" ]]; then - _prole_mode_guess="" - if command -v prole_normalize_mode >/dev/null 2>&1; then - _prole_mode_guess=$(prole_normalize_mode "${PROLE_MODE:-${DEPLOYMENT_MODE:-${CLUSTER_ENV:-}}}") + _knoe_mode_guess="" + if command -v knoe_normalize_mode >/dev/null 2>&1; then + _knoe_mode_guess=$(knoe_normalize_mode "${KNOE_MODE:-${DEPLOYMENT_MODE:-${CLUSTER_ENV:-}}}") else - _prole_mode_guess="${PROLE_MODE:-${DEPLOYMENT_MODE:-${CLUSTER_ENV:-}}}" + _knoe_mode_guess="${KNOE_MODE:-${DEPLOYMENT_MODE:-${CLUSTER_ENV:-}}}" fi - if [[ "$_prole_mode_guess" == "k3s" ]]; then - prole_ensure_kubeconfig || true + if [[ "$_knoe_mode_guess" == "k3s" ]]; then + knoe_ensure_kubeconfig || true fi - unset _prole_mode_guess + unset _knoe_mode_guess fi -_prole_child_ns="${PROLE_NAMESPACE:-}" -_prole_child_id="" +_knoe_child_ns="${PROLE_NAMESPACE:-}" +_knoe_child_id="" if [[ -n "${PROLE_CHILD_ID:-}" ]]; then - _prole_child_id="${PROLE_CHILD_ID}" -elif [[ -n "$_prole_child_ns" && "$_prole_child_ns" =~ ^knoe-db-([A-Za-z0-9]+)$ ]]; then - _prole_child_id=$(printf '%s' "${BASH_REMATCH[1]}" | tr '[:lower:]' '[:upper:]') + _knoe_child_id="${PROLE_CHILD_ID}" +elif [[ -n "$_knoe_child_ns" && "$_knoe_child_ns" =~ ^knoe-db-([A-Za-z0-9]+)$ ]]; then + _knoe_child_id=$(printf '%s' "${BASH_REMATCH[1]}" | tr '[:lower:]' '[:upper:]') fi -_prole_parent_realm="${PROLE_PARENT_REALM:-${REALM:-${KRB5_REALM:-${kerberos_config_realm:-}}}}" -if [[ -n "$_prole_parent_realm" ]]; then - _prole_parent_realm=$(printf '%s' "$_prole_parent_realm" | tr '[:lower:]' '[:upper:]') +_knoe_parent_realm="${PROLE_PARENT_REALM:-${REALM:-${KRB5_REALM:-${kerberos_config_realm:-}}}}" +if [[ -n "$_knoe_parent_realm" ]]; then + _knoe_parent_realm=$(printf '%s' "$_knoe_parent_realm" | tr '[:lower:]' '[:upper:]') if [[ -z "${PROLE_PARENT_REALM:-}" ]]; then - PROLE_PARENT_REALM="$_prole_parent_realm" + PROLE_PARENT_REALM="$_knoe_parent_realm" export PROLE_PARENT_REALM fi fi -if [[ -n "$_prole_child_id" ]]; then - PROLE_CHILD_ID="${PROLE_CHILD_ID:-$_prole_child_id}" +if [[ -n "$_knoe_child_id" ]]; then + PROLE_CHILD_ID="${PROLE_CHILD_ID:-$_knoe_child_id}" export PROLE_CHILD_ID if [[ -n "${PROLE_CHILD_REALM:-}" ]]; then : - elif [[ -n "$_prole_parent_realm" ]]; then - if [[ "$_prole_parent_realm" == "${PROLE_CHILD_ID}."* ]]; then - PROLE_CHILD_REALM="$_prole_parent_realm" + elif [[ -n "$_knoe_parent_realm" ]]; then + if [[ "$_knoe_parent_realm" == "${PROLE_CHILD_ID}."* ]]; then + PROLE_CHILD_REALM="$_knoe_parent_realm" if [[ -z "${PROLE_PARENT_REALM:-}" ]]; then - PROLE_PARENT_REALM="${_prole_parent_realm#${PROLE_CHILD_ID}.}" + PROLE_PARENT_REALM="${_knoe_parent_realm#${PROLE_CHILD_ID}.}" export PROLE_PARENT_REALM fi else - PROLE_CHILD_REALM="${PROLE_CHILD_ID}.${_prole_parent_realm}" + PROLE_CHILD_REALM="${PROLE_CHILD_ID}.${_knoe_parent_realm}" fi fi @@ -1679,7 +1679,7 @@ if [[ -z "${PROLE_USE_CHILD_REALM:-}" && -n "${PROLE_CHILD_REALM:-}" ]]; then export PROLE_USE_CHILD_REALM fi -if _prole_bool_true "${PROLE_USE_CHILD_REALM:-}" && [[ -n "${PROLE_CHILD_REALM:-}" ]]; then +if _knoe_bool_true "${PROLE_USE_CHILD_REALM:-}" && [[ -n "${PROLE_CHILD_REALM:-}" ]]; then if [[ -z "${KRB5_REALM:-}" || ( -n "${PROLE_PARENT_REALM:-}" && "${KRB5_REALM}" == "${PROLE_PARENT_REALM}" ) ]]; then KRB5_REALM="${PROLE_CHILD_REALM}" export KRB5_REALM @@ -1690,7 +1690,7 @@ if _prole_bool_true "${PROLE_USE_CHILD_REALM:-}" && [[ -n "${PROLE_CHILD_REALM:- fi fi -prole_register_port_forward() { +knoe_register_port_forward() { local id="$1" ns="$2" target="$3" hostPort="$4" servicePort="$5" local addr="${6:-0.0.0.0}" local proto="${7:-TCP}" @@ -1698,7 +1698,7 @@ prole_register_port_forward() { echo "PORT_FORWARD_MAPPING: id=$id;namespace=$ns;target=$target;address=$addr;hostPort=$hostPort;servicePort=$servicePort;protocol=$proto;description=$desc" } -unset _prole_cfg_script_dir -unset _prole_cfg_home_guess -unset _prole_cfg_file +unset _knoe_cfg_script_dir +unset _knoe_cfg_home_guess +unset _knoe_cfg_file unset _PROLE_CFG_SET_VARS diff --git a/etc/lib/shell/common_core_lib.sh b/etc/lib/shell/common_core_lib.sh index c69ddec..47923de 100644 --- a/etc/lib/shell/common_core_lib.sh +++ b/etc/lib/shell/common_core_lib.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash # Shared helpers for common core init scripts (ArgoCD, OpenBao, OpenTofu, Garage). # Responsibilities: -# - handle [-c|--config] early so prole_cfg.sh loads the right config file +# - handle [-c|--config] early so knoe_cfg.sh loads the right config file # - parse standard actions/options # - resolve and apply namespaces consistently @@ -10,11 +10,11 @@ COMMON_CORE_ACTIONS="start|stop|status|restart|initialize|update|reload" common_core_default_config_path() { local script_dir="${1:-}" - local mode_hint="${PROLE_MODE:-${DEPLOYMENT_MODE:-${CLUSTER_ENV:-}}}" + local mode_hint="${KNOE_MODE:-${DEPLOYMENT_MODE:-${CLUSTER_ENV:-}}}" local mode="${mode_hint,,}" - if declare -F prole_normalize_mode >/dev/null 2>&1; then - mode="$(prole_normalize_mode "$mode_hint")" + if declare -F knoe_normalize_mode >/dev/null 2>&1; then + mode="$(knoe_normalize_mode "$mode_hint")" fi case "$mode" in @@ -30,7 +30,7 @@ common_core_default_config_path() { esac local cfg - for cfg in k3d.cfg k3s.cfg gke.cfg prole.cfg; do + for cfg in k3d.cfg k3s.cfg gke.cfg knoe.cfg; do if [[ -f "$script_dir/../conf/$cfg" ]]; then printf '%s' "$script_dir/../conf/$cfg" return 0 @@ -39,9 +39,9 @@ common_core_default_config_path() { return 1 } -# Parse -c/--config before loading prole_cfg.sh so PROLE_CONF is set in time. +# Parse -c/--config before loading knoe_cfg.sh so KNOE_CONF is set in time. # Sets: -# COMMON_CORE_CONFIG_PATH - path to prole.cfg (if provided) +# COMMON_CORE_CONFIG_PATH - path to knoe.cfg (if provided) # COMMON_CORE_ARGS - original arguments minus -c/--config common_core_preparse_config() { COMMON_CORE_CONFIG_PATH="" @@ -73,16 +73,16 @@ common_core_preparse_config() { fi local cfg_dir cfg_dir=$(cd "$(dirname "$COMMON_CORE_CONFIG_PATH")" && pwd) - # Preserve an already-set PROLE_CONF when it is a more-specific env subdir of + # Preserve an already-set KNOE_CONF when it is a more-specific env subdir of # cfg_dir (e.g. conf/service/ vs the injected-default conf/). This allows the # parent shell / Python milestone to pass the correct env-specific conf dir and # have it survive even when init scripts inject a generic fallback -c path. - local _current_conf="${PROLE_CONF:-}" - if [[ -n "$_current_conf" && "$_current_conf" == "${cfg_dir}/"* && ( -f "$_current_conf/k3d.cfg" || -f "$_current_conf/k3s.cfg" || -f "$_current_conf/gke.cfg" || -f "$_current_conf/prole.cfg" ) ]]; then - : # keep inherited PROLE_CONF — it is already more specific than cfg_dir + local _current_conf="${KNOE_CONF:-}" + if [[ -n "$_current_conf" && "$_current_conf" == "${cfg_dir}/"* && ( -f "$_current_conf/k3d.cfg" || -f "$_current_conf/k3s.cfg" || -f "$_current_conf/gke.cfg" || -f "$_current_conf/knoe.cfg" ) ]]; then + : # keep inherited KNOE_CONF — it is already more specific than cfg_dir else - PROLE_CONF="$cfg_dir" - export PROLE_CONF + KNOE_CONF="$cfg_dir" + export KNOE_CONF fi fi } @@ -103,10 +103,10 @@ common_core_parse_args() { case "$1" in -m|--mode) shift - prole_set_mode "${1:-}" + knoe_set_mode "${1:-}" ;; -m=*|--mode=*) - prole_set_mode "${1#*=}" + knoe_set_mode "${1#*=}" ;; -n|--namespace) shift @@ -162,9 +162,9 @@ common_core_resolve_namespace() { # In k3s mode, common core services must not default into the `default` namespace. # If the caller didn't supply an explicit namespace, normalize `default` -> SERVICE_NAMESPACE # from config (Explicit `-n default` is treated as a legacy/mistake and will be corrected). - local mode="${PROLE_MODE:-}" - if declare -F prole_normalize_mode >/dev/null 2>&1; then - mode="$(prole_normalize_mode "$mode")" + local mode="${KNOE_MODE:-}" + if declare -F knoe_normalize_mode >/dev/null 2>&1; then + mode="$(knoe_normalize_mode "$mode")" fi if [[ "$mode" == "k3s" && "$ns" == "default" ]]; then if [[ -n "${SERVICE_NAMESPACE:-}" && "${SERVICE_NAMESPACE}" != "default" ]]; then @@ -172,7 +172,7 @@ common_core_resolve_namespace() { elif [[ -n "${PROLE_NAMESPACE:-}" && "${PROLE_NAMESPACE}" != "default" ]]; then ns="$PROLE_NAMESPACE" else - echo "ERROR: k3s mode requires a non-default service namespace. Set SERVICE_NAMESPACE in prole.cfg or pass -n." >&2 + echo "ERROR: k3s mode requires a non-default service namespace. Set SERVICE_NAMESPACE in knoe.cfg or pass -n." >&2 exit 2 fi fi @@ -195,7 +195,7 @@ common_core_apply_namespace() { # - This is intended for early-install order-of-operations cases where a user-provided # secret/password is not available yet. # - Callers should treat this as a temporary credential that can be overwritten later. -prole_generate_password() { +knoe_generate_password() { local length="${1:-32}" local out="" diff --git a/etc/lib/shell/prole_cmd.sh b/etc/lib/shell/prole_cmd.sh index 1c9aeb9..48b1f6b 100644 --- a/etc/lib/shell/prole_cmd.sh +++ b/etc/lib/shell/prole_cmd.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -prole_kubectl_exec_cmd() { +knoe_kubectl_exec_cmd() { local ns="$1" local pod="$2" local cmd="$3" diff --git a/etc/lib/shell/prole_env.sh b/etc/lib/shell/prole_env.sh index 5c0c16d..ac44e67 100644 --- a/etc/lib/shell/prole_env.sh +++ b/etc/lib/shell/prole_env.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -prole_first_nonempty() { +knoe_first_nonempty() { local v for v in "$@"; do if [[ -n "$v" ]]; then diff --git a/etc/lib/shell/prole_guardrails.sh b/etc/lib/shell/prole_guardrails.sh index 59154b1..2cdb058 100644 --- a/etc/lib/shell/prole_guardrails.sh +++ b/etc/lib/shell/prole_guardrails.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -prole_guard_nonempty() { +knoe_guard_nonempty() { local name="$1" local value="${2:-}" if [[ -z "$value" ]]; then diff --git a/etc/lib/shell/prole_secrets.sh b/etc/lib/shell/prole_secrets.sh index e8d52e3..9787933 100644 --- a/etc/lib/shell/prole_secrets.sh +++ b/etc/lib/shell/prole_secrets.sh @@ -1,35 +1,35 @@ #!/usr/bin/env bash -prole_is_openbao_ref() { +knoe_is_openbao_ref() { local v="${1:-}" [[ "$v" == '${OPENBAO:'* ]] } -prole_is_prole_secret_ref() { +knoe_is_knoe_secret_ref() { local v="${1:-}" - [[ "$v" == '${PROLE_SECRET:'* ]] + [[ "$v" == '${KNOE_SECRET:'* ]] } -prole_is_secret_ref() { +knoe_is_secret_ref() { local v="${1:-}" - prole_is_openbao_ref "$v" || prole_is_prole_secret_ref "$v" + knoe_is_openbao_ref "$v" || knoe_is_knoe_secret_ref "$v" } # Returns 0 when the current value is empty or is a secret reference and therefore # should be resolved from the configured secret backend. -prole_secret_needs_resolution() { +knoe_secret_needs_resolution() { local current="${1:-}" - [[ -z "$current" ]] || prole_is_secret_ref "$current" + [[ -z "$current" ]] || knoe_is_secret_ref "$current" } # Pure precedence helper: # - If current value is a literal non-empty value, keep it. # - If current is empty or a secret ref, prefer a non-empty fetched value. -prole_secret_choose_value() { +knoe_secret_choose_value() { local current="${1:-}" local fetched="${2:-}" - if prole_secret_needs_resolution "$current"; then + if knoe_secret_needs_resolution "$current"; then if [[ -n "$fetched" && "$fetched" != "null" ]]; then printf '%s' "$fetched" return 0 diff --git a/etc/lib/shell/prole_string.sh b/etc/lib/shell/prole_string.sh index 85f8f8e..abe0a32 100644 --- a/etc/lib/shell/prole_string.sh +++ b/etc/lib/shell/prole_string.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -prole_trim() { +knoe_trim() { local s="${1:-}" # Trim leading/trailing whitespace without invoking external tools. s="${s#${s%%[![:space:]]*}}" @@ -8,9 +8,9 @@ prole_trim() { printf '%s' "$s" } -prole_normalize_realm() { +knoe_normalize_realm() { local realm - realm=$(prole_trim "${1:-}") + realm=$(knoe_trim "${1:-}") if [[ -z "$realm" ]]; then printf '%s' "" return 0 diff --git a/etc/lib/shell/prole_yaml.sh b/etc/lib/shell/prole_yaml.sh index a90eb25..4947a29 100644 --- a/etc/lib/shell/prole_yaml.sh +++ b/etc/lib/shell/prole_yaml.sh @@ -3,7 +3,7 @@ # Extract a simple scalar `key: value` from a YAML file. # - Intended for flat `group_vars` style YAML only (no nesting). # - Strips surrounding quotes. -prole_yaml_get_scalar() { +knoe_yaml_get_scalar() { local file="$1" local key="$2" diff --git a/etc/render_manifest.py b/etc/render_manifest.py index 9986a17..bbdf63a 100644 --- a/etc/render_manifest.py +++ b/etc/render_manifest.py @@ -100,7 +100,7 @@ def main() -> int: return 1 text = path.read_text() - mode = os.environ.get("PROLE_MODE", "").strip().lower() + mode = os.environ.get("KNOE_MODE", "").strip().lower() if mode != "k3d": sys.stdout.write(text) return 0 diff --git a/etc/repair_pipeline.sh b/etc/repair_pipeline.sh index 686dfbd..4a5e26b 100755 --- a/etc/repair_pipeline.sh +++ b/etc/repair_pipeline.sh @@ -70,8 +70,8 @@ while [[ $# -gt 0 ]]; do shift done -export PROLE_HOME="${PROLE_HOME:-$ROOT_DIR}" -export PROLE_CONF="${PROLE_CONF:-${CFG_PATH:-$PROLE_HOME/conf}}" +export KNOE_HOME="${KNOE_HOME:-$ROOT_DIR}" +export KNOE_CONF="${KNOE_CONF:-${CFG_PATH:-$KNOE_HOME/conf}}" # Ensure local imports work when invoked from a copied script location. export PYTHONPATH="$ROOT_DIR${PYTHONPATH:+:$PYTHONPATH}" @@ -86,6 +86,6 @@ fi if [[ -n "$MODE" ]]; then args+=("--mode" "$MODE") fi -args+=("--config" "$PROLE_CONF") +args+=("--config" "$KNOE_CONF") exec python3 -m knoe.core.repair_pipeline_cli "${args[@]}" diff --git a/etc/set-k3s-token-vault.sh b/etc/set-k3s-token-vault.sh index c4d8519..b8e3378 100755 --- a/etc/set-k3s-token-vault.sh +++ b/etc/set-k3s-token-vault.sh @@ -3,7 +3,7 @@ set -euo pipefail SCRIPT_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) # shellcheck disable=SC1090 -source "$SCRIPT_DIR/prole_cfg.sh" +source "$SCRIPT_DIR/knoe_cfg.sh" # Where k3s keeps the server join token on the first/control-plane server TOKEN_FILE="${TOKEN_FILE:-/var/lib/rancher/k3s/server/node-token}" @@ -17,7 +17,7 @@ VAR_NAME="${VAR_NAME:-vault_k3s_token}" if [[ ! -r "$TOKEN_FILE" ]]; then echo "ERROR: Cannot read token file: $TOKEN_FILE" - echo "Are you running this on a k3s server (pi.prole.org)?" + echo "Are you running this on a k3s server (pi.knoe.org)?" exit 1 fi @@ -68,4 +68,4 @@ echo "Wrote: $VAULT_FILE" echo "Var: $VAR_NAME" echo echo "Verify with:" -echo " ansible -i infrastructure/inventory/hosts.ini pi.prole.org -m assert -a 'that=${VAR_NAME} is defined' --ask-vault-pass" +echo " ansible -i infrastructure/inventory/hosts.ini pi.knoe.org -m assert -a 'that=${VAR_NAME} is defined' --ask-vault-pass" diff --git a/etc/status.sh b/etc/status.sh index b39e858..a5a8c52 100755 --- a/etc/status.sh +++ b/etc/status.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -# etc/status.sh — Overall deployment health check for the Prole k3d environment. +# etc/status.sh — Overall deployment health check for the Knoe k3d environment. # Usage: status.sh [-c conf/{k3d|k3s|gke}.cfg] [-v|--verbose] # Exit 0 = score of 100% (all components healthy) # Exit 1 = score < 100% @@ -9,7 +9,7 @@ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" PROJECT_ROOT="$(cd "$SCRIPT_DIR/.." && pwd)" # shellcheck disable=SC1090 -source "$SCRIPT_DIR/prole_cfg.sh" +source "$SCRIPT_DIR/knoe_cfg.sh" # ── colours (disabled when stdout is not a tty) ───────────────────────── if [[ -t 1 ]] || [[ "${CLICOLOR_FORCE:-0}" == "1" ]]; then @@ -86,7 +86,7 @@ done # ── load config (always) ──────────────────────────────────────────────── if [[ -z "$CFG_PATH" ]]; then - CFG_PATH="$(_prole_cfg_select_cfg_file "$PROJECT_ROOT/conf")" + CFG_PATH="$(_knoe_cfg_select_cfg_file "$PROJECT_ROOT/conf")" fi [[ -z "$CFG_PATH" ]] && CFG_PATH="$PROJECT_ROOT/conf/k3d.cfg" if [[ ! -f "$CFG_PATH" ]]; then @@ -131,12 +131,12 @@ if [[ -z "$KUBECONFIG" ]]; then fi fi # Fallback: project-local kubeconfig (only if it can reach the cluster) -if [[ -z "${KUBECONFIG:-}" && -f "$PROJECT_ROOT/prole-k3s.kubeconfig" ]]; then +if [[ -z "${KUBECONFIG:-}" && -f "$PROJECT_ROOT/knoe-k3s.kubeconfig" ]]; then # Only auto-select the project-local k3s kubeconfig when explicitly running in k3s mode. # In k3d mode, this kubeconfig may be reachable but is the wrong cluster. if [[ "${_deployment_mode,,}" == "k3s" ]]; then - if KUBECONFIG="$PROJECT_ROOT/prole-k3s.kubeconfig" kubectl cluster-info >/dev/null 2>&1; then - export KUBECONFIG="$PROJECT_ROOT/prole-k3s.kubeconfig" + if KUBECONFIG="$PROJECT_ROOT/knoe-k3s.kubeconfig" kubectl cluster-info >/dev/null 2>&1; then + export KUBECONFIG="$PROJECT_ROOT/knoe-k3s.kubeconfig" fi fi fi @@ -169,7 +169,7 @@ SUPABASE_WEIGHT=10 # Only counted if supabase is enabled # ── header ─────────────────────────────────────────────────────────────── echo "" -printf "${BOLD}Prole Deployment Status${NC}\n" +printf "${BOLD}Knoe Deployment Status${NC}\n" echo "───────────────────────────────────────────" info "Config: $CFG_PATH" info "Namespace: $PROLE_NAMESPACE" @@ -289,7 +289,7 @@ run_status_check() { fi local _output_file - _output_file=$(mktemp "${TMPDIR:-/tmp}/prole_status_XXXXXX") + _output_file=$(mktemp "${TMPDIR:-/tmp}/knoe_status_XXXXXX") local rc run_with_timeout "$STATUS_CHECK_TIMEOUT" bash "$script_path" status >"$_output_file" 2>&1 && rc=0 || rc=$? @@ -377,7 +377,7 @@ if [[ -f "$SCRIPT_DIR/status_common_services.sh" ]]; then if _is_true "${_kerberos_enabled:-false}"; then cs_args+=("-k") fi - _cs_output_file=$(mktemp "${TMPDIR:-/tmp}/prole_cs_status_XXXXXX") + _cs_output_file=$(mktemp "${TMPDIR:-/tmp}/knoe_cs_status_XXXXXX") run_with_timeout "$STATUS_CHECK_TIMEOUT" bash "$SCRIPT_DIR/status_common_services.sh" "${cs_args[@]}" >"$_cs_output_file" 2>&1 && cs_rc=0 || cs_rc=$? cs_output=$(cat "$_cs_output_file" 2>/dev/null || true) rm -f "$_cs_output_file" diff --git a/etc/status_common_services.sh b/etc/status_common_services.sh index 7e9b4d5..a4169a2 100755 --- a/etc/status_common_services.sh +++ b/etc/status_common_services.sh @@ -22,14 +22,14 @@ unset _has_config _arg _default_cfg common_core_preparse_config "$@" # shellcheck disable=SC1090 -source "$SCRIPT_DIR/prole_cfg.sh" +source "$SCRIPT_DIR/knoe_cfg.sh" usage() { cat </dev/null 2>&1; then fi current_mode() { - if declare -F prole_normalize_mode >/dev/null 2>&1; then - prole_normalize_mode "${PROLE_MODE:-${DEPLOYMENT_MODE:-}}" + if declare -F knoe_normalize_mode >/dev/null 2>&1; then + knoe_normalize_mode "${KNOE_MODE:-${DEPLOYMENT_MODE:-}}" return 0 fi - printf '%s' "${PROLE_MODE:-${DEPLOYMENT_MODE:-}}" + printf '%s' "${KNOE_MODE:-${DEPLOYMENT_MODE:-}}" } MODE="$(current_mode)" @@ -293,13 +293,13 @@ check_deploy_image() { check_k3d_registry() { if command -v k3d >/dev/null 2>&1; then - if k3d registry list --no-headers 2>/dev/null | awk '{print $1}' | grep -qx 'prole-registry'; then - echo "[OK] registry/registry exists (k3d: prole-registry)" + if k3d registry list --no-headers 2>/dev/null | awk '{print $1}' | grep -qx 'knoe-registry'; then + echo "[OK] registry/registry exists (k3d: knoe-registry)" return 0 fi fi if command -v docker >/dev/null 2>&1; then - if docker ps --format '{{.Names}}' 2>/dev/null | grep -Eq '^(k3d-prole-registry|prole-registry)$'; then + if docker ps --format '{{.Names}}' 2>/dev/null | grep -Eq '^(k3d-knoe-registry|knoe-registry)$'; then echo "[OK] registry/registry exists (docker)" return 0 fi @@ -572,8 +572,8 @@ if [ $blocked -gt 0 ]; then printf '%b' "$blocked_lines" # ── Round 4: reset k3d cluster, preserve registry ───────────────────────── - _prole_mode="${PROLE_MODE:-}" - if [[ "$_prole_mode" == "k3d" ]]; then + _knoe_mode="${KNOE_MODE:-}" + if [[ "$_knoe_mode" == "k3d" ]]; then echo "" echo "== Repair Round 4: resetting k3d cluster (preserving registry) ==" _cluster_name="${K3D_CLUSTER_NAME:-knoe-dev-cluster}" @@ -624,7 +624,7 @@ if [ $blocked -gt 0 ]; then fi echo "" - echo "Status: NOTICE (blocked pods remain; k3d cluster reset not applicable for mode '${_prole_mode:-unknown}')" + echo "Status: NOTICE (blocked pods remain; k3d cluster reset not applicable for mode '${_knoe_mode:-unknown}')" exit 3 fi diff --git a/etc/sync-prole-cfg.py b/etc/sync-knoe-cfg.py similarity index 72% rename from etc/sync-prole-cfg.py rename to etc/sync-knoe-cfg.py index 6c74ab3..ad447e7 100644 --- a/etc/sync-prole-cfg.py +++ b/etc/sync-knoe-cfg.py @@ -22,9 +22,9 @@ def main(): if token: print("Syncing K3S_TOKEN to active config...") - inst_config._update_prole_cfg_value("Global", "PROLE_K3S_TOKEN", token) - inst_config._update_prole_cfg_value("Inputs", "init_cluster.k3s_token", token) - inst_config._update_prole_cfg_value("Service Cluster (k3s)", "K3S_TOKEN", token) + inst_config._update_knoe_cfg_value("Global", "PROLE_K3S_TOKEN", token) + inst_config._update_knoe_cfg_value("Inputs", "init_cluster.k3s_token", token) + inst_config._update_knoe_cfg_value("Service Cluster (k3s)", "K3S_TOKEN", token) else: print("Warning: Could not extract vault_k3s_token from Ansible vault.") diff --git a/gitea/deploy.sh b/gitea/deploy.sh index 09926ff..0fd9025 100755 --- a/gitea/deploy.sh +++ b/gitea/deploy.sh @@ -72,38 +72,38 @@ apply_defaults() { ENV_FILE="$DOCKER_DIR/.env" GITEA_K8S_DIR="${GITEA_K8S_DIR:-$SCRIPT_DIR/k8s}" local default_owner - default_owner="$(id -un 2>/dev/null || echo prole)" - local data_root="${PROLE_DATA:-/opt/prole/data/${default_owner}}" + default_owner="$(id -un 2>/dev/null || echo knoe)" + local data_root="${PROLE_DATA:-/opt/knoe/data/${default_owner}}" data_root="${data_root%/}" DOCKER_IMPORT_DIR="${DOCKER_IMPORT_DIR:-$data_root/docker-import}" GITEA_IMAGE_PLATFORM="${GITEA_IMAGE_PLATFORM:-}" GITEA_IMAGE_PLATFORMS="${GITEA_IMAGE_PLATFORMS:-linux/amd64 linux/arm64}" GITEA_IMAGE_TAG="${GITEA_IMAGE_TAG:-1.22.3}" - GITEA_DOMAIN="${GITEA_DOMAIN:-git.prole.org}" - GITEA_SSH_DOMAIN="${GITEA_SSH_DOMAIN:-git.prole.org}" + GITEA_DOMAIN="${GITEA_DOMAIN:-git.knoe.org}" + GITEA_SSH_DOMAIN="${GITEA_SSH_DOMAIN:-git.knoe.org}" GITEA_NAMESPACE="${GITEA_NAMESPACE:-gitea}" KNOE_DB_SERVICE="${KNOE_DB_SERVICE:-knoe-db-rw}" KNOE_DB_NAMESPACE="${KNOE_DB_NAMESPACE:-}" AUTHORITY_NAMESPACE="${AUTHORITY_NAMESPACE:-authority}" AUTHORITY_SERVICE="${AUTHORITY_SERVICE:-authority-ldap}" AUTHORITY_LDAP_PORT="${AUTHORITY_LDAP_PORT:-389}" - AUTHORITY_BASE_DN="${AUTHORITY_BASE_DN:-dc=prole,dc=org}" - AUTHORITY_BIND_DN="${AUTHORITY_BIND_DN:-cn=gitea,ou=services,dc=prole,dc=org}" + AUTHORITY_BASE_DN="${AUTHORITY_BASE_DN:-dc=knoe,dc=org}" + AUTHORITY_BIND_DN="${AUTHORITY_BIND_DN:-cn=gitea,ou=services,dc=knoe,dc=org}" AUTHORITY_BIND_PASSWORD="${AUTHORITY_BIND_PASSWORD:-}" } -load_prole_cfg() { - local cfg_loader="$PROJECT_ROOT/etc/prole_cfg.sh" +load_knoe_cfg() { + local cfg_loader="$PROJECT_ROOT/etc/knoe_cfg.sh" local cfg_path="${PROLE_CFG_PATH:-}" local candidate="" if [[ -z "$cfg_path" ]]; then - if [[ -n "${PROLE_CONF:-}" ]]; then + if [[ -n "${KNOE_CONF:-}" ]]; then for candidate in \ - "${PROLE_CONF%/}/k3d.cfg" \ - "${PROLE_CONF%/}/k3s.cfg" \ - "${PROLE_CONF%/}/gke.cfg" \ - "${PROLE_CONF%/}/prole.cfg"; do + "${KNOE_CONF%/}/k3d.cfg" \ + "${KNOE_CONF%/}/k3s.cfg" \ + "${KNOE_CONF%/}/gke.cfg" \ + "${KNOE_CONF%/}/knoe.cfg"; do if [[ -f "$candidate" ]]; then cfg_path="$candidate" break @@ -115,8 +115,8 @@ load_prole_cfg() { cfg_path="$PROJECT_ROOT/conf/k3s.cfg" elif [[ -f "$PROJECT_ROOT/conf/gke.cfg" ]]; then cfg_path="$PROJECT_ROOT/conf/gke.cfg" - elif [[ -f "$PROJECT_ROOT/conf/prole.cfg" ]]; then - cfg_path="$PROJECT_ROOT/conf/prole.cfg" + elif [[ -f "$PROJECT_ROOT/conf/knoe.cfg" ]]; then + cfg_path="$PROJECT_ROOT/conf/knoe.cfg" fi fi @@ -126,11 +126,11 @@ load_prole_cfg() { if [[ -n "$cfg_path" ]]; then if [[ -d "$cfg_path" ]]; then - cfg_path="$cfg_path/prole.cfg" + cfg_path="$cfg_path/knoe.cfg" fi [[ -f "$cfg_path" ]] || die "Config file not found: $cfg_path" - PROLE_CONF="$(cd "$(dirname "$cfg_path")" && pwd)" - export PROLE_CONF + KNOE_CONF="$(cd "$(dirname "$cfg_path")" && pwd)" + export KNOE_CONF PROLE_CFG_PATH="$cfg_path" fi @@ -138,14 +138,14 @@ load_prole_cfg() { # shellcheck disable=SC1090 source "$cfg_loader" else - warn "prole_cfg.sh not found; config defaults may be incomplete." + warn "knoe_cfg.sh not found; config defaults may be incomplete." fi } register_gitea_ports() { - if command -v prole_register_port_forward >/dev/null 2>&1; then - prole_register_port_forward "gitea-http" "$GITEA_NAMESPACE" "svc/gitea-http" "3000" "3000" "0.0.0.0" "TCP" "Gitea Web UI" - prole_register_port_forward "gitea-ssh" "$GITEA_NAMESPACE" "svc/gitea-ssh" "2222" "22" "0.0.0.0" "TCP" "Gitea SSH" + if command -v knoe_register_port_forward >/dev/null 2>&1; then + knoe_register_port_forward "gitea-http" "$GITEA_NAMESPACE" "svc/gitea-http" "3000" "3000" "0.0.0.0" "TCP" "Gitea Web UI" + knoe_register_port_forward "gitea-ssh" "$GITEA_NAMESPACE" "svc/gitea-ssh" "2222" "22" "0.0.0.0" "TCP" "Gitea SSH" fi } @@ -357,7 +357,7 @@ run_local() { local compose compose="$(compose_cmd)" - log "Prole::Gitea local deploy (Docker Compose)" + log "Knoe::Gitea local deploy (Docker Compose)" log "Repo: $GITEA_DIR" log "Namespace: gitea (Compose project name)" @@ -628,8 +628,8 @@ resolve_knoe_db_namespace() { return 0 fi - if kubectl get namespace prole >/dev/null 2>&1; then - KNOE_DB_NAMESPACE="prole" + if kubectl get namespace knoe >/dev/null 2>&1; then + KNOE_DB_NAMESPACE="knoe" else KNOE_DB_NAMESPACE="default" fi @@ -773,7 +773,7 @@ gitea: ISSUE_INDEXER_TYPE: bleve REPO_INDEXER_ENABLED: "true" ldap: - - name: "prole-authority" + - name: "knoe-authority" securityProtocol: unencrypted host: "${ldap_host}" port: "${AUTHORITY_LDAP_PORT}" @@ -937,7 +937,7 @@ run_helm() { # Apply Kong ingress separately for k3s context if [[ "$MODE" == "k3s" ]]; then write_kong_ingress_k3s "$k8s_dir" - log "Applying Kong ingress for git.prole.org..." + log "Applying Kong ingress for git.knoe.org..." kubectl apply -f "$k8s_dir/gitea-kong-ingress.yaml" fi register_gitea_ports @@ -1065,7 +1065,7 @@ run_k3d() { return 0 fi - log "Prole::Gitea k3d deploy (Kubernetes)" + log "Knoe::Gitea k3d deploy (Kubernetes)" log "Repo: $GITEA_DIR" require_cmd kubectl @@ -1092,9 +1092,9 @@ run_k3d() { } run_k8s() { - # Helm-first path (preferred) — for k3s use context prole_k3s + # Helm-first path (preferred) — for k3s use context knoe_k3s if [[ "$MODE" == "k3s" ]]; then - local ctx="${PROLE_K3S_CONTEXT:-prole_k3s}" + local ctx="${PROLE_K3S_CONTEXT:-knoe_k3s}" if kubectl config get-contexts "$ctx" >/dev/null 2>&1; then log "Switching to k3s context: $ctx" kubectl config use-context "$ctx" >/dev/null 2>&1 || true @@ -1105,7 +1105,7 @@ run_k8s() { return 0 fi - log "Prole::Gitea k8s/k3s deploy (Kubernetes - generic)" + log "Knoe::Gitea k8s/k3s deploy (Kubernetes - generic)" log "Repo: $GITEA_DIR" require_cmd kubectl @@ -1128,7 +1128,7 @@ run_k8s() { main() { parse_args "$@" - load_prole_cfg + load_knoe_cfg apply_defaults if [[ -z "$MODE" ]]; then diff --git a/img/knoeIcon.png b/img/knoeIcon.png new file mode 100644 index 0000000000000000000000000000000000000000..f66b11dcda4416fcf1583f426cd0d6007bed55b8 GIT binary patch literal 23056 zcmcG$Wmr{F*EYHd>F(}Qy1QFi(oHG3=}jXo9SRcCjUtM4gOq@PNOy-I-Q8#MocDXb z_xo|q`E|T55!h?3IoF(HjCqfH+{0*XO=WBh3JeGYf~~5e@B#uspaXx=&``i{9{iuq zfq#(QELcIHg=BIbRKWu)^xJk+Pn}5TDrcvEKVmK zR`W@WR0lo1z|hxcLi!nXUmv9Z5P22rSoHI14xKx1RB|t!oQRlla+3Z`3Rhf&d?)J- z#`wg)UE^QT1AR@zcNam4L0HE1@#Fx};&i%~P2fbQ%QJOrF7RNRJZ?wHzcf*L#;aCvK(orleNcd zIv*!TXLm6lNrwMCR}6gr_-k$ky8m3_;ULLiq@hhG@8V`nC&(qp#lryZcC)e(d!eB8 zU-yEaBpF~H9&j;kZf|dIE^mG=7dKmOUQtm|ZXP~vK0Z!x1*iKPXOGuDoX+ly|LX|~ z*6x;Wc5n|n7iYT1C%(3D@$`^n03-irO4dGh|NFVl?*H}PUVhXQ4to7`ithL`pG4;Y=Yi;FEVI9b*IdEw*p!NuS!*vtQyNB@smiYb7p zc)WJhb@6nww0<;VJz&HC{c@IGT>t%k&eq=UmM&J-?%Y=Y_dV|ax#!X5xxo^{UEIO+ z48i2|++N!`TU*IG+Pb)bAD!$hHNXqJW}y3j9QXgfF}Z>1asQX?J%0P&Ml3}~NB6%S z!P*(Dm^U!TIvFDdItDZ*S!ANF zC-Y=_?XfaY`2Ov$MsFqC{devM6XfO9u?t~n3=G?Bo5get#u-eARj52~@e(VnLuCl) z9CDXvCwlJPzVCY^ntc=B2*^3X`&Lq-X_$R7dC{`u-8#zqi;kY2eg%88WdQ*lJvt6k zRfd3oz$}!B4jmo6T$bQNSXkH;9lDB~+)sxO$V}i;K^4Tr4<8OGm=IJ|RD7@#gPE9^ zexUq+--hhlj6@*yggO`kq1XPUNgWJ@R29W4WP*qPBu7SwLK)uaO<=5y#G&3cG&Cd? z2)w<-^j>^pOCS6KvJP>UO-xW=f4r8)10siT`izZDg(qG8qU~f*+}pI#?K5hy=460# zcx0p@mr=#?=J9&JH#W7H0BXB6WU+{FN+OGbR}g2!hQ!1~x7k-byE)?C&NkZG+6Y7?#e>xgsfWzq)geSL8nI;# zs;a8!x3;#PmKc_6KIP)tN2NoQsYvRvgTMt@Sc-g(R=a1ue*M~feZH58+x@Hwr+qbL zQSFk03Bl758M29zXRf65i<%|L?$^J8%pM^D0R=hNHpE#U6U<=y7Bh1xhsp0rD50C9(d^`=AqrInF*u*RO4%L@g{n>PfcRr2xJ)wgTc0RwIn@#u8!Bm2?z<}tyZE6U6;8|TZGe?lm%n7Ie(b zX_2}I-0F*WosA&#<69n|$G&I{@snXS)A}EFxF8`S#=KU8Cx=e;(4+TW;GxldYieqG zh`^>ye6RF3fK@Y#44Dq&IhtvSvw@#B?y`NZR6tA$$IB|0t*XiScn#OS=`0W6PI9rCfr`s7uJ5oVQ1Kmm`5SAWf?E& z^#@pShM4CzJ!B)FNo3Nmf}4OVn2FAb5rWatm8q#OgB+bw7E<)tMN|aOW#Q||% z@S1bdKlwMnuBxHIiH45;n%%H$x6SqMuRvfZ`P#j`x@VushzNf0S@nL93+;GiRs+*9 zsCQl%L})+`|MW?J4e0~&Ck+q8;gj2|lTfhBHMI^?n%wN{JDB0`B++3E+FT9bKe-W26Ga( z;~}eiM=89ImV9PwNS7J_qeu*{L81hwblo+gNmt2a7EUz!R5?G%_uAc6J)|*PgQP zMI!f9TK4>-#ESTHb+U1=HQ#t5%9ih+zFaJ;f_N+yk{>pVTK2Nq#vTft4cHjWjt#Zg zYj86)c(kIiwx9=gwN$PF(;q&r&K@48`qM1VctoS)k7LSPwkXT9=0Qq>gwvo4`hj+eAoO^5@E52Y)o12bE+K`M)*Nf z#DLH-Nj!~ra<8PkHHI%;{m8i9`F*Vs$6`f{J%UL#pY?BYVD%1zS)wmxWn~q$zZYbF zfF>9MyRAk;9RB<3J*6w9kYgH*FWrVp+=~Mtrue(TZoerE0&lS$${_~v#$n%mD4TrZoe;cOj2z&2Rxsc^qCi;~#gsghY}N#tJ{4 zS!_f^MC@k@yX;#EP!RsHapy=TzRuQ*TjAn?2qPjQ{p&kYHzQZ0rEwcM^jz0V$YJrgHlU{V5AXf1%l%+Y~rMPRA<|B3jxZ!pnwY zbxPJ;%?ibukXO|P8F}g!t!=Xhuo{{<#7vPtoD8vNm-%nryx|2NMs>C5cYxg#c;_oZ z#6FxvK7R%&!y)5YzOAzEKj$|4;p1mzWkq8ZQrJU>-dnposX27AF@&qGrq;Z%SHINy z1uP>s(dyB7QjXU3Z*)Qyljj;5lE-UFS~(c#=ubl#p1BjC)d*=am{{$H{VPk2+wJ@w zr2AqO7NUV^&v2uAyprpBjM?V7V{m~@DTF1EuFe=oB}#zQEr}Undy-`j7GCcsAr-4e zMi(KKHQUnr56Ej2$n6wz57#^8J!$Gi>0r+qTfTmcF7H3qLu)~o(Fc*d`!SMxfk+-n zNJto)PjuV#Br~v+61Nbk&O6X`b*0QOuLAeba&?=t$Dy z;r^~gon@>dUh29y$jOPbK1L#Y*(f0`&FB>mSyfKp_13#G(`FKx$`~uQrS1>N<6gIT zeZTwrDNnme&EJ9ZL3b!yTp05EnTJ;Ra8PfMs=E4*8vmb#*!D=;(aZ z{%tK_G^B%>Nz(POp6jZ85l4te{UICSbh^?~Ijhf#;{0kO_rk%^5i8u5UG)AHu|}2% z?-DpL{BMtX+IE0H(I*qo3)7bt2+0$Ca9<`y@ynJD3WS4zH!kQfIdA;p#ZS^uU$-|3 zlEJ?_LQzvWjO%uX+wSJtsH38y8nC)&?LstECOd_AH<{|&ZH@#I9(M9RIM}i|TY9st zOBGO1P+Yg2&pO`#_xHG`z&ot~p3hk2~$*sS5Kk5A4;>;{pJ z;jrBOx`94g@IEs$Gq0VUo&4z77$KM0kLk`?L#>#}_mFQ4jEwy`0p~M+0s6|tr4l(r zcI38PGsq1~0v1b#0AV1vbe*enY96!V8(3`e+^HxkDnj$A`}vA6nDXu0w}v#noB1K* z=S{^72CFhcRzmWQFupR@!JfV_rsB*n$)=mm1w$(D@z9MlnKq8H4 zRP5-;llYh!=HyYJyP1!tO%}ZQ`}gmsj7slRn*6WayhW7juw>2#v&C_>vc=9sh)VJ% zXNxtv(8HUf3ext_=8wTyS&)}U_ph{mk)qCdq3Nw*xfyn-t>HS-q&028%{ixWl~vz8 zvs#Md)=c$=DjRy7KEN$F;QT-_d(FcI002(m$mQcP`)hn+LQ%%GO+v7k6XLw((Nsmw zZ<7T;(~ZqgPQWudy5REuRW6L&A2RNwY9@v2-;LYd{hUJ!?%qKg;46eXQ{@NolXqT1 zu;Dy*ki$2NdGBXoX0jW^(r!#>6Ra+;F>TBGKgbApuY@3kO-xQI1)h#51D|{P8pITd z>iHyGOq68&<0aexNOEl3$nk3peeueiMPwGhROW30eN$6OcxME*E(k&2v$CjK z$;Ok&n}CHC6cjvvw6LW96wWze__7Rz+*DyBj9n>_jr{1Y;n!cZafTHJk5dqv_M0yj z{b++%?dwRe+wS&U;_vS-+LoSt)=qm;=V@58WJ0&m#tIn_r2A$#vh+(AQhe6sVCgOG zdkW(QX5j;l+&ky_27Kp*ebtg;lJ*IZi^T%Fp1~yLnx6q6*aSouqEd9RX9!#Q66-f> zYimpZ7@`U}PQz2rm;+W0{TKTtK7IOx32s8A_1mpX>gecT)+Siqe$7auY{AY<*Zw9o z!k8Spq7hCHiMZW1Y`gB;DQ}a)aWXFNX3@y-py%g5;b+TGVN8x@g<8%Rtb`Tx#Jfk0 zw|1VS!MF&Pa$nX*8tUsSmYcT)=7E^vzdiny%_mU5^~rO#hvOe_PU0xAB1#|AI2 zGs2vx&|u1I^!&N<>?qS%`m7@QM?Hc{76?I!kBAR$JVZ=GWAvfO_~q9xIllowmDQVDTy~~n>0B(0|8RIMW&kBeHs36Mk!Y3ALk&J6pVZbJ5u#G710!wsE)J9&;u2 z3Ao>!?=g~Dj%c%_v&wG@W{Z25r3t&3B>;pX04&R0+k``E`BHZt@vQhGKm62Bfi%K- zLp5X`5#tFDJsTVBjisgKr=$&o&iA3HxPhWxyVF$DDsfU6{T3sELSb3Mwmk3*K*_5FySgp+&JWAP!8u z{dy;r@p+(wQ%2Az~YLcWyJS=O~)2wCO=cyyY6i2?S@X0N?Gkl6D8w_;UvFe@ou zYuw1`7b3%&^S#&~P;_YHsyN_ACW2T$Rd_IM_F8xipfHF8w)MuW+H4>NTf)G=Xad1# z{^Zf&iqzBHP@a?3QJk|OUM**+6HDDvAfWmYWy3R!4ei48e68M z-}wb_l@bs?sfM>aNb{JyuCrl#{m5Op(=Fwu%|bp4O`f_2rBF|EGcz+idm2dwoNCfG*41ERu@Ua)c@WA8# zOM?9;)HX-`Rp_Eex=QlWFI52kRxIsS!|?RPgduQ1wC~U!vY?qQMhtLuWDAIWNC2YC zt-KtesNiZO7lAK_gOgP&C9J$ zl1_F01imox_wHhe_Viz-3y!4gYM8LW`bjEpiUa^_k-($sH8TXZM3PSVG} z)Qr>;JT-%;n;1FHhq%qMX{3Pb*dCG~Or)pj7*qJerC^o!L2k9nyK`h$^FB1id7T75 zS38+*qQGK&;l)k%?Fn5~eA=uGrTGu`MQ#~#zZKx%JJx*Z&JP>X52C%$lHMfrIEiHQ zH#d9r<{;xGACfrvGiBQ3A&S)f?6^<6brM|#H~iK0zxDO^yy@!Ii-1FL1#tGS7K0W> zxCZ3g-__MJ0OUBl0fU8FSXjs{L!Seku0c848bFmYz1)IDBNLtzmSBn@=1MRi%v2L} zNzfTWWol7zY33j8qY!465gI~(_ul!a_3KLw28H95DdX|Cm%LkTHEfjBYPYjvsF3=Y zCes$*+6@qN`C${^^gB;ZPFnJbUqbY}K^VW?`jWfYX3-tP9f?b;iMf084pypr;czjX3i%FL^s4LWl)V`XM(=PD9w$s2Shc z%rIFT3F9qY2u>^)f06C9TK2>t0MNd+ksCxaH9p=|%Agf_T&|uW@O2u%2LRlAyirk6 zb3;oh-WKHxB5oto?F0Iw(4gE*@&qJkIYuC~VGog9BYtlb9~l|>2%KQh9HhAk4Gj&L z73je-C-Vd!oPys=TnhP-zVzS^{wEf{852Ec_eLK_D!mJ@rbV>_JxaDRSPtQxw=B{3 z^W~0Eo02D84#YEzbX-bf4n-_b-IZ+l8k6zKsOT~hY>Z-jToU@N6KJ1<3?#n2?nhW|WFdZx-!IIMFMGWN*%KzS z>Mr~)y`IZh#NjRU&>)OhM&Ia;ZagIlu7V36k7-H22T5HtaF0!FMY+S8i9kY`E%zZw z??c?6%g(0WUKRf2$l!l@#E9FzD?h{EsH&<;b8>J{Ar3_jyM%{_n+E(#w~fgOy1$a| zjKt-RDA+r^u-0*U+pKKy+Oxf~R$jWEm1As(bIrZdbyzW7;+UCbHF`2(nzjs~F(Y^z zheo2oWp}zVG7nFLRctmWhkC%1u9k}K8C9%7qGWMn5d(hos;5JH+fe7#EzPk5H6qc5+vM#`44AVgQaRd=Gy zZeP9mQ9L2vd30Vw2bTB_BxG%#GBWew>&RWDG}~NJ`x$I6>PZTSEe{rK3d(E`j3hSO z7X&r!HLQ$bPEJm1k+gv#^HzNCB>|$OB!iB`DD-6mQgaaOr+>{iCw>>#223EI25T) z+tBBJz0*)t9%y>ue%5f)&5D@)N^h!S%G__m9y6DW8LeQ6 z>iATbWh{k0Vc>3tDK?-n9@&-q0>#*KDoNj(17nvK!9akK>z97K;YZvLV)mAimF*ZF z$Q1taCtLi2DY>$Y+-H=kCi1Yn?cNtLnYFxm7R z;y~C!j>AwgHewIahh-?Vigg)jSp@dKO_cbTzjZ7p%rNRQ-P0F3&5{UFaE~27W$@FE zt!mtUs>)i|azA&IYR-C{^F~>_d4DxPm$5HbK-HeiqK9~078 zaK!i4*o_T>REb?1Ez*|VT^lo8n%a)(*T^$ZG1uKj=r~3}%17AQbY}4?a$W+}{n}?O zC%ywoDU`=I zTrc7m$C6+%$M}kJaO@sqa{qu|hm)F3XD1}^{^tec+&$!tvCo$z!V$7`k~^d@c2MTWlFVGXu-+*!P3AEPE}f zdvaFpky70`+Mf^I?y<;33g`L6PpI*uDBgU_p8Hs#j6vl4afnTH)Zv@K{CDPI2QC9$ zJ)~NctycfLv{~Nb!Et1VbR&oHq!P z_sf?rtfgix*MqC8t85K$`m>1=L;2;ISm z%Mb8X+P;DBDKNdp@Uxc4dh#$}k1M5|fqU1CFI^_9Ku8-3IqmK5-)VDO|2-!SLgzi8 zG3X})I1&;PumQ^j>(dIl9%})?NgA^30eItR^M~uHrPk9?wH9zx@cpvl(|F|D{sK(x zT_erht=pGS8e)J}Tnbj57$4u&bEH7=>JfVW{ri_&w(mvjlQY(26&eqX6sVC&*rsN5 zlIg&Nn}USB!c<1z=Sjoouj1mE&%5=@NF&pj*g~M`w-21zOZdF5BK$L#0r@vEjdJ!& zuPa^-nRJnuRviMyH12XsE6Dc(BqghPMtlSRpo)r5Mn^||i#~tGP6zBz%m~b1SVH2K z9ir&l(z@A!N-J@`9Euxgs;4LL2Tb1_Kfzs5p;0_Xw-dxIWBB% zY;eLD*y>ZFm=GG#rmCx|q_RX@EpUiN8{hsbXF|zvU@eG{^Gr`c)=GG#V5%}Oir-c! zG?LYq=8SGnsN~@dlfD|G)aDLEAw5;yjcwVpC&}gC_&jBHi!CrS{4yaeG*B7)cG|@6 z?_J){AR|S^?oE)re{F1RY*~>2HDDs5t|jlKfFWv0Ujf>7uIc@k%)vV#rGN6sXbJ`0 z-#P&{@8j08N`WmdD1{ffsnU$mC_J-I1c zU;NO{^l*J(%{X6 zq{=tLhN>s(u>F7DrNzY!4##VK7qyB0BBwoZ)RZ;8XWQwJf%5GW z*`P_oN!l>joL{g2uU^M{c=4cMsaAP^{Mv&g?mMlfKu3jj2C96tvu9Nx_jgd&n_ufo zI_LvF7F{<~@&SYkHv; zMSwNoqfp_ z7n7Zxy_uhx*%~U|hYIlka5b(B6n3b|$;q+8VdK{&eNhI+dBm8-oUo7qiWO(PTKH}P zA~UTk!SHtrsbR`j{o2kl?)|^b256MwFqWyK|D^>Wy((TWtU)OVUwsDntSOy8`v%R* z_H%4U;vvdkeNBx-{)QzrU?wDQX98-Aj14bn7ASVrDc=RzpHlhcHD!$+1TxiTe(GWJ@;#)|D{hYn>* zLm0c$N&S7T2f!kk2rC)V*Nvi!T%zlX3 z4m*q9Lzyd{9aWgwD8rVR&Y$JH)2vJV_MLf9Q^A5+G&at2Hv8pIovF~nU-2`aYic|k zpFjWI@>ra~i5oK*2St%xiSa@c|3(etp3HxFPY~^Qu!;I23Gmu>N9wvV7WKnTkRt75dMYaZO-%1fDZFwE-ktYYkE?XSz?6%TWlUSHZ ziHH<_o~l^o@mAb-1H9lgQkd zA51T{*(kY7UR1bNQpQ8fc(TrVe%%`Ypvz6DwYWiitlDz_qYz<)=`cs?|y7JwneoiId8gyY|QkL0MEPa=kw>!f3Yw#zaIiiPkLo^ zeY)iy2-x0S2wTm0KEI=7Vn1RasyPdt&6gtt4OG_bTRoqmM(J}Fkzt9ZuH2$h;L#>Te!dc$b%N$mUgEotfLSFYt|Ev>cp5wE5Lo6`<|-yD#F zjaaQvmb2(J&BDT^yu(I~|n*TLcY_jBrahcqAoY)bQ7*pd_`3$AN z58Cjp9wvY4D0J(Gn$!fsqK)klgbGBjVo2z{6?d&6u?G2t>aP=Ei28NmsVOOoysoQV zN6zE^MvjiV;eh@O`qkaN7xJPqsrjYJU$ZbX;7{tjXTPIUL=1HN9s4sIRwmAXDfVh&o{M63Juf=k!$O3D!(OVDQTr%Evo7V^)lpzn`Fn%d z#72t>w*U>tQ!||f)!V&sicdX`v4S%0{+IS%nsT?qlVUz`{#-WJ)=o8vTB3nJR8q~@ zd5sV*brjUuk;i8#2hf%L8AhE}m-QKGeJ#JjG#>Qbn=gaCYN8U#e;fKW#ol>N+E;y< ziE8UuJk!f;->3LvLR55?1|xbGG1@JqEmt%(X6B(T!F~5G=C?!>F%~7dD??K$h;YgJ zC$3-Sx;b;p^BYWmG)T1x*VHAqpe8ZVy_eD8G4OMX(c!5*80naOA<#EN+~+?!-S6Zo zq#Sv`2-Po5XNnWx@|N}AAYrBF6^^`kpOjdv;Tqz_a@`xR*tw;5kS`c;xw?J`z#;yA zoj(BIgSJ*yKWIrw>#1eXGYGMQ=#DQsN4iJs+sY?4TpW59&`a^O{c5m|nhPjd0+q+# zi4;FksE^iWWEQOYyWCS_+c=E4!P#g(|5=Ywt7Uk6dDqkHi4Ly-_u?<~D1xV~uC;6G zi-wxd&$Nep>Xf^{1V*^7F?M9wR3i#mG_!nCGy68=fF;jPPfzbbo(<3cT)D_~u=0eP zILX?}Pz1O1e#~%~gw|}>M0Y8hG6;IVb5P~P{+5E0g>%j+bRVG1z#Yzx){AJ(unSvszUdva@?tD=?E?8%U)Avt@8AqoeWt4!GxHbfJLv=Hj*M90d*Li1yhq>atpeC zViXSxZ+{By7e!g7?I>8t^0t1HoR?p7e=HDYgU#VaNG@nBR`2^F|5AeC_HFQZO;XBt zx_cM3eIvDfEbs2FyJFG3-fwxLGI7gnyJbaphaB+xo88ZdQBb0#e;A0XTqvaZqU5m? zPmG^CIpixjCv2pBCpDp6A1`&mSs%;@#nsAROqZ zbECuPUOBS!+&yIT3^ma4=x|~`J5Ql`{}6IT^m3uBJP&QqzP9I$Kt*RKEt(3EK=+pt zv?F)rq+Azo0VC13hh6f@BOFStf3b8rI*xW+xuiZZG0n%Q4;XKpx;MKsgnqU}-fOM+Jzv3Ha zsA~;Vq)MHDS~hL!#w~JE5M$K(81_D6uKUc)%t3comp_uV6KR`^STSKGvVUgqETXGh zOxMI@hb*hJnsaLPntXgok?U4?ka3ld$Zli6sY%%=3oL}%I~OL)H_LkM$5t6bLI)O} zfsvK2=?4RuO#Sik@rZ7bI{Ajp@zcStO(CZeGcGwqfyf@^=-#G%}~UpnJ4E5A~Y<;*Fc(HUaF7r85EtqLn}TjG<$V0+B7 zq?!iFJYNt0ROd8*Oihhf)6{Gg7Z$D;pLe)&tVkRp7Vxed-)~kM-1%wwhPd^)j7R&o zkG3$?dL1Nh@~$SnQ#;24zw@re$*2MQfJ$ZL8tGGgVY;A_vzheh7l!gB2)}p$edtq>BOC`(e(~LF)plqO{KG3QrDAKj~rceff zOn>zY{9KZ?4b10upJEdeFG*sZK}zk-%F6o1C)j@y+PCp6V@X`IDvpL>FWjR;05bA< zIKjyxxAHh{SbpK%8k{%j-(GXb6$j(2Es5a%A-7de* zp#?~$erJ5=0&i1MtWpyqLRe~Qs@8LmX(VQ5?o7f`_2G+8@(6_Zh-0H0WBw>!KDmOl zYRLpQY4@{MLtCTK1oL%~O?~NOKA)?6`YgNZSXF>VL0=H|l)%wJej96hs;X4Gx=0}* zQ%V5#(f~RXouZsyMxw!og*<$=JyGJ#%*wiy1V*Z>H#8E=y|A>f@RFmay>DL$lUMt2 z`QB)k>kH2t+5) z-Y4RO4He&$g#BYuP_u&{qgOg(HiKlf>#1(h{074DOIkug%ZT^>#m$PUQRe2VayZL7 z$V^aL0rr#!^F84hqyo;6+S$CSdJQHT!;pw`JEM%mc<3lY?Y2Vf;K#C1m2rEymJIR! zwl76zhuY0F7+2~!fNux@Nx9Cm9=9hPNT@h}h6V@kW$0)FOGU263*Q9LetV-@+@6Xa zCH2||mJ*XOjzQpwZQlnM5r=M&>mqrE{5(pNuU=8v9gMim?c?Zl6NfBP;i>tv$v?Jp1 z)TB(6{f{9SQdMzJ&ZC9xY4p+)$1X*}>&-V*XB{K9gBTW}C(s#3~>I?qN zjj?|zcI|H0AIn-#_gj~Y+`lob^%-aKH{a`|nQ1FepFNmS2Rj4hiAFkjPe!n`k}Fcj zqDkrLjr4qcZn#ACu`I+dDqq(4gE${3@7$^`<53k&sO5jG+pluk_eR5J8>8kk6N@Km zcBQX^T2D^xCmVE~C<@F8>f&NGQ;O$J0^fSt{%)~~Xk3EDI+1c^f4U2-Q5D3eHv+)J zNaxqQfUx}3(Z=TAHK;kz*lz^n74Vyy{O(;M(EMqLUi=w-5EVm1i6}Y}qqatcJir?6 zz(HoqQYQIRhcP=Ps&7QpXGyU>B8g*&tf))9RL=0F%;0G{)LNoknZx9lTC9Q@(7^sq zeySUon3P0_dGS)pmY<)0Dem37Kf!WRtL#NzDU}#sC;CIt&6(+N{P2m|g=Rdw&I|Jl z5QycCDfCLwOTHFU+6H`MHj{T#I}uI4CFgvvJ)(A86-?N zP+pUPcv(;UqiH>Pf}2<6x#uWfRfI~3zZ-{8R37;avf^j&+B@u+OrYWm)C?Myk1@$R z>kA-6H2~4Nr0y5ZyLv!!;=<)=5h$;ISl0TN&XcAuF z8%CBWCTy-1BFj#(M)&B?6-_GpvFCHjoe;sGh~Bjgi;5uR!(;}HT<59R))-R~oI)(F z)H8ux@r7`bRv_3T=&F}%l}`VWooZ?loB%LTbw9~DRX7=;@1w@sIYU@p8`Du?PGsGV zFKP@)pG>x|w}mI-p-y#}oGEz!DkwA{4S?}L7Rt=qq%6Toso~H{Ng$V*e)%;b;ITO@ zQLEa2adNhGy5z3#$#H%jMfxUJBOl@HqN@TmbMWq5OHq+c z)5M+|>s1#0nr_@b_GwWacYG-OMQJHK61L=giHR^$WK(p4-pwdIIFD5pKi%Jg&-#>D zL-YqRvn$H{?8+=@wpAItBWt97GvF_UUVTPJ204(#8M|E`u5`e0uZ*JpbvlTgq@u*+ zdzB`}liZBk!@`4SI|l{KBQ&X8kC;8VyK0pgHX%eVHEbLu(F0fmLtiF33MPBbiy-i* zrc6or@fgCUj;=0$z-*1(*PDw2@A|n~A>hN}z=u-@D}WZT0dTVHc@u%P7*KjTLj@Cs zz3@q5psLv@Y|B*=R5-3wX0zu?Wz{{N!`!!tnll-3u|Bn50t zH4_F`0#bgn;O^$4r!!#9-4_VOcbdEpT9Ks9CN!sjuJ!KZ=_MZm?}|$;tMHUa*OF?t z7BoLlNM%mL(ikcu}b= z<@8c?NoRO8Zwg_v#cOZYPG4Ui-&rK6GYX$E4m`wL1I&vbVxoNFX-XaL4zky#JA=!e`s|%k9^Z3^q;RM=E*pk=D$`m?5sXGu3REu`t zVM8GUd#jUtoK)N^%#XH#@vZH!Ny=Y*z^Evsy5+C7Y+`4Q;HULlJi~VVq|x*pLTwY1 zd2+5mxt^Y$)IA^}q_((%t3}#W-s~VLV3)->HxcdQ-OeH!S}%N?ut%W6?DF6lbt4jB zVo!{3vy);l;Wf%0V72h{^xTt}h}SVSEd_-Zj3Bm=ni!?&p`&Bl=`qoq4Uq_!HR3H3Hlnl!!N0e0ilSK7Fz}1$1OLqHqx1t}`n@42rJQfVzrKr}GmW3YnAD98BEf8!bXpR9Cdw4f4Bp@keC zOtKsgb(QP~0te2R-s)u8Ron}vmhKGkS;X{JBY)_x6W=Xs`Zp#&Qx1k7z!z_2b zePAmrHK~0Q{=R~oDjGFKI^01+V0Nhut8;FpCP{;Pyk&(nn?Qi zA_!>iouV~Z8c=m89i3sApP~hRp8}_422|4iEP!bq*PhvwR@7}x7<7U8iVFzTK=xgG z5Y?VPch-9T{8~RS@IC<2)U-kc4QJ`8BS9;c#OvH2uc}lAaWTZ6pp|=tnum?a3eY)5 zlCRo>O&YWanL<-UoJd`R57+)`cjpXU)~3>;z?@Mr?8A15G5v z#I-I!A9}#T#FQ1{H#zG{;QJNnr5rSEM>>Q>d;+KVqpJ1KrQ}aACUvOvB0?MP*(ZI_ zKC~yCIp9D@K+qcLr^43zT#kEVV?!G9z)Ek6+4Y9#UO~ow$FJDBvy|El{+y$Qeg#@n zlNAch`@w=+-aiHj55vhA_~$(jLw}NzocsSu43L*A_^2D0y?_0h9bBC^m^d&pVLEi1$H-ufUk4mi8i#Gb6NNKhD8J7)ar8 zUUKG3Gz<|uuTkou3HIobKs0Biv+b3~s*L4I2aOmVagA8i?}M!t z<84Q14C4|%q~-NK{KHK$HXz_@5>=4q19KLhl%VG{l9R#()zZntsFn*qRT!m!VJz2N z9tqx3`LFG`^m!_3HFaP+;euM5Lc&>v@*Mz(3g!vse7;$yGGUgh*CU)IFaFr)BzI!S zdW5R3p{F-)Rz34$c7RC$`VYMk1=#6%m}ndRt^}GP-iK-_!s#uDW-Sb-44?M@Qa6;`ziTj4f1g|iY{D8?wZ8LY zm`~NJ{NWFtJyOeAkiwIz?DRClr*t#yWj#NE;yUq!kt*B5bGdzZ8&dc?J1rLW>+Xhg zeMC3C2j$zg@qizw-i9lMJKZo@ejCYy_du-VSi-Y6_<}~_rB2E*jJZZmrmPH8!?0ED zQn;8zf&Xixnt>DNfxVl1)v8Jf^C?<#flXlkNCV{~et3I*J$k)GmUks*@f256$aAv5 zW@ny^`Y-v|e_R$V{re`7e|j+VS;uVgabws+NUKR=v$fv$R&ubt*)xu2NkAKndC_Qj z1n%57t6L!@Nddy0$U6M+mJi|qL(K|32=XT|vQp-*Qu_P4_w|w=c<*9={`|QGH?JyS zq9ZLRCDnZ&2J3i(e$Y8)z~j)TRHL=s`ZVGLwN$9cxu>NaJH&K3F6w9YMxCJHrXu% zn)VX9#WH&U6;u~E#LP)ZNPa*0{tWnKB1OD{+VV$|#v6S#sAMwUoteYa_#`+tx~p2R z{u{Z#Bgi?pXjrO-N40DChta>YrjKFo3<%uRJa&JEV|JSE#;M{%<$fa6eA=5~zkuS- zRlRp9E!kW+Tjae1lH>?bw7UDEpO&&u=ARo}!`II2k2FqEpigo|X|&K9Jh2_uVgg;$dvRCK5D;dm=Lv*hjU2PR@z8ugt+uhw{oUKQ?G`SK73_bek&NOhfj`I@GzHj1EQKOi-0V-5KfD};9MI< zqk#I%{$B|)Q+@#KXPCLJ}m5bxJgD@bg>Wcj|Q-H5`resOneCBjrRpjO}+%dbmBKx0}WFc zpzs;!PIyb!`dkhq1*^=G-vDyCNCS~|o}BvT{^mgW{wO}k1etCYyJw2%aUAku(5pR< zy{|NiXgdYMaBE+0@8wCw>&|&%>Yda0pj%7C;Kjoe*D_GX<@CSmn@w2WxrpXo$U9&t zL4^y7iTN4=u=&u)E@q&sJLUwGr-ds`F@UmI1AwCJSGTb3yxsk9|-pm0P z&>2n@v7=ht4-~vTNSphsf9)~Axi3QyLo%}Hx2koK%&I?{Mc?Y>=nbB{<6IGj$Zgt0 zgn2{q!Q8|gc)$~<{+**($~>KhXR$Np2l$=?-+(5Sf57G>_j`(VXzXAIP+OZ|dcJUo z<@(g;m;YFneKocAT@8NJAo}Idv5TZlIN8SP4F{PDz)lI`A=Zk zsrRePpS~66!STlTzjGHr}IM&Qo3J1 zU}$z8NV_){7tH?^2^2#&Kshqz6$ct!x<7EGg>i?-R)(Bba4r?cfCDHU!2NikR_}KR z4Y#1>+yw&f``j`?2bRp~4ga&CZ54vVLzc^%o(4s^ldw8t`O{JjgC8Qb=Xwwb@x6gy?2Ie*Om`&^yGa zZI3M)@}&Kvp?QGk33uR8tOtY?D&pd>@s7pQ091}M^TxJrZ4@iQ%nR__YiT5Xcfk=} z-U23=3tA&{A_*qGg}!faMr5Ov^z|5=EHyTK{0z+9N^lE;T$eAMQIj!yEN}9@?t@Ay z=xktBP*O5LWJ7{ek1`|Z8rBIM8%D-5IE9y z*BH9Y(Dn88TOgy)umY-mAfxx@31%C*MZN&yweb{L3glPIZ;?>1sewv8F8ASfLyH?) z!`Ab^rD8 z8PnLNQqqw1x>_tXg;XjsA}Z^+`i3ln#!@J`?E4gL3|b^@_QGY0l-&@<5+SmVJzJQu z#$?RgXRiDE7u=8APy8_6pZR>w=e*B3@7MG73;2OEMbJ_SIXOA)B>dDb);ryiZUf(; zuo~OpITqp0Ynn=Gk z;xRVLX$0=P!V9B!0>w85PV`sSgdle=fwSy*s87TE~p#t3z z!}y-vQvoc~5ijV;2CkAwm}E=6PSJ2`J_ZjJ@Yf}c5K8lW4R!%dot7fllIQ)x669>#Y>ElpPVm|d zO2SRvqj=T!Jtj6=pgk89YXdGxA=tG(m!!et0Ciz_VuKHW0a1V?3`RV6uwy@cbnCb` zq46!iM&IAB&h}&ga~cQplKQh*8>D=G?;taE_@G+**k^NELa}u_xFX0QZ(&d1`)qTC zw4E+oxWKrB#%S@F>*q&l3`ff9RSNn#_zk4YNRXO<{JT3}(VZb8tLZOC!Vyr^rh&s` zRcw<)`7)?*LCkn%$pHkoOAeU0k|280Ft9snl!C94CD_)NJsS2mJWVwh>-ZJBAC!CW zdwfJ3iIqO}cM@pfU=TA&r1c_by*G?rL=08Q54k=e+xW?7sM7d>%y8=l1d%9(4`uri ziWBO^GZDCca|DqOd4d1@H_4j+)`Z6om zLVZCtyPszHoU!n~@ay`@^5Q_vSumDg8X-UyCE)-j6}~FvxQ<2s=uX zSD^*EtxlF^!6MdhRjUq^10MZFGtXfzG=S10RZP^Vwj^s-e1Ta`m_4kJuR_yz3t$IU zqIAYhV>Nsk^wRZ$2HA~cDk_igXEa9-Eq5c5HBX=ZJ)IxAnoSkQV!t|54ye$|)MzV` zB_@n2fhXkGRC8Mik}glH+sh1HEBC1kTGK)$iza>?19WhD^|#jtmo`oys57_@1(xzE z^^rX*{;PokRwV_SAPv==U!!t2xvMjsQyPkl7Yds$81igjC5H~|xo^l~y*Txnt83XS zR`KOJq0C0~mSf>81teO9mWsoESqD)rm6u6mAUqBby!A|@jXB9UIK?@&1eshaDk@6O znG$WUwUWFNDDe8)SxP|yjYiYJ12fVEKn~k5qjT|5YC~=+9Hj2cul&_NY+z`}bfIi> zimad9r9RN~jzoF8g`Xc=PA0!o<92j-8$H~+tqRnkIrvS`Sw_dk;)M=mw2XIeCw~V0 zkB1g}p_ZGOpKt0MxiRG>qL=TNyxX`<0t5dNMqG2c)b)Dhp}CH4bzGCy()!}KSNvh?c&wyk zpjhPPu94B(f2DQK2s1&){RYIcRN_rnSA(lnS-VRk$zRu#F|^#d2+(_KeFC1u4{GuC zY)?&=y&Hls1banV6c!w;!nmBbl!EdXSDpNvt2~^z?G-~v@#Bo72AGZwE_Z{>oM&lr z1`#`7o=GZ>Nzc##@Djn?0s{8u6g(uWV6I{00#* z1mmcu`1O(S=P=Co<5T=(C6_3vfmPi5iv_QmBYQ$Qj74&Cng};)x)@~-J|>v)jLWUF zGPgSIBONKxeW0aQ19fK@{^ZG%;zL5w=4dqfP3TgSg1VEVBM!pPA+jycCwnC3Y&gG+ z#}pHP3B*$muls$QPFNyHSXo-GHySEeI#Oa{z9Mhc*N&$PRj-1+nF+}8M!t-OFPoxz z;;!n6-hO;;>@(lv`F_={s2mK*-5$;_SMcmnk$j#Dfwf|2g@P`tC9uj6c;QBy(!VE| z+5i0WWDjXGA=N2h<8;*x1~*BbtI098bd1u>wWXY&%!^67|b1nb^JFJp3byZ^2B)gnvWI0&AX*mHd!xZrKk zrk!On)kFy0M~;M{R2sbOK^qVWv1;{ojGCg=^x4hw;Z4TjqBBv&o-m{zR;gcI`Q?GU zB&%Nxc@|DB+k#>5;&cJ`R!fNd9?*XE+A&NLn%f~887N1CO|EIK8*Fn zj`Q~Y`&;}ZTw;KFjah@l?8Y~E($U=(ikWh-p)de!*Lbm(Q)Xf$bb-DBTpP!;?!it0 zWZdWFD=X?qF<>?R90#+Uklat7d{2;YkCp1^O;KwWY7l+x+T-RO?Q}Z*JQ4Vl@1vum z^n**@irg|{K3)U3bC0U^u_!KZP{$ILUXs;CTlw7F+!VISY0>GxEJ=uo#d!h8lB7~U zvA7a4_fVZhqnFV0EjM>qxdorlo$ruF_Y$s&Yiz$-Yzo6=7aQgvhK@z%Qc zx1V|R=1paUQsBLe-x75aQMtLf#sO=Ceqm>Ttw9lTWK8qEjCGrg!pyq`j5pXxz$k9K zNS%*Ry?EO9RgXq;2c(*enFlcT=Q@I*o(cO_pVVyVdSPrQyotjVK%POqFl+gc>LW;U z|8ZU}WaSG`xbAOE{Dw}~d_mao5q9j^6EFuZ6!cpVUK<#1>9>H#<#U6`N z&U^Ua!AYk|d?HcKawnu|wgR5jwBh`Lb&A%z-?`Iw|4dQ4H%0YAFFK5LHXnSFwpoI7 z{s$l75qaqFV|sE6sBBYYtf=Eu~h?$vwWWc_w+7d@2SI;eifDNx&gYnNk4!7 z%-p45at;&%cVTzxJ|Hh|z5)c&X|cb`5Np^C5kz|$6kuH7zqFbhj}8_C-m`^fDQ08W zI4CO-H)}ftZ_Q_?FYzH8bgwoiJ$?Pe@F!zt=mA}W)C2ynkRh39)dL1TQ@n_$(@VY7 zp_H9Omhda*G&B1@&U%8S%x{>2#~yXMK{&Zg$;@(zB=_G{Ivra+h>_Ki^M(W zGYcZ?5@Zu3VrrDtwF#gNWc#5)7=ef7XJ<<_ursPd5tnRQJ>l}A9iRf?3UA$tBfD6n zaNle0g`SoPFU?91=+n+8jPb8IMg~b%?_Vq`4X8wE(fvCXd*PmySHT8{=23F@z#d`h z^Rkth4A~GUz71mF%v+AlqI&0od&t?%O z@(K!J9N;0?=R-m^#opm!M^gX3FOpK83M++vgWx**?AfzU?$UEAd+pJmx`havh$qH# zSqi?p$OkKlVa`B}ar>cK6ppGt8n23NEwWX+cfb8S)F>Vt7|p0dTeM*0W2!GVi?rD; zA~FmBr7-E{O$Ny*D~tYAsczcMF^>iLb=?8u94Y191JCP&H+cQX32fQ2@ML>p7taJp z658W#FaY3CE%Iz$&?KZ9#ZtSP&k0{O=&wx&aE5vey30!QZ@;_+EBUMYpoMd{s|;NA zxCupu@}(RZYG!HL1aA?~aiJJpFy=V9Tnx?5aM0>cA2IDynuiikAT#H>vN~Vzip{4W zEtei0kih{&<=aW&}p@Km!aS57@uGOJU0my52E;XN6doJGNYULx${ zRb<0kMMUsp=Gy!9-f4F6Zg^vyE0>xN<=cS~0MdD%)%E#n z$#Btyn>&z_pWqlq0dm3u@xq11i~hu2SttVdsd+8*P&uo1P`fgna!GM;(PZ@TSSJ3r`yjBtlH#2(p>7u$}IByZ-kLaTlt*=O*ZVdeL;BA5pNF;Jt zH_L54i=ZW9D!x_n*fl0^`Tl2zEErCa2X?yN@Pvx36C#&&f9F2^x%*3#R;Kb>Pv|u5 zKCKG5zZHDJHe&nx`-2jmMC|#R{^~7DUOdfJDiC3dSOHTib}~e`DUY1afTNf?z6azf zY%Rnq&p;_;?4d#o9{gH{>0poc8zDmL3j)hg5 z`1ZCu9jegCH<-%_$1B@$=AmsZgw$`fwSK7#`N~IebRRg`1hu0CQSBPa%E}HC&Ck@j z^X>3FJ1liE9l@2GYc?_Zh@Ly);mSM?vIJ%f&tAV~pNX?NXJP;4W&8rq!OV6V;mx@QhzK>#`VMo25Jh5iY8u%p9hMb%3Xr2o5}Uq-A7m5pO3=j*F=q ze&*TP;dcloOOb~_7Wfc4{$CApVVa-v@{aIpD{7{-mhfQ_$Dz|20|pib2K>uBD?@9q z2L=w-y@y5>;5*oj?3N}SJa}*n`14m4uHXNefub}D)h-hmldgA+uS68q1A~GwU7pd3 zjJUWTfAi=6{MNS?!h<^{S8oUTCZ(Y2UoW3)$G-AX z%}{3=!l0ea0F$KQGr{W%odoPV;{C(17gAB$qJ#z=6|yYklFbu0`j6GX`kPtkfHz1(&V-y4`?)i&#bdd|qwdXqy^-7Csjt3ucN_Ai2>s&$Bt@1qL(Y+1c3v zio=&vkDJ<8tkmr?l?D_pNZu&n5lU~M^v3#0#?ic zl^2IV|6p>h@^W4B4#O+K!ND~=zcBp9+=o7RyIeZx{f|+mI--y2Lq1Z3 zzaBh2JsMKY9()8DNKiAdGqu3FJdKBjKGD$YHj(m>0^5i&l+O>qDH%ArSKK&@eJ;d@pyobG`S)hF$ zVkZT>v)n;^Qk?u_*5>xoJxikVWu4DT;K+FmQzE;6pQY&h9cu3D_=THpFH^uHhD;PFyFQsV95>=%A6>Y1F&)3LwvKPxkaxBvhE literal 0 HcmV?d00001 diff --git a/install.sh b/install.sh index 9f8acb6..ff154c8 100755 --- a/install.sh +++ b/install.sh @@ -27,7 +27,7 @@ set -euo pipefail # Repo URL used only during bootstrap (curl-pipe) installs. -KNOE_REPO_URL="${KNOE_REPO_URL:-https://gitlab.knoey.com/prole/prole.git}" +KNOE_REPO_URL="${KNOE_REPO_URL:-https://gitlab.knoey.com/knoe/knoe.git}" # Default install directory for bootstrap installs. _INSTALL_DIR="${KNOE_HOME:-$HOME/knoe}" @@ -80,8 +80,14 @@ _script_dir="$(cd "$(dirname "${_src:-/}")" 2>/dev/null && pwd || echo "")" if [[ -n "${_script_dir}" && -d "${_script_dir}/knoe" ]]; then # Local checkout: delegate to the Python installer module. cd "${_script_dir}" + + # If a built binary exists, prefer it. + if [[ -x "dist/knoe" ]]; then + exec "./dist/knoe" "$@" + fi + # Prefer the venv Python at KNOE_HOME (or the repo root) when available; - # it carries all prole_requirements.txt dependencies. + # it carries all knoe_requirements.txt dependencies. _VENV_PYTHON="${KNOE_HOME:-${_script_dir}}/bin/python3" _check_gcp_tools "$@" if [[ -x "${_VENV_PYTHON}" ]]; then diff --git a/k3s/create_k3d_join_remote_agents.sh b/k3s/create_k3d_join_remote_agents.sh index 9ae6547..cabf8ea 100755 --- a/k3s/create_k3d_join_remote_agents.sh +++ b/k3s/create_k3d_join_remote_agents.sh @@ -5,13 +5,13 @@ set -euo pipefail -: "${K3D_CLUSTER_NAME:=prole-remote-agents}" +: "${K3D_CLUSTER_NAME:=knoe-remote-agents}" : "${K3D_AGENTS:=2}" : "${K3D_IMAGE:=}" # e.g. rancher/k3s:v1.30.6-k3s1 : "${K3D_REGISTRY_CONFIG:=}" # optional path to registries.yaml # Remote server details -: "${K3S_REMOTE_SERVER_HOST:=raspberry.prole.org}" +: "${K3S_REMOTE_SERVER_HOST:=raspberry.knoe.org}" : "${K3S_REMOTE_SERVER_PORT:=6443}" : "${K3S_REMOTE_TOKEN:=}" # required diff --git a/k3s/create_k3d_prole_data_cluster.sh b/k3s/create_k3d_knoe_data_cluster.sh similarity index 68% rename from k3s/create_k3d_prole_data_cluster.sh rename to k3s/create_k3d_knoe_data_cluster.sh index 5fe0d26..e5f9ff1 100755 --- a/k3s/create_k3d_prole_data_cluster.sh +++ b/k3s/create_k3d_knoe_data_cluster.sh @@ -3,14 +3,14 @@ set -o pipefail SCRIPT_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) # shellcheck disable=SC1090 -source "$SCRIPT_DIR/../etc/prole_cfg.sh" +source "$SCRIPT_DIR/../etc/knoe_cfg.sh" set -euo pipefail -PROLE_HOME="${PROLE_HOME:-$(cd "$SCRIPT_DIR/.." && pwd)}" -export PROLE_HOME -PROLE_SERVICE="${PROLE_SERVICE:-$PROLE_HOME/etc}" -export PROLE_SERVICE +KNOE_HOME="${KNOE_HOME:-$(cd "$SCRIPT_DIR/.." && pwd)}" +export KNOE_HOME +KNOE_SERVICE="${KNOE_SERVICE:-$KNOE_HOME/etc}" +export KNOE_SERVICE openbao_url() { if [[ -n "${PROLE_OPENBAO_URL:-}" ]]; then @@ -21,8 +21,8 @@ openbao_url() { } openbao_token() { - if [[ -f "$PROLE_SERVICE/secrets/openbao-root-token" ]]; then - cat "$PROLE_SERVICE/secrets/openbao-root-token" + if [[ -f "$KNOE_SERVICE/secrets/openbao-root-token" ]]; then + cat "$KNOE_SERVICE/secrets/openbao-root-token" else echo "${OPENBAO_ROOT_TOKEN:-}" fi @@ -42,17 +42,17 @@ fetch_openbao_secret() { } PROLE_PASSWD="${PROLE_PASSWD:-}" -if [[ -z "$PROLE_PASSWD" || "$PROLE_PASSWD" == '${OPENBAO:'* || "$PROLE_PASSWD" == '${PROLE_SECRET:'* ]]; then +if [[ -z "$PROLE_PASSWD" || "$PROLE_PASSWD" == '${OPENBAO:'* || "$PROLE_PASSWD" == '${KNOE_SECRET:'* ]]; then command -v curl >/dev/null 2>&1 || { echo "ERROR: curl is required to read OpenBao secrets." >&2; exit 1; } command -v jq >/dev/null 2>&1 || { echo "ERROR: jq is required to read OpenBao secrets." >&2; exit 1; } - path="prole/${NAMESPACE:-default}/db" + path="knoe/${NAMESPACE:-default}/db" fetched=$(fetch_openbao_secret "$path" "password") if [[ -n "$fetched" && "$fetched" != "null" ]]; then PROLE_PASSWD="$fetched" fi fi if [[ -z "$PROLE_PASSWD" ]]; then - echo "ERROR: PROLE_PASSWD is required. Store it in OpenBao (kv/prole//db#password) or export it." >&2 + echo "ERROR: PROLE_PASSWD is required. Store it in OpenBao (kv/knoe//db#password) or export it." >&2 exit 1 fi @@ -64,8 +64,8 @@ if [[ -z "$HOST_IP" ]]; then echo "ERROR: Unable to detect HOST_IP. Set HOST_IP to the host interface address." >&2 exit 1 fi -k3d cluster create prole-data-cluster \ +k3d cluster create knoe-data-cluster \ --agents 2 \ - --registry-use k3d-prole-data-registry:5000 \ - --registry-config ${PROLE_HOME}/k3s/registries.yaml \ - --k3s-arg "--datastore-endpoint=mysql://prole:$PROLE_PASSWD\@tcp($HOST_IP:3306)/k3s@server:*" + --registry-use k3d-knoe-data-registry:5000 \ + --registry-config ${KNOE_HOME}/k3s/registries.yaml \ + --k3s-arg "--datastore-endpoint=mysql://knoe:$PROLE_PASSWD\@tcp($HOST_IP:3306)/k3s@server:*" diff --git a/k3s/create_k3d_prole_data_registry.sh b/k3s/create_k3d_prole_data_registry.sh index 2d1147e..ebcdf03 100755 --- a/k3s/create_k3d_prole_data_registry.sh +++ b/k3s/create_k3d_prole_data_registry.sh @@ -1,4 +1,4 @@ #!/usr/bin/env bash set -euo pipefail -k3d registry create prole-data-registry --port 5000 --timestamps --verbose +k3d registry create knoe-data-registry --port 5000 --timestamps --verbose diff --git a/k3s/install_k3s_first_server.sh b/k3s/install_k3s_first_server.sh index c63b4be..098ddc7 100644 --- a/k3s/install_k3s_first_server.sh +++ b/k3s/install_k3s_first_server.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -# Bootstrap the first K3s server (embedded etcd) on raspberry.prole.org using k3sup. +# Bootstrap the first K3s server (embedded etcd) on raspberry.knoe.org using k3sup. # This script is idempotent: re-running will upgrade/ensure k3s is present. # Requirements: # - k3sup installed locally (https://github.com/alexellis/k3sup) @@ -10,7 +10,7 @@ set -euo pipefail # Configurable via env vars; provide sensible defaults -: "${K3S_FIRST_SERVER_HOST:=raspberry.prole.org}" +: "${K3S_FIRST_SERVER_HOST:=raspberry.knoe.org}" : "${K3S_FIRST_SERVER_USER:=pi}" : "${K3S_SSH_KEY:=$HOME/.ssh/id_rsa}" : "${K3S_VERSION:=}" diff --git a/k3s/join_k3s_additional_server.sh b/k3s/join_k3s_additional_server.sh index 38a4b3f..eb91209 100644 --- a/k3s/join_k3s_additional_server.sh +++ b/k3s/join_k3s_additional_server.sh @@ -1,13 +1,13 @@ #!/usr/bin/env bash -# Join an additional K3s server (pi.prole.org) to the existing cluster using k3sup. +# Join an additional K3s server (pi.knoe.org) to the existing cluster using k3sup. # Default topology: HA embedded etcd with at least two servers. set -euo pipefail -: "${K3S_EXISTING_SERVER_HOST:=raspberry.prole.org}" +: "${K3S_EXISTING_SERVER_HOST:=raspberry.knoe.org}" : "${K3S_EXISTING_SERVER_USER:=pi}" -: "${K3S_ADDITIONAL_SERVER_HOST:=pi.prole.org}" +: "${K3S_ADDITIONAL_SERVER_HOST:=pi.knoe.org}" : "${K3S_ADDITIONAL_SERVER_USER:=pi}" : "${K3S_SSH_KEY:=$HOME/.ssh/id_rsa}" : "${K3S_VERSION:=}" diff --git a/k3s/kong-config.yml b/k3s/kong-config.yml index 0438e52..0f42413 100644 --- a/k3s/kong-config.yml +++ b/k3s/kong-config.yml @@ -2,9 +2,9 @@ _format_version: "3.0" _transform: true services: - - name: prole-service - url: http://prole-svc.knoe-db.svc.cluster.local:8080 + - name: knoe-service + url: http://knoe-svc.knoe-db.svc.cluster.local:8080 routes: - - name: prole-route + - name: knoe-route paths: - /k3s/kube_config.sh diff --git a/k3s/kube_config.sh b/k3s/kube_config.sh index c52b03b..b69bfda 100644 --- a/k3s/kube_config.sh +++ b/k3s/kube_config.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -# Refresh the local kubeconfig entry for prole-k3s using the live kubeconfig -# from myrddin.prole.org. The CA bundle on the server is malformed, so we +# Refresh the local kubeconfig entry for knoe-k3s using the live kubeconfig +# from myrddin.knoe.org. The CA bundle on the server is malformed, so we # deliberately disable TLS verification while keeping client cert auth. # If invoked via `sh`, re-exec with bash to enable arrays and pipefail. @@ -10,15 +10,15 @@ fi set -euo pipefail -SERVER=${K3S_SERVER:-"https://myrddin.prole.org:6443"} -REMOTE_HOST=${K3S_REMOTE_HOST:-"myrddin.prole.org"} +SERVER=${K3S_SERVER:-"https://myrddin.knoe.org:6443"} +REMOTE_HOST=${K3S_REMOTE_HOST:-"myrddin.knoe.org"} REMOTE_USER=${K3S_REMOTE_USER:-"ansible"} SSH_KEY=${K3S_SSH_KEY:-"$HOME/.ssh/id_ed25519_ansible"} REMOTE_KUBECONFIG=${K3S_REMOTE_KUBECONFIG:-"/etc/rancher/k3s/k3s.yaml"} -CLUSTER="prole-k3s" -USER="prole-k3s" -CONTEXT="prole-k3s" +CLUSTER="knoe-k3s" +USER="knoe-k3s" +CONTEXT="knoe-k3s" echo "Configuring ${CONTEXT} from ${REMOTE_HOST}..." diff --git a/k3s/prole-resources.yaml b/k3s/prole-resources.yaml index 2da3b63..3f03046 100644 --- a/k3s/prole-resources.yaml +++ b/k3s/prole-resources.yaml @@ -1,16 +1,16 @@ apiVersion: v1 kind: ConfigMap metadata: - name: prole-kubeconfig-cm + name: knoe-kubeconfig-cm namespace: knoe-db data: kube_config.sh: | #!/bin/bash - # k3s/kube_config.sh - Automatically configure prole-k3s context - SERVER="https://myrddin.prole.org:6443" - CLUSTER="prole-k3s" - USER="prole-k3s" - CONTEXT="prole-k3s" + # k3s/kube_config.sh - Automatically configure knoe-k3s context + SERVER="https://myrddin.knoe.org:6443" + CLUSTER="knoe-k3s" + USER="knoe-k3s" + CONTEXT="knoe-k3s" CA_DATA="LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUJkekNDQVIyZ0F3SUJBZ0lCQURBS0JnZ3Foa2pPUFFRREFqQWpNU0V3SHdZRFZRUUREQmhyTTNNdGMyVnkKZG1WeUxXTmhRREUzTnpFek1EUXlOVEl3SGhjTk1qWXdNakUzTURRMU56TXlXaGNOTXpZd01qRTFNRFExTnpLeQpXakFqTVNFd0h3WURWUVFEREJock0zTXRjMlZ5ZG1WeUxXTmhRREUzTnpFek1EUXlOVEl3V1RBVEJnY3Foa2pPClBRSUJCZ2dxaGtqT1BRTUJCd05DQUFTUHpoSGhraExnaWhMV2UwVEFpTEQrZlJLRC9xU25sZ2lYZnFBN3YveFEKanlUai9FYVg1VS9ZbTRIODRVZWF6dGNLTFUwT1oxUzBtNkFtekxzMXlVN3NvMEl3UURBT0JnTlZIUThCQWY4RQpCQU1DQXFRd0R3WURWUjBUQVFIL0JBVXdBd0VCL3pBZEJnTlZIUTRFRmdRVTd2aDhaVGlUc20xN2dwTzdNZmhqCnBkS1YvekF3Q2dZSUtvWkl6ajBFQXdJRFNBQXdSUUlnQjh1Sk5mTUNndm1tUjJvTWR5WWNvc1NUVUxaTVhERUUKbi8wdVc2aVFuOGdDSVFENXRza0NpcE03RDk2aVRSR1d0MU16WERmdUd4MytQYkpDSmFYWE9IYkJhUT09Ci0tLS0tRU5EIENFUlRJRklDQVRFLS0tLS0K" CERT_DATA="LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUJrVENDQVRlZ0F3SUJBZ0lJUUZTR2JNTDI5cTh3Q2dZSUtvWkl6ajBFQXdJd0l6RWhNQjhHQTFVRUF3d1kKYXpOekxXTnNhV1Z1ZEMxallVQXhOemN4TXpBME1qVXlNQjRYRFRJMk1ESXhOekEwTlRjek1sb1hEVEkzTURJeApOekEwTlRjek1sb3dNREVYTUJVR0ExVUVDaE1PYzNsemRHVnRPbTFoYzNSbGNuTXhGVEFUQmdOVkJBTVRESE41CmMzUmxiVHBoWkcxcGJqQlpNQk1HQnlxR1NNNDlBZ0VHQ0NxR1NNNDlBd0VIQTBJQUJIdEZuRjhsa3pJeFVRVDkKV0xld1R1cXRLQzNEMFpGVHk3RTh2V1RmTVhyakluZ3kzUG5CRXc4N1BwajgyaXJ5eVZzRy9wdTg0OW1Bdy9TQQpmanNEZjE2alNEQkdNQTRHQTFVZER3RUIvd1FFQXdJRm9EQVRCZ05WSFNVRUREQUtCZ2dyQmdFRkJRY0RBakFmCkJnTlZIU01FR0RBV2dCVHV6dUo3cTNEb1lKWlBSSHlwL1BnTWZaWWl0REFLQmdncWhrak9QUVFEQWdOSUFEQkYKQWlFQWt5Vmk2UmFiY2krNXM5anA0Z2h3bWVBZlQrRlpGQVlON2xhd0Uyd3FRK3NDSUFpbVBRek8rd29jTHRObApDd1dZWnNBSlRISy9hTjJ6WW5QQzFOVHdRaVN0Ci0tLS0tRU5EIENFUlRJRklDQVRFLS0tLS0KLS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUJkekNDQVIyZ0F3SUJBZ0lCQURBS0JnZ3Foa2pPUFFRREFqQWpNU0V3SHdZRFZRUUREQmhyTTNNdFkyeHAKWlc1MExXTmhRREUzTnpFek1EUXlOVEl3SGhjTk1qWXdNakUzTURRMU56TXlXaGNOTXpZd01qRTFNRFExTnpNeQpXakFqTVNFd0h3WURWUVFEREJock0zTXRZMnhwWlc1MExXTmhRREUzTnpFek1EUXlOVEl3V1RBVEJnY3Foa2pPClBRSUJCZ2dxaGtqT1BRTUJCd05DQUFRMnRKVE5oMFAwc3R3ZWk4L2ZKUnlkZ2Foc0M4S3NveEZtbjFmMDJSVjMKbHlCNHFDdjJnQW9IdndRSDVMdkFtL2g2dDd5cGJteHBoZXgxWkcvMGhVL0lvMEl3UURBT0JnTlZIUThCQWY4RQpCQU1DQXFRd0R3WURWUjBUQVFIL0JBVXdBd0VCL3pBZEJnTlZIUTRFRmdRVTdzN2llNnR3NkdDV1QwUjhxZno0CkRIMldJclF3Q2dZSUtvWkl6ajBFQXdJRFNBQXdSUUlnRFhJYVdxL0lRNjRhc3AyRng5S3pBZUFoRnBOSjNyNVgKMkNPdzA1ZjlmK1lDSVFDL3dVblhobVQwOXM1U3A1TG9ha0FMejZUMkpYSmJ5MVhEdGtDV3hRZ3dDUT09Ci0tLS0tRU5EIENFUlRJRklDQVRFLS0tLS0K" KEY_DATA="LS0tLS1CRUdJTiBFQyBQUklWQVRFIEtFWS0tLS0tCk1IY0NBUUVFSUdZT21JaWI4ZVVhcFJtQWxMQmM3c24xb0ZkVUpQTUJXYmUvZ2NydEs4THNvQW9HQ0NxR1NNNDlKQXdFSG9VUURRZ0FFZTBXY1h5V1RNakZSQlAxWXQ3Qk82cTBvTGNQUmtWUExzVHk5Wk44eGV1TWllRExjK2NFVApEenMrbVB6YUt2TEpXd2IrbTd6ajJZREQ5SUIrT3dOL1hnPT0KLS0tLS1FTkQgRUMgUFJJVkFURSBLRVktLS0tLQo=" @@ -40,29 +40,29 @@ data: _format_version: "3.0" _transform: true services: - - name: prole-service - url: http://prole-svc.knoe-db.svc.cluster.local:8080 + - name: knoe-service + url: http://knoe-svc.knoe-db.svc.cluster.local:8080 routes: - - name: prole-route + - name: knoe-route paths: - /k3s/kube_config.sh --- apiVersion: apps/v1 kind: Deployment metadata: - name: prole-ubuntu + name: knoe-ubuntu namespace: knoe-db labels: - app: prole-ubuntu + app: knoe-ubuntu spec: replicas: 1 selector: matchLabels: - app: prole-ubuntu + app: knoe-ubuntu template: metadata: labels: - app: prole-ubuntu + app: knoe-ubuntu spec: containers: - name: ubuntu @@ -71,10 +71,10 @@ spec: args: - | apt-get update && apt-get install -y python3 - mkdir -p /prole/home/k3s/ - cp /tmp/kube_config.sh /prole/home/k3s/kube_config.sh - chmod +x /prole/home/k3s/kube_config.sh - cd /prole/home + mkdir -p /knoe/home/k3s/ + cp /tmp/kube_config.sh /knoe/home/k3s/kube_config.sh + chmod +x /knoe/home/k3s/kube_config.sh + cd /knoe/home python3 -m http.server 8080 ports: - containerPort: 8080 @@ -85,16 +85,16 @@ spec: volumes: - name: script-vol configMap: - name: prole-kubeconfig-cm + name: knoe-kubeconfig-cm --- apiVersion: v1 kind: Service metadata: - name: prole-svc + name: knoe-svc namespace: knoe-db spec: selector: - app: prole-ubuntu + app: knoe-ubuntu ports: - protocol: TCP port: 8080 @@ -103,13 +103,13 @@ spec: apiVersion: networking.k8s.io/v1 kind: Ingress metadata: - name: prole-myrddin-ingress + name: knoe-myrddin-ingress namespace: knoe-db annotations: kubernetes.io/ingress.class: traefik spec: rules: - - host: myrddin.prole.org + - host: myrddin.knoe.org http: paths: - path: /k3s/kube_config.sh diff --git a/k3s/registries.yaml b/k3s/registries.yaml index 96f0362..b13952c 100644 --- a/k3s/registries.yaml +++ b/k3s/registries.yaml @@ -1,7 +1,7 @@ mirrors: - "k3d-prole-registry:5000": + "k3d-knoe-registry:5000": endpoint: - - "http://k3d-prole-registry:5000" - "k3d-prole-data-registry:5000": + - "http://k3d-knoe-registry:5000" + "k3d-knoe-data-registry:5000": endpoint: - - "http://k3d-prole-data-registry:5000" + - "http://k3d-knoe-data-registry:5000" diff --git a/k8s/prole/coredns-custom.yaml b/k8s/knoe/coredns-custom.yaml similarity index 78% rename from k8s/prole/coredns-custom.yaml rename to k8s/knoe/coredns-custom.yaml index e295dc7..b7af487 100644 --- a/k8s/prole/coredns-custom.yaml +++ b/k8s/knoe/coredns-custom.yaml @@ -4,13 +4,13 @@ metadata: name: coredns-custom namespace: kube-system data: - prole.server: | - prole.org:53 { + knoe.server: | + knoe.org:53 { errors cache 30 forward . 10.0.0.3 10.0.0.4 } - internal.prole.org:53 { + internal.knoe.org:53 { errors cache 30 forward . 10.0.0.3 10.0.0.4 diff --git a/k8s/prole/garage-configmap.yaml b/k8s/knoe/garage-configmap.yaml similarity index 100% rename from k8s/prole/garage-configmap.yaml rename to k8s/knoe/garage-configmap.yaml diff --git a/k8s/prole/garage-service-ilb.yaml b/k8s/knoe/garage-service-ilb.yaml similarity index 94% rename from k8s/prole/garage-service-ilb.yaml rename to k8s/knoe/garage-service-ilb.yaml index 7862491..8ef9afa 100644 --- a/k8s/prole/garage-service-ilb.yaml +++ b/k8s/knoe/garage-service-ilb.yaml @@ -8,7 +8,7 @@ # # Apply to the DB cluster (knoe-cnpg-0): # kubectl --context=gke_plenary-truck-485623-p7_us-west3_knoe-cnpg-0 \ -# -n knoe-system apply -f k8s/prole/garage-service-ilb.yaml +# -n knoe-system apply -f k8s/knoe/garage-service-ilb.yaml # # Then retrieve the ILB IP with: # kubectl --context=gke_plenary-truck-485623-p7_us-west3_knoe-cnpg-0 \ diff --git a/k8s/prole/garage-service.yaml b/k8s/knoe/garage-service.yaml similarity index 100% rename from k8s/prole/garage-service.yaml rename to k8s/knoe/garage-service.yaml diff --git a/k8s/prole/garage-statefulset-gcp.yaml b/k8s/knoe/garage-statefulset-gcp.yaml similarity index 100% rename from k8s/prole/garage-statefulset-gcp.yaml rename to k8s/knoe/garage-statefulset-gcp.yaml diff --git a/k8s/prole/garage-statefulset.yaml b/k8s/knoe/garage-statefulset.yaml similarity index 100% rename from k8s/prole/garage-statefulset.yaml rename to k8s/knoe/garage-statefulset.yaml diff --git a/k8s/prole/gitlab-managed-cert.yaml b/k8s/knoe/gitlab-managed-cert.yaml similarity index 96% rename from k8s/prole/gitlab-managed-cert.yaml rename to k8s/knoe/gitlab-managed-cert.yaml index 0b26e8a..1911f51 100644 --- a/k8s/prole/gitlab-managed-cert.yaml +++ b/k8s/knoe/gitlab-managed-cert.yaml @@ -20,7 +20,7 @@ # # Apply on the APP cluster (knoe-dev-0): # kubectl --context=gke_plenary-truck-485623-p7_us-west3_knoe-dev-0 \ -# apply -f k8s/prole/gitlab-managed-cert.yaml +# apply -f k8s/knoe/gitlab-managed-cert.yaml --- apiVersion: networking.gke.io/v1 kind: ManagedCertificate diff --git a/k8s/prole/ingress.yaml b/k8s/knoe/ingress.yaml similarity index 87% rename from k8s/prole/ingress.yaml rename to k8s/knoe/ingress.yaml index 1f83cdf..da09c30 100644 --- a/k8s/prole/ingress.yaml +++ b/k8s/knoe/ingress.yaml @@ -1,29 +1,29 @@ apiVersion: networking.k8s.io/v1 kind: Ingress metadata: - name: prole-ingress + name: knoe-ingress annotations: kubernetes.io/ingress.class: traefik spec: rules: - - host: git.prole.org + - host: git.knoe.org http: paths: - path: / pathType: Prefix backend: service: - name: prole + name: knoe port: number: 443 - - host: api.prole.org + - host: api.knoe.org http: paths: - path: / pathType: Prefix backend: service: - name: prole + name: knoe port: number: 443 --- @@ -36,7 +36,7 @@ metadata: kubernetes.io/ingress.class: traefik spec: rules: - - host: dashboard.prole.org + - host: dashboard.knoe.org http: paths: - path: / @@ -56,7 +56,7 @@ metadata: kubernetes.io/ingress.class: traefik spec: rules: - - host: db.prole.org + - host: db.knoe.org http: paths: - path: / diff --git a/k8s/prole/iscsi-pvs.yaml b/k8s/knoe/iscsi-pvs.yaml similarity index 91% rename from k8s/prole/iscsi-pvs.yaml rename to k8s/knoe/iscsi-pvs.yaml index 8cc0428..f135775 100644 --- a/k8s/prole/iscsi-pvs.yaml +++ b/k8s/knoe/iscsi-pvs.yaml @@ -22,7 +22,7 @@ spec: - key: kubernetes.io/hostname operator: In values: - - myrddin.prole.org + - myrddin.knoe.org --- apiVersion: v1 kind: PersistentVolume @@ -48,7 +48,7 @@ spec: - key: kubernetes.io/hostname operator: In values: - - myrddin.prole.org + - myrddin.knoe.org --- apiVersion: v1 kind: PersistentVolume @@ -74,7 +74,7 @@ spec: - key: kubernetes.io/hostname operator: In values: - - myrddin.prole.org + - myrddin.knoe.org --- apiVersion: v1 kind: PersistentVolume @@ -100,7 +100,7 @@ spec: - key: kubernetes.io/hostname operator: In values: - - merlin.prole.org + - merlin.knoe.org --- apiVersion: v1 kind: PersistentVolume @@ -126,7 +126,7 @@ spec: - key: kubernetes.io/hostname operator: In values: - - merlin.prole.org + - merlin.knoe.org --- apiVersion: v1 kind: PersistentVolume @@ -152,9 +152,9 @@ spec: - key: kubernetes.io/hostname operator: In values: - - pi.prole.org - - merlin.prole.org - - myrddin.prole.org + - pi.knoe.org + - merlin.knoe.org + - myrddin.knoe.org --- apiVersion: v1 kind: PersistentVolume @@ -180,9 +180,9 @@ spec: - key: kubernetes.io/hostname operator: In values: - - pi.prole.org - - merlin.prole.org - - myrddin.prole.org + - pi.knoe.org + - merlin.knoe.org + - myrddin.knoe.org --- apiVersion: v1 kind: PersistentVolume @@ -208,7 +208,7 @@ spec: - key: kubernetes.io/hostname operator: In values: - - pi.prole.org + - pi.knoe.org --- apiVersion: v1 kind: PersistentVolume @@ -234,7 +234,7 @@ spec: - key: kubernetes.io/hostname operator: In values: - - merlin.prole.org + - merlin.knoe.org --- apiVersion: v1 kind: PersistentVolume @@ -260,4 +260,4 @@ spec: - key: kubernetes.io/hostname operator: In values: - - myrddin.prole.org + - myrddin.knoe.org diff --git a/deploy/opentofu/k3s/manifests/prole/prole-configmap.yaml b/k8s/knoe/knoe-configmap.yaml similarity index 96% rename from deploy/opentofu/k3s/manifests/prole/prole-configmap.yaml rename to k8s/knoe/knoe-configmap.yaml index 840ea36..12db3fb 100644 --- a/deploy/opentofu/k3s/manifests/prole/prole-configmap.yaml +++ b/k8s/knoe/knoe-configmap.yaml @@ -1,7 +1,7 @@ apiVersion: v1 kind: ConfigMap metadata: - name: prole-nginx-config + name: knoe-nginx-config data: nginx.conf: | user nginx; diff --git a/k8s/prole/knoe-db-barman-objectstore-gcs.yaml b/k8s/knoe/knoe-db-barman-objectstore-gcs.yaml similarity index 100% rename from k8s/prole/knoe-db-barman-objectstore-gcs.yaml rename to k8s/knoe/knoe-db-barman-objectstore-gcs.yaml diff --git a/k8s/prole/knoe-db-barman-objectstore.yaml b/k8s/knoe/knoe-db-barman-objectstore.yaml similarity index 100% rename from k8s/prole/knoe-db-barman-objectstore.yaml rename to k8s/knoe/knoe-db-barman-objectstore.yaml diff --git a/k8s/prole/knoe-db-postgres-service.yaml b/k8s/knoe/knoe-db-postgres-service.yaml similarity index 100% rename from k8s/prole/knoe-db-postgres-service.yaml rename to k8s/knoe/knoe-db-postgres-service.yaml diff --git a/k8s/prole/knoe-db-recovery.yaml.tpl b/k8s/knoe/knoe-db-recovery.yaml.tpl similarity index 88% rename from k8s/prole/knoe-db-recovery.yaml.tpl rename to k8s/knoe/knoe-db-recovery.yaml.tpl index 0e421d9..2ef7327 100644 --- a/k8s/prole/knoe-db-recovery.yaml.tpl +++ b/k8s/knoe/knoe-db-recovery.yaml.tpl @@ -1,4 +1,4 @@ -# Keep in sync with k8s/prole/knoe-db.yaml (bootstrap recovery only). +# Keep in sync with k8s/knoe/knoe-db.yaml (bootstrap recovery only). apiVersion: postgresql.cnpg.io/v1 kind: Cluster metadata: @@ -20,7 +20,7 @@ spec: requiredDuringSchedulingIgnoredDuringExecution: nodeSelectorTerms: - matchExpressions: - - key: prole.org/node-role + - key: knoe.org/node-role operator: In values: - db @@ -36,11 +36,11 @@ spec: pg_hba: # allow password access from remote hosts if environment is "#dev" - local all postgres trust - - local all prole scram-sha-256 + - local all knoe scram-sha-256 - host all postgres all scram-sha-256 - - host prole knoe-db all scram-sha-256 + - host knoe knoe-db all scram-sha-256 - host all all all scram-sha-256 - - hostssl prole knoe-db all scram-sha-256 + - hostssl knoe knoe-db all scram-sha-256 # - host all all all gss include_realm=1 krb_realm=EXAMPLE.COM bootstrap: diff --git a/k8s/prole/knoe-db.yaml b/k8s/knoe/knoe-db.yaml similarity index 89% rename from k8s/prole/knoe-db.yaml rename to k8s/knoe/knoe-db.yaml index 84efd92..2bfa147 100644 --- a/k8s/prole/knoe-db.yaml +++ b/k8s/knoe/knoe-db.yaml @@ -41,17 +41,17 @@ spec: pg_hba: # allow password access from remote hosts if environment is "#dev" - local all postgres trust - - local all prole scram-sha-256 + - local all knoe scram-sha-256 - host all postgres all scram-sha-256 - - host prole knoe-db all scram-sha-256 + - host knoe knoe-db all scram-sha-256 - host all all all scram-sha-256 - - hostssl prole knoe-db all scram-sha-256 + - hostssl knoe knoe-db all scram-sha-256 # - host all all all gss include_realm=1 krb_realm=EXAMPLE.COM bootstrap: initdb: database: knoe-db - owner: prole + owner: knoe localeCollate: 'en_US.utf8' localeCType: 'en_US.utf8' secret: @@ -60,7 +60,7 @@ spec: - CREATE EXTENSION IF NOT EXISTS pg_stat_statements; postInitSQL: - DO $$ BEGIN IF NOT EXISTS (SELECT FROM pg_roles WHERE rolname = 'knoe') THEN CREATE ROLE knoe LOGIN NOSUPERUSER NOCREATEDB NOCREATEROLE INHERIT; END IF; END $$; - - DO $$ DECLARE owner_password text; BEGIN SELECT rolpassword INTO owner_password FROM pg_authid WHERE rolname = 'prole'; IF owner_password IS NOT NULL THEN EXECUTE format('ALTER ROLE knoe PASSWORD %L', owner_password); END IF; END $$; + - DO $$ DECLARE owner_password text; BEGIN SELECT rolpassword INTO owner_password FROM pg_authid WHERE rolname = 'knoe'; IF owner_password IS NOT NULL THEN EXECUTE format('ALTER ROLE knoe PASSWORD %L', owner_password); END IF; END $$; - DO $$ BEGIN IF NOT EXISTS (SELECT FROM pg_roles WHERE rolname = 'knoe_catalog_executor') THEN CREATE ROLE knoe_catalog_executor NOLOGIN; END IF; END $$; - CREATE SCHEMA IF NOT EXISTS knoe AUTHORIZATION knoe; - ALTER SCHEMA knoe OWNER TO knoe; @@ -72,12 +72,12 @@ spec: - CREATE EXTENSION IF NOT EXISTS postgis_topology SCHEMA knoe; - CREATE EXTENSION IF NOT EXISTS vector SCHEMA knoe; - CREATE EXTENSION IF NOT EXISTS tds_fdw SCHEMA knoe; - - GRANT USAGE ON SCHEMA knoe TO prole; - - GRANT EXECUTE ON ALL FUNCTIONS IN SCHEMA knoe TO prole; + - GRANT USAGE ON SCHEMA knoe TO knoe; + - GRANT EXECUTE ON ALL FUNCTIONS IN SCHEMA knoe TO knoe; - GRANT USAGE ON SCHEMA knoe TO knoe_catalog_executor; - GRANT EXECUTE ON ALL FUNCTIONS IN SCHEMA knoe TO knoe_catalog_executor; - ALTER DEFAULT PRIVILEGES FOR ROLE knoe IN SCHEMA knoe GRANT EXECUTE ON FUNCTIONS TO knoe_catalog_executor; - - GRANT EXECUTE ON ALL FUNCTIONS IN SCHEMA topology TO prole; + - GRANT EXECUTE ON ALL FUNCTIONS IN SCHEMA topology TO knoe; - CREATE SCHEMA IF NOT EXISTS storage; - CREATE SCHEMA IF NOT EXISTS graphql_public; - DO $$ BEGIN IF NOT EXISTS (SELECT FROM pg_roles WHERE rolname = 'anon') THEN CREATE ROLE anon NOLOGIN; END IF; END $$; diff --git a/deploy/opentofu/k3s/manifests/prole/prole-deployment.yaml b/k8s/knoe/knoe-deployment.yaml similarity index 81% rename from deploy/opentofu/k3s/manifests/prole/prole-deployment.yaml rename to k8s/knoe/knoe-deployment.yaml index d4f546e..e24e6f0 100644 --- a/deploy/opentofu/k3s/manifests/prole/prole-deployment.yaml +++ b/k8s/knoe/knoe-deployment.yaml @@ -1,21 +1,21 @@ apiVersion: apps/v1 kind: Deployment metadata: - name: prole + name: knoe labels: - app: prole + app: knoe spec: replicas: 1 selector: matchLabels: - app: prole + app: knoe template: metadata: labels: - app: prole + app: knoe spec: nodeSelector: - kubernetes.io/hostname: myrddin.prole.org + kubernetes.io/hostname: myrddin.knoe.org containers: - name: nginx image: nginx:1.27-alpine @@ -41,10 +41,10 @@ spec: volumes: - name: nginx-config configMap: - name: prole-nginx-config + name: knoe-nginx-config - name: tls secret: - secretName: prole-nginx-tls + secretName: knoe-nginx-tls - name: web-root configMap: - name: prole-index-html + name: knoe-index-html diff --git a/k8s/prole/prole-service.yaml b/k8s/knoe/knoe-service.yaml similarity index 77% rename from k8s/prole/prole-service.yaml rename to k8s/knoe/knoe-service.yaml index 822767d..999fc17 100644 --- a/k8s/prole/prole-service.yaml +++ b/k8s/knoe/knoe-service.yaml @@ -1,12 +1,12 @@ apiVersion: v1 kind: Service metadata: - name: prole + name: knoe labels: - app: prole + app: knoe spec: selector: - app: prole + app: knoe ports: - name: https port: 443 diff --git a/k8s/prole/kustomization.yaml b/k8s/knoe/kustomization.yaml similarity index 80% rename from k8s/prole/kustomization.yaml rename to k8s/knoe/kustomization.yaml index 2f86cbc..f304b11 100644 --- a/k8s/prole/kustomization.yaml +++ b/k8s/knoe/kustomization.yaml @@ -8,9 +8,9 @@ resources: - knoe-db-barman-objectstore.yaml - knoe-db.yaml - knoe-db-postgres-service.yaml - - prole-configmap.yaml - - prole-deployment.yaml - - prole-service.yaml + - knoe-configmap.yaml + - knoe-deployment.yaml + - knoe-service.yaml - openbao-statefulset.yaml - openbao-service.yaml - ingress.yaml diff --git a/k8s/prole/merlin-local-iscsi-storageclass.yaml b/k8s/knoe/merlin-local-iscsi-storageclass.yaml similarity index 100% rename from k8s/prole/merlin-local-iscsi-storageclass.yaml rename to k8s/knoe/merlin-local-iscsi-storageclass.yaml diff --git a/k8s/prole/monitoring-d004-pvs.yaml b/k8s/knoe/monitoring-d004-pvs.yaml similarity index 80% rename from k8s/prole/monitoring-d004-pvs.yaml rename to k8s/knoe/monitoring-d004-pvs.yaml index fbb8b9f..1f45ccd 100644 --- a/k8s/prole/monitoring-d004-pvs.yaml +++ b/k8s/knoe/monitoring-d004-pvs.yaml @@ -1,7 +1,7 @@ apiVersion: v1 kind: PersistentVolume metadata: - name: prole-monitoring-d004-prometheus + name: knoe-monitoring-d004-prometheus labels: synology.storage/role: prometheus synology.storage/volume: d004 @@ -11,7 +11,7 @@ spec: volumeMode: Filesystem accessModes: - ReadWriteOnce - storageClassName: prole-monitoring-d004 + storageClassName: knoe-monitoring-d004 persistentVolumeReclaimPolicy: Retain local: path: /synology/d004/prometheus @@ -22,12 +22,12 @@ spec: - key: kubernetes.io/hostname operator: In values: - - merlin.prole.org + - merlin.knoe.org --- apiVersion: v1 kind: PersistentVolume metadata: - name: prole-monitoring-d004-alertmanager + name: knoe-monitoring-d004-alertmanager labels: synology.storage/role: alertmanager synology.storage/volume: d004 @@ -37,7 +37,7 @@ spec: volumeMode: Filesystem accessModes: - ReadWriteOnce - storageClassName: prole-monitoring-d004 + storageClassName: knoe-monitoring-d004 persistentVolumeReclaimPolicy: Retain local: path: /synology/d004/alertmanager @@ -48,12 +48,12 @@ spec: - key: kubernetes.io/hostname operator: In values: - - merlin.prole.org + - merlin.knoe.org --- apiVersion: v1 kind: PersistentVolume metadata: - name: prole-monitoring-d004-grafana + name: knoe-monitoring-d004-grafana labels: synology.storage/role: grafana synology.storage/volume: d004 @@ -63,7 +63,7 @@ spec: volumeMode: Filesystem accessModes: - ReadWriteOnce - storageClassName: prole-monitoring-d004 + storageClassName: knoe-monitoring-d004 persistentVolumeReclaimPolicy: Retain local: path: /synology/d004/grafana @@ -74,4 +74,4 @@ spec: - key: kubernetes.io/hostname operator: In values: - - merlin.prole.org + - merlin.knoe.org diff --git a/k8s/prole/openbao-service.yaml b/k8s/knoe/openbao-service.yaml similarity index 100% rename from k8s/prole/openbao-service.yaml rename to k8s/knoe/openbao-service.yaml diff --git a/k8s/prole/openbao-statefulset.yaml b/k8s/knoe/openbao-statefulset.yaml similarity index 100% rename from k8s/prole/openbao-statefulset.yaml rename to k8s/knoe/openbao-statefulset.yaml diff --git a/k8s/prole/registry-ingress.yaml b/k8s/knoe/registry-ingress.yaml similarity index 92% rename from k8s/prole/registry-ingress.yaml rename to k8s/knoe/registry-ingress.yaml index 92de4c1..0851b44 100644 --- a/k8s/prole/registry-ingress.yaml +++ b/k8s/knoe/registry-ingress.yaml @@ -8,7 +8,7 @@ metadata: spec: ingressClassName: traefik rules: - - host: registry.prole.org + - host: registry.knoe.org http: paths: - path: / @@ -29,7 +29,7 @@ metadata: spec: ingressClassName: traefik rules: - - host: registry.internal.prole.org + - host: registry.internal.knoe.org http: paths: - path: / diff --git a/k8s/prole/storageclass-gcp-hdd.yaml b/k8s/knoe/storageclass-gcp-hdd.yaml similarity index 100% rename from k8s/prole/storageclass-gcp-hdd.yaml rename to k8s/knoe/storageclass-gcp-hdd.yaml diff --git a/k8s/prole/storageclass-gcp-premium-rwo.yaml b/k8s/knoe/storageclass-gcp-premium-rwo.yaml similarity index 100% rename from k8s/prole/storageclass-gcp-premium-rwo.yaml rename to k8s/knoe/storageclass-gcp-premium-rwo.yaml diff --git a/k8s/prole/storageclass-gcp-standard-hdd.yaml b/k8s/knoe/storageclass-gcp-standard-hdd.yaml similarity index 100% rename from k8s/prole/storageclass-gcp-standard-hdd.yaml rename to k8s/knoe/storageclass-gcp-standard-hdd.yaml diff --git a/k8s/prole/storageclass-gcp-standard-rwo.yaml b/k8s/knoe/storageclass-gcp-standard-rwo.yaml similarity index 100% rename from k8s/prole/storageclass-gcp-standard-rwo.yaml rename to k8s/knoe/storageclass-gcp-standard-rwo.yaml diff --git a/k8s/prole/storageclass-prole-monitoring-d004.yaml b/k8s/knoe/storageclass-knoe-monitoring-d004.yaml similarity index 84% rename from k8s/prole/storageclass-prole-monitoring-d004.yaml rename to k8s/knoe/storageclass-knoe-monitoring-d004.yaml index 3d83e8b..ea71477 100644 --- a/k8s/prole/storageclass-prole-monitoring-d004.yaml +++ b/k8s/knoe/storageclass-knoe-monitoring-d004.yaml @@ -1,7 +1,7 @@ apiVersion: storage.k8s.io/v1 kind: StorageClass metadata: - name: prole-monitoring-d004 + name: knoe-monitoring-d004 provisioner: kubernetes.io/no-provisioner reclaimPolicy: Retain volumeBindingMode: WaitForFirstConsumer diff --git a/k8s/prole/storageclass-synology-iscsi.yaml b/k8s/knoe/storageclass-synology-iscsi.yaml similarity index 100% rename from k8s/prole/storageclass-synology-iscsi.yaml rename to k8s/knoe/storageclass-synology-iscsi.yaml diff --git a/k8s/prole/supabase-pvs.yaml b/k8s/knoe/supabase-pvs.yaml similarity index 90% rename from k8s/prole/supabase-pvs.yaml rename to k8s/knoe/supabase-pvs.yaml index 12caed5..78d9d0d 100644 --- a/k8s/prole/supabase-pvs.yaml +++ b/k8s/knoe/supabase-pvs.yaml @@ -1,5 +1,5 @@ --- -# Static PersistentVolumes for Supabase on merlin.prole.org (/synology/d002) +# Static PersistentVolumes for Supabase on merlin.knoe.org (/synology/d002) # StorageClass: merlin-local-iscsi-d002 # Applied by supabase/deploy.sh ensure_supabase_k3s_static_pvs() apiVersion: v1 @@ -21,7 +21,7 @@ spec: - matchExpressions: - key: kubernetes.io/hostname operator: In - values: [merlin.prole.org] + values: [merlin.knoe.org] persistentVolumeReclaimPolicy: Retain storageClassName: merlin-local-iscsi-d002 volumeMode: Filesystem @@ -45,7 +45,7 @@ spec: - matchExpressions: - key: kubernetes.io/hostname operator: In - values: [merlin.prole.org] + values: [merlin.knoe.org] persistentVolumeReclaimPolicy: Retain storageClassName: merlin-local-iscsi-d002 volumeMode: Filesystem @@ -69,7 +69,7 @@ spec: - matchExpressions: - key: kubernetes.io/hostname operator: In - values: [merlin.prole.org] + values: [merlin.knoe.org] persistentVolumeReclaimPolicy: Retain storageClassName: merlin-local-iscsi-d002 volumeMode: Filesystem @@ -93,7 +93,7 @@ spec: - matchExpressions: - key: kubernetes.io/hostname operator: In - values: [merlin.prole.org] + values: [merlin.knoe.org] persistentVolumeReclaimPolicy: Retain storageClassName: merlin-local-iscsi-d002 volumeMode: Filesystem diff --git a/k8s/openbao/kerberos-configmap.yaml b/k8s/openbao/kerberos-configmap.yaml index c3f006f..85ea489 100644 --- a/k8s/openbao/kerberos-configmap.yaml +++ b/k8s/openbao/kerberos-configmap.yaml @@ -1,7 +1,7 @@ apiVersion: v1 kind: ConfigMap metadata: - name: prole-krb5-conf + name: knoe-krb5-conf namespace: knoe-system data: krb5.conf: | @@ -17,5 +17,5 @@ data: } [domain_realm] - .prole.org = PROLE.ORG - prole.org = PROLE.ORG + .knoe.org = PROLE.ORG + knoe.org = PROLE.ORG diff --git a/k8s/opentofu/deployment.yaml b/k8s/opentofu/deployment.yaml index 00176e7..65a6f4a 100644 --- a/k8s/opentofu/deployment.yaml +++ b/k8s/opentofu/deployment.yaml @@ -33,7 +33,7 @@ data:

OpenTofu Pipeline Ready

-

This service hosts the OpenTofu control plane for Prole deployments.

+

This service hosts the OpenTofu control plane for Knoe deployments.

Pipeline root (on disk): deploy/opentofu/k3s

diff --git a/k8s/registry/deployment.yaml b/k8s/registry/deployment.yaml index 8631395..444041f 100644 --- a/k8s/registry/deployment.yaml +++ b/k8s/registry/deployment.yaml @@ -36,7 +36,7 @@ spec: volumes: - name: registry-data hostPath: - path: /var/lib/prole/registry + path: /var/lib/knoe/registry type: DirectoryOrCreate --- apiVersion: v1 diff --git a/knoe-db/.knoe_user_password b/knoe-db/.knoe_user_password new file mode 100644 index 0000000..770925c --- /dev/null +++ b/knoe-db/.knoe_user_password @@ -0,0 +1 @@ +${OPENBAO:kv/knoe//db#password} diff --git a/knoe-db/.prole_user_password b/knoe-db/.prole_user_password deleted file mode 100644 index 0de6fb9..0000000 --- a/knoe-db/.prole_user_password +++ /dev/null @@ -1 +0,0 @@ -${OPENBAO:kv/prole//db#password} diff --git a/knoe-db/10_pg_tde_openbao.sh b/knoe-db/10_pg_tde_openbao.sh index cbdc18b..630fefe 100644 --- a/knoe-db/10_pg_tde_openbao.sh +++ b/knoe-db/10_pg_tde_openbao.sh @@ -5,7 +5,7 @@ set -Eeuo pipefail : "${OPENBAO_MOUNT:?OPENBAO_MOUNT is required (e.g. secret/data)}" PROVIDER="${PG_TDE_PROVIDER_NAME:-openbao}" -DEFAULT_KEY="${PG_TDE_PRINCIPAL_KEY_NAME:-prole-default-key}" +DEFAULT_KEY="${PG_TDE_PRINCIPAL_KEY_NAME:-knoe-default-key}" TOKEN_FILE="${OPENBAO_TOKEN_FILE:-/run/secrets/openbao_token}" @@ -45,7 +45,7 @@ BEGIN END IF; END $$; -# CREATE EXTENSION IF NOT EXISTS pg_prolelog; +# CREATE EXTENSION IF NOT EXISTS pg_knoelog; SELECT pg_tde_add_global_key_provider_vault_v2( '${PROVIDER}', diff --git a/knoe-db/Dockerfile b/knoe-db/Dockerfile index 62ff91d..59efe71 100644 --- a/knoe-db/Dockerfile +++ b/knoe-db/Dockerfile @@ -52,7 +52,7 @@ ENV PATH=/usr/lib/postgresql/18/bin:$PATH RUN set -eux; \ groupadd -r postgres --gid=999 || true; \ useradd -r -g postgres --uid=999 --home-dir=/var/lib/postgresql --shell=/bin/bash postgres || true; \ - mkdir -p /var/lib/postgresql /var/run/postgresql "$PGDATA" /docker-entrypoint-initdb.d /etc/prole; \ + mkdir -p /var/lib/postgresql /var/run/postgresql "$PGDATA" /docker-entrypoint-initdb.d /etc/knoe; \ chown -R postgres:postgres /var/lib/postgresql /var/run/postgresql /docker-entrypoint-initdb.d; \ chmod 3777 /var/run/postgresql @@ -254,14 +254,14 @@ RUN pip3 install --break-system-packages -r /requirements.txt RUN apt-get remove -y --purge --autoremove build-essential python3-dev && rm -rf /var/lib/apt/lists/* COPY docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh -COPY knoe-db-entrypoint.sh /usr/local/bin/prole-entrypoint.sh +COPY knoe-db-entrypoint.sh /usr/local/bin/knoe-entrypoint.sh COPY 10_pg_tde_openbao.sh /docker-entrypoint-initdb.d/10_pg_tde_openbao.sh COPY knoe-db-ssh-openbao.sh /usr/local/bin/knoe-db-ssh-openbao.sh COPY postgresql/*.conf /etc/postgresql/18/main/ RUN chown postgres:postgres /etc/postgresql/18/main/*.conf RUN set -eux; \ - chmod +x /usr/local/bin/docker-entrypoint.sh /usr/local/bin/prole-entrypoint.sh /usr/local/bin/knoe-db-ssh-openbao.sh /docker-entrypoint-initdb.d/10_pg_tde_openbao.sh + chmod +x /usr/local/bin/docker-entrypoint.sh /usr/local/bin/knoe-entrypoint.sh /usr/local/bin/knoe-db-ssh-openbao.sh /docker-entrypoint-initdb.d/10_pg_tde_openbao.sh EXPOSE 5432 CMD ["postgres"] diff --git a/knoe-db/Dockerfile.percona.template b/knoe-db/Dockerfile.percona.template index 7189422..976c555 100644 --- a/knoe-db/Dockerfile.percona.template +++ b/knoe-db/Dockerfile.percona.template @@ -52,7 +52,7 @@ ENV PATH=/usr/lib/postgresql/{{MAJOR_VERSION}}/bin:$PATH RUN set -eux; \ groupadd -r postgres --gid=999 || true; \ useradd -r -g postgres --uid=999 --home-dir=/var/lib/postgresql --shell=/bin/bash postgres || true; \ - mkdir -p /var/lib/postgresql /var/run/postgresql "$PGDATA" /docker-entrypoint-initdb.d /etc/prole; \ + mkdir -p /var/lib/postgresql /var/run/postgresql "$PGDATA" /docker-entrypoint-initdb.d /etc/knoe; \ chown -R postgres:postgres /var/lib/postgresql /var/run/postgresql /docker-entrypoint-initdb.d; \ chmod 3777 /var/run/postgresql @@ -231,14 +231,14 @@ RUN pip3 install --break-system-packages -r /requirements.txt RUN apt-get remove -y --purge --autoremove build-essential python3-dev && rm -rf /var/lib/apt/lists/* COPY docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh -COPY knoe-db-entrypoint.sh /usr/local/bin/prole-entrypoint.sh +COPY knoe-db-entrypoint.sh /usr/local/bin/knoe-entrypoint.sh COPY 10_pg_tde_openbao.sh /docker-entrypoint-initdb.d/10_pg_tde_openbao.sh COPY knoe-db-ssh-openbao.sh /usr/local/bin/knoe-db-ssh-openbao.sh COPY postgresql/*.conf /etc/postgresql/{{MAJOR_VERSION}}/main/ RUN chown postgres:postgres /etc/postgresql/{{MAJOR_VERSION}}/main/*.conf RUN set -eux; \ - chmod +x /usr/local/bin/docker-entrypoint.sh /usr/local/bin/prole-entrypoint.sh /usr/local/bin/knoe-db-ssh-openbao.sh /docker-entrypoint-initdb.d/10_pg_tde_openbao.sh + chmod +x /usr/local/bin/docker-entrypoint.sh /usr/local/bin/knoe-entrypoint.sh /usr/local/bin/knoe-db-ssh-openbao.sh /docker-entrypoint-initdb.d/10_pg_tde_openbao.sh EXPOSE 5432 CMD ["postgres"] diff --git a/knoe-db/Dockerfile.postgres.template b/knoe-db/Dockerfile.postgres.template index 36a7d6e..ea69984 100644 --- a/knoe-db/Dockerfile.postgres.template +++ b/knoe-db/Dockerfile.postgres.template @@ -49,7 +49,7 @@ ENV PATH=/usr/lib/postgresql/{{MAJOR_VERSION}}/bin:$PATH RUN set -eux; \ groupadd -r postgres --gid=999 || true; \ useradd -r -g postgres --uid=999 --home-dir=/var/lib/postgresql --shell=/bin/bash postgres || true; \ - mkdir -p /var/lib/postgresql /var/run/postgresql "$PGDATA" /docker-entrypoint-initdb.d /etc/prole; \ + mkdir -p /var/lib/postgresql /var/run/postgresql "$PGDATA" /docker-entrypoint-initdb.d /etc/knoe; \ chown -R postgres:postgres /var/lib/postgresql /var/run/postgresql /docker-entrypoint-initdb.d; \ chmod 3777 /var/run/postgresql @@ -146,14 +146,14 @@ RUN pip3 install --break-system-packages -r /requirements.txt RUN apt-get remove -y --purge --autoremove build-essential python3-dev && rm -rf /var/lib/apt/lists/* COPY docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh -COPY knoe-db-entrypoint.sh /usr/local/bin/prole-entrypoint.sh +COPY knoe-db-entrypoint.sh /usr/local/bin/knoe-entrypoint.sh COPY 10_pg_tde_openbao.sh /docker-entrypoint-initdb.d/10_pg_tde_openbao.sh COPY knoe-db-ssh-openbao.sh /usr/local/bin/knoe-db-ssh-openbao.sh COPY postgresql/*.conf /etc/postgresql/{{MAJOR_VERSION}}/main/ RUN chown postgres:postgres /etc/postgresql/{{MAJOR_VERSION}}/main/*.conf -ARG PROLE_USER=prole +ARG PROLE_USER=knoe RUN set -eux; \ if [ -n "$PROLE_USER" ] && [ "$PROLE_USER" != "root" ] && [ "$PROLE_USER" != "postgres" ]; then \ if ! id -u "$PROLE_USER" >/dev/null 2>&1; then \ @@ -162,7 +162,7 @@ RUN set -eux; \ fi RUN set -eux; \ - chmod +x /usr/local/bin/docker-entrypoint.sh /usr/local/bin/prole-entrypoint.sh /usr/local/bin/knoe-db-ssh-openbao.sh /docker-entrypoint-initdb.d/10_pg_tde_openbao.sh + chmod +x /usr/local/bin/docker-entrypoint.sh /usr/local/bin/knoe-entrypoint.sh /usr/local/bin/knoe-db-ssh-openbao.sh /docker-entrypoint-initdb.d/10_pg_tde_openbao.sh EXPOSE 5432 CMD ["postgres"] diff --git a/knoe-db/bulk_insert.sql b/knoe-db/bulk_insert.sql index 445ec17..8d6b80c 100644 --- a/knoe-db/bulk_insert.sql +++ b/knoe-db/bulk_insert.sql @@ -1,4 +1,4 @@ -BULK INSERT prole.dbo.wells +BULK INSERT knoe.dbo.wells FROM '/var/opt/mssql/data/2023CaliforniaOilAndGasWells.csv' WITH ( FIRSTROW = 2, diff --git a/knoe-db/cr_prole_mssql_fdw.sql b/knoe-db/cr_prole_mssql_fdw.sql index 0ac4e69..17b43e6 100644 --- a/knoe-db/cr_prole_mssql_fdw.sql +++ b/knoe-db/cr_prole_mssql_fdw.sql @@ -1,16 +1,16 @@ CREATE EXTENSION tds_fdw; --- GRANT USAGE ON FOREIGN DATA WRAPPER tds_fdw TO prole; -CREATE SERVER prole_mssql_db +-- GRANT USAGE ON FOREIGN DATA WRAPPER tds_fdw TO knoe; +CREATE SERVER knoe_mssql_db FOREIGN DATA WRAPPER tds_fdw - OPTIONS (servername '127.0.0.1', port '1433', database 'prole', tds_version '7.4'); + OPTIONS (servername '127.0.0.1', port '1433', database 'knoe', tds_version '7.4'); -CREATE USER MAPPING FOR postgres SERVER prole_mssql_db OPTIONS (username 'sa', password '${OPENBAO:kv/prole//mssql#sa_password}'); +CREATE USER MAPPING FOR postgres SERVER knoe_mssql_db OPTIONS (username 'sa', password '${OPENBAO:kv/knoe//mssql#sa_password}'); -IMPORT FOREIGN SCHEMA dbo FROM SERVER prole_mssql_db INTO public OPTIONS (import_default 'true'); +IMPORT FOREIGN SCHEMA dbo FROM SERVER knoe_mssql_db INTO public OPTIONS (import_default 'true'); -CREATE FOREIGN TABLE prole_mssql_db_wells ( +CREATE FOREIGN TABLE knoe_mssql_db_wells ( API VARCHAR(50), FieldCode INT, AreaCode INT, @@ -35,5 +35,5 @@ CREATE FOREIGN TABLE prole_mssql_db_wells ( OperatorStatus VARCHAR (50), SystemEntryDate TIMESTAMP ) -SERVER prole_mssql_db +SERVER knoe_mssql_db OPTIONS (schema_name 'dbo', table_name 'wells', row_estimate_method 'showplan_all'); diff --git a/knoe-db/knoe-db-iscsi-data001.yaml b/knoe-db/knoe-db-iscsi-data001.yaml index c49e9fc..a641f2c 100644 --- a/knoe-db/knoe-db-iscsi-data001.yaml +++ b/knoe-db/knoe-db-iscsi-data001.yaml @@ -1,7 +1,7 @@ apiVersion: v1 kind: PersistentVolumeClaim metadata: - name: prole-mssql-db-data001 + name: knoe-mssql-db-data001 spec: storageClassName: synology-iscsi-storage accessModes: diff --git a/knoe-db/knoe-db-ssh-openbao.sh b/knoe-db/knoe-db-ssh-openbao.sh index 416eb8c..6634797 100644 --- a/knoe-db/knoe-db-ssh-openbao.sh +++ b/knoe-db/knoe-db-ssh-openbao.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash set -Eeuo pipefail -PROLE_USER="${PROLE_USER:-prole}" +PROLE_USER="${PROLE_USER:-knoe}" TOKEN="${OPENBAO_TOKEN:-}" TOKEN_FILE="${OPENBAO_TOKEN_FILE:-/run/secrets/openbao_token}" @@ -28,9 +28,9 @@ if [[ -z "$OPENBAO_ADDR" ]]; then fi OPENBAO_SSH_MOUNT="${OPENBAO_SSH_MOUNT:-kv}" -OPENBAO_SSH_PATH="${OPENBAO_SSH_PATH:-prole/${NAMESPACE}/admin}" +OPENBAO_SSH_PATH="${OPENBAO_SSH_PATH:-knoe/${NAMESPACE}/admin}" -if [[ -z "$OPENBAO_SSH_PATH" || "$OPENBAO_SSH_PATH" == "prole//admin" ]]; then +if [[ -z "$OPENBAO_SSH_PATH" || "$OPENBAO_SSH_PATH" == "knoe//admin" ]]; then exit 0 fi diff --git a/knoe-db/pg_prolelog.Makefile b/knoe-db/pg_prolelog.Makefile index 1f1305b..c5ef5f9 100644 --- a/knoe-db/pg_prolelog.Makefile +++ b/knoe-db/pg_prolelog.Makefile @@ -1,6 +1,6 @@ -EXTENSION = pg_prolelog -DATA = pg_prolelog--1.0.sql -MODULES = pg_prolelog +EXTENSION = pg_knoelog +DATA = pg_knoelog--1.0.sql +MODULES = pg_knoelog PG_CONFIG = pg_config PGXS := $(shell $(PG_CONFIG) --pgxs) diff --git a/knoe-db/supabase.md b/knoe-db/supabase.md index 30ae220..2858a91 100644 --- a/knoe-db/supabase.md +++ b/knoe-db/supabase.md @@ -1,10 +1,10 @@ -# Supabase Integration for Prole-DB +# Supabase Integration for Knoe-DB -This document explains how Supabase is deployed alongside the Prole CloudNative-PG (CNPG) cluster and how it connects to Postgres. It provides practical guidance for operating and troubleshooting the integration. +This document explains how Supabase is deployed alongside the Knoe CloudNative-PG (CNPG) cluster and how it connects to Postgres. It provides practical guidance for operating and troubleshooting the integration. ## What is deployed -Supabase can be deployed alongside the Prole CNPG cluster. Currently, the base `supabase/supabase` image is unavailable on Docker Hub, so the default deployment manifests have been removed. +Supabase can be deployed alongside the Knoe CNPG cluster. Currently, the base `supabase/supabase` image is unavailable on Docker Hub, so the default deployment manifests have been removed. If you wish to deploy Supabase, you can use the `./supabase/deploy.sh` script which uses the official Supabase repository and its Docker Compose setup to generate Kubernetes manifests. @@ -28,11 +28,11 @@ If your Supabase image expects a different port, update your custom manifests. ## Optional feature toggle -Supabase is an optional feature in the installer UI. The user intent is saved in `prole.cfg` under the section `[Optional Features]` with the key: +Supabase is an optional feature in the installer UI. The user intent is saved in `knoe.cfg` under the section `[Optional Features]` with the key: - `SUPABASE_ENABLED = true|false` -This is for configuration tracking; it does not automatically add or remove Kubernetes resources. Deployment is controlled by the `k8s/prole/kustomization.yaml` resources list. +This is for configuration tracking; it does not automatically add or remove Kubernetes resources. Deployment is controlled by the `k8s/knoe/kustomization.yaml` resources list. ## How to use (quick start) @@ -40,10 +40,10 @@ This is for configuration tracking; it does not automatically add or remove Kube 2) Ensure the `knoe-db-user` secret exists (the init scripts or OpenBao flow should already create it). -3) Apply the Prole kustomization (includes Supabase resources): +3) Apply the Knoe kustomization (includes Supabase resources): ```bash -kubectl apply -k k8s/prole +kubectl apply -k k8s/knoe ``` 4) Verify Supabase and Postgres services: @@ -78,6 +78,6 @@ If you need Supabase to connect to a different CNPG cluster name or namespace, u ## Files referenced - `knoe-db-postgres-service.yaml` (optional legacy service; Supabase uses `knoe-db-rw`) -- `k8s/prole/kustomization.yaml` +- `k8s/knoe/kustomization.yaml` - `install.py` (optional feature toggle persistence) - `./supabase/deploy.sh` diff --git a/knoe.iml b/knoe.iml index a81a2d9..27d60a6 100644 --- a/knoe.iml +++ b/knoe.iml @@ -2,7 +2,7 @@ - + \ No newline at end of file diff --git a/knoe.sh b/knoe.sh index a4302c8..505f807 100755 --- a/knoe.sh +++ b/knoe.sh @@ -67,7 +67,7 @@ usage() { echo " stop Stop services" echo " restart Restart services (min mode only)" echo " backup Run a database backup (-f/full for full, default incremental)" - echo " passwd Change the Prole master password and propagate secrets" + echo " passwd Change the Knoe master password and propagate secrets" echo " status Show deployment health status (use -v for verbose)" echo echo "Any other arguments are passed directly to ansible.sh" @@ -121,8 +121,8 @@ fi default_cfg_path() { local conf_dir mode_hint mode cfg - conf_dir="${PROLE_CONF:-${ROOT_DIR}/conf}" - mode_hint="${PROLE_MODE:-${DEPLOYMENT_MODE:-${CLUSTER_ENV:-}}}" + conf_dir="${KNOE_CONF:-${ROOT_DIR}/conf}" + mode_hint="${KNOE_MODE:-${DEPLOYMENT_MODE:-${CLUSTER_ENV:-}}}" mode="${mode_hint,,}" case "$mode" in @@ -132,7 +132,7 @@ default_cfg_path() { k8s|gke|prod|production) [[ -f "$conf_dir/gke.cfg" ]] && { printf '%s' "$conf_dir/gke.cfg"; return 0; } ;; esac - for cfg in min.cfg k3d.cfg k3s.cfg gke.cfg prole.cfg; do + for cfg in min.cfg k3d.cfg k3s.cfg gke.cfg knoe.cfg; do if [[ -f "$conf_dir/$cfg" ]]; then printf '%s' "$conf_dir/$cfg" return 0 @@ -200,27 +200,27 @@ err_msg() { printf '[error] %s\n' "$*" >&2 } -load_prole_cfg() { +load_knoe_cfg() { local cfg="${1:-$PROLE_CFG_DEFAULT}" - # Set PROLE_CONF before sourcing prole_cfg.sh so it is preserved (prole_cfg.sh - # honours a pre-set PROLE_CONF) and the correct config file is auto-detected. + # Set KNOE_CONF before sourcing knoe_cfg.sh so it is preserved (knoe_cfg.sh + # honours a pre-set KNOE_CONF) and the correct config file is auto-detected. if [[ -f "$cfg" ]]; then - PROLE_CONF="$(cd "$(dirname "$cfg")" && pwd)" - export PROLE_CONF + KNOE_CONF="$(cd "$(dirname "$cfg")" && pwd)" + export KNOE_CONF PROLE_CFG_FILE="$cfg" export PROLE_CFG_FILE fi - if [[ -f "${ROOT_DIR}/etc/prole_cfg.sh" ]]; then + if [[ -f "${ROOT_DIR}/etc/knoe_cfg.sh" ]]; then # shellcheck disable=SC1090 - source "${ROOT_DIR}/etc/prole_cfg.sh" + source "${ROOT_DIR}/etc/knoe_cfg.sh" fi export PROLE_CFG_FILE="${cfg}" } -resolve_prole_mode() { - local raw="${PROLE_MODE:-${DEPLOYMENT_MODE:-${CLUSTER_ENV:-}}}" - if command -v prole_normalize_mode >/dev/null 2>&1; then - prole_normalize_mode "${raw:-}" +resolve_knoe_mode() { + local raw="${KNOE_MODE:-${DEPLOYMENT_MODE:-${CLUSTER_ENV:-}}}" + if command -v knoe_normalize_mode >/dev/null 2>&1; then + knoe_normalize_mode "${raw:-}" else printf '%s' "${raw:-}" fi @@ -243,9 +243,9 @@ ensure_openbao_url_for_mode() { k3s|k8s) # In k3s/k8s, the installer runs outside the cluster and must reach OpenBao via a real # externally reachable endpoint (no kubectl port-forward / localhost defaults). - if command -v _prole_host_from_url >/dev/null 2>&1; then + if command -v _knoe_host_from_url >/dev/null 2>&1; then local host - host=$(_prole_host_from_url "${PROLE_K3S_SERVER:-${K3S_SERVER_URL:-}}") + host=$(_knoe_host_from_url "${PROLE_K3S_SERVER:-${K3S_SERVER_URL:-}}") if [[ -n "${host:-}" ]]; then export PROLE_OPENBAO_URL="http://${host}:8200" fi @@ -268,7 +268,7 @@ resolve_k3d_cluster_name() { name="${CLUSTER_ENV}" fi fi - printf '%s' "${name:-prole-dev-cluster}" + printf '%s' "${name:-knoe-dev-cluster}" } fix_k3d_kubeconfig_server() { @@ -377,8 +377,8 @@ ensure_k3d_cluster_ready() { ensure_k3s_cluster_ready() { ensure_tools "k3s" - if command -v prole_ensure_kubeconfig >/dev/null 2>&1; then - prole_ensure_kubeconfig >/dev/null 2>&1 || true + if command -v knoe_ensure_kubeconfig >/dev/null 2>&1; then + knoe_ensure_kubeconfig >/dev/null 2>&1 || true fi if ! kubectl get nodes >/dev/null 2>&1; then err_msg "k3s cluster not reachable (kubectl get nodes failed)" @@ -591,10 +591,10 @@ stop_monitoring_pods() { TS="$(date +%Y%m%d-%H%M%S)" # Prep for Ansible truthfulness -if [[ -f "${ROOT_DIR}/etc/sync-prole-cfg.py" ]]; then +if [[ -f "${ROOT_DIR}/etc/sync-knoe-cfg.py" ]]; then # We use the same vault pass logic as ansible.sh if available export PYTHONPATH="${PYTHONPATH:-}:${ROOT_DIR}" - python3 "${ROOT_DIR}/etc/sync-prole-cfg.py" || true + python3 "${ROOT_DIR}/etc/sync-knoe-cfg.py" || true fi case "${CMD}" in @@ -616,8 +616,8 @@ case "${CMD}" in ;; perfsnap) CONFIG_PATH="$(resolve_cfg_path)" - load_prole_cfg "${CONFIG_PATH}" - _mode_for_env=$(resolve_prole_mode) + load_knoe_cfg "${CONFIG_PATH}" + _mode_for_env=$(resolve_knoe_mode) if [[ -z "${_mode_for_env:-}" ]]; then _mode_for_env="k3d" fi @@ -633,14 +633,14 @@ import os from datetime import datetime, timezone from pathlib import Path -from knoe import prole_conf +from knoe import knoe_conf from knoe.core.env import _kubectl_base_cmd_for_k3s from knoe.core.topology import TopologyDiscoveryConfig, discover_cluster_topology cfg_path = Path(os.environ["PROLE_PERFSNAP_CFG"]).resolve() snap_path = Path(os.environ["PROLE_PERFSNAP_FILE"]).resolve() -cfg = prole_conf.load_layered_config(cfg_path, require_exists=True) +cfg = knoe_conf.load_layered_config(cfg_path, require_exists=True) def cfg_get(section: str, key: str, default: str = "") -> str: try: @@ -656,12 +656,12 @@ mode_raw = ( ) mode = mode_raw.lower() project_root = cfg_path.parent.parent -prole_data = cfg_get("Inputs", "env_setup.PROLE_DATA") or str(project_root / "data") +knoe_data = cfg_get("Inputs", "env_setup.PROLE_DATA") or str(project_root / "data") if mode in {"k3s", "k8s"}: managed_kubeconfig = os.environ.get("PROLE_KUBECONFIG") or os.environ.get("KUBECONFIG") if not managed_kubeconfig: - candidate = project_root / "prole-k3s.kubeconfig" + candidate = project_root / "knoe-k3s.kubeconfig" if candidate.exists(): managed_kubeconfig = str(candidate) base_cmd = _kubectl_base_cmd_for_k3s(managed_kubeconfig=managed_kubeconfig) @@ -682,12 +682,12 @@ else: context = target if target.startswith("k3d-") else f"k3d-{target}" if context: base_cmd.extend(["--context", context]) -output_root = Path(prole_data) / "topology" +output_root = Path(knoe_data) / "topology" output_root.mkdir(parents=True, exist_ok=True) env_map = dict(os.environ) env_map["PROLE_CFG_FILE"] = str(cfg_path) -env_map["PROLE_DATA"] = str(Path(prole_data).resolve()) +env_map["PROLE_DATA"] = str(Path(knoe_data).resolve()) result = discover_cluster_topology( kubectl_base_cmd=base_cmd, @@ -787,8 +787,8 @@ PY fi fi done - load_prole_cfg "${_cfg_for_env}" - _mode_for_env=$(resolve_prole_mode) + load_knoe_cfg "${_cfg_for_env}" + _mode_for_env=$(resolve_knoe_mode) if [[ -z "${_mode_for_env:-}" ]]; then _mode_for_env="k3d" fi @@ -842,8 +842,8 @@ PY "${ROOT_DIR}/ansible.sh" "${CMD_ARGS[@]}" fi # SYNC AFTER ANSIBLE - if [[ -f "${ROOT_DIR}/etc/sync-prole-cfg.py" ]]; then - python3 "${ROOT_DIR}/etc/sync-prole-cfg.py" || true + if [[ -f "${ROOT_DIR}/etc/sync-knoe-cfg.py" ]]; then + python3 "${ROOT_DIR}/etc/sync-knoe-cfg.py" || true fi ;; site) @@ -862,8 +862,8 @@ PY "${ROOT_DIR}/ansible.sh" -p infrastructure/playbooks/site.yml "${CMD_ARGS[@]}" fi # SYNC AFTER SITE - if [[ -f "${ROOT_DIR}/etc/sync-prole-cfg.py" ]]; then - python3 "${ROOT_DIR}/etc/sync-prole-cfg.py" || true + if [[ -f "${ROOT_DIR}/etc/sync-knoe-cfg.py" ]]; then + python3 "${ROOT_DIR}/etc/sync-knoe-cfg.py" || true fi ) ;; @@ -876,8 +876,8 @@ PY "${ROOT_DIR}/ansible.sh" -p infrastructure/playbooks/k3s_delete.yml "${CMD_ARGS[@]}" fi # SYNC AFTER RESET (to clear token) - if [[ -f "${ROOT_DIR}/etc/sync-prole-cfg.py" ]]; then - python3 "${ROOT_DIR}/etc/sync-prole-cfg.py" || true + if [[ -f "${ROOT_DIR}/etc/sync-knoe-cfg.py" ]]; then + python3 "${ROOT_DIR}/etc/sync-knoe-cfg.py" || true fi ;; deploy) @@ -896,8 +896,8 @@ PY echo "Step 2/3: Running site deployment..." "${ROOT_DIR}/ansible.sh" -p infrastructure/playbooks/site.yml "${CMD_ARGS[@]}" - if [[ -f "${ROOT_DIR}/etc/sync-prole-cfg.py" ]]; then - python3 "${ROOT_DIR}/etc/sync-prole-cfg.py" || true + if [[ -f "${ROOT_DIR}/etc/sync-knoe-cfg.py" ]]; then + python3 "${ROOT_DIR}/etc/sync-knoe-cfg.py" || true fi echo "Step 3/3: Running silent installer..." @@ -915,10 +915,10 @@ PY exit 1 fi else - load_prole_cfg "${PROLE_CFG_DEFAULT}" + load_knoe_cfg "${PROLE_CFG_DEFAULT}" fi - local_mode=$(resolve_prole_mode) + local_mode=$(resolve_knoe_mode) if [[ "${MIN_MODE}" -eq 1 ]]; then local_mode="min" fi @@ -940,7 +940,7 @@ PY nohup nerdctl run --rm --name authority -p 8080:8080 \ -e DB_HOST=host.nerdctl.internal \ -e DB_PORT=5432 \ - prole-authority:latest > "${KNOE_HOME}/logs/authority.log" 2>&1 & + knoe-authority:latest > "${KNOE_HOME}/logs/authority.log" 2>&1 & log_msg "Minimal environment started. Logs at ${KNOE_HOME}/logs" exit 0 @@ -948,7 +948,7 @@ PY stop_port_forwards - local_mode=$(resolve_prole_mode) + local_mode=$(resolve_knoe_mode) if [[ -z "${local_mode:-}" ]]; then local_mode="k3d" fi @@ -963,7 +963,7 @@ PY mkdir -p "${PROLE_LOGS}" >/dev/null 2>&1 || true fi - log_msg "Starting Prole environment (mode=${local_mode})..." + log_msg "Starting Knoe environment (mode=${local_mode})..." case "$local_mode" in k3d) @@ -1012,10 +1012,10 @@ PY ;; stop) if [[ -f "${PROLE_CFG_DEFAULT}" ]]; then - load_prole_cfg "${PROLE_CFG_DEFAULT}" + load_knoe_cfg "${PROLE_CFG_DEFAULT}" fi - local_mode=$(resolve_prole_mode) + local_mode=$(resolve_knoe_mode) if [[ "${MIN_MODE}" -eq 1 ]]; then local_mode="min" fi @@ -1038,7 +1038,7 @@ PY exit 1 fi - local_mode=$(resolve_prole_mode) + local_mode=$(resolve_knoe_mode) if [[ -z "${local_mode:-}" ]]; then local_mode="k3d" fi @@ -1129,9 +1129,9 @@ PY err_msg "Missing ${PROLE_CFG_DEFAULT}" exit 1 fi - load_prole_cfg "${PROLE_CFG_DEFAULT}" + load_knoe_cfg "${PROLE_CFG_DEFAULT}" - local_mode=$(resolve_prole_mode) + local_mode=$(resolve_knoe_mode) if [[ -z "${local_mode:-}" ]]; then local_mode="k3d" fi @@ -1209,10 +1209,10 @@ PY err_msg "Missing ${PROLE_CFG_DEFAULT}" exit 1 fi - load_prole_cfg "${PROLE_CFG_DEFAULT}" + load_knoe_cfg "${PROLE_CFG_DEFAULT}" LOGFILE="${ROOT_DIR}/logs/init-${TS}.log" - local_mode=$(resolve_prole_mode) + local_mode=$(resolve_knoe_mode) if [[ -z "${local_mode:-}" ]]; then local_mode="k3d" fi @@ -1220,7 +1220,7 @@ PY run_init_scripts() { log_msg "========================================" - log_msg " Prole Initialization Scripts" + log_msg " Knoe Initialization Scripts" log_msg " Mode: ${local_mode}" log_msg " $(date)" log_msg "========================================" @@ -1386,8 +1386,8 @@ PY "${ROOT_DIR}/ansible.sh" "${CMD}" "${CMD_ARGS[@]}" fi # SYNC AFTER ANSIBLE - if [[ -f "${ROOT_DIR}/etc/sync-prole-cfg.py" ]]; then - python3 "${ROOT_DIR}/etc/sync-prole-cfg.py" || true + if [[ -f "${ROOT_DIR}/etc/sync-knoe-cfg.py" ]]; then + python3 "${ROOT_DIR}/etc/sync-knoe-cfg.py" || true fi ;; esac diff --git a/knoe.spec b/knoe.spec index 926cfec..65be131 100644 --- a/knoe.spec +++ b/knoe.spec @@ -17,7 +17,7 @@ datas = [ ('docs', 'docs'), ('k8s', 'k8s'), ('knoe-db', 'knoe-db'), - ('prole-app/dist/Prole Tools.app', 'prole-app/dist/Prole Tools.app'), + ('knoe-app/dist/Knoe Tools.app', 'knoe-app/dist/Knoe Tools.app'), ] # Binaries to include (with execute permissions) @@ -64,7 +64,7 @@ exe = EXE( a.zipfiles, a.datas, [], - name='prole-installer', + name='knoe-installer', debug=False, bootloader_ignore_signals=False, strip=False, @@ -76,18 +76,18 @@ exe = EXE( target_arch=None, codesign_identity=None, entitlements_file=None, - icon='build/prole.icns', + icon='build/knoe.icns', ) # Create macOS app bundle app = BUNDLE( exe, - name='Prole Installer.app', - icon='build/prole.icns', - bundle_identifier='com.prole.installer', + name='Knoe.DB Installer.app', + icon='build/knoe.icns', + bundle_identifier='com.knoe.db.installer', info_plist={ - 'CFBundleName': 'Prole Installer', - 'CFBundleDisplayName': 'Prole Database Installer', + 'CFBundleName': 'Knoe.DB Installer', + 'CFBundleDisplayName': 'Knoe.DB Installer', 'CFBundleVersion': '1.0.0', 'CFBundleShortVersionString': '1.0.0', 'NSHighResolutionCapable': 'True', diff --git a/knoe/__init__.py b/knoe/__init__.py index f3b3d74..2c6dcbc 100644 --- a/knoe/__init__.py +++ b/knoe/__init__.py @@ -1,12 +1,12 @@ """ -Root-level Installer package for Prole. +Root-level Installer package for Knoe. This package contains the refactored modules extracted from the legacy monolithic `install.py`. Modules: - config: shared paths, dependency catalog, platform helpers, version utils. -- build: Prole app build command composition. +- build: Knoe app build command composition. - deploy: host-side deploy helpers (Xcode tools check, app build flow). - milestone: installer milestone abstraction. - state: installer state model. @@ -14,7 +14,7 @@ Modules: - core: UI-agnostic installer core wrapper. - screen: (optional) UI controller placement point. -The entry point remains at `prole/install.py` and the legacy root `install.py` +The entry point remains at `knoe/install.py` and the legacy root `install.py` continues to work, but now delegates to `installer.*` modules. """ diff --git a/knoe/build.py b/knoe/build.py index 17a4c32..3f4379d 100644 --- a/knoe/build.py +++ b/knoe/build.py @@ -1,7 +1,7 @@ """ -Build helpers for the Prole installer (root-level package). +Build helpers for the Knoe installer (root-level package). -UI-agnostic command composition for the Prole macOS app build. +UI-agnostic command composition for the Knoe macOS app build. """ from __future__ import annotations @@ -14,18 +14,18 @@ from .state import InstallerState def get_build_command(project_root: Path, env: str | None) -> str: - """Return the Prole app build command with an env comment suffix. + """Return the Knoe app build command with an env comment suffix. Example output: - cd "/path/to/repo" && PROLE_VERBOSE=1 bash -lc 'export PROLE_HOME="${PROLE_HOME:-$HOME/.prole}"; "$PROLE_HOME/env.sh" ./prole-tools-app/build.sh build --verbose' # Dev + cd "/path/to/repo" && PROLE_VERBOSE=1 bash -lc 'export KNOE_HOME="${KNOE_HOME:-$HOME/.knoe}"; "$KNOE_HOME/env.sh" ./knoe-tools-app/build.sh build --verbose' # Dev """ env_label = (env or "Dev").strip().title() - prole_root = str(project_root) + knoe_root = str(project_root) # Ensure we apply the stable bash environment via the executable env.sh wrapper - # Avoid static analyzers tripping on $PROLE_HOME by breaking the token - env_default = '"${' + 'PROLE_HOME:-$HOME/.prole}"' - prole_home_token = '"$' + 'PROLE_HOME"' - cmd = f"cd \"{prole_root}\" && PROLE_VERBOSE=1 bash -lc 'export PROLE_HOME={env_default}; {prole_home_token}/env.sh ./prole-tools-app/build.sh build --verbose' # {env_label}" + # Avoid static analyzers tripping on $KNOE_HOME by breaking the token + env_default = '"${' + 'KNOE_HOME:-$HOME/.knoe}"' + knoe_home_token = '"$' + 'KNOE_HOME"' + cmd = f"cd \"{knoe_root}\" && PROLE_VERBOSE=1 bash -lc 'export KNOE_HOME={env_default}; {knoe_home_token}/env.sh ./knoe-tools-app/build.sh build --verbose' # {env_label}" return cmd diff --git a/knoe/config.py b/knoe/config.py index ad1ec55..8841654 100644 --- a/knoe/config.py +++ b/knoe/config.py @@ -1,7 +1,7 @@ """ -Shared configuration and utility functions for the Prole installer (root-level). +Shared configuration and utility functions for the Knoe installer (root-level). -This mirrors `prole.knoe.config` but is located under the root `installer/` +This mirrors `knoe.knoe.config` but is located under the root `installer/` package per the refactor request. UI code should import from `knoe.config`. """ @@ -26,29 +26,29 @@ from typing import Optional, Tuple from cryptography.hazmat.primitives.ciphers.aead import AESGCM -def resolve_prole_home(env: dict[str, str] | None = None) -> Path: - """Resolve `PROLE_HOME` from `env`/process environment. +def resolve_knoe_home(env: dict[str, str] | None = None) -> Path: + """Resolve `KNOE_HOME` from `env`/process environment. - Falls back to `$HOME/.prole` when `PROLE_HOME` is not set. + Falls back to `$HOME/.knoe` when `KNOE_HOME` is not set. NOTE: This is duplicated here (and in `knoe.core.env`) to avoid circular imports between the two modules. """ env_map = env or os.environ - raw = (env_map.get("PROLE_HOME") or "").strip() + raw = (env_map.get("KNOE_HOME") or "").strip() if raw: expanded = os.path.expanduser(os.path.expandvars(raw)) return Path(expanded) - return Path.home() / ".prole" + return Path.home() / ".knoe" -# Secret handling (temporary encrypted values in prole.cfg) -PROLE_SECRET_PREFIX = "${PROLE_SECRET:" -PROLE_SECRET_SUFFIX = "}" +# Secret handling (temporary encrypted values in knoe.cfg) +KNOE_SECRET_PREFIX = "${KNOE_SECRET:" +KNOE_SECRET_SUFFIX = "}" OPENBAO_PREFIX = "${OPENBAO:" OPENBAO_SUFFIX = "}" -PROLE_SECRET_VERSION = "v1" -PROLE_SECRET_SERVICE = "prole-installer" +KNOE_SECRET_VERSION = "v1" +KNOE_SECRET_SERVICE = "knoe-installer" # Map config keys to OpenBao paths (namespace injected at runtime) SECRET_KEY_SPECS = { @@ -61,11 +61,11 @@ SECRET_KEY_SPECS = { } -def _is_prole_secret(value: str | None) -> bool: +def _is_knoe_secret(value: str | None) -> bool: return ( bool(value) - and value.startswith(PROLE_SECRET_PREFIX) - and value.endswith(PROLE_SECRET_SUFFIX) + and value.startswith(KNOE_SECRET_PREFIX) + and value.endswith(KNOE_SECRET_SUFFIX) ) @@ -78,7 +78,7 @@ def _is_openbao_ref(value: str | None) -> bool: def _get_secret_key_file() -> Path: - return resolve_prole_home() / "secrets" / "knoe.key" + return resolve_knoe_home() / "secrets" / "knoe.key" def _get_keychain_key(service: str, account: str) -> bytes: @@ -134,16 +134,16 @@ def _get_file_key(path: Path) -> bytes: def _get_secret_key() -> bytes: system = platform.system() - account = getpass.getuser() or "prole" + account = getpass.getuser() or "knoe" if system == "Darwin": - return _get_keychain_key(PROLE_SECRET_SERVICE, account) + return _get_keychain_key(KNOE_SECRET_SERVICE, account) return _get_file_key(_get_secret_key_file()) -def _encrypt_prole_secret(plaintext: str) -> str: +def _encrypt_knoe_secret(plaintext: str) -> str: if plaintext is None: return "" - if _is_prole_secret(plaintext): + if _is_knoe_secret(plaintext): return plaintext key = _get_secret_key() aesgcm = AESGCM(key) @@ -151,15 +151,15 @@ def _encrypt_prole_secret(plaintext: str) -> str: ciphertext = aesgcm.encrypt(nonce, plaintext.encode("utf-8"), None) nonce_b64 = base64.urlsafe_b64encode(nonce).decode("utf-8") ct_b64 = base64.urlsafe_b64encode(ciphertext).decode("utf-8") - return f"{PROLE_SECRET_PREFIX}{PROLE_SECRET_VERSION}:{nonce_b64}:{ct_b64}{PROLE_SECRET_SUFFIX}" + return f"{KNOE_SECRET_PREFIX}{KNOE_SECRET_VERSION}:{nonce_b64}:{ct_b64}{KNOE_SECRET_SUFFIX}" -def _decrypt_prole_secret(value: str) -> str: - if not _is_prole_secret(value): +def _decrypt_knoe_secret(value: str) -> str: + if not _is_knoe_secret(value): return value - inner = value[len(PROLE_SECRET_PREFIX) : -len(PROLE_SECRET_SUFFIX)] + inner = value[len(KNOE_SECRET_PREFIX) : -len(KNOE_SECRET_SUFFIX)] parts = inner.split(":") - if len(parts) != 3 or parts[0] != PROLE_SECRET_VERSION: + if len(parts) != 3 or parts[0] != KNOE_SECRET_VERSION: return value try: nonce = base64.urlsafe_b64decode(parts[1].encode("utf-8")) @@ -175,10 +175,10 @@ def _decrypt_prole_secret(value: str) -> str: def _encrypt_cfg_secret(plaintext: str | None) -> str: if not plaintext: return "" - if _is_prole_secret(plaintext) or _is_openbao_ref(plaintext): + if _is_knoe_secret(plaintext) or _is_openbao_ref(plaintext): return plaintext try: - return _encrypt_prole_secret(plaintext) + return _encrypt_knoe_secret(plaintext) except Exception: return str(plaintext) @@ -201,9 +201,9 @@ def _resolve_openbao_ref(value: str) -> str: secret_path = rest token = os.environ.get("OPENBAO_ROOT_TOKEN", "") if not token: - prole_service = os.environ.get("PROLE_SERVICE") - if prole_service: - token_path = Path(prole_service) / "secrets" / "openbao-root-token" + knoe_service = os.environ.get("KNOE_SERVICE") + if knoe_service: + token_path = Path(knoe_service) / "secrets" / "openbao-root-token" if token_path.exists(): token = token_path.read_text().strip() if not token: @@ -234,8 +234,8 @@ def _resolve_openbao_ref(value: str) -> str: def _resolve_secret_value(value: str) -> str: - if _is_prole_secret(value): - return _decrypt_prole_secret(value) + if _is_knoe_secret(value): + return _decrypt_knoe_secret(value) if _is_openbao_ref(value): return _resolve_openbao_ref(value) return value @@ -263,8 +263,8 @@ def _load_properties(path: Path) -> dict: # Repository root: this file lives at /installer/config.py → parent is repo PROJECT_ROOT = Path(__file__).resolve().parents[1] -PROLE_APP_DIR = PROJECT_ROOT / "prole-app" -PROLE_PROPS_PATH = PROLE_APP_DIR / "prole.properties" +KNOE_APP_DIR = PROJECT_ROOT / "knoe-app" +KNOE_PROPS_PATH = KNOE_APP_DIR / "knoe.properties" import logging @@ -318,30 +318,30 @@ def setup_logging(verbose=False, debug=False): ) -_PROLE_PROPS_CACHE: Optional[dict] = None +_KNOE_PROPS_CACHE: Optional[dict] = None def get_properties() -> dict: - """Load and cache prole.properties from the repo (installer context). + """Load and cache knoe.properties from the repo (installer context). Order: - - Repo default at prole-app/prole.properties - - Optional env override: PROLE_PROPERTIES points to a file + - Repo default at knoe-app/knoe.properties + - Optional env override: KNOE_PROPERTIES points to a file """ - global _PROLE_PROPS_CACHE - if _PROLE_PROPS_CACHE is None: + global _KNOE_PROPS_CACHE + if _KNOE_PROPS_CACHE is None: props: dict[str, str] = {} # repo default - if PROLE_PROPS_PATH.exists(): - props.update(_load_properties(PROLE_PROPS_PATH)) + if KNOE_PROPS_PATH.exists(): + props.update(_load_properties(KNOE_PROPS_PATH)) # env override (absolute path) - env_path = os.environ.get("PROLE_PROPERTIES") + env_path = os.environ.get("KNOE_PROPERTIES") if env_path: p = Path(env_path) if p.exists(): props.update(_load_properties(p)) - _PROLE_PROPS_CACHE = props - return dict(_PROLE_PROPS_CACHE) + _KNOE_PROPS_CACHE = props + return dict(_KNOE_PROPS_CACHE) def get_config_value(key: str, default: Optional[str] = None) -> Optional[str]: @@ -352,39 +352,50 @@ def get_ui_icon_image_path() -> Path: """Return absolute path to the UI icon image for the installer. Priority (new → legacy): - - `icon` key in prole.properties (requested) + - `icon` key in knoe.properties (requested) + - `img/knoe.png` - legacy `ui.icon` - Defaults to img/proleIcon.png under repo root if not set or missing. + Defaults to img/knoe.png under repo root if not set or missing. """ - # Prefer new key `icon`, fall back to old `ui.icon` - rel = get_config_value("icon") or get_config_value("ui.icon") or "img/proleIcon.png" - p = (PROJECT_ROOT / rel).resolve() + from knoe.core.env import get_resource_path + # Prefer new key `icon`, then fallback to knoe.png, then old `ui.icon` + rel = get_config_value("icon") or "img/knoe.png" + p = get_resource_path(rel) if p.exists(): return p - # fallback - return (PROJECT_ROOT / "img/proleIcon.png").resolve() + + # Fallback to legacy ui.icon if set + legacy_rel = get_config_value("ui.icon") + if legacy_rel: + p = get_resource_path(legacy_rel) + if p.exists(): + return p + + # Final fallback + return get_resource_path("img/knoe.png") def get_ui_background_image_path() -> Path: """Return absolute path to the UI background image. Priority (new → legacy): - - `background` key in prole.properties (requested) + - `background` key in knoe.properties (requested) - legacy `ui.background` - Defaults to img/proleLogoSepia.png under repo root if not set or missing. + Defaults to img/knoeLogoSepia.png under repo root if not set or missing. """ + from knoe.core.env import get_resource_path rel = ( get_config_value("background") or get_config_value("ui.background") - or "img/proleLogoSepia.png" + or "img/knoeLogoSepia.png" ) - p = (PROJECT_ROOT / rel).resolve() + p = get_resource_path(rel) if p.exists(): return p # fallback - return (PROJECT_ROOT / "img/proleLogoSepia.png").resolve() + return get_resource_path("img/knoeLogoSepia.png") def is_apple_silicon() -> bool: @@ -398,7 +409,7 @@ def get_docker_build_platform_args(target_env: Optional[str] = None) -> list[str env_key = (target_env or "").strip().lower() if env_key == "dev" and is_apple_silicon(): return ["--platform", "linux/arm64"] - if env_key in ("service", "k3s", "prole-service-cluster"): + if env_key in ("service", "k3s", "knoe-service-cluster"): return ["--platform", "linux/arm64"] if is_apple_silicon(): return ["--platform", "linux/amd64"] @@ -438,7 +449,7 @@ def _expand_path(val: str | None) -> str: if not val: return "" # Expand ~ and shell-style variables like $HOME. Use a small fixed-point loop - # so nested refs (e.g. PROLE_HOME=$HOME/...) expand fully. + # so nested refs (e.g. KNOE_HOME=$HOME/...) expand fully. out = os.path.expanduser(str(val)) for _ in range(10): new = os.path.expandvars(out) @@ -452,9 +463,9 @@ def _normalize_persistence_mode(mode: str | None) -> str: raw = (mode or "").strip().lower() if raw in {"dev", "k3d", "local"}: return "dev" - if raw in {"service", "k3s", "k3s-hosts", "prole-service-cluster"}: + if raw in {"service", "k3s", "k3s-hosts", "knoe-service-cluster"}: return "k3s-hosts" - if raw in {"prod", "k8s", "prole-prod-cluster"}: + if raw in {"prod", "k8s", "knoe-prod-cluster"}: return "prod" return raw @@ -608,7 +619,7 @@ def _collect_cfg_vars_from_data( mode: str | None = None, explicit_keys: set[tuple[str, str]] | None = None, ) -> dict[str, str]: - """Collect variable names from a `prole_cfg_data`-style dict. + """Collect variable names from a `knoe_cfg_data`-style dict. This mirrors `_collect_cfg_vars()` but operates on the UI/controller's in-memory dict instead of a `configparser.ConfigParser`. @@ -653,7 +664,7 @@ def _expand_cfg_vars_shellstyle(val: str, variables: dict[str, str]) -> str: Notes: - Only expands simple shell-style identifiers (letters/digits/underscore). - This intentionally avoids treating `${PROLE_SECRET:...}` or similar + This intentionally avoids treating `${KNOE_SECRET:...}` or similar colon-delimited references as variables. - Unknown variables are left intact. """ @@ -840,7 +851,7 @@ def _try_read_ansible_vault_value(vault_path: Path, key: str) -> str: return "" -def _update_prole_cfg_value( +def _update_knoe_cfg_value( section: str, key: str, value: str, @@ -848,15 +859,15 @@ def _update_prole_cfg_value( mode: str | None = None, explicit: bool = False, ): - # Prefer `$PROLE_CONF/prole.cfg` (single entrypoint) and follow symlink so we + # Prefer `$KNOE_CONF/knoe.cfg` (single entrypoint) and follow symlink so we # update the active environment base file without mutating other environments. try: - from knoe import prole_conf + from knoe import knoe_conf - conf_dir = prole_conf.resolve_prole_conf_dir(PROJECT_ROOT) - cfg_path = prole_conf.entrypoint_path(conf_dir) + conf_dir = knoe_conf.resolve_knoe_conf_dir(PROJECT_ROOT) + cfg_path = knoe_conf.entrypoint_path(conf_dir) except Exception: - cfg_path = PROJECT_ROOT / "conf" / "prole.cfg" + cfg_path = PROJECT_ROOT / "conf" / "knoe.cfg" if not cfg_path.exists(): return @@ -918,27 +929,27 @@ def _write_k3s_kubeconfig(server_url: str, token: str) -> Path: "- cluster:\n" f" server: {server_url}\n" " insecure-skip-tls-verify: true\n" - " name: prole-k3s\n" + " name: knoe-k3s\n" "contexts:\n" "- context:\n" - " cluster: prole-k3s\n" - " user: prole-k3s\n" - " name: prole-k3s\n" - "current-context: prole-k3s\n" + " cluster: knoe-k3s\n" + " user: knoe-k3s\n" + " name: knoe-k3s\n" + "current-context: knoe-k3s\n" "users:\n" - "- name: prole-k3s\n" + "- name: knoe-k3s\n" " user:\n" f" token: {token}\n" ) - prole_service = os.environ.get("PROLE_SERVICE", "").strip() - if prole_service: - path = Path(prole_service).expanduser() / "secrets" / "k3s.kubeconfig" + knoe_service = os.environ.get("KNOE_SERVICE", "").strip() + if knoe_service: + path = Path(knoe_service).expanduser() / "secrets" / "k3s.kubeconfig" else: - prole_home = os.environ.get("PROLE_HOME", "").strip() - if prole_home: - path = Path(prole_home).expanduser() / "prole-k3s.kubeconfig" + knoe_home = os.environ.get("KNOE_HOME", "").strip() + if knoe_home: + path = Path(knoe_home).expanduser() / "knoe-k3s.kubeconfig" else: - path = PROJECT_ROOT / "prole-k3s.kubeconfig" + path = PROJECT_ROOT / "knoe-k3s.kubeconfig" # Never overwrite a kubeconfig that uses client-certificate auth (e.g. # one fetched by Ansible) with a token-based fallback. if path.exists(): @@ -1186,7 +1197,7 @@ _MACOS_DEPENDENCIES = [ { "id": "docker", "name": "Docker", - "description": "Container platform for running Prole services", + "description": "Container platform for running Knoe services", "url": "https://www.docker.com/products/docker-desktop", "install_cmd": None, "check_cmd": "docker --version", @@ -1292,7 +1303,7 @@ def _linux_dependencies(manager: str) -> list[dict]: { "id": "docker", "name": "Docker", - "description": "Container platform for running Prole services", + "description": "Container platform for running Knoe services", "url": "https://www.docker.com", "install_cmd": install("docker.io" if manager == "apt" else "docker"), "check_cmd": "docker --version", diff --git a/knoe/core/actions.py b/knoe/core/actions.py index 97cb039..287f082 100644 --- a/knoe/core/actions.py +++ b/knoe/core/actions.py @@ -13,16 +13,16 @@ import uuid import logging import secrets import string -from knoe import prole_conf as prole_conf_mgr +from knoe import knoe_conf as knoe_conf_mgr from knoe.config import ( _expand_path, _collect_cfg_vars, _expand_cfg_value, _parse_bool, _is_openbao_ref, - _is_prole_secret, - _decrypt_prole_secret, - _encrypt_prole_secret, + _is_knoe_secret, + _decrypt_knoe_secret, + _encrypt_knoe_secret, _write_k3s_kubeconfig, _encrypt_cfg_secret, _merge_kubeconfig, @@ -59,8 +59,8 @@ from knoe.core.env import ( _default_opentofu_pipeline_url, _format_ollama_host, _host_from_url, - _render_prole_cfg, - _k3d_prole_data_volume_args, + _render_knoe_cfg, + _k3d_knoe_data_volume_args, _sync_opentofu_pipeline, _read_k3s_cfg, _safe_str, @@ -191,7 +191,7 @@ class KnoeInstaller: # ------------------------------------------------------------------ init def _init_shared_state(self): """Initialise state common to every installer flavour.""" - self.prole_cfg_data = { + self.knoe_cfg_data = { "Global": {}, "Welcome": {}, "Dependencies": {}, @@ -227,7 +227,7 @@ class KnoeInstaller: Central rule: `optional_workloads_allowed = ready_schedulable_nodes >= min_required` - `min_required` is loaded from `prole.cfg` Global key + `min_required` is loaded from `knoe.cfg` Global key `OPTIONAL_WORKLOADS_MIN_READY_SCHEDULABLE_NODES`. """ @@ -235,7 +235,7 @@ class KnoeInstaller: return self._optional_workloads_policy_cache raw = ( - (self.prole_cfg_data.get("Global", {}) or {}).get(POLICY_CFG_KEY, "") + (self.knoe_cfg_data.get("Global", {}) or {}).get(POLICY_CFG_KEY, "") ) try: min_nodes = int(str(raw).strip() or str(OPTIONAL_WORKLOADS_MIN_READY_SCHEDULABLE_NODES)) @@ -280,14 +280,14 @@ class KnoeInstaller: ns = (self._get_input("env_setup.NAMESPACE", "") or "").strip() if not ns: ns = ( - (self.prole_cfg_data.get("Global", {}) or {}).get( + (self.knoe_cfg_data.get("Global", {}) or {}).get( "DATABASE_NAMESPACE", "" ) or "" ).strip() if not ns: ns = ( - (self.prole_cfg_data.get("Global", {}) or {}).get("NAMESPACE", "") + (self.knoe_cfg_data.get("Global", {}) or {}).get("NAMESPACE", "") or "" ).strip() if ns.startswith("${") and ns.endswith("}"): @@ -303,7 +303,7 @@ class KnoeInstaller: def _service_namespace(self) -> str: ns = ( - (self.prole_cfg_data.get("Global", {}) or {}) + (self.knoe_cfg_data.get("Global", {}) or {}) .get("SERVICE_NAMESPACE", "") .strip() ) @@ -328,7 +328,7 @@ class KnoeInstaller: def _read_k3s_cfg_values( self, cfg_path: "Path | None" = None ) -> tuple[str, str, str]: - """Return (cluster_env, server_url, token) from prole.cfg. + """Return (cluster_env, server_url, token) from knoe.cfg. Delegates to the module-level ``_read_k3s_cfg`` so that every presentation layer (Tk, ncurses, silent) uses the same logic. @@ -418,8 +418,8 @@ class KnoeInstaller: - `cnpg-admin-key` with `admin.key` and `admin.pub` This uses the provided DB password (user-entered) and a locally generated - ssh keypair (`~/.ssh/id_prole_ed25519`) to bootstrap the admin key files - in `PROLE_SERVICE/secrets/`. + ssh keypair (`~/.ssh/id_knoe_ed25519`) to bootstrap the admin key files + in `KNOE_SERVICE/secrets/`. Notes: - `knoe-db-user` and `knoe-db-superuser` are always applied/updated. @@ -519,17 +519,17 @@ class KnoeInstaller: _ensure_namespace() # Ensure expected admin key files exist on disk for CNPG tooling. - service_dir = Path((env.get("PROLE_SERVICE") or "").strip()) + service_dir = Path((env.get("KNOE_SERVICE") or "").strip()) secrets_dir = service_dir / "secrets" if service_dir else None if secrets_dir: secrets_dir.mkdir(parents=True, exist_ok=True) - ssh_priv = Path.home() / ".ssh" / "id_prole_ed25519" - ssh_pub = Path.home() / ".ssh" / "id_prole_ed25519.pub" + ssh_priv = Path.home() / ".ssh" / "id_knoe_ed25519" + ssh_pub = Path.home() / ".ssh" / "id_knoe_ed25519.pub" if not (ssh_priv.exists() and ssh_pub.exists()): # Best-effort: generate if missing. try: - self._generate_ssh_key(self._get_input("init_password.db_username", "prole").strip() or "prole") + self._generate_ssh_key(self._get_input("init_password.db_username", "knoe").strip() or "knoe") except Exception: pass @@ -555,7 +555,7 @@ class KnoeInstaller: pass # DB credentials secrets expected by CNPG init script. - _apply_literal_secret("knoe-db-user", {"username": "prole", "password": pw}) + _apply_literal_secret("knoe-db-user", {"username": "knoe", "password": pw}) _apply_literal_secret( "knoe-db-superuser", {"username": "postgres", "password": pw} ) @@ -563,7 +563,7 @@ class KnoeInstaller: # Admin key secret only if missing (avoid rotation). if not _secret_exists("cnpg-admin-key"): if not secrets_dir: - raise Exception("PROLE_SERVICE is not set; cannot locate secrets directory for CNPG admin key.") + raise Exception("KNOE_SERVICE is not set; cannot locate secrets directory for CNPG admin key.") admin_priv = secrets_dir / "admin.key" admin_pub = secrets_dir / "admin.pub" if not (admin_priv.exists() and admin_pub.exists()): @@ -624,11 +624,11 @@ class KnoeInstaller: env = os.environ.copy() root = getattr(self, "project_root", None) or PROJECT_ROOT - env["PROLE_HOME"] = str(root) - env["PROLE_SERVICE"] = str(root) + env["KNOE_HOME"] = str(root) + env["KNOE_SERVICE"] = str(root) env["DB_PASSWORD"] = db_pw env["OPENTOFU_ADMIN_PASSWORD"] = db_pw - env["PROLE_MODE"] = "k3s" + env["KNOE_MODE"] = "k3s" # Resolve KUBECONFIG through the same path the Tk UI and silent # installer use: prefer existing cert-based file, fall back to @@ -648,7 +648,7 @@ class KnoeInstaller: service_ns = ( env.get("SERVICE_NAMESPACE") - or (self.prole_cfg_data.get("Global", {}) or {}).get("SERVICE_NAMESPACE", "") + or (self.knoe_cfg_data.get("Global", {}) or {}).get("SERVICE_NAMESPACE", "") or "knoe-system" ) service_ns = str(service_ns).strip() or "knoe-system" @@ -697,17 +697,17 @@ class KnoeInstaller: return _openbao_placeholder(self._secret_namespace(), leaf, bao_key) if not plaintext: return "" - if _is_openbao_ref(plaintext) or _is_prole_secret(plaintext): + if _is_openbao_ref(plaintext) or _is_knoe_secret(plaintext): return plaintext - existing = (self.prole_cfg_data.get(section, {}) or {}).get(key) - if existing and _is_prole_secret(existing): + existing = (self.knoe_cfg_data.get(section, {}) or {}).get(key) + if existing and _is_knoe_secret(existing): try: - if _decrypt_prole_secret(existing) == plaintext: + if _decrypt_knoe_secret(existing) == plaintext: return existing except Exception: pass try: - return _encrypt_prole_secret(plaintext) + return _encrypt_knoe_secret(plaintext) except Exception: return plaintext @@ -727,9 +727,9 @@ class KnoeInstaller: secret_path = rest token = os.environ.get("OPENBAO_ROOT_TOKEN", "") if not token: - prole_service = os.environ.get("PROLE_SERVICE") - if prole_service: - token_path = Path(prole_service) / "secrets" / "openbao-root-token" + knoe_service = os.environ.get("KNOE_SERVICE") + if knoe_service: + token_path = Path(knoe_service) / "secrets" / "openbao-root-token" if token_path.exists(): token = token_path.read_text().strip() if not token: @@ -808,8 +808,8 @@ class KnoeInstaller: Path(self.project_root) / "secrets" / ref, ] service_dir = str( - self._get_input("env_setup.PROLE_SERVICE", "") - or os.environ.get("PROLE_SERVICE", "") + self._get_input("env_setup.KNOE_SERVICE", "") + or os.environ.get("KNOE_SERVICE", "") or "" ).strip() if service_dir: @@ -827,8 +827,8 @@ class KnoeInstaller: return value def _resolve_secret_value(self, value: str) -> str: - if _is_prole_secret(value): - return _decrypt_prole_secret(value) + if _is_knoe_secret(value): + return _decrypt_knoe_secret(value) if _is_openbao_ref(value): return self._resolve_openbao_ref(value) if str(value or "").strip().startswith("secretref://"): @@ -839,7 +839,7 @@ class KnoeInstaller: def _sanitize_sections_for_cfg(self, sections: dict) -> dict: sanitized = {k: dict(v) for k, v in sections.items()} - # Persist fully expanded values in prole.cfg (no $VAR / ${VAR} expansions). + # Persist fully expanded values in knoe.cfg (no $VAR / ${VAR} expansions). # Downstream tools treat these values as plain strings. env_map = dict(os.environ) try: @@ -849,11 +849,11 @@ class KnoeInstaller: except Exception: pass for k in ( - "PROLE_HOME", - "PROLE_CONF", + "KNOE_HOME", + "KNOE_CONF", "PROLE_DATA", "PROLE_LOGS", - "PROLE_SERVICE", + "KNOE_SERVICE", "NAMESPACE", "SERVICE_NAMESPACE", ): @@ -868,7 +868,7 @@ class KnoeInstaller: for k, v in list(section.items()): if not isinstance(v, str) or not v.strip(): continue - if _is_prole_secret(v) or _is_openbao_ref(v): + if _is_knoe_secret(v) or _is_openbao_ref(v): continue try: section[k] = self._cfgify_home_path( @@ -937,9 +937,9 @@ class KnoeInstaller: return cleaned def _read_existing_cfg_namespace(self) -> str | None: - """Best-effort read of database namespace from the existing prole.cfg. + """Best-effort read of database namespace from the existing knoe.cfg. - Silent retries should reuse the namespace stored in prole.cfg unless the + Silent retries should reuse the namespace stored in knoe.cfg unless the user explicitly overrides via env vars. """ @@ -949,7 +949,7 @@ class KnoeInstaller: try: p = Path(str(cfg_path)).expanduser() if p.is_dir(): - p = p / "prole.cfg" + p = p / "knoe.cfg" if not p.exists(): return None @@ -997,7 +997,7 @@ class KnoeInstaller: except Exception: pass - # Prefer the namespace already stored in prole.cfg to make retries stable. + # Prefer the namespace already stored in knoe.cfg to make retries stable. ns = self._read_existing_cfg_namespace() if ns: return self._ensure_namespace_prefix(ns) @@ -1006,7 +1006,7 @@ class KnoeInstaller: def _initial_db_namespace(self) -> str: """Initial namespace suggestion for CNPG/Postgres. - When a [CNPG Clusters] registry exists in prole.cfg, the identity + When a [CNPG Clusters] registry exists in knoe.cfg, the identity cluster's declared namespace is used unconditionally — no version suffix is appended. Version-aware namespace generation only applies as a last-resort fallback when no cluster registry is configured. @@ -1046,13 +1046,13 @@ class KnoeInstaller: return self._sanitize_namespace(self._ensure_namespace_prefix(base)) def _cnpg_cluster_registry(self) -> list[dict]: - """Parse [CNPG Clusters] section from the active prole.cfg. + """Parse [CNPG Clusters] section from the active knoe.cfg. Returns a list of cluster dicts with keys: name, namespace, identity, instances, image. Validates that namespaces are unique and exactly one cluster is designated as the identity cluster. """ - section = (getattr(self, "prole_cfg_data", None) or {}).get("CNPG Clusters", {}) + section = (getattr(self, "knoe_cfg_data", None) or {}).get("CNPG Clusters", {}) if not section: return [] clusters: dict[str, dict] = {} @@ -1106,10 +1106,10 @@ class KnoeInstaller: """Rewrite foreign home prefixes to the current user's home. Example: running on Linux with HOME=/home/, rewrite - `/Users//dev/prole` -> `/home//dev/prole`. + `/Users//dev/knoe` -> `/home//dev/knoe`. - This helps prevent stale macOS paths (often stored in `~/.prole/env.sh`) from - being persisted into `prole.cfg` on Linux. + This helps prevent stale macOS paths (often stored in `~/.knoe/env.sh`) from + being persisted into `knoe.cfg` on Linux. """ raw = (value or "").strip() @@ -1194,18 +1194,18 @@ class KnoeInstaller: return f"$HOME/{rel_str}" def _env_defaults(self, namespace: str | None = None) -> dict: - # Default install layout: ~/.prole - # NOTE: UI may present this as $HOME/.prole, but internally we keep + # Default install layout: ~/.knoe + # NOTE: UI may present this as $HOME/.knoe, but internally we keep # resolved literal paths for filesystem operations. - default_home = resolve_prole_home(env={}) - resolved_home = self._resolve_env_value("PROLE_HOME", str(default_home)) or str( + default_home = resolve_knoe_home(env={}) + resolved_home = self._resolve_env_value("KNOE_HOME", str(default_home)) or str( default_home ) env_map = dict(os.environ) - env_map["PROLE_HOME"] = resolved_home + env_map["KNOE_HOME"] = resolved_home expanded_home = self._expand_shell_path(resolved_home, env=env_map) or str(default_home) home = Path(expanded_home) - env_map["PROLE_HOME"] = str(home) + env_map["KNOE_HOME"] = str(home) if namespace is None: namespace = ( self._get_input("init_password.db_namespace", "") or "" @@ -1215,9 +1215,9 @@ class KnoeInstaller: if not namespace: namespace = os.environ.get("NAMESPACE", "") return { - "PROLE_HOME": str(home), - "PROLE_CONF": self._expand_shell_path( - self._resolve_env_value("PROLE_CONF", str(home / "conf")) or str(home / "conf"), + "KNOE_HOME": str(home), + "KNOE_CONF": self._expand_shell_path( + self._resolve_env_value("KNOE_CONF", str(home / "conf")) or str(home / "conf"), env=env_map, ), "PROLE_DATA": self._expand_shell_path( @@ -1228,8 +1228,8 @@ class KnoeInstaller: self._resolve_env_value("PROLE_LOGS", str(home / "logs")) or str(home / "logs"), env=env_map, ), - "PROLE_SERVICE": self._expand_shell_path( - self._resolve_env_value("PROLE_SERVICE", str(home / "etc")) or str(home / "etc"), + "KNOE_SERVICE": self._expand_shell_path( + self._resolve_env_value("KNOE_SERVICE", str(home / "etc")) or str(home / "etc"), env=env_map, ), "DATABASE_NAMESPACE": namespace or "", @@ -1267,18 +1267,18 @@ class KnoeInstaller: return Path(self._expand_shell_path(val, env=env_map)) except Exception: pass - return Path.home() / "dev" / "prole" / default_suffix + return Path.home() / "dev" / "knoe" / default_suffix def _read_existing_env(self) -> dict: env = {} - prole_home = os.environ.get("PROLE_HOME") + knoe_home = os.environ.get("KNOE_HOME") candidates = [] - if prole_home: + if knoe_home: try: - candidates.append(Path(self._expand_shell_path(prole_home, env=os.environ)) / "env.sh") + candidates.append(Path(self._expand_shell_path(knoe_home, env=os.environ)) / "env.sh") except Exception: - candidates.append(Path(prole_home) / "env.sh") - candidates.append(resolve_prole_home(env={}) / "env.sh") + candidates.append(Path(knoe_home) / "env.sh") + candidates.append(resolve_knoe_home(env={}) / "env.sh") for p in candidates: try: if p.exists(): @@ -1293,11 +1293,11 @@ class KnoeInstaller: k = k.strip() v = v.strip().strip('"') if k in { - "PROLE_HOME", - "PROLE_CONF", + "KNOE_HOME", + "KNOE_CONF", "PROLE_DATA", "PROLE_LOGS", - "PROLE_SERVICE", + "KNOE_SERVICE", }: v = self._rewrite_foreign_home_prefix(v) env[k] = v @@ -1316,16 +1316,16 @@ class KnoeInstaller: except Exception: pass - expanded_home = self._expand_shell_path(values.get("PROLE_HOME", ""), env=env_map) + expanded_home = self._expand_shell_path(values.get("KNOE_HOME", ""), env=env_map) expanded_home = os.path.expanduser(expanded_home) if expanded_home else "" if expanded_home: - env_map["PROLE_HOME"] = expanded_home + env_map["KNOE_HOME"] = expanded_home home = Path(expanded_home) else: - home = resolve_prole_home(env={}) + home = resolve_knoe_home(env={}) if env_key == "dev": home.mkdir(parents=True, exist_ok=True) - for key in ("PROLE_CONF", "PROLE_DATA", "PROLE_LOGS", "PROLE_SERVICE"): + for key in ("KNOE_CONF", "PROLE_DATA", "PROLE_LOGS", "KNOE_SERVICE"): try: raw = values.get(key, "") expanded = self._expand_shell_path(raw, env=env_map) @@ -1338,33 +1338,33 @@ class KnoeInstaller: content = [] content.append("#!/usr/bin/env bash") - content.append("# Prole environment configuration") + content.append("# Knoe environment configuration") content.append( "# This file is generated by the installer. Source it in new shells, or execute as a wrapper:" ) - content.append('# "$PROLE_HOME/env.sh" [args…]') + content.append('# "$KNOE_HOME/env.sh" [args…]') content.append("# shellcheck shell=bash") for k in ( - "PROLE_HOME", - "PROLE_CONF", + "KNOE_HOME", + "KNOE_CONF", "PROLE_DATA", "PROLE_LOGS", - "PROLE_SERVICE", + "KNOE_SERVICE", ): content.append(f'export {k}="{self._shellify_home_path(values[k])}"') - # NAMESPACE/PROLE_NAMESPACE must never be written to env.sh — only prole.cfg is the source of truth + # NAMESPACE/PROLE_NAMESPACE must never be written to env.sh — only knoe.cfg is the source of truth content.append("") content.append("# Ensure PATH works for GUI-launched shells (Docker, etc.)") content.append( - '_prole_add_path() { case ":${PATH}:" in *":$1:"*) ;; *) PATH="$1:${PATH:-}" ;; esac; }' + '_knoe_add_path() { case ":${PATH}:" in *":$1:"*) ;; *) PATH="$1:${PATH:-}" ;; esac; }' ) - content.append('_prole_add_path "$PROLE_HOME/bin"') - content.append('_prole_add_path "/opt/homebrew/bin"') - content.append('_prole_add_path "/usr/local/bin"') - content.append('_prole_add_path "/usr/bin"') - content.append('_prole_add_path "/bin"') - content.append('_prole_add_path "/usr/sbin"') - content.append('_prole_add_path "/sbin"') + content.append('_knoe_add_path "$KNOE_HOME/bin"') + content.append('_knoe_add_path "/opt/homebrew/bin"') + content.append('_knoe_add_path "/usr/local/bin"') + content.append('_knoe_add_path "/usr/bin"') + content.append('_knoe_add_path "/bin"') + content.append('_knoe_add_path "/usr/sbin"') + content.append('_knoe_add_path "/sbin"') content.append("export PATH") content.append("") content.append("# Add custom paths below if needed (examples):") @@ -1379,7 +1379,7 @@ class KnoeInstaller: new_content = "\n".join(content) + "\n" out = home / "env.sh" if env_key != "dev": - out = resolve_prole_home(env={}) / "env.sh" + out = resolve_knoe_home(env={}) / "env.sh" out.parent.mkdir(parents=True, exist_ok=True) should_write = True @@ -1401,7 +1401,7 @@ class KnoeInstaller: self._deploy_env_resources(values) def _deploy_env_resources(self, values: dict): - """Copy init scripts and etc directory into PROLE_HOME / PROLE_SERVICE.""" + """Copy init scripts and etc directory into KNOE_HOME / KNOE_SERVICE.""" try: env_map = dict(os.environ) try: @@ -1409,23 +1409,23 @@ class KnoeInstaller: except Exception: pass - expanded_home = self._expand_shell_path(values.get("PROLE_HOME", ""), env=env_map) + expanded_home = self._expand_shell_path(values.get("KNOE_HOME", ""), env=env_map) expanded_home = os.path.expanduser(expanded_home) if expanded_home else "" if expanded_home: - env_map["PROLE_HOME"] = expanded_home - expanded_service = self._expand_shell_path(values.get("PROLE_SERVICE", ""), env=env_map) + env_map["KNOE_HOME"] = expanded_home + expanded_service = self._expand_shell_path(values.get("KNOE_SERVICE", ""), env=env_map) expanded_service = os.path.expanduser(expanded_service) if expanded_service else "" - prole_home = Path(expanded_home) if expanded_home else resolve_prole_home(env={}) - prole_service = Path(expanded_service or (prole_home / "etc")) + knoe_home = Path(expanded_home) if expanded_home else resolve_knoe_home(env={}) + knoe_service = Path(expanded_service or (knoe_home / "etc")) init_pf_src_candidates = [ - self.project_root / "src" / "prole" / "etc" / "init-port-forward.sh", + self.project_root / "src" / "knoe" / "etc" / "init-port-forward.sh", self.project_root / "etc" / "init-port-forward.sh", ] init_pf_src = next((p for p in init_pf_src_candidates if p.exists()), None) if init_pf_src is not None: - init_pf_dst = prole_home / "init-port-forward.sh" + init_pf_dst = knoe_home / "init-port-forward.sh" try: data = init_pf_src.read_bytes() init_pf_dst.write_bytes(data) @@ -1434,17 +1434,17 @@ class KnoeInstaller: pass etc_src_candidates = [ - self.project_root / "src" / "prole" / "etc", + self.project_root / "src" / "knoe" / "etc", self.project_root / "etc", ] etc_src = next((p for p in etc_src_candidates if p.exists()), None) if etc_src is not None: try: - prole_service.mkdir(parents=True, exist_ok=True) - if etc_src.resolve() != prole_service.resolve(): - if prole_service.exists(): - shutil.rmtree(prole_service, ignore_errors=True) - shutil.copytree(etc_src, prole_service) + knoe_service.mkdir(parents=True, exist_ok=True) + if etc_src.resolve() != knoe_service.resolve(): + if knoe_service.exists(): + shutil.rmtree(knoe_service, ignore_errors=True) + shutil.copytree(etc_src, knoe_service) except Exception: pass except Exception: @@ -1452,14 +1452,14 @@ class KnoeInstaller: def reload_env_from_shell(self) -> None: raw_home = self._get_input( - "env_setup.PROLE_HOME", str(resolve_prole_home(env={})) + "env_setup.KNOE_HOME", str(resolve_knoe_home(env={})) ) expanded_home = self._expand_shell_path(raw_home, env=os.environ) expanded_home = os.path.expanduser(expanded_home) if expanded_home else "" - home = Path(expanded_home) if expanded_home else resolve_prole_home(env={}) + home = Path(expanded_home) if expanded_home else resolve_knoe_home(env={}) env_file = home / "env.sh" cmd = ( - f"export PROLE_HOME={shlex.quote(str(home))}; " + f"export KNOE_HOME={shlex.quote(str(home))}; " f"source {shlex.quote(str(env_file))}; " "env -0" ) @@ -1482,7 +1482,7 @@ class KnoeInstaller: pass def _update_env_namespace(self, namespace: str): - # Namespace is persisted to prole.cfg only — never to env.sh or os.environ. + # Namespace is persisted to knoe.cfg only — never to env.sh or os.environ. # This method is intentionally a no-op for environment mutation. pass @@ -1494,14 +1494,14 @@ class KnoeInstaller: if mode == "k3s" else "PORT_FORWARD_K3D_MAPPING_" ) - pf_section = self.prole_cfg_data.get("Port Forwards", {}) + pf_section = self.knoe_cfg_data.get("Port Forwards", {}) if pf_section is None: pf_section = {} if not _pf_upsert_mapping(pf_section, prefix, mapping_str): return - self.prole_cfg_data["Port Forwards"] = pf_section - if hasattr(self, "_save_prole_cfg"): - self._save_prole_cfg() + self.knoe_cfg_data["Port Forwards"] = pf_section + if hasattr(self, "_save_knoe_cfg"): + self._save_knoe_cfg() elif hasattr(self, "_write_cfg"): self._write_cfg() @@ -1509,13 +1509,13 @@ class KnoeInstaller: if "GRAFANA_ADMIN_PASSWORD=" in line: pwd = line.split("GRAFANA_ADMIN_PASSWORD=")[1].strip() if pwd: - mon = self.prole_cfg_data.get("Monitoring", {}) + mon = self.knoe_cfg_data.get("Monitoring", {}) if mon is None: mon = {} mon["GRAFANA_ADMIN_PASSWORD"] = pwd - self.prole_cfg_data["Monitoring"] = mon - if hasattr(self, "_save_prole_cfg"): - self._save_prole_cfg() + self.knoe_cfg_data["Monitoring"] = mon + if hasattr(self, "_save_knoe_cfg"): + self._save_knoe_cfg() elif hasattr(self, "_write_cfg"): self._write_cfg() if "PORT_FORWARD_MAPPING:" in line: @@ -1534,7 +1534,7 @@ class KnoeInstaller: if mode == "k3s" else "PORT_FORWARD_K3D_MAPPING_" ) - pf_section = self.prole_cfg_data.get("Port Forwards", {}) + pf_section = self.knoe_cfg_data.get("Port Forwards", {}) if pf_section is None: pf_section = {} for k, v in list(pf_section.items()): @@ -1546,13 +1546,13 @@ class KnoeInstaller: db_ns = (self._get_input("init_password.db_namespace", "") or "").strip() if not db_ns: db_ns = ( - (self.prole_cfg_data.get("Global", {}) or {}) + (self.knoe_cfg_data.get("Global", {}) or {}) .get("DATABASE_NAMESPACE", "") .strip() ) if not db_ns: db_ns = ( - (self.prole_cfg_data.get("Global", {}) or {}).get("NAMESPACE", "").strip() + (self.knoe_cfg_data.get("Global", {}) or {}).get("NAMESPACE", "").strip() ) if not db_ns: db_ns = ( @@ -1564,7 +1564,7 @@ class KnoeInstaller: if not db_ns: db_ns = "default" argocd_ns = ( - (self.prole_cfg_data.get("Global", {}) or {}) + (self.knoe_cfg_data.get("Global", {}) or {}) .get("ARGOCD_NAMESPACE", "") .strip() ) @@ -1575,7 +1575,7 @@ class KnoeInstaller: db_host_port = (self._get_input("init_password.db_host_port", "") or "").strip() if not db_host_port: db_host_port = ( - (self.prole_cfg_data.get("Global", {}) or {}) + (self.knoe_cfg_data.get("Global", {}) or {}) .get("DB_HOST_PORT", "") .strip() ) @@ -1585,7 +1585,7 @@ class KnoeInstaller: supabase_ns = (os.environ.get("SUPABASE_NAMESPACE") or "").strip() if not supabase_ns: supabase_ns = ( - (self.prole_cfg_data.get("Supabase", {}) or {}) + (self.knoe_cfg_data.get("Supabase", {}) or {}) .get("NAMESPACE", "") .strip() ) @@ -1595,7 +1595,7 @@ class KnoeInstaller: gitops_ns = (os.environ.get("GITEA_NAMESPACE") or "").strip() if not gitops_ns: gitops_ns = ( - (self.prole_cfg_data.get("GitOps", {}) or {}) + (self.knoe_cfg_data.get("GitOps", {}) or {}) .get("GITOPS_NAMESPACE", "") .strip() ) @@ -1616,7 +1616,7 @@ class KnoeInstaller: ) for mapping in mappings: _pf_upsert_mapping(pf_section, prefix, mapping) - self.prole_cfg_data["Port Forwards"] = pf_section + self.knoe_cfg_data["Port Forwards"] = pf_section # --------------------------------------------- script env def _script_env_for_namespace(self, namespace: str, cluster_role: str = "db") -> dict: @@ -1627,8 +1627,8 @@ class KnoeInstaller: cluster_name = ( self._app_cluster_name() if cluster_role == "app" else self._cnpg_cluster_name() ) - env["PROLE_HOME"] = str(root) - env["PROLE_SERVICE"] = str(root) + env["KNOE_HOME"] = str(root) + env["KNOE_SERVICE"] = str(root) env["DATABASE_NAMESPACE"] = namespace env["CLUSTER_NAME"] = cluster_name env["APP_CLUSTER_NAME"] = self._app_cluster_name() @@ -1639,8 +1639,8 @@ class KnoeInstaller: env["NAMESPACE"] = namespace service_ns = self._service_namespace() - env["PROLE_CONF"] = self._get_input( - "env_setup.PROLE_CONF", str(root / "conf") + env["KNOE_CONF"] = self._get_input( + "env_setup.KNOE_CONF", str(root / "conf") ) env["PROLE_DATA"] = self._get_input( "env_setup.PROLE_DATA", str(root / "knoe-db" / "data") @@ -1648,8 +1648,8 @@ class KnoeInstaller: env["PROLE_LOGS"] = self._get_input( "env_setup.PROLE_LOGS", str(root / "logs") ) - env["PROLE_SERVICE"] = self._get_input( - "env_setup.PROLE_SERVICE", str(root / "etc") + env["KNOE_SERVICE"] = self._get_input( + "env_setup.KNOE_SERVICE", str(root / "etc") ) env["KNOE_DB_USER"] = self._get_input("init_password.db_username", "").strip() @@ -1662,26 +1662,26 @@ class KnoeInstaller: mode = self._deployment_mode() if mode: - env["PROLE_MODE"] = mode + env["KNOE_MODE"] = mode env["DEPLOYMENT_MODE"] = mode cluster_env = self._get_input("init_cluster.cluster_env", "dev") env["DEPLOYMENT_TARGET"] = _deployment_target_label(cluster_env) if mode == "k3s": # 1. Prefer an existing kubeconfig that already exists on disk. - # Check prole-specific paths before ~/.kube/config to avoid + # Check knoe-specific paths before ~/.kube/config to avoid # picking up a stale k3d context from the default kubeconfig. root = getattr(self, "project_root", None) or PROJECT_ROOT - _prole_kc_candidates = [ - str(Path(root) / "prole-k3s.kubeconfig"), + _knoe_kc_candidates = [ + str(Path(root) / "knoe-k3s.kubeconfig"), str(Path(root) / "etc" / "secrets" / "k3s.kubeconfig"), str(Path(root) / "secrets" / "k3s.kubeconfig"), ] - prole_service_dir = (env.get("PROLE_SERVICE") or "").strip() - if prole_service_dir: - _prole_kc_candidates.insert(1, str(Path(prole_service_dir) / "secrets" / "k3s.kubeconfig")) + knoe_service_dir = (env.get("KNOE_SERVICE") or "").strip() + if knoe_service_dir: + _knoe_kc_candidates.insert(1, str(Path(knoe_service_dir) / "secrets" / "k3s.kubeconfig")) kc = next( - (p for p in _prole_kc_candidates if p and Path(p).expanduser().exists()), + (p for p in _knoe_kc_candidates if p and Path(p).expanduser().exists()), "", ) or _find_kubeconfig_file(env) if kc: @@ -1703,7 +1703,7 @@ class KnoeInstaller: pass elif server and token: self.err( - "[WARN] k3s token does not look like a Kubernetes bearer token; cannot generate kubeconfig. Ensure a cert-based prole-k3s.kubeconfig exists (Ansible fetch)." + "[WARN] k3s token does not look like a Kubernetes bearer token; cannot generate kubeconfig. Ensure a cert-based knoe-k3s.kubeconfig exists (Ansible fetch)." ) raw_server, raw_token = self._resolve_k3s_connection() @@ -1762,7 +1762,7 @@ class KnoeInstaller: env["SUPABASE_STUDIO_ENABLED"] = _bool_str( self._get_input_bool("init_cluster.supabase_studio_enabled", False) ) - default_supabase_studio_url = "db.0.knoe.dev" if mode == "k8s" else "db.prole.org" + default_supabase_studio_url = "db.0.knoe.dev" if mode == "k8s" else "db.knoe.org" env["SUPABASE_STUDIO_URL"] = ( self._get_input("init_cluster.supabase_studio_url", default_supabase_studio_url).strip() or default_supabase_studio_url @@ -1786,13 +1786,13 @@ class KnoeInstaller: env["OPENTOFU_ADMIN_PASSWORD"] = db_pw grafana_pw = ( - self.prole_cfg_data.get("Monitoring", {}) + self.knoe_cfg_data.get("Monitoring", {}) .get("GRAFANA_ADMIN_PASSWORD", "") .strip() ) resolved_grafana = self._resolve_secret_value(grafana_pw) if grafana_pw else "" if resolved_grafana and not ( - _is_openbao_ref(resolved_grafana) or _is_prole_secret(resolved_grafana) + _is_openbao_ref(resolved_grafana) or _is_knoe_secret(resolved_grafana) ): env["GRAFANA_ADMIN_PASSWORD"] = resolved_grafana elif db_pw: @@ -1817,10 +1817,10 @@ class KnoeInstaller: env["KRB5_PASSWORD"] = "" # Registry settings - reg_host = self.prole_cfg_data.get("Docker Build", {}).get("LOCAL_REGISTRY") + reg_host = self.knoe_cfg_data.get("Docker Build", {}).get("LOCAL_REGISTRY") if reg_host: env["LOCAL_REGISTRY"] = reg_host - reg_internal = self.prole_cfg_data.get("Docker Build", {}).get( + reg_internal = self.knoe_cfg_data.get("Docker Build", {}).get( "LOCAL_REGISTRY_INTERNAL" ) if reg_internal: @@ -1830,13 +1830,13 @@ class KnoeInstaller: artifact_registry = str(env.get("ARTIFACT_REGISTRY") or "").strip().strip('"') if not artifact_registry: artifact_registry = ( - (self.prole_cfg_data.get("Global", {}) or {}) + (self.knoe_cfg_data.get("Global", {}) or {}) .get("ARTIFACT_REGISTRY", "") .strip() .strip('"') ) if not artifact_registry: - gcp_cfg = self.prole_cfg_data.get("GCP", {}) or {} + gcp_cfg = self.knoe_cfg_data.get("GCP", {}) or {} project_id = ( (self._get_input("init_cluster.project_id", "") or "").strip() or str(gcp_cfg.get("project_id") or "").strip().strip('"') @@ -1902,7 +1902,7 @@ class KnoeInstaller: ) def _cnpg_cluster_name(self) -> str: - glob = self.prole_cfg_data.get("Global", {}) or {} + glob = self.knoe_cfg_data.get("Global", {}) or {} cluster_name = ( os.environ.get("CLUSTER_NAME") or os.environ.get("CNPG_CLUSTER_NAME") @@ -1914,7 +1914,7 @@ class KnoeInstaller: return cluster_name or "knoe-db" def _app_cluster_name(self) -> str: - glob = self.prole_cfg_data.get("Global", {}) or {} + glob = self.knoe_cfg_data.get("Global", {}) or {} name = ( self._get_input("init_password.app_cluster_name", "") or self._get_input("env_setup.APP_CLUSTER_NAME", "") @@ -1924,7 +1924,7 @@ class KnoeInstaller: return str(name).strip() or DEFAULT_APP_CLUSTER_NAME def _app_cluster_mode(self) -> str: - glob = self.prole_cfg_data.get("Global", {}) or {} + glob = self.knoe_cfg_data.get("Global", {}) or {} mode = ( self._get_input("init_cluster.app_cluster_mode", "") or self._get_input("env_setup.APP_CLUSTER_MODE", "") @@ -1934,7 +1934,7 @@ class KnoeInstaller: return str(mode).strip() or DEFAULT_APP_CLUSTER_MODE def _db_cluster_mode(self) -> str: - glob = self.prole_cfg_data.get("Global", {}) or {} + glob = self.knoe_cfg_data.get("Global", {}) or {} mode = ( self._get_input("init_cluster.db_cluster_mode", "") or self._get_input("env_setup.DB_CLUSTER_MODE", "") @@ -1956,7 +1956,7 @@ class KnoeInstaller: else "env_setup.DB_CLUSTER_KUBECONTEXT" ) context = _safe_str(self._get_input(key, "") or self._get_input(fallback_key, "")) - glob = self.prole_cfg_data.get("Global", {}) or {} + glob = self.knoe_cfg_data.get("Global", {}) or {} global_key = "APP_CLUSTER_KUBECONTEXT" if role == "app" else "DB_CLUSTER_KUBECONTEXT" if not context: context = _safe_str(glob.get(global_key, "")) @@ -2049,7 +2049,7 @@ class KnoeInstaller: return selected_context def _cnpg_desired_instances(self) -> int: - glob = self.prole_cfg_data.get("Global", {}) or {} + glob = self.knoe_cfg_data.get("Global", {}) or {} raw = (os.environ.get("CNPG_INSTANCES") or str(glob.get("CNPG_INSTANCES") or "")).strip() try: val = int(raw) if raw else 3 @@ -2058,7 +2058,7 @@ class KnoeInstaller: return max(1, val) def _cnpg_rebalance_requested(self) -> bool: - glob = self.prole_cfg_data.get("Global", {}) or {} + glob = self.knoe_cfg_data.get("Global", {}) or {} raw = ( os.environ.get("CNPG_REBALANCE") or str(glob.get("CNPG_REBALANCE") or "") @@ -2066,7 +2066,7 @@ class KnoeInstaller: return _parse_bool(raw, default=False) def _cnpg_candidate_nodes(self) -> list[str]: - glob = self.prole_cfg_data.get("Global", {}) or {} + glob = self.knoe_cfg_data.get("Global", {}) or {} nodes: set[str] = set() explicit = ( @@ -2080,7 +2080,7 @@ class KnoeInstaller: nodes.add(node) mounts_raw = str( - (self.prole_cfg_data.get("Storage", {}) or {}).get("ANSIBLE_ISCSI_MOUNTS", "") + (self.knoe_cfg_data.get("Storage", {}) or {}).get("ANSIBLE_ISCSI_MOUNTS", "") ).strip() if mounts_raw: try: @@ -2103,7 +2103,7 @@ class KnoeInstaller: def _cnpg_plan_path(self, namespace: str, cluster_name: str) -> Path: conf_root = self._get_input( - "env_setup.PROLE_CONF", + "env_setup.KNOE_CONF", str((getattr(self, "project_root", None) or PROJECT_ROOT) / "conf"), ) conf_dir = Path(conf_root) @@ -2137,7 +2137,7 @@ class KnoeInstaller: if not isinstance(prior_plan, dict) or prior_plan != placement_plan: save_cnpg_placement_plan(plan_path, placement_plan) - glob = self.prole_cfg_data.setdefault("Global", {}) + glob = self.knoe_cfg_data.setdefault("Global", {}) glob["CNPG_PLACEMENT_PLAN_FILE"] = str(plan_path) glob["CNPG_PLACEMENT_PLAN_ID"] = str(placement_plan.get("plan_id") or "") glob["CNPG_PLACEMENT_PLAN_HASH"] = str(placement_plan.get("plan_hash") or "") @@ -2226,7 +2226,7 @@ class KnoeInstaller: if not enabled: return False candidates = [] - env_home = (os.environ.get("PROLE_HOME") or "").strip() + env_home = (os.environ.get("KNOE_HOME") or "").strip() if env_home: candidates.append(Path(env_home)) candidates.append(self.project_root) @@ -2234,7 +2234,7 @@ class KnoeInstaller: try: if (base / "authority").is_dir(): return False - if (base / "prole" / "authority").is_dir(): + if (base / "knoe" / "authority").is_dir(): return False except Exception: continue @@ -2473,14 +2473,14 @@ class KnoeInstaller: for kind in ("svc", "deploy"): try: res = subprocess.run( - ["kubectl", "-n", svc_ns, "get", kind, "prole-svc-kong"], + ["kubectl", "-n", svc_ns, "get", kind, "knoe-svc-kong"], env=env, capture_output=True, text=True, timeout=10, ) if res.returncode != 0: - missing.append(f"{kind}/prole-svc-kong") + missing.append(f"{kind}/knoe-svc-kong") except FileNotFoundError: # If kubectl isn't available, don't guess missing resources. pass @@ -2800,7 +2800,7 @@ class KnoeInstaller: This mirrors the intent of `etc/repair_pipeline.sh` while delegating actual component deployments to existing `etc/init_*.sh` scripts. """ - mode = (env.get("PROLE_MODE") or env.get("DEPLOYMENT_MODE") or "").strip() + mode = (env.get("KNOE_MODE") or env.get("DEPLOYMENT_MODE") or "").strip() service_ns = (env.get("SERVICE_NAMESPACE") or "").strip() or self._service_namespace() db_ns = ( (env.get("DB_NAMESPACE") or "").strip() @@ -2900,8 +2900,8 @@ class KnoeInstaller: legacy_opentofu = _exists("deploy", "opentofu", legacy_ns) legacy_garage = _exists("statefulset", "garage", legacy_ns) legacy_registry = _exists("deploy", "registry", legacy_ns) - legacy_kong = _exists("deploy", "prole-svc-kong", legacy_ns) or _exists( - "svc", "prole-svc-kong", legacy_ns + legacy_kong = _exists("deploy", "knoe-svc-kong", legacy_ns) or _exists( + "svc", "knoe-svc-kong", legacy_ns ) missing_openbao = not ( @@ -2951,12 +2951,12 @@ class KnoeInstaller: if legacy_kong: missing_kong = not ( - _exists("deploy", "prole-svc-kong", service_ns) - or _exists("svc", "prole-svc-kong", service_ns) + _exists("deploy", "knoe-svc-kong", service_ns) + or _exists("svc", "knoe-svc-kong", service_ns) ) if missing_kong: self.log( - f"[INFO] Legacy Kong (prole-svc-kong) in {legacy_ns}; redeploying to {service_ns}" + f"[INFO] Legacy Kong (knoe-svc-kong) in {legacy_ns}; redeploying to {service_ns}" ) self._run_script( "init_kong.sh", @@ -2972,14 +2972,14 @@ class KnoeInstaller: "delete", "pod", "-l", - "app=prole-svc-kong", + "app=knoe-svc-kong", "--ignore-not-found=true", ], timeout=60, ) - _delete_kind("deploy", "prole-svc-kong", legacy_ns) - _delete_kind("svc", "prole-svc-kong", legacy_ns) - _delete_kind("configmap", "prole-svc-kong-config", legacy_ns) + _delete_kind("deploy", "knoe-svc-kong", legacy_ns) + _delete_kind("svc", "knoe-svc-kong", legacy_ns) + _delete_kind("configmap", "knoe-svc-kong-config", legacy_ns) except Exception as e: self.err(f"[WARN] Legacy namespace dedupe failed: {e}") @@ -3165,12 +3165,12 @@ class KnoeInstaller: "registry": registry_ops.status( namespace=self._registry_namespace(), env=env, - mode=env.get("PROLE_MODE") or self._deployment_mode(), + mode=env.get("KNOE_MODE") or self._deployment_mode(), ), "openbao": openbao_ops.status( namespace=service_ns, env=env, - mode=env.get("PROLE_MODE") or self._deployment_mode(), + mode=env.get("KNOE_MODE") or self._deployment_mode(), ), "opentofu": opentofu_ops.status(namespace=service_ns, env=env), "garage": garage_store_ops.status(namespace=service_ns, env=env), @@ -3221,7 +3221,7 @@ class KnoeInstaller: ) -> list[str]: images: set[str] = set() - for rel_dir in ("k8s/prole", "k8s/openbao"): + for rel_dir in ("k8s/knoe", "k8s/openbao"): base_dir = self.project_root / rel_dir if not base_dir.exists(): continue @@ -3433,7 +3433,7 @@ class _TeeWriter: class KnoeConsoleInstaller(KnoeInstaller): - """Console-based unattended installer driven by prole.cfg inputs.""" + """Console-based unattended installer driven by knoe.cfg inputs.""" silent = True @@ -3486,42 +3486,42 @@ class KnoeConsoleInstaller(KnoeInstaller): if raw: p = Path(_expand_path(raw)) if p.is_dir(): - return p / "prole.cfg" + return p / "knoe.cfg" return p - conf_dir = prole_conf_mgr.resolve_prole_conf_dir(self.project_root) - return prole_conf_mgr.entrypoint_path(conf_dir) + conf_dir = knoe_conf_mgr.resolve_knoe_conf_dir(self.project_root) + return knoe_conf_mgr.entrypoint_path(conf_dir) def _load_inputs_from_cfg(self) -> dict: # Ensure env-dir layout exists and legacy entrypoint config is migrated before loading. try: - if self.cfg_path.name == "prole.cfg": - if self.cfg_path.parent.name in prole_conf_mgr.ENVIRONMENTS: - prole_conf_mgr.ensure_entrypoint(self.cfg_path.parent.parent) + if self.cfg_path.name == "knoe.cfg": + if self.cfg_path.parent.name in knoe_conf_mgr.ENVIRONMENTS: + knoe_conf_mgr.ensure_entrypoint(self.cfg_path.parent.parent) else: - prole_conf_mgr.ensure_entrypoint(self.cfg_path.parent) + knoe_conf_mgr.ensure_entrypoint(self.cfg_path.parent) except Exception: pass if not self.cfg_path.exists(): - raise FileNotFoundError(f"prole.cfg not found at {self.cfg_path}") - cfg = prole_conf_mgr.load_layered_config(self.cfg_path) + raise FileNotFoundError(f"knoe.cfg not found at {self.cfg_path}") + cfg = knoe_conf_mgr.load_layered_config(self.cfg_path) cfg_vars = _collect_cfg_vars(cfg) - # Load all sections into prole_cfg_data to maintain idempotency + # Load all sections into knoe_cfg_data to maintain idempotency for section in cfg.sections(): - if section not in self.prole_cfg_data: - self.prole_cfg_data[section] = {} + if section not in self.knoe_cfg_data: + self.knoe_cfg_data[section] = {} for k, v in cfg.items(section): - self.prole_cfg_data[section][k] = _expand_cfg_value(v, cfg_vars) + self.knoe_cfg_data[section][k] = _expand_cfg_value(v, cfg_vars) if cfg.has_section("Global"): service_ns = _expand_cfg_value( cfg.get("Global", "SERVICE_NAMESPACE", fallback=""), cfg_vars ).strip() if service_ns: - self.prole_cfg_data["Global"]["SERVICE_NAMESPACE"] = service_ns + self.knoe_cfg_data["Global"]["SERVICE_NAMESPACE"] = service_ns if cfg.has_section("Port Forwards"): - self.prole_cfg_data["Port Forwards"] = { + self.knoe_cfg_data["Port Forwards"] = { k: _expand_cfg_value(v, cfg_vars) for k, v in cfg.items("Port Forwards") } for (section, key), _spec in SECRET_KEY_SPECS.items(): @@ -3667,7 +3667,7 @@ class KnoeConsoleInstaller(KnoeInstaller): if ( not raw_db_pw or _is_openbao_ref(raw_db_pw) - or _is_prole_secret(raw_db_pw) + or _is_knoe_secret(raw_db_pw) ): inputs["init_password.db_password"] = env_db_pw inputs["init_password.db_password_confirm"] = env_db_pw @@ -3747,11 +3747,11 @@ class KnoeConsoleInstaller(KnoeInstaller): if cfg.has_section("System Environment"): sec = cfg["System Environment"] for k in ( - "PROLE_HOME", - "PROLE_CONF", + "KNOE_HOME", + "KNOE_CONF", "PROLE_DATA", "PROLE_LOGS", - "PROLE_SERVICE", + "KNOE_SERVICE", ): if k in sec: raw = (sec.get(k, "") or "").strip() @@ -3760,10 +3760,10 @@ class KnoeConsoleInstaller(KnoeInstaller): legacy[f"env_setup.{k}"] = raw if cfg.has_section("Global"): sec = cfg["Global"] - if "PROLE_HOME" in sec: - raw = (sec.get("PROLE_HOME", "") or "").strip() + if "KNOE_HOME" in sec: + raw = (sec.get("KNOE_HOME", "") or "").strip() if raw: - legacy["env_setup.PROLE_HOME"] = raw + legacy["env_setup.KNOE_HOME"] = raw if "CLUSTER_ENV" in sec: legacy["init_cluster.cluster_env"] = _expand_cfg_value( sec.get("CLUSTER_ENV", ""), cfg_vars @@ -3883,7 +3883,7 @@ class KnoeConsoleInstaller(KnoeInstaller): self.docker_import_dir = _expand_cfg_value( sec.get("DOCKER_IMPORT_DIR", ""), cfg_vars ) - self.prole_cfg_data["Global"][ + self.knoe_cfg_data["Global"][ "DOCKER_IMPORT_DIR" ] = self.docker_import_dir if "OLLAMA_SERVER_HOST" in sec: @@ -4063,11 +4063,11 @@ class KnoeConsoleInstaller(KnoeInstaller): # Environment setup for k in ( - "PROLE_HOME", - "PROLE_CONF", + "KNOE_HOME", + "KNOE_CONF", "PROLE_DATA", "PROLE_LOGS", - "PROLE_SERVICE", + "KNOE_SERVICE", ): inputs[f"env_setup.{k}"] = env_vals.get(k, "") inputs["env_setup.DATABASE_NAMESPACE"] = namespace @@ -4313,11 +4313,11 @@ class KnoeConsoleInstaller(KnoeInstaller): cluster_registry = f"registry.{registry_ns}.svc.cluster.local:5000" self.local_registry_url = host_registry self.local_registry_internal = cluster_registry - self.prole_cfg_data.setdefault("Docker Build", {})["LOCAL_REGISTRY"] = host_registry - self.prole_cfg_data["Docker Build"]["LOCAL_REGISTRY_INTERNAL"] = cluster_registry + self.knoe_cfg_data.setdefault("Docker Build", {})["LOCAL_REGISTRY"] = host_registry + self.knoe_cfg_data["Docker Build"]["LOCAL_REGISTRY_INTERNAL"] = cluster_registry return host_registry, cluster_registry - reg_name = "prole-registry" + reg_name = "knoe-registry" registry_container = f"k3d-{reg_name}" host_registry = "localhost:5000" cluster_registry = f"{registry_container}.localhost:5000" @@ -4339,8 +4339,8 @@ class KnoeConsoleInstaller(KnoeInstaller): self.local_registry_url = host_registry self.local_registry_internal = cluster_registry - self.prole_cfg_data["Docker Build"]["LOCAL_REGISTRY"] = host_registry - self.prole_cfg_data["Docker Build"][ + self.knoe_cfg_data["Docker Build"]["LOCAL_REGISTRY"] = host_registry + self.knoe_cfg_data["Docker Build"][ "LOCAL_REGISTRY_INTERNAL" ] = cluster_registry return host_registry, cluster_registry @@ -4396,15 +4396,15 @@ class KnoeConsoleInstaller(KnoeInstaller): self.local_registry_url = host_registry self.local_registry_internal = cluster_registry - self.prole_cfg_data["Docker Build"]["LOCAL_REGISTRY"] = host_registry - self.prole_cfg_data["Docker Build"][ + self.knoe_cfg_data["Docker Build"]["LOCAL_REGISTRY"] = host_registry + self.knoe_cfg_data["Docker Build"][ "LOCAL_REGISTRY_INTERNAL" ] = cluster_registry return host_registry, cluster_registry def _argocd_namespace(self) -> str: ns = ( - (self.prole_cfg_data.get("Global", {}) or {}) + (self.knoe_cfg_data.get("Global", {}) or {}) .get("ARGOCD_NAMESPACE", "") .strip() ) @@ -4414,7 +4414,7 @@ class KnoeConsoleInstaller(KnoeInstaller): def _registry_namespace(self) -> str: ns = ( - (self.prole_cfg_data.get("Global", {}) or {}) + (self.knoe_cfg_data.get("Global", {}) or {}) .get("REGISTRY_NAMESPACE", "") .strip() ) @@ -4430,7 +4430,7 @@ class KnoeConsoleInstaller(KnoeInstaller): def _ensure_registry_defaults(self, mode: str) -> None: mode = _deployment_mode_from_env(mode) or mode - db = self.prole_cfg_data.get("Docker Build", {}) or {} + db = self.knoe_cfg_data.get("Docker Build", {}) or {} if mode == "k3d" and _local_registry_enabled(mode): info = self._ensure_local_registry_available() @@ -4457,11 +4457,11 @@ class KnoeConsoleInstaller(KnoeInstaller): f"registry.{registry_ns}.svc.cluster.local:5000" ) - self.prole_cfg_data["Docker Build"] = db + self.knoe_cfg_data["Docker Build"] = db def _fetch_k3s_kubeconfig(self) -> Path | None: """Fetch a fresh kubeconfig from k3s via the Ansible playbook.""" - kubeconfig = self.project_root / "prole-k3s.kubeconfig" + kubeconfig = self.project_root / "knoe-k3s.kubeconfig" playbook = ( self.project_root / "infrastructure" @@ -4524,7 +4524,7 @@ class KnoeConsoleInstaller(KnoeInstaller): if not mode: mode = _deployment_mode_from_env(self._get_input("init_cluster.mode", "")) if mode: - os.environ["PROLE_MODE"] = mode + os.environ["KNOE_MODE"] = mode def _apply_ansible_defaults(self, loaded_keys: set[str] | None = None): info = _detect_ansible_topology(self.project_root) @@ -4534,7 +4534,7 @@ class KnoeConsoleInstaller(KnoeInstaller): auto_keys = getattr(self, "_auto_input_keys", set()) ansible_kdc = info.get("kdc_ip") or "" try: - net = self.prole_cfg_data.get("Network", {}) + net = self.knoe_cfg_data.get("Network", {}) if info.get("topology_json"): net["ANSIBLE_TOPOLOGY"] = info["topology_json"] if info.get("inventory_path"): @@ -4551,7 +4551,7 @@ class KnoeConsoleInstaller(KnoeInstaller): net["AD_DC_IP"] = info["ad_dc_ip"] if info.get("kdc_ip"): net["KDC_ANSIBLE_DETECTED"] = info["kdc_ip"] - self.prole_cfg_data["Network"] = net + self.knoe_cfg_data["Network"] = net except Exception: pass @@ -4568,7 +4568,7 @@ class KnoeConsoleInstaller(KnoeInstaller): mounts = _detect_ansible_storage_mounts(inv_path) labels_by_host = _detect_ansible_node_labels(inv_path) - storage_sec = self.prole_cfg_data.setdefault("Storage", {}) + storage_sec = self.knoe_cfg_data.setdefault("Storage", {}) if mounts: storage_sec["ANSIBLE_ISCSI_MOUNTS"] = json.dumps( mounts, separators=(",", ":"), sort_keys=True @@ -4578,7 +4578,7 @@ class KnoeConsoleInstaller(KnoeInstaller): labels_by_host, separators=(",", ":"), sort_keys=True ) - glob = self.prole_cfg_data.setdefault("Global", {}) + glob = self.knoe_cfg_data.setdefault("Global", {}) cnpg_eligible_nodes = sorted( { @@ -4622,7 +4622,7 @@ class KnoeConsoleInstaller(KnoeInstaller): if mon_base: glob["MONITORING_DATA_DIR"] = mon_base if mon_host: - self.prole_cfg_data.setdefault("Monitoring", {})[ + self.knoe_cfg_data.setdefault("Monitoring", {})[ "MONITORING_PRIMARY_NODE" ] = mon_host except Exception: @@ -4692,7 +4692,7 @@ class KnoeConsoleInstaller(KnoeInstaller): self._get_input("init_cluster.cluster_env", "") ) globals_to_save = { - "PROLE_HOME": self._get_input("env_setup.PROLE_HOME", ""), + "KNOE_HOME": self._get_input("env_setup.KNOE_HOME", ""), "KNOE_DB_USER": self._get_input("init_password.db_username", ""), "DB_PASSWORD": self._secret_cfg_value( "Global", "DB_PASSWORD", db_pw, "db", "password" @@ -4727,7 +4727,7 @@ class KnoeConsoleInstaller(KnoeInstaller): "SERVICE_NAMESPACE": self._service_namespace(), } # Merge pre-existing Global values without overriding explicit inputs - existing_global = dict(self.prole_cfg_data.get("Global", {})) + existing_global = dict(self.knoe_cfg_data.get("Global", {})) for k, v in existing_global.items(): if k not in globals_to_save or not str(globals_to_save.get(k, "")).strip(): globals_to_save[k] = v @@ -4758,14 +4758,14 @@ class KnoeConsoleInstaller(KnoeInstaller): # Monitoring # NOTE: Storage base paths for monitoring are currently pinned in the - # monitoring deploy script/Helm values (not persisted in prole.cfg). - mon_sec = self.prole_cfg_data.get("Monitoring", {}) + # monitoring deploy script/Helm values (not persisted in knoe.cfg). + mon_sec = self.knoe_cfg_data.get("Monitoring", {}) if mon_sec is None: mon_sec = {} - self.prole_cfg_data["Monitoring"] = mon_sec + self.knoe_cfg_data["Monitoring"] = mon_sec # Optional features (sourced from inputs) - opt_sec = self.prole_cfg_data.setdefault("Optional Features", {}) + opt_sec = self.knoe_cfg_data.setdefault("Optional Features", {}) opt_sec["SUPABASE_ENABLED"] = _bool_str( self._get_input_bool("init_cluster.supabase_enabled", False) ) @@ -4784,7 +4784,7 @@ class KnoeConsoleInstaller(KnoeInstaller): or self.inputs.get("gitops.namespace", "") ) if gitops_ns_val: - self.prole_cfg_data.setdefault("GitOps", {})[ + self.knoe_cfg_data.setdefault("GitOps", {})[ "GITOPS_NAMESPACE" ] = gitops_ns_val @@ -4793,7 +4793,7 @@ class KnoeConsoleInstaller(KnoeInstaller): self._get_input("ollama_config.server_port", DEFAULT_OLLAMA_PORT) or "" ).strip() ollama_model = (self._get_input("ollama_config.model", "") or "").strip() - ollama_section = dict(self.prole_cfg_data.get("Ollama", {})) + ollama_section = dict(self.knoe_cfg_data.get("Ollama", {})) if ollama_host: if not ollama_port: ollama_port = DEFAULT_OLLAMA_PORT @@ -4810,12 +4810,12 @@ class KnoeConsoleInstaller(KnoeInstaller): else: ollama_section.pop("OLLAMA_MODEL", None) if ollama_section: - self.prole_cfg_data["Ollama"] = ollama_section + self.knoe_cfg_data["Ollama"] = ollama_section self._sync_port_forward_mappings() sections = { - k: self.prole_cfg_data.get(k, {}) + k: self.knoe_cfg_data.get(k, {}) for k in [ "Welcome", "Dependencies", @@ -4844,17 +4844,17 @@ class KnoeConsoleInstaller(KnoeInstaller): sections["Deployment"] = deployment_section sections["Dev Cluster (k3d)"] = { - **self.prole_cfg_data.get("Dev Cluster (k3d)", {}), + **self.knoe_cfg_data.get("Dev Cluster (k3d)", {}), "MODE": "k3d", "CLUSTER_ENV": "k3d-knoe-dev-cluster", "DISPLAY_NAME": "knoe-dev-cluster", "KUBECTL_CONTEXT": self._get_input("init_cluster.cluster_env", ""), } sections["Service Cluster (k3s)"] = { - **self.prole_cfg_data.get("Service Cluster (k3s)", {}), + **self.knoe_cfg_data.get("Service Cluster (k3s)", {}), "MODE": "k3s", - "CLUSTER_ENV": "prole-service-cluster", - "DISPLAY_NAME": "prole-service-cluster", + "CLUSTER_ENV": "knoe-service-cluster", + "DISPLAY_NAME": "knoe-service-cluster", "K3S_SERVER_URL": ( self._get_input("init_cluster.k3s_server_url", "") or "" ).strip(), @@ -4868,10 +4868,10 @@ class KnoeConsoleInstaller(KnoeInstaller): "PIPELINE_URL": _default_opentofu_pipeline_url(), } sections["Prod Cluster (k8s)"] = { - **self.prole_cfg_data.get("Prod Cluster (k8s)", {}), + **self.knoe_cfg_data.get("Prod Cluster (k8s)", {}), "MODE": "k8s", - "CLUSTER_ENV": "prole-prod-cluster", - "DISPLAY_NAME": "prole-prod-cluster", + "CLUSTER_ENV": "knoe-prod-cluster", + "DISPLAY_NAME": "knoe-prod-cluster", "ARTIFACTS_DIR": ( self._get_input("init_cluster.prod_artifacts_path", "") or "" ).strip(), @@ -4891,7 +4891,7 @@ class KnoeConsoleInstaller(KnoeInstaller): ].strip() break - cfg_text = _render_prole_cfg( + cfg_text = _render_knoe_cfg( inputs, globals_to_save, sections, generated_at=existing_timestamp ) @@ -4905,7 +4905,7 @@ class KnoeConsoleInstaller(KnoeInstaller): # But usually we want to know when it LAST changed. # If it's different, let's generate a new one. if existing_text and existing_text != cfg_text: - cfg_text = _render_prole_cfg(inputs, globals_to_save, sections) + cfg_text = _render_knoe_cfg(inputs, globals_to_save, sections) self.cfg_path.parent.mkdir(parents=True, exist_ok=True) self.cfg_path.write_text(cfg_text) @@ -4924,9 +4924,9 @@ class KnoeConsoleInstaller(KnoeInstaller): if not missing: if not self._ensure_gcloud_auth_for_k8s(): - self.prole_cfg_data["Dependencies"]["STATUS"] = "Missing" + self.knoe_cfg_data["Dependencies"]["STATUS"] = "Missing" return False - self.prole_cfg_data["Dependencies"]["STATUS"] = "All installed" + self.knoe_cfg_data["Dependencies"]["STATUS"] = "All installed" return True auto_install = self._get_input_bool( @@ -4935,7 +4935,7 @@ class KnoeConsoleInstaller(KnoeInstaller): ) if not auto_install: self.err("[ERROR] Dependencies missing and auto-install disabled.") - self.prole_cfg_data["Dependencies"]["STATUS"] = "Missing" + self.knoe_cfg_data["Dependencies"]["STATUS"] = "Missing" return False for dep in missing: @@ -4961,12 +4961,12 @@ class KnoeConsoleInstaller(KnoeInstaller): still_missing.append(dep["name"]) if still_missing: self.err(f"[ERROR] Still missing: {', '.join(still_missing)}") - self.prole_cfg_data["Dependencies"]["STATUS"] = "Missing" + self.knoe_cfg_data["Dependencies"]["STATUS"] = "Missing" return False if not self._ensure_gcloud_auth_for_k8s(): - self.prole_cfg_data["Dependencies"]["STATUS"] = "Missing" + self.knoe_cfg_data["Dependencies"]["STATUS"] = "Missing" return False - self.prole_cfg_data["Dependencies"]["STATUS"] = "All installed" + self.knoe_cfg_data["Dependencies"]["STATUS"] = "All installed" return True def _ensure_gcloud_auth_for_k8s(self) -> bool: @@ -5024,7 +5024,7 @@ class KnoeConsoleInstaller(KnoeInstaller): self.log("[SKIP] Network scan disabled.") return - existing_kdc = self.prole_cfg_data.get("Network", {}).get("KDC_AUTO_DETECTED") + existing_kdc = self.knoe_cfg_data.get("Network", {}).get("KDC_AUTO_DETECTED") if existing_kdc: self.log( f"[OK] Network scan already performed. KDC detected: {existing_kdc}" @@ -5034,7 +5034,7 @@ class KnoeConsoleInstaller(KnoeInstaller): self.log("==> Network scan (network-agent)") ansible_kdc = "" try: - ansible_kdc = (self.prole_cfg_data.get("Network", {}) or {}).get( + ansible_kdc = (self.knoe_cfg_data.get("Network", {}) or {}).get( "KDC_ANSIBLE_DETECTED", "" ) except Exception: @@ -5044,8 +5044,8 @@ class KnoeConsoleInstaller(KnoeInstaller): self.err(f"[ERROR] Scan binary not found at {scan_binary}") return - prole_home = resolve_prole_home(env={}) - scan_dir = prole_home / "scan" + knoe_home = resolve_knoe_home(env={}) + scan_dir = knoe_home / "scan" scan_dir.mkdir(parents=True, exist_ok=True) kdc_found = None @@ -5090,8 +5090,8 @@ class KnoeConsoleInstaller(KnoeInstaller): if kdc_found and not ansible_kdc: self.inputs["kerberos_config.kdc"] = kdc_found self.inputs["kerberos_config.enabled"] = _bool_str(True) - self.prole_cfg_data["Network"]["KDC_AUTO_DETECTED"] = kdc_found - self.prole_cfg_data["Network"]["KERBEROS_AUTO_ENABLED"] = "True" + self.knoe_cfg_data["Network"]["KDC_AUTO_DETECTED"] = kdc_found + self.knoe_cfg_data["Network"]["KERBEROS_AUTO_ENABLED"] = "True" elif kdc_found and ansible_kdc: self.log( f"[INFO] Ansible KDC detected ({ansible_kdc}); ignoring scan-detected KDC {kdc_found}." @@ -5099,8 +5099,8 @@ class KnoeConsoleInstaller(KnoeInstaller): def _step_env_setup(self) -> None: self.log("==> Environment setup") - global_sec = self.prole_cfg_data.get("Global", {}) or {} - sys_sec = self.prole_cfg_data.get("System Environment", {}) or {} + global_sec = self.knoe_cfg_data.get("Global", {}) or {} + sys_sec = self.knoe_cfg_data.get("System Environment", {}) or {} def _cfg_val(sec: dict, key: str) -> str: try: @@ -5127,16 +5127,16 @@ class KnoeConsoleInstaller(KnoeInstaller): or "knoe-db" ) vals = { - "PROLE_HOME": ( - self._get_input("env_setup.PROLE_HOME", "") - or _cfg_val(sys_sec, "PROLE_HOME") - or _cfg_val(global_sec, "PROLE_HOME") - or str(resolve_prole_home(env={})) + "KNOE_HOME": ( + self._get_input("env_setup.KNOE_HOME", "") + or _cfg_val(sys_sec, "KNOE_HOME") + or _cfg_val(global_sec, "KNOE_HOME") + or str(resolve_knoe_home(env={})) ), - "PROLE_CONF": ( - self._get_input("env_setup.PROLE_CONF", "") - or _cfg_val(sys_sec, "PROLE_CONF") - or _cfg_val(global_sec, "PROLE_CONF") + "KNOE_CONF": ( + self._get_input("env_setup.KNOE_CONF", "") + or _cfg_val(sys_sec, "KNOE_CONF") + or _cfg_val(global_sec, "KNOE_CONF") ), "PROLE_DATA": ( self._get_input("env_setup.PROLE_DATA", "") @@ -5148,10 +5148,10 @@ class KnoeConsoleInstaller(KnoeInstaller): or _cfg_val(sys_sec, "PROLE_LOGS") or _cfg_val(global_sec, "PROLE_LOGS") ), - "PROLE_SERVICE": ( - self._get_input("env_setup.PROLE_SERVICE", "") - or _cfg_val(sys_sec, "PROLE_SERVICE") - or _cfg_val(global_sec, "PROLE_SERVICE") + "KNOE_SERVICE": ( + self._get_input("env_setup.KNOE_SERVICE", "") + or _cfg_val(sys_sec, "KNOE_SERVICE") + or _cfg_val(global_sec, "KNOE_SERVICE") ), "OPENTOFU_URL": (os.environ.get("OPENTOFU_URL") or "").strip(), } @@ -5170,15 +5170,15 @@ class KnoeConsoleInstaller(KnoeInstaller): self._get_input("env_setup.CLUSTER_NAME", "") or cluster_hint ) - if not vals.get("PROLE_HOME"): - raise Exception("PROLE_HOME is required for env setup.") + if not vals.get("KNOE_HOME"): + raise Exception("KNOE_HOME is required for env setup.") # Persist normalized inputs for k in ( - "PROLE_HOME", - "PROLE_CONF", + "KNOE_HOME", + "KNOE_CONF", "PROLE_DATA", "PROLE_LOGS", - "PROLE_SERVICE", + "KNOE_SERVICE", ): self.inputs[f"env_setup.{k}"] = vals[k] self.inputs["env_setup.DATABASE_NAMESPACE"] = vals.get( @@ -5195,14 +5195,14 @@ class KnoeConsoleInstaller(KnoeInstaller): self.reload_env_from_shell() for k in ( - "PROLE_HOME", - "PROLE_CONF", + "KNOE_HOME", + "KNOE_CONF", "PROLE_DATA", "PROLE_LOGS", - "PROLE_SERVICE", + "KNOE_SERVICE", "OPENTOFU_URL", ): - self.prole_cfg_data["System Environment"][k] = vals[k] + self.knoe_cfg_data["System Environment"][k] = vals[k] def _step_init_password(self) -> None: self.log("==> Database creation") @@ -5213,14 +5213,14 @@ class KnoeConsoleInstaller(KnoeInstaller): ns = self._get_input("env_setup.NAMESPACE", "") if not ns: ns = ( - (self.prole_cfg_data.get("Global", {}) or {}).get( + (self.knoe_cfg_data.get("Global", {}) or {}).get( "DATABASE_NAMESPACE", "" ) or "" ).strip() if not ns: ns = ( - (self.prole_cfg_data.get("Global", {}) or {}).get("NAMESPACE", "") or "" + (self.knoe_cfg_data.get("Global", {}) or {}).get("NAMESPACE", "") or "" ).strip() if ns.startswith("${") and ns.endswith("}"): ns = "" @@ -5238,12 +5238,12 @@ class KnoeConsoleInstaller(KnoeInstaller): ) if not cluster_name: cluster_name = ( - (self.prole_cfg_data.get("Global", {}) or {}).get("CLUSTER_NAME", "") + (self.knoe_cfg_data.get("Global", {}) or {}).get("CLUSTER_NAME", "") or "" ).strip() if not cluster_name: cluster_name = ( - (self.prole_cfg_data.get("Global", {}) or {}).get( + (self.knoe_cfg_data.get("Global", {}) or {}).get( "CNPG_CLUSTER_NAME", "" ) or "" @@ -5253,7 +5253,7 @@ class KnoeConsoleInstaller(KnoeInstaller): user = (self._get_input("init_password.db_username", "") or "").strip() if not user: user = ( - (self.prole_cfg_data.get("Global", {}) or {}).get("KNOE_DB_USER", "") + (self.knoe_cfg_data.get("Global", {}) or {}).get("KNOE_DB_USER", "") or "" ).strip() if user.startswith("${") and user.endswith("}"): @@ -5264,7 +5264,7 @@ class KnoeConsoleInstaller(KnoeInstaller): try: user = getpass.getuser() except Exception: - user = "prole" + user = "knoe" self.log(f"[INFO] No database owner provided; using default: {user}") p1 = self._get_input("init_password.db_password", "") p2 = self._get_input("init_password.db_password_confirm", "") or p1 @@ -5284,12 +5284,12 @@ class KnoeConsoleInstaller(KnoeInstaller): p1 = resolved p2 = resolved else: - service_dir = self._get_input("env_setup.PROLE_SERVICE", "").strip() + service_dir = self._get_input("env_setup.KNOE_SERVICE", "").strip() if not service_dir: - service_dir = self._env_defaults(ns).get("PROLE_SERVICE", "") + service_dir = self._env_defaults(ns).get("KNOE_SERVICE", "") token_path = Path(service_dir) / "secrets" / "openbao-root-token" local_token_path = ( - resolve_prole_home(env={}) + resolve_knoe_home(env={}) / "etc" / "secrets" / "openbao-root-token" @@ -5320,12 +5320,12 @@ class KnoeConsoleInstaller(KnoeInstaller): self.inputs["init_password.db_password_confirm"] = p2 self._update_env_namespace(ns) - self.prole_cfg_data["Database Creation"]["DB_USER"] = user - self.prole_cfg_data["Database Creation"]["DB_PASSWORD_SET"] = "true" - self.prole_cfg_data["Database Creation"]["DATABASE_NAMESPACE"] = ns - self.prole_cfg_data["Database Creation"]["CLUSTER_NAME"] = cluster_name - self.prole_cfg_data["Database Creation"].pop("DB_NAME", None) - self.prole_cfg_data["Database Creation"].pop("NAMESPACE", None) + self.knoe_cfg_data["Database Creation"]["DB_USER"] = user + self.knoe_cfg_data["Database Creation"]["DB_PASSWORD_SET"] = "true" + self.knoe_cfg_data["Database Creation"]["DATABASE_NAMESPACE"] = ns + self.knoe_cfg_data["Database Creation"]["CLUSTER_NAME"] = cluster_name + self.knoe_cfg_data["Database Creation"].pop("DB_NAME", None) + self.knoe_cfg_data["Database Creation"].pop("NAMESPACE", None) include_supabase = self._get_input_bool("init_cluster.supabase_enabled", False) include_kerberos = self._get_input_bool( @@ -5352,8 +5352,8 @@ class KnoeConsoleInstaller(KnoeInstaller): # Initialize OpenBao and store keys/passwords for this namespace. # OpenBao is expected to run inside the cluster; defer initialization until cluster is ready. env = os.environ.copy() - env["PROLE_HOME"] = str(self.project_root) - env["PROLE_SERVICE"] = str(self.project_root) + env["KNOE_HOME"] = str(self.project_root) + env["KNOE_SERVICE"] = str(self.project_root) env["KNOE_DB_USER"] = user env["DB_PASSWORD"] = p1 env["GRAFANA_ADMIN_PASSWORD"] = p1 @@ -5381,7 +5381,7 @@ class KnoeConsoleInstaller(KnoeInstaller): def _generate_ssh_key(self, user: str): self.log("==> Environment Preparation (Secure Access)") - key_path = Path.home() / ".ssh" / "id_prole_ed25519" + key_path = Path.home() / ".ssh" / "id_knoe_ed25519" key_path.parent.mkdir(parents=True, exist_ok=True) if key_path.exists(): self.log(f"[SKIP] Secure access keys already exist at {key_path}") @@ -5413,7 +5413,7 @@ class KnoeConsoleInstaller(KnoeInstaller): DEFAULT_ACTION_FLAGS.get("init_db_build.run_build", True), ): self.log("[SKIP] DB build disabled.") - self.prole_cfg_data["Docker Build"]["STATUS"] = "Skipped" + self.knoe_cfg_data["Docker Build"]["STATUS"] = "Skipped" return tag = self.controller.get_knoe_db_version() @@ -5439,11 +5439,11 @@ class KnoeConsoleInstaller(KnoeInstaller): # In k3s mode, publish to the in-cluster registry instead of importing # tarballs into nodes. push_ok = True - db_cfg = self.prole_cfg_data.get("Docker Build", {}) or {} + db_cfg = self.knoe_cfg_data.get("Docker Build", {}) or {} registry = (db_cfg.get("LOCAL_REGISTRY") or "").strip() # Prioritize KNOE_IMAGE_REGISTRY from [Global] if set - global_registry = (self.prole_cfg_data.get("Global", {}) or {}).get("KNOE_IMAGE_REGISTRY", "").strip() + global_registry = (self.knoe_cfg_data.get("Global", {}) or {}).get("KNOE_IMAGE_REGISTRY", "").strip() if global_registry: registry = global_registry @@ -5456,7 +5456,7 @@ class KnoeConsoleInstaller(KnoeInstaller): if host: registry = f"{host}:5000" db_cfg["LOCAL_REGISTRY"] = registry - self.prole_cfg_data["Docker Build"] = db_cfg + self.knoe_cfg_data["Docker Build"] = db_cfg if not registry or registry == "localhost:5000": push_ok = False @@ -5501,24 +5501,24 @@ class KnoeConsoleInstaller(KnoeInstaller): else: self._db_built_success = True - self.prole_cfg_data["Docker Build"]["STATUS"] = ( + self.knoe_cfg_data["Docker Build"]["STATUS"] = ( "Built" if self._db_built_success else "Failed" ) return self.log("==> Build knoe-db image") - prole_home = resolve_prole_home() + knoe_home = resolve_knoe_home() mode_key = _deployment_mode_from_env(env_key) or "default" - build_dir = prole_home / "build" / mode_key / "knoe-db" + build_dir = knoe_home / "build" / mode_key / "knoe-db" build_dir.mkdir(parents=True, exist_ok=True) source_dir = get_resource_path("knoe-db") if not source_dir.exists(): source_dir = get_resource_path("knoe-db") - marker = build_dir / ".prole_build_context_ready" + marker = build_dir / ".knoe_build_context_ready" if not marker.exists(): copy_build_context_dir(source_dir, build_dir) - pub_key_path = Path.home() / ".ssh" / "id_prole_ed25519.pub" + pub_key_path = Path.home() / ".ssh" / "id_knoe_ed25519.pub" pub_key = pub_key_path.read_text().strip() if pub_key_path.exists() else "" username = self._get_input("init_password.db_username", "") @@ -5546,11 +5546,11 @@ class KnoeConsoleInstaller(KnoeInstaller): ) else: # For non-dev, tag and push to registry - db_cfg = self.prole_cfg_data.get("Docker Build", {}) or {} + db_cfg = self.knoe_cfg_data.get("Docker Build", {}) or {} registry = (db_cfg.get("LOCAL_REGISTRY") or "").strip() # Prioritize KNOE_IMAGE_REGISTRY from [Global] if set - global_registry = (self.prole_cfg_data.get("Global", {}) or {}).get("KNOE_IMAGE_REGISTRY", "").strip() + global_registry = (self.knoe_cfg_data.get("Global", {}) or {}).get("KNOE_IMAGE_REGISTRY", "").strip() if global_registry: registry = global_registry @@ -5565,7 +5565,7 @@ class KnoeConsoleInstaller(KnoeInstaller): if host: registry = f"{host}:5000" db_cfg["LOCAL_REGISTRY"] = registry - self.prole_cfg_data["Docker Build"] = db_cfg + self.knoe_cfg_data["Docker Build"] = db_cfg if env_key == "service" and ( not registry or registry == "localhost:5000" @@ -5592,7 +5592,7 @@ class KnoeConsoleInstaller(KnoeInstaller): push_ok = False self.err(f"[ERROR] Failed to push image {remote_tag}") self._db_built_success = False - self.prole_cfg_data["Docker Build"]["STATUS"] = ( + self.knoe_cfg_data["Docker Build"]["STATUS"] = ( "Built" if self._db_built_success else "Failed" ) @@ -5600,20 +5600,20 @@ class KnoeConsoleInstaller(KnoeInstaller): self.log("==> Cluster setup") cluster_env = self._get_input("init_cluster.cluster_env", "dev") env_key = _normalize_cluster_env(cluster_env) - self.prole_cfg_data["Initialize Cluster"]["ENVIRONMENT"] = cluster_env - self.prole_cfg_data["Initialize Cluster"]["K3S_SERVER_URL"] = self._get_input( + self.knoe_cfg_data["Initialize Cluster"]["ENVIRONMENT"] = cluster_env + self.knoe_cfg_data["Initialize Cluster"]["K3S_SERVER_URL"] = self._get_input( "init_cluster.k3s_server_url", "" ) - self.prole_cfg_data["Initialize Cluster"]["K3S_TOKEN"] = _encrypt_cfg_secret( + self.knoe_cfg_data["Initialize Cluster"]["K3S_TOKEN"] = _encrypt_cfg_secret( self._get_input("init_cluster.k3s_token", "") or "" ) - self.prole_cfg_data["Optional Features"]["SUPABASE_ENABLED"] = _bool_str( + self.knoe_cfg_data["Optional Features"]["SUPABASE_ENABLED"] = _bool_str( self._get_input_bool("init_cluster.supabase_enabled", False) ) - self.prole_cfg_data["Optional Features"]["KERBEROS_ENABLED"] = _bool_str( + self.knoe_cfg_data["Optional Features"]["KERBEROS_ENABLED"] = _bool_str( self._get_input_bool("init_cluster.kerberos_enabled", False) ) - self.prole_cfg_data["Optional Features"]["AT_REST_ENCRYPTION_ENABLED"] = ( + self.knoe_cfg_data["Optional Features"]["AT_REST_ENCRYPTION_ENABLED"] = ( _bool_str( self._get_input_bool("init_cluster.at_rest_encryption_enabled", False) ) @@ -5656,8 +5656,8 @@ class KnoeConsoleInstaller(KnoeInstaller): self.reset_cluster = False if cluster_name not in res_stdout: - prole_data = self._resolve_env_dir("PROLE_DATA", "data") - self._create_k3d_cluster(cluster_name, prole_data) + knoe_data = self._resolve_env_dir("PROLE_DATA", "data") + self._create_k3d_cluster(cluster_name, knoe_data) else: # Check if it's already running if "running" not in res_stdout.lower(): @@ -5680,7 +5680,7 @@ class KnoeConsoleInstaller(KnoeInstaller): else: # Ensure we don't pin KUBECONFIG to a stale local file when another # kubeconfig (e.g. Ansible-fetched client-cert auth) is available. - service_dir = self._get_input("env_setup.PROLE_SERVICE", "").strip() + service_dir = self._get_input("env_setup.KNOE_SERVICE", "").strip() candidates: list[Path] = [] kubeconfig_env = (os.environ.get("KUBECONFIG") or "").strip() @@ -5691,14 +5691,14 @@ class KnoeConsoleInstaller(KnoeInstaller): pass # Prefer Ansible-fetched kubeconfig in the project root. - candidates.append(self.project_root / "prole-k3s.kubeconfig") + candidates.append(self.project_root / "knoe-k3s.kubeconfig") # Then standard user kubeconfig. candidates.append(Path.home() / ".kube" / "config") - # Then prole-specific secret locations. + # Then knoe-specific secret locations. if service_dir: candidates.append(Path(service_dir) / "secrets" / "k3s.kubeconfig") - candidates.append(resolve_prole_home(env={}) / "secrets" / "k3s.kubeconfig") + candidates.append(resolve_knoe_home(env={}) / "secrets" / "k3s.kubeconfig") candidates.append(self.project_root / "etc" / "secrets" / "k3s.kubeconfig") selected = _select_existing_kubeconfig(candidates) @@ -5809,14 +5809,14 @@ class KnoeConsoleInstaller(KnoeInstaller): self.inputs["init_cluster.db_cluster_kubecontext"] = db_ctx self.inputs["env_setup.APP_CLUSTER_KUBECONTEXT"] = app_ctx self.inputs["env_setup.DB_CLUSTER_KUBECONTEXT"] = db_ctx - self.prole_cfg_data.setdefault("Global", {})["APP_CLUSTER_NAME"] = app_cluster_name - self.prole_cfg_data.setdefault("Global", {})["APP_CLUSTER_MODE"] = app_cluster_mode - self.prole_cfg_data.setdefault("Global", {})["APP_CLUSTER_KUBECONTEXT"] = app_ctx - self.prole_cfg_data.setdefault("Global", {})["DB_CLUSTER_NAME"] = db_cluster_name - self.prole_cfg_data.setdefault("Global", {})["DB_CLUSTER_MODE"] = db_cluster_mode - self.prole_cfg_data.setdefault("Global", {})["DB_CLUSTER_KUBECONTEXT"] = db_ctx + self.knoe_cfg_data.setdefault("Global", {})["APP_CLUSTER_NAME"] = app_cluster_name + self.knoe_cfg_data.setdefault("Global", {})["APP_CLUSTER_MODE"] = app_cluster_mode + self.knoe_cfg_data.setdefault("Global", {})["APP_CLUSTER_KUBECONTEXT"] = app_ctx + self.knoe_cfg_data.setdefault("Global", {})["DB_CLUSTER_NAME"] = db_cluster_name + self.knoe_cfg_data.setdefault("Global", {})["DB_CLUSTER_MODE"] = db_cluster_mode + self.knoe_cfg_data.setdefault("Global", {})["DB_CLUSTER_KUBECONTEXT"] = db_ctx # Back-compat default context points to app cluster for platform services. - self.prole_cfg_data.setdefault("Global", {})["KUBECONTEXT"] = app_ctx + self.knoe_cfg_data.setdefault("Global", {})["KUBECONTEXT"] = app_ctx kubectl = subprocess.run(["which", "kubectl"], capture_output=True) if kubectl.returncode != 0: @@ -5851,7 +5851,7 @@ class KnoeConsoleInstaller(KnoeInstaller): "-p", "infrastructure/playbooks/k3s_reset.yml", "-l", - "myrddin.prole.org", + "myrddin.knoe.org", ] + vault_args self.log(f"Running: {' '.join(reset_cmd)}") rc = self._run_cmd(reset_cmd) @@ -5864,7 +5864,7 @@ class KnoeConsoleInstaller(KnoeInstaller): "-p", "infrastructure/playbooks/k3s_sync.yml", "-l", - "myrddin.prole.org", + "myrddin.knoe.org", ] + vault_args self.log(f"Running: {' '.join(sync_token_cmd)}") rc = self._run_cmd(sync_token_cmd) @@ -5877,7 +5877,7 @@ class KnoeConsoleInstaller(KnoeInstaller): "-p", "infrastructure/playbooks/k3s_reset.yml", "-l", - "pi.prole.org,retropie.prole.org", + "pi.knoe.org,retropie.knoe.org", ] + vault_args self.log(f"Running: {' '.join(reset_agents_cmd)}") rc = self._run_cmd(reset_agents_cmd) @@ -5934,7 +5934,7 @@ class KnoeConsoleInstaller(KnoeInstaller): registry_ops.update( namespace=registry_ns, env=env, - mode=env.get("PROLE_MODE"), + mode=env.get("KNOE_MODE"), project_root=self.project_root, log=self.log, ) @@ -5966,7 +5966,7 @@ class KnoeConsoleInstaller(KnoeInstaller): mode = "k3s" elif env_key == "prod": mode = "k8s" - env.setdefault("PROLE_MODE", mode or env_key) + env.setdefault("KNOE_MODE", mode or env_key) self.log("==> OpenBao initialize (cluster)") db_ns = (self._get_input("init_password.db_namespace", "") or "").strip() if not db_ns: @@ -6006,7 +6006,7 @@ class KnoeConsoleInstaller(KnoeInstaller): self.log("==> Common services deploy") service_ns = self._service_namespace() env = self._script_env_for_namespace(service_ns) - mode = env.get("PROLE_MODE") or self._deployment_mode() + mode = env.get("KNOE_MODE") or self._deployment_mode() manage_opentofu = str(mode).lower() != "k8s" registry_ns = self._registry_namespace() if not manage_opentofu: @@ -6158,7 +6158,7 @@ class KnoeConsoleInstaller(KnoeInstaller): """ inv = ( - (self.prole_cfg_data.get("Network", {}) or {}).get("ANSIBLE_INVENTORY") + (self.knoe_cfg_data.get("Network", {}) or {}).get("ANSIBLE_INVENTORY") or "" ).strip() if not inv: @@ -6210,7 +6210,7 @@ class KnoeConsoleInstaller(KnoeInstaller): env = self._script_env_for_namespace(ns) try: - opentofu_ops.start(namespace=ns, env=env, mode=env.get("PROLE_MODE"), log=self.log) + opentofu_ops.start(namespace=ns, env=env, mode=env.get("KNOE_MODE"), log=self.log) finally: pass @@ -6223,29 +6223,29 @@ class KnoeConsoleInstaller(KnoeInstaller): kdc = self._get_input("kerberos_config.kdc", "") user = self._get_input("kerberos_config.user", "") password = self._get_input("kerberos_config.password", "") - self.prole_cfg_data["Kerberos Authentication"]["ENABLED"] = _bool_str(enabled) - self.prole_cfg_data["Kerberos Authentication"]["REALM"] = realm - self.prole_cfg_data["Kerberos Authentication"]["KDC"] = kdc - self.prole_cfg_data["Kerberos Authentication"]["SERVER"] = kdc - self.prole_cfg_data["Kerberos Authentication"]["USER"] = user - self.prole_cfg_data["Kerberos Authentication"]["PASSWORD"] = password - self.prole_cfg_data["Kerberos Authentication"]["AD_PORT_FORWARD"] = ( + self.knoe_cfg_data["Kerberos Authentication"]["ENABLED"] = _bool_str(enabled) + self.knoe_cfg_data["Kerberos Authentication"]["REALM"] = realm + self.knoe_cfg_data["Kerberos Authentication"]["KDC"] = kdc + self.knoe_cfg_data["Kerberos Authentication"]["SERVER"] = kdc + self.knoe_cfg_data["Kerberos Authentication"]["USER"] = user + self.knoe_cfg_data["Kerberos Authentication"]["PASSWORD"] = password + self.knoe_cfg_data["Kerberos Authentication"]["AD_PORT_FORWARD"] = ( os.environ.get("KRB5_AD_PORT_FORWARD", "1") ) - self.prole_cfg_data["Kerberos Authentication"]["AD_TCP_PORTS"] = os.environ.get( + self.knoe_cfg_data["Kerberos Authentication"]["AD_TCP_PORTS"] = os.environ.get( "KRB5_AD_TCP_PORTS", "88 389 445 464 636" ) - self.prole_cfg_data["Kerberos Authentication"]["AD_UDP_PORTS"] = os.environ.get( + self.knoe_cfg_data["Kerberos Authentication"]["AD_UDP_PORTS"] = os.environ.get( "KRB5_AD_UDP_PORTS", "88 464" ) - self.prole_cfg_data["Kerberos Authentication"]["AD_PROXY_HOST_NETWORK"] = ( + self.knoe_cfg_data["Kerberos Authentication"]["AD_PROXY_HOST_NETWORK"] = ( os.environ.get("KRB5_AD_PROXY_HOST_NETWORK", "1") ) - self.prole_cfg_data["Kerberos Authentication"]["AD_PROXY_IMAGE"] = ( + self.knoe_cfg_data["Kerberos Authentication"]["AD_PROXY_IMAGE"] = ( os.environ.get("KRB5_AD_PROXY_IMAGE", "alpine/socat") ) - self.prole_cfg_data["Kerberos Authentication"]["AD_PROXY_SERVICE"] = ( - os.environ.get("KRB5_AD_SERVICE_NAME", "prole-kerberos-ad-dc") + self.knoe_cfg_data["Kerberos Authentication"]["AD_PROXY_SERVICE"] = ( + os.environ.get("KRB5_AD_SERVICE_NAME", "knoe-kerberos-ad-dc") ) ns = ( @@ -6255,7 +6255,7 @@ class KnoeConsoleInstaller(KnoeInstaller): env["KERBEROS_ENABLED"] = _bool_str(enabled) env["ENABLED"] = env["KERBEROS_ENABLED"] env["KRB5_REALM"] = realm - if env.get("PROLE_MODE") == "k3s": + if env.get("KNOE_MODE") == "k3s": env.setdefault("KRB5_AD_PORT_FORWARD", "0") if not self._get_input_bool( @@ -6267,7 +6267,7 @@ class KnoeConsoleInstaller(KnoeInstaller): # Check if already tested successfully if ( - self.prole_cfg_data.get("Kerberos Authentication", {}).get("TEST_STATUS") + self.knoe_cfg_data.get("Kerberos Authentication", {}).get("TEST_STATUS") == "Success" ): self.log("[OK] Kerberos already tested successfully. Skipping.") @@ -6280,12 +6280,12 @@ class KnoeConsoleInstaller(KnoeInstaller): rc2 = self._run_script("init_kerberos.sh", args=["test"], env=env) if rc2 != 0: self.err(f"[ERROR] Kerberos test failed (code {rc2})") - self.prole_cfg_data.setdefault("Kerberos Authentication", {})[ + self.knoe_cfg_data.setdefault("Kerberos Authentication", {})[ "TEST_STATUS" ] = "Failed" else: self.log("[OK] Kerberos test completed successfully.") - self.prole_cfg_data.setdefault("Kerberos Authentication", {})[ + self.knoe_cfg_data.setdefault("Kerberos Authentication", {})[ "TEST_STATUS" ] = "Success" @@ -6295,11 +6295,11 @@ class KnoeConsoleInstaller(KnoeInstaller): DEFAULT_ACTION_FLAGS.get("init_scripts.run_scripts", True), ): self.log("[SKIP] Init scripts disabled.") - self.prole_cfg_data["Initialization Scripts"]["STATUS"] = "Skipped" + self.knoe_cfg_data["Initialization Scripts"]["STATUS"] = "Skipped" return if ( - self.prole_cfg_data.get("Initialization Scripts", {}).get("STATUS") + self.knoe_cfg_data.get("Initialization Scripts", {}).get("STATUS") == "Finished" ): self.log("[OK] Initialization scripts already finished.") @@ -6329,7 +6329,7 @@ class KnoeConsoleInstaller(KnoeInstaller): ] if not opt_allowed: self.log(f"[SKIP] Monitoring disabled by policy: {opt_reason}") - self.prole_cfg_data.setdefault("Monitoring", {})["STATUS"] = "Skipped" + self.knoe_cfg_data.setdefault("Monitoring", {})["STATUS"] = "Skipped" if mode != "k3d": post_cnpg_steps.append(("init_nginx_ingress.sh", ["initialize"], False, "app")) @@ -6452,7 +6452,7 @@ class KnoeConsoleInstaller(KnoeInstaller): self.err("Database initialization will fail without these secrets.") self._scripts_success = False - self.prole_cfg_data["Initialization Scripts"]["STATUS"] = ( + self.knoe_cfg_data["Initialization Scripts"]["STATUS"] = ( "Completed" if self._scripts_success else "Attempted" ) @@ -6462,7 +6462,7 @@ class KnoeConsoleInstaller(KnoeInstaller): DEFAULT_ACTION_FLAGS.get("init_cnpg_deploy.run_deploy", True), ): self.log("[SKIP] CnPG deploy disabled.") - self.prole_cfg_data["Deployment"]["STATUS"] = "Skipped" + self.knoe_cfg_data["Deployment"]["STATUS"] = "Skipped" return db_cluster = self._cnpg_cluster_name() self.log(f"==> [db-cluster {db_cluster}] Deploy CloudNativePG") @@ -6484,7 +6484,7 @@ class KnoeConsoleInstaller(KnoeInstaller): self._ensure_cnpg_storage_provisioned(ns, env) except Exception as exc: self._cnpg_success = False - self.prole_cfg_data["Deployment"]["STATUS"] = "Attempted" + self.knoe_cfg_data["Deployment"]["STATUS"] = "Attempted" self.err(f"[ERROR] CNPG pre-provisioning failed: {exc}") return else: @@ -6504,10 +6504,10 @@ class KnoeConsoleInstaller(KnoeInstaller): mode=mode, ) self._cnpg_success = True - self.prole_cfg_data["Deployment"]["STATUS"] = "Deployed" + self.knoe_cfg_data["Deployment"]["STATUS"] = "Deployed" except Exception as exc: self._cnpg_success = False - self.prole_cfg_data["Deployment"]["STATUS"] = "Attempted" + self.knoe_cfg_data["Deployment"]["STATUS"] = "Attempted" self.err(f"[ERROR] CnPG deploy failed: {exc}") if self._get_input_bool( @@ -6543,7 +6543,7 @@ class KnoeConsoleInstaller(KnoeInstaller): def _step_supabase(self) -> None: if not self._get_input_bool("init_cluster.supabase_enabled", False): self.log("[SKIP] Supabase deploy disabled.") - self.prole_cfg_data["Supabase"] = {"STATUS": "Skipped"} + self.knoe_cfg_data["Supabase"] = {"STATUS": "Skipped"} return self.log("==> Deploy Supabase") ns = ( @@ -6554,7 +6554,7 @@ class KnoeConsoleInstaller(KnoeInstaller): opt_allowed, _opt_count, opt_reason = self._optional_workloads_policy(env) if not opt_allowed: self.log(f"[SKIP] Supabase deploy disabled by policy: {opt_reason}") - self.prole_cfg_data["Supabase"] = {"STATUS": "Skipped"} + self.knoe_cfg_data["Supabase"] = {"STATUS": "Skipped"} self._supabase_success = False return @@ -6562,7 +6562,7 @@ class KnoeConsoleInstaller(KnoeInstaller): if not script_path.exists(): self.err(f"[ERROR] Supabase deploy script not found: {script_path}") self._supabase_success = False - self.prole_cfg_data["Supabase"] = {"STATUS": "Attempted"} + self.knoe_cfg_data["Supabase"] = {"STATUS": "Attempted"} return mode = ( os.environ.get("SUPABASE_DEPLOY_MODE") @@ -6585,8 +6585,8 @@ class KnoeConsoleInstaller(KnoeInstaller): if self.cfg_path and self.cfg_path.exists(): cfg_path = self.cfg_path else: - conf_dir = prole_conf_mgr.resolve_prole_conf_dir(self.project_root) - candidate = prole_conf_mgr.entrypoint_path(conf_dir) + conf_dir = knoe_conf_mgr.resolve_knoe_conf_dir(self.project_root) + candidate = knoe_conf_mgr.entrypoint_path(conf_dir) if candidate.exists(): cfg_path = candidate if cfg_path: @@ -6599,10 +6599,10 @@ class KnoeConsoleInstaller(KnoeInstaller): rc = self._run_cmd(["bash", str(script_path)] + args, env=env) if rc == 0: self._supabase_success = True - self.prole_cfg_data["Supabase"] = {"STATUS": "Deployed"} + self.knoe_cfg_data["Supabase"] = {"STATUS": "Deployed"} else: self._supabase_success = False - self.prole_cfg_data["Supabase"] = {"STATUS": "Attempted"} + self.knoe_cfg_data["Supabase"] = {"STATUS": "Attempted"} self.err(f"[ERROR] Supabase deploy failed (code {rc})") def _finalize_secrets(self) -> None: @@ -6626,7 +6626,7 @@ class KnoeConsoleInstaller(KnoeInstaller): rc = self._run_script("build-a-bao.sh", env=env) if rc == 0: self._secrets_finalized = True - self.log("[OK] Secrets saved to OpenBao and prole.cfg updated.") + self.log("[OK] Secrets saved to OpenBao and knoe.cfg updated.") else: self.err(f"[ERROR] build-a-bao.sh failed (code {rc})") @@ -6636,7 +6636,7 @@ class KnoeConsoleInstaller(KnoeInstaller): ) mode = _deployment_mode_from_env(self._get_input("init_cluster.mode", "")) if not mode: - mode = _deployment_mode_from_env(os.environ.get("PROLE_MODE", "")) + mode = _deployment_mode_from_env(os.environ.get("KNOE_MODE", "")) # OpenTofu pipeline is k3s-scoped, but we still want it available for k3d # installs when the user provides k3s connection settings (e.g., staging @@ -6670,11 +6670,11 @@ class KnoeConsoleInstaller(KnoeInstaller): pipeline_dir = _sync_opentofu_pipeline( self.project_root, namespace, k3s_server, k3s_token ) - self.prole_cfg_data["Deployment"]["OPENTOFU_PIPELINE_DIR"] = str(pipeline_dir) + self.knoe_cfg_data["Deployment"]["OPENTOFU_PIPELINE_DIR"] = str(pipeline_dir) self.log(f"[OK] OpenTofu pipeline prepared at {pipeline_dir}") - def _create_k3d_cluster(self, cluster_name: str, prole_data: Path) -> None: - volume_args = _k3d_prole_data_volume_args(str(prole_data)) + def _create_k3d_cluster(self, cluster_name: str, knoe_data: Path) -> None: + volume_args = _k3d_knoe_data_volume_args(str(knoe_data)) reg_args = [] if _local_registry_enabled("k3d"): info = self._ensure_local_registry_available() @@ -6697,19 +6697,19 @@ class KnoeConsoleInstaller(KnoeInstaller): if rc == 0: return if platform.system() == "Darwin": - fallback = resolve_prole_home(env={}) / "data" + fallback = resolve_knoe_home(env={}) / "data" try: - if prole_data.resolve() == fallback.resolve(): + if knoe_data.resolve() == fallback.resolve(): raise Exception("k3d cluster create failed.") except Exception: # If path resolution fails, still try the fallback pass self.err( - f"[WARN] k3d create failed with {prole_data}; retrying with {fallback}..." + f"[WARN] k3d create failed with {knoe_data}; retrying with {fallback}..." ) rc = self._run_cmd( ["k3d", "cluster", "create", cluster_name, "-a", "2"] - + _k3d_prole_data_volume_args(str(fallback)) + + _k3d_knoe_data_volume_args(str(fallback)) + reg_args + ["--api-port", "0.0.0.0:6443"] ) @@ -6746,9 +6746,9 @@ class KnoeConsoleInstaller(KnoeInstaller): f"[WARN] Failed to delete k3d cluster {cluster_name} (code {rc}); continuing." ) - prole_data = self._resolve_env_dir("PROLE_DATA", "data") - self._create_k3d_cluster(cluster_name, prole_data) - elif env_key in ("service", "prole-service-cluster", "k3s"): + knoe_data = self._resolve_env_dir("PROLE_DATA", "data") + self._create_k3d_cluster(cluster_name, knoe_data) + elif env_key in ("service", "knoe-service-cluster", "k3s"): self.log("==> Cluster reset (k3s namespace cleanup)") db_ns = self._get_input("env_setup.DATABASE_NAMESPACE", "") if not db_ns: @@ -6759,12 +6759,12 @@ class KnoeConsoleInstaller(KnoeInstaller): service_ns = self._service_namespace().strip() or "knoe-system" monitoring_ns = ( - ((self.prole_cfg_data.get("Global", {}) or {}).get("MONITORING_NAMESPACE", "") or "").strip() + ((self.knoe_cfg_data.get("Global", {}) or {}).get("MONITORING_NAMESPACE", "") or "").strip() or (os.environ.get("MONITORING_NAMESPACE") or "").strip() or "monitoring" ) cnpg_ns = ( - ((self.prole_cfg_data.get("Global", {}) or {}).get("CNPG_NAMESPACE", "") or "").strip() + ((self.knoe_cfg_data.get("Global", {}) or {}).get("CNPG_NAMESPACE", "") or "").strip() or (os.environ.get("CNPG_NAMESPACE") or "").strip() or "cnpg-system" ) @@ -6817,7 +6817,7 @@ class KnoeConsoleInstaller(KnoeInstaller): def _cleanup_local_k3s_artifacts(self) -> None: paths = [ self.project_root / "etc" / "secrets" / "k3s.kubeconfig", - resolve_prole_home(env={}) / "secrets" / "k3s.kubeconfig", + resolve_knoe_home(env={}) / "secrets" / "k3s.kubeconfig", ] for path in paths: try: @@ -6830,7 +6830,7 @@ class KnoeConsoleInstaller(KnoeInstaller): def _ensure_project_k3s_kubeconfig(self, server: str, token: str) -> None: server = (server or "").strip() token = (token or "").strip() - target = self.project_root / "prole-k3s.kubeconfig" + target = self.project_root / "knoe-k3s.kubeconfig" backup = target.with_name(target.name + ".bak") def _looks_cert_based(path: Path) -> bool: @@ -6880,7 +6880,7 @@ class KnoeConsoleInstaller(KnoeInstaller): self.err(f"[WARN] Failed to generate token-based kubeconfig: {exc}") else: self.err( - "[WARN] No usable kubeconfig available for remote k3s; please fetch/create a cert-based prole-k3s.kubeconfig." + "[WARN] No usable kubeconfig available for remote k3s; please fetch/create a cert-based knoe-k3s.kubeconfig." ) def _close_log_file(self): @@ -7005,7 +7005,7 @@ class KnoeConsoleInstaller(KnoeInstaller): def _db_master_vault_key(self) -> str: key = (os.environ.get("PROLE_DB_MASTER_VAULT_KEY") or "").strip() - return key or "vault_prole_db_master_password" + return key or "vault_knoe_db_master_password" def _resolve_ansible_vault_password_file(self) -> str: vault_file = (os.environ.get("ANSIBLE_VAULT_PASSWORD_FILE") or "").strip() @@ -7122,7 +7122,7 @@ class KnoeConsoleInstaller(KnoeInstaller): try: # Merge caller-provided inputs with defaults and config-file values. # Caller inputs (self.inputs) take precedence to support programmatic overrides - # in automated pipelines (like prole.deploy_pipeline). + # in automated pipelines (like knoe.deploy_pipeline). self.inputs = { **self._default_inputs(), **self._load_inputs_from_cfg(), @@ -7130,7 +7130,7 @@ class KnoeConsoleInstaller(KnoeInstaller): } # Silent mode: ensure we have a master password source before proceeding. - # If the value is an OpenBao reference or an encrypted `${PROLE_SECRET:...}` + # If the value is an OpenBao reference or an encrypted `${KNOE_SECRET:...}` # placeholder, allow downstream secret-management steps to resolve it. # Only prompt/generate when the value is truly missing. db_pw = (self._get_input("init_password.db_password", "") or "").strip() @@ -7194,11 +7194,11 @@ class KnoeConsoleInstaller(KnoeInstaller): ) self.inputs["init_password.db_password"] = new_pw self.inputs["init_password.db_password_confirm"] = new_pw - # Save immediately to prole.cfg so subsequent steps/scripts see it. + # Save immediately to knoe.cfg so subsequent steps/scripts see it. self._write_cfg() # Synchronize controller state self.controller.state.inputs = self.inputs - self.controller.state.config_data = self.prole_cfg_data + self.controller.state.config_data = self.knoe_cfg_data # Delegate config writing to the installer (allows milestones to persist changes) self.controller.write_config = self._write_cfg except Exception as e: @@ -7234,8 +7234,8 @@ class KnoeConsoleInstaller(KnoeInstaller): ) # Sync back results - self.prole_cfg_data = self.controller.state.config_data - self.prole_cfg_data["Install"]["STATUS"] = "Finished" + self.knoe_cfg_data = self.controller.state.config_data + self.knoe_cfg_data["Install"]["STATUS"] = "Finished" self._write_cfg() self.log("[DONE] Silent install completed.") @@ -7244,7 +7244,7 @@ class KnoeConsoleInstaller(KnoeInstaller): except Exception as e: self.err(f"[FATAL] {e}") try: - self.prole_cfg_data["Install"]["STATUS"] = "Failed" + self.knoe_cfg_data["Install"]["STATUS"] = "Failed" self._write_cfg() except Exception: pass @@ -7318,7 +7318,7 @@ class KnoeConsoleInstaller(KnoeInstaller): Operates only on Studio resources — does not restart other Supabase components. """ default_supabase_studio_url = ( - "db.0.knoe.dev" if self._deployment_mode() == "k8s" else "db.prole.org" + "db.0.knoe.dev" if self._deployment_mode() == "k8s" else "db.knoe.org" ) studio_url = ( self._get_input("init_cluster.supabase_studio_url", default_supabase_studio_url).strip() @@ -7338,7 +7338,7 @@ class KnoeConsoleInstaller(KnoeInstaller): "SUPABASE_STUDIO_URL": studio_url, "SUPABASE_STUDIO_ENABLED": "true", "PROJECT_ROOT": project_root_str, - "PROLE_HOME": project_root_str, + "KNOE_HOME": project_root_str, "KNOE_DB_NAMESPACE": db_ns, "DATABASE_NAMESPACE": db_ns, **({"PROLE_CFG_PATH": cfg_path_str} if cfg_path_str else {}), @@ -7416,7 +7416,7 @@ class KnoeConsoleInstaller(KnoeInstaller): **self.inputs } self.controller.state.inputs = self.inputs - self.controller.state.config_data = self.prole_cfg_data + self.controller.state.config_data = self.knoe_cfg_data # Delegate config writing to the installer (allows milestones to persist changes) self.controller.write_config = self._write_cfg except Exception as exc: @@ -7479,7 +7479,7 @@ class KnoeConsoleInstaller(KnoeInstaller): **self.inputs } self.controller.state.inputs = self.inputs - self.controller.state.config_data = self.prole_cfg_data + self.controller.state.config_data = self.knoe_cfg_data # Delegate config writing to the installer (allows milestones to persist changes) self.controller.write_config = self._write_cfg except Exception as exc: @@ -7543,18 +7543,18 @@ def _attempt_k3s_repair( db_password: str, ) -> None: env = os.environ.copy() - env["PROLE_HOME"] = str(controller.project_root) - env["PROLE_SERVICE"] = str(controller.project_root) + env["KNOE_HOME"] = str(controller.project_root) + env["KNOE_SERVICE"] = str(controller.project_root) env["DATABASE_NAMESPACE"] = namespace env["CLUSTER_NAME"] = (os.environ.get("CLUSTER_NAME") or "knoe-db").strip() or "knoe-db" # Transitional compatibility for scripts still reading NAMESPACE. env["NAMESPACE"] = namespace - env["PROLE_MODE"] = "k3s" + env["KNOE_MODE"] = "k3s" if db_password: env["DB_PASSWORD"] = db_password env["OPENTOFU_ADMIN_PASSWORD"] = db_password if server and token and not env.get("KUBECONFIG"): - repo_kubeconfig = controller.project_root / "prole-k3s.kubeconfig" + repo_kubeconfig = controller.project_root / "knoe-k3s.kubeconfig" if repo_kubeconfig.exists(): env["KUBECONFIG"] = str(repo_kubeconfig) elif _looks_like_k8s_bearer_token(token): @@ -7608,7 +7608,7 @@ def _reset_k3s_namespace( env = os.environ.copy() if not env.get("KUBECONFIG"): - repo_kubeconfig = project_root / "prole-k3s.kubeconfig" + repo_kubeconfig = project_root / "knoe-k3s.kubeconfig" if repo_kubeconfig.exists(): env["KUBECONFIG"] = str(repo_kubeconfig) elif server and token and _looks_like_k8s_bearer_token(token): @@ -7712,7 +7712,7 @@ def _prepare_k3s_pipeline( When *skip_validation* is True the silent-install-test / repair loop is skipped entirely — the caller (e.g. a successful silent install) already - validated the environment. The main prole.cfg is **not** overwritten in + validated the environment. The main knoe.cfg is **not** overwritten in this case so it keeps whatever cluster_env the install used. """ @@ -7726,8 +7726,8 @@ def _prepare_k3s_pipeline( print(msg, end="", flush=True) project_root = controller.project_root - conf_dir = prole_conf_mgr.resolve_prole_conf_dir(project_root) - cfg_path = prole_conf_mgr.entrypoint_path(conf_dir) + conf_dir = knoe_conf_mgr.resolve_knoe_conf_dir(project_root) + cfg_path = knoe_conf_mgr.entrypoint_path(conf_dir) _log("==> Preparing k3s pipeline\n") _log(f" Project root: {project_root}\n") @@ -7770,22 +7770,22 @@ def _prepare_k3s_pipeline( if not skip_validation: # Standalone mode: write a pipeline-specific cfg and validate - knoe.inputs["init_cluster.cluster_env"] = "prole-service-cluster" + knoe.inputs["init_cluster.cluster_env"] = "knoe-service-cluster" # supabase_enabled is intentionally NOT overridden here — preserve the cfg value knoe.inputs["init_cluster.kerberos_enabled"] = _bool_str(False) knoe.inputs["init_cluster.at_rest_encryption_enabled"] = _bool_str(True) knoe.inputs["kerberos_config.enabled"] = _bool_str(False) knoe.inputs["kerberos_config.test_connection"] = _bool_str(False) - knoe.inputs["env_setup.PROLE_HOME"] = str(project_root) - knoe.inputs["env_setup.PROLE_CONF"] = str(project_root / "conf") + knoe.inputs["env_setup.KNOE_HOME"] = str(project_root) + knoe.inputs["env_setup.KNOE_CONF"] = str(project_root / "conf") knoe.inputs["env_setup.PROLE_DATA"] = knoe._resolve_env_value( - "PROLE_DATA", str(resolve_prole_home(env={}) / "data") - ) or str(resolve_prole_home(env={}) / "data") + "PROLE_DATA", str(resolve_knoe_home(env={}) / "data") + ) or str(resolve_knoe_home(env={}) / "data") knoe.inputs["env_setup.PROLE_LOGS"] = knoe._resolve_env_value( - "PROLE_LOGS", str(resolve_prole_home(env={}) / "logs") - ) or str(resolve_prole_home(env={}) / "logs") - knoe.inputs["env_setup.PROLE_SERVICE"] = str(project_root / "etc") + "PROLE_LOGS", str(resolve_knoe_home(env={}) / "logs") + ) or str(resolve_knoe_home(env={}) / "logs") + knoe.inputs["env_setup.KNOE_SERVICE"] = str(project_root / "etc") # Ensure required keys that the silent install test validates if not knoe.inputs.get("env_setup.DATABASE_NAMESPACE"): @@ -7804,7 +7804,7 @@ def _prepare_k3s_pipeline( knoe.inputs["init_password.db_host_port"] = "5432" _log(" [OK] Config overrides applied for k3s pipeline\n") - _log("==> Writing prole.cfg...\n") + _log("==> Writing knoe.cfg...\n") knoe._write_cfg() _log(f" [OK] {cfg_path}\n\n") diff --git a/knoe/core/controller.py b/knoe/core/controller.py index c9c9fd1..90c51b4 100644 --- a/knoe/core/controller.py +++ b/knoe/core/controller.py @@ -8,14 +8,14 @@ from pathlib import Path from typing import TYPE_CHECKING, Any, Callable, Sequence from knoe.state import InstallerState -from knoe.core.env import _deployment_mode_from_env, _expand_cfg_value, resolve_prole_home +from knoe.core.env import _deployment_mode_from_env, _expand_cfg_value, resolve_knoe_home if TYPE_CHECKING: from knoe.milestone import Milestone class KnoeController: - """Business logic for Prole installer, separated from UI.""" + """Business logic for Knoe installer, separated from UI.""" def __init__(self, project_root: Path, verbose: bool = False, cfg_path: Path | None = None): self.project_root = project_root @@ -33,16 +33,16 @@ class KnoeController: return False def get_knoe_db_version(self) -> str: - # Prefer per-user, per-mode version files under ~/.prole (or resolved PROLE_HOME) + # Prefer per-user, per-mode version files under ~/.knoe (or resolved KNOE_HOME) # so that k3d/k3s/k8s do not overwrite each other's DB image versions. cluster_env = os.environ.get("CLUSTER_ENV") or "" mode_key = ( _deployment_mode_from_env(cluster_env) - or (os.environ.get("PROLE_MODE") or "") + or (os.environ.get("KNOE_MODE") or "") or "default" ) - runtime_home = resolve_prole_home(env=os.environ.copy()) + runtime_home = resolve_knoe_home(env=os.environ.copy()) mode_root = runtime_home / "modes" / mode_key pg_version_file = mode_root / "conf" / "postgresql" / ".version" @@ -71,7 +71,7 @@ class KnoeController: stderr_to_stdout: bool = True, ) -> int: """Generic runner for etc/ scripts. - Copies the script to $PROLE_HOME/etc before running it. + Copies the script to $KNOE_HOME/etc before running it. """ self.logger.debug( f"run_script: {script_name} args={args} env_keys={sorted((env or {}).keys())[:20]}" @@ -90,22 +90,22 @@ class KnoeController: source_script = self.project_root / "etc" / script_name # Determine target etc directory - prole_home_val = base_env.get("PROLE_HOME") - if not prole_home_val: - prole_home = resolve_prole_home(env={}) + knoe_home_val = base_env.get("KNOE_HOME") + if not knoe_home_val: + knoe_home = resolve_knoe_home(env={}) else: expanded_home = _expand_cfg_value( - str(prole_home_val), env=base_env, max_depth=10 + str(knoe_home_val), env=base_env, max_depth=10 ) expanded_home = os.path.expanduser(expanded_home) - prole_home = Path(expanded_home) + knoe_home = Path(expanded_home) - target_etc = prole_home / "etc" + target_etc = knoe_home / "etc" target_etc.mkdir(parents=True, exist_ok=True) target_script = target_etc / script_name - # Also ensure k8s resources are copied to $PROLE_HOME/k8s for reference - target_k8s = prole_home / "k8s" + # Also ensure k8s resources are copied to $KNOE_HOME/k8s for reference + target_k8s = knoe_home / "k8s" source_k8s = self.project_root / "k8s" if source_k8s.exists(): if source_k8s.resolve() != target_k8s.resolve(): @@ -116,13 +116,13 @@ class KnoeController: shutil.rmtree(target_k8s) shutil.copytree(source_k8s, target_k8s) - # Ensure a minimal conf allowlist is available in PROLE_HOME. + # Ensure a minimal conf allowlist is available in KNOE_HOME. # - # IMPORTANT: `$PROLE_HOME/conf` may contain curated, environment-specific - # configuration files including the `prole.cfg` symlink entrypoint and - # `$PROLE_CONF//prole.cfg`. Never delete or wholesale-copy the + # IMPORTANT: `$KNOE_HOME/conf` may contain curated, environment-specific + # configuration files including the `knoe.cfg` symlink entrypoint and + # `$KNOE_CONF//knoe.cfg`. Never delete or wholesale-copy the # entire `conf/` directory here. - target_conf = prole_home / "conf" + target_conf = knoe_home / "conf" source_conf = self.project_root / "conf" if source_conf.exists() and source_conf.resolve() != target_conf.resolve(): target_conf.mkdir(parents=True, exist_ok=True) @@ -148,10 +148,10 @@ class KnoeController: except Exception: pass - # Ensure the db image .version is available in PROLE_HOME for image tagging + # Ensure the db image .version is available in KNOE_HOME for image tagging source_db_version = self.project_root / "knoe-db" / ".version" if source_db_version.exists(): - target_db_dir = prole_home / "knoe-db" + target_db_dir = knoe_home / "knoe-db" target_db_dir.mkdir(parents=True, exist_ok=True) target_db_version = target_db_dir / ".version" try: @@ -161,7 +161,7 @@ class KnoeController: # Ensure shared shell libraries are available for etc/ scripts. # Common core scripts source `etc/common_core_lib.sh`, which in turn sources - # `etc/lib/shell/*` relative to `$PROLE_HOME/etc`. + # `etc/lib/shell/*` relative to `$KNOE_HOME/etc`. try: source_etc_lib_shell = self.project_root / "etc" / "lib" / "shell" target_etc_lib_shell = target_etc / "lib" / "shell" @@ -189,7 +189,7 @@ class KnoeController: # Keep shared etc helpers in sync. try: - for helper in ["prole_cfg.sh", "common_core_lib.sh"]: + for helper in ["knoe_cfg.sh", "common_core_lib.sh"]: source_helper = self.project_root / "etc" / helper target_helper = target_etc / helper if not source_helper.exists(): @@ -208,14 +208,14 @@ class KnoeController: # Ensure PYTHONUNBUFFERED=1 for any python scripts called within the bash script run_env = base_env.copy() - # Expand PROLE_* paths so subprocesses never see literal `$HOME`/`$PROLE_HOME`. + # Expand PROLE_* paths so subprocesses never see literal `$HOME`/`$KNOE_HOME`. try: - run_env["PROLE_HOME"] = str(prole_home) + run_env["KNOE_HOME"] = str(knoe_home) for k in ( - "PROLE_CONF", + "KNOE_CONF", "PROLE_DATA", "PROLE_LOGS", - "PROLE_SERVICE", + "KNOE_SERVICE", "KUBECONFIG", ): raw = (run_env.get(k) or "").strip() @@ -226,7 +226,7 @@ class KnoeController: except Exception: pass self.logger.debug( - f" cwd={os.getcwd()} KUBECONFIG={run_env.get('KUBECONFIG','')} NAMESPACE={run_env.get('NAMESPACE','')} PROLE_MODE={run_env.get('PROLE_MODE','')}" + f" cwd={os.getcwd()} KUBECONFIG={run_env.get('KUBECONFIG','')} NAMESPACE={run_env.get('NAMESPACE','')} KNOE_MODE={run_env.get('KNOE_MODE','')}" ) run_env["PYTHONUNBUFFERED"] = "1" if self.verbose: diff --git a/knoe/core/env.py b/knoe/core/env.py index c95fb10..2673f70 100644 --- a/knoe/core/env.py +++ b/knoe/core/env.py @@ -24,7 +24,7 @@ from pathlib import Path from cryptography.hazmat.primitives.ciphers.aead import AESGCM from knoe import config as inst_config -from knoe import prole_conf +from knoe import knoe_conf from knoe.core.policy import OPTIONAL_WORKLOADS_MIN_READY_SCHEDULABLE_NODES, POLICY_CFG_KEY from typing import Any @@ -54,18 +54,18 @@ def get_resource_path(relative_path): return base_path / relative_path -def resolve_prole_home(env: dict[str, str] | None = None) -> Path: - """Resolve `PROLE_HOME` from `env`/process environment. +def resolve_knoe_home(env: dict[str, str] | None = None) -> Path: + """Resolve `KNOE_HOME` from `env`/process environment. - Falls back to `$HOME/.prole` when `PROLE_HOME` is not set. + Falls back to `$HOME/.knoe` when `KNOE_HOME` is not set. """ env_map = env or os.environ - raw = (env_map.get("PROLE_HOME") or "").strip() + raw = (env_map.get("KNOE_HOME") or "").strip() if raw: expanded = os.path.expanduser(os.path.expandvars(raw)) return Path(expanded) - return Path.home() / ".prole" + return Path.home() / ".knoe" # Standard Console Theme (Light background, Dark text) @@ -73,7 +73,7 @@ CONSOLE_BG = "#F5F5DC" # Cream/Light background similar to our images CONSOLE_FG = "#1d1d1f" # Dark text CONSOLE_INSERT = "#1d1d1f" CONSOLE_FONT = ("Menlo", 10) -NAMESPACE_PREFIX = "prole-" +NAMESPACE_PREFIX = "knoe-" POSTGRES_DB_NAME_MAX_LEN = 63 DEFAULT_OLLAMA_PORT = "11434" @@ -91,13 +91,13 @@ DEFAULT_ACTION_FLAGS = { "build.run_build": False, } -# Secret handling (temporary encrypted values in prole.cfg) -PROLE_SECRET_PREFIX = "${PROLE_SECRET:" -PROLE_SECRET_SUFFIX = "}" +# Secret handling (temporary encrypted values in knoe.cfg) +KNOE_SECRET_PREFIX = "${KNOE_SECRET:" +KNOE_SECRET_SUFFIX = "}" OPENBAO_PREFIX = "${OPENBAO:" OPENBAO_SUFFIX = "}" -PROLE_SECRET_VERSION = "v1" -PROLE_SECRET_SERVICE = "prole-installer" +KNOE_SECRET_VERSION = "v1" +KNOE_SECRET_SERVICE = "knoe-installer" # Map config keys to OpenBao paths (namespace injected at runtime) SECRET_KEY_SPECS = { @@ -110,11 +110,11 @@ SECRET_KEY_SPECS = { } -def _is_prole_secret(value: str | None) -> bool: +def _is_knoe_secret(value: str | None) -> bool: return ( bool(value) - and value.startswith(PROLE_SECRET_PREFIX) - and value.endswith(PROLE_SECRET_SUFFIX) + and value.startswith(KNOE_SECRET_PREFIX) + and value.endswith(KNOE_SECRET_SUFFIX) ) @@ -129,16 +129,16 @@ def _is_openbao_ref(value: str | None) -> bool: def _encrypt_cfg_secret(plaintext: str | None) -> str: if not plaintext: return "" - if _is_prole_secret(plaintext) or _is_openbao_ref(plaintext): + if _is_knoe_secret(plaintext) or _is_openbao_ref(plaintext): return plaintext try: - return _encrypt_prole_secret(plaintext) + return _encrypt_knoe_secret(plaintext) except Exception: return str(plaintext) def _get_secret_key_file() -> Path: - return resolve_prole_home() / "secrets" / "knoe.key" + return resolve_knoe_home() / "secrets" / "knoe.key" def _get_keychain_key(service: str, account: str) -> bytes: @@ -194,16 +194,16 @@ def _get_file_key(path: Path) -> bytes: def _get_secret_key() -> bytes: system = platform.system() - account = getpass.getuser() or "prole" + account = getpass.getuser() or "knoe" if system == "Darwin": - return _get_keychain_key(PROLE_SECRET_SERVICE, account) + return _get_keychain_key(KNOE_SECRET_SERVICE, account) return _get_file_key(_get_secret_key_file()) -def _encrypt_prole_secret(plaintext: str) -> str: +def _encrypt_knoe_secret(plaintext: str) -> str: if plaintext is None: return "" - if _is_prole_secret(plaintext): + if _is_knoe_secret(plaintext): return plaintext key = _get_secret_key() aesgcm = AESGCM(key) @@ -211,15 +211,15 @@ def _encrypt_prole_secret(plaintext: str) -> str: ciphertext = aesgcm.encrypt(nonce, plaintext.encode("utf-8"), None) nonce_b64 = base64.urlsafe_b64encode(nonce).decode("utf-8") ct_b64 = base64.urlsafe_b64encode(ciphertext).decode("utf-8") - return f"{PROLE_SECRET_PREFIX}{PROLE_SECRET_VERSION}:{nonce_b64}:{ct_b64}{PROLE_SECRET_SUFFIX}" + return f"{KNOE_SECRET_PREFIX}{KNOE_SECRET_VERSION}:{nonce_b64}:{ct_b64}{KNOE_SECRET_SUFFIX}" -def _decrypt_prole_secret(value: str) -> str: - if not _is_prole_secret(value): +def _decrypt_knoe_secret(value: str) -> str: + if not _is_knoe_secret(value): return value - inner = value[len(PROLE_SECRET_PREFIX) : -len(PROLE_SECRET_SUFFIX)] + inner = value[len(KNOE_SECRET_PREFIX) : -len(KNOE_SECRET_SUFFIX)] parts = inner.split(":") - if len(parts) != 3 or parts[0] != PROLE_SECRET_VERSION: + if len(parts) != 3 or parts[0] != KNOE_SECRET_VERSION: return value try: nonce = base64.urlsafe_b64decode(parts[1].encode("utf-8")) @@ -237,38 +237,38 @@ def _normalize_k3s_token(value: str | None) -> str: return "" if _is_openbao_ref(token): return "" - if _is_prole_secret(token): + if _is_knoe_secret(token): try: - token = _decrypt_prole_secret(token) + token = _decrypt_knoe_secret(token) except Exception: return "" - if _is_prole_secret(token): + if _is_knoe_secret(token): return "" return token def _read_k3s_cfg(cfg_path: "Path | str | None" = None) -> tuple[str, str, str]: - """Return (cluster_env, server_url, token) from prole.cfg. + """Return (cluster_env, server_url, token) from knoe.cfg. Searches Global, Initialize Cluster, and Service Cluster (k3s) sections in the same priority order used by both the Tk UI and the silent installer so that all presentation layers agree. This is a module-level function so it can be called without needing a - ``ProleInstallerBase`` instance (e.g. from the ncurses UI). + ``KnoeInstallerBase`` instance (e.g. from the ncurses UI). """ if cfg_path is None: - conf_dir = prole_conf.resolve_prole_conf_dir(PROJECT_ROOT) + conf_dir = knoe_conf.resolve_knoe_conf_dir(PROJECT_ROOT) try: - cfg_path = prole_conf.ensure_entrypoint(conf_dir) + cfg_path = knoe_conf.ensure_entrypoint(conf_dir) except Exception: - cfg_path = prole_conf.entrypoint_path(conf_dir) + cfg_path = knoe_conf.entrypoint_path(conf_dir) cfg_path = Path(cfg_path) if not cfg_path.exists(): return "", "", "" try: - cfg = prole_conf.load_layered_config(cfg_path) + cfg = knoe_conf.load_layered_config(cfg_path) except Exception: return "", "", "" cfg_vars = _collect_cfg_vars(cfg) @@ -321,7 +321,7 @@ def _resolve_k3s_connection( Priority order (first non-empty wins for each field): 1. Environment variables (PROLE_K3S_SERVER / PROLE_K3S_TOKEN) - 2. prole.cfg values + 2. knoe.cfg values 3. Ansible topology auto-detection Returns ``(server_url, token)`` with the server URL normalised to @@ -338,7 +338,7 @@ def _resolve_k3s_connection( ).strip() token = _normalize_k3s_token(token) - # prole.cfg fallback + # knoe.cfg fallback _cfg_env, cfg_server, cfg_token = _read_k3s_cfg(cfg_path) if not server and cfg_server: server = cfg_server @@ -483,23 +483,23 @@ def _find_kubeconfig_file(env: dict | None = None) -> str: # Prefer standard system kubeconfig as the primary source of truth candidates.append(str(Path.home() / ".kube" / "config")) - prole_service = (env.get("PROLE_SERVICE") or "").strip() - if prole_service: - candidates.append(str(Path(prole_service) / "secrets" / "k3s.kubeconfig")) + knoe_service = (env.get("KNOE_SERVICE") or "").strip() + if knoe_service: + candidates.append(str(Path(knoe_service) / "secrets" / "k3s.kubeconfig")) for key in ("PROLE_K3S_KUBECONFIG", "PROLE_KUBECONFIG"): val = (env.get(key) or "").strip() if val: candidates.append(val) - prole_home = (env.get("PROLE_HOME") or "").strip() - if prole_home: - candidates.append(str(Path(prole_home) / "prole-k3s.kubeconfig")) - candidates.append(str(Path(prole_home) / "secrets" / "k3s.kubeconfig")) + knoe_home = (env.get("KNOE_HOME") or "").strip() + if knoe_home: + candidates.append(str(Path(knoe_home) / "knoe-k3s.kubeconfig")) + candidates.append(str(Path(knoe_home) / "secrets" / "k3s.kubeconfig")) # Other fallback locations - candidates.append(str(resolve_prole_home(env) / "secrets" / "k3s.kubeconfig")) - candidates.append(str(PROJECT_ROOT / "prole-k3s.kubeconfig")) + candidates.append(str(resolve_knoe_home(env) / "secrets" / "k3s.kubeconfig")) + candidates.append(str(PROJECT_ROOT / "knoe-k3s.kubeconfig")) candidates.append(str(PROJECT_ROOT / "etc" / "secrets" / "k3s.kubeconfig")) - candidates.append("/etc/rancher/k3s/prole-kubeconfig.yaml") + candidates.append("/etc/rancher/k3s/knoe-kubeconfig.yaml") candidates.append("/etc/rancher/k3s/k3s.yaml") for path in candidates: try: @@ -510,8 +510,8 @@ def _find_kubeconfig_file(env: dict | None = None) -> str: return "" -def _k3d_prole_data_volume_args(prole_data: str | None) -> list[str]: - path = (prole_data or "").strip() +def _k3d_knoe_data_volume_args(knoe_data: str | None) -> list[str]: + path = (knoe_data or "").strip() if not path: return [] try: @@ -579,7 +579,7 @@ def _ensure_ansible_vault_credentials(prompt_ui: bool = False, root=None) -> Non def _openbao_placeholder(namespace: str, leaf: str, key: str | None = None) -> str: ns = (namespace or "").strip() or "default" - path = f"kv/prole/{ns}/{leaf}" + path = f"kv/knoe/{ns}/{leaf}" if key: return f"{OPENBAO_PREFIX}{path}#{key}{OPENBAO_SUFFIX}" return f"{OPENBAO_PREFIX}{path}{OPENBAO_SUFFIX}" @@ -612,7 +612,7 @@ def _local_registry_enabled(mode_hint: str | None = None) -> bool: mode = _deployment_mode_from_env(mode_hint) else: mode_hint = ( - os.environ.get("PROLE_MODE") + os.environ.get("KNOE_MODE") or os.environ.get("DEPLOYMENT_MODE") or os.environ.get("CLUSTER_ENV") or "" @@ -624,7 +624,7 @@ def _local_registry_enabled(mode_hint: str | None = None) -> bool: def _expand_path(val: str | None) -> str: if val is None: return "" - # Expand $VAR/${VAR} (including nested refs like PROLE_HOME="$HOME/..."), + # Expand $VAR/${VAR} (including nested refs like KNOE_HOME="$HOME/..."), # then expand ~. expanded = _expand_cfg_value(str(val), env=os.environ, max_depth=10) return os.path.expanduser(expanded) @@ -656,7 +656,7 @@ def _expand_cfg_value( if val is None: return "" raw = str(val) - if _is_openbao_ref(raw) or _is_prole_secret(raw): + if _is_openbao_ref(raw) or _is_knoe_secret(raw): return raw cfg_vars = cfg_vars or {} env = env or os.environ @@ -699,14 +699,14 @@ def _resolve_supabase_home(project_root: Path) -> Path | None: pass candidates = [ - Path.home() / "prole" / "supabase", + Path.home() / "knoe" / "supabase", Path.home() / "dev" / "supabase", project_root / "supabase", ] - prole_home = (os.environ.get("PROLE_HOME") or "").strip() - if prole_home: + knoe_home = (os.environ.get("KNOE_HOME") or "").strip() + if knoe_home: try: - candidates.append(Path(_expand_path(prole_home)).parent / "supabase") + candidates.append(Path(_expand_path(knoe_home)).parent / "supabase") except Exception: pass @@ -793,9 +793,9 @@ def _parse_internal_a_records(path: Path) -> tuple[str, dict, dict]: for raw in lines: if not in_block: s = raw.strip() - if s.startswith("prole_domain:"): + if s.startswith("knoe_domain:"): domain = _clean_yaml_value(s.split(":", 1)[1]) - if s.startswith("prole_internal_a_records:"): + if s.startswith("knoe_internal_a_records:"): in_block = True continue if raw and not raw.startswith((" ", "\t")): @@ -857,7 +857,7 @@ def _detect_ansible_storage_mounts(inventory_path: Path) -> dict[str, dict[str, Returns a mapping like: { - "d001": {"host": "myrddin.prole.org", "path": "/synology/d001"}, + "d001": {"host": "myrddin.knoe.org", "path": "/synology/d001"}, ... } @@ -994,18 +994,18 @@ def _normalize_cluster_env(env: str | None) -> str: if ( s in ("dev", "k3d", "k3d-dev", "k3d-knoe-dev-cluster", "knoe-dev-cluster") or s.startswith("k3d-") - or s.startswith("prole-dev-") + or s.startswith("knoe-dev-") ): return "dev" - if s in ("service", "k3s", "k3s-service", "prole-service-cluster") or s.startswith( - "prole-service-" + if s in ("service", "k3s", "k3s-service", "knoe-service-cluster") or s.startswith( + "knoe-service-" ): return "service" - if s in ("prod", "production", "k8s", "prole-prod-cluster") or s.startswith( - "prole-prod-" + if s in ("prod", "production", "k8s", "knoe-prod-cluster") or s.startswith( + "knoe-prod-" ): return "prod" - if s in ("min", "minimal", "containerd", "prole-min-standalone"): + if s in ("min", "minimal", "containerd", "knoe-min-standalone"): return "min" return s @@ -1024,13 +1024,13 @@ def _cluster_env_radio_value(env: str | None) -> str: def _deployment_target_label(env: str | None) -> str: key = _normalize_cluster_env(env) if key == "dev": - return "prole-dev-cluster" + return "knoe-dev-cluster" if key == "service": - return "prole-service-cluster" + return "knoe-service-cluster" if key == "prod": - return "prole-prod-cluster" + return "knoe-prod-cluster" if key == "min": - return "prole-min-standalone" + return "knoe-min-standalone" return env or "" @@ -1247,10 +1247,10 @@ def _detect_ansible_k3s_settings( def _detect_ansible_topology(project_root: Path) -> dict: - prole_home = (os.environ.get("PROLE_HOME") or "").strip() + knoe_home = (os.environ.get("KNOE_HOME") or "").strip() base_candidates = [] - if prole_home: - base_candidates.append(Path(_expand_path(prole_home))) + if knoe_home: + base_candidates.append(Path(_expand_path(knoe_home))) base_candidates.append(project_root) infra_path = None for base in base_candidates: @@ -1271,7 +1271,7 @@ def _detect_ansible_topology(project_root: Path) -> dict: inventory_path / "group_vars" / "all" / "vars.yml", { "ad_dc_ip", - "prole_domain", + "knoe_domain", "kerberos_realm", "krb5_realm", "kerberos_kdc", @@ -1279,7 +1279,7 @@ def _detect_ansible_topology(project_root: Path) -> dict: "kerberos_kdc_ip", }, ) - domain = vars_vals.get("prole_domain", "") + domain = vars_vals.get("knoe_domain", "") ad_dc_ip = vars_vals.get("ad_dc_ip", "") explicit_realm = ( vars_vals.get("kerberos_realm") or vars_vals.get("krb5_realm") or "" @@ -1425,7 +1425,7 @@ def _default_opentofu_pipeline_url() -> str: os.environ.get("PROLE_OPENTOFU_URL") or os.environ.get("OPENTOFU_URL") or "" ).strip() mode = ( - os.environ.get("PROLE_MODE") + os.environ.get("KNOE_MODE") or os.environ.get("DEPLOYMENT_MODE") or os.environ.get("DEPLOY_MODE") or "" @@ -1490,8 +1490,8 @@ def _push_docker_image(image_tag: str, log_fn=None) -> bool: ).strip() # Convenience auto-detection (matches how Ansible ships certs from this repo). - # If a registry host is `myrddin.prole.org:5000`, look for - # `ssl/prole/myrddin-registry.crt` when no env override is provided. + # If a registry host is `myrddin.knoe.org:5000`, look for + # `ssl/knoe/myrddin-registry.crt` when no env override is provided. if not cert_dir and not cert_file: try: ref = (image_tag or "").strip() @@ -1500,8 +1500,8 @@ def _push_docker_image(image_tag: str, log_fn=None) -> bool: host_only = registry.split(":", 1)[0] short = host_only.split(".", 1)[0] candidates = [ - PROJECT_ROOT / "ssl" / "prole" / f"{short}-registry.crt", - PROJECT_ROOT / "ssl" / "prole" / f"{host_only}-registry.crt", + PROJECT_ROOT / "ssl" / "knoe" / f"{short}-registry.crt", + PROJECT_ROOT / "ssl" / "knoe" / f"{host_only}-registry.crt", ] for c in candidates: if c.is_file(): @@ -1540,7 +1540,7 @@ def _push_docker_image(image_tag: str, log_fn=None) -> bool: p = Path(cert_file).expanduser() if p.is_file(): _log("Retrying with skopeo (TLS verify, custom CA cert) ...\n") - with tempfile.TemporaryDirectory(prefix="prole-registry-cert-") as td: + with tempfile.TemporaryDirectory(prefix="knoe-registry-cert-") as td: ca_dest = Path(td) / "ca.crt" shutil.copyfile(str(p), str(ca_dest)) cmd = [ @@ -1690,13 +1690,13 @@ def _registry_image_ref_exists(image_tag: str, timeout: float = 3.0) -> bool: def _default_k3s_kubeconfig_path() -> Path: - prole_service = (os.environ.get("PROLE_SERVICE") or "").strip() - if prole_service: - return Path(prole_service).expanduser() / "secrets" / "k3s.kubeconfig" - prole_home = (os.environ.get("PROLE_HOME") or "").strip() - if prole_home: - return Path(prole_home).expanduser() / "prole-k3s.kubeconfig" - return PROJECT_ROOT / "prole-k3s.kubeconfig" + knoe_service = (os.environ.get("KNOE_SERVICE") or "").strip() + if knoe_service: + return Path(knoe_service).expanduser() / "secrets" / "k3s.kubeconfig" + knoe_home = (os.environ.get("KNOE_HOME") or "").strip() + if knoe_home: + return Path(knoe_home).expanduser() / "knoe-k3s.kubeconfig" + return PROJECT_ROOT / "knoe-k3s.kubeconfig" def _write_k3s_kubeconfig(server_url: str, token: str) -> Path: @@ -1713,15 +1713,15 @@ def _write_k3s_kubeconfig(server_url: str, token: str) -> Path: "- cluster:\n" f" server: {server_url}\n" " insecure-skip-tls-verify: true\n" - " name: prole-k3s\n" + " name: knoe-k3s\n" "contexts:\n" "- context:\n" - " cluster: prole-k3s\n" - " user: prole-k3s\n" - " name: prole-k3s\n" - "current-context: prole-k3s\n" + " cluster: knoe-k3s\n" + " user: knoe-k3s\n" + " name: knoe-k3s\n" + "current-context: knoe-k3s\n" "users:\n" - "- name: prole-k3s\n" + "- name: knoe-k3s\n" " user:\n" f" token: {token}\n" ) @@ -1754,7 +1754,7 @@ def _sync_opentofu_pipeline( # --- Stage 1: Copy k8s manifests --- sources = ( - project_root / "k8s" / "prole", + project_root / "k8s" / "knoe", project_root / "k8s" / "openbao", project_root / "k8s" / "opentofu", ) @@ -1820,11 +1820,11 @@ def _sync_opentofu_pipeline( except Exception: pass if not repo_url: - repo_url = "https://github.com/prole-dev/prole.git" + repo_url = "https://github.com/knoe-dev/knoe.git" target_revision = (os.environ.get("PROLE_GIT_BRANCH") or "").strip() or "main" - components = ["prole", "openbao", "opentofu"] + components = ["knoe", "openbao", "opentofu"] supabase_dir = manifest_root / "supabase" if supabase_dir.exists() and list(supabase_dir.glob("*.yaml")): components.append("supabase") @@ -1836,7 +1836,7 @@ def _sync_opentofu_pipeline( "apiVersion: argoproj.io/v1alpha1\n" "kind: Application\n" "metadata:\n" - f" name: prole-{component}\n" + f" name: knoe-{component}\n" " namespace: argocd\n" "spec:\n" " project: default\n" @@ -1945,7 +1945,7 @@ def _sync_opentofu_pipeline( "\n" 'variable "namespace" {\n' " type = string\n" - ' description = "Target namespace for Prole resources"\n' + ' description = "Target namespace for Knoe resources"\n' ' default = "default"\n' "}\n" ) @@ -1958,7 +1958,7 @@ def _sync_opentofu_pipeline( prod_readme = ( "# OpenTofu Production Pipeline\n" "\n" - "This pipeline deploys Prole into a production cluster (AWS EKS / GCloud GKE).\n" + "This pipeline deploys Knoe into a production cluster (AWS EKS / GCloud GKE).\n" "\n" "## Usage\n" "1. Copy manifests from the k3s pipeline into `manifests/`.\n" @@ -1983,14 +1983,14 @@ def _sync_opentofu_pipeline( return pipeline_dir -def _render_prole_cfg( +def _render_knoe_cfg( inputs: dict, globals_to_save: dict, sections: dict, generated_at: str | None = None ) -> str: inputs = dict(inputs or {}) globals_to_save = dict(globals_to_save or {}) sections = {k: dict(v or {}) for k, v in (sections or {}).items()} - # Persist the central optional-workloads policy threshold into prole.cfg so + # Persist the central optional-workloads policy threshold into knoe.cfg so # both the Python installer and Ansible can use the same configured value. globals_to_save.setdefault( POLICY_CFG_KEY, str(OPTIONAL_WORKLOADS_MIN_READY_SCHEDULABLE_NODES) @@ -2013,9 +2013,9 @@ def _render_prole_cfg( v = str(value or "").strip().lower() if v in {"dev", "k3d"}: return "dev" - if v in {"service", "k3s", "k3s-hosts", "prole-service-cluster"}: + if v in {"service", "k3s", "k3s-hosts", "knoe-service-cluster"}: return "service" - if v in {"prod", "k8s", "prole-prod-cluster"}: + if v in {"prod", "k8s", "knoe-prod-cluster"}: return "prod" return v @@ -2032,9 +2032,9 @@ def _render_prole_cfg( remote_mode = runtime_mode in {"service", "prod"} base_home = first_non_empty( - str(globals_to_save.get("PROLE_HOME", "")).strip(), - get_section("System Environment", "PROLE_HOME"), - get_input("env_setup.PROLE_HOME"), + str(globals_to_save.get("KNOE_HOME", "")).strip(), + get_section("System Environment", "KNOE_HOME"), + get_input("env_setup.KNOE_HOME"), ) base_data = first_non_empty( str(globals_to_save.get("PROLE_DATA", "")).strip(), @@ -2047,16 +2047,16 @@ def _render_prole_cfg( get_input("env_setup.PROLE_LOGS"), ) base_conf = first_non_empty( - str(globals_to_save.get("PROLE_CONF", "")).strip(), - get_section("System Environment", "PROLE_CONF"), - get_input("env_setup.PROLE_CONF"), + str(globals_to_save.get("KNOE_CONF", "")).strip(), + get_section("System Environment", "KNOE_CONF"), + get_input("env_setup.KNOE_CONF"), ) if not base_conf and base_home: base_conf = f"{base_home}/conf" base_service = first_non_empty( - str(globals_to_save.get("PROLE_SERVICE", "")).strip(), - get_section("System Environment", "PROLE_SERVICE"), - get_input("env_setup.PROLE_SERVICE"), + str(globals_to_save.get("KNOE_SERVICE", "")).strip(), + get_section("System Environment", "KNOE_SERVICE"), + get_input("env_setup.KNOE_SERVICE"), ) if not base_service and base_home: base_service = f"{base_home}/etc" @@ -2093,7 +2093,7 @@ def _render_prole_cfg( get_section("Global", "SERVICE_HOSTNAME"), ) if not base_service_hostname and not remote_mode: - base_service_hostname = "svc.prole.org" + base_service_hostname = "svc.knoe.org" base_supabase_hostname = first_non_empty( str(globals_to_save.get("supabase_hostname", "")).strip(), @@ -2103,7 +2103,7 @@ def _render_prole_cfg( get_section("Global", "supabase_hostname"), get_section("Global", "SUPABASE_HOSTNAME"), ) - default_supabase_hostname = "db.0.knoe.dev" if runtime_mode == "prod" else "db.prole.org" + default_supabase_hostname = "db.0.knoe.dev" if runtime_mode == "prod" else "db.knoe.org" if not base_supabase_hostname: base_supabase_hostname = default_supabase_hostname @@ -2122,7 +2122,7 @@ def _render_prole_cfg( # New policy: do not emit variable placeholders for filesystem paths. # Only persist literal overrides; omit derived defaults. try: - default_home = str(Path.home() / "dev" / "prole") + default_home = str(Path.home() / "dev" / "knoe") except Exception: default_home = "" @@ -2140,19 +2140,19 @@ def _render_prole_cfg( default_home_norm = _norm_path_expr(default_home) if base_home and (not default_home_norm or base_home_norm != default_home_norm): - user_section["PROLE_HOME"] = base_home + user_section["KNOE_HOME"] = base_home if ( base_conf and base_home and _norm_path_expr(base_conf) != _norm_path_expr(base_home + "/conf") ): - user_section["PROLE_CONF"] = base_conf + user_section["KNOE_CONF"] = base_conf if ( base_service and base_home and _norm_path_expr(base_service) != _norm_path_expr(base_home + "/etc") ): - user_section["PROLE_SERVICE"] = base_service + user_section["KNOE_SERVICE"] = base_service if ( base_data and base_home @@ -2165,7 +2165,7 @@ def _render_prole_cfg( and _norm_path_expr(base_logs) != _norm_path_expr(base_home + "/logs") ): user_section["PROLE_LOGS"] = base_logs - if base_service_hostname and base_service_hostname != "svc.prole.org": + if base_service_hostname and base_service_hostname != "svc.knoe.org": user_section["SERVICE_HOSTNAME"] = base_service_hostname # Canonical public hostname for Supabase (front-door) @@ -2173,7 +2173,7 @@ def _render_prole_cfg( user_section["supabase_hostname"] = base_supabase_hostname # Derived values for repeated touch-points - # NOTE: Do not emit placeholder filesystem paths into prole.cfg. + # NOTE: Do not emit placeholder filesystem paths into knoe.cfg. if base_database_namespace: inputs["env_setup.DATABASE_NAMESPACE"] = derive_value( inputs.get("env_setup.DATABASE_NAMESPACE", ""), @@ -2261,7 +2261,7 @@ def _render_prole_cfg( sections["Port Forwards"] = pf content = [] - content.append("; Prole Master Configuration File") + content.append("; Knoe Master Configuration File") content.append( "; Generated by install.py on " + (generated_at or time.strftime("%Y-%m-%d %H:%M:%S")) diff --git a/knoe/core/milestones.py b/knoe/core/milestones.py index 3c41a6d..1e1a7ff 100644 --- a/knoe/core/milestones.py +++ b/knoe/core/milestones.py @@ -11,9 +11,9 @@ from typing import TYPE_CHECKING from knoe.milestone import Milestone from knoe import config as inst_config -from knoe import prole_conf +from knoe import knoe_conf from knoe.core.stream_exec import run_streaming_cmd -from knoe.core.env import resolve_prole_home +from knoe.core.env import resolve_knoe_home from knoe.core.policy import ( POLICY_CFG_KEY, OPTIONAL_WORKLOADS_MIN_READY_SCHEDULABLE_NODES, @@ -529,8 +529,8 @@ class NetworkScanMilestone(Milestone): self.logger.error(f"Scan binary not found at {scan_binary}") return - prole_home = resolve_prole_home(env={}) - scan_dir = prole_home / "scan" + knoe_home = resolve_knoe_home(env={}) + scan_dir = knoe_home / "scan" scan_dir.mkdir(parents=True, exist_ok=True) kdc_found = None @@ -598,11 +598,11 @@ class EnvSetupMilestone(Milestone): progress("Setting up environment...", 0.5) env_keys = [ - "PROLE_HOME", - "PROLE_CONF", + "KNOE_HOME", + "KNOE_CONF", "PROLE_DATA", "PROLE_LOGS", - "PROLE_SERVICE", + "KNOE_SERVICE", "NAMESPACE", ] if "System Environment" not in state.config_data: @@ -714,7 +714,7 @@ class DatabaseCreationMilestone(Milestone): state.inputs["init_password.db_password_confirm"] = p1 self.logger.info("Generated default database password.") - # If password is an unresolvable OpenBao or PROLE_SECRET reference + # If password is an unresolvable OpenBao or KNOE_SECRET reference # (e.g. clean install where OpenBao hasn't been seeded yet), # generate a fresh password so downstream scripts get a real value. # OpenBao isn't running yet at this milestone stage, so if the ref @@ -736,10 +736,10 @@ class DatabaseCreationMilestone(Milestone): state.inputs["init_password.db_password"] = p1 state.inputs["init_password.db_password_confirm"] = p1 - if p1 and not p1.startswith("${") and not inst_config._is_prole_secret(p1): + if p1 and not p1.startswith("${") and not inst_config._is_knoe_secret(p1): if "Inputs" not in state.config_data: state.config_data["Inputs"] = {} - # Encrypt and save to config data for persistence in prole.cfg + # Encrypt and save to config data for persistence in knoe.cfg encrypted_pw = inst_config._encrypt_cfg_secret(p1) state.config_data["Inputs"]["init_password.db_password"] = encrypted_pw state.config_data["Inputs"][ @@ -773,7 +773,7 @@ class DatabaseCreationMilestone(Milestone): # SSH key generation (simplified for now) if self._parse_bool(state.inputs.get("init_password.generate_ssh_key", "True")): - key_path = Path.home() / ".ssh" / "id_prole_ed25519" + key_path = Path.home() / ".ssh" / "id_knoe_ed25519" if not key_path.exists(): self._run_cmd( [ @@ -836,7 +836,7 @@ class DockerBuildMilestone(Milestone): registry = (state.config_data.get("Global", {}) or {}).get("KNOE_IMAGE_REGISTRY", "").strip() if not registry or registry == "localhost:5000": - server = state.inputs.get("init_cluster.k3s_server_url", "myrddin.prole.org") + server = state.inputs.get("init_cluster.k3s_server_url", "myrddin.knoe.org") if "://" in server: server = server.split("://")[1] if ":" in server: @@ -935,13 +935,13 @@ class ClusterLifecycleMilestone(Milestone): ) res_stdout = res.stdout or "" if cluster_name not in res_stdout: - from knoe.core.env import _k3d_prole_data_volume_args + from knoe.core.env import _k3d_knoe_data_volume_args - prole_data = state.inputs.get( + knoe_data = state.inputs.get( "env_setup.PROLE_DATA", str(inst_config.PROJECT_ROOT / "knoe-db" / "data"), ) - volume_args = _k3d_prole_data_volume_args(prole_data) + volume_args = _k3d_knoe_data_volume_args(knoe_data) cmd = ( ["k3d", "cluster", "create", cluster_name, "-a", "2"] + volume_args @@ -981,7 +981,7 @@ class ClusterLifecycleMilestone(Milestone): elif registry.endswith(".localhost"): registry = registry.replace(".localhost", "") if not registry: - registry = "k3d-prole-registry:5000" + registry = "k3d-knoe-registry:5000" remote_tag = f"{registry}/knoe-db:{tag}" subprocess.run( ["docker", "tag", local_image, remote_tag], capture_output=True @@ -1021,7 +1021,7 @@ class ClusterLifecycleMilestone(Milestone): namespace=env.get("SERVICE_NAMESPACE", env.get("NAMESPACE", "default")), env=env_init, project_root=getattr(state.controller, "project_root", "."), - mode=env.get("PROLE_MODE"), + mode=env.get("KNOE_MODE"), log=lambda msg: _stream_line(msg if msg.endswith("\n") else msg + "\n"), ) except Exception as e: @@ -1035,7 +1035,7 @@ class ClusterLifecycleMilestone(Milestone): namespace=env.get("SERVICE_NAMESPACE", env.get("NAMESPACE", "default")), env=env, project_root=getattr(state.controller, "project_root", "."), - mode=env.get("PROLE_MODE"), + mode=env.get("KNOE_MODE"), log=lambda msg: _stream_line(msg if msg.endswith("\n") else msg + "\n"), ) except Exception as e: @@ -1046,17 +1046,17 @@ class ClusterLifecycleMilestone(Milestone): # completed automatically — mirroring the UI shortcut behaviour. if env_key in ("service", "k3s"): service_ns = env.get("SERVICE_NAMESPACE", env.get("NAMESPACE", "default")) - mode = str(env.get("PROLE_MODE", "")).strip().lower() + mode = str(env.get("KNOE_MODE", "")).strip().lower() status_checks = [ registry_ops.status( namespace=env.get("REGISTRY_NAMESPACE", service_ns), env=env, - mode=env.get("PROLE_MODE"), + mode=env.get("KNOE_MODE"), ), openbao_ops.status( namespace=service_ns, env=env, - mode=env.get("PROLE_MODE"), + mode=env.get("KNOE_MODE"), ), garage_store_ops.status(namespace=service_ns, env=env), ] @@ -1092,7 +1092,7 @@ class InitializationScriptsMilestone(Milestone): self.logger = logging.getLogger("InitializationScriptsMilestone") def _regenerate_port_mapping_cfg(self, state: InstallerState, mode: str) -> None: - """Regenerate conf/port-mapping.cfg from [Port Forwards] in prole.cfg data.""" + """Regenerate conf/port-mapping.cfg from [Port Forwards] in knoe.cfg data.""" conf_dir = inst_config.PROJECT_ROOT / "conf" mapping_path = conf_dir / "port-mapping.cfg" pf_section = state.config_data.get("Port Forwards", {}) or {} @@ -1112,7 +1112,7 @@ class InitializationScriptsMilestone(Milestone): ns = "default" lines = [ - "# Port mappings for Prole Tools (generated).", + "# Port mappings for Knoe Tools (generated).", "# Format: key: local=... remote=... ns=... svc=... address=...", "", ] @@ -1153,7 +1153,7 @@ class InitializationScriptsMilestone(Milestone): self, state: InstallerState, progress: ProgressCallback | None = None ) -> None: env = self._get_script_env(state) - mode = env.get("PROLE_MODE", "") + mode = env.get("KNOE_MODE", "") manage_opentofu = str(mode).strip().lower() != "k8s" mode_args = ["--mode", mode] if mode else [] @@ -1167,7 +1167,7 @@ class InitializationScriptsMilestone(Milestone): ) self.logger.info(f"[POLICY] {opt_reason}") - # Regenerate port-mapping.cfg from prole.cfg data to ensure it's clean + # Regenerate port-mapping.cfg from knoe.cfg data to ensure it's clean self._regenerate_port_mapping_cfg(state, mode or "k3d") # Phase 1: common services (Python owners) @@ -1176,7 +1176,7 @@ class InitializationScriptsMilestone(Milestone): service_ns = env.get("SERVICE_NAMESPACE", env.get("NAMESPACE", "default")) registry_ns = env.get("REGISTRY_NAMESPACE", service_ns) project_root = getattr(state.controller, "project_root", ".") - mode = env.get("PROLE_MODE", "") + mode = env.get("KNOE_MODE", "") # In k8s mode the default KUBECONTEXT is the app cluster; # if a DB cluster context is provided, some services (like Garage) @@ -1242,7 +1242,7 @@ class InitializationScriptsMilestone(Milestone): env["GARAGE_PRIVATE_S3_ENDPOINT"] = endpoint env["GARAGE_S3_ENDPOINT"] = endpoint - # Persist to disk (prole.cfg / gke.cfg) so reruns see it immediately + # Persist to disk (knoe.cfg / gke.cfg) so reruns see it immediately if hasattr(state.controller, "write_config"): self.logger.info("[GARAGE] Persisting resolved endpoint to config file...") state.controller.write_config() @@ -1477,7 +1477,7 @@ class DeploymentMilestone(Milestone): progress("Deploying Knoe.dev ...", 0.3) env = self._get_script_env(state) - mode = env.get("PROLE_MODE", "") + mode = env.get("KNOE_MODE", "") ns = env.get("DATABASE_NAMESPACE") or env.get("NAMESPACE", "default") cluster_name = env.get("CLUSTER_NAME") or env.get("CNPG_CLUSTER_NAME") or "knoe-db" project_root = getattr(state.controller, "project_root", ".") @@ -1530,7 +1530,7 @@ class DeploymentMilestone(Milestone): class SecurityMilestone(Milestone): """Enforce uniform master password across all services via update.sh. - Runs update.sh (reads vault_prole_db_master_password from the Ansible vault) + Runs update.sh (reads vault_knoe_db_master_password from the Ansible vault) and applies the password to k8s secrets, PostgreSQL, and Grafana. Only active in k8s mode — silently skipped for k3s/k3d. """ @@ -1543,7 +1543,7 @@ class SecurityMilestone(Milestone): self, state: InstallerState, progress: ProgressCallback | None = None ) -> None: env = self._get_script_env(state) - mode = env.get("PROLE_MODE", "") + mode = env.get("KNOE_MODE", "") if mode != "k8s": self.logger.info( @@ -1622,7 +1622,7 @@ class GitOpsMilestone(Milestone): progress(f"Deploying {label}...", 0.4) env = self._get_script_env(state) - mode = env.get("PROLE_MODE", "") + mode = env.get("KNOE_MODE", "") def _first_non_empty(*values: object) -> str: for value in values: @@ -1801,8 +1801,8 @@ class GitOpsMilestone(Milestone): args.extend(["--mode", mode]) args.extend(["--namespace", ns]) - conf_dir = prole_conf.resolve_prole_conf_dir(state.controller.project_root) - cfg_path = prole_conf.entrypoint_path(conf_dir) + conf_dir = knoe_conf.resolve_knoe_conf_dir(state.controller.project_root) + cfg_path = knoe_conf.entrypoint_path(conf_dir) if cfg_path.exists(): args.extend(["-c", str(cfg_path)]) @@ -1852,7 +1852,7 @@ class KerberosMilestone(Milestone): return env = self._get_script_env(state) - mode = env.get("PROLE_MODE", "") + mode = env.get("KNOE_MODE", "") if mode == "min": # For minimal mode, we use init_min.sh to bootstrap or just proceed pass @@ -1946,8 +1946,8 @@ class SupabaseImagePreloadMilestone(Milestone): return args = ["--mode", deploy_mode, "--prefetch-images-only"] - conf_dir = prole_conf.resolve_prole_conf_dir(state.controller.project_root) - cfg_path = prole_conf.entrypoint_path(conf_dir) + conf_dir = knoe_conf.resolve_knoe_conf_dir(state.controller.project_root) + cfg_path = knoe_conf.entrypoint_path(conf_dir) if cfg_path.exists(): args.extend(["-c", str(cfg_path)]) if _parse_bool(os.environ.get("SUPABASE_USE_DEV_COMPOSE"), False): @@ -2019,8 +2019,8 @@ class SupabaseMilestone(Milestone): deploy_mode = _resolve_supabase_deploy_mode(state) args = ["--mode", deploy_mode] - conf_dir = prole_conf.resolve_prole_conf_dir(state.controller.project_root) - cfg_path = prole_conf.entrypoint_path(conf_dir) + conf_dir = knoe_conf.resolve_knoe_conf_dir(state.controller.project_root) + cfg_path = knoe_conf.entrypoint_path(conf_dir) if cfg_path.exists(): args.extend(["-c", str(cfg_path)]) if _parse_bool(os.environ.get("SUPABASE_USE_DEV_COMPOSE"), False): diff --git a/knoe/core/monitor.py b/knoe/core/monitor.py index ca5ac0f..8de4cb0 100644 --- a/knoe/core/monitor.py +++ b/knoe/core/monitor.py @@ -9,7 +9,7 @@ import sys import time from pathlib import Path -from knoe import prole_conf +from knoe import knoe_conf from knoe.config import _expand_path, _collect_cfg_vars, _expand_cfg_value from knoe.core.env import ( _build_required_port_forwards, @@ -47,7 +47,7 @@ def _parse_pf_cfg(path: Path) -> list[dict]: def write_port_forwards_cfg(path: Path, mappings: list[str]) -> None: """Write a port-forwards.cfg from internal mapping strings.""" lines = [ - "# Port forward configuration for Prole services (generated).", + "# Port forward configuration for Knoe services (generated).", "# Format: id: local= remote= ns= svc= address=", "", ] @@ -147,18 +147,18 @@ def run_monitor( """Main entry point for the 'monitor' subcommand.""" project_root = controller.project_root - # Resolve prole.cfg for context + # Resolve knoe.cfg for context if cfg_path: - prole_cfg = Path(_expand_path(cfg_path)) + knoe_cfg = Path(_expand_path(cfg_path)) else: - conf_dir = prole_conf.resolve_prole_conf_dir(project_root) + conf_dir = knoe_conf.resolve_knoe_conf_dir(project_root) try: - prole_cfg = prole_conf.ensure_entrypoint(conf_dir) + knoe_cfg = knoe_conf.ensure_entrypoint(conf_dir) except Exception: - prole_cfg = prole_conf.entrypoint_path(conf_dir) + knoe_cfg = knoe_conf.entrypoint_path(conf_dir) - # Read prole.cfg (layered) to extract deployment parameters - cfg = prole_conf.load_layered_config(prole_cfg) + # Read knoe.cfg (layered) to extract deployment parameters + cfg = knoe_conf.load_layered_config(knoe_cfg) # Build vars: start with User section (concrete values), then overlay Global/System cfg_vars: dict[str, str] = {} if cfg.has_section("User"): diff --git a/knoe/core/ollama_scan.py b/knoe/core/ollama_scan.py index 1d9d487..c4d0b8d 100644 --- a/knoe/core/ollama_scan.py +++ b/knoe/core/ollama_scan.py @@ -123,8 +123,8 @@ def run_ollama_scan( return 127, [], notice env = os.environ.copy() - env["PROLE_HOME"] = str(project_root) - env["PROLE_SERVICE"] = str(project_root) + env["KNOE_HOME"] = str(project_root) + env["KNOE_SERVICE"] = str(project_root) proc = subprocess.Popen( ["bash", str(script_path), "scan"], diff --git a/knoe/core/ops/_services_common.py b/knoe/core/ops/_services_common.py index 3e739dc..b314560 100644 --- a/knoe/core/ops/_services_common.py +++ b/knoe/core/ops/_services_common.py @@ -103,7 +103,7 @@ def _detect_mode(mode: str | None, env: dict | None) -> str: if mode: return str(mode).strip() if env: - for key in ("PROLE_MODE", "DEPLOYMENT_MODE"): + for key in ("KNOE_MODE", "DEPLOYMENT_MODE"): value = str(env.get(key) or "").strip() if value: return value diff --git a/knoe/core/ops/cloudnative_pg.py b/knoe/core/ops/cloudnative_pg.py index 7acd3a0..658ef6e 100644 --- a/knoe/core/ops/cloudnative_pg.py +++ b/knoe/core/ops/cloudnative_pg.py @@ -182,11 +182,11 @@ def _reconcile_unbound_synology_data_wal_pvs( _kubectl(["delete", "pv", name, "--ignore-not-found"], env=env, timeout=45) root = Path( - (env or {}).get("PROLE_HOME") - or (env or {}).get("PROLE_SERVICE") + (env or {}).get("KNOE_HOME") + or (env or {}).get("KNOE_SERVICE") or Path(__file__).resolve().parents[4] ) - manifest = root / "k8s" / "prole" / "iscsi-pvs.yaml" + manifest = root / "k8s" / "knoe" / "iscsi-pvs.yaml" if not manifest.exists(): _log(log, f"WARN: Synology PV manifest not found: {manifest}") return @@ -224,26 +224,26 @@ def _resolve_cnpg_manifest(project_root: str | Path, env: dict | None) -> Path: if p.exists(): return p root = Path(project_root) - mode = str((env or {}).get("PROLE_MODE") or "").strip() + mode = str((env or {}).get("KNOE_MODE") or "").strip() candidates: list[Path] = [] if mode == "k8s": # GKE/prod: use the GCP-specific manifest (premium-rwo storage, no Synology selectors) candidates.append(root / "deploy" / "gcp" / "gke" / "knoe-db.yaml") candidates += [ - root / "deploy" / "opentofu" / "k3s" / "manifests" / "prole" / "knoe-db.yaml", - root / "k8s" / "prole" / "knoe-db.yaml", + root / "deploy" / "opentofu" / "k3s" / "manifests" / "knoe" / "knoe-db.yaml", + root / "k8s" / "knoe" / "knoe-db.yaml", ] if env: - prole_home = (env.get("PROLE_HOME") or "").strip() - if prole_home: - ph = Path(prole_home) + knoe_home = (env.get("KNOE_HOME") or "").strip() + if knoe_home: + ph = Path(knoe_home) if mode == "k8s": candidates.insert(0, ph / "deploy" / "gcp" / "gke" / "knoe-db.yaml") - candidates.append(ph / "k8s" / "prole" / "knoe-db.yaml") + candidates.append(ph / "k8s" / "knoe" / "knoe-db.yaml") for candidate in candidates: if candidate.exists(): return candidate - return root / "k8s" / "prole" / "knoe-db.yaml" + return root / "k8s" / "knoe" / "knoe-db.yaml" def _resolve_knoe_db_image_tag(manifest: Path, env: dict | None) -> str: @@ -254,12 +254,12 @@ def _resolve_knoe_db_image_tag(manifest: Path, env: dict | None) -> str: if explicit_tag: return explicit_tag - mode_key = str((env or {}).get("PROLE_MODE") or "").strip() or "k8s" + mode_key = str((env or {}).get("KNOE_MODE") or "").strip() or "k8s" candidate_roots: list[Path] = [] - prole_home = str((env or {}).get("PROLE_HOME") or "").strip() - if prole_home: - candidate_roots.append(Path(prole_home)) + knoe_home = str((env or {}).get("KNOE_HOME") or "").strip() + if knoe_home: + candidate_roots.append(Path(knoe_home)) for parent in [manifest, *manifest.parents]: if parent in candidate_roots: @@ -404,7 +404,7 @@ def _apply_manifest( knoe_db_image_tag = _resolve_knoe_db_image_tag(manifest, env) rendered_manifest = rendered_manifest.replace("${KNOE_DB_IMAGE_TAG}", knoe_db_image_tag) - if str((env or {}).get("PROLE_MODE") or "").strip().lower() == "k3d": + if str((env or {}).get("KNOE_MODE") or "").strip().lower() == "k3d": rendered_manifest = _strip_k3d_synology_blocks(rendered_manifest) # Resolve ${KNOE_IMAGE_REGISTRY} — the in-cluster container registry hostname. @@ -418,18 +418,18 @@ def _apply_manifest( if not knoe_image_registry: knoe_image_registry = os.environ.get("KNOE_IMAGE_REGISTRY", "").strip() if not knoe_image_registry: - prole_mode = str((env or {}).get("PROLE_MODE") or "").strip().lower() - if prole_mode == "k3d": - registry_name = str((env or {}).get("K3D_REGISTRY_NAME") or "prole-registry").strip() or "prole-registry" + knoe_mode = str((env or {}).get("KNOE_MODE") or "").strip().lower() + if knoe_mode == "k3d": + registry_name = str((env or {}).get("K3D_REGISTRY_NAME") or "knoe-registry").strip() or "knoe-registry" registry_port = str((env or {}).get("REGISTRY_PORT") or "5000").strip() or "5000" registry_host = registry_name if registry_name.startswith("k3d-") else f"k3d-{registry_name}" knoe_image_registry = f"{registry_host}:{registry_port}" _log(log, f"INFO: Using k3d registry as KNOE_IMAGE_REGISTRY ({knoe_image_registry})") - elif prole_mode == "k3s": + elif knoe_mode == "k3s": # For k3s, we MUST NOT use .svc.cluster.local because nodes need to resolve it. - # Default to registry.prole.org if not explicitly set. - knoe_image_registry = "registry.prole.org" - _log(log, f"INFO: Defaulting to registry.prole.org for KNOE_IMAGE_REGISTRY in k3s mode.") + # Default to registry.knoe.org if not explicitly set. + knoe_image_registry = "registry.knoe.org" + _log(log, f"INFO: Defaulting to registry.knoe.org for KNOE_IMAGE_REGISTRY in k3s mode.") if not knoe_image_registry: # Auto-detect (non-k3s path) @@ -1195,18 +1195,18 @@ def _ensure_cert_manager_for_barman( if need_bootstrap: _log(log, "[CNPG] cert-manager resources missing; bootstrapping cert-manager...") root = Path( - (env or {}).get("PROLE_HOME") - or (env or {}).get("PROLE_SERVICE") + (env or {}).get("KNOE_HOME") + or (env or {}).get("KNOE_SERVICE") or Path(__file__).resolve().parents[4] ) init_script = root / "etc" / "init_certmgr.sh" if init_script.exists(): cmd = ["bash", str(init_script)] - mode = str((env or {}).get("PROLE_MODE") or "").strip() + mode = str((env or {}).get("KNOE_MODE") or "").strip() if mode: cmd.extend(["--mode", mode]) cfg_hint = ( - str((env or {}).get("PROLE_CONFIG_PATH") or "").strip() + str((env or {}).get("KNOE_CONFIG_PATH") or "").strip() or str((env or {}).get("PROLE_CFG_PATH") or "").strip() or str((env or {}).get("PROLE_CFG") or "").strip() ) @@ -1547,9 +1547,9 @@ def _bootstrap_db_user_secrets( _log(log, "WARN: DB_PASSWORD not resolved in env; skipping db-user secret bootstrap.") return - # CNPG requires the secret username to match the cluster owner field (owner: prole). + # CNPG requires the secret username to match the cluster owner field (owner: knoe). # KNOE_DB_USER is the admin/superuser login name, not the cluster owner. - db_owner = ((env or {}).get("CNPG_DB_OWNER") or "prole").strip() + db_owner = ((env or {}).get("CNPG_DB_OWNER") or "knoe").strip() def _apply_if_missing(secret_name: str, username: str, password: str) -> None: if _kubectl_ok(["-n", namespace, "get", "secret", secret_name], env=env): diff --git a/knoe/core/ops/k3d_garage_store.py b/knoe/core/ops/k3d_garage_store.py index 4286eed..06386f1 100644 --- a/knoe/core/ops/k3d_garage_store.py +++ b/knoe/core/ops/k3d_garage_store.py @@ -26,9 +26,9 @@ from ._services_common import ( def _manifest_files(project_root: str | Path) -> list[Path]: root = Path(project_root) return [ - _manifest_path(root, "k8s", "prole", "garage-configmap.yaml"), - _manifest_path(root, "k8s", "prole", "garage-statefulset.yaml"), - _manifest_path(root, "k8s", "prole", "garage-service.yaml"), + _manifest_path(root, "k8s", "knoe", "garage-configmap.yaml"), + _manifest_path(root, "k8s", "knoe", "garage-statefulset.yaml"), + _manifest_path(root, "k8s", "knoe", "garage-service.yaml"), ] diff --git a/knoe/core/ops/k3d_registry.py b/knoe/core/ops/k3d_registry.py index 343c9e7..f201ae9 100644 --- a/knoe/core/ops/k3d_registry.py +++ b/knoe/core/ops/k3d_registry.py @@ -16,7 +16,7 @@ from ._services_common import ( def _ensure_k3d_registry(*, env: dict | None = None, log: _LogFn | None = None) -> None: - name = str((env or {}).get("K3D_REGISTRY_NAME") or "prole-registry") + name = str((env or {}).get("K3D_REGISTRY_NAME") or "knoe-registry") port = str((env or {}).get("REGISTRY_PORT") or "5000") listed = _k3d(["registry", "list"], env=env, timeout=60) @@ -92,7 +92,7 @@ def stop( mode: str | None = None, log: _LogFn | None = None, ) -> None: - name = str((env or {}).get("K3D_REGISTRY_NAME") or "prole-registry") + name = str((env or {}).get("K3D_REGISTRY_NAME") or "knoe-registry") _log(log, f"[REGISTRY] Removing k3d registry {name}") _k3d(["registry", "delete", name], env=env, timeout=120) _docker(["rm", "-f", name], env=env, timeout=30) @@ -114,6 +114,6 @@ def status( env: dict | None = None, mode: str | None = None, ) -> bool: - name = str((env or {}).get("K3D_REGISTRY_NAME") or "prole-registry") + name = str((env or {}).get("K3D_REGISTRY_NAME") or "knoe-registry") reg = _k3d(["registry", "list"], env=env, timeout=30) return _to_bool(reg.returncode == 0 and name in reg.stdout) diff --git a/knoe/core/ops/k3s_garage_store.py b/knoe/core/ops/k3s_garage_store.py index 6ac74cc..56bbb68 100644 --- a/knoe/core/ops/k3s_garage_store.py +++ b/knoe/core/ops/k3s_garage_store.py @@ -65,11 +65,11 @@ def _repair_released_garage_pvs(*, env: dict | None = None, log: _LogFn | None = def _manifest_files(project_root: str | Path) -> list[Path]: root = Path(project_root) return [ - _manifest_path(root, "k8s", "prole", "storageclass-synology-iscsi.yaml"), - _manifest_path(root, "k8s", "prole", "iscsi-pvs.yaml"), - _manifest_path(root, "k8s", "prole", "garage-configmap.yaml"), - _manifest_path(root, "k8s", "prole", "garage-statefulset.yaml"), - _manifest_path(root, "k8s", "prole", "garage-service.yaml"), + _manifest_path(root, "k8s", "knoe", "storageclass-synology-iscsi.yaml"), + _manifest_path(root, "k8s", "knoe", "iscsi-pvs.yaml"), + _manifest_path(root, "k8s", "knoe", "garage-configmap.yaml"), + _manifest_path(root, "k8s", "knoe", "garage-statefulset.yaml"), + _manifest_path(root, "k8s", "knoe", "garage-service.yaml"), ] diff --git a/knoe/core/ops/k8s_garage_store.py b/knoe/core/ops/k8s_garage_store.py index 73072cb..8e62765 100644 --- a/knoe/core/ops/k8s_garage_store.py +++ b/knoe/core/ops/k8s_garage_store.py @@ -27,11 +27,11 @@ from ._services_common import ( def _manifest_files(project_root: str | Path) -> list[Path]: root = Path(project_root) return [ - _manifest_path(root, "k8s", "prole", "storageclass-gcp-hdd.yaml"), - _manifest_path(root, "k8s", "prole", "garage-configmap.yaml"), - _manifest_path(root, "k8s", "prole", "garage-statefulset-gcp.yaml"), - _manifest_path(root, "k8s", "prole", "garage-service.yaml"), - _manifest_path(root, "k8s", "prole", "garage-service-ilb.yaml"), + _manifest_path(root, "k8s", "knoe", "storageclass-gcp-hdd.yaml"), + _manifest_path(root, "k8s", "knoe", "garage-configmap.yaml"), + _manifest_path(root, "k8s", "knoe", "garage-statefulset-gcp.yaml"), + _manifest_path(root, "k8s", "knoe", "garage-service.yaml"), + _manifest_path(root, "k8s", "knoe", "garage-service-ilb.yaml"), ] diff --git a/knoe/core/ops/monitoring.py b/knoe/core/ops/monitoring.py index faeb967..9118699 100644 --- a/knoe/core/ops/monitoring.py +++ b/knoe/core/ops/monitoring.py @@ -220,15 +220,15 @@ def _values_yaml_k8s(grafana_password: str) -> str: def _values_yaml_k3s(grafana_password: str, env: dict | None) -> str: - """Helm values for k3s homelab (local iSCSI PVs pinned to merlin.prole.org).""" + """Helm values for k3s homelab (local iSCSI PVs pinned to merlin.knoe.org).""" data_dir = str((env or {}).get("PROLE_MONITORING_DATA_DIR") or "/synology/d004").rstrip("/") volume_id = os.path.basename(data_dir) # e.g. "d004" sc_prom = f"merlin-local-iscsi-{volume_id}-prometheus" sc_alert = f"merlin-local-iscsi-{volume_id}-alertmanager" sc_grafana = f"merlin-local-iscsi-{volume_id}-grafana" - monitoring_node = str((env or {}).get("MONITORING_PRIMARY_NODE") or "merlin.prole.org") - excluded_nodes = str((env or {}).get("MONITORING_NODE_EXPORTER_EXCLUDE_NODES") or "pi.prole.org") + monitoring_node = str((env or {}).get("MONITORING_PRIMARY_NODE") or "merlin.knoe.org") + excluded_nodes = str((env or {}).get("MONITORING_NODE_EXPORTER_EXCLUDE_NODES") or "pi.knoe.org") excluded_list = [n.strip() for n in excluded_nodes.split(",") if n.strip()] node_affinity_yaml = ( @@ -309,7 +309,7 @@ def update( ns = _monitoring_namespace(namespace, env) release = _release_name(env) chart = str((env or {}).get("MONITORING_CHART") or "prometheus-community/kube-prometheus-stack") - grafana_password = str((env or {}).get("GRAFANA_ADMIN_PASSWORD") or "prole") + grafana_password = str((env or {}).get("GRAFANA_ADMIN_PASSWORD") or "knoe") _log(log, "[MONITORING] Ensuring helm repos") _helm(["repo", "add", "prometheus-community", "https://prometheus-community.github.io/helm-charts"], env=env) diff --git a/knoe/core/ops/openbao.py b/knoe/core/ops/openbao.py index 4eb7719..91b2e85 100644 --- a/knoe/core/ops/openbao.py +++ b/knoe/core/ops/openbao.py @@ -28,8 +28,8 @@ def _manifest_files(mode: str, project_root: str | Path, include_kerberos: bool) root = Path(project_root) if mode == "k3s": files = [ - _manifest_path(root, "k8s", "prole", "openbao-service.yaml"), - _manifest_path(root, "k8s", "prole", "openbao-statefulset.yaml"), + _manifest_path(root, "k8s", "knoe", "openbao-service.yaml"), + _manifest_path(root, "k8s", "knoe", "openbao-statefulset.yaml"), ] else: files = [_manifest_path(root, "k8s", "openbao", "deployment.yaml")] diff --git a/knoe/core/ops/storage.py b/knoe/core/ops/storage.py index 44b2222..5cee4fc 100644 --- a/knoe/core/ops/storage.py +++ b/knoe/core/ops/storage.py @@ -211,9 +211,9 @@ def build_pv_labels( return { "synology.storage/role": role, "synology.storage/volume": volume, - "prole.io/namespace": namespace, - "prole.io/cluster": cluster_name, - "prole.io/service": service_name, + "knoe.io/namespace": namespace, + "knoe.io/cluster": cluster_name, + "knoe.io/service": service_name, } @@ -316,7 +316,7 @@ def _ensure_node_host_path(spec: ClusterStorageSpec, host_path: str) -> None: env = _command_env(spec) ident = f"{spec.namespace}:{spec.cluster_name}:{spec.node_name}:{host_path}" suffix = hashlib.sha1(ident.encode("utf-8")).hexdigest()[:10] - pod_name = f"prole-pathprep-{suffix}" + pod_name = f"knoe-pathprep-{suffix}" namespace = "kube-system" manifest = { diff --git a/knoe/core/prod_config.py b/knoe/core/prod_config.py index 023ebe0..b6f4e9c 100644 --- a/knoe/core/prod_config.py +++ b/knoe/core/prod_config.py @@ -64,8 +64,8 @@ class ProdAuthConfig: clientId: str = "secretref://google-oidc-client-id" clientSecret: str = "secretref://google-oidc-client-secret" bootstrapAdminEmail: str = "admin@knoey.com" - googleClientId: str = "" # transient — not persisted to prole.cfg - googleClientSecret: str = "" # transient — not persisted to prole.cfg + googleClientId: str = "" # transient — not persisted to knoe.cfg + googleClientSecret: str = "" # transient — not persisted to knoe.cfg googleHostedDomain: str = "" # blank = any Google account; set to restrict Workspace domain @@ -81,9 +81,9 @@ class ProdRoutingConfig: @dataclass(slots=True) class ProdMigrationConfig: - sourceEnvironment: str = "prole.org" + sourceEnvironment: str = "knoe.org" mode: str = "snapshot-restore" - sourceHost: str = "knoe-local-db.prole.org" + sourceHost: str = "knoe-local-db.knoe.org" sourcePort: int = 5432 sourceDatabase: str = "knoey" sourceUser: str = "replication_user" diff --git a/knoe/core/repair_pipeline_cli.py b/knoe/core/repair_pipeline_cli.py index 739463b..7ec712d 100644 --- a/knoe/core/repair_pipeline_cli.py +++ b/knoe/core/repair_pipeline_cli.py @@ -5,13 +5,13 @@ import os import sys from pathlib import Path -from knoe import prole_conf +from knoe import knoe_conf from knoe.core.controller import KnoeController from knoe.core.actions import KnoeConsoleInstaller def _project_root() -> Path: - env_home = (os.environ.get("PROLE_HOME") or "").strip() + env_home = (os.environ.get("KNOE_HOME") or "").strip() if env_home: try: return Path(env_home).expanduser().resolve() @@ -29,7 +29,7 @@ def _normalize_cfg_path(raw: str | None) -> str | None: try: p = Path(s).expanduser() if p.is_dir(): - return str((p / "prole.cfg").resolve()) + return str((p / "knoe.cfg").resolve()) return str(p.resolve()) except Exception: return s @@ -61,7 +61,7 @@ def main(argv: list[str] | None = None) -> int: "--config", dest="config", default="", - help="Path to prole.cfg (or directory containing it)", + help="Path to knoe.cfg (or directory containing it)", ) parser.add_argument("--verbose", action="store_true") args = parser.parse_args(argv) @@ -74,11 +74,11 @@ def main(argv: list[str] | None = None) -> int: root = _project_root() cfg = _normalize_cfg_path(args.config) if not cfg: - env_conf = (os.environ.get("PROLE_CONF") or "").strip() + env_conf = (os.environ.get("KNOE_CONF") or "").strip() if env_conf: cfg = _normalize_cfg_path(env_conf) if not cfg: - cfg = str(prole_conf.entrypoint_path(prole_conf.resolve_prole_conf_dir(root))) + cfg = str(knoe_conf.entrypoint_path(knoe_conf.resolve_knoe_conf_dir(root))) controller = KnoeController(project_root=root, verbose=bool(args.verbose), cfg_path=Path(cfg)) installer = KnoeConsoleInstaller(controller, cfg_path=cfg) diff --git a/knoe/core/storage_probe.py b/knoe/core/storage_probe.py index 6a38325..085c27b 100644 --- a/knoe/core/storage_probe.py +++ b/knoe/core/storage_probe.py @@ -17,7 +17,7 @@ PROBE_VERSION = "1" DEFAULT_CACHE_TTL_SEC = 12 * 60 * 60 DEFAULT_TIMEOUT_SEC = 20 DEFAULT_MAX_TARGETS_PER_NODE = 6 -_PROBE_FILE_NAME = ".prole-storage-probe" +_PROBE_FILE_NAME = ".knoe-storage-probe" _SYNOLOGY_RE = re.compile(r"^/synology/d(\d{3})$") _DD_SUMMARY_RE = re.compile( @@ -124,7 +124,7 @@ def _source_type_for_filesystem(mountpoint: str, fs: Mapping[str, Any]) -> tuple m = _SYNOLOGY_RE.match(mp) if m: return "synology_mount", f"Synology d{m.group(1)}" - if mp == "/prole/d004": + if mp == "/knoe/d004": return "pvc_base_dir", "Monitoring data" if mp.startswith("/var/lib/rancher"): return "rancher_storage", "k3s rancher storage" @@ -178,7 +178,7 @@ def discover_storage_probe_targets(node: Any, topology_context: Mapping[str, Any continue source_type, label = _source_type_for_filesystem(mountpoint, fs) if source_type == "generic" and not mountpoint.startswith("/var/lib"): - # Keep discovery conservative; prefer known Prole-relevant roots. + # Keep discovery conservative; prefer known Knoe-relevant roots. continue mount_path = Path(mountpoint) @@ -209,7 +209,7 @@ def discover_storage_probe_targets(node: Any, topology_context: Mapping[str, Any for fallback_mp, fallback_label, fallback_type in ( ("/synology/d004", "Synology d004", "synology_mount"), - ("/prole/d004", "Monitoring data", "pvc_base_dir"), + ("/knoe/d004", "Monitoring data", "pvc_base_dir"), ("/var/lib/rancher/k3s/storage", "k3s rancher storage", "rancher_storage"), ("/var/lib", "General filesystem /var/lib", "host_path"), ): diff --git a/knoe/core/topology.py b/knoe/core/topology.py index 1cfdbad..450180a 100644 --- a/knoe/core/topology.py +++ b/knoe/core/topology.py @@ -527,8 +527,8 @@ if __name__ == "__main__": def _collector_manifest(name: str, *, image: str) -> dict: labels = { - "app.kubernetes.io/name": "prole-topology-collector", - "prole.io/topology-collector": name, + "app.kubernetes.io/name": "knoe-topology-collector", + "knoe.io/topology-collector": name, } return { "apiVersion": "apps/v1", @@ -602,9 +602,9 @@ def cleanup_topology_collectors( collector_name: str | None = None, ) -> None: selector = ( - f"prole.io/topology-collector={collector_name}" + f"knoe.io/topology-collector={collector_name}" if collector_name - else "app.kubernetes.io/name=prole-topology-collector" + else "app.kubernetes.io/name=knoe-topology-collector" ) for kind in ("daemonset", "pod"): _run_kubectl( @@ -1039,7 +1039,7 @@ def discover_cluster_topology( ready_nodes = sorted(name for name, data in k8s_nodes.items() if data["ready"]) _progress(f"Discovered {discovered} Kubernetes nodes ({len(ready_nodes)} Ready)") - collector_name = f"prole-topology-{secrets.token_hex(4)}" + collector_name = f"knoe-topology-{secrets.token_hex(4)}" inventory_payloads: dict[str, dict] = {} inventory_errors: dict[str, str] = {} collector_applied = False @@ -1072,7 +1072,7 @@ def discover_cluster_topology( "get", "pods", "-l", - f"prole.io/topology-collector={collector_name}", + f"knoe.io/topology-collector={collector_name}", ], timeout=15, env=env, diff --git a/knoe/deploy.py b/knoe/deploy.py index b067e23..c9dd71e 100644 --- a/knoe/deploy.py +++ b/knoe/deploy.py @@ -1,11 +1,11 @@ """ -Deploy/build helpers for the Prole installer (root-level package). +Deploy/build helpers for the Knoe installer (root-level package). -Encapsulates Xcode tools check and building the native Prole app. +Encapsulates Xcode tools check and building the native Knoe app. Also defines the Deploy page (final milestone): - - Mark completed: Build Prole macOS App, Verify Dependencies - - New: Install Prole.app (drag-to-install pop-up; mark complete when closed) + - Mark completed: Build Knoe macOS App, Verify Dependencies + - New: Install Knoe.app (drag-to-install pop-up; mark complete when closed) """ from __future__ import annotations @@ -34,7 +34,7 @@ def check_xcode_tools() -> bool: return False -def build_prole_app_core(project_root: Path) -> Path: +def build_knoe_app_core(project_root: Path) -> Path: if platform.system() != "Darwin": raise Exception("Building the macOS app requires macOS.") if not check_xcode_tools(): @@ -42,41 +42,41 @@ def build_prole_app_core(project_root: Path) -> Path: "Xcode Command Line Tools not found. Please run: xcode-select --install" ) - # Use the top-level prole-app project directory - prole_app_dir = Path(project_root) / "prole-app" - build_script = prole_app_dir / "build.sh" + # Use the top-level knoe-app project directory + knoe_app_dir = Path(project_root) / "knoe-app" + build_script = knoe_app_dir / "build.sh" if not build_script.exists(): raise Exception(f"Build script not found at {build_script}") result = subprocess.run( ["bash", str(build_script), "build"], - cwd=prole_app_dir, + cwd=knoe_app_dir, capture_output=True, text=True, ) if result.returncode != 0: - raise Exception(f"Prole build failed: {result.stderr or result.stdout}") + raise Exception(f"Knoe build failed: {result.stderr or result.stdout}") - app_path = prole_app_dir / "dist" / "Prole.app" + app_path = knoe_app_dir / "dist" / "Knoe.app" if not app_path.exists(): - raise Exception("Build completed but Prole.app was not found in dist/") + raise Exception("Build completed but Knoe.app was not found in dist/") return app_path -def build_prole_app(project_root: Path) -> None: - """Legacy UI flow for building and optionally copying Prole.app.""" - app_path = build_prole_app_core(project_root) +def build_knoe_app(project_root: Path) -> None: + """Legacy UI flow for building and optionally copying Knoe.app.""" + app_path = build_knoe_app_core(project_root) try: from tkinter import messagebox msg = ( - "Prole.app has been built successfully.\n\n" + "Knoe.app has been built successfully.\n\n" f"Location: {app_path}\n\n" "Would you like to copy it to /Applications?" ) - if messagebox.askyesno("Prole Built", msg): - dest = Path("/Applications") / "Prole.app" + if messagebox.askyesno("Knoe Built", msg): + dest = Path("/Applications") / "Knoe.app" subprocess.run(["cp", "-R", str(app_path), str(dest)], check=True) messagebox.showinfo("Copied", f"Copied to {dest}") except Exception as copy_err: @@ -116,12 +116,12 @@ class DeployMilestone(Milestone): return if progress: - progress("Building Prole.app", 0.2) - app_path = build_prole_app_core(self.project_root) + progress("Building Knoe.app", 0.2) + app_path = build_knoe_app_core(self.project_root) state.data["deploy.app_path"] = str(app_path) if self.copy_to_applications: - dest = Path("/Applications") / "Prole.app" + dest = Path("/Applications") / "Knoe.app" if dest.exists(): state.data["deploy.copy_skipped"] = ( f"Destination already exists: {dest}" @@ -184,7 +184,7 @@ def create_deploy_page(app): Final milestone flow for Deploy page: - Show completed steps from earlier phases - - Install Prole.app (drag-to-install pop-up) + - Install Knoe.app (drag-to-install pop-up) """ import tkinter as tk from tkinter import ttk @@ -285,9 +285,9 @@ def create_deploy_page(app): # ----- Final steps (on the same merged page) ----- app.deploy_steps = [ - {"name": "Build Prole macOS App", "status": "completed"}, + {"name": "Build Knoe macOS App", "status": "completed"}, {"name": "Verify Dependencies", "status": "completed"}, - {"name": "Install Prole.app", "status": "pending"}, + {"name": "Install Knoe.app", "status": "pending"}, ] app.deploy_widgets = {} container = ttk.Frame(f) @@ -311,37 +311,37 @@ def create_deploy_page(app): """Open a simple drag-to-install window; mark complete when closed.""" try: win = tk.Toplevel(app.root) - win.title("Install Prole.app") + win.title("Install Knoe.app") win.geometry("520x320") ttk.Label( - win, text="Drag Prole.app to Applications", style="Title.TLabel" + win, text="Drag Knoe.app to Applications", style="Title.TLabel" ).pack(pady=(16, 8)) body = ttk.Frame(win) body.pack(expand=True, fill="both", padx=20, pady=10) - # Left: Prole.app icon (from configured icon path) + # Left: Knoe.app icon (from configured icon path) left = ttk.Frame(body) left.pack(side="left", expand=True, fill="both") right = ttk.Frame(body) right.pack(side="right", expand=True, fill="both") # Try to load images if available icon_path = cfg.get_ui_icon_image_path() - app._drag_img_prole = None + app._drag_img_knoe = None app._drag_img_apps = None try: from PIL import Image, ImageTk # type: ignore if icon_path.exists(): img = Image.open(str(icon_path)).resize((128, 128)) - app._drag_img_prole = ImageTk.PhotoImage(img) + app._drag_img_knoe = ImageTk.PhotoImage(img) # A simple generic Applications icon (fallback: text only) except Exception: pass cnv_l = tk.Canvas(left, width=200, height=200, highlightthickness=0) cnv_l.pack(expand=True) - if app._drag_img_prole is not None: - cnv_l.create_image(100, 100, image=app._drag_img_prole) + if app._drag_img_knoe is not None: + cnv_l.create_image(100, 100, image=app._drag_img_knoe) else: - cnv_l.create_text(100, 100, text="Prole.app", font=("Helvetica", 14)) + cnv_l.create_text(100, 100, text="Knoe.app", font=("Helvetica", 14)) cnv_r = tk.Canvas(right, width=200, height=200, highlightthickness=0) cnv_r.pack(expand=True) cnv_r.create_text(100, 80, text="Applications", font=("Helvetica", 14)) @@ -359,7 +359,7 @@ def create_deploy_page(app): def on_close(): try: - _update_step(app, "Install Prole.app", "success") + _update_step(app, "Install Knoe.app", "success") except Exception: pass try: diff --git a/knoe/prole_conf.py b/knoe/knoe_conf.py similarity index 86% rename from knoe/prole_conf.py rename to knoe/knoe_conf.py index d03d50d..da0c050 100644 --- a/knoe/prole_conf.py +++ b/knoe/knoe_conf.py @@ -1,15 +1,15 @@ -"""Prole configuration environment management. +"""Knoe configuration environment management. -This module centralizes how Prole resolves configuration paths and how it +This module centralizes how Knoe resolves configuration paths and how it loads configuration with per-environment layering. -Target on-disk layout (under `$PROLE_CONF`): +Target on-disk layout (under `$KNOE_CONF`): - `k3d.cfg` -> local development configuration - `k3s.cfg` -> k3s/service configuration - `gke.cfg` -> production/GKE configuration -Legacy `prole.cfg` and `conf//prole.cfg` paths are still recognized for +Legacy `knoe.cfg` and `conf//knoe.cfg` paths are still recognized for backward compatibility. """ @@ -55,7 +55,7 @@ def _env_from_mode_or_env_hint(raw: str | None) -> str: def _infer_env_from_cfg_file(cfg_path: Path) -> str: - """Best-effort inference of active env from a legacy standalone prole.cfg.""" + """Best-effort inference of active env from a legacy standalone knoe.cfg.""" cfg_path = Path(cfg_path) if not cfg_path.exists() or not cfg_path.is_file() or cfg_path.is_symlink(): @@ -91,19 +91,19 @@ def normalize_environment(env: str | None) -> str: if not env: return "" s = str(env).strip().lower() - if s in ("dev", "k3d") or s.startswith(("k3d-", "prole-dev-")) or s == "knoe-dev-cluster": + if s in ("dev", "k3d") or s.startswith(("k3d-", "knoe-dev-")) or s == "knoe-dev-cluster": return "dev" - if s in ("service", "services", "k3s", "prole-service-cluster") or s.startswith("prole-service-"): + if s in ("service", "services", "k3s", "knoe-service-cluster") or s.startswith("knoe-service-"): return "service" - if s in ("prod", "production", "k8s", "prole-prod-cluster") or s.startswith("prole-prod-"): + if s in ("prod", "production", "k8s", "knoe-prod-cluster") or s.startswith("knoe-prod-"): return "prod" if s in ("test", "testing"): return "test" return s -def resolve_prole_conf_dir(project_root: Path) -> Path: - raw = os.environ.get("PROLE_CONF", "").strip() +def resolve_knoe_conf_dir(project_root: Path) -> Path: + raw = os.environ.get("KNOE_CONF", "").strip() if raw: return Path(raw).expanduser() return project_root / "conf" @@ -113,12 +113,12 @@ def entrypoint_path(conf_dir: Path) -> Path: """Return the active configuration file path. Prefers named root config files (`k3d.cfg`, `k3s.cfg`, `gke.cfg`) resolved - from CLUSTER_ENV/PROLE_MODE/DEPLOYMENT_MODE. Falls back to legacy env-dir - `prole.cfg` files and finally `conf/prole.cfg` for compatibility. + from CLUSTER_ENV/KNOE_MODE/DEPLOYMENT_MODE. Falls back to legacy env-dir + `knoe.cfg` files and finally `conf/knoe.cfg` for compatibility. """ conf_dir = Path(conf_dir) # Determine active env from environment variables (set by the UI on save). - for var in ("CLUSTER_ENV", "PROLE_MODE", "DEPLOYMENT_MODE"): + for var in ("CLUSTER_ENV", "KNOE_MODE", "DEPLOYMENT_MODE"): hint = os.environ.get(var, "").strip() if hint: env = _env_from_mode_or_env_hint(hint) @@ -128,7 +128,7 @@ def entrypoint_path(conf_dir: Path) -> Path: named_path = conf_dir / named if named_path.exists(): return named_path - env_path = conf_dir / env / "prole.cfg" + env_path = conf_dir / env / "knoe.cfg" if env_path.exists(): return env_path @@ -138,11 +138,11 @@ def entrypoint_path(conf_dir: Path) -> Path: return path for env in ENVIRONMENTS: - env_path = conf_dir / env / "prole.cfg" + env_path = conf_dir / env / "knoe.cfg" if env_path.exists(): return env_path - legacy = conf_dir / "prole.cfg" + legacy = conf_dir / "knoe.cfg" if legacy.exists(): return legacy @@ -161,9 +161,9 @@ def resolve_env_dir_from_cfg_path(cfg_path: Path) -> tuple[Path, str, Path]: """Return (conf_dir, env_name, env_dir). Supports: - - `$PROLE_CONF/{k3d.cfg|k3s.cfg|gke.cfg|test.cfg}` base files - - legacy `$PROLE_CONF/prole.cfg` entrypoint (symlink/plain) - - legacy `$PROLE_CONF//prole.cfg` base files + - `$KNOE_CONF/{k3d.cfg|k3s.cfg|gke.cfg|test.cfg}` base files + - legacy `$KNOE_CONF/knoe.cfg` entrypoint (symlink/plain) + - legacy `$KNOE_CONF//knoe.cfg` base files """ cfg_path = Path(cfg_path) @@ -184,7 +184,7 @@ def resolve_env_dir_from_cfg_path(cfg_path: Path) -> tuple[Path, str, Path]: conf_dir = env_dir.parent env = normalize_environment(env_dir.name) expected = cfg_file_for_env(env) - if env and _is_known_env_dir(conf_dir, env_dir) and target.name in {"prole.cfg", expected}: + if env and _is_known_env_dir(conf_dir, env_dir) and target.name in {"knoe.cfg", expected}: return conf_dir, env, env_dir except Exception: pass @@ -195,7 +195,7 @@ def resolve_env_dir_from_cfg_path(cfg_path: Path) -> tuple[Path, str, Path]: conf_dir = env_dir.parent env = normalize_environment(env_dir.name) expected = cfg_file_for_env(env) - if env and env in ENVIRONMENTS and cfg_path.name in {"prole.cfg", expected} and _is_known_env_dir(conf_dir, env_dir): + if env and env in ENVIRONMENTS and cfg_path.name in {"knoe.cfg", expected} and _is_known_env_dir(conf_dir, env_dir): return conf_dir, env, env_dir except Exception: pass @@ -218,14 +218,14 @@ def layered_cfg_files(cfg_path: Path) -> list[Path]: if env and _is_known_env_dir(conf_dir, env_dir): base_name = cfg_file_for_env(env) - base = env_dir / base_name if base_name else env_dir / "prole.cfg" + base = env_dir / base_name if base_name else env_dir / "knoe.cfg" if not base.exists(): - base = env_dir / "prole.cfg" + base = env_dir / "knoe.cfg" if base.exists(): files.append(base) try: skip_names = { - "prod.cfg", # standalone deploy config, not an overlay for prole.cfg + "prod.cfg", # standalone deploy config, not an overlay for knoe.cfg "gcp.cfg", # generated metadata file (key=value, no INI sections) } overrides = [ @@ -284,9 +284,9 @@ def _default_base_cfg_text(env: str) -> str: # - non-test uses a stable DB namespace default # - test is isolated if env == "test": - database_ns = "prole-test" - service_ns = "prole-test" - cluster_name = "prole-db" + database_ns = "knoe-test" + service_ns = "knoe-test" + cluster_name = "knoe-db" elif env == "dev": database_ns = "knoe-db" service_ns = "default" @@ -297,8 +297,8 @@ def _default_base_cfg_text(env: str) -> str: cluster_name = "knoe-db" return ( - "; Prole Master Configuration File\n" - "; Generated by prole_conf\n\n" + "; Knoe Master Configuration File\n" + "; Generated by knoe_conf\n\n" "[Global]\n" f"CLUSTER_ENV = {env}\n" f"DATABASE_NAMESPACE = {database_ns}\n" @@ -308,7 +308,7 @@ def _default_base_cfg_text(env: str) -> str: def _looks_like_generated_base_cfg(path: Path, env: str) -> bool: - """True if `path` looks like a default prole_conf-generated base.""" + """True if `path` looks like a default knoe_conf-generated base.""" path = Path(path) if not path.exists() or not path.is_file(): @@ -348,7 +348,7 @@ def activate_environment( Sets CLUSTER_ENV in the process environment so that subsequent entrypoint_path() calls resolve the correct config without - needing a conf/prole.cfg symlink. + needing a conf/knoe.cfg symlink. This never overwrites another environment's curated config. """ @@ -362,7 +362,7 @@ def activate_environment( # Migrate any legacy plain-file entrypoint into the target base. if migrate_legacy_entrypoint: - legacy_entry = conf_dir / "prole.cfg" + legacy_entry = conf_dir / "knoe.cfg" if legacy_entry.exists() and not legacy_entry.is_symlink(): try: legacy_text = legacy_entry.read_text(encoding="utf-8") @@ -370,13 +370,13 @@ def activate_environment( encoding="utf-8", errors="ignore" ).strip(): base.write_text(legacy_text, encoding="utf-8") - legacy_name = f"prole.cfg.legacy.{int(time.time())}" + legacy_name = f"knoe.cfg.legacy.{int(time.time())}" legacy_entry.rename(conf_dir / legacy_name) except Exception: pass # Migrate legacy env-dir base into new named root config when helpful. - legacy_env_base = conf_dir / env_key / "prole.cfg" + legacy_env_base = conf_dir / env_key / "knoe.cfg" if legacy_env_base.exists() and legacy_env_base.is_file(): try: legacy_text = legacy_env_base.read_text(encoding="utf-8") @@ -394,7 +394,7 @@ def activate_environment( raise FileNotFoundError(str(base)) # Persist the active environment in the process so entrypoint_path() resolves - # conf/{env}/prole.cfg without a conf/prole.cfg symlink. + # conf/{env}/knoe.cfg without a conf/knoe.cfg symlink. os.environ["CLUSTER_ENV"] = env_key return base @@ -420,7 +420,7 @@ def ensure_entrypoint( env = _env_from_mode_or_env_hint(preferred_env) if not env: # Try to infer from the legacy plain-file entrypoint if it still exists. - legacy = conf_dir / "prole.cfg" + legacy = conf_dir / "knoe.cfg" if legacy.exists() and not legacy.is_symlink(): env = _infer_env_from_cfg_file(legacy) if not env: @@ -443,11 +443,11 @@ def ensure_entrypoint( def active_environment(conf_dir: Path) -> str: """Return the currently active environment name. - Resolves from CLUSTER_ENV/PROLE_MODE env vars first (set by activate_environment), + Resolves from CLUSTER_ENV/KNOE_MODE env vars first (set by activate_environment), then falls back to inferring from the resolved config file path. """ conf_dir = Path(conf_dir) - for var in ("CLUSTER_ENV", "PROLE_MODE", "DEPLOYMENT_MODE"): + for var in ("CLUSTER_ENV", "KNOE_MODE", "DEPLOYMENT_MODE"): hint = os.environ.get(var, "").strip() if hint: env = _env_from_mode_or_env_hint(hint) @@ -468,7 +468,7 @@ def active_environment(conf_dir: Path) -> str: return env env = normalize_environment(target.parent.name) expected = cfg_file_for_env(env) - if env in ENVIRONMENTS and _is_known_env_dir(conf_dir, target.parent) and target.name in {"prole.cfg", expected}: + if env in ENVIRONMENTS and _is_known_env_dir(conf_dir, target.parent) and target.name in {"knoe.cfg", expected}: return env except Exception: pass diff --git a/knoe/main.py b/knoe/main.py index 279a3ea..03848f4 100644 --- a/knoe/main.py +++ b/knoe/main.py @@ -1,5 +1,5 @@ """ -Main UI orchestration for Prole Installer. +Main UI orchestration for Knoe Installer. This module centralizes canvas/page registration and delegates page rendering to feature modules. The legacy install.py will import and invoke run(). diff --git a/knoe/milestone.py b/knoe/milestone.py index b15303d..0f12574 100644 --- a/knoe/milestone.py +++ b/knoe/milestone.py @@ -84,32 +84,32 @@ class Milestone(ABC): env = os.environ.copy() project_root = inst_config.PROJECT_ROOT - env["PROLE_HOME"] = str(project_root) - env["PROLE_SERVICE"] = str(project_root) + env["KNOE_HOME"] = str(project_root) + env["KNOE_SERVICE"] = str(project_root) namespace = (state.inputs.get("init_password.db_namespace", "") or "").strip() env["NAMESPACE"] = namespace or "default" env["PROLE_NAMESPACE"] = env["NAMESPACE"] env["DATABASE_NAMESPACE"] = env["NAMESPACE"] # Paths — prefer the env-specific conf subdir (e.g. conf/service/) so that - # init scripts source the correct prole.cfg and don't fall back to the - # conf/prole.cfg symlink which may point to a different cluster env. - # Priority: (1) inherited PROLE_CONF from parent shell when it points to a + # init scripts source the correct knoe.cfg and don't fall back to the + # conf/knoe.cfg symlink which may point to a different cluster env. + # Priority: (1) inherited KNOE_CONF from parent shell when it points to a # valid env-specific subdir, (2) cluster_env-derived subdir, (3) stored value. - _inherited_conf = os.environ.get("PROLE_CONF", "") + _inherited_conf = os.environ.get("KNOE_CONF", "") _cluster_env_for_conf = state.inputs.get("init_cluster.cluster_env", "") _env_conf_dir = ( Path(project_root) / "conf" / _cluster_env_for_conf if _cluster_env_for_conf else None ) - if _inherited_conf and (Path(_inherited_conf) / "prole.cfg").exists(): - env["PROLE_CONF"] = _inherited_conf + if _inherited_conf and (Path(_inherited_conf) / "knoe.cfg").exists(): + env["KNOE_CONF"] = _inherited_conf elif _env_conf_dir and _env_conf_dir.is_dir(): - env["PROLE_CONF"] = str(_env_conf_dir) + env["KNOE_CONF"] = str(_env_conf_dir) else: - env["PROLE_CONF"] = state.inputs.get( - "env_setup.PROLE_CONF", str(project_root / "conf") + env["KNOE_CONF"] = state.inputs.get( + "env_setup.KNOE_CONF", str(project_root / "conf") ) env["PROLE_DATA"] = state.inputs.get( "env_setup.PROLE_DATA", str(project_root / "knoe-db" / "data") @@ -117,8 +117,8 @@ class Milestone(ABC): env["PROLE_LOGS"] = state.inputs.get( "env_setup.PROLE_LOGS", str(project_root / "logs") ) - env["PROLE_SERVICE"] = state.inputs.get( - "env_setup.PROLE_SERVICE", str(project_root / "etc") + env["KNOE_SERVICE"] = state.inputs.get( + "env_setup.KNOE_SERVICE", str(project_root / "etc") ) service_ns = ( @@ -136,11 +136,11 @@ class Milestone(ABC): cluster_env = state.inputs.get("init_cluster.cluster_env", "dev") mode = _deployment_mode_from_env(cluster_env) or "k3d" - env["PROLE_MODE"] = mode + env["KNOE_MODE"] = mode # Propagate [Global] config keys into env so Python-owned operations - # (CNPG, monitoring, etc.) can access values declared in prole.cfg. - # This mirrors what prole_cfg.sh does for shell subprocesses. + # (CNPG, monitoring, etc.) can access values declared in knoe.cfg. + # This mirrors what knoe_cfg.sh does for shell subprocesses. # We only set keys that are not already in env (env vars win over config). # Machine-specific / runtime-detected values are excluded — they must # never be sourced from a potentially stale config written on a different host. @@ -159,8 +159,8 @@ class Milestone(ABC): # Kubeconfig if mode == "k3s": _k3s_kc_candidates = [ - Path(env["PROLE_SERVICE"]) / "secrets" / "k3s.kubeconfig", - project_root / "prole-k3s.kubeconfig", + Path(env["KNOE_SERVICE"]) / "secrets" / "k3s.kubeconfig", + project_root / "knoe-k3s.kubeconfig", project_root / "etc" / "secrets" / "k3s.kubeconfig", project_root / "secrets" / "k3s.kubeconfig", ] @@ -243,7 +243,7 @@ class Milestone(ABC): if ( resolved_grafana and not inst_config._is_openbao_ref(resolved_grafana) - and not inst_config._is_prole_secret(resolved_grafana) + and not inst_config._is_knoe_secret(resolved_grafana) ): env["GRAFANA_ADMIN_PASSWORD"] = resolved_grafana elif db_pw: diff --git a/knoe/ncurses_installer.py b/knoe/ncurses_installer.py index 17d9487..30cdc54 100644 --- a/knoe/ncurses_installer.py +++ b/knoe/ncurses_installer.py @@ -1,5 +1,5 @@ """ -Ncurses-based Prole Installer. +Ncurses-based Knoe Installer. Provides a terminal UI alternative to the Tk GUI in install.py. Maintains the same screen order and operations. @@ -23,7 +23,7 @@ from .core.env import ( _resolve_k3s_connection, _verify_k3s_services_status, _find_kubeconfig_file, - resolve_prole_home, + resolve_knoe_home, ) from .core.ops import openbao as openbao_ops from .core.ops import opentofu as opentofu_ops @@ -58,8 +58,8 @@ class KnoeNcursesInstaller: self.cluster_env = "k3d-knoe-dev-cluster" self.cluster_environments = [ "knoe-dev-cluster", - "prole-service-cluster", - "prole-prod-cluster", + "knoe-service-cluster", + "knoe-prod-cluster", ] self.selected_env_index = 0 self.selected_dep_index = 0 @@ -74,7 +74,7 @@ class KnoeNcursesInstaller: self.prod_artifacts_path = None # Connection details for remote k3s — resolved from env vars, - # prole.cfg *and* ansible topology so all UIs agree. + # knoe.cfg *and* ansible topology so all UIs agree. self.k3s_server, self.k3s_token = _resolve_k3s_connection( project_root=self.project_root, ) @@ -82,7 +82,7 @@ class KnoeNcursesInstaller: try: self.namespace_owner = getpass.getuser() except Exception: - self.namespace_owner = "prole" + self.namespace_owner = "knoe" self.db_username = self.namespace_owner self.db_namespace = os.environ.get("NAMESPACE", "default") self.db_password = "" @@ -223,7 +223,7 @@ class KnoeNcursesInstaller: def _render_header(self): """Render the header.""" try: - title = "Knoe System Installer" + title = "Knoe.DB Installer" self.header_win.addstr(0, 2, title, curses.A_BOLD) self.header_win.addstr(1, 2, "─" * (self.width - 4)) if self.status_message: @@ -376,7 +376,7 @@ class KnoeNcursesInstaller: self.cluster_environments ) self.cluster_env = self.cluster_environments[self.selected_env_index] - if self.cluster_env == "prole-service-cluster": + if self.cluster_env == "knoe-service-cluster": self._verify_k3s_services() return True elif key == curses.KEY_DOWN or key == ord("j"): @@ -384,7 +384,7 @@ class KnoeNcursesInstaller: self.cluster_environments ) self.cluster_env = self.cluster_environments[self.selected_env_index] - if self.cluster_env == "prole-service-cluster": + if self.cluster_env == "knoe-service-cluster": self._verify_k3s_services() return True @@ -402,11 +402,11 @@ class KnoeNcursesInstaller: self.selected_kubectx_index - 1 ) % len(self.kubectx_list) return True - elif selected_env == "prole-service-cluster": + elif selected_env == "knoe-service-cluster": if key == ord("d") or key == ord("D"): self._deploy_k3s_services() return True - elif selected_env == "prole-prod-cluster": + elif selected_env == "knoe-prod-cluster": return self.prod_artifacts_path.handle_key(key) return False @@ -438,7 +438,7 @@ class KnoeNcursesInstaller: """Verify registry:2, OpenBao, and OpenTofu on remote k3s cluster. Delegates to the shared ``_verify_k3s_services_status`` so the - same resolution logic (env → prole.cfg → ansible) is used. + same resolution logic (env → knoe.cfg → ansible) is used. """ def _verify(): @@ -464,7 +464,7 @@ class KnoeNcursesInstaller: def _deploy_k3s_services(self): """Deploy registry, OpenBao, and OpenTofu to remote k3s cluster. - Uses the shared resolution (env → prole.cfg → ansible) for the + Uses the shared resolution (env → knoe.cfg → ansible) for the server URL / token and KUBECONFIG so behaviour matches the Tk UI. """ @@ -478,12 +478,12 @@ class KnoeNcursesInstaller: return env = os.environ.copy() - env["PROLE_HOME"] = str(self.project_root) - env["PROLE_SERVICE"] = str(self.project_root) + env["KNOE_HOME"] = str(self.project_root) + env["KNOE_SERVICE"] = str(self.project_root) env["NAMESPACE"] = self.db_namespace or "default" env["DB_PASSWORD"] = self.db_password or "" env["OPENTOFU_ADMIN_PASSWORD"] = self.db_password or "" - env["PROLE_MODE"] = "k3s" + env["KNOE_MODE"] = "k3s" # Resolve KUBECONFIG: prefer existing cert-based file, # fall back to token-generated kubeconfig. @@ -620,8 +620,8 @@ class KnoeNcursesInstaller: self._scan_running = False return - prole_home = resolve_prole_home() - scan_dir = prole_home / "scan" + knoe_home = resolve_knoe_home() + scan_dir = knoe_home / "scan" scan_dir.mkdir(parents=True, exist_ok=True) env = os.environ.copy() @@ -686,9 +686,9 @@ class KnoeNcursesInstaller: def _render_welcome(self): """Render the welcome screen.""" win = CursesWindow(self.main_content_win) - win.render_title("Welcome to Knoe System Installer", y=2) + win.render_title("Welcome to Knoe.DB Installer", y=2) win.render_paragraph( - "This installer will guide you through setting up the Prole database system, " + "This installer will guide you through setting up the Knoe database system, " "including Docker containers, dependencies, and deployment configuration.", y=5, ) @@ -785,12 +785,12 @@ class KnoeNcursesInstaller: win = CursesWindow(self.main_content_win) win.render_title("System Environment Setup", y=2) win.render_paragraph( - "Configure system environment variables and paths for Prole installation.", + "Configure system environment variables and paths for Knoe installation.", y=5, ) y = 9 - win.render_text(y, 4, f"PROLE_HOME: {self.project_root}") + win.render_text(y, 4, f"KNOE_HOME: {self.project_root}") y += 2 win.render_text(y, 4, f"Cluster Environment: {self.cluster_env}") @@ -832,7 +832,7 @@ class KnoeNcursesInstaller: """Render Docker build screen.""" win = CursesWindow(self.main_content_win) win.render_title("Build Database Container", y=2) - win.render_paragraph("Building Docker container for Prole database...", y=5) + win.render_paragraph("Building Docker container for Knoe database...", y=5) win.render_text( 8, 4, "[Docker build process - console output would appear here]" ) @@ -873,7 +873,7 @@ class KnoeNcursesInstaller: win.render_text(y, 6, f"- {ctx}", attr) y += 1 - elif selected_env == "prole-service-cluster": + elif selected_env == "knoe-service-cluster": win.render_text(y, 4, "Remote K3s Service Status:", curses.A_BOLD) y += 1 @@ -894,7 +894,7 @@ class KnoeNcursesInstaller: y + 1, 4, "Press 'd' to deploy missing services", curses.A_BOLD ) - elif selected_env == "prole-prod-cluster": + elif selected_env == "knoe-prod-cluster": win.render_text(y, 4, "Local Artifact Staging Directory:", curses.A_BOLD) y += 2 # Handle InputField render focus @@ -910,9 +910,9 @@ class KnoeNcursesInstaller: def _render_init_cnpg_deploy(self): """Render CNPG deployment screen.""" win = CursesWindow(self.main_content_win) - win.render_title("Deploy Prole Database", y=2) + win.render_title("Deploy Knoe Database", y=2) win.render_paragraph( - "Deploying CloudNativePG operator and Prole database cluster...", y=5 + "Deploying CloudNativePG operator and Knoe database cluster...", y=5 ) def _render_create_installer(self): diff --git a/knoe/ncurses_ui.py b/knoe/ncurses_ui.py index 7629e03..dafef7f 100644 --- a/knoe/ncurses_ui.py +++ b/knoe/ncurses_ui.py @@ -1,5 +1,5 @@ """ -Ncurses UI primitives for Prole Installer. +Ncurses UI primitives for Knoe Installer. Provides curses-based equivalents to the Tk/Canvas UI helpers in screen.py. """ diff --git a/knoe/ops/cli.py b/knoe/ops/cli.py index 5d8edbc..67c65e2 100644 --- a/knoe/ops/cli.py +++ b/knoe/ops/cli.py @@ -84,11 +84,11 @@ def main(argv: list[str] | None = None) -> int: "action", help="action to run (initialize, start, update, restart, stop, status)", ) - p.add_argument("--mode", default=os.environ.get("PROLE_MODE", "dev")) + p.add_argument("--mode", default=os.environ.get("KNOE_MODE", "dev")) p.add_argument("--namespace", default=os.environ.get("PROLE_NAMESPACE", "default")) p.add_argument( "--service-namespace", - default=os.environ.get("PROLE_SERVICE_NAMESPACE", "default"), + default=os.environ.get("KNOE_SERVICE_NAMESPACE", "default"), ) p.add_argument("--config", dest="config", default=os.environ.get("PROLE_CFG")) args = p.parse_args(argv) diff --git a/knoe/ops/legacy_shell.py b/knoe/ops/legacy_shell.py index 90b0ba9..bbd569e 100644 --- a/knoe/ops/legacy_shell.py +++ b/knoe/ops/legacy_shell.py @@ -13,9 +13,9 @@ def _env(ctx: KnoeContext, extra_env: Mapping[str, str] | None = None) -> dict[s e.update(ctx.env) # Bridge common knobs for legacy scripts. - e.setdefault("PROLE_MODE", ctx.mode) + e.setdefault("KNOE_MODE", ctx.mode) e.setdefault("PROLE_NAMESPACE", ctx.namespace) - e.setdefault("PROLE_SERVICE_NAMESPACE", ctx.service_namespace) + e.setdefault("KNOE_SERVICE_NAMESPACE", ctx.service_namespace) if ctx.cfg_path is not None: e.setdefault("PROLE_CFG", str(ctx.cfg_path)) diff --git a/knoe/screen.py b/knoe/screen.py index d22178a..16d7b62 100644 --- a/knoe/screen.py +++ b/knoe/screen.py @@ -1,5 +1,5 @@ """ -Shared UI helpers for the Prole installer screens. +Shared UI helpers for the Knoe installer screens. These routines are intentionally lightweight wrappers around the existing Tk Canvas used by the installer, to reduce clutter in install.py. diff --git a/knoe/scripts/install_prole_cmctl.sh b/knoe/scripts/install_prole_cmctl.sh index 06fab0a..5c95cd2 100644 --- a/knoe/scripts/install_prole_cmctl.sh +++ b/knoe/scripts/install_prole_cmctl.sh @@ -1,15 +1,15 @@ #!/bin/bash -# Prole Installer: cmctl (cert-manager CLI) +# Knoe Installer: cmctl (cert-manager CLI) # Installs cmctl via Homebrew if missing set -euo pipefail -echo "[prole] Checking cmctl..." +echo "[knoe] Checking cmctl..." if ! command -v cmctl >/dev/null 2>&1; then - echo "[prole] Installing cmctl via brew..." + echo "[knoe] Installing cmctl via brew..." brew install cmctl else - echo "[prole] cmctl already installed" + echo "[knoe] cmctl already installed" fi -echo "[prole] cmctl OK" +echo "[knoe] cmctl OK" diff --git a/knoe/scripts/install_prole_helm.sh b/knoe/scripts/install_prole_helm.sh index 9859f97..6e7906c 100644 --- a/knoe/scripts/install_prole_helm.sh +++ b/knoe/scripts/install_prole_helm.sh @@ -1,15 +1,15 @@ #!/bin/bash -# Prole Installer: Helm +# Knoe Installer: Helm # Installs Helm via Homebrew if missing set -euo pipefail -echo "[prole] Checking Helm..." +echo "[knoe] Checking Helm..." if ! command -v helm >/dev/null 2>&1; then - echo "[prole] Installing Helm via brew..." + echo "[knoe] Installing Helm via brew..." brew install helm else - echo "[prole] Helm already installed" + echo "[knoe] Helm already installed" fi -echo "[prole] Helm OK" +echo "[knoe] Helm OK" diff --git a/knoe/scripts/install_prole_homebrew.sh b/knoe/scripts/install_prole_homebrew.sh index 53de16f..83e2931 100644 --- a/knoe/scripts/install_prole_homebrew.sh +++ b/knoe/scripts/install_prole_homebrew.sh @@ -1,17 +1,17 @@ #!/bin/bash -# Prole Installer: Homebrew +# Knoe Installer: Homebrew # Ensures Homebrew is present and up to date on macOS set -euo pipefail -echo "[prole] Checking Homebrew..." +echo "[knoe] Checking Homebrew..." if ! command -v brew >/dev/null 2>&1; then - echo "[prole] Installing Homebrew..." + echo "[knoe] Installing Homebrew..." /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" else - echo "[prole] Homebrew present; updating taps and packages..." + echo "[knoe] Homebrew present; updating taps and packages..." brew update brew upgrade || true fi -echo "[prole] Homebrew OK" +echo "[knoe] Homebrew OK" diff --git a/knoe/scripts/install_prole_k3d.sh b/knoe/scripts/install_prole_k3d.sh index 91c436b..d97307e 100644 --- a/knoe/scripts/install_prole_k3d.sh +++ b/knoe/scripts/install_prole_k3d.sh @@ -1,15 +1,15 @@ #!/bin/bash -# Prole Installer: k3d +# Knoe Installer: k3d # Installs k3d via Homebrew if missing set -euo pipefail -echo "[prole] Checking k3d..." +echo "[knoe] Checking k3d..." if ! command -v k3d >/dev/null 2>&1; then - echo "[prole] Installing k3d via brew..." + echo "[knoe] Installing k3d via brew..." brew install k3d else - echo "[prole] k3d already installed" + echo "[knoe] k3d already installed" fi -echo "[prole] k3d OK" +echo "[knoe] k3d OK" diff --git a/knoe/scripts/install_prole_krew.sh b/knoe/scripts/install_prole_krew.sh index ad286ae..948bf4c 100644 --- a/knoe/scripts/install_prole_krew.sh +++ b/knoe/scripts/install_prole_krew.sh @@ -1,17 +1,17 @@ #!/bin/bash -# Prole Installer: krew (kubectl plugin manager) +# Knoe Installer: krew (kubectl plugin manager) # Installs krew via Homebrew if kubectl krew is unavailable set -euo pipefail -echo "[prole] Checking kubectl krew..." +echo "[knoe] Checking kubectl krew..." if ! kubectl krew version >/dev/null 2>&1; then - echo "[prole] Installing krew via brew..." + echo "[knoe] Installing krew via brew..." brew install krew - echo "[prole] Updating krew index..." + echo "[knoe] Updating krew index..." kubectl krew update || true else - echo "[prole] krew already installed" + echo "[knoe] krew already installed" fi -echo "[prole] krew OK" +echo "[knoe] krew OK" diff --git a/knoe/scripts/install_prole_kubectl.sh b/knoe/scripts/install_prole_kubectl.sh index 28316ee..233f70c 100644 --- a/knoe/scripts/install_prole_kubectl.sh +++ b/knoe/scripts/install_prole_kubectl.sh @@ -1,15 +1,15 @@ #!/bin/bash -# Prole Installer: kubectl +# Knoe Installer: kubectl # Installs kubectl via Homebrew if missing set -euo pipefail -echo "[prole] Checking kubectl..." +echo "[knoe] Checking kubectl..." if ! command -v kubectl >/dev/null 2>&1; then - echo "[prole] Installing kubectl via brew..." + echo "[knoe] Installing kubectl via brew..." brew install kubectl else - echo "[prole] kubectl already installed" + echo "[knoe] kubectl already installed" fi -echo "[prole] kubectl OK" +echo "[knoe] kubectl OK" diff --git a/knoe/scripts/install_prole_kubectl_plugins.sh b/knoe/scripts/install_prole_kubectl_plugins.sh index 6de8625..a96f47d 100644 --- a/knoe/scripts/install_prole_kubectl_plugins.sh +++ b/knoe/scripts/install_prole_kubectl_plugins.sh @@ -1,12 +1,12 @@ #!/bin/bash -# Prole Installer: kubectl plugins via krew +# Knoe Installer: kubectl plugins via krew # Installs required kubectl plugins using krew set -euo pipefail -echo "[prole] Installing kubectl plugins (via krew)..." +echo "[knoe] Installing kubectl plugins (via krew)..." # Example plugins; extend as needed kubectl krew install view-secret || true -echo "[prole] kubectl plugins OK" +echo "[knoe] kubectl plugins OK" diff --git a/knoe/scripts/install_prole_opentofu.sh b/knoe/scripts/install_prole_opentofu.sh index 54a380d..13f486a 100755 --- a/knoe/scripts/install_prole_opentofu.sh +++ b/knoe/scripts/install_prole_opentofu.sh @@ -1,15 +1,15 @@ #!/bin/bash -# Prole Installer: OpenTofu +# Knoe Installer: OpenTofu # Installs OpenTofu via Homebrew if missing set -euo pipefail -echo "[prole] Checking OpenTofu..." +echo "[knoe] Checking OpenTofu..." if ! command -v tofu >/dev/null 2>&1; then - echo "[prole] Installing OpenTofu via brew..." + echo "[knoe] Installing OpenTofu via brew..." brew install opentofu else - echo "[prole] OpenTofu already installed" + echo "[knoe] OpenTofu already installed" fi -echo "[prole] OpenTofu OK" +echo "[knoe] OpenTofu OK" diff --git a/knoe/ui/ncurses_ui.py b/knoe/ui/ncurses_ui.py index e2bea5e..37973e5 100644 --- a/knoe/ui/ncurses_ui.py +++ b/knoe/ui/ncurses_ui.py @@ -21,7 +21,7 @@ Layout Number shortcuts: type a digit (or two digits within 1 s) to jump to that nav item; press Enter to confirm. -Press 'm' at any time to cycle PROLE_MODE k3d → k3s → k8s → k3d. +Press 'm' at any time to cycle KNOE_MODE k3d → k3s → k8s → k3d. """ from __future__ import annotations @@ -115,11 +115,11 @@ def _left_panel_width() -> int: def _current_mode() -> str: - return os.environ.get("PROLE_MODE", "k3s") + return os.environ.get("KNOE_MODE", "k3s") def _set_mode(mode: str) -> None: - os.environ["PROLE_MODE"] = mode + os.environ["KNOE_MODE"] = mode def _cycle_mode() -> str: diff --git a/knoe/ui/screens/__init__.py b/knoe/ui/screens/__init__.py index fef122b..68c5b66 100644 --- a/knoe/ui/screens/__init__.py +++ b/knoe/ui/screens/__init__.py @@ -1,5 +1,5 @@ """ -Prole Service Dependencies Installer — screen package. +Knoe Service Dependencies Installer — screen package. This package splits the monolithic ``KnoeInstaller`` class into cohesive mixin modules, one per logical screen / concern. The composed class is @@ -12,7 +12,9 @@ from __future__ import annotations import configparser import signal import socket +import sys import threading +import time import tkinter as tk import uuid from tkinter import ttk, messagebox, filedialog @@ -33,15 +35,209 @@ from knoe.core.env import ( _normalize_cluster_env, ) -# On macOS, set process name early so the menu bar reads correctly. -if platform.system() == "Darwin": - try: - from Foundation import NSProcessInfo +# Helper to set macOS application identity via Objective-C bridge. +def setup_macos_app_identity(): + """Set the installer identity: process/menu name on macOS. + This should be called AFTER the Tk root window is initialized. + """ + if platform.system() != "Darwin": + return - NSProcessInfo.processInfo().setProcessName_("Knoe System Installer") + try: + import ctypes + import ctypes.util + + objc = ctypes.cdll.LoadLibrary(ctypes.util.find_library("objc")) + objc.objc_getClass.restype = ctypes.c_void_p + objc.sel_registerName.restype = ctypes.c_void_p + objc.objc_msgSend.restype = ctypes.c_void_p + + def msg(obj, sel_name, *args, restype=ctypes.c_void_p, argtypes=None): + if obj is None: + return None + sel = objc.sel_registerName(sel_name.encode("ascii")) + # Use argtypes to ensure correct calling convention + objc.objc_msgSend.restype = restype + if argtypes is not None: + objc.objc_msgSend.argtypes = [ctypes.c_void_p, ctypes.c_void_p] + argtypes + else: + objc.objc_msgSend.argtypes = [ctypes.c_void_p, ctypes.c_void_p] + return objc.objc_msgSend(obj, sel, *args) + + def to_ns(py_str): + NSUTF8StringEncoding = 4 + cls = objc.objc_getClass(b"NSString") + return msg( + cls, + "stringWithCString:encoding:", + py_str.encode("utf-8"), + NSUTF8StringEncoding, + argtypes=[ctypes.c_char_p, ctypes.c_uint], + ) + + app_name_str = "Knoe.DB Installer" + app_name_ns = to_ns(app_name_str) + + # 1. Set process name + process_info_cls = objc.objc_getClass(b"NSProcessInfo") + if process_info_cls: + process_info = msg(process_info_cls, "processInfo") + if process_info: + # setProcessName: is often ignored for bundled apps but helps for scripts. + msg(process_info, "setProcessName:", app_name_ns, argtypes=[ctypes.c_void_p]) + + # 1a. Attempt to set process name via libc's setprogname + try: + libc = ctypes.cdll.LoadLibrary(ctypes.util.find_library("c")) + if hasattr(libc, "setprogname"): + libc.setprogname.argtypes = [ctypes.c_char_p] + libc.setprogname(app_name_str.encode("utf-8")) + except Exception: + pass + + # 1b. Manipulate argv[0] as a fallback for some systems + try: + # sys.argv[0] doesn't change the OS process name but can affect some libraries + import sys + sys.argv[0] = app_name_str + except Exception: + pass + + # 1b. Try to set Dock name via LSSetApplicationInformationItem (SPI) + # This is a bit risky but often works for setting the Dock mouseover name at runtime. + try: + LSSetApplicationInformationItem = getattr(objc, "_LSSetApplicationInformationItem", None) + if LSSetApplicationInformationItem: + # kLSKeyAllFrontProcess = -2 + # kLSRuntimeApplicationNameKey = "LSRuntimeApplicationName" + # _LSSetApplicationInformationItem(int, int, CFStringRef, CFStringRef, int*) + LSSetApplicationInformationItem.argtypes = [ctypes.c_int, ctypes.c_int, ctypes.c_void_p, ctypes.c_void_p, ctypes.c_void_p] + LSSetApplicationInformationItem.restype = ctypes.c_int + + LSRuntimeApplicationNameKey = to_ns("LSRuntimeApplicationName") + LSSetApplicationInformationItem(-2, -1, LSRuntimeApplicationNameKey, app_name_ns, None) + except Exception: + pass + + # 2. Set transformation state and Dock Icon + app_cls = objc.objc_getClass(b"NSApplication") + if app_cls: + app = msg(app_cls, "sharedApplication") + if app: + NSApplicationActivationPolicyRegular = 0 + msg(app, "setActivationPolicy:", NSApplicationActivationPolicyRegular, argtypes=[ctypes.c_long]) + + # Set Dock Icon via ctypes since PyObjC might be missing + try: + from knoe import config as inst_config + cfg_icon = inst_config.get_ui_icon_image_path() + if cfg_icon.exists(): + ns_image_cls = objc.objc_getClass(b"NSImage") + if ns_image_cls: + icon_path_ns = to_ns(str(cfg_icon)) + img = msg(ns_image_cls, "alloc") + img = msg(img, "initWithContentsOfFile:", icon_path_ns, argtypes=[ctypes.c_void_p]) + if img: + msg(app, "setApplicationIconImage:", img, argtypes=[ctypes.c_void_p]) + except Exception: + pass + + # 3. Update Bundle info + bundle_cls = objc.objc_getClass(b"NSBundle") + main_bundle = msg(bundle_cls, "mainBundle") + if main_bundle: + info_dict = msg(main_bundle, "localizedInfoDictionary") + if not info_dict: + info_dict = msg(main_bundle, "infoDictionary") + + if info_dict: + # Some dicts might not support setObject:forKey: + set_obj_sel = objc.sel_registerName(b"setObject:forKey:") + if msg(info_dict, "respondsToSelector:", set_obj_sel, argtypes=[ctypes.c_void_p], restype=ctypes.c_bool): + msg( + info_dict, + "setObject:forKey:", + app_name_ns, + to_ns("CFBundleName"), + argtypes=[ctypes.c_void_p, ctypes.c_void_p], + ) + msg( + info_dict, + "setObject:forKey:", + app_name_ns, + to_ns("CFBundleDisplayName"), + argtypes=[ctypes.c_void_p, ctypes.c_void_p], + ) + + # 3. Update Menu items + app_cls = objc.objc_getClass(b"NSApplication") + if app_cls: + app = msg(app_cls, "sharedApplication") + if app: + # IMPORTANT: Only modify menus if they are already initialized + main_menu = msg(app, "mainMenu") + if main_menu: + num_items = msg(main_menu, "numberOfItems", restype=ctypes.c_long) + if num_items > 0: + apple_menu_item = msg( + main_menu, "itemAtIndex:", 0, argtypes=[ctypes.c_long] + ) + if apple_menu_item: + msg( + apple_menu_item, + "setTitle:", + app_name_ns, + argtypes=[ctypes.c_void_p], + ) + apple_menu = msg(apple_menu_item, "submenu") + if apple_menu: + # About item + about_item = msg( + apple_menu, "itemAtIndex:", 0, argtypes=[ctypes.c_long] + ) + if about_item: + msg( + about_item, + "setTitle:", + to_ns(f"About {app_name_str}"), + argtypes=[ctypes.c_void_p], + ) + + # Quit item - try by title first + quit_item = msg( + apple_menu, + "itemWithTitle:", + to_ns("Quit Python"), + argtypes=[ctypes.c_void_p], + ) + if not quit_item: + # Search for terminate: action + num_menu_items = msg( + apple_menu, "numberOfItems", restype=ctypes.c_long + ) + terminate_sel = objc.sel_registerName(b"terminate:") + for i in range(num_menu_items): + item = msg( + apple_menu, + "itemAtIndex:", + i, + argtypes=[ctypes.c_long], + ) + if msg(item, "action") == terminate_sel: + quit_item = item + break + + if quit_item: + msg( + quit_item, + "setTitle:", + to_ns(f"Quit {app_name_str}"), + argtypes=[ctypes.c_void_p], + ) except Exception: pass + from knoe.core.env import * # noqa: F401,F403 from knoe.core.actions import ( KnoeInstaller, @@ -107,11 +303,11 @@ class KnoeInstaller( ValidateScreenMixin, ConfigMixin, ): - """Prole GUI installer — assembled from per-screen mixins.""" + """Knoe GUI installer — assembled from per-screen mixins.""" KUBECTL_STATUS_TAB = "__kubectl_status__" - # ---- Data access bridge (satisfies ProleInstallerBase contract) ---- + # ---- Data access bridge (satisfies KnoeInstallerBase contract) ---- _INPUT_VAR_MAP: dict[str, str] = { "init_cluster.cluster_env": "cluster_env", "init_password.db_namespace": "db_namespace", @@ -144,7 +340,7 @@ class KnoeInstaller( } def _get_input(self, key: str, default: str | None = None) -> str: - """Bridge for :class:`ProleInstallerBase` — reads tk vars by key.""" + """Bridge for :class:`KnoeInstallerBase` — reads tk vars by key.""" if key.startswith("env_setup.") and hasattr(self, "_env_entries"): env_key = key[len("env_setup.") :] ent = self._env_entries.get(env_key) @@ -186,8 +382,8 @@ class KnoeInstaller( except Exception: pass if not resolved_cfg: - conf_dir = prole_conf.resolve_prole_conf_dir(PROJECT_ROOT) - resolved_cfg = prole_conf.entrypoint_path(conf_dir) + conf_dir = knoe_conf.resolve_knoe_conf_dir(PROJECT_ROOT) + resolved_cfg = knoe_conf.entrypoint_path(conf_dir) self.controller = KnoeController( PROJECT_ROOT, verbose=verbose, cfg_path=resolved_cfg @@ -199,27 +395,12 @@ class KnoeInstaller( self.screens = None self.deploy_environment = None self.root = root - self._cfg_path_override = None - if config_path: - try: - self._cfg_path_override = Path(config_path).expanduser() - except Exception: - self._cfg_path_override = None - self._installing_dep_id = None - self._managed_kubeconfig = None - self._kong_last_repair_at = 0.0 - self._kong_repair_cooldown_s = 120 - self._repair_last_run_at = 0.0 - self._repair_cooldown_s = 600 - self._repair_inflight = False - self._reset_cluster = bool(reset_cluster) - _ensure_ansible_vault_credentials(prompt_ui=True, root=root) - self._action_flags = {} - self.root.title("Knoe System Installer") + self.root.title("Knoe.DB Installer") try: - self._set_app_identity() + setup_macos_app_identity() except Exception: pass + self._cfg_path_override = None # Center window on screen window_width = 1300 @@ -294,7 +475,7 @@ class KnoeInstaller( try: from PIL import Image, ImageTk - bg_path = get_resource_path("img/proleLogoSepia.png") + bg_path = get_resource_path("img/knoeLogoSepia.png") if bg_path.exists(): original = Image.open(str(bg_path)).convert("RGBA") white_bg = Image.new("RGBA", original.size, (255, 255, 255, 255)) @@ -344,7 +525,7 @@ class KnoeInstaller( ] self.nav_widgets = {} self._mode_tab_widgets: dict = {} - self.deployment_mode = tk.StringVar(value=__import__("os").environ.get("PROLE_MODE", "k3s")) + self.deployment_mode = tk.StringVar(value=__import__("os").environ.get("KNOE_MODE", "k3s")) self._create_sidebar_nav() # Validation attributes @@ -389,8 +570,8 @@ class KnoeInstaller( # Docker import directory self.docker_import_dir = tk.StringVar() - # Initialize prole.cfg data (override base with tk-aware version) - self.prole_cfg_data = { + # Initialize knoe.cfg data (override base with tk-aware version) + self.knoe_cfg_data = { "Global": {}, "Welcome": {}, "Dependencies": {}, @@ -416,7 +597,7 @@ class KnoeInstaller( } self._cfg_secret_cache = {} self._secrets_finalized = False - # Must exist before reading prole.cfg so saved values are applied (avoid silent fallbacks). + # Must exist before reading knoe.cfg so saved values are applied (avoid silent fallbacks). self.cluster_env = tk.StringVar(value="dev") self.service_namespace = tk.StringVar(value="default") self.gitops_enabled = tk.BooleanVar(value=False) @@ -427,18 +608,18 @@ class KnoeInstaller( self.argocd_namespace = tk.StringVar(value="argocd") self.argocd_node_selector = tk.StringVar(value="") - # Load existing docker_import_dir from prole.cfg + # Load existing docker_import_dir from knoe.cfg try: - conf_dir = self._resolve_prole_conf_dir() + conf_dir = self._resolve_knoe_conf_dir() try: - prole_conf.ensure_entrypoint(conf_dir) + knoe_conf.ensure_entrypoint(conf_dir) except Exception: pass - cfg_path = prole_conf.entrypoint_path(conf_dir) + cfg_path = knoe_conf.entrypoint_path(conf_dir) if self._cfg_path_override: cfg_path = self._cfg_path_override if cfg_path.exists(): - cfg = prole_conf.load_layered_config(cfg_path) + cfg = knoe_conf.load_layered_config(cfg_path) cfg_vars = _collect_cfg_vars(cfg) if cfg.has_section("Global"): if "DOCKER_IMPORT_DIR" in cfg["Global"]: @@ -446,7 +627,7 @@ class KnoeInstaller( cfg["Global"]["DOCKER_IMPORT_DIR"], cfg_vars ) self.docker_import_dir.set(docker_dir) - self.prole_cfg_data["Global"]["DOCKER_IMPORT_DIR"] = docker_dir + self.knoe_cfg_data["Global"]["DOCKER_IMPORT_DIR"] = docker_dir saved_cluster = _expand_cfg_value( cfg["Global"].get("CLUSTER_ENV", ""), cfg_vars ).strip() @@ -514,7 +695,7 @@ class KnoeInstaller( except Exception: pass try: - self.prole_cfg_data.setdefault("Global", {})[ + self.knoe_cfg_data.setdefault("Global", {})[ "CLUSTER_ENV" ] = saved_cluster except Exception: @@ -525,7 +706,7 @@ class KnoeInstaller( except Exception: pass try: - self.prole_cfg_data.setdefault("Global", {})[ + self.knoe_cfg_data.setdefault("Global", {})[ "DATABASE_NAMESPACE" ] = saved_ns except Exception: @@ -536,7 +717,7 @@ class KnoeInstaller( except Exception: pass try: - self.prole_cfg_data.setdefault("Global", {})[ + self.knoe_cfg_data.setdefault("Global", {})[ "CLUSTER_NAME" ] = saved_cluster_name except Exception: @@ -544,7 +725,7 @@ class KnoeInstaller( if not saved_service_ns or saved_service_ns == "default": # Seed knoe-system for all managed environments so the # UI never shows the bare "default" namespace. - _env_hint = prole_conf._env_from_mode_or_env_hint( + _env_hint = knoe_conf._env_from_mode_or_env_hint( saved_cluster or os.environ.get("CLUSTER_ENV", "") ) if _env_hint in ("dev", "service", "prod"): @@ -554,7 +735,7 @@ class KnoeInstaller( self.service_namespace.set(saved_service_ns) except Exception: pass - self.prole_cfg_data["Global"][ + self.knoe_cfg_data["Global"][ "SERVICE_NAMESPACE" ] = saved_service_ns if saved_argocd_ns: @@ -562,7 +743,7 @@ class KnoeInstaller( self.argocd_namespace.set(saved_argocd_ns) except Exception: pass - self.prole_cfg_data.setdefault("Global", {})[ + self.knoe_cfg_data.setdefault("Global", {})[ "ARGOCD_NAMESPACE" ] = saved_argocd_ns if saved_gitops_ns: @@ -570,7 +751,7 @@ class KnoeInstaller( self.gitops_namespace.set(saved_gitops_ns) except Exception: pass - self.prole_cfg_data.setdefault("GitOps", {})[ + self.knoe_cfg_data.setdefault("GitOps", {})[ "NAMESPACE" ] = saved_gitops_ns if saved_gitops_node: @@ -578,7 +759,7 @@ class KnoeInstaller( self.gitops_node_selector.set(saved_gitops_node) except Exception: pass - self.prole_cfg_data.setdefault("Global", {})[ + self.knoe_cfg_data.setdefault("Global", {})[ "GITEA_NODE_SELECTOR" ] = saved_gitops_node if saved_argocd_node: @@ -586,7 +767,7 @@ class KnoeInstaller( self.argocd_node_selector.set(saved_argocd_node) except Exception: pass - self.prole_cfg_data.setdefault("Global", {})[ + self.knoe_cfg_data.setdefault("Global", {})[ "ARGOCD_NODE_SELECTOR" ] = saved_argocd_node if saved_argocd_enabled: @@ -595,7 +776,7 @@ class KnoeInstaller( self.argocd_enabled.set(val) except Exception: pass - self.prole_cfg_data.setdefault("Optional Features", {})[ + self.knoe_cfg_data.setdefault("Optional Features", {})[ "ARGOCD_ENABLED" ] = str(val) if saved_gitops_enabled: @@ -604,7 +785,7 @@ class KnoeInstaller( self.gitops_enabled.set(val) except Exception: pass - self.prole_cfg_data.setdefault("Optional Features", {})[ + self.knoe_cfg_data.setdefault("Optional Features", {})[ "GITOPS_ENABLED" ] = str(val) @@ -616,7 +797,7 @@ class KnoeInstaller( except Exception: mon[k] = v if mon: - self.prole_cfg_data["Monitoring"] = mon + self.knoe_cfg_data["Monitoring"] = mon if cfg.has_section("Prod Cluster (k8s)"): prod_sec = {} @@ -626,19 +807,19 @@ class KnoeInstaller( except Exception: prod_sec[k.upper()] = v if prod_sec: - self.prole_cfg_data["Prod Cluster (k8s)"].update(prod_sec) + self.knoe_cfg_data["Prod Cluster (k8s)"].update(prod_sec) gcp_cfg_path = conf_dir / "prod" / "gcp.cfg" gcp_values = _parse_gcp_cfg(gcp_cfg_path) if gcp_values: - self.prole_cfg_data.setdefault("GCP", {}).update( + self.knoe_cfg_data.setdefault("GCP", {}).update( {k.upper(): v for k, v in gcp_values.items()} ) # Preserve raw shell/config expressions for persistence so paths # like `${HOME}/...` remain portable across hosts. for section in cfg.sections(): - section_data = self.prole_cfg_data.setdefault(section, {}) + section_data = self.knoe_cfg_data.setdefault(section, {}) for key, raw_value in cfg.items(section): section_data[key] = _preserve_cfg_expr_for_persistence( raw_value, @@ -648,8 +829,8 @@ class KnoeInstaller( pass # NOTE: Monitoring storage base paths are currently pinned in the - # monitoring deploy script/Helm values (not persisted in prole.cfg). - self.prole_cfg_data["Global"].setdefault( + # monitoring deploy script/Helm values (not persisted in knoe.cfg). + self.knoe_cfg_data["Global"].setdefault( "SERVICE_NAMESPACE", self.service_namespace.get() ) @@ -674,7 +855,7 @@ class KnoeInstaller( self.k3d_cluster_list = tk.Variable(value=[]) self.selected_k3d_cluster = tk.StringVar() try: - cfg_env = (self.prole_cfg_data.get("Initialize Cluster", {}) or {}).get( + cfg_env = (self.knoe_cfg_data.get("Initialize Cluster", {}) or {}).get( "ENVIRONMENT", "" ) if _normalize_cluster_env(cfg_env) == "dev": @@ -694,10 +875,10 @@ class KnoeInstaller( self.app_cluster_kubecontext = tk.StringVar() self.db_cluster_kubecontext = tk.StringVar() try: - # Prefer explicit prole.cfg selection; fall back to the dev-cluster section. + # Prefer explicit knoe.cfg selection; fall back to the dev-cluster section. saved_ctx = ( - (self.prole_cfg_data.get("Global", {}) or {}).get("KUBECONTEXT", "") - or (self.prole_cfg_data.get("Dev Cluster (k3d)", {}) or {}).get( + (self.knoe_cfg_data.get("Global", {}) or {}).get("KUBECONTEXT", "") + or (self.knoe_cfg_data.get("Dev Cluster (k3d)", {}) or {}).get( "KUBECTL_CONTEXT", "" ) ) @@ -705,7 +886,7 @@ class KnoeInstaller( if saved_ctx: self.selected_kubectx.set(saved_ctx) # Pre-populate dual App/DB context selectors from [Inputs] - inputs = self.prole_cfg_data.get("Inputs", {}) or {} + inputs = self.knoe_cfg_data.get("Inputs", {}) or {} saved_app = str(inputs.get("init_cluster.app_cluster_kubecontext") or "").strip() saved_db = str(inputs.get("init_cluster.db_cluster_kubecontext") or "").strip() if saved_app: @@ -718,7 +899,7 @@ class KnoeInstaller( value=str(PROJECT_ROOT / "data" / "staging") ) saved_artifacts_dir = ( - self.prole_cfg_data.get("Prod Cluster (k8s)", {}) + self.knoe_cfg_data.get("Prod Cluster (k8s)", {}) .get("ARTIFACTS_DIR", "") .strip() ) @@ -728,7 +909,7 @@ class KnoeInstaller( except Exception: pass # Stash GCP values so _ensure_prod_config_state can apply them lazily. - self._gcp_cfg_values = dict(self.prole_cfg_data.get("GCP", {})) + self._gcp_cfg_values = dict(self.knoe_cfg_data.get("GCP", {})) # GitOps provider choice (gitea / argocd / none) self.gitops_provider = tk.StringVar(value="gitea") # Google Workspace @@ -757,13 +938,13 @@ class KnoeInstaller( self.cnpg_cluster_name = tk.StringVar(value=self._cnpg_cluster_name()) try: _ns_from_cfg = ( - (self.prole_cfg_data.get("Global", {}) or {}) + (self.knoe_cfg_data.get("Global", {}) or {}) .get("DATABASE_NAMESPACE", "") .strip() ) if not _ns_from_cfg: _ns_from_cfg = ( - (self.prole_cfg_data.get("Global", {}) or {}) + (self.knoe_cfg_data.get("Global", {}) or {}) .get("NAMESPACE", "") .strip() ) @@ -796,7 +977,7 @@ class KnoeInstaller( self.kerberos_password = tk.StringVar() self.kerberos_kdc = tk.StringVar() self.supabase_enabled = tk.BooleanVar(value=False) - _global_cfg = self.prole_cfg_data.get("Global", {}) or {} + _global_cfg = self.knoe_cfg_data.get("Global", {}) or {} _supabase_pv_node = ( (_global_cfg.get("SUPABASE_PV_NODE", "") or "").strip() or (os.environ.get("SUPABASE_PV_NODE") or "").strip() @@ -910,7 +1091,7 @@ class KnoeInstaller( # Initial render self.root.after( - 100, lambda: self.selected_local_path.set(str(self._get_prole_dist_dir())) + 100, lambda: self.selected_local_path.set(str(self._get_knoe_dist_dir())) ) self.update_footer() self.show_page(0) @@ -939,19 +1120,19 @@ def has_display(): def main(): import argparse - parser = argparse.ArgumentParser(description="Knoe System Installer") + parser = argparse.ArgumentParser(description="Knoe.DB Installer") parser.add_argument( "-c", "--config", default=None, - help="Path to prole.cfg for saving or silent replay", + help="Path to knoe.cfg for saving or silent replay", ) parser.add_argument( "-s", "-S", "--silent", action="store_true", - help="Run unattended install in console mode using prole.cfg", + help="Run unattended install in console mode using knoe.cfg", ) parser.add_argument( "-l", @@ -959,7 +1140,7 @@ def main(): nargs="?", const=True, default=None, - help="Enable logging to file. Optionally provide a path (default: /tmp/prole_install_output.log)", + help="Enable logging to file. Optionally provide a path (default: /tmp/knoe_install_output.log)", ) parser.add_argument( "--prepare-k3s-pipeline", @@ -992,12 +1173,12 @@ def main(): parser.add_argument( "--repair", action="store_true", - help="Run unattended repair flow using prole.cfg", + help="Run unattended repair flow using knoe.cfg", ) parser.add_argument( "--update", action="store_true", - help="Run unattended update flow using prole.cfg", + help="Run unattended update flow using knoe.cfg", ) parser.add_argument( "--min", @@ -1019,7 +1200,7 @@ def main(): if args.log is True: import tempfile - log_file_path = "/tmp/prole_install_output.log" + log_file_path = "/tmp/knoe_install_output.log" else: log_file_path = args.log @@ -1090,8 +1271,18 @@ def main(): if use_gui: try: + # Set macOS identity as early as possible + try: + setup_macos_app_identity() + except Exception: + pass root = tk.Tk() - root.title("Knoe System Installer") + root.title("Knoe.DB Installer") + # Set macOS identity again AFTER tk.Tk() but BEFORE mainloop + try: + setup_macos_app_identity() + except Exception: + pass window_width, window_height = 1000, 700 try: sw, sh = root.winfo_screenwidth(), root.winfo_screenheight() diff --git a/knoe/ui/screens/argocd.py b/knoe/ui/screens/argocd.py index 857d5a2..ed91528 100644 --- a/knoe/ui/screens/argocd.py +++ b/knoe/ui/screens/argocd.py @@ -176,8 +176,8 @@ class ArgoCDScreenMixin: or "argocd" ) env = os.environ.copy() - env["PROLE_HOME"] = str(PROJECT_ROOT) - env["PROLE_SERVICE"] = str(PROJECT_ROOT) + env["KNOE_HOME"] = str(PROJECT_ROOT) + env["KNOE_SERVICE"] = str(PROJECT_ROOT) env["NAMESPACE"] = namespace env["ARGOCD_NAMESPACE"] = namespace @@ -195,7 +195,7 @@ class ArgoCDScreenMixin: self._argocd_deploying = False return - mode = (os.environ.get("PROLE_MODE") or "").strip() + mode = (os.environ.get("KNOE_MODE") or "").strip() if not mode: cluster_env = _normalize_cluster_env(self.cluster_env.get()) if cluster_env == "dev": @@ -216,15 +216,15 @@ class ArgoCDScreenMixin: if self._cfg_path_override and self._cfg_path_override.exists(): cfg_path = self._cfg_path_override else: - conf_dir = self._resolve_prole_conf_dir() - candidate = conf_dir / "prole.cfg" + conf_dir = self._resolve_knoe_conf_dir() + candidate = conf_dir / "knoe.cfg" if candidate.exists(): cfg_path = candidate if not cfg_path: - from knoe import prole_conf + from knoe import knoe_conf - candidate = prole_conf.entrypoint_path( - prole_conf.resolve_prole_conf_dir(PROJECT_ROOT) + candidate = knoe_conf.entrypoint_path( + knoe_conf.resolve_knoe_conf_dir(PROJECT_ROOT) ) if candidate.exists(): cfg_path = candidate @@ -292,12 +292,12 @@ class ArgoCDScreenMixin: def _on_argocd_toggle(self): enabled = self.argocd_enabled.get() try: - self.prole_cfg_data["Optional Features"]["ARGOCD_ENABLED"] = str(enabled) + self.knoe_cfg_data["Optional Features"]["ARGOCD_ENABLED"] = str(enabled) # Keep compatibility with other parts of the installer that expect Global.ARGOCD_NAMESPACE. - self.prole_cfg_data.setdefault("Global", {})["ARGOCD_NAMESPACE"] = ( + self.knoe_cfg_data.setdefault("Global", {})["ARGOCD_NAMESPACE"] = ( (self.argocd_namespace.get() or "").strip() or "argocd" ) - self._save_prole_cfg() + self._save_knoe_cfg() except Exception: pass diff --git a/knoe/ui/screens/base.py b/knoe/ui/screens/base.py index 0a158b6..ecb9b37 100644 --- a/knoe/ui/screens/base.py +++ b/knoe/ui/screens/base.py @@ -41,7 +41,7 @@ class ScreenBaseMixin: def _is_k3s_mode_active(self): """Return True when current mode resolves to k3s/service cluster.""" - mode = (os.environ.get("PROLE_MODE") or "").strip().lower() + mode = (os.environ.get("KNOE_MODE") or "").strip().lower() if mode == "k3s": return True try: diff --git a/knoe/ui/screens/build.py b/knoe/ui/screens/build.py index b1f8982..c969ac6 100644 --- a/knoe/ui/screens/build.py +++ b/knoe/ui/screens/build.py @@ -46,9 +46,9 @@ class BuildScreenMixin: ) # Shifted up to accommodate radios and standard console position - self._render_title("Build Prole Tools.app", y=80) + self._render_title("Build Knoe Tools.app", y=80) self._render_paragraph( - "Build and prepare Prole Tools.app for deployment.", y=130 + "Build and prepare Knoe Tools.app for deployment.", y=130 ) # Canvas-drawn radio buttons (no ttk widgets to avoid grey/white boxes) @@ -188,11 +188,11 @@ class BuildScreenMixin: # self._register_page('build', f) def perform_build(self): - """Run Prole build in an embedded console (Scoped bash subprocess).""" + """Run Knoe build in an embedded console (Scoped bash subprocess).""" self._action_flags["build.run_build"] = True # Ensure environment exists and is readable before attempting build try: - self.ensure_prole_env() + self.ensure_knoe_env() except Exception as e: # Print a readable error to the console area and abort try: @@ -213,7 +213,7 @@ class BuildScreenMixin: self._built_success = False except Exception: pass - logs_dir = self._resolve_prole_logs_dir() + logs_dir = self._resolve_knoe_logs_dir() try: logs_dir.mkdir(parents=True, exist_ok=True) except Exception: @@ -826,6 +826,6 @@ echo "-------------------------------------------------------------------"; """Check if Xcode Command Line Tools are installed via deploy helper.""" return inst_deploy.check_xcode_tools() - def build_prole_app(self): - """Delegate building the native ProleStatus app to deploy helper.""" - return inst_deploy.build_prole_app(PROJECT_ROOT) + def build_knoe_app(self): + """Delegate building the native KnoeStatus app to deploy helper.""" + return inst_deploy.build_knoe_app(PROJECT_ROOT) diff --git a/knoe/ui/screens/cfg.py b/knoe/ui/screens/cfg.py index 93167b9..9fb8341 100644 --- a/knoe/ui/screens/cfg.py +++ b/knoe/ui/screens/cfg.py @@ -1,4 +1,4 @@ -"""prole.cfg persistence, input snapshot collection and port-forward management.""" +"""knoe.cfg persistence, input snapshot collection and port-forward management.""" import configparser import os @@ -29,19 +29,19 @@ from knoe.core.env import ( _pf_extract_id, _pf_upsert_mapping, _read_k3s_cfg, - _render_prole_cfg, + _render_knoe_cfg, ) class ConfigMixin: - """prole.cfg persistence, input snapshot collection and port-forward management.""" + """knoe.cfg persistence, input snapshot collection and port-forward management.""" # Namespace typing can trigger many trace events; debounce propagation to avoid # incremental substring rewrites across unrelated fields. NAMESPACE_PROPAGATE_DEBOUNCE_MS = 250 - def _save_prole_cfg(self): - """Generates prole.cfg; master configuration file containing all values used in install process.""" + def _save_knoe_cfg(self): + """Generates knoe.cfg; master configuration file containing all values used in install process.""" try: # Check port availability before saving # try: @@ -53,8 +53,8 @@ class ConfigMixin: # messagebox.showerror("Invalid Port", "Please enter a valid numeric port.") # return - # Determine conf dir; resolve the env-specific prole.cfg path (no symlink needed). - import knoe.prole_conf as _prole_conf_mod + # Determine conf dir; resolve the env-specific knoe.cfg path (no symlink needed). + import knoe.knoe_conf as _knoe_conf_mod if self._cfg_path_override is not None: cfg_path = self._cfg_path_override if cfg_path.is_dir(): @@ -62,39 +62,39 @@ class ConfigMixin: else: conf_dir = cfg_path.parent else: - _prole_conf_env = os.environ.get("PROLE_CONF") - if _prole_conf_env: - conf_dir = Path(_prole_conf_env).expanduser() + _knoe_conf_env = os.environ.get("KNOE_CONF") + if _knoe_conf_env: + conf_dir = Path(_knoe_conf_env).expanduser() else: conf_dir = PROJECT_ROOT / "conf" - os.environ.setdefault("PROLE_CONF", str(conf_dir)) + os.environ.setdefault("KNOE_CONF", str(conf_dir)) conf_dir.mkdir(parents=True, exist_ok=True) # Activate the environment (sets CLUSTER_ENV env var; no symlink created). try: - _prole_conf_mod.activate_environment(conf_dir, self.cluster_env.get()) + _knoe_conf_mod.activate_environment(conf_dir, self.cluster_env.get()) except Exception: pass # Resolve the correct env-specific path (e.g. conf/gke.cfg). - cfg_path = _prole_conf_mod.entrypoint_path(conf_dir) + cfg_path = _knoe_conf_mod.entrypoint_path(conf_dir) # Identify global candidates mode = self._deployment_mode() persistence_mode = mode or self.cluster_env.get() target_label = _deployment_target_label(self.cluster_env.get()) - # New policy: do not persist default filesystem paths into prole.cfg. - # Persist PROLE_HOME only when it differs from the installer default. - default_home = str(Path(os.path.expanduser("~")) / "dev" / "prole") - env_prole_home = (os.environ.get("PROLE_HOME") or "").strip() + # New policy: do not persist default filesystem paths into knoe.cfg. + # Persist KNOE_HOME only when it differs from the installer default. + default_home = str(Path(os.path.expanduser("~")) / "dev" / "knoe") + env_knoe_home = (os.environ.get("KNOE_HOME") or "").strip() try: - env_prole_home_norm = str(Path(env_prole_home).expanduser()) if env_prole_home else "" + env_knoe_home_norm = str(Path(env_knoe_home).expanduser()) if env_knoe_home else "" except Exception: - env_prole_home_norm = env_prole_home - prole_home_override = ( - env_prole_home_norm - if env_prole_home_norm and env_prole_home_norm != default_home + env_knoe_home_norm = env_knoe_home + knoe_home_override = ( + env_knoe_home_norm + if env_knoe_home_norm and env_knoe_home_norm != default_home else "" ) globals_to_save = { @@ -115,8 +115,8 @@ class ConfigMixin: "ARGOCD_NODE_SELECTOR": (self.argocd_node_selector.get() or "").strip(), "PROLE_OPENTOFU_URL": _default_opentofu_pipeline_url(), } - if prole_home_override: - globals_to_save["PROLE_HOME"] = prole_home_override + if knoe_home_override: + globals_to_save["KNOE_HOME"] = knoe_home_override # Persist the active kubectl context explicitly so shell helpers and scripts # do not rely on implicit kubectl state. @@ -129,15 +129,15 @@ class ConfigMixin: except Exception: pass # Merge any other values already present in existing Global without overriding explicit UI values - existing_global = dict(self.prole_cfg_data.get("Global", {})) + existing_global = dict(self.knoe_cfg_data.get("Global", {})) for k, v in existing_global.items(): if k not in globals_to_save or not str(globals_to_save.get(k, "")).strip(): globals_to_save[k] = v - # Ensure we never reintroduce default PROLE_HOME via existing config. + # Ensure we never reintroduce default KNOE_HOME via existing config. try: - if str(globals_to_save.get("PROLE_HOME", "")).strip() == default_home: - globals_to_save.pop("PROLE_HOME", None) + if str(globals_to_save.get("KNOE_HOME", "")).strip() == default_home: + globals_to_save.pop("KNOE_HOME", None) except Exception: pass globals_to_save.setdefault("DOCKER_PRELOAD", "false") @@ -171,8 +171,8 @@ class ConfigMixin: "PROLE_K3S_TOKEN", "KUBECONTEXT", } - if prole_home_override: - explicit_global_keys.add("PROLE_HOME") + if knoe_home_override: + explicit_global_keys.add("KNOE_HOME") explicit_service_namespace = False try: explicit_service_namespace = bool( @@ -203,7 +203,7 @@ class ConfigMixin: inputs = {} sections = { - k: self.prole_cfg_data.get(k, {}) + k: self.knoe_cfg_data.get(k, {}) for k in [ "Welcome", "Dependencies", @@ -230,26 +230,26 @@ class ConfigMixin: sections["Deployment"] = deployment_section sections["Dev Cluster (k3d)"] = { - **self.prole_cfg_data.get("Dev Cluster (k3d)", {}), + **self.knoe_cfg_data.get("Dev Cluster (k3d)", {}), "MODE": "k3d", "CLUSTER_ENV": "dev", "DISPLAY_NAME": "knoe-dev-cluster", "KUBECTL_CONTEXT": (self.selected_kubectx.get() or "").strip(), } sections["Service Cluster (k3s)"] = { - **self.prole_cfg_data.get("Service Cluster (k3s)", {}), + **self.knoe_cfg_data.get("Service Cluster (k3s)", {}), "MODE": "k3s", - "CLUSTER_ENV": "prole-service-cluster", - "DISPLAY_NAME": "prole-service-cluster", + "CLUSTER_ENV": "knoe-service-cluster", + "DISPLAY_NAME": "knoe-service-cluster", "K3S_SERVER_URL": (self.k3s_server_url.get() or "").strip(), "K3S_TOKEN": _encrypt_cfg_secret(self.k3s_token.get() or ""), "PIPELINE_URL": _default_opentofu_pipeline_url(), } sections["Prod Cluster (k8s)"] = { - **self.prole_cfg_data.get("Prod Cluster (k8s)", {}), + **self.knoe_cfg_data.get("Prod Cluster (k8s)", {}), "MODE": "k8s", - "CLUSTER_ENV": "prole-prod-cluster", - "DISPLAY_NAME": "prole-prod-cluster", + "CLUSTER_ENV": "knoe-prod-cluster", + "DISPLAY_NAME": "knoe-prod-cluster", "ARTIFACTS_DIR": (self.prod_artifacts_path.get() or "").strip(), "PIPELINE_URL": _default_opentofu_pipeline_url(), } @@ -269,18 +269,18 @@ class ConfigMixin: for section_name, section_values in sections.items() } - # Sync to Ansible Prole Vault - self._save_ansible_prole_vault(self.db_password.get()) + # Sync to Ansible Knoe Vault + self._save_ansible_knoe_vault(self.db_password.get()) - cfg_text = _render_prole_cfg(inputs, globals_to_save, sections) + cfg_text = _render_knoe_cfg(inputs, globals_to_save, sections) cfg_path.write_text(cfg_text) - print(f"[DEBUG] prole.cfg saved to {cfg_path}") + print(f"[DEBUG] knoe.cfg saved to {cfg_path}") except Exception as e: - print(f"[ERROR] Failed to save prole.cfg: {e}") + print(f"[ERROR] Failed to save knoe.cfg: {e}") def _collect_input_snapshot(self) -> dict: - """Collect all possible user inputs for prole.cfg replay.""" + """Collect all possible user inputs for knoe.cfg replay.""" inputs: dict[str, str] = {} def _set(key: str, val): @@ -336,11 +336,11 @@ class ConfigMixin: except Exception: pass for k in ( - "PROLE_HOME", - "PROLE_CONF", + "KNOE_HOME", + "KNOE_CONF", "PROLE_DATA", "PROLE_LOGS", - "PROLE_SERVICE", + "KNOE_SERVICE", ): if os.environ.get(k): env_vals[k] = os.environ.get(k) @@ -369,11 +369,11 @@ class ConfigMixin: resolved_now = {} for k in ( - "PROLE_HOME", - "PROLE_CONF", + "KNOE_HOME", + "KNOE_CONF", "PROLE_DATA", "PROLE_LOGS", - "PROLE_SERVICE", + "KNOE_SERVICE", ): rv = (resolved_now.get(k) or "").strip() dv = (resolved_defaults.get(k) or "").strip() @@ -581,7 +581,7 @@ class ConfigMixin: else "PORT_FORWARD_K3D_MAPPING_" ) - pf_section = self.prole_cfg_data.get("Port Forwards", {}) + pf_section = self.knoe_cfg_data.get("Port Forwards", {}) if pf_section is None: pf_section = {} @@ -593,7 +593,7 @@ class ConfigMixin: service_ns = "default" argocd_ns = ( - (self.prole_cfg_data.get("Global", {}) or {}) + (self.knoe_cfg_data.get("Global", {}) or {}) .get("ARGOCD_NAMESPACE", "") .strip() ) @@ -608,13 +608,13 @@ class ConfigMixin: db_ns = "" if not db_ns: db_ns = ( - (self.prole_cfg_data.get("Global", {}) or {}) + (self.knoe_cfg_data.get("Global", {}) or {}) .get("DATABASE_NAMESPACE", "") .strip() ) if not db_ns: db_ns = ( - (self.prole_cfg_data.get("Global", {}) or {}) + (self.knoe_cfg_data.get("Global", {}) or {}) .get("NAMESPACE", "") .strip() ) @@ -631,7 +631,7 @@ class ConfigMixin: db_host_port = "" if not db_host_port: db_host_port = ( - (self.prole_cfg_data.get("Global", {}) or {}) + (self.knoe_cfg_data.get("Global", {}) or {}) .get("DB_HOST_PORT", "") .strip() ) @@ -647,7 +647,7 @@ class ConfigMixin: supabase_ns = (os.environ.get("SUPABASE_NAMESPACE") or "").strip() if not supabase_ns: supabase_ns = ( - (self.prole_cfg_data.get("Supabase", {}) or {}) + (self.knoe_cfg_data.get("Supabase", {}) or {}) .get("NAMESPACE", "") .strip() ) @@ -662,7 +662,7 @@ class ConfigMixin: gitops_ns = (os.environ.get("GITEA_NAMESPACE") or "").strip() if not gitops_ns: gitops_ns = ( - (self.prole_cfg_data.get("GitOps", {}) or {}) + (self.knoe_cfg_data.get("GitOps", {}) or {}) .get("GITOPS_NAMESPACE", "") .strip() ) @@ -683,14 +683,14 @@ class ConfigMixin: for mapping in mappings: _pf_upsert_mapping(pf_section, prefix, mapping) - self.prole_cfg_data["Port Forwards"] = pf_section + self.knoe_cfg_data["Port Forwards"] = pf_section self._update_legacy_port_mapping() def _update_legacy_port_mapping(self): conf_dir = PROJECT_ROOT / "conf" mapping_path = conf_dir / "port-mapping.cfg" - pf_section = self.prole_cfg_data.get("Port Forwards", {}) + pf_section = self.knoe_cfg_data.get("Port Forwards", {}) if pf_section is None: pf_section = {} @@ -711,13 +711,13 @@ class ConfigMixin: db_ns = "" if not db_ns: db_ns = ( - (self.prole_cfg_data.get("Global", {}) or {}) + (self.knoe_cfg_data.get("Global", {}) or {}) .get("DATABASE_NAMESPACE", "") .strip() ) if not db_ns: db_ns = ( - (self.prole_cfg_data.get("Global", {}) or {}) + (self.knoe_cfg_data.get("Global", {}) or {}) .get("NAMESPACE", "") .strip() ) @@ -725,7 +725,7 @@ class ConfigMixin: db_ns = "default" lines = [ - "# Port mappings for Prole Tools (generated).", + "# Port mappings for Knoe Tools (generated).", "# Format: key: local=... remote=... ns=... svc=... address=...", "", ] @@ -785,26 +785,26 @@ class ConfigMixin: else "PORT_FORWARD_K3D_MAPPING_" ) - pf_section = self.prole_cfg_data.get("Port Forwards", {}) + pf_section = self.knoe_cfg_data.get("Port Forwards", {}) if pf_section is None: pf_section = {} if not _pf_upsert_mapping(pf_section, prefix, mapping_str): return - self.prole_cfg_data["Port Forwards"] = pf_section - self._save_prole_cfg() + self.knoe_cfg_data["Port Forwards"] = pf_section + self._save_knoe_cfg() def _process_script_output_line(self, line): if "GRAFANA_ADMIN_PASSWORD=" in line: pwd = line.split("GRAFANA_ADMIN_PASSWORD=")[1].strip() if pwd: - mon = self.prole_cfg_data.get("Monitoring", {}) + mon = self.knoe_cfg_data.get("Monitoring", {}) if mon is None: mon = {} mon["GRAFANA_ADMIN_PASSWORD"] = pwd - self.prole_cfg_data["Monitoring"] = mon - self._save_prole_cfg() + self.knoe_cfg_data["Monitoring"] = mon + self._save_knoe_cfg() if "PORT_FORWARD_MAPPING:" in line: mapping = line.split("PORT_FORWARD_MAPPING:")[1].strip() @@ -857,7 +857,7 @@ class ConfigMixin: if mode == "k3s" else "PORT_FORWARD_K3D_MAPPING_" ) - pf_section = self.prole_cfg_data.get("Port Forwards", {}) or {} + pf_section = self.knoe_cfg_data.get("Port Forwards", {}) or {} port_index = {} for key, mapping in pf_section.items(): @@ -978,7 +978,7 @@ class ConfigMixin: self.ansible_topology = info self.ansible_topology_summary = _format_ansible_topology_summary(info) try: - net = self.prole_cfg_data.get("Network", {}) + net = self.knoe_cfg_data.get("Network", {}) if info.get("topology_json"): net["ANSIBLE_TOPOLOGY"] = info["topology_json"] if info.get("inventory_path"): @@ -995,7 +995,7 @@ class ConfigMixin: net["AD_DC_IP"] = info["ad_dc_ip"] if info.get("kdc_ip"): net["KDC_ANSIBLE_DETECTED"] = info["kdc_ip"] - self.prole_cfg_data["Network"] = net + self.knoe_cfg_data["Network"] = net except Exception: pass @@ -1009,7 +1009,7 @@ class ConfigMixin: pass def _read_k3s_cfg_values(self) -> tuple[str, str, str]: - """Return (cluster_env, server_url, token) from prole.cfg if present. + """Return (cluster_env, server_url, token) from knoe.cfg if present. Delegates to the shared ``_read_k3s_cfg`` so every presentation layer (Tk, ncurses, silent) parses the same cfg sections. @@ -1019,9 +1019,9 @@ class ConfigMixin: if self._cfg_path_override is not None: cfg_path = self._cfg_path_override if cfg_path.is_dir(): - cfg_path = cfg_path / "prole.cfg" + cfg_path = cfg_path / "knoe.cfg" else: - cfg_path = self._resolve_prole_conf_dir() / "prole.cfg" + cfg_path = self._resolve_knoe_conf_dir() / "knoe.cfg" except Exception: cfg_path = None return _read_k3s_cfg(cfg_path) @@ -1178,14 +1178,14 @@ class ConfigMixin: continue self.inputs[k] = v.replace(old_ns, new_ns) - # Update environment and save prole.cfg + # Update environment and save knoe.cfg try: self._last_synced_ns = new_ns except Exception: pass try: self._update_env_namespace(new_ns) - # Re-save prole.cfg so it's always in sync - self._save_prole_cfg() + # Re-save knoe.cfg so it's always in sync + self._save_knoe_cfg() except Exception: pass diff --git a/knoe/ui/screens/cluster.py b/knoe/ui/screens/cluster.py index 83a4ef6..b667f3f 100644 --- a/knoe/ui/screens/cluster.py +++ b/knoe/ui/screens/cluster.py @@ -11,7 +11,7 @@ from pathlib import Path from tkinter import ttk, messagebox, filedialog import json -from knoe import prole_conf +from knoe import knoe_conf from knoe import screen as ui from knoe.config import ( _collect_cfg_vars_from_data, @@ -28,7 +28,7 @@ from knoe.core.env import ( _deployment_mode_from_env, _deployment_target_label, _find_kubeconfig_file, - _k3d_prole_data_volume_args, + _k3d_knoe_data_volume_args, _normalize_cluster_env, _normalize_k3s_token, _resolve_k3s_connection as _resolve_k3s_connection_fn, @@ -309,8 +309,8 @@ class ClusterScreenMixin: if current_ctx and current_ctx in values: self.selected_kubectx.set(current_ctx) - elif "prole-k3s" in values: - self.selected_kubectx.set("prole-k3s") + elif "knoe-k3s" in values: + self.selected_kubectx.set("knoe-k3s") else: self.selected_kubectx.set(values[0]) combo_win = self.bg_canvas.create_window( @@ -604,7 +604,7 @@ class ClusterScreenMixin: def _on_load_gcp_cfg(): import glob as _glob - conf_dir = self._resolve_prole_conf_dir() + conf_dir = self._resolve_knoe_conf_dir() found = sorted(_glob.glob(str(conf_dir / "**" / "gcp.cfg"), recursive=True)) prod_path = conf_dir / "prod" / "gcp.cfg" chosen = prod_path if prod_path.exists() else (Path(found[0]) if found else None) @@ -622,8 +622,8 @@ class ClusterScreenMixin: _mb.showwarning("GCP Setup", f"No values found in:\n{chosen}") return upper = {k.upper(): v for k, v in loaded.items()} - self.prole_cfg_data.setdefault("GCP", {}).update(upper) - self._gcp_cfg_values = dict(self.prole_cfg_data["GCP"]) + self.knoe_cfg_data.setdefault("GCP", {}).update(upper) + self._gcp_cfg_values = dict(self.knoe_cfg_data["GCP"]) if upper.get("PROJECT_ID"): self.prod_form_vars["cloud.projectId"].set(upper["PROJECT_ID"]) if upper.get("REGION"): @@ -1168,7 +1168,7 @@ class ClusterScreenMixin: if not value: try: value = ( - (self.prole_cfg_data.get("Initialize Cluster", {}) or {}) + (self.knoe_cfg_data.get("Initialize Cluster", {}) or {}) .get("ENVIRONMENT", "") .strip() ) @@ -1177,7 +1177,7 @@ class ClusterScreenMixin: if not value: try: value = ( - (self.prole_cfg_data.get("Global", {}) or {}) + (self.knoe_cfg_data.get("Global", {}) or {}) .get("CLUSTER_ENV", "") .strip() ) @@ -1211,7 +1211,7 @@ class ClusterScreenMixin: try: candidate_namespaces.append( ( - (self.prole_cfg_data.get("Global", {}) or {}) + (self.knoe_cfg_data.get("Global", {}) or {}) .get("SERVICE_NAMESPACE", "") .strip() ) @@ -1344,8 +1344,8 @@ class ClusterScreenMixin: def _on_cluster_env_change(self, *args): # Keep configuration environment selection explicit and stable. try: - conf_dir = self._resolve_prole_conf_dir() - prole_conf.activate_environment(conf_dir, self.cluster_env.get()) + conf_dir = self._resolve_knoe_conf_dir() + knoe_conf.activate_environment(conf_dir, self.cluster_env.get()) except Exception: pass self._set_deploy_target_from_cluster_env() @@ -1356,13 +1356,13 @@ class ClusterScreenMixin: self._apply_k3s_defaults() except Exception: pass - # Prefer prole-k3s context if present, but require explicit Apply. + # Prefer knoe-k3s context if present, but require explicit Apply. try: values = self._get_kubectx_list() except Exception: values = [] - if hasattr(self, "selected_kubectx") and "prole-k3s" in (values or []): - self.selected_kubectx.set("prole-k3s") + if hasattr(self, "selected_kubectx") and "knoe-k3s" in (values or []): + self.selected_kubectx.set("knoe-k3s") self._update_kubectx_apply_button() elif env_key == "dev": name = self.selected_k3d_cluster.get() @@ -1393,7 +1393,7 @@ class ClusterScreenMixin: section = "Prod Cluster (k8s)" if section: url = ( - (self.prole_cfg_data.get(section, {}) or {}) + (self.knoe_cfg_data.get(section, {}) or {}) .get("PIPELINE_URL", "") .strip() ) @@ -1573,7 +1573,7 @@ class ClusterScreenMixin: return False candidates = [] - env_home = (os.environ.get("PROLE_HOME") or "").strip() + env_home = (os.environ.get("KNOE_HOME") or "").strip() if env_home: candidates.append(Path(env_home)) candidates.append(PROJECT_ROOT) @@ -1582,7 +1582,7 @@ class ClusterScreenMixin: try: if (base / "authority").is_dir(): return False - if (base / "prole" / "authority").is_dir(): + if (base / "knoe" / "authority").is_dir(): return False except Exception: continue @@ -1620,9 +1620,9 @@ class ClusterScreenMixin: ns = (self.db_namespace.get() or "").strip() or "default" env = self._script_env_for_namespace(ns) if env_key == "service": - env["PROLE_MODE"] = "k3s" + env["KNOE_MODE"] = "k3s" elif env_key == "dev": - env["PROLE_MODE"] = "k3d" + env["KNOE_MODE"] = "k3d" self._set_cluster_env_message( "Repair pipeline started", "#34c759", clear_after_ms=3000 ) @@ -1779,12 +1779,12 @@ class ClusterScreenMixin: pass try: # Build the k3d create command - prole_data = str(self._resolve_env_dir("PROLE_DATA", "data")) - volume_args = _k3d_prole_data_volume_args(prole_data) + knoe_data = str(self._resolve_env_dir("PROLE_DATA", "data")) + volume_args = _k3d_knoe_data_volume_args(knoe_data) reg_args = [] if getattr(self, "registry_url", None): if self.registry_url.startswith("localhost:5000"): - reg_args = ["--registry-create", "prole-registry:0.0.0.0:5000"] + reg_args = ["--registry-create", "knoe-registry:0.0.0.0:5000"] else: reg_args = ["--registry-use", self.registry_url] cmd = ( @@ -1981,7 +1981,7 @@ class ClusterScreenMixin: ) def _on_kubectx_apply_dual(self): - """Save explicit App + DB cluster contexts to prole.cfg [Inputs] and [Global].""" + """Save explicit App + DB cluster contexts to knoe.cfg [Inputs] and [Global].""" app_ctx = (self.app_cluster_kubecontext.get() or "").strip() db_ctx = (self.db_cluster_kubecontext.get() or "").strip() if not app_ctx or not db_ctx: @@ -1991,7 +1991,7 @@ class ClusterScreenMixin: return # Persist to [Inputs] so they survive installer regeneration. - inputs = self.prole_cfg_data.setdefault("Inputs", {}) + inputs = self.knoe_cfg_data.setdefault("Inputs", {}) inputs["init_cluster.app_cluster_kubecontext"] = app_ctx inputs["init_cluster.db_cluster_kubecontext"] = db_ctx inputs["env_setup.APP_CLUSTER_KUBECONTEXT"] = app_ctx @@ -1999,12 +1999,12 @@ class ClusterScreenMixin: # Global.KUBECONTEXT = APP cluster — common services (garage, openbao, kong, # monitoring) live there. DB cluster is always accessed via DB_CLUSTER_KUBECONTEXT. - glob = self.prole_cfg_data.setdefault("Global", {}) + glob = self.knoe_cfg_data.setdefault("Global", {}) glob["KUBECONTEXT"] = app_ctx glob["APP_CLUSTER_KUBECONTEXT"] = app_ctx glob["DB_CLUSTER_KUBECONTEXT"] = db_ctx - self._save_prole_cfg() + self._save_knoe_cfg() # Switch ambient kubectl context to the app cluster (matches Global.KUBECONTEXT). self._switch_kubectx(app_ctx) @@ -2184,21 +2184,21 @@ class ClusterScreenMixin: "routing.frontdoorHost": tk.StringVar(value="knoey.com"), "routing.platformDomain": tk.StringVar(value="knoe.dev"), "routing.tlsMode": tk.StringVar(value="managed"), - "migration.sourceEnvironment": tk.StringVar(value="prole.org"), + "migration.sourceEnvironment": tk.StringVar(value="knoe.org"), "migration.mode": tk.StringVar(value="snapshot-restore"), - "migration.sourceHost": tk.StringVar(value="knoe-local-db.prole.org"), + "migration.sourceHost": tk.StringVar(value="knoe-local-db.knoe.org"), "migration.sourcePort": tk.StringVar(value="5432"), "migration.sourceDatabase": tk.StringVar(value="knoey"), "migration.sourceUser": tk.StringVar(value="replication_user"), "migration.sourcePasswordRef": tk.StringVar( value="secretref://local-source-db-password" ), - # GKE node pool configuration (persisted to [Initialize Cluster] in prole.cfg) + # GKE node pool configuration (persisted to [Initialize Cluster] in knoe.cfg) "init_cluster.db_boot_disk_type": tk.StringVar(value="pd-standard"), "init_cluster.db_boot_disk_size_gb": tk.StringVar(value="50"), } - # Pre-populate GKE node pool vars from existing prole.cfg if present - _init_clus = (getattr(self, "prole_cfg_data", None) or {}).get("Initialize Cluster") or {} + # Pre-populate GKE node pool vars from existing knoe.cfg if present + _init_clus = (getattr(self, "knoe_cfg_data", None) or {}).get("Initialize Cluster") or {} if _init_clus.get("DB_BOOT_DISK_TYPE"): self.prod_form_vars["init_cluster.db_boot_disk_type"].set(_init_clus["DB_BOOT_DISK_TYPE"]) if _init_clus.get("DB_BOOT_DISK_SIZE_GB"): @@ -2219,7 +2219,7 @@ class ClusterScreenMixin: if not getattr(self, "_gcp_cfg_values", None): try: import glob as _glob - conf_dir = self._resolve_prole_conf_dir() + conf_dir = self._resolve_knoe_conf_dir() found = sorted(_glob.glob(str(conf_dir / "**" / "gcp.cfg"), recursive=True)) self._gcp_cfg_files = found prod_path = conf_dir / "prod" / "gcp.cfg" @@ -2228,14 +2228,14 @@ class ClusterScreenMixin: loaded = _parse_gcp_cfg(chosen) if loaded: upper = {k.upper(): v for k, v in loaded.items()} - self.prole_cfg_data.setdefault("GCP", {}).update(upper) + self.knoe_cfg_data.setdefault("GCP", {}).update(upper) self._gcp_cfg_values = dict(upper) except Exception: pass try: saved_yaml = ( - (getattr(self, "prole_cfg_data", None) or {}) + (getattr(self, "knoe_cfg_data", None) or {}) .get("Prod Cluster (k8s)", {}) .get("PRODUCTION_CONFIG_YAML", "") .strip() @@ -2441,17 +2441,17 @@ class ClusterScreenMixin: if _ksv: _ksv.set(message) if ok and context_name: - # Update KUBECONTEXT in prole.cfg global section and persist to disk - self.prole_cfg_data.setdefault("Global", {})["KUBECONTEXT"] = context_name + # Update KUBECONTEXT in knoe.cfg global section and persist to disk + self.knoe_cfg_data.setdefault("Global", {})["KUBECONTEXT"] = context_name # Point KUBECONFIG at the file gcloud get-credentials wrote import os as _os2, pathlib as _pl default_kube = str(_pl.Path.home() / ".kube" / "config") if _pl.Path(default_kube).exists(): - self.prole_cfg_data["Global"]["KUBECONFIG"] = default_kube + self.knoe_cfg_data["Global"]["KUBECONFIG"] = default_kube self._managed_kubeconfig = default_kube # Save so the context survives screen navigation try: - self._save_prole_cfg() + self._save_knoe_cfg() except Exception: pass # Always update region to match the selected cluster's location @@ -3110,8 +3110,8 @@ class ClusterScreenMixin: def _prod_put_config(self, show_dialog: bool = False) -> dict: self._ensure_prod_config_state() result = self.prod_config_api.put_prod_config(self._prod_payload_from_vars()) - # Persist GKE node pool config to [Initialize Cluster] section of prole.cfg - _gke_sec = self.prole_cfg_data.setdefault("Initialize Cluster", {}) + # Persist GKE node pool config to [Initialize Cluster] section of knoe.cfg + _gke_sec = self.knoe_cfg_data.setdefault("Initialize Cluster", {}) _disk_type = self.prod_form_vars["init_cluster.db_boot_disk_type"].get().strip() _disk_size = self.prod_form_vars["init_cluster.db_boot_disk_size_gb"].get().strip() if _disk_type: @@ -3185,12 +3185,12 @@ class ClusterScreenMixin: self._prod_sync_status_and_logs() def _validate_and_save_cluster_config(self) -> bool: - """Verify the config then write the values to prole.cfg.""" + """Verify the config then write the values to knoe.cfg.""" env_key = self._cluster_env_key() prev_service_ns = "" try: prev_service_ns = ( - (self.prole_cfg_data.get("Global", {}) or {}) + (self.knoe_cfg_data.get("Global", {}) or {}) .get("SERVICE_NAMESPACE", "") .strip() ) @@ -3245,7 +3245,7 @@ class ClusterScreenMixin: + "\n".join(prod_errors), ) return False - cfg_vars = _collect_cfg_vars_from_data(getattr(self, "prole_cfg_data", None)) + cfg_vars = _collect_cfg_vars_from_data(getattr(self, "knoe_cfg_data", None)) expanded_path = _expand_path_expr(path, cfg_vars) p = Path(expanded_path).expanduser() if not p.exists(): @@ -3262,58 +3262,58 @@ class ClusterScreenMixin: # Capture cluster info for config. # ENVIRONMENT here is used as an env/mode hint; keep it as the selected env key. - self.prole_cfg_data["Initialize Cluster"]["ENVIRONMENT"] = ( + self.knoe_cfg_data["Initialize Cluster"]["ENVIRONMENT"] = ( self.cluster_env.get() or "" ).strip() - self.prole_cfg_data["Initialize Cluster"]["K3S_SERVER_URL"] = ( + self.knoe_cfg_data["Initialize Cluster"]["K3S_SERVER_URL"] = ( self.k3s_server_url.get() or "" ).strip() - self.prole_cfg_data["Initialize Cluster"]["K3S_TOKEN"] = _encrypt_cfg_secret( + self.knoe_cfg_data["Initialize Cluster"]["K3S_TOKEN"] = _encrypt_cfg_secret( self.k3s_token.get() or "" ) - self.prole_cfg_data["Global"][ + self.knoe_cfg_data["Global"][ "SERVICE_NAMESPACE" ] = self._get_service_namespace() - new_service_ns = self.prole_cfg_data["Global"]["SERVICE_NAMESPACE"] - self.prole_cfg_data["Optional Features"]["SUPABASE_ENABLED"] = str( + new_service_ns = self.knoe_cfg_data["Global"]["SERVICE_NAMESPACE"] + self.knoe_cfg_data["Optional Features"]["SUPABASE_ENABLED"] = str( self.supabase_enabled.get() ) - self.prole_cfg_data["Optional Features"]["GITOPS_ENABLED"] = str( + self.knoe_cfg_data["Optional Features"]["GITOPS_ENABLED"] = str( self.gitops_enabled.get() ) - self.prole_cfg_data["Optional Features"]["KERBEROS_ENABLED"] = str( + self.knoe_cfg_data["Optional Features"]["KERBEROS_ENABLED"] = str( self.kerberos_enabled.get() ) - self.prole_cfg_data["Optional Features"]["AT_REST_ENCRYPTION_ENABLED"] = str( + self.knoe_cfg_data["Optional Features"]["AT_REST_ENCRYPTION_ENABLED"] = str( self.at_rest_encryption_enabled.get() ) if env_key == "prod": - self.prole_cfg_data["Prod Cluster (k8s)"][ + self.knoe_cfg_data["Prod Cluster (k8s)"][ "ARTIFACTS_DIR" ] = self.prod_artifacts_path.get() try: prod_payload = self._prod_payload_from_vars() prod_plan = self.prod_config_api.post_plan(prod_payload) - self.prole_cfg_data["Prod Cluster (k8s)"][ + self.knoe_cfg_data["Prod Cluster (k8s)"][ "PRODUCTION_CONFIG_YAML" ] = prod_plan.get("yaml", "") - self.prole_cfg_data["Prod Cluster (k8s)"][ + self.knoe_cfg_data["Prod Cluster (k8s)"][ "OPENTOFU_VARS" ] = json.dumps( prod_plan.get("opentofuVars") or {}, sort_keys=True, separators=(",", ":") ) - self.prole_cfg_data["Prod Cluster (k8s)"][ + self.knoe_cfg_data["Prod Cluster (k8s)"][ "INSTALL_PLAN" ] = "\n".join(prod_plan.get("installPlan") or []) - self.prole_cfg_data["Prod Cluster (k8s)"][ + self.knoe_cfg_data["Prod Cluster (k8s)"][ "PLAN_MESSAGES" ] = self.prod_tab_messages.get() except Exception: pass # Save config - self._save_prole_cfg() + self._save_knoe_cfg() # Namespace change cleanup (prevents collisions when switching namespaces). try: @@ -3528,7 +3528,7 @@ class ClusterScreenMixin: """Check GCP Artifact Registry availability and persist the result. Updates the ``_artifact_registry_indicator`` oval on the Cluster Environment - screen and stores ``ARTIFACT_REGISTRY_AVAILABLE`` in ``prole_cfg_data["Global"]`` + screen and stores ``ARTIFACT_REGISTRY_AVAILABLE`` in ``knoe_cfg_data["Global"]`` so the Database Build screen can read it without re-checking. """ def worker(): @@ -3543,10 +3543,10 @@ class ClusterScreenMixin: # Only relevant for GKE/prod; skip silently for other envs. return - gcp = self.prole_cfg_data.get("GCP", {}) or {} + gcp = self.knoe_cfg_data.get("GCP", {}) or {} project_id = (gcp.get("project_id") or gcp.get("PROJECT_ID") or "").strip().strip('"') kubecontext = ( - (self.prole_cfg_data.get("Global", {}) or {}).get("KUBECONTEXT") or "" + (self.knoe_cfg_data.get("Global", {}) or {}).get("KUBECONTEXT") or "" ).strip() region = "" if kubecontext.startswith("gke_"): @@ -3554,7 +3554,7 @@ class ClusterScreenMixin: if len(parts) >= 3: region = parts[2] ar_repo = ( - (self.prole_cfg_data.get("Global", {}) or {}) + (self.knoe_cfg_data.get("Global", {}) or {}) .get("SERVICE_NAMESPACE", "knoe-system") .strip() or "knoe-system" ) @@ -3588,11 +3588,11 @@ class ClusterScreenMixin: # Persist so the Database Build screen can read without re-checking. try: - global_cfg = self.prole_cfg_data.setdefault("Global", {}) + global_cfg = self.knoe_cfg_data.setdefault("Global", {}) global_cfg["ARTIFACT_REGISTRY_AVAILABLE"] = "true" if ok else "false" if registry_url: global_cfg["ARTIFACT_REGISTRY"] = registry_url - self._save_prole_cfg() + self._save_knoe_cfg() except Exception: pass @@ -3660,8 +3660,8 @@ class ClusterScreenMixin: if cluster_name not in res_stdout: # Create it # Default args based on README.md - prole_data = str(self._resolve_env_dir("PROLE_DATA", "data")) - volume_args = _k3d_prole_data_volume_args(prole_data) + knoe_data = str(self._resolve_env_dir("PROLE_DATA", "data")) + volume_args = _k3d_knoe_data_volume_args(knoe_data) cmd = [ "k3d", "cluster", @@ -3673,7 +3673,7 @@ class ClusterScreenMixin: reg_args = [] try: if self.ensure_local_registry_available(): - reg_args = ["--registry-use", "k3d-prole-registry:5000"] + reg_args = ["--registry-use", "k3d-knoe-registry:5000"] except Exception: reg_args = [] cmd += reg_args + ["--api-port", "0.0.0.0:6443"] @@ -3778,11 +3778,11 @@ class ClusterScreenMixin: try: ns = self._get_service_namespace() env = self._script_env_for_namespace(ns, cluster_role="app") - env["PROLE_MODE"] = self._deployment_mode() + env["KNOE_MODE"] = self._deployment_mode() if not env.get("KUBECONFIG"): console.write( - "KUBECONFIG not generated. Check cluster credentials in prole.cfg.\n" + "KUBECONFIG not generated. Check cluster credentials in knoe.cfg.\n" ) return @@ -3847,7 +3847,7 @@ class ClusterScreenMixin: "opentofu": "opentofu", "garage": "garage", "openbao": "openbao", - "prole-svc-kong": "kong", + "knoe-svc-kong": "kong", "cert-manager": "certmgr", "cert-manager-cainjector": "certmgr", "cert-manager-webhook": "certmgr", @@ -3889,7 +3889,7 @@ class ClusterScreenMixin: service_ns = self._get_service_namespace() env = self._script_env_for_namespace(service_ns, cluster_role="app") - env["PROLE_MODE"] = self._deployment_mode() + env["KNOE_MODE"] = self._deployment_mode() log_path = self._common_services_log_path() env["COMMON_SERVICES_INIT_LOG"] = str(log_path) try: @@ -3906,12 +3906,12 @@ class ClusterScreenMixin: if not env.get("KUBECONFIG"): if console: console.write( - "KUBECONFIG not generated. Check cluster credentials in prole.cfg.\n" + "KUBECONFIG not generated. Check cluster credentials in knoe.cfg.\n" ) if log_fp: try: log_fp.write( - "KUBECONFIG not generated. Check cluster credentials in prole.cfg.\n" + "KUBECONFIG not generated. Check cluster credentials in knoe.cfg.\n" ) log_fp.close() except Exception: diff --git a/knoe/ui/screens/cluster_nodes.py b/knoe/ui/screens/cluster_nodes.py index cbe2524..9b36560 100644 --- a/knoe/ui/screens/cluster_nodes.py +++ b/knoe/ui/screens/cluster_nodes.py @@ -76,7 +76,7 @@ class ClusterNodesScreenMixin: return self._resolve_env_dir("PROLE_DATA", "data") / "topology" def _cluster_nodes_placement_plan_path(self) -> Path: - conf_root = self._resolve_env_dir("PROLE_CONF", "conf") + conf_root = self._resolve_env_dir("KNOE_CONF", "conf") return conf_root / "cnpg-placement" / "ecosystem-0-knoe-db.json" def _cluster_nodes_compute_placement( @@ -175,11 +175,11 @@ class ClusterNodesScreenMixin: if fs.mountpoint.startswith("/synology/") } ) - cluster_sec = self.prole_cfg_data.setdefault("Cluster Nodes", {}) + cluster_sec = self.knoe_cfg_data.setdefault("Cluster Nodes", {}) cluster_sec["TOPOLOGY_STATUS"] = topology.collection_status cluster_sec["TOPOLOGY_PATH"] = topology.topology_root - glob = self.prole_cfg_data.setdefault("Global", {}) + glob = self.knoe_cfg_data.setdefault("Global", {}) if nodes: eligible_names = sorted(node.name for node in nodes) glob["CNPG_ELIGIBLE_NODES"] = ",".join(eligible_names) @@ -195,7 +195,7 @@ class ClusterNodesScreenMixin: glob["SYNOLOGY_ROOTS"] = ",".join(synology_roots) try: - self._save_prole_cfg() + self._save_knoe_cfg() except Exception: pass @@ -673,11 +673,11 @@ class ClusterNodesScreenMixin: def _cluster_nodes_save_selected(self) -> None: state = self._cluster_nodes_state() selected = sorted(state.get("selected") or []) - if "Cluster Nodes" not in self.prole_cfg_data: - self.prole_cfg_data["Cluster Nodes"] = {} - self.prole_cfg_data["Cluster Nodes"]["SELECTED_NODES"] = ",".join(selected) + if "Cluster Nodes" not in self.knoe_cfg_data: + self.knoe_cfg_data["Cluster Nodes"] = {} + self.knoe_cfg_data["Cluster Nodes"]["SELECTED_NODES"] = ",".join(selected) try: - self._save_prole_cfg() + self._save_knoe_cfg() messagebox.showinfo("Cluster Nodes", "Saved selected cluster nodes.") except Exception: pass @@ -788,18 +788,18 @@ class ClusterNodesScreenMixin: ) def _cluster_nodes_advanced_enabled(self) -> bool: - sec = (getattr(self, "prole_cfg_data", None) or {}).get("Cluster Nodes", {}) + sec = (getattr(self, "knoe_cfg_data", None) or {}).get("Cluster Nodes", {}) raw = (sec or {}).get(self.ADVANCED_ASSIGNMENT_GRID_KEY, False) if isinstance(raw, bool): return raw return str(raw).strip().lower() in {"1", "true", "yes", "on"} def _cluster_nodes_set_advanced_enabled(self, enabled: bool) -> None: - if "Cluster Nodes" not in self.prole_cfg_data: - self.prole_cfg_data["Cluster Nodes"] = {} - self.prole_cfg_data["Cluster Nodes"][self.ADVANCED_ASSIGNMENT_GRID_KEY] = "true" if enabled else "false" + if "Cluster Nodes" not in self.knoe_cfg_data: + self.knoe_cfg_data["Cluster Nodes"] = {} + self.knoe_cfg_data["Cluster Nodes"][self.ADVANCED_ASSIGNMENT_GRID_KEY] = "true" if enabled else "false" try: - self._save_prole_cfg() + self._save_knoe_cfg() except Exception: pass @@ -854,7 +854,7 @@ class ClusterNodesScreenMixin: return out def _cluster_nodes_load_policy(self, hosts: list[str]) -> dict: - sec = (getattr(self, "prole_cfg_data", None) or {}).get("Cluster Nodes", {}) + sec = (getattr(self, "knoe_cfg_data", None) or {}).get("Cluster Nodes", {}) raw = (sec or {}).get("POLICY_JSON", "") if raw: try: @@ -919,11 +919,11 @@ class ClusterNodesScreenMixin: pass return False - if "Cluster Nodes" not in self.prole_cfg_data: - self.prole_cfg_data["Cluster Nodes"] = {} - self.prole_cfg_data["Cluster Nodes"]["POLICY_JSON"] = raw + if "Cluster Nodes" not in self.knoe_cfg_data: + self.knoe_cfg_data["Cluster Nodes"] = {} + self.knoe_cfg_data["Cluster Nodes"]["POLICY_JSON"] = raw try: - self._save_prole_cfg() + self._save_knoe_cfg() except Exception: pass return True diff --git a/knoe/ui/screens/database.py b/knoe/ui/screens/database.py index 2e1167b..c80db3c 100644 --- a/knoe/ui/screens/database.py +++ b/knoe/ui/screens/database.py @@ -18,7 +18,7 @@ from knoe.core.env import ( _safe_str, _push_docker_image, get_resource_path, - resolve_prole_home, + resolve_knoe_home, ) from knoe.core.ops import openbao as openbao_ops from knoe.core.ops import registry as registry_ops @@ -477,7 +477,7 @@ class DatabaseScreenMixin: self._sync_namespace_suffix_from_full() # Mark as selected in tree visually if needed, but we use the checkbox column self._refresh_namespace_table() - self._save_prole_cfg() + self._save_knoe_cfg() if self.supabase_enabled.get(): self._db_sync_supabase_ports(ns) @@ -509,7 +509,7 @@ class DatabaseScreenMixin: # Add trace to host port to update mappings immediately def on_port_change(*args): try: - self._save_prole_cfg() + self._save_knoe_cfg() except: pass @@ -545,7 +545,7 @@ class DatabaseScreenMixin: return re.match(r"^[a-z0-9-]*$", proposed) is not None def _resolve_db_kube_context(self) -> str: - cfg = getattr(self, "prole_cfg_data", {}) or {} + cfg = getattr(self, "knoe_cfg_data", {}) or {} glob = cfg.get("Global", {}) or {} gcp = cfg.get("GCP", {}) or {} @@ -632,7 +632,7 @@ class DatabaseScreenMixin: return current_ctx = _safe_str(selected_var.get()) - app_default_ctx = _safe_str((getattr(self, "prole_cfg_data", {}) or {}).get("Global", {}).get("KUBECONTEXT", "")) + app_default_ctx = _safe_str((getattr(self, "knoe_cfg_data", {}) or {}).get("Global", {}).get("KUBECONTEXT", "")) # Keep explicit user context overrides; auto-switch only from blank/default app context. if current_ctx and current_ctx != app_default_ctx: @@ -882,7 +882,7 @@ class DatabaseScreenMixin: def worker(): try: env = os.environ.copy() - env["PROLE_HOME"] = str(PROJECT_ROOT) + env["KNOE_HOME"] = str(PROJECT_ROOT) # Best effort: use kubectl context if selected if hasattr(self, "selected_kubectx") and self.selected_kubectx.get(): env["KUBECONFIG"] = env.get( @@ -1025,8 +1025,8 @@ class DatabaseScreenMixin: ) ) # We prefer ed25519, but fallback to rsa if not available - key_path = Path.home() / ".ssh" / "id_prole_ed25519" - pub_path = Path.home() / ".ssh" / "id_prole_ed25519.pub" + key_path = Path.home() / ".ssh" / "id_knoe_ed25519" + pub_path = Path.home() / ".ssh" / "id_knoe_ed25519.pub" try: if key_path.exists(): key_path.unlink() @@ -1218,10 +1218,10 @@ class DatabaseScreenMixin: # Ensure registry check runs when entering the screen self._ensure_db_build_registry_async() - def _load_gcp_cfg_into_prole_data(self): - """Load conf/prod/gcp.cfg into prole_cfg_data["GCP"] for any keys not already set.""" + def _load_gcp_cfg_into_knoe_data(self): + """Load conf/prod/gcp.cfg into knoe_cfg_data["GCP"] for any keys not already set.""" import glob as _glob - gcp = self.prole_cfg_data.setdefault("GCP", {}) + gcp = self.knoe_cfg_data.setdefault("GCP", {}) # Normalize any existing uppercase keys to lowercase (configparser preserves case # when optionxform=str, so PROJECT_ID stays uppercase — normalize it here so all # downstream lookups using gcp.get("project_id") work correctly). @@ -1259,7 +1259,7 @@ class DatabaseScreenMixin: # For named environments (prod → k8s, service → k3s) the env_key is the # authoritative source of truth and must not be overridden by a stale - # DEPLOYMENT_MODE stored in prole_cfg_data (e.g. "k3d" left over from a + # DEPLOYMENT_MODE stored in knoe_cfg_data (e.g. "k3d" left over from a # previous dev session while the user has switched to prod). # For the dev env, DEPLOYMENT_MODE may legitimately be set to "k3s" to # test service-mode workloads, so we preserve that override there. @@ -1268,7 +1268,7 @@ class DatabaseScreenMixin: mode = _env_based_mode else: mode = _deployment_mode_from_env( - ((self.prole_cfg_data.get("Global", {}) or {}).get("DEPLOYMENT_MODE") or "").strip() + ((self.knoe_cfg_data.get("Global", {}) or {}).get("DEPLOYMENT_MODE") or "").strip() or env_key ) @@ -1394,12 +1394,12 @@ class DatabaseScreenMixin: # k8s (GKE/prod): use GCP Artifact Registry — no local Docker registry needed if mode == "k8s": - self._load_gcp_cfg_into_prole_data() - gcp = self.prole_cfg_data.get("GCP", {}) or {} + self._load_gcp_cfg_into_knoe_data() + gcp = self.knoe_cfg_data.get("GCP", {}) or {} project_id = (gcp.get("project_id") or "").strip().strip('"') # Extract region from KUBECONTEXT: gke___ kubecontext = ( - (self.prole_cfg_data.get("Global", {}) or {}).get("KUBECONTEXT") or "" + (self.knoe_cfg_data.get("Global", {}) or {}).get("KUBECONTEXT") or "" ).strip() region = "" if kubecontext.startswith("gke_"): @@ -1408,7 +1408,7 @@ class DatabaseScreenMixin: region = parts[2] if project_id and region: ar_repo = ( - (self.prole_cfg_data.get("Global", {}) or {}) + (self.knoe_cfg_data.get("Global", {}) or {}) .get("SERVICE_NAMESPACE", "knoe-system") .strip() or "knoe-system" ) @@ -1417,7 +1417,7 @@ class DatabaseScreenMixin: # screen (_check_artifact_registry_async). If not yet set, assume # available so we don't flash red on first open. ar_available = ( - (self.prole_cfg_data.get("Global", {}) or {}) + (self.knoe_cfg_data.get("Global", {}) or {}) .get("ARTIFACT_REGISTRY_AVAILABLE", "true") .strip() .lower() @@ -1541,7 +1541,7 @@ class DatabaseScreenMixin: def _resolve_argocd_namespace() -> str: ns = ( - (self.prole_cfg_data.get("Global", {}) or {}) + (self.knoe_cfg_data.get("Global", {}) or {}) .get("ARGOCD_NAMESPACE", "") .strip() ) @@ -1558,7 +1558,7 @@ class DatabaseScreenMixin: ns = "" if not ns: ns = ( - (self.prole_cfg_data.get("Global", {}) or {}) + (self.knoe_cfg_data.get("Global", {}) or {}) .get("SERVICE_NAMESPACE", "") .strip() ) @@ -1632,7 +1632,7 @@ class DatabaseScreenMixin: try: env_run = os.environ.copy() - env_run["PROLE_MODE"] = "k3s" + env_run["KNOE_MODE"] = "k3s" env_run["REGISTRY_NAMESPACE"] = service_ns env_run["ARGOCD_NAMESPACE"] = argocd_ns registry_ops.update( @@ -1696,17 +1696,17 @@ class DatabaseScreenMixin: tag = self.get_knoe_db_version() image_name = f"knoe-db:{tag}" - # Use $PROLE_HOME/build for Docker build context + # Use $KNOE_HOME/build for Docker build context # This avoids issues with PyInstaller's temporary _MEIPASS directory - prole_home = resolve_prole_home() + knoe_home = resolve_knoe_home() env_key = self._cluster_env_key() mode_key = _deployment_mode_from_env(env_key) or "default" - build_dir = prole_home / "build" / mode_key / "knoe-db" + build_dir = knoe_home / "build" / mode_key / "knoe-db" build_dir.mkdir(parents=True, exist_ok=True) # Copy DB image build directory to writable location, unless a generated # build context was already prepared by the Database Options screen. - marker = build_dir / ".prole_build_context_ready" + marker = build_dir / ".knoe_build_context_ready" if not marker.exists(): source_dir = get_resource_path("knoe-db") if not source_dir.exists(): @@ -1717,7 +1717,7 @@ class DatabaseScreenMixin: # Fetch the generated public key pub_key = "" - pub_key_path = Path.home() / ".ssh" / "id_prole_ed25519.pub" + pub_key_path = Path.home() / ".ssh" / "id_knoe_ed25519.pub" if pub_key_path.exists(): pub_key = pub_key_path.read_text().strip() @@ -1902,11 +1902,11 @@ class DatabaseScreenMixin: ) elif mode_key == "k8s": # GKE/prod: push to GCP Artifact Registry - self._load_gcp_cfg_into_prole_data() - gcp_section = self.prole_cfg_data.get("GCP", {}) + self._load_gcp_cfg_into_knoe_data() + gcp_section = self.knoe_cfg_data.get("GCP", {}) project_id = gcp_section.get("project_id", "").strip() kubecontext = ( - self.prole_cfg_data.get("Global", {}).get("KUBECONTEXT", "") + self.knoe_cfg_data.get("Global", {}).get("KUBECONTEXT", "") or os.environ.get("KUBECONTEXT", "") ).strip() # parse region from gke___ @@ -1932,7 +1932,7 @@ class DatabaseScreenMixin: ) return ar_repo = ( - self.prole_cfg_data.get("Global", {}) + self.knoe_cfg_data.get("Global", {}) .get("SERVICE_NAMESPACE", "knoe-system") .strip() or "knoe-system" ) diff --git a/knoe/ui/screens/database_options.py b/knoe/ui/screens/database_options.py index be770b5..7d5138d 100644 --- a/knoe/ui/screens/database_options.py +++ b/knoe/ui/screens/database_options.py @@ -15,27 +15,27 @@ from knoe.core.env import ( _deployment_mode_from_env, _safe_str, get_resource_path, - resolve_prole_home, + resolve_knoe_home, ) class DatabaseOptionsScreenMixin: """Mixin for the Database Options screen.""" - _DB_BUILD_CONTEXT_READY_MARKER = ".prole_build_context_ready" + _DB_BUILD_CONTEXT_READY_MARKER = ".knoe_build_context_ready" - def _runtime_prole_home(self) -> Path: - prole_home = ( - getattr(self, "prole_cfg_data", {}) + def _runtime_knoe_home(self) -> Path: + knoe_home = ( + getattr(self, "knoe_cfg_data", {}) .get("System Environment", {}) - .get("PROLE_HOME") + .get("KNOE_HOME") ) - if prole_home: + if knoe_home: try: - return Path(str(prole_home)).expanduser() + return Path(str(knoe_home)).expanduser() except Exception: pass - return Path(resolve_prole_home()) + return Path(resolve_knoe_home()) def _db_mode_key(self) -> str: env_key = "" @@ -44,12 +44,12 @@ class DatabaseOptionsScreenMixin: except Exception: env_key = _safe_str(os.environ.get("CLUSTER_ENV") or "") - mode = _deployment_mode_from_env(env_key) or _safe_str(os.environ.get("PROLE_MODE")) + mode = _deployment_mode_from_env(env_key) or _safe_str(os.environ.get("KNOE_MODE")) return mode or "default" def _init_database_options_state(self): - # Load saved inputs (available when prole.cfg was previously saved) - _saved = getattr(self, "prole_cfg_data", {}).get("Inputs", {}) + # Load saved inputs (available when knoe.cfg was previously saved) + _saved = getattr(self, "knoe_cfg_data", {}).get("Inputs", {}) self.db_at_rest_encryption = tk.BooleanVar(value=True) _saved_dist = _saved.get("database_options.distribution", "percona") @@ -101,13 +101,13 @@ class DatabaseOptionsScreenMixin: # Trigger refresh script def refresh(): try: - prole_home = self.prole_cfg_data.get("System Environment", {}).get("PROLE_HOME") - if not prole_home: - prole_home = str(resolve_prole_home()) + knoe_home = self.knoe_cfg_data.get("System Environment", {}).get("KNOE_HOME") + if not knoe_home: + knoe_home = str(resolve_knoe_home()) - self.controller.run_script("init_database_options.sh", env={"PROLE_HOME": prole_home}) + self.controller.run_script("init_database_options.sh", env={"KNOE_HOME": knoe_home}) # Reload after script finishes - version_file = Path(prole_home) / "conf" / "database_versions.json" + version_file = Path(knoe_home) / "conf" / "database_versions.json" if version_file.exists(): with open(version_file, "r") as f: self.db_versions_data = json.load(f) @@ -119,10 +119,10 @@ class DatabaseOptionsScreenMixin: threading.Thread(target=refresh, daemon=True).start() - prole_home = self.prole_cfg_data.get("System Environment", {}).get("PROLE_HOME") - if not prole_home: - prole_home = str(resolve_prole_home()) - version_file = Path(prole_home) / "conf" / "database_versions.json" + knoe_home = self.knoe_cfg_data.get("System Environment", {}).get("KNOE_HOME") + if not knoe_home: + knoe_home = str(resolve_knoe_home()) + version_file = Path(knoe_home) / "conf" / "database_versions.json" if version_file.exists(): try: with open(version_file, "r") as f: @@ -166,7 +166,7 @@ class DatabaseOptionsScreenMixin: else: self.db_distribution.set("postgresql") self._refresh_database_options_ui() - self._save_prole_cfg() + self._save_knoe_cfg() enc_cb = tk.Checkbutton( self.bg_canvas, @@ -232,7 +232,7 @@ class DatabaseOptionsScreenMixin: v_win = self.bg_canvas.create_window(x_field, y - 10, window=self.db_version_combo, anchor="nw") self._canvas_items.append(v_win) self._overlay_widgets.append(self.db_version_combo) - self.db_version_combo.bind("<>", lambda _: self._save_prole_cfg()) + self.db_version_combo.bind("<>", lambda _: self._save_knoe_cfg()) y += 50 # Extensions @@ -291,7 +291,7 @@ class DatabaseOptionsScreenMixin: return current = self.db_extensions[item].get() self.db_extensions[item].set(not current) - self._save_prole_cfg() + self._save_knoe_cfg() self._refresh_extensions_table() self.ext_tree.bind("", on_ext_click) @@ -359,9 +359,9 @@ class DatabaseOptionsScreenMixin: # Extract major version from "17 (Latest)" etc. version = version_full.split()[0] if version_full else "17" - prole_home = self._runtime_prole_home() + knoe_home = self._runtime_knoe_home() mode_key = self._db_mode_key() - build_dir = prole_home / "build" / mode_key / "knoe-db" + build_dir = knoe_home / "build" / mode_key / "knoe-db" build_dir.mkdir(parents=True, exist_ok=True) # Copy DB image build directory to writable location. @@ -460,11 +460,11 @@ class DatabaseOptionsScreenMixin: (build_dir / self._DB_BUILD_CONTEXT_READY_MARKER).write_text("generated\n") # Increment version - self._increment_knoe_db_version(version, prole_home=prole_home, mode_key=mode_key) + self._increment_knoe_db_version(version, knoe_home=knoe_home, mode_key=mode_key) return True - def _increment_knoe_db_version(self, major_minor, *, prole_home: Path, mode_key: str): - mode_root = Path(prole_home) / "modes" / (mode_key or "default") + def _increment_knoe_db_version(self, major_minor, *, knoe_home: Path, mode_key: str): + mode_root = Path(knoe_home) / "modes" / (mode_key or "default") version_file = mode_root / "knoe-db" / ".version" version_file.parent.mkdir(parents=True, exist_ok=True) diff --git a/knoe/ui/screens/dependencies.py b/knoe/ui/screens/dependencies.py index ab5b109..bdf90fc 100644 --- a/knoe/ui/screens/dependencies.py +++ b/knoe/ui/screens/dependencies.py @@ -573,11 +573,11 @@ class DependenciesScreenMixin: # Footer may need to react if verify mode is enabled self.update_footer() - # Update prole.cfg data + # Update knoe.cfg data try: status_str = f"installed (version {version})" if ok else "not installed" - self.prole_cfg_data["Dependencies"][dep_id] = status_str - self._save_prole_cfg() + self.knoe_cfg_data["Dependencies"][dep_id] = status_str + self._save_knoe_cfg() except Exception: pass diff --git a/knoe/ui/screens/deploy.py b/knoe/ui/screens/deploy.py index 19db267..f33eeed 100644 --- a/knoe/ui/screens/deploy.py +++ b/knoe/ui/screens/deploy.py @@ -26,9 +26,9 @@ class DeployScreenMixin: left = 56 if not hasattr(self, "deploy_steps"): self.deploy_steps = [ - {"name": "Build Prole macOS app", "status": "pending"}, + {"name": "Build Knoe macOS app", "status": "pending"}, {"name": "Check Docker is running", "status": "pending"}, - {"name": "Install Prole Tools.app", "status": "pending"}, + {"name": "Install Knoe Tools.app", "status": "pending"}, ] for step in self.deploy_steps: # status circle (pending empty) @@ -60,17 +60,17 @@ class DeployScreenMixin: def worker(): err = None try: - self.ensure_prole_env() + self.ensure_knoe_env() self.reload_env_from_shell() except Exception as e: err = f"Failed to load environment: {e}" try: - self._ensure_prole_directories() - if "Install" in self.prole_cfg_data: - self.prole_cfg_data["Install"]["STATUS"] = "Deployed" - self._save_prole_cfg() + self._ensure_knoe_directories() + if "Install" in self.knoe_cfg_data: + self.knoe_cfg_data["Install"]["STATUS"] = "Deployed" + self._save_knoe_cfg() except Exception as e: - err = err or f"Failed to prepare Prole directories: {e}" + err = err or f"Failed to prepare Knoe directories: {e}" if err: self.safe_after(lambda: messagebox.showerror("Deploy", err)) @@ -90,7 +90,7 @@ class DeployScreenMixin: threading.Thread(target=worker, daemon=True).start() def on_launch(self): - app_path = self._get_prole_dist_dir() / "Prole Tools.app" + app_path = self._get_knoe_dist_dir() / "Knoe Tools.app" if app_path.exists(): try: subprocess.Popen(["open", str(app_path)]) @@ -180,7 +180,7 @@ class DeployScreenMixin: ) env = os.environ.copy() - env["PROLE_HOME"] = str(PROJECT_ROOT) + env["KNOE_HOME"] = str(PROJECT_ROOT) env["DOCKER_IMPORT_DIR"] = docker_export_dir env["HELM_CHART_DIR"] = helm_export_dir env["KUSTOMIZE_DIR"] = kustomize_export_dir @@ -376,8 +376,8 @@ class DeployScreenMixin: ) env = os.environ.copy() - env["PROLE_HOME"] = str(PROJECT_ROOT) - env["PROLE_SERVICE"] = str(PROJECT_ROOT) + env["KNOE_HOME"] = str(PROJECT_ROOT) + env["KNOE_SERVICE"] = str(PROJECT_ROOT) env["NAMESPACE"] = (self.db_namespace.get() or "").strip() console = getattr(self, "install_consoles", {}).get(script_name) @@ -442,7 +442,7 @@ class DeployScreenMixin: # Instructions instructions = tk.Label( frame, - text="Build and deploy Prole services to k3d cluster", + text="Build and deploy Knoe services to k3d cluster", bg="#1a1a1a", fg="#aaaaaa", font=("Helvetica", 11), @@ -471,7 +471,7 @@ class DeployScreenMixin: env_combo.pack(side="left") env_help = tk.Label( env_frame, - text="Dev = local k3d (knoe-dev-cluster), Service = remote k3s at pi.prole.org:6443, Prod = stretch of prole-service-cluster", + text="Dev = local k3d (knoe-dev-cluster), Service = remote k3s at pi.knoe.org:6443, Prod = stretch of knoe-service-cluster", bg="#1a1a1a", fg="#888888", font=("Helvetica", 9), @@ -501,7 +501,7 @@ class DeployScreenMixin: # Progress list # Initialize deploy steps; some names are updated dynamically when deployment starts self.deploy_steps = [ - {"name": "Build ProleStatus macOS app", "status": "pending"}, + {"name": "Build KnoeStatus macOS app", "status": "pending"}, {"name": "Check Docker is running", "status": "pending"}, {"name": "Check or configure container registry", "status": "pending"}, {"name": "Ensure target cluster", "status": "pending"}, @@ -529,7 +529,7 @@ class DeployScreenMixin: # Reuse existing deploy steps UI but on light theme self.deploy_steps = [ - {"name": "Build Prole macOS app", "status": "pending"}, + {"name": "Build Knoe macOS app", "status": "pending"}, {"name": "Check Docker is running", "status": "pending"}, {"name": "Check or configure container registry", "status": "pending"}, {"name": "Ensure target cluster", "status": "pending"}, @@ -651,17 +651,17 @@ class DeployScreenMixin: """Start the deployment process""" threading.Thread(target=self.run_deployment, daemon=True).start() - def generate_prole_properties(self, env: str): - """Dynamically generate prole-tools-app/prole.properties based on environment""" - props_path = Path("prole-tools-app/prole.properties") + def generate_knoe_properties(self, env: str): + """Dynamically generate knoe-tools-app/knoe.properties based on environment""" + props_path = Path("knoe-tools-app/knoe.properties") env_key = (env or "").strip().lower() dev_mode = env_key == "dev" - content = f"""# Prole default endpoints (dynamically generated by install.py) + content = f"""# Knoe default endpoints (dynamically generated by install.py) # UI assets -icon=img/proleIcon.png -background=img/proleLogoSepia.png +icon=img/knoeIcon.png +background=img/knoeLogoSepia.png # Dev port-forward supervision pf.enabled={str(dev_mode).lower()} @@ -734,13 +734,13 @@ kerberos.kdc={self.kerberos_kdc.get()} text=f"Ensure target cluster ({env})" ) - # Step 0: Generate prole.properties - self.generate_prole_properties(env) + # Step 0: Generate knoe.properties + self.generate_knoe_properties(env) - # Step 1: Build Prole macOS app - self.update_deploy_step_status("Build Prole macOS app", "running") - self.build_prole_app() - self.update_deploy_step_status("Build Prole macOS app", "completed") + # Step 1: Build Knoe macOS app + self.update_deploy_step_status("Build Knoe macOS app", "running") + self.build_knoe_app() + self.update_deploy_step_status("Build Knoe macOS app", "completed") # Step 1: Check Docker self.update_deploy_step_status("Check Docker is running", "running") @@ -822,17 +822,17 @@ kerberos.kdc={self.kerberos_kdc.get()} def install_launchagent_port_forwards(self) -> bool: """Create/update the user LaunchAgent and helper script to manage kubectl port-forwards. - - Helper script: ~/Library/Application Support/Prole/bin/prole-kpf.sh - - LaunchAgent: ~/Library/LaunchAgents/org.prole.knoe-db.kpf-dev.plist + - Helper script: ~/Library/Application Support/Knoe/bin/knoe-kpf.sh + - LaunchAgent: ~/Library/LaunchAgents/org.knoe.knoe-db.kpf-dev.plist """ try: home = Path.home() - bin_dir = home / "Library" / "Application Support" / "Prole" / "bin" - run_dir = home / "Library" / "Application Support" / "Prole" / "run" + bin_dir = home / "Library" / "Application Support" / "Knoe" / "bin" + run_dir = home / "Library" / "Application Support" / "Knoe" / "run" plist_path = ( - home / "Library" / "LaunchAgents" / "org.prole.knoe-db.kpf-dev.plist" + home / "Library" / "LaunchAgents" / "org.knoe.knoe-db.kpf-dev.plist" ) - script_path = bin_dir / "prole-kpf.sh" + script_path = bin_dir / "knoe-kpf.sh" bin_dir.mkdir(parents=True, exist_ok=True) run_dir.mkdir(parents=True, exist_ok=True) @@ -841,9 +841,9 @@ kerberos.kdc={self.kerberos_kdc.get()} helper_script = """#!/bin/sh set -eu -LABEL="org.prole.knoe-db.kpf-dev" +LABEL="org.knoe.knoe-db.kpf-dev" PLIST="$HOME/Library/LaunchAgents/$LABEL.plist" -RUNDIR="$HOME/Library/Application Support/Prole/run" +RUNDIR="$HOME/Library/Application Support/Knoe/run" PIDFILE="$RUNDIR/kpf.pids" ensure_rundir() { @@ -851,11 +851,11 @@ ensure_rundir() { } list_cmds() { - # Enumerate ProleCommands array using PlistBuddy - if /usr/libexec/PlistBuddy -c "Print :ProleCommands" "$PLIST" >/dev/null 2>&1; then + # Enumerate KnoeCommands array using PlistBuddy + if /usr/libexec/PlistBuddy -c "Print :KnoeCommands" "$PLIST" >/dev/null 2>&1; then i=0 while true; do - if ! val=$(/usr/libexec/PlistBuddy -c "Print :ProleCommands:$i" "$PLIST" 2>/dev/null); then + if ! val=$(/usr/libexec/PlistBuddy -c "Print :KnoeCommands:$i" "$PLIST" 2>/dev/null); then break fi echo "$val" @@ -925,7 +925,7 @@ esac from plistlib import dumps as plist_dumps plist_dict = { - "Label": "org.prole.knoe-db.kpf-dev", + "Label": "org.knoe.knoe-db.kpf-dev", "RunAtLoad": True, "KeepAlive": True, # Ensure PATH has common locations for kubectl @@ -933,13 +933,13 @@ esac "PATH": os.environ.get("PATH", "/usr/local/bin:/usr/bin:/bin") }, "StandardOutPath": str( - home / "Library" / "Logs" / "org.prole.knoe-db.kpf-dev.out.log" + home / "Library" / "Logs" / "org.knoe.knoe-db.kpf-dev.out.log" ), "StandardErrorPath": str( - home / "Library" / "Logs" / "org.prole.knoe-db.kpf-dev.err.log" + home / "Library" / "Logs" / "org.knoe.knoe-db.kpf-dev.err.log" ), "ProgramArguments": [str(script_path), "start"], - "ProleCommands": default_cmds, + "KnoeCommands": default_cmds, } plist_bytes = plist_dumps(plist_dict) @@ -953,7 +953,7 @@ esac "launchctl", "kickstart", "-k", - f"gui/{uid}/org.prole.knoe-db.kpf-dev", + f"gui/{uid}/org.knoe.knoe-db.kpf-dev", ], capture_output=True, ) @@ -963,7 +963,7 @@ esac "launchctl", "bootout", f"gui/{uid}", - f"gui/{uid}/org.prole.knoe-db.kpf-dev", + f"gui/{uid}/org.knoe.knoe-db.kpf-dev", ], capture_output=True, ) @@ -975,7 +975,7 @@ esac "launchctl", "kickstart", "-k", - f"gui/{uid}/org.prole.knoe-db.kpf-dev", + f"gui/{uid}/org.knoe.knoe-db.kpf-dev", ], check=True, ) diff --git a/knoe/ui/screens/docker.py b/knoe/ui/screens/docker.py index 98b5f99..e68e5a7 100644 --- a/knoe/ui/screens/docker.py +++ b/knoe/ui/screens/docker.py @@ -15,7 +15,7 @@ from knoe.core.env import ( _find_kubeconfig_file, _host_from_url, _http_ping_registry, - _k3d_prole_data_volume_args, + _k3d_knoe_data_volume_args, _local_registry_enabled, _normalize_cluster_env, _push_docker_image, @@ -26,7 +26,7 @@ class DockerScreenMixin: """Docker image build, registry management and image pre-pull.""" def _k3s_registry_hostport(self) -> str: - cfg = self.prole_cfg_data or {} + cfg = self.knoe_cfg_data or {} def _get_cfg_val(key: str) -> str: for section in ( @@ -104,7 +104,7 @@ class DockerScreenMixin: return "" def _registry_namespace(self) -> str: - cfg = self.prole_cfg_data or {} + cfg = self.knoe_cfg_data or {} ns = ( (cfg.get("Global", {}) or {}).get("REGISTRY_NAMESPACE") or os.environ.get("REGISTRY_NAMESPACE") @@ -135,12 +135,12 @@ class DockerScreenMixin: return False def ensure_registry_available(self, env: str) -> str: - """Detect if k8s.prole.org:5000 is reachable; if so use it. Otherwise ensure a local registry is available. + """Detect if k8s.knoe.org:5000 is reachable; if so use it. Otherwise ensure a local registry is available. Returns the registry URL (host:port) to be used for tagging/pushing. For Dev, may create a local k3d-managed registry; for other envs, still prefer the external if reachable. """ mode = _deployment_mode_from_env( - (self.prole_cfg_data.get("Global", {}) or {}).get("DEPLOYMENT_MODE") + (self.knoe_cfg_data.get("Global", {}) or {}).get("DEPLOYMENT_MODE") or env ) if mode == "k3s": @@ -148,8 +148,8 @@ class DockerScreenMixin: return self._k3s_registry_hostport() # Prefer the shared registry if reachable - if _http_ping_registry("k8s.prole.org", 5000): - return "k8s.prole.org:5000" + if _http_ping_registry("k8s.knoe.org", 5000): + return "k8s.knoe.org:5000" if not _local_registry_enabled(env): return "" @@ -159,7 +159,7 @@ class DockerScreenMixin: return "localhost:5000" # Use k3d registry helper for Dev; for non-Dev, we still create/use local for pushing - reg_name = "prole-registry" + reg_name = "knoe-registry" # Check if k3d is installed k3d_exists = ( subprocess.run(["which", "k3d"], capture_output=True).returncode == 0 @@ -230,7 +230,7 @@ class DockerScreenMixin: _log( f"\n# Registry check @ {time.strftime('%Y-%m-%d %H:%M:%S')} (mode={mode_hint or 'unknown'})\n" ) - reg_name = "prole-registry" + reg_name = "knoe-registry" registry_container = f"k3d-{reg_name}" host_registry = "localhost:5000" @@ -245,7 +245,7 @@ class DockerScreenMixin: if not mode_source: try: mode_source = ( - (self.prole_cfg_data.get("Global", {}) or {}) + (self.knoe_cfg_data.get("Global", {}) or {}) .get("DEPLOYMENT_MODE", "") .strip() ) @@ -273,13 +273,13 @@ class DockerScreenMixin: self.local_registry_url = host_registry self.local_registry_internal = cluster_registry try: - if "Docker Build" not in self.prole_cfg_data: - self.prole_cfg_data["Docker Build"] = {} - self.prole_cfg_data["Docker Build"]["LOCAL_REGISTRY"] = host_registry - self.prole_cfg_data["Docker Build"][ + if "Docker Build" not in self.knoe_cfg_data: + self.knoe_cfg_data["Docker Build"] = {} + self.knoe_cfg_data["Docker Build"]["LOCAL_REGISTRY"] = host_registry + self.knoe_cfg_data["Docker Build"][ "LOCAL_REGISTRY_INTERNAL" ] = cluster_registry - self.safe_after(self._save_prole_cfg) + self.safe_after(self._save_knoe_cfg) except Exception: pass if log_fp: @@ -314,13 +314,13 @@ class DockerScreenMixin: self.local_registry_url = host_registry self.local_registry_internal = cluster_registry try: - if "Docker Build" not in self.prole_cfg_data: - self.prole_cfg_data["Docker Build"] = {} - self.prole_cfg_data["Docker Build"]["LOCAL_REGISTRY"] = host_registry - self.prole_cfg_data["Docker Build"][ + if "Docker Build" not in self.knoe_cfg_data: + self.knoe_cfg_data["Docker Build"] = {} + self.knoe_cfg_data["Docker Build"]["LOCAL_REGISTRY"] = host_registry + self.knoe_cfg_data["Docker Build"][ "LOCAL_REGISTRY_INTERNAL" ] = cluster_registry - self.safe_after(self._save_prole_cfg) + self.safe_after(self._save_knoe_cfg) except Exception: pass if log_fp: @@ -374,20 +374,20 @@ class DockerScreenMixin: try: docker_exists = _run(["which", "docker"]).returncode == 0 if docker_exists: - # Check if prole-registry container exists + # Check if knoe-registry container exists exists = _run( [ "docker", "ps", "-a", "--filter", - "name=^/prole-registry$", + "name=^/knoe-registry$", "--format", "{{.Names}}", ], ) if (exists.stdout or "").strip(): - _run(["docker", "start", "prole-registry"], check=True) + _run(["docker", "start", "knoe-registry"], check=True) else: _run( [ @@ -399,7 +399,7 @@ class DockerScreenMixin: "--restart", "always", "--name", - "prole-registry", + "knoe-registry", "registry:2", ], check=True, @@ -482,7 +482,7 @@ class DockerScreenMixin: self.update_k8s_manifest(image_tag) def build_mssql_docker_image( - self, image_tag="prole-mssql-db:latest", target_env: str | None = None + self, image_tag="knoe-mssql-db:latest", target_env: str | None = None ): """Build mssql Docker image (with platform detection for target env).""" build_cmd = ["docker", "build", "-t", image_tag] @@ -542,10 +542,10 @@ class DockerScreenMixin: ) def update_k8s_manifest(self, image_tag): - """Update k8s/prole/knoe-db.yaml with the new version and Kerberos config""" + """Update k8s/knoe/knoe-db.yaml with the new version and Kerberos config""" manifest_paths = [ - PROJECT_ROOT / "k8s" / "prole" / "knoe-db.yaml", - PROJECT_ROOT / "k8s" / "prole" / "knoe-db-recovery.yaml.tpl", + PROJECT_ROOT / "k8s" / "knoe" / "knoe-db.yaml", + PROJECT_ROOT / "k8s" / "knoe" / "knoe-db-recovery.yaml.tpl", ] import re @@ -623,7 +623,7 @@ class DockerScreenMixin: # that we can wire it via --registry-use. Using --registry-use (rather than # --registry-create) is required when the registry container already exists, # which is the common case after the first install run. - reg_name = "prole-registry" + reg_name = "knoe-registry" registry_container = f"k3d-{reg_name}" lst = subprocess.run( ["k3d", "registry", "list"], capture_output=True, text=True @@ -652,11 +652,11 @@ class DockerScreenMixin: subprocess.run(["docker", "start", registry_container], check=True) # Wire the cluster to the registry so containerd inside each node resolves - # k3d-prole-registry.localhost:5000 correctly. + # k3d-knoe-registry.localhost:5000 correctly. reg_args = ["--registry-use", f"{registry_container}:5000"] - prole_data = str(self._resolve_env_dir("PROLE_DATA", "data")) - volume_args = _k3d_prole_data_volume_args(prole_data) + knoe_data = str(self._resolve_env_dir("PROLE_DATA", "data")) + volume_args = _k3d_knoe_data_volume_args(knoe_data) cmd = ( ["k3d", "cluster", "create", cluster_name, "-a", "2", "--wait"] + volume_args diff --git a/knoe/ui/screens/environment.py b/knoe/ui/screens/environment.py index 769f805..9fa44e0 100644 --- a/knoe/ui/screens/environment.py +++ b/knoe/ui/screens/environment.py @@ -8,7 +8,7 @@ from pathlib import Path import tkinter as tk from tkinter import ttk, messagebox, filedialog from knoe import screen as ui -from knoe.core.env import PROJECT_ROOT, _expand_cfg_value, resolve_prole_home +from knoe.core.env import PROJECT_ROOT, _expand_cfg_value, resolve_knoe_home class EnvironmentScreenMixin: @@ -18,16 +18,16 @@ class EnvironmentScreenMixin: """Default values to present to the operator. These are intentionally variable-friendly for readability in the UI and - `env.sh` (e.g. `$HOME`, `$PROLE_HOME`). Filesystem operations should + `env.sh` (e.g. `$HOME`, `$KNOE_HOME`). Filesystem operations should always use `_resolve_env_paths_for_fs()`. """ return { - "PROLE_HOME": "$HOME/.prole", - "PROLE_CONF": "$PROLE_HOME/conf", - "PROLE_DATA": "$PROLE_HOME/data", - "PROLE_LOGS": "$PROLE_HOME/logs", - "PROLE_SERVICE": "$PROLE_HOME/etc", + "KNOE_HOME": "$HOME/.knoe", + "KNOE_CONF": "$KNOE_HOME/conf", + "PROLE_DATA": "$KNOE_HOME/data", + "PROLE_LOGS": "$KNOE_HOME/logs", + "KNOE_SERVICE": "$KNOE_HOME/etc", } def _apply_env_entry_style(self, key: str) -> None: @@ -85,12 +85,12 @@ class EnvironmentScreenMixin: env_map.update({k: v for k, v in raw.items() if v}) resolved: dict[str, str] = {} - home = self._expand_shell_path(raw.get("PROLE_HOME", ""), env=env_map) + home = self._expand_shell_path(raw.get("KNOE_HOME", ""), env=env_map) if home: - resolved["PROLE_HOME"] = home - env_map["PROLE_HOME"] = home + resolved["KNOE_HOME"] = home + env_map["KNOE_HOME"] = home - for k in ("PROLE_CONF", "PROLE_DATA", "PROLE_LOGS", "PROLE_SERVICE"): + for k in ("KNOE_CONF", "PROLE_DATA", "PROLE_LOGS", "KNOE_SERVICE"): v = raw.get(k, "") if v: resolved[k] = self._expand_shell_path(v, env=env_map) @@ -124,7 +124,7 @@ class EnvironmentScreenMixin: # Task heading for clarity self._render_title("Environment", y=150) self._render_paragraph( - "Configure your Prole environment. You can accept defaults or choose custom locations. Changing PROLE_HOME will update the defaults for other paths.", + "Configure your Knoe environment. You can accept defaults or choose custom locations. Changing KNOE_HOME will update the defaults for other paths.", y=200, ) @@ -158,23 +158,23 @@ class EnvironmentScreenMixin: self._env_entry_is_default = {} try: - self._last_prole_home_resolved = ( - self._resolve_env_paths_for_fs(values).get("PROLE_HOME") - or defaults_resolved.get("PROLE_HOME") + self._last_knoe_home_resolved = ( + self._resolve_env_paths_for_fs(values).get("KNOE_HOME") + or defaults_resolved.get("KNOE_HOME") or "" ) except Exception: - self._last_prole_home_resolved = "" + self._last_knoe_home_resolved = "" # Keep entry widgets to read values on Next self._env_entries = {} labels = [ - ("PROLE_HOME", "Base directory for data, configs, logs, and scripts"), - ("PROLE_CONF", "Configuration directory"), + ("KNOE_HOME", "Base directory for data, configs, logs, and scripts"), + ("KNOE_CONF", "Configuration directory"), ("PROLE_DATA", "Data directory"), ("PROLE_LOGS", "Logs directory"), - ("PROLE_SERVICE", "System scripts directory"), + ("KNOE_SERVICE", "System scripts directory"), ] x_label = 48 @@ -196,7 +196,7 @@ class EnvironmentScreenMixin: self._env_entries[var_name].insert(0, path) self._env_entry_is_default[var_name] = False self._apply_env_entry_style(var_name) - if var_name == "PROLE_HOME": + if var_name == "KNOE_HOME": # Update dependent defaults if they still match old pattern self._update_dependent_env_paths() @@ -279,12 +279,12 @@ class EnvironmentScreenMixin: ) y += row_h - # When PROLE_HOME changes, update dependent paths that still follow default pattern + # When KNOE_HOME changes, update dependent paths that still follow default pattern def on_home_change(_evt=None): self._update_dependent_env_paths() try: - self._env_entries["PROLE_HOME"].bind("", on_home_change) + self._env_entries["KNOE_HOME"].bind("", on_home_change) except Exception: pass @@ -292,7 +292,7 @@ class EnvironmentScreenMixin: """Reload the installer process environment after saving env.sh.""" try: self.reload_env_from_shell() - self._save_prole_cfg() + self._save_knoe_cfg() except Exception as e: try: messagebox.showwarning( @@ -301,20 +301,20 @@ class EnvironmentScreenMixin: except Exception: pass - def resolve_prole_home(self) -> Path: - """Return PROLE_HOME or default to `$HOME/.prole` as a Path (expanded).""" - return resolve_prole_home() + def resolve_knoe_home(self) -> Path: + """Return KNOE_HOME or default to `$HOME/.knoe` as a Path (expanded).""" + return resolve_knoe_home() - def ensure_prole_env(self) -> Path: - """Ensure $PROLE_HOME and env.sh exist and are readable. Create minimal env if missing. + def ensure_knoe_env(self) -> Path: + """Ensure $KNOE_HOME and env.sh exist and are readable. Create minimal env if missing. - Returns the resolved PROLE_HOME Path. Raises Exception on failure. + Returns the resolved KNOE_HOME Path. Raises Exception on failure. """ - home = self.resolve_prole_home() + home = self.resolve_knoe_home() try: home.mkdir(parents=True, exist_ok=True) except Exception as e: - raise Exception(f"Failed to create PROLE_HOME at {home}: {e}") + raise Exception(f"Failed to create KNOE_HOME at {home}: {e}") env_file = home / "env.sh" if not env_file.exists(): # Construct minimal values based on UI defaults. @@ -322,13 +322,13 @@ class EnvironmentScreenMixin: # operations always resolve literals. vals = dict(self._env_setup_defaults_raw()) try: - default_home = (self._resolve_env_paths_for_fs(vals) or {}).get("PROLE_HOME", "") + default_home = (self._resolve_env_paths_for_fs(vals) or {}).get("KNOE_HOME", "") except Exception: default_home = "" if default_home and str(home) != default_home: - # Keep dependent defaults relative to PROLE_HOME, but set - # PROLE_HOME itself to the resolved literal location. - vals["PROLE_HOME"] = str(home) + # Keep dependent defaults relative to KNOE_HOME, but set + # KNOE_HOME itself to the resolved literal location. + vals["KNOE_HOME"] = str(home) self._save_env_to_file(vals) # Validate readability try: @@ -340,12 +340,12 @@ class EnvironmentScreenMixin: return home def reload_env_from_shell(self) -> None: - """Reload environment by sourcing $PROLE_HOME/env.sh in a login shell and merging into os.environ.""" - home = self.ensure_prole_env() + """Reload environment by sourcing $KNOE_HOME/env.sh in a login shell and merging into os.environ.""" + home = self.ensure_knoe_env() env_file = home / "env.sh" # Use bash to source and print env in null-delimited form cmd = ( - f"export PROLE_HOME={shlex.quote(str(home))}; " + f"export KNOE_HOME={shlex.quote(str(home))}; " f"source {shlex.quote(str(env_file))}; " "env -0" ) @@ -376,14 +376,14 @@ class EnvironmentScreenMixin: # Best-effort; ignore merge errors pass - def _resolve_prole_conf_dir(self) -> Path: - return self._resolve_env_dir("PROLE_CONF", "conf") + def _resolve_knoe_conf_dir(self) -> Path: + return self._resolve_env_dir("KNOE_CONF", "conf") - def _resolve_prole_logs_dir(self) -> Path: + def _resolve_knoe_logs_dir(self) -> Path: return self._resolve_env_dir("PROLE_LOGS", "logs") def _registry_log_path(self) -> Path: - logs_dir = self._resolve_prole_logs_dir() + logs_dir = self._resolve_knoe_logs_dir() try: logs_dir.mkdir(parents=True, exist_ok=True) except Exception: @@ -393,7 +393,7 @@ class EnvironmentScreenMixin: return path def _common_services_log_path(self) -> Path: - logs_dir = self._resolve_prole_logs_dir() + logs_dir = self._resolve_knoe_logs_dir() try: logs_dir.mkdir(parents=True, exist_ok=True) except Exception: @@ -431,15 +431,15 @@ class EnvironmentScreenMixin: return False return True - def _ensure_prole_directories(self) -> None: + def _ensure_knoe_directories(self) -> None: paths = { - "PROLE_HOME": self._resolve_env_value( - "PROLE_HOME", str(resolve_prole_home(env={})) + "KNOE_HOME": self._resolve_env_value( + "KNOE_HOME", str(resolve_knoe_home(env={})) ), - "PROLE_CONF": str(self._resolve_prole_conf_dir()), + "KNOE_CONF": str(self._resolve_knoe_conf_dir()), "PROLE_DATA": str(self._resolve_env_dir("PROLE_DATA", "data")), - "PROLE_LOGS": str(self._resolve_prole_logs_dir()), - "PROLE_SERVICE": str(self._resolve_env_dir("PROLE_SERVICE", "etc")), + "PROLE_LOGS": str(self._resolve_knoe_logs_dir()), + "KNOE_SERVICE": str(self._resolve_env_dir("KNOE_SERVICE", "etc")), } env_map = dict(os.environ) env_map.update({k: str(v or "").strip() for k, v in paths.items() if v}) @@ -452,7 +452,7 @@ class EnvironmentScreenMixin: pass if key not in os.environ and raw: # Prefer expanded values inside the installer process to avoid - # accidental creation of literal `$HOME`/`$PROLE_HOME` paths. + # accidental creation of literal `$HOME`/`$KNOE_HOME` paths. os.environ[key] = self._expand_shell_path(raw, env=env_map) def _record_install_log(self, path) -> None: @@ -469,16 +469,16 @@ class EnvironmentScreenMixin: self._install_run_log_paths.append(sp) def _update_env_namespace(self, namespace: str): - # Namespace is persisted to prole.cfg only — never to env.sh or os.environ. + # Namespace is persisted to knoe.cfg only — never to env.sh or os.environ. pass def _save_env_to_file(self, values: dict): resolved = self._resolve_env_paths_for_fs(values) - home = Path(resolved.get("PROLE_HOME") or values["PROLE_HOME"]).expanduser() + home = Path(resolved.get("KNOE_HOME") or values["KNOE_HOME"]).expanduser() # ensure base dir exists home.mkdir(parents=True, exist_ok=True) # ensure subdirs exist - for key in ("PROLE_CONF", "PROLE_DATA", "PROLE_LOGS", "PROLE_SERVICE"): + for key in ("KNOE_CONF", "PROLE_DATA", "PROLE_LOGS", "KNOE_SERVICE"): try: target = resolved.get(key) or values.get(key, "") if target: @@ -489,35 +489,35 @@ class EnvironmentScreenMixin: content = [] # Executable wrapper + sourceable config content.append("#!/usr/bin/env bash") - content.append("# Prole environment configuration") + content.append("# Knoe environment configuration") content.append( "# This file is generated by the installer. Source it in new shells, or execute as a wrapper:" ) - content.append('# "$PROLE_HOME/env.sh" [args…]') + content.append('# "$KNOE_HOME/env.sh" [args…]') content.append("# shellcheck shell=bash") # Core PROLE_* directories for k in ( - "PROLE_HOME", - "PROLE_CONF", + "KNOE_HOME", + "KNOE_CONF", "PROLE_DATA", "PROLE_LOGS", - "PROLE_SERVICE", + "KNOE_SERVICE", ): content.append(f'export {k}="{values[k]}"') - # NAMESPACE/PROLE_NAMESPACE must never be written to env.sh — only prole.cfg is the source of truth + # NAMESPACE/PROLE_NAMESPACE must never be written to env.sh — only knoe.cfg is the source of truth content.append("") - # Ensure PATH contains common locations and $PROLE_HOME/bin (POSIX sh compatible) + # Ensure PATH contains common locations and $KNOE_HOME/bin (POSIX sh compatible) content.append("# Ensure PATH works for GUI-launched shells (Docker, etc.)") content.append( - '_prole_add_path() { case ":${PATH}:" in *":$1:"*) ;; *) PATH="$1:${PATH:-}" ;; esac; }' + '_knoe_add_path() { case ":${PATH}:" in *":$1:"*) ;; *) PATH="$1:${PATH:-}" ;; esac; }' ) - content.append('_prole_add_path "$PROLE_HOME/bin"') - content.append('_prole_add_path "/opt/homebrew/bin"') - content.append('_prole_add_path "/usr/local/bin"') - content.append('_prole_add_path "/usr/bin"') - content.append('_prole_add_path "/bin"') - content.append('_prole_add_path "/usr/sbin"') - content.append('_prole_add_path "/sbin"') + content.append('_knoe_add_path "$KNOE_HOME/bin"') + content.append('_knoe_add_path "/opt/homebrew/bin"') + content.append('_knoe_add_path "/usr/local/bin"') + content.append('_knoe_add_path "/usr/bin"') + content.append('_knoe_add_path "/bin"') + content.append('_knoe_add_path "/usr/sbin"') + content.append('_knoe_add_path "/sbin"') content.append("export PATH") content.append("") content.append("# Add custom paths below if needed (examples):") @@ -549,21 +549,21 @@ class EnvironmentScreenMixin: # print(f"[OK] Wrote {out}") # After creating env.sh, deploy additional resources as requested: - # 1) Deploy init-port-forward.sh into $PROLE_HOME (and ensure it's executable) - # 2) Copy contents of src/prole/etc (or fallback to top-level etc) into $PROLE_SERVICE + # 1) Deploy init-port-forward.sh into $KNOE_HOME (and ensure it's executable) + # 2) Copy contents of src/knoe/etc (or fallback to top-level etc) into $KNOE_SERVICE try: - prole_home = Path(resolved.get("PROLE_HOME") or values["PROLE_HOME"]).expanduser() - prole_service = Path(resolved.get("PROLE_SERVICE") or values["PROLE_SERVICE"]).expanduser() + knoe_home = Path(resolved.get("KNOE_HOME") or values["KNOE_HOME"]).expanduser() + knoe_service = Path(resolved.get("KNOE_SERVICE") or values["KNOE_SERVICE"]).expanduser() # Determine source for init-port-forward.sh - # Preferred location under repo: PROJECT_ROOT/src/prole/etc/init-port-forward.sh + # Preferred location under repo: PROJECT_ROOT/src/knoe/etc/init-port-forward.sh init_pf_src_candidates = [ - PROJECT_ROOT / "src" / "prole" / "etc" / "init-port-forward.sh", + PROJECT_ROOT / "src" / "knoe" / "etc" / "init-port-forward.sh", PROJECT_ROOT / "etc" / "init-port-forward.sh", ] init_pf_src = next((p for p in init_pf_src_candidates if p.exists()), None) if init_pf_src is not None: - init_pf_dst = prole_home / "init-port-forward.sh" + init_pf_dst = knoe_home / "init-port-forward.sh" try: data = init_pf_src.read_bytes() init_pf_dst.write_bytes(data) @@ -574,7 +574,7 @@ class EnvironmentScreenMixin: # Determine etc directory source etc_src_candidates = [ - PROJECT_ROOT / "src" / "prole" / "etc", + PROJECT_ROOT / "src" / "knoe" / "etc", PROJECT_ROOT / "etc", ] etc_src = next( @@ -582,7 +582,7 @@ class EnvironmentScreenMixin: ) if etc_src is not None: try: - prole_service.mkdir(parents=True, exist_ok=True) + knoe_service.mkdir(parents=True, exist_ok=True) except Exception: pass @@ -604,7 +604,7 @@ class EnvironmentScreenMixin: try: for item in etc_src.iterdir(): - _copy_item(item, prole_service / item.name) + _copy_item(item, knoe_service / item.name) except Exception: pass except Exception: @@ -616,7 +616,7 @@ class EnvironmentScreenMixin: # Capture previous resolved home so we can detect dependent fields that # were implicitly tied to the old home via literal paths. - old_home = (getattr(self, "_last_prole_home_resolved", "") or "").strip() + old_home = (getattr(self, "_last_knoe_home_resolved", "") or "").strip() raw_now = {} try: @@ -625,24 +625,24 @@ class EnvironmentScreenMixin: raw_now = {} try: - new_home = (self._resolve_env_paths_for_fs(raw_now) or {}).get("PROLE_HOME", "") + new_home = (self._resolve_env_paths_for_fs(raw_now) or {}).get("KNOE_HOME", "") except Exception: new_home = "" if new_home: - self._last_prole_home_resolved = new_home + self._last_knoe_home_resolved = new_home mapping = { - "PROLE_CONF": (defaults.get("PROLE_CONF") or "").strip(), + "KNOE_CONF": (defaults.get("KNOE_CONF") or "").strip(), "PROLE_DATA": (defaults.get("PROLE_DATA") or "").strip(), "PROLE_LOGS": (defaults.get("PROLE_LOGS") or "").strip(), - "PROLE_SERVICE": (defaults.get("PROLE_SERVICE") or "").strip(), + "KNOE_SERVICE": (defaults.get("KNOE_SERVICE") or "").strip(), } suffixes = { - "PROLE_CONF": "conf", + "KNOE_CONF": "conf", "PROLE_DATA": "data", "PROLE_LOGS": "logs", - "PROLE_SERVICE": "etc", + "KNOE_SERVICE": "etc", } for key, default_expr in mapping.items(): @@ -668,7 +668,7 @@ class EnvironmentScreenMixin: # If the current value is a literal that matches the previous # resolved-home default, switch it back to the default expression so - # it follows the new PROLE_HOME. + # it follows the new KNOE_HOME. try: if old_home and default_expr and "$" not in cur: resolved_cur = self._expand_shell_path(cur, env=os.environ) @@ -680,8 +680,8 @@ class EnvironmentScreenMixin: except Exception: pass - # Finally, restyle PROLE_HOME itself. + # Finally, restyle KNOE_HOME itself. try: - self._sync_env_default_state("PROLE_HOME") + self._sync_env_default_state("KNOE_HOME") except Exception: pass diff --git a/knoe/ui/screens/gitops.py b/knoe/ui/screens/gitops.py index 27cbb74..4dd61e7 100644 --- a/knoe/ui/screens/gitops.py +++ b/knoe/ui/screens/gitops.py @@ -8,7 +8,7 @@ import threading import tkinter as tk from tkinter import ttk -from knoe import prole_conf +from knoe import knoe_conf from knoe import screen as ui from knoe.core.env import PROJECT_ROOT, _normalize_cluster_env, _parse_bool @@ -76,20 +76,20 @@ class GitOpsScreenMixin: y += 36 def _on_gitops_provider_change(self): - """Persist the chosen GitOps provider to prole_cfg.""" + """Persist the chosen GitOps provider to knoe_cfg.""" provider = self.gitops_provider.get() try: - if "Optional Features" not in self.prole_cfg_data: - self.prole_cfg_data["Optional Features"] = {} - self.prole_cfg_data["Optional Features"]["GITOPS_PROVIDER"] = provider + if "Optional Features" not in self.knoe_cfg_data: + self.knoe_cfg_data["Optional Features"] = {} + self.knoe_cfg_data["Optional Features"]["GITOPS_PROVIDER"] = provider # Keep legacy flags in sync so downstream steps remain consistent. - self.prole_cfg_data["Optional Features"]["GITOPS_ENABLED"] = str( + self.knoe_cfg_data["Optional Features"]["GITOPS_ENABLED"] = str( provider in ("gitea", "gitlab") ) - self.prole_cfg_data["Optional Features"]["ARGOCD_ENABLED"] = str( + self.knoe_cfg_data["Optional Features"]["ARGOCD_ENABLED"] = str( provider == "argocd" ) - self._save_prole_cfg() + self._save_knoe_cfg() except Exception: pass # Sync boolean vars used by the individual feature screens. @@ -129,7 +129,7 @@ class GitOpsScreenMixin: if provider_name == "gitlab": deploy_description = ( "Deploys self-hosted GitLab via the GitLab Operator (etc/init_gitlab.sh).\n" - "Removes any pre-existing Gitea/git.prole.org config before installing.\n" + "Removes any pre-existing Gitea/git.knoe.org config before installing.\n" "Uses knoe-db (CloudNativePG) as the PostgreSQL data store." ) else: @@ -276,8 +276,8 @@ class GitOpsScreenMixin: namespace = os.environ.get("GITEA_NAMESPACE") or "gitea" env = os.environ.copy() - env["PROLE_HOME"] = str(PROJECT_ROOT) - env["PROLE_SERVICE"] = str(PROJECT_ROOT) + env["KNOE_HOME"] = str(PROJECT_ROOT) + env["KNOE_SERVICE"] = str(PROJECT_ROOT) env["NAMESPACE"] = namespace if is_gitlab: env["GITLAB_NAMESPACE"] = namespace @@ -302,7 +302,7 @@ class GitOpsScreenMixin: self._gitops_deploying = False return - mode = (os.environ.get("PROLE_MODE") or "").strip() + mode = (os.environ.get("KNOE_MODE") or "").strip() if not mode: cluster_env = _normalize_cluster_env(self.cluster_env.get()) if cluster_env == "dev": @@ -328,13 +328,13 @@ class GitOpsScreenMixin: if self._cfg_path_override and self._cfg_path_override.exists(): cfg_path = self._cfg_path_override else: - conf_dir = self._resolve_prole_conf_dir() - candidate = conf_dir / "prole.cfg" + conf_dir = self._resolve_knoe_conf_dir() + candidate = conf_dir / "knoe.cfg" if candidate.exists(): cfg_path = candidate if not cfg_path: - candidate = prole_conf.entrypoint_path( - prole_conf.resolve_prole_conf_dir(PROJECT_ROOT) + candidate = knoe_conf.entrypoint_path( + knoe_conf.resolve_knoe_conf_dir(PROJECT_ROOT) ) if candidate.exists(): cfg_path = candidate @@ -407,8 +407,8 @@ class GitOpsScreenMixin: def _on_gitops_toggle(self): enabled = self.gitops_enabled.get() try: - self.prole_cfg_data["Optional Features"]["GITOPS_ENABLED"] = str(enabled) - self._save_prole_cfg() + self.knoe_cfg_data["Optional Features"]["GITOPS_ENABLED"] = str(enabled) + self._save_knoe_cfg() except Exception: pass diff --git a/knoe/ui/screens/knoe_users.py b/knoe/ui/screens/knoe_users.py index 232efa4..a9dd3d4 100644 --- a/knoe/ui/screens/knoe_users.py +++ b/knoe/ui/screens/knoe_users.py @@ -52,7 +52,7 @@ class KnoeUsersScreenMixin: self._render_paragraph( "Ensures the authority workload is available in the service namespace. " - "Mode `k3s` deploys `authority-prole-auth`; mode `prod|gcp` deploys " + "Mode `k3s` deploys `authority-knoe-auth`; mode `prod|gcp` deploys " "`authority-gcp-auth`. Provision Kerberos principals, " "export the postgres service keytab, patch CNPG managed roles (admin, " "guest, developer), initialise the demo schema, and wire admin into " @@ -143,8 +143,8 @@ class KnoeUsersScreenMixin: return env = os.environ.copy() - env["PROLE_HOME"] = str(PROJECT_ROOT) - env["PROLE_SERVICE"] = str(PROJECT_ROOT) + env["KNOE_HOME"] = str(PROJECT_ROOT) + env["KNOE_SERVICE"] = str(PROJECT_ROOT) # Propagate namespace from installer state when available service_ns = ( @@ -177,14 +177,14 @@ class KnoeUsersScreenMixin: env["PROLE_ORG_ADMIN_PASSWORD"] = krb_pw env["KRB5_PASSWORD"] = krb_pw - # Pass prole.cfg path so the script sources the right config + # Pass knoe.cfg path so the script sources the right config cfg_path = None try: if self._cfg_path_override and self._cfg_path_override.exists(): cfg_path = self._cfg_path_override else: - conf_dir = self._resolve_prole_conf_dir() - candidate = conf_dir / "prole.cfg" + conf_dir = self._resolve_knoe_conf_dir() + candidate = conf_dir / "knoe.cfg" if candidate.exists(): cfg_path = candidate except Exception: diff --git a/knoe/ui/screens/navigation.py b/knoe/ui/screens/navigation.py index 5dd3a80..8490825 100644 --- a/knoe/ui/screens/navigation.py +++ b/knoe/ui/screens/navigation.py @@ -18,45 +18,30 @@ class NavigationMixin: Notes: - We set Tk's appname for consistency. - - On macOS, attempt to set the process/menu name to 'Knoe System Installer' - via NSProcessInfo if PyObjC is available. - - Prefer the Prole Tools.app .icns from the built app; fallback to local PNG/GIF. + - On macOS, attempt to set the process/menu name to 'Knoe.DB Installer' + via the shared setup_macos_app_identity() helper. + - Prefer the Knoe Tools.app .icns from the built app; fallback to local PNG/GIF. """ # Set Tk application name try: - self.root.tk.call("tk", "appname", "Knoe System Installer") + self.root.tk.call("tk", "appname", "Knoe.DB Installer") except Exception: pass - # macOS: set process/menu name and Dock icon via AppKit/Foundation + # macOS: set process/menu name and Dock icon if platform.system() == "Darwin": - # Try to set the visible process name for the menu bar try: - from Foundation import NSProcessInfo - - NSProcessInfo.processInfo().setProcessName_("Knoe System Installer") - except Exception: - pass - - # Also try to retitle the first main menu item so the menu next to the Apple logo reads 'Knoe System Installer' - try: - from AppKit import NSApplication - - app = NSApplication.sharedApplication() - main_menu = app.mainMenu() - if main_menu is not None and main_menu.numberOfItems() > 0: - first_item = main_menu.itemAtIndex_(0) - if first_item is not None: - first_item.setTitle_("Knoe System Installer") + from knoe.ui.screens import setup_macos_app_identity + setup_macos_app_identity() except Exception: pass icns_candidates = [ get_resource_path( - "prole-app/dist/Prole Tools.app/Contents/Resources/Prole Tools.icns" + "knoe-app/dist/Knoe Tools.app/Contents/Resources/Knoe Tools.icns" ), get_resource_path( - "prole-app/dist/Prole Tools.app/Contents/Resources/Prole.icns" + "knoe-app/dist/Knoe Tools.app/Contents/Resources/Knoe.icns" ), ] icns_path = next((p for p in icns_candidates if p.exists()), None) @@ -73,6 +58,42 @@ class NavigationMixin: pass # If no .icns was found, try setting Dock icon from configured PNG + try: + import ctypes + import ctypes.util + objc = ctypes.cdll.LoadLibrary(ctypes.util.find_library("objc")) + objc.objc_getClass.restype = ctypes.c_void_p + objc.sel_registerName.restype = ctypes.c_void_p + objc.objc_msgSend.restype = ctypes.c_void_p + + def msg(obj, sel_name, *args, restype=ctypes.c_void_p, argtypes=None): + if obj is None: return None + sel = objc.sel_registerName(sel_name.encode("ascii")) + objc.objc_msgSend.restype = restype + if argtypes is not None: + objc.objc_msgSend.argtypes = [ctypes.c_void_p, ctypes.c_void_p] + argtypes + else: + objc.objc_msgSend.argtypes = [ctypes.c_void_p, ctypes.c_void_p] + return objc.objc_msgSend(obj, sel, *args) + + app_cls = objc.objc_getClass(b"NSApplication") + if app_cls: + app = msg(app_cls, "sharedApplication") + if app: + cfg_icon = inst_config.get_ui_icon_image_path() + if cfg_icon.exists(): + ns_image_cls = objc.objc_getClass(b"NSImage") + if ns_image_cls: + NSUTF8StringEncoding = 4 + ns_str_cls = objc.objc_getClass(b"NSString") + icon_path_ns = msg(ns_str_cls, "stringWithCString:encoding:", str(cfg_icon).encode("utf-8"), NSUTF8StringEncoding, argtypes=[ctypes.c_char_p, ctypes.c_uint]) + img = msg(ns_image_cls, "alloc") + img = msg(img, "initWithContentsOfFile:", icon_path_ns, argtypes=[ctypes.c_void_p]) + if img: + msg(app, "setApplicationIconImage:", img, argtypes=[ctypes.c_void_p]) + except Exception: + pass + try: from AppKit import NSApplication, NSImage @@ -92,13 +113,14 @@ class NavigationMixin: try: cfg_icon = inst_config.get_ui_icon_image_path() except Exception: - cfg_icon = get_resource_path("img/proleIcon.png") + cfg_icon = get_resource_path("img/knoeIcon.png") img_candidates = [ cfg_icon, - get_resource_path("img/prole-type.png"), - get_resource_path("img/prole-type.gif"), - get_resource_path("img/Prole.png"), - get_resource_path("img/proleLogoSepia.png"), + get_resource_path("img/knoe.png"), + get_resource_path("img/knoe-type.png"), + get_resource_path("img/knoe-type.gif"), + get_resource_path("img/Knoe.png"), + get_resource_path("img/knoeLogoSepia.png"), ] for p in img_candidates: try: @@ -165,8 +187,8 @@ class NavigationMixin: def save(): path = self.docker_import_dir.get().strip() - self.prole_cfg_data["Global"]["DOCKER_IMPORT_DIR"] = path - self._save_prole_cfg() + self.knoe_cfg_data["Global"]["DOCKER_IMPORT_DIR"] = path + self._save_knoe_cfg() dialog.destroy() btns = tk.Frame(container) @@ -245,7 +267,7 @@ class NavigationMixin: def _set_deployment_mode(self, mode: str) -> None: """Switch the active deployment mode and persist it to the environment.""" self.deployment_mode.set(mode) - os.environ["PROLE_MODE"] = mode + os.environ["KNOE_MODE"] = mode self._refresh_mode_tabs() def _refresh_mode_tabs(self) -> None: @@ -472,13 +494,13 @@ class NavigationMixin: if current_id == "network_scan": # Capture network scan info try: - self.prole_cfg_data["Network"][ + self.knoe_cfg_data["Network"][ "KDC_AUTO_DETECTED" ] = self.kerberos_kdc.get() - self.prole_cfg_data["Network"]["KERBEROS_AUTO_ENABLED"] = str( + self.knoe_cfg_data["Network"]["KERBEROS_AUTO_ENABLED"] = str( self.kerberos_enabled.get() ) - self._save_prole_cfg() + self._save_knoe_cfg() except Exception: pass self.show_page("env_setup") @@ -490,15 +512,15 @@ class NavigationMixin: raw_vals: dict[str, str] = {} try: for k in ( - "PROLE_HOME", - "PROLE_CONF", + "KNOE_HOME", + "KNOE_CONF", "PROLE_DATA", "PROLE_LOGS", - "PROLE_SERVICE", + "KNOE_SERVICE", ): raw_vals[k] = self._env_entries[k].get().strip() - # Persist to prole.cfg as *literal* overrides only. + # Persist to knoe.cfg as *literal* overrides only. # New policy: do not store variable expressions for filesystem paths. defaults_raw = {} try: @@ -516,15 +538,15 @@ class NavigationMixin: except Exception: resolved = {} - sys_env = self.prole_cfg_data.get("System Environment") + sys_env = self.knoe_cfg_data.get("System Environment") if not isinstance(sys_env, dict): sys_env = {} for k in ( - "PROLE_HOME", - "PROLE_CONF", + "KNOE_HOME", + "KNOE_CONF", "PROLE_DATA", "PROLE_LOGS", - "PROLE_SERVICE", + "KNOE_SERVICE", ): rv = (resolved.get(k) or "").strip() dv = (defaults_resolved.get(k) or "").strip() @@ -542,9 +564,9 @@ class NavigationMixin: continue sys_env[k] = rv if sys_env: - self.prole_cfg_data["System Environment"] = sys_env + self.knoe_cfg_data["System Environment"] = sys_env else: - self.prole_cfg_data.pop("System Environment", None) + self.knoe_cfg_data.pop("System Environment", None) vals.update(raw_vals) vals["DATABASE_NAMESPACE"] = (self.db_namespace.get() or "").strip() @@ -554,10 +576,10 @@ class NavigationMixin: except Exception: # Best-effort fallback: use internal defaults for env.sh. vals = self._env_defaults() - # Basic validation: require non-empty PROLE_HOME - if not vals.get("PROLE_HOME"): + # Basic validation: require non-empty KNOE_HOME + if not vals.get("KNOE_HOME"): try: - messagebox.showerror("Environment", "Please specify PROLE_HOME") + messagebox.showerror("Environment", "Please specify KNOE_HOME") except Exception: pass return @@ -652,10 +674,10 @@ class NavigationMixin: return if current_id == "init_scripts": - self.prole_cfg_data["Initialization Scripts"]["STATUS"] = ( + self.knoe_cfg_data["Initialization Scripts"]["STATUS"] = ( "Completed" if getattr(self, "_scripts_success", False) else "Attempted" ) - self._save_prole_cfg() + self._save_knoe_cfg() if self.kerberos_enabled.get(): self.show_page("kerberos_config") else: @@ -663,56 +685,56 @@ class NavigationMixin: return if current_id == "knoe_users": - self.prole_cfg_data.setdefault("Knoe User Accounts", {})["STATUS"] = ( + self.knoe_cfg_data.setdefault("Knoe User Accounts", {})["STATUS"] = ( "Provisioned" if getattr(self, "_knoe_users_success", False) else "Attempted" ) - self._save_prole_cfg() + self._save_knoe_cfg() self.show_page("argocd_config") return if current_id == "kerberos_config": # Capture kerberos config - self.prole_cfg_data["Kerberos Authentication"]["ENABLED"] = str( + self.knoe_cfg_data["Kerberos Authentication"]["ENABLED"] = str( self.kerberos_enabled.get() ) - self.prole_cfg_data["Kerberos Authentication"][ + self.knoe_cfg_data["Kerberos Authentication"][ "REALM" ] = self.kerberos_realm.get() - self.prole_cfg_data["Kerberos Authentication"][ + self.knoe_cfg_data["Kerberos Authentication"][ "KDC" ] = self.kerberos_kdc.get() - self.prole_cfg_data["Kerberos Authentication"][ + self.knoe_cfg_data["Kerberos Authentication"][ "SERVER" ] = self.kerberos_kdc.get() - self.prole_cfg_data["Kerberos Authentication"][ + self.knoe_cfg_data["Kerberos Authentication"][ "USER" ] = self.kerberos_user.get() - self.prole_cfg_data["Kerberos Authentication"][ + self.knoe_cfg_data["Kerberos Authentication"][ "PASSWORD" ] = self.kerberos_password.get() - self.prole_cfg_data["Kerberos Authentication"]["AD_PORT_FORWARD"] = ( + self.knoe_cfg_data["Kerberos Authentication"]["AD_PORT_FORWARD"] = ( os.environ.get("KRB5_AD_PORT_FORWARD", "1") ) - self.prole_cfg_data["Kerberos Authentication"]["AD_TCP_PORTS"] = ( + self.knoe_cfg_data["Kerberos Authentication"]["AD_TCP_PORTS"] = ( os.environ.get("KRB5_AD_TCP_PORTS", "88 389 445 464 636") ) - self.prole_cfg_data["Kerberos Authentication"]["AD_UDP_PORTS"] = ( + self.knoe_cfg_data["Kerberos Authentication"]["AD_UDP_PORTS"] = ( os.environ.get("KRB5_AD_UDP_PORTS", "88 464") ) - self.prole_cfg_data["Kerberos Authentication"]["AD_PROXY_HOST_NETWORK"] = ( + self.knoe_cfg_data["Kerberos Authentication"]["AD_PROXY_HOST_NETWORK"] = ( os.environ.get("KRB5_AD_PROXY_HOST_NETWORK", "1") ) - self.prole_cfg_data["Kerberos Authentication"]["AD_PROXY_IMAGE"] = ( + self.knoe_cfg_data["Kerberos Authentication"]["AD_PROXY_IMAGE"] = ( os.environ.get("KRB5_AD_PROXY_IMAGE", "alpine/socat") ) - self.prole_cfg_data["Kerberos Authentication"]["AD_PROXY_SERVICE"] = ( - os.environ.get("KRB5_AD_SERVICE_NAME", "prole-kerberos-ad-dc") + self.knoe_cfg_data["Kerberos Authentication"]["AD_PROXY_SERVICE"] = ( + os.environ.get("KRB5_AD_SERVICE_NAME", "knoe-kerberos-ad-dc") ) - self._save_prole_cfg() + self._save_knoe_cfg() self.show_page("knoe_users") return if current_id == "argocd_config": - self.prole_cfg_data["Optional Features"]["ARGOCD_ENABLED"] = str( + self.knoe_cfg_data["Optional Features"]["ARGOCD_ENABLED"] = str( self.argocd_enabled.get() ) argocd_status = ( @@ -725,17 +747,17 @@ class NavigationMixin: ) ) argocd_ns = (self.argocd_namespace.get() or "argocd").strip() or "argocd" - self.prole_cfg_data.setdefault("Global", {})["ARGOCD_NAMESPACE"] = argocd_ns - self.prole_cfg_data["ArgoCD"] = { + self.knoe_cfg_data.setdefault("Global", {})["ARGOCD_NAMESPACE"] = argocd_ns + self.knoe_cfg_data["ArgoCD"] = { "STATUS": argocd_status, "ARGOCD_NAMESPACE": argocd_ns, } - self._save_prole_cfg() + self._save_knoe_cfg() self.show_page("gitops_config") return if current_id == "gitops_config": - self.prole_cfg_data["Optional Features"]["GITOPS_ENABLED"] = str( + self.knoe_cfg_data["Optional Features"]["GITOPS_ENABLED"] = str( self.gitops_enabled.get() ) gitops_status = ( @@ -763,19 +785,19 @@ class NavigationMixin: gitops_ns = (self.gitops_namespace.get() or "gitlab").strip() or "gitlab" else: gitops_ns = (self.gitops_namespace.get() or "gitea").strip() or "gitea" - self.prole_cfg_data["GitOps"] = { + self.knoe_cfg_data["GitOps"] = { "STATUS": gitops_status, "GITOPS_PROVIDER": git_provider.lower(), "GITOPS_NAMESPACE": gitops_ns, } if is_gitlab: - self.prole_cfg_data["GitOps"]["GITLAB_NAMESPACE"] = gitops_ns - self._save_prole_cfg() + self.knoe_cfg_data["GitOps"]["GITLAB_NAMESPACE"] = gitops_ns + self._save_knoe_cfg() self.show_page("supabase_config") return if current_id == "supabase_config": - self.prole_cfg_data["Optional Features"]["SUPABASE_ENABLED"] = str( + self.knoe_cfg_data["Optional Features"]["SUPABASE_ENABLED"] = str( self.supabase_enabled.get() ) supabase_status = ( @@ -787,33 +809,33 @@ class NavigationMixin: else "Attempted" ) ) - self.prole_cfg_data["Supabase"] = { + self.knoe_cfg_data["Supabase"] = { "STATUS": supabase_status, } - self._save_prole_cfg() + self._save_knoe_cfg() self.show_page("init_cnpg_deploy") return if current_id == "init_cnpg_deploy": - self.prole_cfg_data["Deployment"]["STATUS"] = ( + self.knoe_cfg_data["Deployment"]["STATUS"] = ( "Deployed" if getattr(self, "_cnpg_success", False) else "Attempted" ) - self._save_prole_cfg() + self._save_knoe_cfg() self.show_page("security") return if current_id == "security": - if "Install" in self.prole_cfg_data: - self.prole_cfg_data["Install"]["STATUS"] = "Finished" - self._save_prole_cfg() + if "Install" in self.knoe_cfg_data: + self.knoe_cfg_data["Install"]["STATUS"] = "Finished" + self._save_knoe_cfg() self.root.destroy() return if current_id == "create_installer": print("[DEBUG] on_next: at create_installer, Finish clicked. Closing.") - if "Install" in self.prole_cfg_data: - self.prole_cfg_data["Install"]["STATUS"] = "Finished" - self._save_prole_cfg() + if "Install" in self.knoe_cfg_data: + self.knoe_cfg_data["Install"]["STATUS"] = "Finished" + self._save_knoe_cfg() self.root.destroy() return diff --git a/knoe/ui/screens/network.py b/knoe/ui/screens/network.py index 1c95ca0..42c193f 100644 --- a/knoe/ui/screens/network.py +++ b/knoe/ui/screens/network.py @@ -21,7 +21,7 @@ from knoe.core.env import ( DEFAULT_OLLAMA_PORT, get_resource_path, _format_ollama_host, - resolve_prole_home, + resolve_knoe_home, ) from knoe.core.ollama_scan import run_ollama_scan from knoe.core.stream_exec import run_streaming_cmd @@ -408,7 +408,7 @@ class NetworkScreenMixin: try: ansible_kdc = (self.ansible_topology or {}).get("kdc_ip") or "" if not ansible_kdc: - ansible_kdc = (self.prole_cfg_data.get("Network", {}) or {}).get( + ansible_kdc = (self.knoe_cfg_data.get("Network", {}) or {}).get( "KDC_ANSIBLE_DETECTED", "" ) except Exception: @@ -423,8 +423,8 @@ class NetworkScreenMixin: _mark_done("network", False, "missing binary") return - prole_home = resolve_prole_home(env={}) - scan_dir = prole_home / "scan" + knoe_home = resolve_knoe_home(env={}) + scan_dir = knoe_home / "scan" scan_dir.mkdir(parents=True, exist_ok=True) env = os.environ.copy() @@ -458,7 +458,7 @@ class NetworkScreenMixin: self.safe_after(lambda h=host: self.kerberos_kdc.set(h)) self.safe_after(lambda: self.kerberos_enabled.set(True)) try: - self.safe_after(self._save_prole_cfg) + self.safe_after(self._save_knoe_cfg) except Exception: pass @@ -561,7 +561,7 @@ class NetworkScreenMixin: try: ansible_kdc = (self.ansible_topology or {}).get("kdc_ip") or "" if not ansible_kdc: - ansible_kdc = (self.prole_cfg_data.get("Network", {}) or {}).get( + ansible_kdc = (self.knoe_cfg_data.get("Network", {}) or {}).get( "KDC_ANSIBLE_DETECTED", "" ) if ansible_kdc: @@ -641,7 +641,7 @@ class NetworkScreenMixin: except Exception: pass try: - self._save_prole_cfg() + self._save_knoe_cfg() except Exception: pass self._render_kdc_candidates() @@ -660,7 +660,7 @@ class NetworkScreenMixin: return host.strip(), (port.strip() or DEFAULT_OLLAMA_PORT) def _load_ollama_selection_from_config(self): - data = self.prole_cfg_data.get("Ollama", {}) or {} + data = self.knoe_cfg_data.get("Ollama", {}) or {} csv_val = (data.get("OLLAMA_SERVERS", "") or "").strip() selected: set[str] = set() if csv_val: @@ -760,7 +760,7 @@ class NetworkScreenMixin: self._render_ollama_rows(getattr(self, "_ollama_rows", []) or []) def _persist_ollama_multi_selection(self): - data = self.prole_cfg_data.setdefault("Ollama", {}) + data = self.knoe_cfg_data.setdefault("Ollama", {}) selected = sorted(self._ollama_selected_keys) data["OLLAMA_SERVERS"] = ",".join(selected) @@ -789,6 +789,6 @@ class NetworkScreenMixin: pass try: - self._save_prole_cfg() + self._save_knoe_cfg() except Exception: pass diff --git a/knoe/ui/screens/ollama.py b/knoe/ui/screens/ollama.py index 8e2bdfe..365cfb4 100644 --- a/knoe/ui/screens/ollama.py +++ b/knoe/ui/screens/ollama.py @@ -47,7 +47,7 @@ class OllamaScreenMixin: self._render_title("Ollama Server", y=150) self._render_paragraph( "Detect and select a network Ollama server. Click Scan to discover servers on the network. " - "Select a server from the browser to save it to prole.cfg.", + "Select a server from the browser to save it to knoe.cfg.", y=200, ) @@ -550,7 +550,7 @@ class OllamaScreenMixin: if port and port != raw_port: self.ollama_server_port.set(port) - data = self.prole_cfg_data.setdefault("Ollama", {}) + data = self.knoe_cfg_data.setdefault("Ollama", {}) if host: data["OLLAMA_SERVER_HOST"] = host data["OLLAMA_SERVER_PORT"] = port @@ -564,7 +564,7 @@ class OllamaScreenMixin: else: data.pop("OLLAMA_MODEL", None) - self._save_prole_cfg() + self._save_knoe_cfg() if getattr(self, "_ollama_status_var", None): self._ollama_status_var.set("Saved") @@ -596,15 +596,15 @@ class OllamaScreenMixin: self.ollama_model.set(cfg_model) def _read_ollama_cfg_values(self) -> tuple[str, str, str]: - """Return (host, port, model) from prole.cfg if present.""" + """Return (host, port, model) from knoe.cfg if present.""" cfg_path = None try: if self._cfg_path_override is not None: cfg_path = self._cfg_path_override if cfg_path.is_dir(): - cfg_path = cfg_path / "prole.cfg" + cfg_path = cfg_path / "knoe.cfg" else: - cfg_path = self._resolve_prole_conf_dir() / "prole.cfg" + cfg_path = self._resolve_knoe_conf_dir() / "knoe.cfg" except Exception: cfg_path = None if not cfg_path or not Path(cfg_path).exists(): diff --git a/knoe/ui/screens/packaging.py b/knoe/ui/screens/packaging.py index 253dcb8..cbdcea5 100644 --- a/knoe/ui/screens/packaging.py +++ b/knoe/ui/screens/packaging.py @@ -47,7 +47,7 @@ class PackagingScreenMixin: self._render_title("Select Destination", y=150) self._render_paragraph( - "Choose where you would like to deploy the built Prole application and its supporting artifacts.", + "Choose where you would like to deploy the built Knoe application and its supporting artifacts.", y=210, ) @@ -61,8 +61,8 @@ class PackagingScreenMixin: try: from PIL import Image, ImageTk - # Using proleIcon.png as a placeholder for both for now, but I'll add distinct styling - icon_path = PROJECT_ROOT / "img" / "proleIcon.png" + # Using knoeIcon.png as a placeholder for both for now, but I'll add distinct styling + icon_path = PROJECT_ROOT / "img" / "knoeIcon.png" icon_img = Image.open(str(icon_path)).resize((128, 128), Image.LANCZOS) self._disk_icon_tk = ImageTk.PhotoImage(icon_img) except Exception: @@ -193,7 +193,7 @@ class PackagingScreenMixin: self._render_title("Build Summary", y=40) if getattr(self, "_built_success", False): self._render_paragraph( - "✅ Build completed successfully. You can now drag Prole Tools.app into Applications. Output below:", + "✅ Build completed successfully. You can now drag Knoe Tools.app into Applications. Output below:", y=88, ) else: @@ -256,13 +256,13 @@ class PackagingScreenMixin: # On success, also offer DMG packaging and opening options if getattr(self, "_built_success", False): try: - dist_dir = str(self._get_prole_dist_dir()) + dist_dir = str(self._get_knoe_dist_dir()) except Exception: dist_dir = None if dist_dir: y_links += 30 # Create DMG - link2 = ui.render_link(self, 56, y_links, "Create Prole Tools.dmg") + link2 = ui.render_link(self, 56, y_links, "Create Knoe Tools.dmg") self._canvas_items.append(link2) def _open_dist(event): @@ -376,14 +376,14 @@ class PackagingScreenMixin: content = f"{p}\n\nFailed to read log: {e}\n" _add_tab(p.name, content) - # Add prole.cfg tab - cfg_path = self._resolve_prole_conf_dir() / "prole.cfg" + # Add knoe.cfg tab + cfg_path = self._resolve_knoe_conf_dir() / "knoe.cfg" try: cfg_text = cfg_path.read_text(encoding="utf-8", errors="ignore") cfg_content = f"{cfg_path}\n\n{cfg_text}" except Exception as e: - cfg_content = f"{cfg_path}\n\nprole.cfg not found or unreadable: {e}\n" - _add_tab("prole.cfg", cfg_content) + cfg_content = f"{cfg_path}\n\nknoe.cfg not found or unreadable: {e}\n" + _add_tab("knoe.cfg", cfg_content) # Add final_deployment.sh tab _add_tab("final_deployment.sh", script_name="final_deployment.sh") @@ -449,7 +449,7 @@ class PackagingScreenMixin: # Determine overall security status from config data security_status = ( - (self.prole_cfg_data.get("Security", {}) or {}).get("STATUS", "") + (self.knoe_cfg_data.get("Security", {}) or {}).get("STATUS", "") ) secured = security_status == "Secured" @@ -460,7 +460,7 @@ class PackagingScreenMixin: accounts = [ ("Grafana admin", "prometheus-grafana", "monitoring"), - ("PostgreSQL prole", "knoe-db-user", "knoe-db-0"), + ("PostgreSQL knoe", "knoe-db-user", "knoe-db-0"), ("PostgreSQL postgres", "knoe-db-superuser", "knoe-db-0"), ("OpenBao root", "openbao-root-token", "knoe-system"), ] @@ -500,7 +500,7 @@ class PackagingScreenMixin: msg = "Password rotation complete ✓" if rc == 0 else f"update.sh failed (code {rc})" color = _GREEN if rc == 0 else _RED if rc == 0: - self.prole_cfg_data.setdefault("Security", {})["STATUS"] = "Secured" + self.knoe_cfg_data.setdefault("Security", {})["STATUS"] = "Secured" except Exception as exc: msg = f"Error: {exc}" color = _RED @@ -541,7 +541,7 @@ class PackagingScreenMixin: y_links += 28 # Resolve Kong external IP (non-blocking best-effort) - app_ctx = (self.prole_cfg_data.get("Global", {}) or {}).get( + app_ctx = (self.knoe_cfg_data.get("Global", {}) or {}).get( "APP_CLUSTER_KUBECONTEXT", "" ).strip() kong_ip = "" @@ -561,7 +561,7 @@ class PackagingScreenMixin: except Exception: pass - db_ns = (self.prole_cfg_data.get("Global", {}) or {}).get( + db_ns = (self.knoe_cfg_data.get("Global", {}) or {}).get( "DATABASE_NAMESPACE", "knoe-db-0" ) @@ -616,8 +616,8 @@ class PackagingScreenMixin: self.show_page("create_installer") self.bg_canvas.bind("", _open_logs, add="+") - def _get_prole_dist_dir(self) -> Path: - return PROJECT_ROOT / "prole-tools-app" / "dist" + def _get_knoe_dist_dir(self) -> Path: + return PROJECT_ROOT / "knoe-tools-app" / "dist" def ensure_applications_symlink(self): """Deprecated: no longer create /Applications symlink inside the repo. @@ -628,7 +628,7 @@ class PackagingScreenMixin: return def open_drag_install_window(self): - """Open the Prole DMG in Finder (macOS) for drag-and-drop install.""" + """Open the Knoe DMG in Finder (macOS) for drag-and-drop install.""" if platform.system() != "Darwin": return p = self._get_dmg_paths() @@ -660,17 +660,17 @@ class PackagingScreenMixin: try: user_dist.mkdir(parents=True, exist_ok=True) except Exception: - user_dist = self._get_prole_dist_dir() + user_dist = self._get_knoe_dist_dir() - dmg_name = "Prole Tools.dmg" - tmp_dmg = user_dist / "Prole Tools.tmp.dmg" + dmg_name = "Knoe Tools.dmg" + tmp_dmg = user_dist / "Knoe Tools.tmp.dmg" final_dmg = user_dist / dmg_name # Use a temporary staging area in the app's dist dir to keep user folder clean - app_dist = self._get_prole_dist_dir() + app_dist = self._get_knoe_dist_dir() staging = app_dist / "dmg_stage" bg_dir = staging / ".background" - bg_img = get_resource_path("img/proleLogoBlueprint.png") + bg_img = get_resource_path("img/knoeLogoBlueprint.png") return { "dist": user_dist, "tmp_dmg": tmp_dmg, @@ -681,13 +681,13 @@ class PackagingScreenMixin: } def create_dmg(self): - """Create a DMG containing Prole Tools.app, a 'setup' binary, and an /Applications symlink.""" + """Create a DMG containing Knoe Tools.app, a 'setup' binary, and an /Applications symlink.""" global installer_name if platform.system() != "Darwin": return p = self._get_dmg_paths() - app_src = get_resource_path("prole-app/dist/Prole Tools.app") + app_src = get_resource_path("knoe-app/dist/Knoe Tools.app") if not app_src.exists(): print(f"Error: {app_src} not found. Run build first.") return @@ -701,8 +701,8 @@ class PackagingScreenMixin: # 1. Build static installer binary using PyInstaller print("Building static installer binary...") - installer_name = "Install Prole Infrastructure" - icon_path = PROJECT_ROOT / "img" / "proleIconblueprint.png" + installer_name = "Install Knoe Infrastructure" + icon_path = PROJECT_ROOT / "img" / "knoeIconblueprint.png" try: # Use --onefile for a single executable cmd = [ @@ -738,9 +738,9 @@ class PackagingScreenMixin: messagebox.showerror("Error", f"Failed to create DMG: {e}") print(f"Warning: Failed to build setup binary with PyInstaller: {e}") - # 2. Copy Prole Tools.app to staging (at root for drag-and-drop) - print("Copying Prole Tools.app to staging...") - dst_app = staging / "Prole Tools.app" + # 2. Copy Knoe Tools.app to staging (at root for drag-and-drop) + print("Copying Knoe Tools.app to staging...") + dst_app = staging / "Knoe Tools.app" if dst_app.exists(): shutil.rmtree(dst_app) @@ -749,10 +749,10 @@ class PackagingScreenMixin: else: subprocess.check_call(["cp", "-R", str(app_src), str(dst_app)]) - # Inject launcher wrapper into Prole Tools.app + # Inject launcher wrapper into Knoe Tools.app macos_dir = dst_app / "Contents" / "MacOS" - launcher_path = macos_dir / "Prole Tools" - real_bin_path = macos_dir / "ProleTools.bin" + launcher_path = macos_dir / "Knoe Tools" + real_bin_path = macos_dir / "KnoeTools.bin" if launcher_path.exists() and launcher_path.is_file(): if real_bin_path.exists(): if real_bin_path.is_dir(): @@ -763,12 +763,12 @@ class PackagingScreenMixin: script = """#!/bin/bash set -euo pipefail -export PROLE_HOME="${PROLE_HOME:-$HOME/.prole}" -if [ -f "$PROLE_HOME/env.sh" ]; then - . "$PROLE_HOME/env.sh" +export KNOE_HOME="${KNOE_HOME:-$HOME/.knoe}" +if [ -f "$KNOE_HOME/env.sh" ]; then + . "$KNOE_HOME/env.sh" fi DIR="$(cd "$(dirname "$0")" && pwd)" -exec "$DIR/ProleTools.bin" "$@" +exec "$DIR/KnoeTools.bin" "$@" """ with open(launcher_path, "w") as fp: fp.write(script) @@ -802,7 +802,7 @@ exec "$DIR/ProleTools.bin" "$@" "hdiutil", "create", "-volname", - "Prole", + "Knoe", "-srcfolder", str(staging), "-ov", @@ -813,9 +813,9 @@ exec "$DIR/ProleTools.bin" "$@" ) # Positions in DMG: - # [Install Prole Infrastructure] (left) - # [Prole Tools.app] (center/right) - # [Applications] (below Prole Tools.app) + # [Install Knoe Infrastructure] (left) + # [Knoe Tools.app] (center/right) + # [Applications] (below Knoe Tools.app) # Note: We use the installer name in the AppleScript. # Finder items need to match the actual file names on disk. @@ -823,7 +823,7 @@ exec "$DIR/ProleTools.bin" "$@" # 6. Set DMG view options (large icons) using AppleScript print("Configuring DMG view options...") - mount_point = Path("/Volumes/Prole") + mount_point = Path("/Volumes/Knoe") try: # Detach if already mounted subprocess.run( @@ -844,7 +844,7 @@ exec "$DIR/ProleTools.bin" "$@" applescript = f""" tell application "Finder" - tell disk "Prole" + tell disk "Knoe" open set current view of container window to icon view set toolbar visible of container window to false @@ -858,7 +858,7 @@ exec "$DIR/ProleTools.bin" "$@" -- Position icons set position of item "{installer_name}" of container window to {{150, 200}} - set position of item "Prole Tools.app" of container window to {{450, 200}} + set position of item "Knoe Tools.app" of container window to {{450, 200}} set position of item "Applications" of container window to {{450, 400}} update without registering applications @@ -952,7 +952,7 @@ exec "$DIR/ProleTools.bin" "$@" # Instructions instructions = tk.Label( frame, - text="Install the following dependencies to proceed with Prole deployment:", + text="Install the following dependencies to proceed with Knoe deployment:", bg="#1a1a1a", fg="#aaaaaa", font=("Helvetica", 11), @@ -966,7 +966,7 @@ exec "$DIR/ProleTools.bin" "$@" dependencies = [ { "name": "Docker", - "description": "Container platform for running Prole services", + "description": "Container platform for running Knoe services", "url": "https://www.docker.com/products/docker-desktop", "install_cmd": None, "check_cmd": "docker --version", @@ -1137,14 +1137,14 @@ exec "$DIR/ProleTools.bin" "$@" # Expected order of templates expected = [ - "install_prole_homebrew.sh", - "install_prole_k3d.sh", - "install_prole_kubectl.sh", - "install_prole_helm.sh", - "install_prole_krew.sh", - "install_prole_cmctl.sh", - "install_prole_opentofu.sh", - "install_prole_kubectl_plugins.sh", + "install_knoe_homebrew.sh", + "install_knoe_k3d.sh", + "install_knoe_kubectl.sh", + "install_knoe_helm.sh", + "install_knoe_krew.sh", + "install_knoe_cmctl.sh", + "install_knoe_opentofu.sh", + "install_knoe_kubectl_plugins.sh", ] def _validate_and_strip(path: Path) -> str: @@ -1183,10 +1183,10 @@ exec "$DIR/ProleTools.bin" "$@" header = ( "#!/bin/bash\n" - "# Prole Dependencies Installer Script\n" - "# Generated by Prole Installer\n\n" + "# Knoe Dependencies Installer Script\n" + "# Generated by Knoe Installer\n\n" "set -euo pipefail\n\n" - 'echo "Installing Prole dependencies..."\n\n' + 'echo "Installing Knoe dependencies..."\n\n' ) parts.append(header) @@ -1222,7 +1222,7 @@ exec "$DIR/ProleTools.bin" "$@" messagebox.showerror("Error", f"Failed to generate script: {str(e)}") def _collect_install_logs(self) -> list[Path]: - logs_dir = self._resolve_prole_logs_dir() + logs_dir = self._resolve_knoe_logs_dir() build_logs = [] init_logs = [] seen = set() diff --git a/knoe/ui/screens/security.py b/knoe/ui/screens/security.py index c4e2175..93a3dd1 100644 --- a/knoe/ui/screens/security.py +++ b/knoe/ui/screens/security.py @@ -18,9 +18,9 @@ from knoe.core.env import ( ) from knoe.config import ( SECRET_KEY_SPECS, - _decrypt_prole_secret, + _decrypt_knoe_secret, _is_openbao_ref, - _is_prole_secret, + _is_knoe_secret, ) @@ -57,7 +57,7 @@ class SecurityScreenMixin: self._render_title("Knoe Authority", y=150) self._render_paragraph( - "Configure Kerberos authentication for Prole and the PostgreSQL database. Tests run inside the Kubernetes namespace to validate against your realm.", + "Configure Kerberos authentication for Knoe and the PostgreSQL database. Tests run inside the Kubernetes namespace to validate against your realm.", y=200, ) @@ -224,36 +224,36 @@ class SecurityScreenMixin: return try: - self.prole_cfg_data["Kerberos Authentication"]["ENABLED"] = str( + self.knoe_cfg_data["Kerberos Authentication"]["ENABLED"] = str( self.kerberos_enabled.get() ) - self.prole_cfg_data["Kerberos Authentication"]["REALM"] = realm - self.prole_cfg_data["Kerberos Authentication"]["KDC"] = kdc - self.prole_cfg_data["Kerberos Authentication"]["SERVER"] = kdc - self.prole_cfg_data["Kerberos Authentication"]["USER"] = user - self.prole_cfg_data["Kerberos Authentication"]["PASSWORD"] = password - self.prole_cfg_data["Optional Features"]["KERBEROS_ENABLED"] = str( + self.knoe_cfg_data["Kerberos Authentication"]["REALM"] = realm + self.knoe_cfg_data["Kerberos Authentication"]["KDC"] = kdc + self.knoe_cfg_data["Kerberos Authentication"]["SERVER"] = kdc + self.knoe_cfg_data["Kerberos Authentication"]["USER"] = user + self.knoe_cfg_data["Kerberos Authentication"]["PASSWORD"] = password + self.knoe_cfg_data["Optional Features"]["KERBEROS_ENABLED"] = str( self.kerberos_enabled.get() ) - self.prole_cfg_data["Kerberos Authentication"]["AD_PORT_FORWARD"] = ( + self.knoe_cfg_data["Kerberos Authentication"]["AD_PORT_FORWARD"] = ( os.environ.get("KRB5_AD_PORT_FORWARD", "1") ) - self.prole_cfg_data["Kerberos Authentication"]["AD_TCP_PORTS"] = ( + self.knoe_cfg_data["Kerberos Authentication"]["AD_TCP_PORTS"] = ( os.environ.get("KRB5_AD_TCP_PORTS", "88 389 445 464 636") ) - self.prole_cfg_data["Kerberos Authentication"]["AD_UDP_PORTS"] = ( + self.knoe_cfg_data["Kerberos Authentication"]["AD_UDP_PORTS"] = ( os.environ.get("KRB5_AD_UDP_PORTS", "88 464") ) - self.prole_cfg_data["Kerberos Authentication"]["AD_PROXY_HOST_NETWORK"] = ( + self.knoe_cfg_data["Kerberos Authentication"]["AD_PROXY_HOST_NETWORK"] = ( os.environ.get("KRB5_AD_PROXY_HOST_NETWORK", "1") ) - self.prole_cfg_data["Kerberos Authentication"]["AD_PROXY_IMAGE"] = ( + self.knoe_cfg_data["Kerberos Authentication"]["AD_PROXY_IMAGE"] = ( os.environ.get("KRB5_AD_PROXY_IMAGE", "alpine/socat") ) - self.prole_cfg_data["Kerberos Authentication"]["AD_PROXY_SERVICE"] = ( - os.environ.get("KRB5_AD_SERVICE_NAME", "prole-kerberos-ad-dc") + self.knoe_cfg_data["Kerberos Authentication"]["AD_PROXY_SERVICE"] = ( + os.environ.get("KRB5_AD_SERVICE_NAME", "knoe-kerberos-ad-dc") ) - self._save_prole_cfg() + self._save_knoe_cfg() except Exception: pass @@ -268,8 +268,8 @@ class SecurityScreenMixin: def worker(): try: env = os.environ.copy() - env["PROLE_HOME"] = str(PROJECT_ROOT) - env["PROLE_SERVICE"] = str(PROJECT_ROOT) + env["KNOE_HOME"] = str(PROJECT_ROOT) + env["KNOE_SERVICE"] = str(PROJECT_ROOT) env["NAMESPACE"] = (self.db_namespace.get() or "").strip() env["SERVICE_NAMESPACE"] = self._get_service_namespace() env["KRB5_REALM"] = realm @@ -285,7 +285,7 @@ class SecurityScreenMixin: if mode == "k3s": env.setdefault("KRB5_AD_PORT_FORWARD", "0") if mode: - env["PROLE_MODE"] = mode + env["KNOE_MODE"] = mode env["DEPLOYMENT_MODE"] = mode env["DEPLOYMENT_TARGET"] = _deployment_target_label( self.cluster_env.get() @@ -425,10 +425,10 @@ class SecurityScreenMixin: if self._cfg_path_override is not None: cfg_path = self._cfg_path_override if cfg_path.is_dir(): - cfg_path = cfg_path / "prole.cfg" + cfg_path = cfg_path / "knoe.cfg" else: - conf_dir = self._resolve_prole_conf_dir() - cfg_path = conf_dir / "prole.cfg" + conf_dir = self._resolve_knoe_conf_dir() + cfg_path = conf_dir / "knoe.cfg" except Exception: return if not cfg_path.exists(): @@ -457,8 +457,8 @@ class SecurityScreenMixin: ("Global", "DB_PASSWORD"), ] ) - if db_val and _is_prole_secret(db_val): - db_plain = _decrypt_prole_secret(db_val) + if db_val and _is_knoe_secret(db_val): + db_plain = _decrypt_knoe_secret(db_val) elif db_val and _is_openbao_ref(db_val): # Attempt to resolve from OpenBao for the UI try: @@ -484,8 +484,8 @@ class SecurityScreenMixin: ("Kerberos Authentication", "PASSWORD"), ] ) - if krb_val and _is_prole_secret(krb_val): - krb_plain = _decrypt_prole_secret(krb_val) + if krb_val and _is_knoe_secret(krb_val): + krb_plain = _decrypt_knoe_secret(krb_val) elif krb_val and _is_openbao_ref(krb_val): # Attempt to resolve from OpenBao for the UI try: @@ -508,8 +508,8 @@ class SecurityScreenMixin: def _kerberos_script_env(self): env = os.environ.copy() - env["PROLE_HOME"] = str(PROJECT_ROOT) - env["PROLE_SERVICE"] = str(PROJECT_ROOT) + env["KNOE_HOME"] = str(PROJECT_ROOT) + env["KNOE_SERVICE"] = str(PROJECT_ROOT) env["KNOE_DB_USER"] = self.db_username.get() env["DB_PASSWORD"] = self.db_password.get() env["NAMESPACE"] = (self.db_namespace.get() or "").strip() or "default" @@ -537,7 +537,7 @@ class SecurityScreenMixin: mode = self._deployment_mode() mode_args = ["--mode", mode] if mode else [] if mode: - env["PROLE_MODE"] = mode + env["KNOE_MODE"] = mode env["DEPLOYMENT_MODE"] = mode env["DEPLOYMENT_TARGET"] = _deployment_target_label( self.cluster_env.get() @@ -612,8 +612,8 @@ class SecurityScreenMixin: def _on_kerberos_toggle(self): enabled = self.kerberos_enabled.get() try: - self.prole_cfg_data["Optional Features"]["KERBEROS_ENABLED"] = str(enabled) - self._save_prole_cfg() + self.knoe_cfg_data["Optional Features"]["KERBEROS_ENABLED"] = str(enabled) + self._save_knoe_cfg() except Exception: pass @@ -635,7 +635,7 @@ class SecurityScreenMixin: self.update_footer() self.safe_after(self._run_kerberos_init) - def _save_ansible_prole_vault(self, root_password: str): + def _save_ansible_knoe_vault(self, root_password: str): if not root_password: return @@ -645,7 +645,7 @@ class SecurityScreenMixin: / "inventory" / "group_vars" / "all" - / "prole_vault.yml" + / "knoe_vault.yml" ) _ensure_ansible_vault_credentials(prompt_ui=False) @@ -665,15 +665,15 @@ class SecurityScreenMixin: return try: - # We must decrypt if it is a prole secret + # We must decrypt if it is a knoe secret plain_pass = root_password - if _is_prole_secret(root_password): + if _is_knoe_secret(root_password): try: - plain_pass = _decrypt_prole_secret(root_password) + plain_pass = _decrypt_knoe_secret(root_password) except Exception: pass - content = f'prole_root_password: "{plain_pass}"\n' + content = f'knoe_root_password: "{plain_pass}"\n' with tempfile.NamedTemporaryFile(mode="w", delete=False) as f: f.write(content) diff --git a/knoe/ui/screens/services.py b/knoe/ui/screens/services.py index 44cdb70..b188c18 100644 --- a/knoe/ui/screens/services.py +++ b/knoe/ui/screens/services.py @@ -73,12 +73,12 @@ class ServicesScreenMixin: """ resolved: dict[str, str] = {} try: - self._load_gcp_cfg_into_prole_data() + self._load_gcp_cfg_into_knoe_data() except Exception: pass - gcp = ((getattr(self, "prole_cfg_data", {}) or {}).get("GCP", {}) or {}) - global_cfg = ((getattr(self, "prole_cfg_data", {}) or {}).get("Global", {}) or {}) + gcp = ((getattr(self, "knoe_cfg_data", {}) or {}).get("GCP", {}) or {}) + global_cfg = ((getattr(self, "knoe_cfg_data", {}) or {}).get("Global", {}) or {}) project_id = ( (gcp.get("project_id") or gcp.get("PROJECT_ID") or "") @@ -318,7 +318,7 @@ class ServicesScreenMixin: # On page load: if previously completed check live state; else stay yellow already_done = getattr(self, "_scripts_success", False) or ( - (self.prole_cfg_data.get("Initialization Scripts") or {}).get("STATUS") == "Completed" + (self.knoe_cfg_data.get("Initialization Scripts") or {}).get("STATUS") == "Completed" ) if already_done: self.safe_after(self._check_init_scripts_status_async) @@ -385,15 +385,15 @@ class ServicesScreenMixin: # Prepare environment for scripts env = os.environ.copy() - env["PROLE_HOME"] = str(PROJECT_ROOT) - env["PROLE_SERVICE"] = str(PROJECT_ROOT) + env["KNOE_HOME"] = str(PROJECT_ROOT) + env["KNOE_SERVICE"] = str(PROJECT_ROOT) env["KNOE_DB_USER"] = self.db_username.get() env["DB_PASSWORD"] = password env["GRAFANA_ADMIN_PASSWORD"] = password db_namespace = (self.db_namespace.get() or "").strip() if not db_namespace: db_namespace = ( - ((getattr(self, "prole_cfg_data", {}) or {}).get("Global", {}) or {}) + ((getattr(self, "knoe_cfg_data", {}) or {}).get("Global", {}) or {}) .get("DATABASE_NAMESPACE", "") .strip() ) @@ -419,7 +419,7 @@ class ServicesScreenMixin: env["ENABLED"] = env["KERBEROS_ENABLED"] mode = self._deployment_mode() if mode: - env["PROLE_MODE"] = mode + env["KNOE_MODE"] = mode env["DEPLOYMENT_MODE"] = mode env["DEPLOYMENT_TARGET"] = _deployment_target_label( self.cluster_env.get() @@ -432,13 +432,13 @@ class ServicesScreenMixin: # CNPG + backup → DB cluster (cnpg_env below). _app_ctx = ( self._cluster_kubecontext("app") - or (self.prole_cfg_data.get("Global", {}) or {}).get( + or (self.knoe_cfg_data.get("Global", {}) or {}).get( "APP_CLUSTER_KUBECONTEXT", "" ) ).strip() _db_ctx = ( self._cluster_kubecontext("db") - or (self.prole_cfg_data.get("Global", {}) or {}).get( + or (self.knoe_cfg_data.get("Global", {}) or {}).get( "DB_CLUSTER_KUBECONTEXT", "" ) ).strip() @@ -455,7 +455,7 @@ class ServicesScreenMixin: mode_args = ["--mode", mode] if mode else [] raw_min = ( - (getattr(self, "prole_cfg_data", {}) or {}) + (getattr(self, "knoe_cfg_data", {}) or {}) .get("Global", {}) .get(POLICY_CFG_KEY, "") ) @@ -470,7 +470,7 @@ class ServicesScreenMixin: env=env, min_nodes=min_nodes ) - logs_dir = self._resolve_prole_logs_dir() + logs_dir = self._resolve_knoe_logs_dir() try: logs_dir.mkdir(parents=True, exist_ok=True) except Exception: @@ -616,12 +616,12 @@ class ServicesScreenMixin: if "GRAFANA_ADMIN_PASSWORD=" in line: pwd = line.split("GRAFANA_ADMIN_PASSWORD=")[1].strip() if pwd: - mon = self.prole_cfg_data.get("Monitoring", {}) + mon = self.knoe_cfg_data.get("Monitoring", {}) if mon is None: mon = {} mon["GRAFANA_ADMIN_PASSWORD"] = pwd - self.prole_cfg_data["Monitoring"] = mon - self._save_prole_cfg() + self.knoe_cfg_data["Monitoring"] = mon + self._save_knoe_cfg() rc_mon = 0 monitoring_ns = env.get("MONITORING_NAMESPACE") or "monitoring" @@ -652,12 +652,12 @@ class ServicesScreenMixin: overall_success = False self.safe_after(lambda: self._set_init_light("monitoring", "red")) else: - mon = self.prole_cfg_data.get("Monitoring", {}) or {} + mon = self.knoe_cfg_data.get("Monitoring", {}) or {} if not str(mon.get("GRAFANA_ADMIN_PASSWORD") or "").strip(): mon["GRAFANA_ADMIN_PASSWORD"] = env.get("GRAFANA_ADMIN_PASSWORD", "") - self.prole_cfg_data["Monitoring"] = mon + self.knoe_cfg_data["Monitoring"] = mon try: - self._save_prole_cfg() + self._save_knoe_cfg() except Exception: pass _con(script).write(f"\n{script} completed successfully.\n") @@ -667,11 +667,11 @@ class ServicesScreenMixin: _select_tab(script) _con(script).clear() _con(script).write(f"[SKIP] Monitoring disabled by policy: {opt_reason}\n") - mon = (getattr(self, "prole_cfg_data", {}) or {}).get("Monitoring") or {} + mon = (getattr(self, "knoe_cfg_data", {}) or {}).get("Monitoring") or {} mon["STATUS"] = "Skipped" - self.prole_cfg_data["Monitoring"] = mon + self.knoe_cfg_data["Monitoring"] = mon try: - self._save_prole_cfg() + self._save_knoe_cfg() except Exception: pass self.safe_after(lambda: self._set_init_light("monitoring", "green")) @@ -991,10 +991,10 @@ class ServicesScreenMixin: self._scripts_success = False try: - self.prole_cfg_data["Initialization Scripts"]["STATUS"] = ( + self.knoe_cfg_data["Initialization Scripts"]["STATUS"] = ( "Completed" if self._scripts_success else "Attempted" ) - self.safe_after(self._save_prole_cfg) + self.safe_after(self._save_knoe_cfg) except Exception: pass @@ -1041,7 +1041,7 @@ class ServicesScreenMixin: def _run_kubectl(args: list[str]): env = os.environ.copy() - env.setdefault("PROLE_HOME", str(PROJECT_ROOT)) + env.setdefault("KNOE_HOME", str(PROJECT_ROOT)) try: res = subprocess.run( base_cmd + args, capture_output=True, text=True, env=env @@ -1303,8 +1303,8 @@ class ServicesScreenMixin: self._canvas_items.append(mode_label) mode_values = [ "knoe-dev-cluster", - "prole-service-cluster", - "prole-prod-cluster", + "knoe-service-cluster", + "knoe-prod-cluster", ] mode_frame = tk.Frame( self.bg_canvas, bg="#F5F5DC", width=180, height=deploy_btn_height @@ -1451,12 +1451,12 @@ class ServicesScreenMixin: etc_dir = PROJECT_ROOT / "etc" # Prepare environment for scripts env = os.environ.copy() - env["PROLE_HOME"] = str(PROJECT_ROOT) - env["PROLE_SERVICE"] = str(PROJECT_ROOT) + env["KNOE_HOME"] = str(PROJECT_ROOT) + env["KNOE_SERVICE"] = str(PROJECT_ROOT) env["NAMESPACE"] = (self.db_namespace.get() or "").strip() env["NAMESPACE"] = (self.db_namespace.get() or "").strip() if mode: - env["PROLE_MODE"] = mode + env["KNOE_MODE"] = mode env["DEPLOYMENT_MODE"] = mode env["DEPLOYMENT_TARGET"] = _deployment_target_label( self.cluster_env.get() @@ -1555,11 +1555,11 @@ class ServicesScreenMixin: # Prepare environment env = os.environ.copy() - env["PROLE_HOME"] = str(PROJECT_ROOT) - env["PROLE_SERVICE"] = str(PROJECT_ROOT) + env["KNOE_HOME"] = str(PROJECT_ROOT) + env["KNOE_SERVICE"] = str(PROJECT_ROOT) mode = self._deployment_mode() if mode: - env["PROLE_MODE"] = mode + env["KNOE_MODE"] = mode env["DEPLOYMENT_MODE"] = mode env["DEPLOYMENT_TARGET"] = _deployment_target_label( self.cluster_env.get() @@ -1902,7 +1902,7 @@ class ServicesScreenMixin: self.safe_after(_place) def worker(): - key_path = Path.home() / ".ssh" / "id_prole_ed25519" + key_path = Path.home() / ".ssh" / "id_knoe_ed25519" key_path.parent.mkdir(parents=True, exist_ok=True) password = self.db_password.get() namespace = (self.db_namespace.get() or "").strip() diff --git a/knoe/ui/screens/supabase.py b/knoe/ui/screens/supabase.py index aad15a7..2b58eac 100644 --- a/knoe/ui/screens/supabase.py +++ b/knoe/ui/screens/supabase.py @@ -4,7 +4,7 @@ import os import subprocess import threading import tkinter as tk -from knoe import prole_conf +from knoe import knoe_conf from knoe import screen as ui from knoe.core.env import PROJECT_ROOT, _normalize_cluster_env, _parse_bool @@ -173,8 +173,8 @@ class SupabaseScreenMixin: or "default" ) env = os.environ.copy() - env["PROLE_HOME"] = str(PROJECT_ROOT) - env["PROLE_SERVICE"] = str(PROJECT_ROOT) + env["KNOE_HOME"] = str(PROJECT_ROOT) + env["KNOE_SERVICE"] = str(PROJECT_ROOT) env["NAMESPACE"] = namespace pv_node = "" @@ -231,13 +231,13 @@ class SupabaseScreenMixin: if self._cfg_path_override and self._cfg_path_override.exists(): cfg_path = self._cfg_path_override else: - conf_dir = self._resolve_prole_conf_dir() - candidate = conf_dir / "prole.cfg" + conf_dir = self._resolve_knoe_conf_dir() + candidate = conf_dir / "knoe.cfg" if candidate.exists(): cfg_path = candidate if not cfg_path: - candidate = prole_conf.entrypoint_path( - prole_conf.resolve_prole_conf_dir(PROJECT_ROOT) + candidate = knoe_conf.entrypoint_path( + knoe_conf.resolve_knoe_conf_dir(PROJECT_ROOT) ) if candidate.exists(): cfg_path = candidate @@ -247,7 +247,7 @@ class SupabaseScreenMixin: args.extend(["-c", str(cfg_path)]) try: - self._save_prole_cfg() + self._save_knoe_cfg() except Exception: pass @@ -380,8 +380,8 @@ class SupabaseScreenMixin: def _on_supabase_toggle(self): enabled = self.supabase_enabled.get() try: - self.prole_cfg_data["Optional Features"]["SUPABASE_ENABLED"] = str(enabled) - self._save_prole_cfg() + self.knoe_cfg_data["Optional Features"]["SUPABASE_ENABLED"] = str(enabled) + self._save_knoe_cfg() except Exception: pass diff --git a/knoe/ui/screens/validate.py b/knoe/ui/screens/validate.py index 8577c5f..b665b51 100644 --- a/knoe/ui/screens/validate.py +++ b/knoe/ui/screens/validate.py @@ -163,7 +163,7 @@ class ValidateScreenMixin: if result.returncode == 0: status_output = result.stdout else: - # Try default namespace if prole fails, or just show error + # Try default namespace if knoe fails, or just show error status_output = f"Error: {result.stderr}\n\nNote: Make sure kubectl cnpg plugin is installed and cluster exists in '{namespace}' namespace." full_status += f"=== CloudNativePG Status (namespace: {namespace}) ===\n{status_output}\n" diff --git a/knoe/ui/screens/welcome.py b/knoe/ui/screens/welcome.py index 73328a4..2adcbda 100644 --- a/knoe/ui/screens/welcome.py +++ b/knoe/ui/screens/welcome.py @@ -38,7 +38,7 @@ class WelcomeScreenMixin: self._render_title("Welcome", y=150) welcome_text = ( - "This installer will guide you through the process of setting up the Prole Database and its supporting " + "This installer will guide you through the process of setting up the Knoe Database and its supporting " "infrastructure. We have designed this process to be as automated as possible, ensuring that your " "deployment is secure, efficient, and tailored to your specific network environment.\n\n" "What to expect:\n" @@ -47,7 +47,7 @@ class WelcomeScreenMixin: "• Dependency Management: Ensuring all required tools (Docker, k3d, etc.) are ready.\n" "• Database Initialization: Configuring passwords, Kerberos authentication, and deploying the database cluster.\n\n" "We are excited to have you join our community and start building with us. " - "Welcome to the neighborhood! Let's get started by preparing your system for the Prole experience." + "Welcome to the neighborhood! Let's get started by preparing your system for the Knoe experience." ) ui.canvas_text( @@ -127,10 +127,10 @@ class WelcomeScreenMixin: def _create_page_welcome(self): f = self._page_container() - ttk.Label(f, text="Welcome to Prole", style="Title.TLabel").pack( + ttk.Label(f, text="Welcome to Knoe.DB", style="Title.TLabel").pack( anchor="w", padx=24, pady=(24, 6) ) - msg = "Thanks for joining Prole. We will prepare your system and install the software needed to build and run Prole." + msg = "Thanks for joining Knoe. We will prepare your system and install the software needed to build and run Knoe." ttk.Label( f, text=msg, style="Body.TLabel", wraplength=800, justify="left" ).pack(anchor="w", padx=24) diff --git a/mock_val/build-a-bao.sh b/mock_val/build-a-bao.sh index 8a30c0e..3851dd6 100755 --- a/mock_val/build-a-bao.sh +++ b/mock_val/build-a-bao.sh @@ -4,27 +4,27 @@ set -euo pipefail # build-a-bao.sh # Purpose: -# - Decrypt temporary secrets stored in prole.cfg +# - Decrypt temporary secrets stored in knoe.cfg # - Store them in OpenBao for the current namespace -# - Replace prole.cfg secrets with OpenBao placeholders +# - Replace knoe.cfg secrets with OpenBao placeholders SCRIPT_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) -# Load environment and config via prole_cfg.sh +# Load environment and config via knoe_cfg.sh # shellcheck disable=SC1090 -source "$SCRIPT_DIR/prole_cfg.sh" +source "$SCRIPT_DIR/knoe_cfg.sh" cfg_path="" -if [[ -n "${PROLE_CONF:-}" && -f "$PROLE_CONF/prole.cfg" ]]; then - cfg_path="$PROLE_CONF/prole.cfg" -elif [[ -n "${PROLE_HOME:-}" && -f "$PROLE_HOME/conf/prole.cfg" ]]; then - cfg_path="$PROLE_HOME/conf/prole.cfg" -elif [[ -f "$SCRIPT_DIR/../conf/prole.cfg" ]]; then - cfg_path="$SCRIPT_DIR/../conf/prole.cfg" +if [[ -n "${KNOE_CONF:-}" && -f "$KNOE_CONF/knoe.cfg" ]]; then + cfg_path="$KNOE_CONF/knoe.cfg" +elif [[ -n "${KNOE_HOME:-}" && -f "$KNOE_HOME/conf/knoe.cfg" ]]; then + cfg_path="$KNOE_HOME/conf/knoe.cfg" +elif [[ -f "$SCRIPT_DIR/../conf/knoe.cfg" ]]; then + cfg_path="$SCRIPT_DIR/../conf/knoe.cfg" fi if [[ -z "$cfg_path" || ! -f "$cfg_path" ]]; then - echo "ERROR: prole.cfg not found. Set PROLE_CONF or PROLE_HOME." >&2 + echo "ERROR: knoe.cfg not found. Set KNOE_CONF or KNOE_HOME." >&2 exit 1 fi @@ -41,16 +41,16 @@ import subprocess import sys from pathlib import Path -PROLE_SECRET_PREFIX = "${PROLE_SECRET:" -PROLE_SECRET_SUFFIX = "}" +KNOE_SECRET_PREFIX = "${KNOE_SECRET:" +KNOE_SECRET_SUFFIX = "}" OPENBAO_PREFIX = "${OPENBAO:" OPENBAO_SUFFIX = "}" -PROLE_SECRET_VERSION = "v1" -PROLE_SECRET_SERVICE = "prole-installer" -PROLE_SECRET_KEY_FILE = Path.home() / ".prole" / "secrets" / "installer.key" +KNOE_SECRET_VERSION = "v1" +KNOE_SECRET_SERVICE = "knoe-installer" +KNOE_SECRET_KEY_FILE = Path.home() / ".knoe" / "secrets" / "installer.key" -def is_prole_secret(value: str | None) -> bool: - return bool(value) and value.startswith(PROLE_SECRET_PREFIX) and value.endswith(PROLE_SECRET_SUFFIX) +def is_knoe_secret(value: str | None) -> bool: + return bool(value) and value.startswith(KNOE_SECRET_PREFIX) and value.endswith(KNOE_SECRET_SUFFIX) def is_openbao_ref(value: str | None) -> bool: return bool(value) and value.startswith(OPENBAO_PREFIX) and value.endswith(OPENBAO_SUFFIX) @@ -95,17 +95,17 @@ def get_file_key(path: Path) -> bytes: def get_secret_key() -> bytes: system = platform.system() - account = getpass.getuser() or "prole" + account = getpass.getuser() or "knoe" if system == "Darwin": - return get_keychain_key(PROLE_SECRET_SERVICE, account) - return get_file_key(PROLE_SECRET_KEY_FILE) + return get_keychain_key(KNOE_SECRET_SERVICE, account) + return get_file_key(KNOE_SECRET_KEY_FILE) -def decrypt_prole_secret(value: str) -> str: - if not is_prole_secret(value): +def decrypt_knoe_secret(value: str) -> str: + if not is_knoe_secret(value): return value - inner = value[len(PROLE_SECRET_PREFIX):-len(PROLE_SECRET_SUFFIX)] + inner = value[len(KNOE_SECRET_PREFIX):-len(KNOE_SECRET_SUFFIX)] parts = inner.split(":") - if len(parts) != 3 or parts[0] != PROLE_SECRET_VERSION: + if len(parts) != 3 or parts[0] != KNOE_SECRET_VERSION: return "" try: from cryptography.hazmat.primitives.ciphers.aead import AESGCM @@ -161,15 +161,15 @@ if child_realm: krb_realm = child_realm if db_pass and not is_openbao_ref(db_pass): - db_pass = decrypt_prole_secret(db_pass) + db_pass = decrypt_knoe_secret(db_pass) else: db_pass = "" if krb_pass and not is_openbao_ref(krb_pass): - krb_pass = decrypt_prole_secret(krb_pass) + krb_pass = decrypt_knoe_secret(krb_pass) else: krb_pass = "" if grafana_pass and not is_openbao_ref(grafana_pass): - grafana_pass = decrypt_prole_secret(grafana_pass) + grafana_pass = decrypt_knoe_secret(grafana_pass) else: grafana_pass = "" @@ -194,13 +194,13 @@ PY source "$tmp_env" rm -f "$tmp_env" -export PROLE_HOME="${PROLE_HOME:-$(cd "$SCRIPT_DIR/.." && pwd)}" -export PROLE_SERVICE="${PROLE_SERVICE:-$PROLE_HOME}" +export KNOE_HOME="${KNOE_HOME:-$(cd "$SCRIPT_DIR/.." && pwd)}" +export KNOE_SERVICE="${KNOE_SERVICE:-$KNOE_HOME}" NAMESPACE="${PROLE_NAMESPACE}" db_pass="${KNOE_DB_PASSWORD:-}" if [[ -z "$db_pass" ]]; then - echo "[WARN] No database password found in prole.cfg; skipping db secret write." + echo "[WARN] No database password found in knoe.cfg; skipping db secret write." fi if [[ -n "$db_pass" ]]; then @@ -226,7 +226,7 @@ def get_val(section: str, key: str) -> str: namespace = get_val("Global", "NAMESPACE") or get_val("Inputs", "env_setup.NAMESPACE") or get_val("Database Creation", "NAMESPACE") or "default" def openbao_placeholder(ns: str, leaf: str, key: str) -> str: - return f"${{OPENBAO:kv/prole/{ns}/{leaf}#{key}}}" + return f"${{OPENBAO:kv/knoe/{ns}/{leaf}#{key}}}" secret_map = { "init_password.db_password": openbao_placeholder(namespace, "db", "password"), diff --git a/mock_val/build_db.sh b/mock_val/build_db.sh index ac71521..53263c7 100755 --- a/mock_val/build_db.sh +++ b/mock_val/build_db.sh @@ -8,7 +8,7 @@ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" PROJECT_ROOT="$(cd "$SCRIPT_DIR/.." && pwd)" # shellcheck disable=SC1090 -source "$SCRIPT_DIR/prole_cfg.sh" +source "$SCRIPT_DIR/knoe_cfg.sh" TAG="latest" PUSH=false @@ -43,11 +43,11 @@ if docker buildx version >/dev/null 2>&1; then log "Building multi-platform image: knoe-db:$TAG for $PLATFORMS" # Check if a builder exists that supports multi-platform - if ! docker buildx inspect prole-builder >/dev/null 2>&1; then - log "Creating new buildx builder: prole-builder" - docker buildx create --name prole-builder --use || true + if ! docker buildx inspect knoe-builder >/dev/null 2>&1; then + log "Creating new buildx builder: knoe-builder" + docker buildx create --name knoe-builder --use || true else - docker buildx use prole-builder + docker buildx use knoe-builder fi BUILD_ARGS=(--platform "$PLATFORMS") diff --git a/mock_val/final_deployment.sh b/mock_val/final_deployment.sh index 77289a7..1badb06 100755 --- a/mock_val/final_deployment.sh +++ b/mock_val/final_deployment.sh @@ -2,9 +2,9 @@ # usage: etc/final_deployment.sh [-e|--docker-export] [-c|--helm-chart] [-k|--kustomize] [-p|--prepare-k3s-pipeline] [-o|--output-dir DIR] # -# This script handles post-installation deployment tasks for Prole. +# This script handles post-installation deployment tasks for Knoe. # 1st use case: -e|--docker-export -# Runs docker image export for each image required to deploy Prole. +# Runs docker image export for each image required to deploy Knoe. # Artifacts are written to DOCKER_IMPORT_DIR. # 2nd use case: -c|--helm-chart # Creates a Helm chart from the current k8s manifests. @@ -91,9 +91,9 @@ if [[ -f "${PROJECT_ROOT}/env.sh" ]]; then source "${PROJECT_ROOT}/env.sh" fi -default_owner="$(id -un 2>/dev/null || echo prole)" -prole_data="${PROLE_DATA:-/opt/prole/data/${default_owner}}" -prole_data="${prole_data%/}" +default_owner="$(id -un 2>/dev/null || echo knoe)" +knoe_data="${PROLE_DATA:-/opt/knoe/data/${default_owner}}" +knoe_data="${knoe_data%/}" if [[ -n "$export_dir" ]]; then export_dir="${export_dir%/}" @@ -102,9 +102,9 @@ if [[ -n "$export_dir" ]]; then KUSTOMIZE_DIR="${export_dir}/kustomize" fi -DOCKER_IMPORT_DIR="${DOCKER_IMPORT_DIR:-${prole_data}/docker-import}" -HELM_CHART_DIR="${HELM_CHART_DIR:-${prole_data}/helm-chart}" -KUSTOMIZE_DIR="${KUSTOMIZE_DIR:-${prole_data}/kustomize}" +DOCKER_IMPORT_DIR="${DOCKER_IMPORT_DIR:-${knoe_data}/docker-import}" +HELM_CHART_DIR="${HELM_CHART_DIR:-${knoe_data}/helm-chart}" +KUSTOMIZE_DIR="${KUSTOMIZE_DIR:-${knoe_data}/kustomize}" export_docker_images() { echo "Exporting Docker images to: ${DOCKER_IMPORT_DIR}" @@ -112,27 +112,27 @@ export_docker_images() { # Collect images from K8s manifests # Robust extraction of image names from YAML files - find "${PROJECT_ROOT}/k8s/prole" "${PROJECT_ROOT}/k8s/openbao" "${PROJECT_ROOT}/k8s/opentofu" -name "*.yaml" -exec grep -h "image:" {} + | awk -F'image:' '{print $2}' | awk '{print $1}' | sed "s/['\"]//g" > /tmp/prole_images.txt + find "${PROJECT_ROOT}/k8s/knoe" "${PROJECT_ROOT}/k8s/openbao" "${PROJECT_ROOT}/k8s/opentofu" -name "*.yaml" -exec grep -h "image:" {} + | awk -F'image:' '{print $2}' | awk '{print $1}' | sed "s/['\"]//g" > /tmp/knoe_images.txt # Also check Supabase compose if it exists if [[ -f "${PROJECT_ROOT}/supabase/docker/docker-compose.yml" ]]; then - grep -h "image:" "${PROJECT_ROOT}/supabase/docker/docker-compose.yml" | awk -F'image:' '{print $2}' | awk '{print $1}' | sed "s/['\"]//g" >> /tmp/prole_images.txt + grep -h "image:" "${PROJECT_ROOT}/supabase/docker/docker-compose.yml" | awk -F'image:' '{print $2}' | awk '{print $1}' | sed "s/['\"]//g" >> /tmp/knoe_images.txt fi # Add Kerberos proxy image if defined KRB_IMG="${KRB5_AD_PROXY_IMAGE:-alpine/socat}" if [[ -n "$KRB_IMG" ]]; then - echo "$KRB_IMG" >> /tmp/prole_images.txt + echo "$KRB_IMG" >> /tmp/knoe_images.txt fi # Add Kerberos test image (used by init_kerberos_test.sh) KRB_TEST_IMG="${KRB5_TEST_IMAGE:-${PROLE_KRB_TEST_IMAGE:-ubuntu:24.04}}" if [[ -n "$KRB_TEST_IMG" ]]; then - echo "$KRB_TEST_IMG" >> /tmp/prole_images.txt + echo "$KRB_TEST_IMG" >> /tmp/knoe_images.txt fi # Unique images - sort -u /tmp/prole_images.txt > /tmp/prole_images_unique.txt + sort -u /tmp/knoe_images.txt > /tmp/knoe_images_unique.txt while read -r image; do if [[ -z "$image" ]]; then continue; fi @@ -154,15 +154,15 @@ export_docker_images() { else echo "[ERROR] Failed to export $image" fi - done < /tmp/prole_images_unique.txt + done < /tmp/knoe_images_unique.txt - rm -f /tmp/prole_images.txt /tmp/prole_images_unique.txt + rm -f /tmp/knoe_images.txt /tmp/knoe_images_unique.txt echo "Docker export complete." } create_helm_chart() { local chart_dir="${HELM_CHART_DIR}" - local chart_name="prole" + local chart_name="knoe" local chart_version="0.1.0" local app_version app_version="$(date -u +%Y.%m.%d)" @@ -171,12 +171,12 @@ create_helm_chart() { mkdir -p "${chart_dir}/templates" # Clean managed template subdirs to avoid stale manifests. - rm -rf "${chart_dir}/templates/prole" "${chart_dir}/templates/openbao" "${chart_dir}/templates/opentofu" + rm -rf "${chart_dir}/templates/knoe" "${chart_dir}/templates/openbao" "${chart_dir}/templates/opentofu" cat > "${chart_dir}/Chart.yaml" < "${dest_dir}/kustomization.yaml" } - create_kustomize_package "prole" "${PROJECT_ROOT}/k8s/prole" + create_kustomize_package "knoe" "${PROJECT_ROOT}/k8s/knoe" create_kustomize_package "openbao" "${PROJECT_ROOT}/k8s/openbao" create_kustomize_package "opentofu" "${PROJECT_ROOT}/k8s/opentofu" @@ -288,7 +288,7 @@ prepare_k3s_pipeline() { echo "==> Staging k8s manifests to ${manifest_root}" local total=0 - for component in prole openbao opentofu; do + for component in knoe openbao opentofu; do local src="${PROJECT_ROOT}/k8s/${component}" if [[ ! -d "$src" ]]; then echo " [SKIP] ${component}/ (not found)" @@ -347,15 +347,15 @@ EOF if [[ -z "$repo_url" ]]; then repo_url=$(cd "${PROJECT_ROOT}" && git remote get-url origin 2>/dev/null || true) fi - repo_url="${repo_url:-https://github.com/prole-dev/prole.git}" + repo_url="${repo_url:-https://github.com/knoe-dev/knoe.git}" local target_revision="${PROLE_GIT_BRANCH:-main}" - for component in prole openbao opentofu; do + for component in knoe openbao opentofu; do cat > "${argocd_dir}/application-${component}.yaml" <&2 exit 1 fi - prole_render_manifest "$ARGOCD_MANIFEST_FILE" | sed "s|\\${ARGOCD_NAMESPACE}|$ARGOCD_NAMESPACE|g" + knoe_render_manifest "$ARGOCD_MANIFEST_FILE" | sed "s|\\${ARGOCD_NAMESPACE}|$ARGOCD_NAMESPACE|g" } resolve_argocd_node_selector() { @@ -111,7 +111,7 @@ apply_argocd_node_selector() { apply_argocd() { echo "Applying ArgoCD manifest to namespace '$ARGOCD_NAMESPACE' ..." - render_manifest | kubectl apply --server-side --force-conflicts --field-manager=prole-installer --validate=false -n "$ARGOCD_NAMESPACE" -f - + render_manifest | kubectl apply --server-side --force-conflicts --field-manager=knoe-installer --validate=false -n "$ARGOCD_NAMESPACE" -f - apply_argocd_node_selector kubectl rollout status deploy/argocd-server -n "$ARGOCD_NAMESPACE" --timeout=${ROLLOUT_TIMEOUT:-300s} || true kubectl rollout status deploy/argocd-repo-server -n "$ARGOCD_NAMESPACE" --timeout=${ROLLOUT_TIMEOUT:-300s} || true @@ -144,7 +144,7 @@ case "$ACTION" in ensure_tools ensure_namespace apply_argocd - prole_register_port_forward "argocd" "$ARGOCD_NAMESPACE" "svc/${ARGOCD_SERVER_SERVICE}" \ + knoe_register_port_forward "argocd" "$ARGOCD_NAMESPACE" "svc/${ARGOCD_SERVER_SERVICE}" \ "$ARGOCD_PORT_FORWARD_LOCAL" "$ARGOCD_PORT_FORWARD_REMOTE" "0.0.0.0" "TCP" "ArgoCD" ;; restart) @@ -152,7 +152,7 @@ case "$ACTION" in ensure_namespace apply_argocd rollout_restart_argocd - prole_register_port_forward "argocd" "$ARGOCD_NAMESPACE" "svc/${ARGOCD_SERVER_SERVICE}" \ + knoe_register_port_forward "argocd" "$ARGOCD_NAMESPACE" "svc/${ARGOCD_SERVER_SERVICE}" \ "$ARGOCD_PORT_FORWARD_LOCAL" "$ARGOCD_PORT_FORWARD_REMOTE" "0.0.0.0" "TCP" "ArgoCD" ;; stop) diff --git a/mock_val/init_certmgr.sh b/mock_val/init_certmgr.sh index 42152c0..7c2ff2a 100755 --- a/mock_val/init_certmgr.sh +++ b/mock_val/init_certmgr.sh @@ -18,21 +18,21 @@ _has_config=0 for _arg in "$@"; do [[ "$_arg" == "-c" || "$_arg" == "--config" || "$_arg" == -c=* || "$_arg" == --config=* ]] && _has_config=1 done -if [[ $_has_config -eq 0 && -f "$SCRIPT_DIR/../conf/prole.cfg" ]]; then - set -- "-c" "$SCRIPT_DIR/../conf/prole.cfg" "$@" +if [[ $_has_config -eq 0 && -f "$SCRIPT_DIR/../conf/knoe.cfg" ]]; then + set -- "-c" "$SCRIPT_DIR/../conf/knoe.cfg" "$@" fi unset _has_config _arg common_core_preparse_config "$@" # shellcheck disable=SC1090 -source "$SCRIPT_DIR/prole_cfg.sh" +source "$SCRIPT_DIR/knoe_cfg.sh" set -- "${COMMON_CORE_ARGS[@]}" common_core_parse_args "$@" -if [[ -z "${PROLE_MODE:-}" ]]; then - export PROLE_MODE="k3s" +if [[ -z "${KNOE_MODE:-}" ]]; then + export KNOE_MODE="k3s" fi if [[ "${COMMON_CORE_HELP:-0}" == 1 ]]; then @@ -55,13 +55,13 @@ common_core_apply_namespace "$CERTMGR_NAMESPACE" CERTMGR_VERSION="${CERTMGR_VERSION:-v1.14.6}" CERTMGR_RELEASE_URL="https://github.com/cert-manager/cert-manager/releases/download/${CERTMGR_VERSION}/cert-manager.yaml" CERTMGR_PF_ADDR="${CERTMGR_PF_ADDR:-127.0.0.1}" -if [[ "${PROLE_MODE:-}" == "k3s" ]]; then +if [[ "${KNOE_MODE:-}" == "k3s" ]]; then CERTMGR_PF_ADDR="${CERTMGR_PF_ADDR:-0.0.0.0}" fi usage() { cat <&2 +if [[ -z "${KNOE_SERVICE:-}" ]]; then + echo "ERROR: KNOE_SERVICE is not defined. Provide KNOE_HOME/env.sh or ~/.knoe/env.sh" >&2 exit 1 fi @@ -44,17 +44,17 @@ CNPG_CLUSTER_NAME=${CNPG_CLUSTER_NAME:-knoe-db} VERSION=${2:-latest} OPENBAO_NAME=${OPENBAO_NAME:-openbao} REALM=${REALM:-PROLE.ORG} -DOMAIN=${DOMAIN:-prole.org} +DOMAIN=${DOMAIN:-knoe.org} CNPG_MANIFEST_OVERRIDE=${CNPG_MANIFEST_OVERRIDE:-} -PROLE_HOME=${PROLE_HOME:-$(cd "$SCRIPT_DIR/.." && pwd)} -BACKUP_DIR=${BACKUP_DIR:-$PROLE_HOME/prole/backup} +KNOE_HOME=${KNOE_HOME:-$(cd "$SCRIPT_DIR/.." && pwd)} +BACKUP_DIR=${BACKUP_DIR:-$KNOE_HOME/knoe/backup} BACKUP_WAIT_TIMEOUT=${BACKUP_WAIT_TIMEOUT:-1800} -if [[ "${PROLE_MODE:-}" == "k3s" ]]; then +if [[ "${KNOE_MODE:-}" == "k3s" ]]; then CNPG_WAIT_TIMEOUT=${CNPG_WAIT_TIMEOUT:-900} else CNPG_WAIT_TIMEOUT=${CNPG_WAIT_TIMEOUT:-300} fi -RECOVERY_TEMPLATE="$SCRIPT_DIR/../k8s/prole/knoe-db-recovery.yaml.tpl" +RECOVERY_TEMPLATE="$SCRIPT_DIR/../k8s/knoe/knoe-db-recovery.yaml.tpl" BARMAN_PLUGIN_MANIFEST_URL=${BARMAN_PLUGIN_MANIFEST_URL:-} BARMAN_PLUGIN_FALLBACK_VERSION=${BARMAN_PLUGIN_FALLBACK_VERSION:-0.9.0} CERT_MANAGER_MANIFEST_URL=${CERT_MANAGER_MANIFEST_URL:-} @@ -73,26 +73,26 @@ if [[ "$ACTION" != "deploy" && "$ACTION" != "rollout" && "$ACTION" != "force-rol fi # Prefer infra-managed manifests (OpenTofu/GitOps) when available so bootstrap matches Ansible. -if [[ -n "${PROLE_HOME:-}" && -d "$PROLE_HOME/deploy/opentofu/k3s/manifests/prole" ]]; then - K8S_PROLE_DIR="$PROLE_HOME/deploy/opentofu/k3s/manifests/prole" -elif [[ -d "$SCRIPT_DIR/../deploy/opentofu/k3s/manifests/prole" ]]; then - K8S_PROLE_DIR="$SCRIPT_DIR/../deploy/opentofu/k3s/manifests/prole" -elif [[ -d "$SCRIPT_DIR/../k8s/prole" ]]; then - K8S_PROLE_DIR="$SCRIPT_DIR/../k8s/prole" -elif [[ -n "${PROLE_HOME:-}" && -d "$PROLE_HOME/k8s/prole" ]]; then - K8S_PROLE_DIR="$PROLE_HOME/k8s/prole" +if [[ -n "${KNOE_HOME:-}" && -d "$KNOE_HOME/deploy/opentofu/k3s/manifests/knoe" ]]; then + K8S_PROLE_DIR="$KNOE_HOME/deploy/opentofu/k3s/manifests/knoe" +elif [[ -d "$SCRIPT_DIR/../deploy/opentofu/k3s/manifests/knoe" ]]; then + K8S_PROLE_DIR="$SCRIPT_DIR/../deploy/opentofu/k3s/manifests/knoe" +elif [[ -d "$SCRIPT_DIR/../k8s/knoe" ]]; then + K8S_PROLE_DIR="$SCRIPT_DIR/../k8s/knoe" +elif [[ -n "${KNOE_HOME:-}" && -d "$KNOE_HOME/k8s/knoe" ]]; then + K8S_PROLE_DIR="$KNOE_HOME/k8s/knoe" else - K8S_PROLE_DIR="$SCRIPT_DIR/../k8s/prole" + K8S_PROLE_DIR="$SCRIPT_DIR/../k8s/knoe" fi CNPG_MANIFEST="$K8S_PROLE_DIR/knoe-db.yaml" BARMAN_OBJECTSTORE_MANIFEST="$K8S_PROLE_DIR/knoe-db-barman-objectstore.yaml" # Secrets and token locations -# Use PROLE_SERVICE if writable locally, otherwise fallback to ~/.prole -if [[ -n "${PROLE_SERVICE:-}" ]] && _prole_usable_dir "${PROLE_SERVICE}/secrets" >/dev/null; then - SECRETS_DIR="$PROLE_SERVICE/secrets" +# Use KNOE_SERVICE if writable locally, otherwise fallback to ~/.knoe +if [[ -n "${KNOE_SERVICE:-}" ]] && _knoe_usable_dir "${KNOE_SERVICE}/secrets" >/dev/null; then + SECRETS_DIR="$KNOE_SERVICE/secrets" else - SECRETS_DIR="$HOME/.prole/etc/secrets" + SECRETS_DIR="$HOME/.knoe/etc/secrets" fi mkdir -p "$SECRETS_DIR" 2>/dev/null || true @@ -103,11 +103,11 @@ ADMIN_PUB_ED25519="$SECRETS_DIR/admin_ed25519.pub" ADMIN_PRIV_GENERIC="$SECRETS_DIR/admin.key" ADMIN_PUB_GENERIC="$SECRETS_DIR/admin.pub" OPENBAO_TOKEN_FILE="$SECRETS_DIR/openbao-root-token" -# NAMESPACE is always derived from prole.cfg via PROLE_NAMESPACE — never from the environment +# NAMESPACE is always derived from knoe.cfg via PROLE_NAMESPACE — never from the environment NAMESPACE="${PROLE_NAMESPACE}" BAO_NAMESPACE="${PROLE_NAMESPACE}" OPENBAO_NAMESPACE="${OPENBAO_NAMESPACE:-${SERVICE_NAMESPACE:-${PROLE_NAMESPACE}}}" -BAO_PATH_PREFIX="prole/${BAO_NAMESPACE}" +BAO_PATH_PREFIX="knoe/${BAO_NAMESPACE}" BAO_PATH_ADMIN="${BAO_PATH_PREFIX}/admin" BAO_PATH_DB="${BAO_PATH_PREFIX}/db" BAO_PATH_MONITORING="${BAO_PATH_PREFIX}/monitoring" @@ -123,13 +123,13 @@ _require_tool() { command -v "$t" >/dev/null 2>&1 || { echo "ERROR: Missing required tool: $t" >&2; return 1; } } -_require_prole_protected_mount() { +_require_knoe_protected_mount() { local path="$1" label="$2" local findmnt_bin="${PROLE_FINDMNT_BIN:-findmnt}" if [[ ! -d "$path" ]]; then echo "ERROR: Protected ${label} path missing: ${path}" >&2 - echo "Refusing CNPG deployment: Prole protected storage must be mounted at ${PROLE_PROTECTED_DATA_PATH} and ${PROLE_PROTECTED_WAL_PATH}." >&2 + echo "Refusing CNPG deployment: Knoe protected storage must be mounted at ${PROLE_PROTECTED_DATA_PATH} and ${PROLE_PROTECTED_WAL_PATH}." >&2 return 1 fi @@ -157,21 +157,21 @@ _require_prole_protected_mount() { return 0 } -ensure_prole_protected_storage() { - if [[ "${PROLE_MODE:-}" != "k3s" ]]; then +ensure_knoe_protected_storage() { + if [[ "${KNOE_MODE:-}" != "k3s" ]]; then return 0 fi - echo "Validating protected Prole storage mounts (k3s mode) ..." - _require_prole_protected_mount "$PROLE_PROTECTED_DATA_PATH" "data" || return 1 - _require_prole_protected_mount "$PROLE_PROTECTED_WAL_PATH" "WAL" || return 1 + echo "Validating protected Knoe storage mounts (k3s mode) ..." + _require_knoe_protected_mount "$PROLE_PROTECTED_DATA_PATH" "data" || return 1 + _require_knoe_protected_mount "$PROLE_PROTECTED_WAL_PATH" "WAL" || return 1 return 0 } validate_cnpg_manifest_storage() { local rendered_manifest="$1" - if [[ "${PROLE_MODE:-}" != "k3s" ]]; then + if [[ "${KNOE_MODE:-}" != "k3s" ]]; then return 0 fi @@ -243,7 +243,7 @@ validate_cnpg_manifest_storage() { fi if [[ "$data_role" != "data" || "$wal_role" != "wal" ]]; then - echo "ERROR: CNPG Cluster manifest must include explicit PV selectors for Prole storage (synology.storage/role=data and synology.storage/role=wal)." >&2 + echo "ERROR: CNPG Cluster manifest must include explicit PV selectors for Knoe storage (synology.storage/role=data and synology.storage/role=wal)." >&2 echo "Got selector roles: data='${data_role:-}', wal='${wal_role:-}'" >&2 return 1 fi @@ -252,7 +252,7 @@ validate_cnpg_manifest_storage() { } validate_cnpg_runtime_storage() { - if [[ "${PROLE_MODE:-}" != "k3s" ]]; then + if [[ "${KNOE_MODE:-}" != "k3s" ]]; then return 0 fi @@ -275,7 +275,7 @@ validate_cnpg_runtime_storage() { return 1 fi if [[ "$data_role" != "data" || "$wal_role" != "wal" ]]; then - echo "ERROR: Live CNPG Cluster must select Prole PVs via selector labels (got data role='${data_role:-}', wal role='${wal_role:-}')." >&2 + echo "ERROR: Live CNPG Cluster must select Knoe PVs via selector labels (got data role='${data_role:-}', wal role='${wal_role:-}')." >&2 return 1 fi @@ -409,7 +409,7 @@ wait_for_apiserver_ready() { ensure_namespace() { if [[ -z "${PROLE_NAMESPACE:-}" ]]; then - echo "ERROR: PROLE_NAMESPACE is empty. Set NAMESPACE in conf/prole.cfg." >&2 + echo "ERROR: PROLE_NAMESPACE is empty. Set NAMESPACE in conf/knoe.cfg." >&2 exit 1 fi if ! kubectl get namespace "$PROLE_NAMESPACE" >/dev/null 2>&1; then @@ -457,16 +457,16 @@ get_latest_image() { local pg_version_file release_file pg_version release if [[ -f "$SCRIPT_DIR/../conf/postgresql/.version" ]]; then pg_version_file="$SCRIPT_DIR/../conf/postgresql/.version" - elif [[ -n "${PROLE_HOME:-}" && -f "$PROLE_HOME/conf/postgresql/.version" ]]; then - pg_version_file="$PROLE_HOME/conf/postgresql/.version" + elif [[ -n "${KNOE_HOME:-}" && -f "$KNOE_HOME/conf/postgresql/.version" ]]; then + pg_version_file="$KNOE_HOME/conf/postgresql/.version" else pg_version_file="$SCRIPT_DIR/../conf/postgresql/.version" fi if [[ -f "$SCRIPT_DIR/../knoe-db/.version" ]]; then release_file="$SCRIPT_DIR/../knoe-db/.version" - elif [[ -n "${PROLE_HOME:-}" && -f "$PROLE_HOME/knoe-db/.version" ]]; then - release_file="$PROLE_HOME/knoe-db/.version" + elif [[ -n "${KNOE_HOME:-}" && -f "$KNOE_HOME/knoe-db/.version" ]]; then + release_file="$KNOE_HOME/knoe-db/.version" else release_file="$SCRIPT_DIR/../knoe-db/.version" fi @@ -492,7 +492,7 @@ get_latest_image() { resolve_cnpg_image() { local image="$1" - if _prole_local_registry_enabled; then + if _knoe_local_registry_enabled; then # Prefer the in-cluster/internal registry for k3d/k3s nodes pulling images. # Using LOCAL_REGISTRY (e.g., localhost:5000) breaks inside cluster and may # also prefer IPv6 ::1, leading to connection refused. Avoid it. @@ -528,8 +528,8 @@ resolve_cnpg_image() { fi local host="" - if command -v _prole_host_from_url >/dev/null 2>&1; then - host=$(_prole_host_from_url "${PROLE_K3S_SERVER:-${K3S_SERVER_URL:-}}") + if command -v _knoe_host_from_url >/dev/null 2>&1; then + host=$(_knoe_host_from_url "${PROLE_K3S_SERVER:-${K3S_SERVER_URL:-}}") fi if [[ -n "${host:-}" ]]; then printf '%s' "${host}:5000" @@ -541,7 +541,7 @@ resolve_cnpg_image() { } local _mode - _mode=$(prole_normalize_mode "${PROLE_MODE:-${DEPLOYMENT_MODE:-}}") + _mode=$(knoe_normalize_mode "${KNOE_MODE:-${DEPLOYMENT_MODE:-}}") case "${_mode}" in k3s) registry=$(_cnpg_k3s_internal_registry) @@ -599,17 +599,17 @@ openbao_url() { echo "$PROLE_OPENBAO_URL" return 0 fi - if prole_is_in_cluster; then + if knoe_is_in_cluster; then echo "http://openbao.${OPENBAO_NAMESPACE}.svc.cluster.local:8200" return 0 fi # In k3s mode, scripts run outside the cluster must reach OpenBao via the k3s host # (never via localhost or kubectl port-forward). - if [[ "${PROLE_MODE:-${DEPLOYMENT_MODE:-}}" == "k3s" ]]; then - if command -v _prole_host_from_url >/dev/null 2>&1; then + if [[ "${KNOE_MODE:-${DEPLOYMENT_MODE:-}}" == "k3s" ]]; then + if command -v _knoe_host_from_url >/dev/null 2>&1; then local host - host=$(_prole_host_from_url "${PROLE_K3S_SERVER:-${K3S_SERVER_URL:-}}") + host=$(_knoe_host_from_url "${PROLE_K3S_SERVER:-${K3S_SERVER_URL:-}}") if [[ -n "${host:-}" ]]; then # If the LoadBalancer has no external IP, k3s exposes the service via a nodePort. # Prefer that nodePort when available. @@ -661,7 +661,7 @@ fetch_openbao_secret() { resolve_db_password() { local db_pw="${DB_PASSWORD:-}" - if [[ -z "$db_pw" || "$db_pw" == '${OPENBAO:'* || "$db_pw" == '${PROLE_SECRET:'* ]]; then + if [[ -z "$db_pw" || "$db_pw" == '${OPENBAO:'* || "$db_pw" == '${KNOE_SECRET:'* ]]; then local fetched_db fetched_db=$(fetch_openbao_secret "$BAO_PATH_DB" "password") if [[ -n "$fetched_db" && "$fetched_db" != "null" ]]; then @@ -676,7 +676,7 @@ ensure_cnpg_operator() { if kubectl get deployment -n cnpg-system cnpg-controller-manager >/dev/null 2>&1; then kubectl -n cnpg-system rollout status deploy/cnpg-controller-manager --timeout=180s || true wait_for_cnpg_webhook 180 || true - if [[ "${PROLE_MODE:-}" == "k3s" ]]; then + if [[ "${KNOE_MODE:-}" == "k3s" ]]; then tune_cnpg_operator_for_k3s || true kubectl -n cnpg-system rollout status deploy/cnpg-controller-manager --timeout=300s || true wait_for_cnpg_webhook 300 || true @@ -698,7 +698,7 @@ ensure_cnpg_operator() { if kubectl get deployment -n cnpg-system cnpg-controller-manager >/dev/null 2>&1; then kubectl -n cnpg-system rollout status deploy/cnpg-controller-manager --timeout=180s || true wait_for_cnpg_webhook 180 || true - if [[ "${PROLE_MODE:-}" == "k3s" ]]; then + if [[ "${KNOE_MODE:-}" == "k3s" ]]; then tune_cnpg_operator_for_k3s || true kubectl -n cnpg-system rollout status deploy/cnpg-controller-manager --timeout=300s || true wait_for_cnpg_webhook 300 || true @@ -801,7 +801,7 @@ ensure_deployment_node_selector() { pin_cert_manager() { local selector="${CERT_MANAGER_NODE_SELECTOR:-}" - if [[ -z "$selector" && "${PROLE_MODE:-}" == "k3s" ]]; then + if [[ -z "$selector" && "${KNOE_MODE:-}" == "k3s" ]]; then selector="$(resolve_control_plane_selector)" fi if [[ -z "$selector" ]]; then @@ -826,7 +826,7 @@ pin_cert_manager() { pin_barman_cloud() { local selector="${BARMAN_NODE_SELECTOR:-}" - if [[ -z "$selector" && "${PROLE_MODE:-}" == "k3s" ]]; then + if [[ -z "$selector" && "${KNOE_MODE:-}" == "k3s" ]]; then selector="$(resolve_control_plane_selector)" fi if [[ -z "$selector" ]]; then @@ -978,7 +978,7 @@ ensure_barman_plugin() { pin_cnpg_controller() { local selector="${CNPG_CONTROLLER_NODE_SELECTOR:-}" - if [[ -z "$selector" && "${PROLE_MODE:-}" == "k3s" ]]; then + if [[ -z "$selector" && "${KNOE_MODE:-}" == "k3s" ]]; then if [[ -n "$(kubectl get nodes -l "storage=primary" --no-headers 2>/dev/null)" ]]; then selector="storage=primary" else @@ -1043,11 +1043,11 @@ apply_barman_objectstore_if_present() { if [[ -n "${SERVICE_NAMESPACE:-}" && "${SERVICE_NAMESPACE}" != "${NAMESPACE}" ]]; then local endpoint endpoint="http://garage.${SERVICE_NAMESPACE}.svc.cluster.local:3900" - prole_render_manifest "$BARMAN_OBJECTSTORE_MANIFEST" \ + knoe_render_manifest "$BARMAN_OBJECTSTORE_MANIFEST" \ | sed -E "s|^[[:space:]]*endpointURL:.*| endpointURL: ${endpoint}|" \ | kubectl_apply_retry "$NAMESPACE" else - prole_render_manifest "$BARMAN_OBJECTSTORE_MANIFEST" | kubectl_apply_retry "$NAMESPACE" + knoe_render_manifest "$BARMAN_OBJECTSTORE_MANIFEST" | kubectl_apply_retry "$NAMESPACE" fi else echo "WARN: Barman Cloud ObjectStore CRD not found; skipping $BARMAN_OBJECTSTORE_MANIFEST." @@ -1079,7 +1079,7 @@ apply_manifest_split_by_doc() { local attempts=${2:-8} local tmpdir - tmpdir=$(mktemp -d -t prole-manifest-docs.XXXXXX) + tmpdir=$(mktemp -d -t knoe-manifest-docs.XXXXXX) awk -v dir="$tmpdir" ' BEGIN{i=0; f=sprintf("%s/doc-%03d.yaml", dir, i)} @@ -1115,14 +1115,14 @@ apply_manifest_split_by_doc() { return 0 } -apply_prole_manifest_file() { +apply_knoe_manifest_file() { local file="$1" local attempts=${KUBECTL_APPLY_RETRIES:-8} local i output="" local tmp - tmp=$(mktemp -t prole-manifest.XXXXXX) - prole_render_manifest "$file" >"$tmp" + tmp=$(mktemp -t knoe-manifest.XXXXXX) + knoe_render_manifest "$file" >"$tmp" for ((i=1; i<=attempts; i++)); do if output=$(kubectl apply -n "$NAMESPACE" -f "$tmp" 2>&1); then @@ -1131,7 +1131,7 @@ apply_prole_manifest_file() { return 0 fi - if [[ "${PROLE_MODE:-}" == "k3d" && "$(basename "$file")" == "garage-statefulset.yaml" ]] \ + if [[ "${KNOE_MODE:-}" == "k3d" && "$(basename "$file")" == "garage-statefulset.yaml" ]] \ && echo "$output" | grep -q "updates to statefulset spec"; then echo "WARN: Garage StatefulSet immutable in k3d; skipping apply." rm -f "$tmp" @@ -1168,7 +1168,7 @@ apply_prole_manifest_file() { return 1 } -_prole_k3s_registry_host_for_cache() { +_knoe_k3s_registry_host_for_cache() { # Best-effort host:port for the k3s registry, used as an optional cache source in k3d mode. # Intentionally avoids k3d registry names and localhost-ish endpoints. local r="${PROLE_K3S_REGISTRY:-${K3S_REGISTRY_HOST:-${LOCAL_REGISTRY_INTERNAL:-${LOCAL_REGISTRY:-}}}}" @@ -1178,13 +1178,13 @@ _prole_k3s_registry_host_for_cache() { case "${r}" in "") - r="myrddin.prole.org:5000" + r="myrddin.knoe.org:5000" ;; localhost:5000|127.0.0.1:5000|*.localhost|*.localhost:5000) - r="myrddin.prole.org:5000" + r="myrddin.knoe.org:5000" ;; k3d-*|*/k3d-*) - r="myrddin.prole.org:5000" + r="myrddin.knoe.org:5000" ;; esac @@ -1205,7 +1205,7 @@ _docker_build_knoe_db_image() { if docker buildx version >/dev/null 2>&1; then # Prefer an isolated docker-container builder to avoid host snapshot/cache corruption. - local builder_name="${PROLE_BUILDX_BUILDER:-prole-buildkit}" + local builder_name="${PROLE_BUILDX_BUILDER:-knoe-buildkit}" if ! docker buildx inspect "$builder_name" >/dev/null 2>&1; then docker buildx create --name "$builder_name" --driver docker-container --use >/dev/null 2>&1 || true else @@ -1245,7 +1245,7 @@ _docker_build_knoe_db_image() { _push_to_k3s_registry() { local image="$1" - local push_host="${LOCAL_REGISTRY:-${LOCAL_REGISTRY_INTERNAL:-myrddin.prole.org:5000}}" + local push_host="${LOCAL_REGISTRY:-${LOCAL_REGISTRY_INTERNAL:-myrddin.knoe.org:5000}}" local plain_image="${image##*/}" # Normalize push_host (strip scheme if provided) @@ -1332,7 +1332,7 @@ _push_to_k3d_registry() { # Steps: containerd cache → Docker daemon (registry tag) → Docker daemon (plain tag) # → tar import → docker build + push/import. _ensure_knoe_db_image() { - if [[ "${PROLE_MODE:-}" != "k3d" && "${PROLE_MODE:-}" != "k3s" ]]; then + if [[ "${KNOE_MODE:-}" != "k3d" && "${KNOE_MODE:-}" != "k3s" ]]; then return 0 fi @@ -1348,11 +1348,11 @@ _ensure_knoe_db_image() { fi fi image=$(resolve_cnpg_image "$image") - local knoe_db_dir="${PROLE_HOME:-$SCRIPT_DIR/..}/knoe-db" + local knoe_db_dir="${KNOE_HOME:-$SCRIPT_DIR/..}/knoe-db" local plain_image="${image##*/}" # e.g. knoe-db:18-088 local k3s_cache_ref="" - if [[ "${PROLE_MODE:-}" == "k3s" ]]; then + if [[ "${KNOE_MODE:-}" == "k3s" ]]; then echo "Pre-flight: ensuring image '$image' is available in k3s registry/import path ..." else # Auto-detect active k3d cluster name @@ -1364,7 +1364,7 @@ _ensure_knoe_db_image() { # In k3d mode, optionally consult the k3s registry as a cache/source of truth before building. local k3s_host - k3s_host=$(_prole_k3s_registry_host_for_cache) + k3s_host=$(_knoe_k3s_registry_host_for_cache) if [[ -n "${k3s_host:-}" ]]; then k3s_cache_ref="${k3s_host}/${plain_image}" fi @@ -1392,7 +1392,7 @@ _ensure_knoe_db_image() { # Step 2a: registry-tagged image in local Docker daemon → push + import if docker image inspect "$image" >/dev/null 2>&1; then echo " Image '$image' found in Docker daemon; pushing to registry ..." - if [[ "${PROLE_MODE:-}" == "k3s" ]]; then + if [[ "${KNOE_MODE:-}" == "k3s" ]]; then _push_to_k3s_registry "$image" else _push_to_k3d_registry "$image" "$cluster_name" @@ -1404,7 +1404,7 @@ _ensure_knoe_db_image() { if docker image inspect "$plain_image" >/dev/null 2>&1; then echo " Plain image '$plain_image' found in Docker daemon; tagging as '$image' and pushing ..." docker tag "$plain_image" "$image" - if [[ "${PROLE_MODE:-}" == "k3s" ]]; then + if [[ "${KNOE_MODE:-}" == "k3s" ]]; then _push_to_k3s_registry "$image" else _push_to_k3d_registry "$image" "$cluster_name" @@ -1413,8 +1413,8 @@ _ensure_knoe_db_image() { fi # Step 3: look for a matching tar in the docker-import directory - local prole_data="${PROLE_DATA:-$HOME/.prole/data}" - local docker_import_dir="${DOCKER_IMPORT_DIR:-${prole_data}/docker-import}" + local knoe_data="${PROLE_DATA:-$HOME/.knoe/data}" + local docker_import_dir="${DOCKER_IMPORT_DIR:-${knoe_data}/docker-import}" local name_part="${plain_image%%:*}" # e.g. knoe-db local tag_part="${plain_image##*:}" # e.g. 18-088 local found_tar="" @@ -1433,7 +1433,7 @@ _ensure_knoe_db_image() { echo " Loading tar '$(basename "$found_tar")' into Docker daemon ..." docker load -i "$found_tar" docker tag "$plain_image" "$image" 2>/dev/null || true - if [[ "${PROLE_MODE:-}" == "k3s" ]]; then + if [[ "${KNOE_MODE:-}" == "k3s" ]]; then _push_to_k3s_registry "$image" else _push_to_k3d_registry "$image" "$cluster_name" @@ -1442,7 +1442,7 @@ _ensure_knoe_db_image() { fi # Step 3b (k3d only): try to reuse a previously-built image from the k3s registry. - if [[ "${PROLE_MODE:-}" == "k3d" && -n "${k3s_cache_ref:-}" && "${k3s_cache_ref}" != "${image}" ]]; then + if [[ "${KNOE_MODE:-}" == "k3d" && -n "${k3s_cache_ref:-}" && "${k3s_cache_ref}" != "${image}" ]]; then if docker image inspect "$k3s_cache_ref" >/dev/null 2>&1 || docker pull "$k3s_cache_ref" >/dev/null 2>&1; then echo " ✓ Found '$plain_image' in k3s registry (${k3s_cache_ref}); re-tagging for k3d as '$image' ..." docker tag "$k3s_cache_ref" "$image" 2>/dev/null || true @@ -1457,7 +1457,7 @@ _ensure_knoe_db_image() { echo "ERROR: Dockerfile not found in '$knoe_db_dir'; cannot build knoe-db image." >&2 return 1 fi - if [[ "${PROLE_MODE:-}" == "k3s" ]]; then + if [[ "${KNOE_MODE:-}" == "k3s" ]]; then echo " Image '$image' not found in Docker daemon or docker-import dir." else echo " Image '$image' not found in k3d, Docker daemon, or docker-import dir." @@ -1469,7 +1469,7 @@ _ensure_knoe_db_image() { fi docker tag "$plain_image" "$image" echo " Build complete. Pushing '$image' to registry ..." - if [[ "${PROLE_MODE:-}" == "k3s" ]]; then + if [[ "${KNOE_MODE:-}" == "k3s" ]]; then _push_to_k3s_registry "$image" else _push_to_k3d_registry "$image" "$cluster_name" @@ -1488,10 +1488,10 @@ cleanup_unintended_cnpg_services() { fi } -ensure_prole_stack_resources() { +ensure_knoe_stack_resources() { echo "Applying CloudNative-PG cluster and related resources ..." wait_for_apiserver_ready 180 - ensure_prole_protected_storage + ensure_knoe_protected_storage cleanup_unintended_cnpg_services || true local image_override="${CNPG_IMAGE:-${KNOE_DB_IMAGE:-}}" local image="" @@ -1534,7 +1534,7 @@ ensure_prole_stack_resources() { fi ;; esac - apply_prole_manifest_file "$file" + apply_knoe_manifest_file "$file" done # Apply ingress.yaml without -n flag so each document targets its own namespace if [[ -f "$dir/ingress.yaml" ]]; then @@ -1545,7 +1545,7 @@ ensure_prole_stack_resources() { kubectl create namespace "$_ing_ns" 2>/dev/null || true fi done - prole_render_manifest "$dir/ingress.yaml" | kubectl_apply_retry "" || true + knoe_render_manifest "$dir/ingress.yaml" | kubectl_apply_retry "" || true fi apply_barman_objectstore_if_present apply_cnpg_cluster_manifest "$CNPG_MANIFEST_OVERRIDE" @@ -1575,7 +1575,7 @@ ensure_prole_stack_resources() { fi ;; esac - apply_prole_manifest_file "$file" + apply_knoe_manifest_file "$file" done # Apply ingress.yaml without -n flag so each document targets its own namespace if [[ -f "$dir/ingress.yaml" ]]; then @@ -1586,7 +1586,7 @@ ensure_prole_stack_resources() { kubectl create namespace "$_ing_ns" 2>/dev/null || true fi done - prole_render_manifest "$dir/ingress.yaml" | kubectl_apply_retry "" || true + knoe_render_manifest "$dir/ingress.yaml" | kubectl_apply_retry "" || true fi apply_barman_objectstore_if_present apply_cnpg_cluster_manifest "$CNPG_MANIFEST" @@ -1594,22 +1594,22 @@ ensure_prole_stack_resources() { reconcile_cnpg_instances fi - # Ensure prole-index-html exists for prole deployment readiness probe - if ! kubectl get configmap prole-index-html -n "$NAMESPACE" >/dev/null 2>&1; then - echo "Creating prole-index-html configmap..." - printf "

Prole

" > /tmp/index.html - kubectl create configmap prole-index-html --from-file=index.html=/tmp/index.html -n "$NAMESPACE" --dry-run=client -o yaml \ + # Ensure knoe-index-html exists for knoe deployment readiness probe + if ! kubectl get configmap knoe-index-html -n "$NAMESPACE" >/dev/null 2>&1; then + echo "Creating knoe-index-html configmap..." + printf "

Knoe

" > /tmp/index.html + kubectl create configmap knoe-index-html --from-file=index.html=/tmp/index.html -n "$NAMESPACE" --dry-run=client -o yaml \ | kubectl_apply_retry "$NAMESPACE" rm /tmp/index.html fi - # Ensure prole-nginx-tls exists (self-signed for dev) - if ! kubectl get secret prole-nginx-tls -n "$NAMESPACE" >/dev/null 2>&1; then - echo "Generating self-signed prole-nginx-tls for development..." + # Ensure knoe-nginx-tls exists (self-signed for dev) + if ! kubectl get secret knoe-nginx-tls -n "$NAMESPACE" >/dev/null 2>&1; then + echo "Generating self-signed knoe-nginx-tls for development..." openssl req -x509 -nodes -days 365 -newkey rsa:2048 \ -keyout /tmp/nginx-tls.key -out /tmp/nginx-tls.crt \ - -subj "/CN=prole.org" >/dev/null 2>&1 - kubectl create secret tls prole-nginx-tls --key /tmp/nginx-tls.key --cert /tmp/nginx-tls.crt -n "$NAMESPACE" --dry-run=client -o yaml \ + -subj "/CN=knoe.org" >/dev/null 2>&1 + kubectl create secret tls knoe-nginx-tls --key /tmp/nginx-tls.key --cert /tmp/nginx-tls.crt -n "$NAMESPACE" --dry-run=client -o yaml \ | kubectl_apply_retry "$NAMESPACE" rm /tmp/nginx-tls.key /tmp/nginx-tls.crt fi @@ -1630,7 +1630,7 @@ _ready_schedulable_nodes_count() { } _ready_schedulable_db_nodes_count() { - local key="${CNPG_NODE_ROLE_LABEL_KEY:-prole.org/node-role}" + local key="${CNPG_NODE_ROLE_LABEL_KEY:-knoe.org/node-role}" local val="${CNPG_NODE_ROLE_LABEL_VALUE:-db}" kubectl get nodes -l "${key}=${val}" --no-headers 2>/dev/null \ | awk '$2 ~ /^Ready/ && $2 !~ /SchedulingDisabled/ {c++} END {print c+0}' @@ -1639,7 +1639,7 @@ _ready_schedulable_db_nodes_count() { reconcile_cnpg_instances() { # Cap instances to cluster capacity to avoid overloading a single node during degraded startup. # Inputs are taken from the same sources Ansible uses today: - # - node labels (e.g., `prole.org/node-role=db`) + # - node labels (e.g., `knoe.org/node-role=db`) # - optional-workloads guard (`OPTIONAL_WORKLOADS_MIN_READY_SCHEDULABLE_NODES`) local current @@ -1657,7 +1657,7 @@ reconcile_cnpg_instances() { ready_nodes=$(_coerce_uint "$(_ready_schedulable_nodes_count)" 0) eligible_db_nodes=$(_coerce_uint "$(_ready_schedulable_db_nodes_count)" 0) if (( eligible_db_nodes < 1 )); then - echo "ERROR: No Ready, schedulable CNPG DB nodes found (label ${CNPG_NODE_ROLE_LABEL_KEY:-prole.org/node-role}=${CNPG_NODE_ROLE_LABEL_VALUE:-db})." >&2 + echo "ERROR: No Ready, schedulable CNPG DB nodes found (label ${CNPG_NODE_ROLE_LABEL_KEY:-knoe.org/node-role}=${CNPG_NODE_ROLE_LABEL_VALUE:-db})." >&2 echo "Refusing to force CNPG pods onto an arbitrary node during bootstrap." >&2 return 1 fi @@ -1714,8 +1714,8 @@ apply_cnpg_cluster_manifest() { for ((i=1; i<=attempts; i++)); do local tmp - tmp=$(mktemp -t prole-cnpg.XXXXXX) - prole_render_manifest "$manifest" >"$tmp" + tmp=$(mktemp -t knoe-cnpg.XXXXXX) + knoe_render_manifest "$manifest" >"$tmp" if ! validate_cnpg_manifest_storage "$tmp"; then rm -f "$tmp" return 1 @@ -1779,7 +1779,7 @@ wait_for_cnpg_pods() { # Check for image pull failures — attempt remediation in k3d/k3s mode if echo "$pods" | grep -E "ErrImagePull|ImagePullBackOff" >/dev/null; then - if [[ "${PROLE_MODE:-}" == "k3d" || "${PROLE_MODE:-}" == "k3s" ]]; then + if [[ "${KNOE_MODE:-}" == "k3d" || "${KNOE_MODE:-}" == "k3s" ]]; then if [[ -z "$_image_pull_remediated" ]]; then _image_pull_remediated=1 local fail_pod fail_image @@ -2185,13 +2185,13 @@ reset_and_reinit() { kubectl -n "$NAMESPACE" delete cluster "$CNPG_CLUSTER_NAME" --ignore-not-found kubectl -n "$NAMESPACE" wait --for=delete pod -l "cnpg.io/cluster=$CNPG_CLUSTER_NAME" --timeout=180s >/dev/null 2>&1 || true - recycle_released_prole_iscsi_pvs || true + recycle_released_knoe_iscsi_pvs || true if [[ -n "$backup_name" && -f "$RECOVERY_TEMPLATE" ]]; then tmp_manifest=$(mktemp) sed "s/{{BACKUP_NAME}}/${backup_name}/g" "$RECOVERY_TEMPLATE" > "$tmp_manifest" echo "Re-initializing from backup $backup_name ..." - CNPG_MANIFEST_OVERRIDE="$tmp_manifest" ensure_prole_stack_resources + CNPG_MANIFEST_OVERRIDE="$tmp_manifest" ensure_knoe_stack_resources rm -f "$tmp_manifest" else if [[ -n "$backup_name" && ! -f "$RECOVERY_TEMPLATE" ]]; then @@ -2200,13 +2200,13 @@ reset_and_reinit() { if [[ -z "$backup_name" ]]; then echo "No completed backups found; starting fresh initialization." >&2 fi - ensure_prole_stack_resources + ensure_knoe_stack_resources fi wait_for_cnpg_pods "${CNPG_WAIT_TIMEOUT}" } -recycle_released_prole_iscsi_pvs() { +recycle_released_knoe_iscsi_pvs() { # StorageClass `synology-iscsi` uses `Retain` PV reclaim policy. After a CNPG reset, PVs can remain # in `Released` with a stale `claimRef`, which prevents new PVCs (same names) from binding. # In that case, CNPG init jobs remain `Pending` with "didn't find available persistent volumes". @@ -2237,16 +2237,16 @@ bao_service_url() { echo "$PROLE_OPENBAO_URL" return 0 fi - if prole_is_in_cluster; then + if knoe_is_in_cluster; then local ns="${OPENBAO_NAMESPACE:-${SERVICE_NAMESPACE:-default}}" echo "http://$OPENBAO_NAME.$ns.svc.cluster.local:8200" return 0 fi - if [[ "${PROLE_MODE:-${DEPLOYMENT_MODE:-}}" == "k3s" ]]; then - if command -v _prole_host_from_url >/dev/null 2>&1; then + if [[ "${KNOE_MODE:-${DEPLOYMENT_MODE:-}}" == "k3s" ]]; then + if command -v _knoe_host_from_url >/dev/null 2>&1; then local host - host=$(_prole_host_from_url "${PROLE_K3S_SERVER:-${K3S_SERVER_URL:-}}") + host=$(_knoe_host_from_url "${PROLE_K3S_SERVER:-${K3S_SERVER_URL:-}}") if [[ -n "${host:-}" ]]; then # If the LoadBalancer has no external IP, k3s exposes the service via a nodePort. # Prefer that nodePort when available. @@ -2293,7 +2293,7 @@ fetch_admin_keys_and_db_pass_from_bao_or_local() { local db_pass db_user db_pass=$(resolve_db_password) - db_user="${KNOE_DB_USER:-prole}" + db_user="${KNOE_DB_USER:-knoe}" if [[ -n "${db_pass:-}" && "${db_pass:-}" != "null" ]]; then echo "Ensuring database user secret 'knoe-db-user' ..." kubectl create secret generic knoe-db-user -n "$NAMESPACE" \ @@ -2453,7 +2453,7 @@ generate_tls_if_missing() { if [[ "$need_ca" -eq 1 ]]; then echo "Generating self-signed CA (EC P-256) for CNPG ..." openssl ecparam -name prime256v1 -genkey -noout -out "$TMPD/ca.key" - openssl req -x509 -new -key "$TMPD/ca.key" -out "$TMPD/ca.crt" -days 3650 -subj "/CN=Prole CNPG CA" + openssl req -x509 -new -key "$TMPD/ca.key" -out "$TMPD/ca.crt" -days 3650 -subj "/CN=Knoe CNPG CA" kubectl -n "$NAMESPACE" create secret generic "$ca_secret_name" \ --from-file=ca.crt="$TMPD/ca.crt" \ --from-file=ca.key="$TMPD/ca.key" \ @@ -2535,7 +2535,7 @@ initialize() { return 1 fi - ensure_prole_stack_resources + ensure_knoe_stack_resources if ! wait_for_cnpg_pods "${CNPG_WAIT_TIMEOUT}"; then if cluster_has_pods; then @@ -2566,7 +2566,7 @@ initialize() { "$SCRIPT_DIR/init_cnpg_backup.sh" start echo "Initialization complete for CNPG + cert artifacts." - prole_register_port_forward "postgres" "${NAMESPACE:-default}" "svc/${CNPG_CLUSTER_NAME}-rw" "5432" "5432" "0.0.0.0" "TCP" "PostgreSQL" + knoe_register_port_forward "postgres" "${NAMESPACE:-default}" "svc/${CNPG_CLUSTER_NAME}-rw" "5432" "5432" "0.0.0.0" "TCP" "PostgreSQL" } update_reload() { @@ -2580,7 +2580,7 @@ deploy_cluster() { pin_cnpg_controller ensure_barman_plugin - ensure_prole_protected_storage + ensure_knoe_protected_storage local image if [[ "$VERSION" == "latest" || -z "$VERSION" ]]; then @@ -2682,7 +2682,7 @@ case "$ACTION" in exit 1 fi echo "Starting CloudNative-PG cluster from $CNPG_MANIFEST in namespace $NAMESPACE..." - prole_render_manifest "$CNPG_MANIFEST" | kubectl apply -n "$NAMESPACE" -f - + knoe_render_manifest "$CNPG_MANIFEST" | kubectl apply -n "$NAMESPACE" -f - reconcile_cnpg_instances ;; stop) diff --git a/mock_val/init_cnpg_backup.sh b/mock_val/init_cnpg_backup.sh index 8d34678..a889466 100755 --- a/mock_val/init_cnpg_backup.sh +++ b/mock_val/init_cnpg_backup.sh @@ -10,15 +10,15 @@ set -euo pipefail # Initialize SCRIPT_DIR SCRIPT_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) -# Load environment and config via prole_cfg.sh +# Load environment and config via knoe_cfg.sh # shellcheck disable=SC1090 -source "$SCRIPT_DIR/prole_cfg.sh" +source "$SCRIPT_DIR/knoe_cfg.sh" if [[ "${1:-}" == "--mode" || "${1:-}" == "-m" ]]; then - prole_set_mode "${2:-}" + knoe_set_mode "${2:-}" shift 2 elif [[ "${1:-}" == --mode=* || "${1:-}" == -m=* ]]; then - prole_set_mode "${1#*=}" + knoe_set_mode "${1#*=}" shift fi diff --git a/mock_val/init_common_core.sh b/mock_val/init_common_core.sh index efc9635..6bb0079 100755 --- a/mock_val/init_common_core.sh +++ b/mock_val/init_common_core.sh @@ -14,7 +14,7 @@ source "$SCRIPT_DIR/common_core_lib.sh" common_core_preparse_config "$@" # shellcheck disable=SC1090 -source "$SCRIPT_DIR/prole_cfg.sh" +source "$SCRIPT_DIR/knoe_cfg.sh" set -- "${COMMON_CORE_ARGS[@]}" common_core_parse_args "$@" @@ -41,8 +41,8 @@ if [[ -n "${COMMON_CORE_NAMESPACE:-}" ]]; then NS_ARGS=("-n" "$COMMON_CORE_NAMESPACE") fi MODE_ARGS=() -if [[ -n "${PROLE_MODE:-}" ]]; then - MODE_ARGS=("--mode" "$PROLE_MODE") +if [[ -n "${KNOE_MODE:-}" ]]; then + MODE_ARGS=("--mode" "$KNOE_MODE") fi CFG_ARGS=() if [[ -n "${COMMON_CORE_CONFIG_PATH:-}" ]]; then diff --git a/mock_val/init_common_services.sh b/mock_val/init_common_services.sh index b4d488d..4929c19 100755 --- a/mock_val/init_common_services.sh +++ b/mock_val/init_common_services.sh @@ -11,15 +11,15 @@ _has_config=0 for _arg in "$@"; do [[ "$_arg" == "-c" || "$_arg" == "--config" || "$_arg" == -c=* || "$_arg" == --config=* ]] && _has_config=1 done -if [[ $_has_config -eq 0 && -f "$SCRIPT_DIR/../conf/prole.cfg" ]]; then - set -- "-c" "$SCRIPT_DIR/../conf/prole.cfg" "$@" +if [[ $_has_config -eq 0 && -f "$SCRIPT_DIR/../conf/knoe.cfg" ]]; then + set -- "-c" "$SCRIPT_DIR/../conf/knoe.cfg" "$@" fi unset _has_config _arg common_core_preparse_config "$@" # shellcheck disable=SC1090 -source "$SCRIPT_DIR/prole_cfg.sh" +source "$SCRIPT_DIR/knoe_cfg.sh" usage() { cat </dev/null 2>&1 || true -echo "DEBUG: prole_ensure_kubeconfig finished" >&2 -prole_ensure_kube_context || exit 1 -echo "DEBUG: prole_ensure_kube_context finished" >&2 +knoe_ensure_kubeconfig >/dev/null 2>&1 || true +echo "DEBUG: knoe_ensure_kubeconfig finished" >&2 +knoe_ensure_kube_context || exit 1 +echo "DEBUG: knoe_ensure_kube_context finished" >&2 # Check cluster reachability early to fail fast if [[ "$ACTION" != "status" ]]; then @@ -147,7 +147,7 @@ fi # enable pre-loading from `DOCKER_IMPORT_DIR` / `$PROLE_DATA/docker-import`. # --------------------------------------------------------------------------- -_resolve_prole_data() { +_resolve_knoe_data() { local d="${PROLE_DATA:-}" if [[ -z "$d" ]]; then if [[ -f "$SCRIPT_DIR/../env.sh" ]]; then @@ -171,7 +171,7 @@ _exec_with_progress_footer() { start_time=$(date +%s) local tmp_out - tmp_out=$(mktemp 2>/dev/null || echo "/tmp/_prole_exec_$$.out") + tmp_out=$(mktemp 2>/dev/null || echo "/tmp/_knoe_exec_$$.out") # Spawn live footer only when stderr is a real TTY local spinner_pid="" @@ -234,9 +234,9 @@ PYEOF } _preload_docker_images() { - local prole_data - prole_data=$(_resolve_prole_data) - local import_dir="${DOCKER_IMPORT_DIR:-${prole_data:+${prole_data}/docker-import}}" + local knoe_data + knoe_data=$(_resolve_knoe_data) + local import_dir="${DOCKER_IMPORT_DIR:-${knoe_data:+${knoe_data}/docker-import}}" if [[ -z "$import_dir" || ! -d "$import_dir" ]]; then echo "[SKIP] No docker-import directory found; images will be pulled from registries." @@ -250,7 +250,7 @@ _preload_docker_images() { return 0 fi - local mode="${PROLE_MODE:-k3d}" + local mode="${KNOE_MODE:-k3d}" echo "Pre-loading container images from $import_dir (mode=$mode) ..." case "$mode" in @@ -398,7 +398,7 @@ _preload_docker_images() { local registry="${LOCAL_REGISTRY:-}" if [[ -z "$registry" ]]; then local host - host="$(_prole_host_from_url "${PROLE_K3S_SERVER:-${K3S_SERVER_URL:-}}")" + host="$(_knoe_host_from_url "${PROLE_K3S_SERVER:-${K3S_SERVER_URL:-}}")" if [[ -n "${host:-}" ]]; then registry="${host}:5000" fi @@ -479,7 +479,7 @@ _preload_docker_images() { case "$ACTION" in start|update|reload|initialize|restart|repair) - if _prole_bool_true "${DOCKER_PRELOAD:-${PROLE_DOCKER_PRELOAD:-}}"; then + if _knoe_bool_true "${DOCKER_PRELOAD:-${PROLE_DOCKER_PRELOAD:-}}"; then _preload_docker_images else echo "[SKIP] Docker image pre-load disabled (set DOCKER_PRELOAD=1 to enable)." @@ -501,12 +501,12 @@ OPENTOFU_NAME=${OPENTOFU_NAME:-opentofu} OPENBAO_NAME=${OPENBAO_NAME:-openbao} REGISTRY_NAME=${REGISTRY_NAME:-registry} GARAGE_NAME=${GARAGE_NAME:-garage} -KONG_NAME=${KONG_NAME:-prole-svc-kong} +KONG_NAME=${KONG_NAME:-knoe-svc-kong} OPENTOFU_CONFIGMAP=${OPENTOFU_CONFIGMAP:-opentofu-nginx} OPENTOFU_SECRET=${OPENTOFU_SECRET:-opentofu-admin} GARAGE_CONFIGMAP=${GARAGE_CONFIGMAP:-garage-config} GARAGE_SECRET_NAME=${GARAGE_SECRET_NAME:-garage-secrets} -KONG_CONFIG_NAME=${KONG_CONFIG_NAME:-prole-svc-kong-config} +KONG_CONFIG_NAME=${KONG_CONFIG_NAME:-knoe-svc-kong-config} find_namespaces() { local kind="$1" diff --git a/mock_val/init_database_options.sh b/mock_val/init_database_options.sh index 764b452..d2d7115 100755 --- a/mock_val/init_database_options.sh +++ b/mock_val/init_database_options.sh @@ -1,10 +1,10 @@ #!/bin/bash set -e -# PROLE_HOME should be set by the caller -PROLE_CONF_DIR="${PROLE_HOME:-$HOME/.prole}/conf" -mkdir -p "$PROLE_CONF_DIR" -VERSION_FILE="$PROLE_CONF_DIR/database_versions.json" +# KNOE_HOME should be set by the caller +KNOE_CONF_DIR="${KNOE_HOME:-$HOME/.knoe}/conf" +mkdir -p "$KNOE_CONF_DIR" +VERSION_FILE="$KNOE_CONF_DIR/database_versions.json" echo "Fetching latest database versions..." diff --git a/mock_val/init_db_manager.sh b/mock_val/init_db_manager.sh index 61abf5b..702f7e1 100755 --- a/mock_val/init_db_manager.sh +++ b/mock_val/init_db_manager.sh @@ -5,7 +5,7 @@ set -euo pipefail # - Build and deploy the knoe-db-manager Node.js REST endpoint # - Provides /backup//full to trigger barman full backups into Garage # - Deploys to the knoe-db namespace; accessible via Kong endpoint /backup -# - Deploys to the current cluster (k3d or k3s) based on PROLE_MODE from conf/prole.cfg +# - Deploys to the current cluster (k3d or k3s) based on KNOE_MODE from conf/knoe.cfg # # Usage: # ./init_db_manager.sh [--mode MODE] @@ -13,23 +13,23 @@ set -euo pipefail SCRIPT_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) # shellcheck disable=SC1090 -source "$SCRIPT_DIR/prole_cfg.sh" +source "$SCRIPT_DIR/knoe_cfg.sh" if [[ "${1:-}" == "--mode" || "${1:-}" == "-m" ]]; then - prole_set_mode "${2:-}" + knoe_set_mode "${2:-}" shift 2 elif [[ "${1:-}" == --mode=* || "${1:-}" == -m=* ]]; then - prole_set_mode "${1#*=}" + knoe_set_mode "${1#*=}" shift fi ACTION=${1:-start} NAMESPACE="${PROLE_NAMESPACE}" -PROLE_HOME=${PROLE_HOME:-$(cd "$SCRIPT_DIR/.." && pwd)} +KNOE_HOME=${KNOE_HOME:-$(cd "$SCRIPT_DIR/.." && pwd)} DB_MANAGER_IMAGE=${DB_MANAGER_IMAGE:-knoe-db-manager:latest} DB_MANAGER_NAME=${DB_MANAGER_NAME:-knoe-db-manager} DB_MANAGER_PORT=${DB_MANAGER_PORT:-80} -DB_MANAGER_SRC=${DB_MANAGER_SRC:-$PROLE_HOME/src/db-manager} +DB_MANAGER_SRC=${DB_MANAGER_SRC:-$KNOE_HOME/src/db-manager} REGISTRY=${REGISTRY:-} usage() { @@ -77,7 +77,7 @@ import_image_k3d() { return 0 fi - local cluster_name="${K3D_CLUSTER_NAME:-prole-dev-cluster}" + local cluster_name="${K3D_CLUSTER_NAME:-knoe-dev-cluster}" echo "Importing $DB_MANAGER_IMAGE into k3d cluster '$cluster_name' ..." k3d image import "$DB_MANAGER_IMAGE" -c "$cluster_name" >/dev/null 2>&1 || true echo "Image imported to k3d cluster successfully." @@ -87,7 +87,7 @@ import_image_k3s() { # k3s: publish image to the shared registry and let nodes pull it. if [[ -z "${REGISTRY:-}" ]]; then local host - host="$(_prole_host_from_url "${PROLE_K3S_SERVER:-${K3S_SERVER_URL:-}}")" + host="$(_knoe_host_from_url "${PROLE_K3S_SERVER:-${K3S_SERVER_URL:-}}")" if [[ -n "${host:-}" ]]; then REGISTRY="${host}:5000" fi @@ -116,10 +116,10 @@ import_image_k3s() { deploy() { echo "Deploying $DB_MANAGER_NAME to namespace '$NAMESPACE' ..." - local manifests_dir="$PROLE_HOME/deploy/opentofu/k3s/manifests/prole" + local manifests_dir="$KNOE_HOME/deploy/opentofu/k3s/manifests/knoe" # Only deploy db-manager resources — the full kustomization includes services - # (garage, openbao, prole, etc.) that belong in the service namespace and would + # (garage, openbao, knoe, etc.) that belong in the service namespace and would # create duplicates if applied here. kubectl apply -f "$manifests_dir/db-manager-deployment.yaml" -n "$NAMESPACE" kubectl apply -f "$manifests_dir/db-manager-service.yaml" -n "$NAMESPACE" @@ -165,10 +165,10 @@ case "$ACTION" in ensure_tools ensure_namespace build_image - case "${PROLE_MODE:-k3d}" in + case "${KNOE_MODE:-k3d}" in k3d) import_image_k3d ;; k3s) import_image_k3s ;; - *) echo "WARN: Unknown mode '${PROLE_MODE:-}'; skipping image import." >&2 ;; + *) echo "WARN: Unknown mode '${KNOE_MODE:-}'; skipping image import." >&2 ;; esac deploy ;; diff --git a/mock_val/init_forgejo.sh b/mock_val/init_forgejo.sh index 65837a4..d78305a 100644 --- a/mock_val/init_forgejo.sh +++ b/mock_val/init_forgejo.sh @@ -5,9 +5,9 @@ PROG="init_forgejo" SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" # shellcheck disable=SC1090 -source "$SCRIPT_DIR/prole_cfg.sh" +source "$SCRIPT_DIR/knoe_cfg.sh" -MODE="$(prole_normalize_mode "${PROLE_MODE:-${DEPLOYMENT_MODE:-k3d}}")" +MODE="$(knoe_normalize_mode "${KNOE_MODE:-${DEPLOYMENT_MODE:-k3d}}")" NAMESPACE="${FORGEJO_NAMESPACE:-}" CFG_PATH="" FORCE=0 @@ -20,7 +20,7 @@ Usage: Options: --mode Deployment mode (default: ${MODE:-k3d}) -n, --namespace Target namespace (default: forgejo) - -c, --config Path to prole.cfg (defaults to detected) + -c, --config Path to knoe.cfg (defaults to detected) --force Delete existing Forgejo resources before deploy --help Show this help @@ -37,8 +37,8 @@ warn() { echo "[WARN] $*" >&2; } while [[ $# -gt 0 ]]; do case "$1" in - --mode) MODE="$(prole_normalize_mode "${2:-}")"; shift 2 ;; - --mode=*) MODE="$(prole_normalize_mode "${1#*=}")"; shift 1 ;; + --mode) MODE="$(knoe_normalize_mode "${2:-}")"; shift 2 ;; + --mode=*) MODE="$(knoe_normalize_mode "${1#*=}")"; shift 1 ;; -n|--namespace) NAMESPACE="${2:-}"; shift 2 ;; --namespace=*) NAMESPACE="${1#*=}"; shift 1 ;; -c|--config) CFG_PATH="${2:-}"; shift 2 ;; @@ -49,16 +49,16 @@ while [[ $# -gt 0 ]]; do esac done -# Resolve config path and namespace defaults from prole.cfg when present -if [[ -z "$CFG_PATH" && -n "${PROLE_CONF:-}" && -f "${PROLE_CONF}/prole.cfg" ]]; then - CFG_PATH="${PROLE_CONF}/prole.cfg" -elif [[ -z "$CFG_PATH" && -f "$SCRIPT_DIR/../conf/prole.cfg" ]]; then - CFG_PATH="$SCRIPT_DIR/../conf/prole.cfg" +# Resolve config path and namespace defaults from knoe.cfg when present +if [[ -z "$CFG_PATH" && -n "${KNOE_CONF:-}" && -f "${KNOE_CONF}/knoe.cfg" ]]; then + CFG_PATH="${KNOE_CONF}/knoe.cfg" +elif [[ -z "$CFG_PATH" && -f "$SCRIPT_DIR/../conf/knoe.cfg" ]]; then + CFG_PATH="$SCRIPT_DIR/../conf/knoe.cfg" fi if [[ -z "$NAMESPACE" && -n "$CFG_PATH" ]]; then - maybe_ns="$(_prole_cfg_extract_key "$CFG_PATH" "GITOPS_NAMESPACE")" - [[ -z "$maybe_ns" ]] && maybe_ns="$(_prole_cfg_extract_key "$CFG_PATH" "FORGEJO_NAMESPACE")" + maybe_ns="$(_knoe_cfg_extract_key "$CFG_PATH" "GITOPS_NAMESPACE")" + [[ -z "$maybe_ns" ]] && maybe_ns="$(_knoe_cfg_extract_key "$CFG_PATH" "FORGEJO_NAMESPACE")" NAMESPACE="$maybe_ns" fi NAMESPACE="${NAMESPACE:-forgejo}" @@ -68,13 +68,13 @@ case "$MODE" in k3d|k3s|k8s|local) ;; *) die "Unsupported mode '$MODE' (use k3d, k3s, k8s, or local)" ;; esac -export PROLE_MODE="$MODE" +export KNOE_MODE="$MODE" command -v kubectl >/dev/null || die "kubectl not found" DB_NAMESPACE="${PROLE_NAMESPACE:-}" if [[ -z "$DB_NAMESPACE" && -n "$CFG_PATH" ]]; then - DB_NAMESPACE="$(_prole_cfg_extract_key "$CFG_PATH" "NAMESPACE")" + DB_NAMESPACE="$(_knoe_cfg_extract_key "$CFG_PATH" "NAMESPACE")" fi DB_NAMESPACE="${DB_NAMESPACE:-default}" diff --git a/mock_val/init_garage_store.sh b/mock_val/init_garage_store.sh index 907ba8a..9b80f19 100755 --- a/mock_val/init_garage_store.sh +++ b/mock_val/init_garage_store.sh @@ -17,7 +17,7 @@ source "$SCRIPT_DIR/common_core_lib.sh" common_core_preparse_config "$@" # shellcheck disable=SC1090 -source "$SCRIPT_DIR/prole_cfg.sh" +source "$SCRIPT_DIR/knoe_cfg.sh" set -- "${COMMON_CORE_ARGS[@]}" common_core_parse_args "$@" @@ -50,13 +50,13 @@ GARAGE_ZONE=${GARAGE_ZONE:-local} GARAGE_NAMESPACE=${GARAGE_NAMESPACE:-$RESOLVED_NAMESPACE} NAMESPACE="$GARAGE_NAMESPACE" -# Support both PROLE_HOME/k8s and sibling k8s directory -if [[ -d "$SCRIPT_DIR/../k8s/prole" ]]; then - GARAGE_MANIFEST_DIR="$SCRIPT_DIR/../k8s/prole" -elif [[ -n "${PROLE_HOME:-}" && -d "$PROLE_HOME/k8s/prole" ]]; then - GARAGE_MANIFEST_DIR="$PROLE_HOME/k8s/prole" +# Support both KNOE_HOME/k8s and sibling k8s directory +if [[ -d "$SCRIPT_DIR/../k8s/knoe" ]]; then + GARAGE_MANIFEST_DIR="$SCRIPT_DIR/../k8s/knoe" +elif [[ -n "${KNOE_HOME:-}" && -d "$KNOE_HOME/k8s/knoe" ]]; then + GARAGE_MANIFEST_DIR="$KNOE_HOME/k8s/knoe" else - GARAGE_MANIFEST_DIR="$SCRIPT_DIR/../k8s/prole" + GARAGE_MANIFEST_DIR="$SCRIPT_DIR/../k8s/knoe" fi GARAGE_FILES=( @@ -66,7 +66,7 @@ GARAGE_FILES=( "$GARAGE_MANIFEST_DIR/garage-statefulset.yaml" "$GARAGE_MANIFEST_DIR/garage-service.yaml" ) -if [[ "${PROLE_MODE:-}" == "k3d" ]]; then +if [[ "${KNOE_MODE:-}" == "k3d" ]]; then GARAGE_FILES=( "$GARAGE_MANIFEST_DIR/garage-configmap.yaml" "$GARAGE_MANIFEST_DIR/garage-statefulset.yaml" @@ -121,7 +121,7 @@ ensure_secrets() { } k3d_cleanup_pending_pvc() { - if [[ "${PROLE_MODE:-}" != "k3d" ]]; then + if [[ "${KNOE_MODE:-}" != "k3d" ]]; then return 0 fi if ! kubectl get pvc data-garage-0 -n "$NAMESPACE" >/dev/null 2>&1; then @@ -150,7 +150,7 @@ apply_manifests() { local rendered="" local diff_out="" local diff_rc=0 - rendered=$(prole_render_manifest "$f") + rendered=$(knoe_render_manifest "$f") if diff_out=$(printf '%s' "$rendered" | kubectl diff -n "$NAMESPACE" -f - 2>&1); then diff_rc=0 else @@ -171,7 +171,7 @@ apply_manifests() { garage-statefulset.yaml) GARAGE_STATEFULSET_CHANGED=1 ;; esac else - if [[ "${PROLE_MODE:-}" == "k3d" && "$(basename "$f")" == "garage-statefulset.yaml" ]] \ + if [[ "${KNOE_MODE:-}" == "k3d" && "$(basename "$f")" == "garage-statefulset.yaml" ]] \ && echo "$output" | grep -q "updates to statefulset spec"; then echo "WARN: Garage StatefulSet immutable in k3d; skipping apply." continue @@ -216,7 +216,7 @@ ensure_container_command() { } pin_garage_node_k3d() { - if [[ "${PROLE_MODE:-}" != "k3d" ]]; then + if [[ "${KNOE_MODE:-}" != "k3d" ]]; then return 0 fi if [[ -z "${GARAGE_PIN_NODE:-}" ]]; then @@ -282,7 +282,7 @@ dump_debug() { echo "---- Garage debug end ----" } -recycle_released_prole_iscsi_pv_for_pvc() { +recycle_released_knoe_iscsi_pv_for_pvc() { # StorageClass `synology-iscsi` uses `Retain` PV reclaim policy. On restart, PVs can remain # in `Released` with a stale `claimRef`, which prevents a same-named PVC from binding. local ns="$1" @@ -323,7 +323,7 @@ wait_ready() { local initial_timeout="${PVC_REPAIR_WAIT_TIMEOUT:-30s}" if ! kubectl rollout status statefulset/$GARAGE_NAME -n "$NAMESPACE" --timeout="$initial_timeout"; then echo "WARN: Garage not ready after $initial_timeout; checking for Released synology-iscsi PVs with stale claimRefs ..." >&2 - recycle_released_prole_iscsi_pv_for_pvc "$NAMESPACE" "data-garage-0" || true + recycle_released_knoe_iscsi_pv_for_pvc "$NAMESPACE" "data-garage-0" || true fi if ! kubectl rollout status statefulset/$GARAGE_NAME -n "$NAMESPACE" --timeout=${ROLLOUT_TIMEOUT:-300s}; then @@ -431,7 +431,7 @@ case "$ACTION" in restart_statefulset wait_ready init_layout - prole_register_port_forward "garage" "${NAMESPACE:-default}" "svc/garage" "3900" "3900" "0.0.0.0" "TCP" "Garage S3 API" + knoe_register_port_forward "garage" "${NAMESPACE:-default}" "svc/garage" "3900" "3900" "0.0.0.0" "TCP" "Garage S3 API" ;; stop) ensure_tools diff --git a/mock_val/init_gitea.sh b/mock_val/init_gitea.sh index 6177c5f..9c7759c 100644 --- a/mock_val/init_gitea.sh +++ b/mock_val/init_gitea.sh @@ -5,9 +5,9 @@ PROG="init_gitea" SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" # shellcheck disable=SC1090 -source "$SCRIPT_DIR/prole_cfg.sh" +source "$SCRIPT_DIR/knoe_cfg.sh" -MODE="$(prole_normalize_mode "${PROLE_MODE:-${DEPLOYMENT_MODE:-k3d}}")" +MODE="$(knoe_normalize_mode "${KNOE_MODE:-${DEPLOYMENT_MODE:-k3d}}")" NAMESPACE="${GITEA_NAMESPACE:-}" CFG_PATH="" FORCE=0 @@ -20,7 +20,7 @@ Usage: Options: --mode Deployment mode (default: ${MODE:-k3d}) -n, --namespace Target namespace (default: gitea) - -c, --config Path to prole.cfg (defaults to detected) + -c, --config Path to knoe.cfg (defaults to detected) --force Delete existing release before deploy --help Show this help @@ -37,8 +37,8 @@ warn() { echo "[WARN] $*" >&2; } while [[ $# -gt 0 ]]; do case "$1" in - --mode) MODE="$(prole_normalize_mode "${2:-}")"; shift 2 ;; - --mode=*) MODE="$(prole_normalize_mode "${1#*=}")"; shift 1 ;; + --mode) MODE="$(knoe_normalize_mode "${2:-}")"; shift 2 ;; + --mode=*) MODE="$(knoe_normalize_mode "${1#*=}")"; shift 1 ;; -n|--namespace) NAMESPACE="${2:-}"; shift 2 ;; --namespace=*) NAMESPACE="${1#*=}"; shift 1 ;; -c|--config) CFG_PATH="${2:-}"; shift 2 ;; @@ -49,16 +49,16 @@ while [[ $# -gt 0 ]]; do esac done -# Resolve config path and namespace defaults from prole.cfg when present -if [[ -z "$CFG_PATH" && -n "${PROLE_CONF:-}" && -f "${PROLE_CONF}/prole.cfg" ]]; then - CFG_PATH="${PROLE_CONF}/prole.cfg" -elif [[ -z "$CFG_PATH" && -f "$SCRIPT_DIR/../conf/prole.cfg" ]]; then - CFG_PATH="$SCRIPT_DIR/../conf/prole.cfg" +# Resolve config path and namespace defaults from knoe.cfg when present +if [[ -z "$CFG_PATH" && -n "${KNOE_CONF:-}" && -f "${KNOE_CONF}/knoe.cfg" ]]; then + CFG_PATH="${KNOE_CONF}/knoe.cfg" +elif [[ -z "$CFG_PATH" && -f "$SCRIPT_DIR/../conf/knoe.cfg" ]]; then + CFG_PATH="$SCRIPT_DIR/../conf/knoe.cfg" fi if [[ -z "$NAMESPACE" && -n "$CFG_PATH" ]]; then - maybe_ns="$(_prole_cfg_extract_key "$CFG_PATH" "GITOPS_NAMESPACE")" - [[ -z "$maybe_ns" ]] && maybe_ns="$(_prole_cfg_extract_key "$CFG_PATH" "GITEA_NAMESPACE")" + maybe_ns="$(_knoe_cfg_extract_key "$CFG_PATH" "GITOPS_NAMESPACE")" + [[ -z "$maybe_ns" ]] && maybe_ns="$(_knoe_cfg_extract_key "$CFG_PATH" "GITEA_NAMESPACE")" NAMESPACE="$maybe_ns" fi NAMESPACE="${NAMESPACE:-gitea}" @@ -68,7 +68,7 @@ case "$MODE" in k3d|k3s|k8s|local) ;; *) die "Unsupported mode '$MODE' (use k3d, k3s, k8s, or local)" ;; esac -export PROLE_MODE="$MODE" +export KNOE_MODE="$MODE" command -v kubectl >/dev/null || die "kubectl not found" command -v helm >/dev/null || warn "helm not found — will use manifest fallback" @@ -92,7 +92,7 @@ if [[ "$FORCE" -eq 1 ]]; then fi # Mirror to local registry if enabled -if _prole_local_registry_enabled && command -v docker >/dev/null; then +if _knoe_local_registry_enabled && command -v docker >/dev/null; then HOST_REG="${LOCAL_REGISTRY:-${PROLE_LOCAL_REGISTRY:-}}" INTERNAL_REG="${LOCAL_REGISTRY_INTERNAL:-${PROLE_LOCAL_REGISTRY_INTERNAL:-}}" if [[ -n "$HOST_REG" ]]; then diff --git a/mock_val/init_gitlab.sh b/mock_val/init_gitlab.sh index a4c5216..c7f09c9 100644 --- a/mock_val/init_gitlab.sh +++ b/mock_val/init_gitlab.sh @@ -5,9 +5,9 @@ PROG="init_gitlab" SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" # shellcheck disable=SC1090 -source "$SCRIPT_DIR/prole_cfg.sh" +source "$SCRIPT_DIR/knoe_cfg.sh" -MODE="$(prole_normalize_mode "${PROLE_MODE:-${DEPLOYMENT_MODE:-k3d}}")" +MODE="$(knoe_normalize_mode "${KNOE_MODE:-${DEPLOYMENT_MODE:-k3d}}")" NAMESPACE="${GITLAB_NAMESPACE:-}" CFG_PATH="" FORCE=0 @@ -20,7 +20,7 @@ Usage: Options: --mode Deployment mode (default: ${MODE:-k3d}) -n, --namespace Target namespace (default: gitlab) - -c, --config Path to prole.cfg (defaults to detected) + -c, --config Path to knoe.cfg (defaults to detected) --force Uninstall existing GitLab release before deploy --help Show this help @@ -36,8 +36,8 @@ warn() { echo "[WARN] $*" >&2; } while [[ $# -gt 0 ]]; do case "$1" in - --mode) MODE="$(prole_normalize_mode "${2:-}")"; shift 2 ;; - --mode=*) MODE="$(prole_normalize_mode "${1#*=}")"; shift 1 ;; + --mode) MODE="$(knoe_normalize_mode "${2:-}")"; shift 2 ;; + --mode=*) MODE="$(knoe_normalize_mode "${1#*=}")"; shift 1 ;; -n|--namespace) NAMESPACE="${2:-}"; shift 2 ;; --namespace=*) NAMESPACE="${1#*=}"; shift 1 ;; -c|--config) CFG_PATH="${2:-}"; shift 2 ;; @@ -48,16 +48,16 @@ while [[ $# -gt 0 ]]; do esac done -# Resolve config path and namespace defaults from prole.cfg when present -if [[ -z "$CFG_PATH" && -n "${PROLE_CONF:-}" && -f "${PROLE_CONF}/prole.cfg" ]]; then - CFG_PATH="${PROLE_CONF}/prole.cfg" -elif [[ -z "$CFG_PATH" && -f "$SCRIPT_DIR/../conf/prole.cfg" ]]; then - CFG_PATH="$SCRIPT_DIR/../conf/prole.cfg" +# Resolve config path and namespace defaults from knoe.cfg when present +if [[ -z "$CFG_PATH" && -n "${KNOE_CONF:-}" && -f "${KNOE_CONF}/knoe.cfg" ]]; then + CFG_PATH="${KNOE_CONF}/knoe.cfg" +elif [[ -z "$CFG_PATH" && -f "$SCRIPT_DIR/../conf/knoe.cfg" ]]; then + CFG_PATH="$SCRIPT_DIR/../conf/knoe.cfg" fi if [[ -z "$NAMESPACE" && -n "$CFG_PATH" ]]; then - maybe_ns="$(_prole_cfg_extract_key "$CFG_PATH" "GITOPS_NAMESPACE")" - [[ -z "$maybe_ns" ]] && maybe_ns="$(_prole_cfg_extract_key "$CFG_PATH" "GITLAB_NAMESPACE")" + maybe_ns="$(_knoe_cfg_extract_key "$CFG_PATH" "GITOPS_NAMESPACE")" + [[ -z "$maybe_ns" ]] && maybe_ns="$(_knoe_cfg_extract_key "$CFG_PATH" "GITLAB_NAMESPACE")" NAMESPACE="$maybe_ns" fi NAMESPACE="${NAMESPACE:-gitlab}" @@ -67,14 +67,14 @@ case "$MODE" in k3d|k3s|k8s|local) ;; *) die "Unsupported mode '$MODE' (use k3d, k3s, k8s, or local)" ;; esac -export PROLE_MODE="$MODE" +export KNOE_MODE="$MODE" command -v kubectl >/dev/null || die "kubectl not found" command -v helm >/dev/null || die "helm not found (required for GitLab install)" DB_NAMESPACE="${PROLE_NAMESPACE:-}" if [[ -z "$DB_NAMESPACE" && -n "$CFG_PATH" ]]; then - DB_NAMESPACE="$(_prole_cfg_extract_key "$CFG_PATH" "NAMESPACE")" + DB_NAMESPACE="$(_knoe_cfg_extract_key "$CFG_PATH" "NAMESPACE")" fi DB_NAMESPACE="${DB_NAMESPACE:-default}" diff --git a/mock_val/init_k3s_registry.sh b/mock_val/init_k3s_registry.sh index 3101f7e..4c092c7 100644 --- a/mock_val/init_k3s_registry.sh +++ b/mock_val/init_k3s_registry.sh @@ -4,12 +4,12 @@ set -euo pipefail # init_k3s_registry.sh # Purpose: -# - Configure k3s/containerd to allow access to the Prole registry +# - Configure k3s/containerd to allow access to the Knoe registry # - Writes /etc/rancher/k3s/registries.yaml on the k3s node SCRIPT_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) # shellcheck disable=SC1090 -source "$SCRIPT_DIR/prole_cfg.sh" +source "$SCRIPT_DIR/knoe_cfg.sh" ACTION=${1:-apply} diff --git a/mock_val/init_k8s.sh b/mock_val/init_k8s.sh index e5d3266..1a7b17b 100755 --- a/mock_val/init_k8s.sh +++ b/mock_val/init_k8s.sh @@ -8,9 +8,9 @@ set -euo pipefail # Initialize SCRIPT_DIR SCRIPT_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) -# Load environment and config via prole_cfg.sh +# Load environment and config via knoe_cfg.sh # shellcheck disable=SC1090 -source "$SCRIPT_DIR/prole_cfg.sh" +source "$SCRIPT_DIR/knoe_cfg.sh" # Default values VERBOSE=false @@ -60,8 +60,8 @@ while [[ $# -gt 0 ]]; do shift ;; -m|--mode) - prole_set_mode "${2:-}" - case "${PROLE_MODE:-}" in + knoe_set_mode "${2:-}" + case "${KNOE_MODE:-}" in k3d) ENVIRONMENT="dev" ;; k3s) ENVIRONMENT="service" ;; k8s) ENVIRONMENT="prod" ;; @@ -69,8 +69,8 @@ while [[ $# -gt 0 ]]; do shift 2 ;; --mode=*|-m=*) - prole_set_mode "${1#*=}" - case "${PROLE_MODE:-}" in + knoe_set_mode "${1#*=}" + case "${KNOE_MODE:-}" in k3d) ENVIRONMENT="dev" ;; k3s) ENVIRONMENT="service" ;; k8s) ENVIRONMENT="prod" ;; @@ -162,9 +162,9 @@ initialize() { reg_cfg=$(mktemp "${TMPDIR:-/tmp}/k3d-registries-XXXXXX.yaml") cat > "$reg_cfg" <<'REGEOF' mirrors: - "k3d-prole-registry:5000": + "k3d-knoe-registry:5000": endpoint: - - "http://k3d-prole-registry:5000" + - "http://k3d-knoe-registry:5000" REGEOF registry_config_args=(--registry-config "$reg_cfg") log "Creating k3d cluster '$CLUSTER_NAME'..." diff --git a/mock_val/init_kdc.sh b/mock_val/init_kdc.sh index efee5ec..7c7dc77 100755 --- a/mock_val/init_kdc.sh +++ b/mock_val/init_kdc.sh @@ -4,7 +4,7 @@ set -euo pipefail # init_kdc.sh # Purpose: -# - Provision the in-cluster Prole KDC (MIT Kerberos) in the common services namespace +# - Provision the in-cluster Knoe KDC (MIT Kerberos) in the common services namespace # - Optionally configure cross-realm trust to an external realm when credentials are provided # # Usage: @@ -15,18 +15,18 @@ set -euo pipefail SCRIPT_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) # shellcheck disable=SC1090 -source "$SCRIPT_DIR/prole_cfg.sh" +source "$SCRIPT_DIR/knoe_cfg.sh" if [[ "${1:-}" == "--mode" || "${1:-}" == "-m" ]]; then - prole_set_mode "${2:-}" + knoe_set_mode "${2:-}" shift 2 elif [[ "${1:-}" == --mode=* || "${1:-}" == -m=* ]]; then - prole_set_mode "${1#*=}" + knoe_set_mode "${1#*=}" shift fi -prole_ensure_kubeconfig >/dev/null 2>&1 || true -prole_ensure_kube_context || exit 1 +knoe_ensure_kubeconfig >/dev/null 2>&1 || true +knoe_ensure_kube_context || exit 1 ACTION=${1:-initialize} @@ -41,7 +41,7 @@ PROLE_KDC_IMAGE_EXPLICIT=0 if [[ -n "${PROLE_KDC_IMAGE:-}" ]]; then PROLE_KDC_IMAGE_EXPLICIT=1 fi -PROLE_KDC_IMAGE_NAME=${PROLE_KDC_IMAGE_NAME:-prole-authority} +PROLE_KDC_IMAGE_NAME=${PROLE_KDC_IMAGE_NAME:-knoe-authority} PROLE_KDC_IMAGE_TAG=${PROLE_KDC_IMAGE_TAG:-latest} PROLE_KDC_REGISTRY_HOST=${PROLE_KDC_REGISTRY_HOST:-${LOCAL_REGISTRY:-localhost:5000}} PROLE_KDC_REGISTRY_INTERNAL=${PROLE_KDC_REGISTRY_INTERNAL:-${LOCAL_REGISTRY_INTERNAL:-}} @@ -75,10 +75,10 @@ local_registry_enabled() { fi local mode="" - if command -v prole_normalize_mode >/dev/null 2>&1; then - mode=$(prole_normalize_mode "${PROLE_MODE:-${DEPLOYMENT_MODE:-${CLUSTER_ENV:-}}}") + if command -v knoe_normalize_mode >/dev/null 2>&1; then + mode=$(knoe_normalize_mode "${KNOE_MODE:-${DEPLOYMENT_MODE:-${CLUSTER_ENV:-}}}") else - mode="${PROLE_MODE:-${DEPLOYMENT_MODE:-${CLUSTER_ENV:-}}}" + mode="${KNOE_MODE:-${DEPLOYMENT_MODE:-${CLUSTER_ENV:-}}}" fi [[ "$mode" == "k3d" || "$mode" == "k3s" ]] } @@ -106,7 +106,7 @@ ensure_docker() { command -v docker >/dev/null || { err "Missing required tool: docker"; exit 1; } if ! docker info >/dev/null 2>&1; then err "Docker is not running or not accessible." - err "This is required to build/push the Prole KDC image." + err "This is required to build/push the Knoe KDC image." err "Start Docker (e.g. Docker Desktop), or set PROLE_KDC_IMAGE to a prebuilt image and/or set PROLE_KDC_BUILD_IMAGE=0." exit 1 fi @@ -117,7 +117,7 @@ docker_available() { docker info >/dev/null 2>&1 } -resolve_prole_kdc_image() { +resolve_knoe_kdc_image() { # Ensure we have a deterministic image reference even when skipping local builds. if [[ -n "${PROLE_KDC_IMAGE:-}" ]]; then return 0 @@ -141,11 +141,11 @@ ensure_namespace() { } normalized_mode() { - if command -v prole_normalize_mode >/dev/null 2>&1; then - prole_normalize_mode "${PROLE_MODE:-}" + if command -v knoe_normalize_mode >/dev/null 2>&1; then + knoe_normalize_mode "${KNOE_MODE:-}" return 0 fi - printf '%s' "${PROLE_MODE:-}" + printf '%s' "${KNOE_MODE:-}" } is_k3d_mode() { @@ -239,8 +239,8 @@ maybe_cleanup_stale_kdc() { elif ! kdc_stale_deployment; then return 1 fi - err "WARN: Detected stale Prole KDC deployment (${reason}). Cleaning up..." - cleanup_prole_kdc + err "WARN: Detected stale Knoe KDC deployment (${reason}). Cleaning up..." + cleanup_knoe_kdc return 0 } @@ -291,7 +291,7 @@ get_secret_value() { kubectl -n "$KDC_NAMESPACE" get secret "$secret" -o "jsonpath={.data.${key}}" 2>/dev/null | b64_decode 2>/dev/null || true } -resolve_prole_kdc_defaults() { +resolve_knoe_kdc_defaults() { if [[ -z "$PROLE_KDC_REALM" ]]; then PROLE_KDC_REALM="PROLE.LOCAL" fi @@ -299,10 +299,10 @@ resolve_prole_kdc_defaults() { PROLE_KDC_DOMAIN=$(lowercase "$PROLE_KDC_REALM") fi local mode="" - if command -v prole_normalize_mode >/dev/null 2>&1; then - mode=$(prole_normalize_mode "${PROLE_MODE:-}") + if command -v knoe_normalize_mode >/dev/null 2>&1; then + mode=$(knoe_normalize_mode "${KNOE_MODE:-}") else - mode="${PROLE_MODE:-}" + mode="${KNOE_MODE:-}" fi local k3s_host="" if local_registry_enabled; then @@ -334,16 +334,16 @@ resolve_kdc_docker_dir() { echo "$PROLE_KDC_DOCKER_DIR" return 0 fi - if [[ -n "${PROLE_HOME:-}" && -d "$PROLE_HOME/prole/authority" ]]; then - echo "$PROLE_HOME/prole/authority" + if [[ -n "${KNOE_HOME:-}" && -d "$KNOE_HOME/knoe/authority" ]]; then + echo "$KNOE_HOME/knoe/authority" return 0 fi - if [[ -n "${PROLE_HOME:-}" && -d "$PROLE_HOME/authority" ]]; then - echo "$PROLE_HOME/authority" + if [[ -n "${KNOE_HOME:-}" && -d "$KNOE_HOME/authority" ]]; then + echo "$KNOE_HOME/authority" return 0 fi - if [[ -d "$SCRIPT_DIR/../prole/authority" ]]; then - echo "$SCRIPT_DIR/../prole/authority" + if [[ -d "$SCRIPT_DIR/../knoe/authority" ]]; then + echo "$SCRIPT_DIR/../knoe/authority" return 0 fi if [[ -d "$SCRIPT_DIR/../authority" ]]; then @@ -360,12 +360,12 @@ is_truthy() { return 1 } -build_prole_kdc_image() { +build_knoe_kdc_image() { # If the user explicitly sets PROLE_KDC_BUILD_IMAGE, honor it. # Otherwise, skip building when an explicit image was provided. if [[ "$PROLE_KDC_BUILD_IMAGE_SET" == "1" ]]; then if ! is_truthy "${PROLE_KDC_BUILD_IMAGE:-0}"; then - resolve_prole_kdc_image + resolve_knoe_kdc_image return 0 fi else @@ -381,16 +381,16 @@ build_prole_kdc_image() { ensure_docker fi - log "[WARN] Docker is not available; skipping Prole KDC image build." + log "[WARN] Docker is not available; skipping Knoe KDC image build." log " Set PROLE_KDC_BUILD_IMAGE=1 to force building (requires Docker), or set PROLE_KDC_IMAGE to a prebuilt image." - resolve_prole_kdc_image + resolve_knoe_kdc_image return 0 fi local docker_dir docker_dir=$(resolve_kdc_docker_dir || true) if [[ -z "$docker_dir" ]]; then - err "ERROR: prole/authority Docker context not found." + err "ERROR: knoe/authority Docker context not found." exit 1 fi @@ -439,8 +439,8 @@ build_prole_kdc_image() { fi } -ensure_prole_kdc_secrets() { - local secret_name="prole-kdc-secrets" +ensure_knoe_kdc_secrets() { + local secret_name="knoe-kdc-secrets" if [[ -z "$PROLE_KDC_ADMIN_PASSWORD" ]]; then PROLE_KDC_ADMIN_PASSWORD=$(get_secret_value "$secret_name" "admin_password") fi @@ -472,9 +472,9 @@ ensure_prole_kdc_secrets() { --dry-run=client -o yaml | kubectl apply -f - >/dev/null } -ensure_prole_kdc() { +ensure_knoe_kdc() { if [[ "$PROLE_KDC_ENABLED" == "0" || "$PROLE_KDC_ENABLED" == "false" || "$PROLE_KDC_ENABLED" == "False" ]]; then - log "Prole KDC disabled (PROLE_KDC_ENABLED=$PROLE_KDC_ENABLED)." + log "Knoe KDC disabled (PROLE_KDC_ENABLED=$PROLE_KDC_ENABLED)." return 0 fi @@ -482,9 +482,9 @@ ensure_prole_kdc() { PROLE_KDC_HOST_NETWORK=1 fi - resolve_prole_kdc_defaults - build_prole_kdc_image - ensure_prole_kdc_secrets + resolve_knoe_kdc_defaults + build_knoe_kdc_image + ensure_knoe_kdc_secrets local deployment_present=0 if kubectl -n "$KDC_NAMESPACE" get deploy "$PROLE_KDC_NAME" >/dev/null 2>&1; then deployment_present=1 @@ -525,7 +525,7 @@ EOF fi apply_kdc_manifest() { - log "Applying Prole KDC '${PROLE_KDC_NAME}' in namespace '${KDC_NAMESPACE}' (realm ${PROLE_KDC_REALM}) ..." + log "Applying Knoe KDC '${PROLE_KDC_NAME}' in namespace '${KDC_NAMESPACE}' (realm ${PROLE_KDC_REALM}) ..." local host_net_block="" local dns_policy_block="" if is_truthy "${PROLE_KDC_HOST_NETWORK:-0}"; then @@ -536,7 +536,7 @@ EOF apiVersion: v1 kind: ConfigMap metadata: - name: prole-kdc-config + name: knoe-kdc-config namespace: ${KDC_NAMESPACE} data: krb5.conf: | @@ -588,23 +588,23 @@ data: fi mkdir -p /etc/krb5kdc /var/lib/krb5kdc - if [[ -f /opt/prole-kdc/krb5.conf ]]; then - cp /opt/prole-kdc/krb5.conf /etc/krb5.conf + if [[ -f /opt/knoe-kdc/krb5.conf ]]; then + cp /opt/knoe-kdc/krb5.conf /etc/krb5.conf fi - if [[ -f /opt/prole-kdc/kdc.conf ]]; then - cp /opt/prole-kdc/kdc.conf /etc/krb5kdc/kdc.conf + if [[ -f /opt/knoe-kdc/kdc.conf ]]; then + cp /opt/knoe-kdc/kdc.conf /etc/krb5kdc/kdc.conf fi - if [[ -f /opt/prole-kdc/kadm5.acl ]]; then - cp /opt/prole-kdc/kadm5.acl /etc/krb5kdc/kadm5.acl + if [[ -f /opt/knoe-kdc/kadm5.acl ]]; then + cp /opt/knoe-kdc/kadm5.acl /etc/krb5kdc/kadm5.acl fi # Validate required secrets early to avoid silent crashes if [[ -z "${PROLE_KDC_MASTER_PASSWORD:-}" ]]; then - echo "ERROR: Missing required env PROLE_KDC_MASTER_PASSWORD (secret 'prole-kdc-secrets/master_password')." >&2 + echo "ERROR: Missing required env PROLE_KDC_MASTER_PASSWORD (secret 'knoe-kdc-secrets/master_password')." >&2 exit 1 fi if [[ -z "${PROLE_KDC_ADMIN_PASSWORD:-}" ]]; then - echo "ERROR: Missing required env PROLE_KDC_ADMIN_PASSWORD (secret 'prole-kdc-secrets/admin_password')." >&2 + echo "ERROR: Missing required env PROLE_KDC_ADMIN_PASSWORD (secret 'knoe-kdc-secrets/admin_password')." >&2 exit 1 fi @@ -706,7 +706,7 @@ ${dns_policy_block} - name: kdc image: ${PROLE_KDC_IMAGE} imagePullPolicy: IfNotPresent - command: ["/bin/bash", "/opt/prole-kdc/entrypoint.sh"] + command: ["/bin/bash", "/opt/knoe-kdc/entrypoint.sh"] env: - name: PROLE_KDC_REALM value: "${PROLE_KDC_REALM}" @@ -715,17 +715,17 @@ ${dns_policy_block} - name: PROLE_KDC_MASTER_PASSWORD valueFrom: secretKeyRef: - name: prole-kdc-secrets + name: knoe-kdc-secrets key: master_password - name: PROLE_KDC_ADMIN_PASSWORD valueFrom: secretKeyRef: - name: prole-kdc-secrets + name: knoe-kdc-secrets key: admin_password - name: PROLE_KDC_TRUST_SHARED_PASSWORD valueFrom: secretKeyRef: - name: prole-kdc-secrets + name: knoe-kdc-secrets key: trust_shared_password - name: PROLE_KDC_TRUST_REALM value: "${PROLE_KDC_TRUST_REALM}" @@ -734,7 +734,7 @@ ${dns_policy_block} - name: PROLE_KDC_TRUST_PASSWORD valueFrom: secretKeyRef: - name: prole-kdc-secrets + name: knoe-kdc-secrets key: trust_password - name: PROLE_CHILD_REALM value: "${PROLE_CHILD_REALM:-}" @@ -763,17 +763,17 @@ ${dns_policy_block} containerPort: 749 protocol: TCP volumeMounts: - - name: prole-kdc-config - mountPath: /opt/prole-kdc - - name: prole-kdc-data + - name: knoe-kdc-config + mountPath: /opt/knoe-kdc + - name: knoe-kdc-data mountPath: /var/lib/krb5kdc - - name: prole-kdc-data + - name: knoe-kdc-data mountPath: /etc/krb5kdc volumes: - - name: prole-kdc-config + - name: knoe-kdc-config configMap: - name: prole-kdc-config - - name: prole-kdc-data + name: knoe-kdc-config + - name: knoe-kdc-data emptyDir: {} --- apiVersion: v1 @@ -815,7 +815,7 @@ EOF rollout_timeout="$PROLE_KDC_DEPLOY_TIMEOUT" fi if ! kubectl -n "$KDC_NAMESPACE" rollout status deploy/${PROLE_KDC_NAME} --timeout="${rollout_timeout}s"; then - err "WARN: Prole KDC rollout did not complete within ${rollout_timeout}s. Collecting diagnostics..." + err "WARN: Knoe KDC rollout did not complete within ${rollout_timeout}s. Collecting diagnostics..." # Dump a quick describe and last logs from the newest pod (if any) to aid troubleshooting latest_pod=$(kubectl -n "$KDC_NAMESPACE" get pod -l "app=${PROLE_KDC_NAME}" --sort-by=.metadata.creationTimestamp -o jsonpath='{.items[-1].metadata.name}' 2>/dev/null || true) if [[ -n "${latest_pod:-}" ]]; then @@ -827,34 +827,34 @@ EOF err "[WARN] No pods found for app=${PROLE_KDC_NAME} to collect logs from." fi if maybe_cleanup_stale_kdc "rollout timeout"; then - log "Re-applying Prole KDC after cleanup..." + log "Re-applying Knoe KDC after cleanup..." apply_kdc_manifest kubectl -n "$KDC_NAMESPACE" rollout status deploy/${PROLE_KDC_NAME} --timeout="${PROLE_KDC_DEPLOY_TIMEOUT}s" || true fi fi } -cleanup_prole_kdc() { - log "Removing Prole KDC resources (if present)..." +cleanup_knoe_kdc() { + log "Removing Knoe KDC resources (if present)..." kubectl -n "$KDC_NAMESPACE" delete service "$PROLE_KDC_SERVICE" --ignore-not-found kubectl -n "$KDC_NAMESPACE" delete deployment "$PROLE_KDC_NAME" --ignore-not-found - kubectl -n "$KDC_NAMESPACE" delete configmap prole-kdc-config --ignore-not-found + kubectl -n "$KDC_NAMESPACE" delete configmap knoe-kdc-config --ignore-not-found } status() { log "--- init_kdc status ---" log "Namespace: $KDC_NAMESPACE" - log "Prole KDC enabled: ${PROLE_KDC_ENABLED:-0}" - log "Prole KDC realm: ${PROLE_KDC_REALM:-}" - log "Prole KDC service: ${PROLE_KDC_SERVICE:-}" - log "Prole KDC image: ${PROLE_KDC_IMAGE:-}" + log "Knoe KDC enabled: ${PROLE_KDC_ENABLED:-0}" + log "Knoe KDC realm: ${PROLE_KDC_REALM:-}" + log "Knoe KDC service: ${PROLE_KDC_SERVICE:-}" + log "Knoe KDC image: ${PROLE_KDC_IMAGE:-}" if kubectl -n "$KDC_NAMESPACE" get deploy "$PROLE_KDC_NAME" >/dev/null 2>&1; then - log "[OK] Prole KDC deployment present" + log "[OK] Knoe KDC deployment present" if maybe_cleanup_stale_kdc "status check" "strict"; then - log "[INFO] Stale Prole KDC deployment removed. Re-run init_kdc.sh update to recreate." + log "[INFO] Stale Knoe KDC deployment removed. Re-run init_kdc.sh update to recreate." fi else - log "[INFO] Prole KDC deployment not present" + log "[INFO] Knoe KDC deployment not present" fi } @@ -862,7 +862,7 @@ case "$ACTION" in initialize|init|update|deploy|start) ensure_tools ensure_namespace - ensure_prole_kdc + ensure_knoe_kdc ;; status) ensure_tools @@ -871,7 +871,7 @@ case "$ACTION" in cleanup|delete|remove) ensure_tools ensure_namespace - cleanup_prole_kdc + cleanup_knoe_kdc ;; *) err "Usage: $0 {initialize|update|status|cleanup}" diff --git a/mock_val/init_kerberos.sh b/mock_val/init_kerberos.sh index 1d77013..3d72220 100755 --- a/mock_val/init_kerberos.sh +++ b/mock_val/init_kerberos.sh @@ -17,15 +17,15 @@ set -euo pipefail SCRIPT_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) -# Load environment and config via prole_cfg.sh +# Load environment and config via knoe_cfg.sh # shellcheck disable=SC1090 -source "$SCRIPT_DIR/prole_cfg.sh" +source "$SCRIPT_DIR/knoe_cfg.sh" if [[ "${1:-}" == "--mode" || "${1:-}" == "-m" ]]; then - prole_set_mode "${2:-}" + knoe_set_mode "${2:-}" shift 2 elif [[ "${1:-}" == --mode=* || "${1:-}" == -m=* ]]; then - prole_set_mode "${1#*=}" + knoe_set_mode "${1#*=}" shift fi @@ -42,8 +42,8 @@ PROLE_KDC_NAME=${PROLE_KDC_NAME:-auth} # AD DC forwarding (socat proxy) options KRB5_AD_PORT_FORWARD=${KRB5_AD_PORT_FORWARD:-${AD_PORT_FORWARD:-}} -KRB5_AD_PROXY_NAME=${KRB5_AD_PROXY_NAME:-prole-kerberos-ad-forwarder} -KRB5_AD_SERVICE_NAME=${KRB5_AD_SERVICE_NAME:-prole-kerberos-ad-dc} +KRB5_AD_PROXY_NAME=${KRB5_AD_PROXY_NAME:-knoe-kerberos-ad-forwarder} +KRB5_AD_SERVICE_NAME=${KRB5_AD_SERVICE_NAME:-knoe-kerberos-ad-dc} KRB5_AD_PROXY_IMAGE=${KRB5_AD_PROXY_IMAGE:-alpine/socat} KRB5_AD_PROXY_HOST_NETWORK=${KRB5_AD_PROXY_HOST_NETWORK:-1} KRB5_AD_TCP_PORTS=${KRB5_AD_TCP_PORTS:-"88 389 445 464 636"} @@ -155,13 +155,13 @@ is_ip_address() { [[ "$1" =~ ^([0-9]{1,3}\.){3}[0-9]{1,3}$ ]] } -detect_prole_cfg() { - if [[ -n "${PROLE_CONF:-}" && -f "$PROLE_CONF/prole.cfg" ]]; then - printf '%s' "$PROLE_CONF/prole.cfg" - elif [[ -n "${PROLE_HOME:-}" && -f "$PROLE_HOME/conf/prole.cfg" ]]; then - printf '%s' "$PROLE_HOME/conf/prole.cfg" - elif [[ -f "$SCRIPT_DIR/../conf/prole.cfg" ]]; then - printf '%s' "$SCRIPT_DIR/../conf/prole.cfg" +detect_knoe_cfg() { + if [[ -n "${KNOE_CONF:-}" && -f "$KNOE_CONF/knoe.cfg" ]]; then + printf '%s' "$KNOE_CONF/knoe.cfg" + elif [[ -n "${KNOE_HOME:-}" && -f "$KNOE_HOME/conf/knoe.cfg" ]]; then + printf '%s' "$KNOE_HOME/conf/knoe.cfg" + elif [[ -f "$SCRIPT_DIR/../conf/knoe.cfg" ]]; then + printf '%s' "$SCRIPT_DIR/../conf/knoe.cfg" fi } @@ -183,12 +183,12 @@ cfg_extract_key() { normalize_child_realm_preference() { local cfg val parent child cfg_realm cfg_use_child_set=0 - cfg=$(detect_prole_cfg) + cfg=$(detect_knoe_cfg) if [[ -n "$cfg" ]]; then val=$(cfg_extract_key "$cfg" "PROLE_USE_CHILD_REALM") if [[ -n "$val" ]]; then cfg_use_child_set=1 - if _prole_bool_true "$val"; then + if _knoe_bool_true "$val"; then PROLE_USE_CHILD_REALM=1 else PROLE_USE_CHILD_REALM=0 @@ -215,7 +215,7 @@ normalize_child_realm_preference() { return 0 fi - if [[ -n "${PROLE_USE_CHILD_REALM:-}" ]] && _prole_bool_true "${PROLE_USE_CHILD_REALM}"; then + if [[ -n "${PROLE_USE_CHILD_REALM:-}" ]] && _knoe_bool_true "${PROLE_USE_CHILD_REALM}"; then if [[ -n "$child" ]]; then KRB5_REALM="$child" REALM="$child" @@ -229,7 +229,7 @@ normalize_child_realm_preference() { return 0 fi - if [[ -n "${PROLE_USE_CHILD_REALM:-}" ]] && ! _prole_bool_true "${PROLE_USE_CHILD_REALM}"; then + if [[ -n "${PROLE_USE_CHILD_REALM:-}" ]] && ! _knoe_bool_true "${PROLE_USE_CHILD_REALM}"; then parent="${PROLE_PARENT_REALM:-${REALM:-}}" if [[ -z "$parent" && -n "$child" && "$child" == *.* ]]; then parent="${child#*.}" @@ -244,7 +244,7 @@ normalize_child_realm_preference() { prefer_cfg_realm_for_test() { local cfg realm - cfg=$(detect_prole_cfg) + cfg=$(detect_knoe_cfg) if [[ -z "$cfg" ]]; then return 0 fi @@ -264,17 +264,17 @@ openbao_url() { echo "$PROLE_OPENBAO_URL" return 0 fi - if prole_is_in_cluster; then + if knoe_is_in_cluster; then echo "http://openbao.${OPENBAO_NAMESPACE}.svc.cluster.local:8200" return 0 fi # In k3s mode, scripts run outside the cluster must reach OpenBao via the k3s host # (never via localhost or kubectl port-forward). - if [[ "${PROLE_MODE:-${DEPLOYMENT_MODE:-}}" == "k3s" ]]; then - if command -v _prole_host_from_url >/dev/null 2>&1; then + if [[ "${KNOE_MODE:-${DEPLOYMENT_MODE:-}}" == "k3s" ]]; then + if command -v _knoe_host_from_url >/dev/null 2>&1; then local host - host=$(_prole_host_from_url "${PROLE_K3S_SERVER:-${K3S_SERVER_URL:-}}") + host=$(_knoe_host_from_url "${PROLE_K3S_SERVER:-${K3S_SERVER_URL:-}}") if [[ -n "${host:-}" ]]; then echo "http://${host}:8200" return 0 @@ -296,7 +296,7 @@ _OPENBAO_PF_PID="" _OPENBAO_PF_STARTED=0 start_openbao_port_forward() { - if [[ "${PROLE_MODE:-${DEPLOYMENT_MODE:-}}" == "k3s" ]]; then + if [[ "${KNOE_MODE:-${DEPLOYMENT_MODE:-}}" == "k3s" ]]; then return 1 fi @@ -340,7 +340,7 @@ ensure_openbao_url() { return 0 fi - if [[ "${PROLE_MODE:-${DEPLOYMENT_MODE:-}}" == "k3s" ]]; then + if [[ "${KNOE_MODE:-${DEPLOYMENT_MODE:-}}" == "k3s" ]]; then # In k3s, do not attempt to synthesize connectivity via local port-forwards. printf '' return 0 @@ -357,8 +357,8 @@ ensure_openbao_url() { openbao_token() { local token="" - if [[ -f "$PROLE_SERVICE/secrets/openbao-root-token" ]]; then - token=$(cat "$PROLE_SERVICE/secrets/openbao-root-token" 2>/dev/null || true) + if [[ -f "$KNOE_SERVICE/secrets/openbao-root-token" ]]; then + token=$(cat "$KNOE_SERVICE/secrets/openbao-root-token" 2>/dev/null || true) fi if [[ -z "$token" || "$token" == "root" ]]; then token="${OPENBAO_ROOT_TOKEN:-}" @@ -399,15 +399,15 @@ fetch_openbao_secret() { } resolve_krb5_password() { - if [[ -z "${KRB5_PASSWORD}" || "${KRB5_PASSWORD}" == '${OPENBAO:'* || "${KRB5_PASSWORD}" == '${PROLE_SECRET:'* ]]; then - local path="prole/${NAMESPACE:-default}/kerberos" + if [[ -z "${KRB5_PASSWORD}" || "${KRB5_PASSWORD}" == '${OPENBAO:'* || "${KRB5_PASSWORD}" == '${KNOE_SECRET:'* ]]; then + local path="knoe/${NAMESPACE:-default}/kerberos" local fetched fetched=$(fetch_openbao_secret "$path" "password") if [[ -n "$fetched" && "$fetched" != "null" ]]; then KRB5_PASSWORD="$fetched" else # Fallback to database password if kerberos secret is missing - path="prole/${NAMESPACE:-default}/db" + path="knoe/${NAMESPACE:-default}/db" fetched=$(fetch_openbao_secret "$path" "password") if [[ -n "$fetched" && "$fetched" != "null" ]]; then KRB5_PASSWORD="$fetched" @@ -480,7 +480,7 @@ default_port_forward_if_local() { fi } -sync_prole_kdc_trust() { +sync_knoe_kdc_trust() { if [[ ! -x "$SCRIPT_DIR/init_kdc.sh" ]]; then return 0 fi @@ -496,7 +496,7 @@ sync_prole_kdc_trust() { } ensure_krb5_conf_configmap() { - log "Creating/updating ConfigMap prole-krb5-conf ..." + log "Creating/updating ConfigMap knoe-krb5-conf ..." local kdc_val admin_val realm_val domain_val realm_val="$KRB5_REALM" @@ -534,12 +534,12 @@ ensure_krb5_conf_configmap() { .$domain_val = $realm_val $domain_val = $realm_val EOF - kubectl -n "$NAMESPACE" create configmap prole-krb5-conf --from-file=krb5.conf="$TMP" --dry-run=client -o yaml | kubectl apply --validate=false -f - + kubectl -n "$NAMESPACE" create configmap knoe-krb5-conf --from-file=krb5.conf="$TMP" --dry-run=client -o yaml | kubectl apply --validate=false -f - rm -f "$TMP" } get_krb5_conf() { - kubectl -n "$NAMESPACE" get configmap prole-krb5-conf -o jsonpath='{.data.krb5\.conf}' 2>/dev/null || true + kubectl -n "$NAMESPACE" get configmap knoe-krb5-conf -o jsonpath='{.data.krb5\.conf}' 2>/dev/null || true } wait_for_cnpg_pods() { @@ -674,7 +674,7 @@ apply_krb5_conf_mount_to_cnpg() { local conf conf=$(get_krb5_conf) if [[ -z "$conf" ]]; then - err "Missing krb5.conf data in ConfigMap prole-krb5-conf." + err "Missing krb5.conf data in ConfigMap knoe-krb5-conf." return 1 fi @@ -683,7 +683,7 @@ apply_krb5_conf_mount_to_cnpg() { \"spec\": { \"projectedVolumeTemplate\": { \"sources\": [ - {\"configMap\": {\"name\": \"prole-krb5-conf\", \"items\": [{\"key\": \"krb5.conf\", \"path\": \"krb5/krb5.conf\"}]}} + {\"configMap\": {\"name\": \"knoe-krb5-conf\", \"items\": [{\"key\": \"krb5.conf\", \"path\": \"krb5/krb5.conf\"}]}} ] } } @@ -697,7 +697,7 @@ apply_krb5_conf_to_cnpg_pods() { local conf conf=$(get_krb5_conf) if [[ -z "$conf" ]]; then - err "Missing krb5.conf data in ConfigMap prole-krb5-conf." + err "Missing krb5.conf data in ConfigMap knoe-krb5-conf." return 1 fi @@ -714,7 +714,7 @@ apply_krb5_conf_to_cnpg_pods() { log "[OK] Updated /controller/krb5.conf in $pod" else err "[WARN] Unable to write /controller/krb5.conf in $pod." - err " Consider mounting ConfigMap prole-krb5-conf into the CNPG pods or updating the image." + err " Consider mounting ConfigMap knoe-krb5-conf into the CNPG pods or updating the image." fi done } @@ -890,7 +890,7 @@ ensure_kdc_network_allow() { apiVersion: networking.k8s.io/v1 kind: NetworkPolicy metadata: - name: prole-kdc-egress + name: knoe-kdc-egress namespace: ${ns} spec: podSelector: @@ -919,7 +919,7 @@ $(for port in $KRB5_AD_UDP_PORTS; do printf " - protocol: UDP\n apiVersion: networking.k8s.io/v1 kind: NetworkPolicy metadata: - name: prole-ad-forwarder-egress + name: knoe-ad-forwarder-egress namespace: ${ns} spec: podSelector: @@ -936,9 +936,9 @@ EOF maybe_apply_k3d_route_fix() { local norm mode - mode="${PROLE_MODE:-}" - if command -v prole_normalize_mode >/dev/null 2>&1; then - norm=$(prole_normalize_mode "$mode") + mode="${KNOE_MODE:-}" + if command -v knoe_normalize_mode >/dev/null 2>&1; then + norm=$(knoe_normalize_mode "$mode") else norm="$mode" fi @@ -959,12 +959,12 @@ initialize() { prefer_cfg_realm_for_test resolve_krb5_password - # Support both names for the toggle from prole.cfg + # Support both names for the toggle from knoe.cfg local enabled="${KERBEROS_ENABLED:-${ENABLED:-false}}" if [[ "$enabled" == "false" || "$enabled" == "0" || "$enabled" == "False" ]]; then log "Kerberos is disabled (KERBEROS_ENABLED=$enabled). Skipping initialization." # Cleanup any existing Kerberos config if it was previously enabled - kubectl -n "$NAMESPACE" delete configmap prole-krb5-conf --ignore-not-found + kubectl -n "$NAMESPACE" delete configmap knoe-krb5-conf --ignore-not-found return 0 fi @@ -974,7 +974,7 @@ initialize() { exit 1 fi - sync_prole_kdc_trust + sync_knoe_kdc_trust ensure_krb5_conf_configmap if apply_krb5_conf_mount_to_cnpg; then apply_krb5_env_to_cnpg "/projected/krb5/krb5.conf" @@ -1005,18 +1005,18 @@ run_test() { fi local mode - mode="${PROLE_MODE:-}" + mode="${KNOE_MODE:-}" local prefer_parent="${KERBEROS_TEST_PREFER_PARENT_REALM:-1}" - if _prole_bool_true "$prefer_parent" && [[ -n "${PROLE_PARENT_REALM:-}" ]]; then + if _knoe_bool_true "$prefer_parent" && [[ -n "${PROLE_PARENT_REALM:-}" ]]; then KRB5_REALM="${PROLE_PARENT_REALM}" REALM="${PROLE_PARENT_REALM}" - elif _prole_bool_true "$prefer_parent" && [[ -n "${KRB5_REALM:-}" && "${KRB5_REALM}" == *.* ]]; then + elif _knoe_bool_true "$prefer_parent" && [[ -n "${KRB5_REALM:-}" && "${KRB5_REALM}" == *.* ]]; then local derived_parent="${KRB5_REALM#*.}" KRB5_REALM="${derived_parent}" REALM="${derived_parent}" fi local test_use_child="${PROLE_USE_CHILD_REALM:-}" - if _prole_bool_true "$prefer_parent"; then + if _knoe_bool_true "$prefer_parent"; then test_use_child=0 fi local ad_forward_explicit=0 @@ -1032,8 +1032,8 @@ run_test() { fi local normalized="" - if command -v prole_normalize_mode >/dev/null 2>&1; then - normalized=$(prole_normalize_mode "$mode") + if command -v knoe_normalize_mode >/dev/null 2>&1; then + normalized=$(knoe_normalize_mode "$mode") else normalized="$mode" fi @@ -1148,10 +1148,10 @@ status() { log "AD forwarder namespace: ${KRB5_AD_NAMESPACE:-}" log "AD forwarder deployment: $KRB5_AD_PROXY_NAME" log "AD forwarder service: $KRB5_AD_SERVICE_NAME" - if kubectl -n "$NAMESPACE" get configmap prole-krb5-conf >/dev/null 2>&1; then - log "[OK] ConfigMap prole-krb5-conf present" + if kubectl -n "$NAMESPACE" get configmap knoe-krb5-conf >/dev/null 2>&1; then + log "[OK] ConfigMap knoe-krb5-conf present" else - log "[MISSING] ConfigMap prole-krb5-conf" + log "[MISSING] ConfigMap knoe-krb5-conf" fi if kubectl -n "$KRB5_AD_NAMESPACE" get deploy "$KRB5_AD_PROXY_NAME" >/dev/null 2>&1; then log "[OK] AD forwarder deployment present" diff --git a/mock_val/init_knoe-db-reset.sh b/mock_val/init_knoe-db-reset.sh index 7be71b8..8ec6f0d 100755 --- a/mock_val/init_knoe-db-reset.sh +++ b/mock_val/init_knoe-db-reset.sh @@ -15,15 +15,15 @@ set -euo pipefail SCRIPT_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) -# Load environment and config via prole_cfg.sh +# Load environment and config via knoe_cfg.sh # shellcheck disable=SC1090 -source "$SCRIPT_DIR/prole_cfg.sh" +source "$SCRIPT_DIR/knoe_cfg.sh" if [[ "${1:-}" == "--mode" || "${1:-}" == "-m" ]]; then - prole_set_mode "${2:-}" + knoe_set_mode "${2:-}" shift 2 elif [[ "${1:-}" == --mode=* || "${1:-}" == -m=* ]]; then - prole_set_mode "${1#*=}" + knoe_set_mode "${1#*=}" shift fi @@ -31,7 +31,7 @@ ACTION=${1:-reset} NAMESPACE="${PROLE_NAMESPACE}" CNPG_CLUSTER_NAME=${CNPG_CLUSTER_NAME:-knoe-db} -PROLE_HOME=${PROLE_HOME:-$(cd "$SCRIPT_DIR/.." && pwd)} +KNOE_HOME=${KNOE_HOME:-$(cd "$SCRIPT_DIR/.." && pwd)} ADMIN_USER=${KNOE_DB_ADMIN_USER:-postgres} ADMIN_DB=${KNOE_DB_ADMIN_DB:-postgres} @@ -49,12 +49,12 @@ GARAGE_BACKUP_BUCKET=${GARAGE_BACKUP_BUCKET:-knoe-db-backups} GARAGE_BACKUP_SECRET_NAME=${GARAGE_BACKUP_SECRET_NAME:-knoe-db-barman-s3} GARAGE_S3_ENDPOINT=${GARAGE_S3_ENDPOINT:-http://$GARAGE_NAME.$GARAGE_NAMESPACE.svc.cluster.local:3900} -BACKUP_DIR=${BACKUP_DIR:-$PROLE_HOME/prole/backup} +BACKUP_DIR=${BACKUP_DIR:-$KNOE_HOME/knoe/backup} BACKUP_WAIT_TIMEOUT=${BACKUP_WAIT_TIMEOUT:-1800} EXPORT_WAIT_TIMEOUT=${EXPORT_WAIT_TIMEOUT:-1800} ALLOW_NO_BACKUP=${ALLOW_NO_BACKUP:-0} -RECOVERY_TEMPLATE="$SCRIPT_DIR/../k8s/prole/knoe-db-recovery.yaml.tpl" +RECOVERY_TEMPLATE="$SCRIPT_DIR/../k8s/knoe/knoe-db-recovery.yaml.tpl" log() { printf '%s\n' "$*"; } err() { printf '%s\n' "$*" >&2; } @@ -199,7 +199,7 @@ export_backup_bucket() { image=$(kubectl -n "$NAMESPACE" get cluster "$CNPG_CLUSTER_NAME" -o jsonpath='{.spec.imageName}' 2>/dev/null || true) image=${image:-${KNOE_DB_IMAGE:-knoe-db:latest}} - pod_name="prole-barman-export-$(date +%s)" + pod_name="knoe-barman-export-$(date +%s)" export_subdir="${BACKUP_DIR}/garage-export-$(date +%Y%m%d%H%M%S)" log "Creating export pod $pod_name using image $image ..." diff --git a/mock_val/init_kong.sh b/mock_val/init_kong.sh index a8e34f9..3269b95 100755 --- a/mock_val/init_kong.sh +++ b/mock_val/init_kong.sh @@ -5,7 +5,7 @@ set -euo pipefail # init_kong.sh # Purpose: # - Deploy Kong API Gateway (DB-less) into the service namespace -# - Replaces the prole nginx deployment as the API endpoint +# - Replaces the knoe nginx deployment as the API endpoint # - Routes /backup/* to knoe-db-manager # - Creates the kong declarative config as a ConfigMap # - Applies the kong deployment and service manifests @@ -22,21 +22,21 @@ _has_config=0 for _arg in "$@"; do [[ "$_arg" == "-c" || "$_arg" == "--config" || "$_arg" == -c=* || "$_arg" == --config=* ]] && _has_config=1 done -if [[ $_has_config -eq 0 && -f "$SCRIPT_DIR/../conf/prole.cfg" ]]; then - set -- "-c" "$SCRIPT_DIR/../conf/prole.cfg" "$@" +if [[ $_has_config -eq 0 && -f "$SCRIPT_DIR/../conf/knoe.cfg" ]]; then + set -- "-c" "$SCRIPT_DIR/../conf/knoe.cfg" "$@" fi unset _has_config _arg common_core_preparse_config "$@" # shellcheck disable=SC1090 -source "$SCRIPT_DIR/prole_cfg.sh" +source "$SCRIPT_DIR/knoe_cfg.sh" set -- "${COMMON_CORE_ARGS[@]}" common_core_parse_args "$@" -if [[ -z "${PROLE_MODE:-}" ]]; then - export PROLE_MODE="k3s" +if [[ -z "${KNOE_MODE:-}" ]]; then + export KNOE_MODE="k3s" fi if [[ "${COMMON_CORE_HELP:-0}" == 1 ]]; then @@ -54,19 +54,19 @@ ACTION="$COMMON_CORE_ACTION" NAMESPACE="$(common_core_resolve_namespace "default")" common_core_apply_namespace "$NAMESPACE" -PROLE_HOME=${PROLE_HOME:-$(cd "$SCRIPT_DIR/.." && pwd)} +KNOE_HOME=${KNOE_HOME:-$(cd "$SCRIPT_DIR/.." && pwd)} KONG_IMAGE="${KONG_IMAGE:-kong:3.9}" -KONG_NAME="${KONG_NAME:-prole-svc-kong}" +KONG_NAME="${KONG_NAME:-knoe-svc-kong}" KONG_PROXY_PORT="${KONG_PROXY_PORT:-8000}" KONG_ADMIN_PORT="${KONG_ADMIN_PORT:-8001}" -KONG_CONFIG_NAME="${KONG_CONFIG_NAME:-prole-svc-kong-config}" +KONG_CONFIG_NAME="${KONG_CONFIG_NAME:-knoe-svc-kong-config}" -# Public service entrypoint (single source of truth from prole.cfg via prole_cfg.sh) -SERVICE_HOSTNAME="${SERVICE_HOSTNAME:-svc.prole.org}" +# Public service entrypoint (single source of truth from knoe.cfg via knoe_cfg.sh) +SERVICE_HOSTNAME="${SERVICE_HOSTNAME:-svc.knoe.org}" SERVICE_TLS_SECRET_NAME="${SERVICE_TLS_SECRET_NAME:-${SERVICE_HOSTNAME//./-}-tls}" SERVICE_TLS_CLUSTER_ISSUER="${SERVICE_TLS_CLUSTER_ISSUER:-letsencrypt-prod}" -# Legacy: svc-check used to own svc.prole.org. We now route the service hostname +# Legacy: svc-check used to own svc.knoe.org. We now route the service hostname # to Grafana, so remove any leftover svc-check resources to avoid conflicts. SVC_CHECK_NAMESPACE="${SVC_CHECK_NAMESPACE:-svc-check}" @@ -78,12 +78,12 @@ KUBECTL_APPLY_RETRY_DELAY="${KUBECTL_APPLY_RETRY_DELAY:-2}" # Upstream service defaults DB_MANAGER_SERVICE="${DB_MANAGER_SERVICE:-knoe-db-manager}" DB_MANAGER_PORT="${DB_MANAGER_PORT:-80}" -PROLE_SERVICE_UPSTREAM_URL="${PROLE_SERVICE_UPSTREAM_URL:-http://prole-svc.knoe-db.svc.cluster.local:8080}" +KNOE_SERVICE_UPSTREAM_URL="${KNOE_SERVICE_UPSTREAM_URL:-http://knoe-svc.knoe-db.svc.cluster.local:8080}" GRAFANA_UPSTREAM_URL="${GRAFANA_UPSTREAM_URL:-http://kps-grafana.monitoring.svc.cluster.local:80}" usage() { cat <&2 +if [[ -z "${KNOE_SERVICE:-}" ]]; then + echo "ERROR: KNOE_SERVICE is not defined. Provide KNOE_HOME/env.sh or ~/.knoe/env.sh" >&2 exit 1 fi GRAFANA_RELEASE="grafana" -LEGACY_GRAFANA_RELEASE="grafana-prole" +LEGACY_GRAFANA_RELEASE="grafana-knoe" ts() { date "+%Y-%m-%d %H:%M:%S" @@ -95,9 +95,9 @@ choose_monitoring_storage_class() { echo "merlin-local-iscsi" return 0 fi - # Backward compatibility (older runs created prole-monitoring-) - if storage_class_exists "prole-monitoring-d004"; then - echo "prole-monitoring-d004" + # Backward compatibility (older runs created knoe-monitoring-) + if storage_class_exists "knoe-monitoring-d004"; then + echo "knoe-monitoring-d004" return 0 fi local default_sc @@ -135,7 +135,7 @@ monitoring_storage_class_for_role() { } monitoring_nodes_available() { - kubectl get nodes -l "prole.org/node-role=general" -o name 2>/dev/null | grep -q . + kubectl get nodes -l "knoe.org/node-role=general" -o name 2>/dev/null | grep -q . } resolve_monitoring_primary_node() { @@ -144,11 +144,11 @@ resolve_monitoring_primary_node() { printf '%s' "${MONITORING_PRIMARY_NODE}" return 0 fi - if kubectl get node merlin.prole.org >/dev/null 2>&1; then - printf '%s' "merlin.prole.org" + if kubectl get node merlin.knoe.org >/dev/null 2>&1; then + printf '%s' "merlin.knoe.org" return 0 fi - node=$(kubectl get nodes -l "prole.org/node-role=general" -o jsonpath='{.items[0].metadata.name}' 2>/dev/null || true) + node=$(kubectl get nodes -l "knoe.org/node-role=general" -o jsonpath='{.items[0].metadata.name}' 2>/dev/null || true) if [[ -n "${node:-}" ]]; then printf '%s' "$node" return 0 @@ -159,9 +159,9 @@ resolve_monitoring_primary_node() { prepare_k3s_monitoring_data_dirs() { local node="$1" - # NOTE: Historically this came from prole.cfg. For now we pin it to the + # NOTE: Historically this came from knoe.cfg. For now we pin it to the # monitoring deployment default and allow overrides via env var. - local base="${PROLE_MONITORING_DATA_DIR:-/prole/d004}" + local base="${PROLE_MONITORING_DATA_DIR:-/knoe/d004}" base="${base%/}" if [[ -z "${node:-}" ]]; then err "Could not resolve a monitoring node to prepare storage on" @@ -177,7 +177,7 @@ prepare_k3s_monitoring_data_dirs() { local job_ns job_name timeout image job_ns="${MONITORING_DIRPREP_NAMESPACE:-kube-system}" - job_name="${MONITORING_DIRPREP_JOB_NAME:-prole-monitoring-dirprep}" + job_name="${MONITORING_DIRPREP_JOB_NAME:-knoe-monitoring-dirprep}" timeout="${MONITORING_DIRPREP_TIMEOUT:-600s}" image="${MONITORING_DIRPREP_IMAGE:-alpine:3.20}" @@ -256,7 +256,7 @@ apply_k3s_monitoring_local_pvs() { fi local base volume_id sc_base sc_prom sc_am sc_graf - base="${PROLE_MONITORING_DATA_DIR:-/prole/d004}" + base="${PROLE_MONITORING_DATA_DIR:-/knoe/d004}" base="${base%/}" volume_id=$(basename "$base") if [[ -z "${volume_id:-}" || "$volume_id" == "/" || "$volume_id" == "." ]]; then @@ -398,14 +398,14 @@ render_node_selector() { local indent="$1" cat </dev/null 2>&1 || true kubectl -n "$ns" create configmap knoe-db-grafana-dashboard --from-file=knoe-db.json="$tmp" --dry-run=client -o yaml > "$cm_yaml" - kubectl_retry -n "$ns" apply --server-side --field-manager=prole-init-monitoring --force-conflicts -f "$cm_yaml" >/dev/null + kubectl_retry -n "$ns" apply --server-side --field-manager=knoe-init-monitoring --force-conflicts -f "$cm_yaml" >/dev/null kubectl_retry -n "$ns" label configmap knoe-db-grafana-dashboard grafana_dashboard=1 --overwrite >/dev/null rm -f "$tmp" "$cm_yaml" @@ -623,12 +623,12 @@ apply_grafana_datasource() { apiVersion: v1 kind: ConfigMap metadata: - name: prole-grafana-datasource + name: knoe-grafana-datasource namespace: ${ns} labels: grafana_datasource: "1" data: - prole-prometheus-datasource.yaml: | + knoe-prometheus-datasource.yaml: | apiVersion: 1 datasources: - name: Prometheus @@ -640,7 +640,7 @@ data: editable: false EOF - kubectl_retry -n "$ns" apply --server-side --field-manager=prole-init-monitoring --force-conflicts -f "$cm_yaml" >/dev/null + kubectl_retry -n "$ns" apply --server-side --field-manager=knoe-init-monitoring --force-conflicts -f "$cm_yaml" >/dev/null rm -f "$cm_yaml" } @@ -890,17 +890,17 @@ openbao_url() { echo "$PROLE_OPENBAO_URL" return 0 fi - if prole_is_in_cluster; then + if knoe_is_in_cluster; then echo "http://openbao.${SERVICE_NAMESPACE:-${NAMESPACE:-default}}.svc.cluster.local:8200" return 0 fi # In k3s mode, scripts run outside the cluster must reach OpenBao via the k3s host # (never via localhost or kubectl port-forward). - if [[ "${PROLE_MODE:-${DEPLOYMENT_MODE:-}}" == "k3s" ]]; then - if command -v _prole_host_from_url >/dev/null 2>&1; then + if [[ "${KNOE_MODE:-${DEPLOYMENT_MODE:-}}" == "k3s" ]]; then + if command -v _knoe_host_from_url >/dev/null 2>&1; then local host - host=$(_prole_host_from_url "${PROLE_K3S_SERVER:-${K3S_SERVER_URL:-}}") + host=$(_knoe_host_from_url "${PROLE_K3S_SERVER:-${K3S_SERVER_URL:-}}") if [[ -n "${host:-}" ]]; then echo "http://${host}:8200" return 0 @@ -919,8 +919,8 @@ openbao_url() { } openbao_token() { - if [[ -f "$PROLE_SERVICE/secrets/openbao-root-token" ]]; then - cat "$PROLE_SERVICE/secrets/openbao-root-token" + if [[ -f "$KNOE_SERVICE/secrets/openbao-root-token" ]]; then + cat "$KNOE_SERVICE/secrets/openbao-root-token" else echo "${OPENBAO_ROOT_TOKEN:-}" fi @@ -940,18 +940,18 @@ fetch_openbao_secret() { } resolve_grafana_password() { - if [[ -z "${GRAFANA_ADMIN_PASSWORD:-}" || "${GRAFANA_ADMIN_PASSWORD}" == '${OPENBAO:'* || "${GRAFANA_ADMIN_PASSWORD}" == '${PROLE_SECRET:'* ]]; then + if [[ -z "${GRAFANA_ADMIN_PASSWORD:-}" || "${GRAFANA_ADMIN_PASSWORD}" == '${OPENBAO:'* || "${GRAFANA_ADMIN_PASSWORD}" == '${KNOE_SECRET:'* ]]; then local fetched - fetched=$(fetch_openbao_secret "prole/${NAMESPACE:-default}/monitoring" "grafana_admin_password") + fetched=$(fetch_openbao_secret "knoe/${NAMESPACE:-default}/monitoring" "grafana_admin_password") if [[ -n "$fetched" && "$fetched" != "null" ]]; then GRAFANA_ADMIN_PASSWORD="$fetched" fi fi - if [[ -z "${GRAFANA_ADMIN_PASSWORD:-}" || "${GRAFANA_ADMIN_PASSWORD}" == '${OPENBAO:'* || "${GRAFANA_ADMIN_PASSWORD}" == '${PROLE_SECRET:'* ]]; then + if [[ -z "${GRAFANA_ADMIN_PASSWORD:-}" || "${GRAFANA_ADMIN_PASSWORD}" == '${OPENBAO:'* || "${GRAFANA_ADMIN_PASSWORD}" == '${KNOE_SECRET:'* ]]; then local db_pw="${DB_PASSWORD:-}" - if [[ -z "$db_pw" || "$db_pw" == '${OPENBAO:'* || "$db_pw" == '${PROLE_SECRET:'* ]]; then + if [[ -z "$db_pw" || "$db_pw" == '${OPENBAO:'* || "$db_pw" == '${KNOE_SECRET:'* ]]; then local fetched_db - fetched_db=$(fetch_openbao_secret "prole/${NAMESPACE:-default}/db" "password") + fetched_db=$(fetch_openbao_secret "knoe/${NAMESPACE:-default}/db" "password") if [[ -n "$fetched_db" && "$fetched_db" != "null" ]]; then db_pw="$fetched_db" fi @@ -961,7 +961,7 @@ resolve_grafana_password() { fi fi # Strip any trailing newlines/carriage-returns that may have crept in via - # prole.cfg parsing, file reads, or shell substitution edge-cases. + # knoe.cfg parsing, file reads, or shell substitution edge-cases. local _pw _pw="${GRAFANA_ADMIN_PASSWORD:-}" _pw="${_pw//$'\n'/}" @@ -980,7 +980,7 @@ write_grafana_password_to_openbao() { _clean_grafana_pw="${GRAFANA_ADMIN_PASSWORD//$'\n'/}" _clean_grafana_pw="${_clean_grafana_pw//$'\r'/}" curl -sS -H "X-Vault-Token: $token" -H 'Content-Type: application/json' \ - -X POST "$url/v1/kv/data/prole/${NAMESPACE:-default}/monitoring" \ + -X POST "$url/v1/kv/data/knoe/${NAMESPACE:-default}/monitoring" \ -d "{\"data\":{\"grafana_admin_password\":\"$_clean_grafana_pw\"}}" >/dev/null || true } @@ -1041,14 +1041,14 @@ install_monitoring() { log "Helm release status: kps=$(helm_release_status kps "$monitoring_ns"), grafana=$(helm_release_status "$GRAFANA_RELEASE" "$monitoring_ns")" local mode - mode="${PROLE_MODE:-${DEPLOYMENT_MODE:-}}" + mode="${KNOE_MODE:-${DEPLOYMENT_MODE:-}}" # For k3s service clusters using local PVs, ensure the backing host directories # exist before applying StorageClass/PV manifests. apply_k3s_monitoring_local_pvs "$mode" if ! monitoring_nodes_available; then - err "No nodes labeled prole.org/node-role=general; monitoring requires general nodes." + err "No nodes labeled knoe.org/node-role=general; monitoring requires general nodes." return 2 fi @@ -1319,12 +1319,12 @@ EOF kubectl rollout restart deployment/kps-grafana -n "$monitoring_ns" 2>/dev/null || true kubectl rollout status deployment/kps-grafana -n "$monitoring_ns" --timeout=60s 2>/dev/null || true - log "Applying Prole Grafana dashboard..." + log "Applying Knoe Grafana dashboard..." apply_grafana_dashboard "$monitoring_ns" # Register port forwards - prole_register_port_forward "prometheus" "$monitoring_ns" "svc/kps-kube-prometheus-stack-prometheus" "9090" "9090" "127.0.0.1" "TCP" "Prometheus" - prole_register_port_forward "grafana" "$monitoring_ns" "svc/kps-grafana" "3000" "80" "0.0.0.0" "TCP" "Grafana" + knoe_register_port_forward "prometheus" "$monitoring_ns" "svc/kps-kube-prometheus-stack-prometheus" "9090" "9090" "127.0.0.1" "TCP" "Prometheus" + knoe_register_port_forward "grafana" "$monitoring_ns" "svc/kps-grafana" "3000" "80" "0.0.0.0" "TCP" "Grafana" } check_monitoring_status() { diff --git a/mock_val/init_nginx_ingress.sh b/mock_val/init_nginx_ingress.sh index ef3b1f1..3eac64d 100755 --- a/mock_val/init_nginx_ingress.sh +++ b/mock_val/init_nginx_ingress.sh @@ -3,7 +3,7 @@ set -euo pipefail SCRIPT_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) # shellcheck disable=SC1090 -source "$SCRIPT_DIR/prole_cfg.sh" +source "$SCRIPT_DIR/knoe_cfg.sh" usage() { cat </dev/null 2>&1; then - MODE=$(prole_normalize_mode "$MODE") +MODE="${MODE_OVERRIDE:-${KNOE_MODE:-${DEPLOYMENT_MODE:-${CLUSTER_ENV:-}}}}" +if command -v knoe_normalize_mode >/dev/null 2>&1; then + MODE=$(knoe_normalize_mode "$MODE") fi if [[ -n "$MODE" && "$MODE" != "k3d" ]]; then @@ -60,13 +60,13 @@ if [[ -n "$MODE" && "$MODE" != "k3d" ]]; then exit 0 fi -prole_ensure_kubeconfig >/dev/null 2>&1 || true -prole_ensure_kube_context || exit 1 +knoe_ensure_kubeconfig >/dev/null 2>&1 || true +knoe_ensure_kube_context || exit 1 PORT_MAPPING_FILE_PATH="${PORT_MAPPING_FILE:-}" if [[ -z "$PORT_MAPPING_FILE_PATH" ]]; then - if [[ -n "${PROLE_CONF:-}" && -f "$PROLE_CONF/port-mapping.cfg" ]]; then - PORT_MAPPING_FILE_PATH="$PROLE_CONF/port-mapping.cfg" + if [[ -n "${KNOE_CONF:-}" && -f "$KNOE_CONF/port-mapping.cfg" ]]; then + PORT_MAPPING_FILE_PATH="$KNOE_CONF/port-mapping.cfg" elif [[ -f "$SCRIPT_DIR/../conf/port-mapping.cfg" ]]; then PORT_MAPPING_FILE_PATH="$SCRIPT_DIR/../conf/port-mapping.cfg" fi @@ -81,7 +81,7 @@ if [[ -z "$PORT_MAPPING_FILE_PATH" || ! -f "$PORT_MAPPING_FILE_PATH" ]]; then fi trim() { - _prole_trim "$1" + _knoe_trim "$1" } # Parse legacy conf/port-mapping.cfg style entries. diff --git a/mock_val/init_ollama.sh b/mock_val/init_ollama.sh index 0661fe4..b623da0 100644 --- a/mock_val/init_ollama.sh +++ b/mock_val/init_ollama.sh @@ -5,9 +5,9 @@ SCRIPT_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) PROJECT_ROOT=$(cd "$SCRIPT_DIR/.." && pwd) # Load config/environment defaults if available -if [[ -f "$SCRIPT_DIR/prole_cfg.sh" ]]; then +if [[ -f "$SCRIPT_DIR/knoe_cfg.sh" ]]; then # shellcheck disable=SC1090 - source "$SCRIPT_DIR/prole_cfg.sh" + source "$SCRIPT_DIR/knoe_cfg.sh" fi action="${1:-scan}" @@ -28,7 +28,7 @@ Usage: $0 [scan|configure] [options] Options: --host Explicit host (optionally host:port) --port Default port (default: ${DEFAULT_PORT}) - --hosts-file Hosts file to scan (default: PROLE_CONF/hosts.txt or etc/hosts.txt) + --hosts-file Hosts file to scan (default: KNOE_CONF/hosts.txt or etc/hosts.txt) --timeout Curl timeout (default: ${timeout}) --max-hosts Max hosts to probe (default: ${max_hosts}) --model Preferred model (configure action) @@ -150,8 +150,8 @@ if [[ -n "${OLLAMA_CANDIDATES:-}" ]]; then fi if [[ -z "$hosts_file" ]]; then - if [[ -n "${PROLE_CONF:-}" && -f "$PROLE_CONF/hosts.txt" ]]; then - hosts_file="$PROLE_CONF/hosts.txt" + if [[ -n "${KNOE_CONF:-}" && -f "$KNOE_CONF/hosts.txt" ]]; then + hosts_file="$KNOE_CONF/hosts.txt" elif [[ -f "$SCRIPT_DIR/hosts.txt" ]]; then hosts_file="$SCRIPT_DIR/hosts.txt" elif [[ -f "$PROJECT_ROOT/etc/hosts.txt" ]]; then diff --git a/mock_val/init_openbao.sh b/mock_val/init_openbao.sh index 3b13a78..0705a8b 100755 --- a/mock_val/init_openbao.sh +++ b/mock_val/init_openbao.sh @@ -20,21 +20,21 @@ _has_config=0 for _arg in "$@"; do [[ "$_arg" == "-c" || "$_arg" == "--config" || "$_arg" == -c=* || "$_arg" == --config=* ]] && _has_config=1 done -if [[ $_has_config -eq 0 && -f "$SCRIPT_DIR/../conf/prole.cfg" ]]; then - set -- "-c" "$SCRIPT_DIR/../conf/prole.cfg" "$@" +if [[ $_has_config -eq 0 && -f "$SCRIPT_DIR/../conf/knoe.cfg" ]]; then + set -- "-c" "$SCRIPT_DIR/../conf/knoe.cfg" "$@" fi unset _has_config _arg common_core_preparse_config "$@" # shellcheck disable=SC1090 -source "$SCRIPT_DIR/prole_cfg.sh" +source "$SCRIPT_DIR/knoe_cfg.sh" set -- "${COMMON_CORE_ARGS[@]}" common_core_parse_args "$@" -if [[ -z "${PROLE_MODE:-}" ]]; then - export PROLE_MODE="k3s" +if [[ -z "${KNOE_MODE:-}" ]]; then + export KNOE_MODE="k3s" fi if [[ "${COMMON_CORE_HELP:-0}" == 1 ]]; then @@ -53,8 +53,8 @@ ACTION="$COMMON_CORE_ACTION" NAMESPACE="$(common_core_resolve_namespace "default")" common_core_apply_namespace "$NAMESPACE" -if [[ -z "${PROLE_SERVICE:-}" ]]; then - echo "ERROR: PROLE_SERVICE is not defined. Provide PROLE_HOME/env.sh or ~/.prole/env.sh" >&2 +if [[ -z "${KNOE_SERVICE:-}" ]]; then + echo "ERROR: KNOE_SERVICE is not defined. Provide KNOE_HOME/env.sh or ~/.knoe/env.sh" >&2 exit 1 fi @@ -64,18 +64,18 @@ OPENBAO_IMAGE=${OPENBAO_IMAGE:-ghcr.io/openbao/openbao:latest} OPENBAO_PORT_FORWARD_LOCAL=${OPENBAO_PORT_FORWARD_LOCAL:-8200} OPENBAO_PF_ADDR="${OPENBAO_PF_ADDR:-}" if [[ -z "$OPENBAO_PF_ADDR" ]]; then - if [[ "${PROLE_MODE:-}" == "k3s" ]]; then + if [[ "${KNOE_MODE:-}" == "k3s" ]]; then OPENBAO_PF_ADDR="0.0.0.0" else OPENBAO_PF_ADDR="127.0.0.1" fi fi -# Support both PROLE_HOME/k8s and sibling k8s directory +# Support both KNOE_HOME/k8s and sibling k8s directory if [[ -d "$SCRIPT_DIR/../k8s/openbao" ]]; then OPENBAO_MANIFEST_DIR="$SCRIPT_DIR/../k8s/openbao" -elif [[ -n "${PROLE_HOME:-}" && -d "$PROLE_HOME/k8s/openbao" ]]; then - OPENBAO_MANIFEST_DIR="$PROLE_HOME/k8s/openbao" +elif [[ -n "${KNOE_HOME:-}" && -d "$KNOE_HOME/k8s/openbao" ]]; then + OPENBAO_MANIFEST_DIR="$KNOE_HOME/k8s/openbao" else OPENBAO_MANIFEST_DIR="$SCRIPT_DIR/../k8s/openbao" fi @@ -87,11 +87,11 @@ KRB5_KDC=${KRB5_KDC:-kdc.$DOMAIN} KRB5_ADMIN=${KRB5_ADMIN:-} # Secrets and token locations -# Use PROLE_SERVICE if writable locally, otherwise fallback to ~/.prole -if [[ -n "${PROLE_SERVICE:-}" ]] && _prole_usable_dir "${PROLE_SERVICE}/secrets" >/dev/null; then - SECRETS_DIR="$PROLE_SERVICE/secrets" +# Use KNOE_SERVICE if writable locally, otherwise fallback to ~/.knoe +if [[ -n "${KNOE_SERVICE:-}" ]] && _knoe_usable_dir "${KNOE_SERVICE}/secrets" >/dev/null; then + SECRETS_DIR="$KNOE_SERVICE/secrets" else - SECRETS_DIR="$HOME/.prole/etc/secrets" + SECRETS_DIR="$HOME/.knoe/etc/secrets" fi mkdir -p "$SECRETS_DIR" admin_key_priv="$SECRETS_DIR/admin_ed25519.key" @@ -100,13 +100,13 @@ root_token_file="$SECRETS_DIR/openbao-root-token" OPENBAO_NAMESPACE=${OPENBAO_NAMESPACE:-${SERVICE_NAMESPACE:-${NAMESPACE:-default}}} # OpenBao resources (StatefulSet/Service) live in `OPENBAO_NAMESPACE` (usually the service namespace), -# but secret *paths* must be keyed by the Prole workload namespace from `conf/prole.cfg` so that -# `${OPENBAO:kv/prole//...}` references resolve consistently across scripts. +# but secret *paths* must be keyed by the Knoe workload namespace from `conf/knoe.cfg` so that +# `${OPENBAO:kv/knoe//...}` references resolve consistently across scripts. OPENBAO_PATH_NAMESPACE=${OPENBAO_PATH_NAMESPACE:-${PROLE_NAMESPACE:-${NAMESPACE:-default}}} OPENBAO_RESOURCE_NAMESPACE="$OPENBAO_NAMESPACE" BAO_NAMESPACE="${OPENBAO_PATH_NAMESPACE:-default}" -BAO_PATH_PREFIX="prole/${BAO_NAMESPACE}" +BAO_PATH_PREFIX="knoe/${BAO_NAMESPACE}" BAO_PATH_ADMIN="${BAO_PATH_PREFIX}/admin" BAO_PATH_USER="${BAO_PATH_PREFIX}/user" BAO_PATH_DB="${BAO_PATH_PREFIX}/db" @@ -225,14 +225,14 @@ bao_service_url() { return 0 fi - if [[ "${PROLE_MODE:-}" == "k3s" ]]; then - if prole_is_in_cluster; then + if [[ "${KNOE_MODE:-}" == "k3s" ]]; then + if knoe_is_in_cluster; then echo "http://openbao.${OPENBAO_RESOURCE_NAMESPACE}.svc.cluster.local:8200" return 0 fi # Use k3s server host if available local k3s_host - k3s_host=$(_prole_host_from_url "${PROLE_K3S_SERVER:-}") + k3s_host=$(_knoe_host_from_url "${PROLE_K3S_SERVER:-}") if [[ -n "$k3s_host" ]]; then echo "http://${k3s_host}:${OPENBAO_PORT_FORWARD_LOCAL:-8200}" return 0 @@ -280,7 +280,7 @@ EOF # Use PRIMARY_SERVICE_NAMESPACE if skipping deployment (we port-forward to the common svc) start_openbao_port_forward() { # In k3s mode we should never rely on local kubectl port-forwards. - if [[ "${PROLE_MODE:-}" == "k3s" ]]; then + if [[ "${KNOE_MODE:-}" == "k3s" ]]; then return 1 fi @@ -345,7 +345,7 @@ detect_openbao_root_token() { local file for file in "$OPENBAO_MANIFEST_DIR/deployment.yaml" \ "$OPENBAO_MANIFEST_DIR/statefulset.yaml" \ - "$SCRIPT_DIR/../k8s/prole/openbao-statefulset.yaml"; do + "$SCRIPT_DIR/../k8s/knoe/openbao-statefulset.yaml"; do if [[ -f "$file" ]]; then token=$(grep -Eo 'dev-root-token-id=[^" ]+' "$file" 2>/dev/null | head -n1 | cut -d= -f2 || true) if [[ -z "$token" ]]; then @@ -386,7 +386,7 @@ generate_kerberos_configmap() { apiVersion: v1 kind: ConfigMap metadata: - name: prole-krb5-conf + name: knoe-krb5-conf namespace: $OPENBAO_RESOURCE_NAMESPACE data: krb5.conf: | @@ -419,26 +419,26 @@ should_apply_kerberos_configmap() { apply_k8s() { echo "Applying OpenBao manifest to namespace '$OPENBAO_RESOURCE_NAMESPACE' ..." local use_statefulset=0 - if [[ "${PROLE_MODE:-}" != "k3d" && -f "$SCRIPT_DIR/../k8s/prole/openbao-statefulset.yaml" ]]; then + if [[ "${KNOE_MODE:-}" != "k3d" && -f "$SCRIPT_DIR/../k8s/knoe/openbao-statefulset.yaml" ]]; then use_statefulset=1 fi if [[ "$use_statefulset" == "1" ]]; then # Ensure storage class and PVs exist for k3s - if [[ -f "$SCRIPT_DIR/../k8s/prole/storageclass-synology-iscsi.yaml" ]]; then + if [[ -f "$SCRIPT_DIR/../k8s/knoe/storageclass-synology-iscsi.yaml" ]]; then echo "Applying StorageClass 'synology-iscsi' ..." - kubectl apply -f "$SCRIPT_DIR/../k8s/prole/storageclass-synology-iscsi.yaml" + kubectl apply -f "$SCRIPT_DIR/../k8s/knoe/storageclass-synology-iscsi.yaml" fi - if [[ -f "$SCRIPT_DIR/../k8s/prole/iscsi-pvs.yaml" ]]; then + if [[ -f "$SCRIPT_DIR/../k8s/knoe/iscsi-pvs.yaml" ]]; then echo "Applying iSCSI PersistentVolumes ..." - kubectl apply -f "$SCRIPT_DIR/../k8s/prole/iscsi-pvs.yaml" + kubectl apply -f "$SCRIPT_DIR/../k8s/knoe/iscsi-pvs.yaml" fi local output="" - if output=$(prole_render_manifest "$SCRIPT_DIR/../k8s/prole/openbao-statefulset.yaml" \ + if output=$(knoe_render_manifest "$SCRIPT_DIR/../k8s/knoe/openbao-statefulset.yaml" \ | kubectl apply --validate=false -n "$OPENBAO_RESOURCE_NAMESPACE" -f - 2>&1); then printf '%s\n' "$output" else - if [[ "${PROLE_MODE:-}" == "k3d" && "$output" == *"updates to statefulset spec"* ]]; then + if [[ "${KNOE_MODE:-}" == "k3d" && "$output" == *"updates to statefulset spec"* ]]; then echo "WARN: OpenBao StatefulSet immutable in k3d; skipping apply." else echo "$output" >&2 @@ -446,16 +446,16 @@ apply_k8s() { fi fi # Always apply the Service manifest, then enforce the desired exposure mode. - prole_render_manifest "$SCRIPT_DIR/../k8s/prole/openbao-service.yaml" | kubectl apply --validate=false -n "$OPENBAO_RESOURCE_NAMESPACE" -f - + knoe_render_manifest "$SCRIPT_DIR/../k8s/knoe/openbao-service.yaml" | kubectl apply --validate=false -n "$OPENBAO_RESOURCE_NAMESPACE" -f - - if [[ "${PROLE_MODE:-}" == "k3s" ]]; then + if [[ "${KNOE_MODE:-}" == "k3s" ]]; then # Expose OpenBao externally in k3s (no kubectl port-forward). k3s `servicelb` will bind this # on the node, making it reachable from the installer host. kubectl patch svc "$OPENBAO_NAME" -n "$OPENBAO_RESOURCE_NAMESPACE" --type merge \ -p '{"spec":{"type":"LoadBalancer"}}' >/dev/null 2>&1 || true fi else - prole_render_manifest "$OPENBAO_MANIFEST_DIR/deployment.yaml" | kubectl apply --validate=false -n "$OPENBAO_RESOURCE_NAMESPACE" -f - + knoe_render_manifest "$OPENBAO_MANIFEST_DIR/deployment.yaml" | kubectl apply --validate=false -n "$OPENBAO_RESOURCE_NAMESPACE" -f - fi if should_apply_kerberos_configmap && [[ -f "$OPENBAO_MANIFEST_DIR/kerberos-configmap.yaml" ]]; then echo "Applying Kerberos ConfigMap (external realm) to namespace '$OPENBAO_RESOURCE_NAMESPACE' ..." @@ -464,7 +464,7 @@ apply_k8s() { } k3d_cleanup_pending_openbao_pvc() { - if [[ "${PROLE_MODE:-}" != "k3d" ]]; then + if [[ "${KNOE_MODE:-}" != "k3d" ]]; then return 0 fi if ! kubectl get pvc data-openbao-0 -n "$OPENBAO_RESOURCE_NAMESPACE" >/dev/null 2>&1; then @@ -483,7 +483,7 @@ k3d_cleanup_pending_openbao_pvc() { fi } -recycle_released_prole_iscsi_pv_for_pvc() { +recycle_released_knoe_iscsi_pv_for_pvc() { # StorageClass `synology-iscsi` uses `Retain` PV reclaim policy. On restart, PVs can remain # in `Released` with a stale `claimRef`, which prevents a same-named PVC from binding. local ns="$1" @@ -544,13 +544,13 @@ wait_for_openbao() { if kubectl get statefulset/$OPENBAO_NAME -n "$wait_ns" >/dev/null 2>&1; then if ! kubectl rollout status statefulset/$OPENBAO_NAME -n "$wait_ns" --timeout="$initial_timeout"; then echo "WARN: OpenBao not ready after $initial_timeout; checking for Released synology-iscsi PVs with stale claimRefs ..." >&2 - recycle_released_prole_iscsi_pv_for_pvc "$wait_ns" "data-openbao-0" || true + recycle_released_knoe_iscsi_pv_for_pvc "$wait_ns" "data-openbao-0" || true fi kubectl rollout status statefulset/$OPENBAO_NAME -n "$wait_ns" --timeout=${ROLLOUT_TIMEOUT:-300s} else if ! kubectl rollout status deploy/$OPENBAO_NAME -n "$wait_ns" --timeout="$initial_timeout"; then echo "WARN: OpenBao not ready after $initial_timeout; checking for Released synology-iscsi PVs with stale claimRefs ..." >&2 - recycle_released_prole_iscsi_pv_for_pvc "$wait_ns" "data-openbao-0" || true + recycle_released_knoe_iscsi_pv_for_pvc "$wait_ns" "data-openbao-0" || true fi kubectl rollout status deploy/$OPENBAO_NAME -n "$wait_ns" --timeout=${ROLLOUT_TIMEOUT:-300s} fi @@ -628,13 +628,13 @@ init_openbao_kv_and_store_admin_key() { fi # Store User SSH keys if they exist - local user_key_priv="$HOME/.ssh/id_prole_ed25519" - local user_key_pub="$HOME/.ssh/id_prole_ed25519.pub" + local user_key_priv="$HOME/.ssh/id_knoe_ed25519" + local user_key_pub="$HOME/.ssh/id_knoe_ed25519.pub" if [[ -f "$user_key_priv" && -f "$user_key_pub" ]]; then local u_priv u_pub u_priv=$(base64 <"$user_key_priv" | tr -d '\n') u_pub=$(base64 <"$user_key_pub" | tr -d '\n') - local username=${KNOE_DB_USER:-"prole"} + local username=${KNOE_DB_USER:-"knoe"} echo "Writing user SSH keys for '$username' to kv/$BAO_PATH_USER ..." curl -sS -H "X-Vault-Token: $token" -H 'Content-Type: application/json' \ @@ -644,7 +644,7 @@ init_openbao_kv_and_store_admin_key() { fi if [[ -n "$db_pass" ]]; then - local username=${KNOE_DB_USER:-"prole"} + local username=${KNOE_DB_USER:-"knoe"} echo "Writing database user password for '$username' to kv/$BAO_PATH_DB ..." curl -sS -H "X-Vault-Token: $token" -H 'Content-Type: application/json' \ -X POST "$svc/v1/kv/data/$BAO_PATH_DB" \ @@ -775,8 +775,8 @@ cmd_status() { ok=1 fi fi - if kubectl -n "$OPENBAO_RESOURCE_NAMESPACE" get configmap prole-krb5-conf >/dev/null 2>&1; then - echo "[OK] Kerberos ConfigMap 'prole-krb5-conf' present" + if kubectl -n "$OPENBAO_RESOURCE_NAMESPACE" get configmap knoe-krb5-conf >/dev/null 2>&1; then + echo "[OK] Kerberos ConfigMap 'knoe-krb5-conf' present" fi fi @@ -866,8 +866,8 @@ case "$ACTION" in if should_skip_deployment; then pf_ns="$PRIMARY_SERVICE_NAMESPACE" fi - if [[ "${PROLE_MODE:-}" != "k3s" ]]; then - prole_register_port_forward "openbao" "$pf_ns" "svc/openbao" "${OPENBAO_PORT_FORWARD_LOCAL}" "8200" "${OPENBAO_PF_ADDR}" "TCP" "OpenBao" + if [[ "${KNOE_MODE:-}" != "k3s" ]]; then + knoe_register_port_forward "openbao" "$pf_ns" "svc/openbao" "${OPENBAO_PORT_FORWARD_LOCAL}" "8200" "${OPENBAO_PF_ADDR}" "TCP" "OpenBao" fi ;; status) @@ -917,7 +917,7 @@ case "$ACTION" in fi ensure_admin_keypair - if [[ "${PROLE_MODE:-}" == "k3s" ]]; then + if [[ "${KNOE_MODE:-}" == "k3s" ]]; then # In k3s, initialize against the externally reachable endpoint (no port-forward). svc_url="$(bao_service_url)" wait_for_openbao_http 40 "$svc_url" @@ -939,8 +939,8 @@ case "$ACTION" in if should_skip_deployment; then pf_ns="$PRIMARY_SERVICE_NAMESPACE" fi - if [[ "${PROLE_MODE:-}" != "k3s" ]]; then - prole_register_port_forward "openbao" "$pf_ns" "svc/openbao" "${OPENBAO_PORT_FORWARD_LOCAL}" "8200" "${OPENBAO_PF_ADDR}" "TCP" "OpenBao" + if [[ "${KNOE_MODE:-}" != "k3s" ]]; then + knoe_register_port_forward "openbao" "$pf_ns" "svc/openbao" "${OPENBAO_PORT_FORWARD_LOCAL}" "8200" "${OPENBAO_PF_ADDR}" "TCP" "OpenBao" fi echo "Initialization complete. OpenBao available at $(bao_service_url)" ;; @@ -963,8 +963,8 @@ case "$ACTION" in if should_skip_deployment; then pf_ns="$PRIMARY_SERVICE_NAMESPACE" fi - if [[ "${PROLE_MODE:-}" != "k3s" ]]; then - prole_register_port_forward "openbao" "$pf_ns" "svc/openbao" "${OPENBAO_PORT_FORWARD_LOCAL}" "8200" "${OPENBAO_PF_ADDR}" "TCP" "OpenBao" + if [[ "${KNOE_MODE:-}" != "k3s" ]]; then + knoe_register_port_forward "openbao" "$pf_ns" "svc/openbao" "${OPENBAO_PORT_FORWARD_LOCAL}" "8200" "${OPENBAO_PF_ADDR}" "TCP" "OpenBao" fi echo "Re-applied manifests." ;; diff --git a/mock_val/init_opentofu.sh b/mock_val/init_opentofu.sh index a5ee671..e33689b 100755 --- a/mock_val/init_opentofu.sh +++ b/mock_val/init_opentofu.sh @@ -5,7 +5,7 @@ set -euo pipefail # init_opentofu.sh # Purpose: # - Deploy OpenTofu control plane into Kubernetes -# - Configure admin access using the Prole DB root password +# - Configure admin access using the Knoe DB root password SCRIPT_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) @@ -16,7 +16,7 @@ source "$SCRIPT_DIR/common_core_lib.sh" common_core_preparse_config "$@" # shellcheck disable=SC1090 -source "$SCRIPT_DIR/prole_cfg.sh" +source "$SCRIPT_DIR/knoe_cfg.sh" set -- "${COMMON_CORE_ARGS[@]}" common_core_parse_args "$@" @@ -36,8 +36,8 @@ ACTION="$COMMON_CORE_ACTION" NAMESPACE="$(common_core_resolve_namespace "default")" common_core_apply_namespace "$NAMESPACE" -if [[ -z "${PROLE_SERVICE:-}" ]]; then - echo "ERROR: PROLE_SERVICE is not defined. Provide PROLE_HOME/env.sh or ~/.prole/env.sh" >&2 +if [[ -z "${KNOE_SERVICE:-}" ]]; then + echo "ERROR: KNOE_SERVICE is not defined. Provide KNOE_HOME/env.sh or ~/.knoe/env.sh" >&2 exit 1 fi @@ -47,8 +47,8 @@ OPENTOFU_ADMIN_PASSWORD_SOURCE=${OPENTOFU_ADMIN_PASSWORD_SOURCE:-} if [[ -d "$SCRIPT_DIR/../k8s/opentofu" ]]; then OPENTOFU_MANIFEST_DIR="$SCRIPT_DIR/../k8s/opentofu" -elif [[ -n "${PROLE_HOME:-}" && -d "$PROLE_HOME/k8s/opentofu" ]]; then - OPENTOFU_MANIFEST_DIR="$PROLE_HOME/k8s/opentofu" +elif [[ -n "${KNOE_HOME:-}" && -d "$KNOE_HOME/k8s/opentofu" ]]; then + OPENTOFU_MANIFEST_DIR="$KNOE_HOME/k8s/opentofu" else OPENTOFU_MANIFEST_DIR="$SCRIPT_DIR/../k8s/opentofu" fi @@ -75,17 +75,17 @@ openbao_url() { echo "$PROLE_OPENBAO_URL" return 0 fi - if prole_is_in_cluster; then + if knoe_is_in_cluster; then echo "http://openbao.${OPENTOFU_OPENBAO_NAMESPACE}.svc.cluster.local:8200" return 0 fi # In k3s mode, scripts run outside the cluster must reach OpenBao via the k3s host # (never via localhost or kubectl port-forward). - if [[ "${PROLE_MODE:-${DEPLOYMENT_MODE:-}}" == "k3s" ]]; then - if command -v _prole_host_from_url >/dev/null 2>&1; then + if [[ "${KNOE_MODE:-${DEPLOYMENT_MODE:-}}" == "k3s" ]]; then + if command -v _knoe_host_from_url >/dev/null 2>&1; then local host - host=$(_prole_host_from_url "${PROLE_K3S_SERVER:-${K3S_SERVER_URL:-}}") + host=$(_knoe_host_from_url "${PROLE_K3S_SERVER:-${K3S_SERVER_URL:-}}") if [[ -n "${host:-}" ]]; then echo "http://${host}:8200" return 0 @@ -104,8 +104,8 @@ openbao_url() { } openbao_token() { - if [[ -f "$PROLE_SERVICE/secrets/openbao-root-token" ]]; then - cat "$PROLE_SERVICE/secrets/openbao-root-token" + if [[ -f "$KNOE_SERVICE/secrets/openbao-root-token" ]]; then + cat "$KNOE_SERVICE/secrets/openbao-root-token" else echo "${OPENBAO_ROOT_TOKEN:-}" fi @@ -126,7 +126,7 @@ fetch_openbao_secret() { is_anchor() { case "${1:-}" in - '${OPENBAO:'*|'${PROLE_SECRET:'*) return 0 ;; + '${OPENBAO:'*|'${KNOE_SECRET:'*) return 0 ;; *) return 1 ;; esac } @@ -149,7 +149,7 @@ resolve_admin_password() { if [[ -z "${OPENTOFU_ADMIN_PASSWORD:-}" ]] || is_anchor "${OPENTOFU_ADMIN_PASSWORD:-}"; then local fetched - fetched=$(fetch_openbao_secret "prole/${OPENTOFU_SECRET_NAMESPACE:-default}/db" "password") + fetched=$(fetch_openbao_secret "knoe/${OPENTOFU_SECRET_NAMESPACE:-default}/db" "password") if [[ -n "$fetched" && "$fetched" != "null" ]]; then OPENTOFU_ADMIN_PASSWORD="$fetched" OPENTOFU_ADMIN_PASSWORD_SOURCE="openbao" @@ -171,8 +171,8 @@ resolve_admin_password() { # Last resort: generate a temporary password (will be overwritten later when user input becomes available). if [[ -z "${OPENTOFU_ADMIN_PASSWORD:-}" ]]; then - if declare -F prole_generate_password >/dev/null 2>&1; then - OPENTOFU_ADMIN_PASSWORD="$(prole_generate_password 32)" + if declare -F knoe_generate_password >/dev/null 2>&1; then + OPENTOFU_ADMIN_PASSWORD="$(knoe_generate_password 32)" else OPENTOFU_ADMIN_PASSWORD="$(openssl rand -base64 24 2>/dev/null | tr -d '\n' | tr '+/' '-_' | tr -d '=' | head -c 32)" fi @@ -244,7 +244,7 @@ ensure_opentofu_secret() { apply_k8s() { echo "Applying OpenTofu manifest to namespace '$OPENTOFU_NAMESPACE' ..." - prole_render_manifest "$OPENTOFU_MANIFEST_DIR/deployment.yaml" | kubectl apply -n "$OPENTOFU_NAMESPACE" -f - + knoe_render_manifest "$OPENTOFU_MANIFEST_DIR/deployment.yaml" | kubectl apply -n "$OPENTOFU_NAMESPACE" -f - kubectl rollout status deploy/$OPENTOFU_NAME -n "$OPENTOFU_NAMESPACE" --timeout=${ROLLOUT_TIMEOUT:-300s} || true } @@ -283,7 +283,7 @@ case "${ACTION:-}" in ensure_opentofu_secret fi apply_k8s - prole_register_port_forward "opentofu" "${OPENTOFU_NAMESPACE:-default}" "svc/opentofu" "8080" "8080" "0.0.0.0" "TCP" "OpenTofu" + knoe_register_port_forward "opentofu" "${OPENTOFU_NAMESPACE:-default}" "svc/opentofu" "8080" "8080" "0.0.0.0" "TCP" "OpenTofu" ;; stop) ensure_tools diff --git a/mock_val/init_port_forwards.sh b/mock_val/init_port_forwards.sh index d76e874..8a15bf1 100755 --- a/mock_val/init_port_forwards.sh +++ b/mock_val/init_port_forwards.sh @@ -9,9 +9,9 @@ PROG="init_port_forwards" SCRIPT_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) # shellcheck disable=SC1090 -source "$SCRIPT_DIR/prole_cfg.sh" +source "$SCRIPT_DIR/knoe_cfg.sh" -PROLE_HOME="${PROLE_HOME:-$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)}" +KNOE_HOME="${KNOE_HOME:-$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)}" VERBOSE=0 PROLE_CFG_OVERRIDE="" PORT_MAPPING_FILE_PATH="" @@ -32,16 +32,16 @@ Usage: $PROG [-v|--verbose] [-f|--force] [-c|--config-file=FILE] [component] Options: - -c, --config-file=FILE Path to a prole.cfg file to source when generating port-mapping.cfg + -c, --config-file=FILE Path to a knoe.cfg file to source when generating port-mapping.cfg -v, --verbose Verbose output -f, --force Force: kill existing processes blocking ports Examples: - $PROG -c ./prole.cfg start + $PROG -c ./knoe.cfg start $PROG stop openbao $PROG --verbose status -Config (prole.cfg or port-mapping.cfg): +Config (knoe.cfg or port-mapping.cfg): PORT_FORWARD_K3D_MAPPING_1 = id=dashboard;namespace=kubernetes-dashboard;target=svc/kubernetes-dashboard-kong-proxy;address=127.0.0.1;hostPort=8443;servicePort=443;protocol=TCP;description=Kubernetes Dashboard PORT_FORWARD_K3S_MAPPING_1 = id=opentofu;namespace=\${NAMESPACE};target=svc/opentofu;address=0.0.0.0;hostPort=8080;servicePort=8080;protocol=TCP;description=OpenTofu Legacy port-mapping.cfg: @@ -60,12 +60,12 @@ have() { command -v "$1" >/dev/null 2>&1; } # ---- Config helpers / derived defaults ---- cfg_file() { - if [ -n "${PROLE_CONF:-}" ] && [ -f "$PROLE_CONF/prole.cfg" ]; then - printf '%s' "$PROLE_CONF/prole.cfg" + if [ -n "${KNOE_CONF:-}" ] && [ -f "$KNOE_CONF/knoe.cfg" ]; then + printf '%s' "$KNOE_CONF/knoe.cfg" return 0 fi - if [ -n "${PROLE_HOME:-}" ] && [ -f "$PROLE_HOME/conf/prole.cfg" ]; then - printf '%s' "$PROLE_HOME/conf/prole.cfg" + if [ -n "${KNOE_HOME:-}" ] && [ -f "$KNOE_HOME/conf/knoe.cfg" ]; then + printf '%s' "$KNOE_HOME/conf/knoe.cfg" return 0 fi return 1 @@ -129,7 +129,7 @@ host_in_allowlist() { port_forward_allowed_on_host() { local allow="" - case "${PROLE_MODE:-}" in + case "${KNOE_MODE:-}" in k3s) allow="${PORT_FORWARD_K3S_HOSTS:-${PORT_FORWARD_HOSTS:-}}" ;; k3d|"") allow="${PORT_FORWARD_K3D_HOSTS:-${PORT_FORWARD_HOSTS:-}}" ;; *) allow="${PORT_FORWARD_HOSTS:-}" ;; @@ -157,19 +157,19 @@ resolve_port_mapping_file() { printf '%s' "$PORT_MAPPING_FILE" return 0 fi - if [ -n "${PROLE_CONF:-}" ]; then - printf '%s/port-mapping.cfg' "$PROLE_CONF" + if [ -n "${KNOE_CONF:-}" ]; then + printf '%s/port-mapping.cfg' "$KNOE_CONF" return 0 fi - if [ -n "${PROLE_HOME:-}" ]; then - printf '%s/conf/port-mapping.cfg' "$PROLE_HOME" + if [ -n "${KNOE_HOME:-}" ]; then + printf '%s/conf/port-mapping.cfg' "$KNOE_HOME" return 0 fi return 1 } mapping_prefix_for_mode() { - case "${PROLE_MODE:-}" in + case "${KNOE_MODE:-}" in k3s) printf '%s' "PORT_FORWARD_K3S_MAPPING_" ;; k3d|"") printf '%s' "PORT_FORWARD_K3D_MAPPING_" ;; *) printf '%s' "PORT_FORWARD_MAPPING_" ;; @@ -276,7 +276,7 @@ parse_cfg_mapping() { generate_port_mapping_file() { local src_cfg="$1" local dst_cfg="$2" - [ -f "$src_cfg" ] || { err "Prole config file not found: $src_cfg"; return 1; } + [ -f "$src_cfg" ] || { err "Knoe config file not found: $src_cfg"; return 1; } local dst_dir dst_dir="$(dirname "$dst_cfg")" mkdir -p "$dst_dir" >/dev/null 2>&1 || true @@ -320,7 +320,7 @@ ensure_port_mapping_file() { fi if [ -z "$src_cfg" ] || [ ! -f "$src_cfg" ]; then err "Port mapping file not found: $dst_cfg" - err "No prole.cfg available to generate it." + err "No knoe.cfg available to generate it." return 1 fi log "Port mapping file not found; generating $dst_cfg from $src_cfg" @@ -329,7 +329,7 @@ ensure_port_mapping_file() { port_forward_enabled_for_mode() { local val="" - case "${PROLE_MODE:-}" in + case "${KNOE_MODE:-}" in k3s) val="${PORT_FORWARD_K3S_ENABLED:-${PORT_FORWARD_ENABLED:-}}" ;; k3d|"") val="${PORT_FORWARD_K3D_ENABLED:-${PORT_FORWARD_ENABLED:-}}" ;; *) val="${PORT_FORWARD_ENABLED:-}" ;; @@ -615,7 +615,7 @@ ensure_k3d_ready_if_applicable() { } is_local_mode() { - case "${PROLE_MODE:-}" in + case "${KNOE_MODE:-}" in ""|k3d) return 0 ;; esac return 1 @@ -959,7 +959,7 @@ scan_for_collisions() { do_start() { if ! port_forward_enabled_for_mode; then - log "Port forwards disabled for mode '${PROLE_MODE:-auto}'." + log "Port forwards disabled for mode '${KNOE_MODE:-auto}'." return 0 fi if ! port_forward_allowed_on_host; then @@ -976,12 +976,12 @@ do_start() { vlog "Scanning for port collisions..." if ! foreach_mapping scan_for_collisions; then - err "No port-forward mappings found. Check ${CFG_FILE:-prole.cfg} or ${PORT_MAPPING_FILE_PATH:-port-mapping.cfg}." + err "No port-forward mappings found. Check ${CFG_FILE:-knoe.cfg} or ${PORT_MAPPING_FILE_PATH:-port-mapping.cfg}." exit 1 fi if ! foreach_mapping start_port_forward; then - err "No port-forward mappings started. Check ${CFG_FILE:-prole.cfg} or ${PORT_MAPPING_FILE_PATH:-port-mapping.cfg}." + err "No port-forward mappings started. Check ${CFG_FILE:-knoe.cfg} or ${PORT_MAPPING_FILE_PATH:-port-mapping.cfg}." exit 1 fi } @@ -996,7 +996,7 @@ do_stop() { do_restart() { if ! port_forward_enabled_for_mode; then - log "Port forwards disabled for mode '${PROLE_MODE:-auto}'." + log "Port forwards disabled for mode '${KNOE_MODE:-auto}'." return 0 fi if ! port_forward_allowed_on_host; then @@ -1014,15 +1014,15 @@ do_restart() { vlog "Scanning for port collisions (excluding our own)..." # During restart, we'll stop them first anyway, but let's be safe. if ! foreach_mapping stop_port_forward; then - err "No port-forward mappings found. Check ${CFG_FILE:-prole.cfg} or ${PORT_MAPPING_FILE_PATH:-port-mapping.cfg}." + err "No port-forward mappings found. Check ${CFG_FILE:-knoe.cfg} or ${PORT_MAPPING_FILE_PATH:-port-mapping.cfg}." exit 1 fi if ! foreach_mapping scan_for_collisions; then - err "No port-forward mappings found. Check ${CFG_FILE:-prole.cfg} or ${PORT_MAPPING_FILE_PATH:-port-mapping.cfg}." + err "No port-forward mappings found. Check ${CFG_FILE:-knoe.cfg} or ${PORT_MAPPING_FILE_PATH:-port-mapping.cfg}." exit 1 fi if ! foreach_mapping start_port_forward; then - err "No port-forward mappings started. Check ${CFG_FILE:-prole.cfg} or ${PORT_MAPPING_FILE_PATH:-port-mapping.cfg}." + err "No port-forward mappings started. Check ${CFG_FILE:-knoe.cfg} or ${PORT_MAPPING_FILE_PATH:-port-mapping.cfg}." exit 1 fi } @@ -1106,11 +1106,11 @@ while [ $# -gt 0 ]; do ;; -m|--mode) shift - prole_set_mode "${1:-}" + knoe_set_mode "${1:-}" shift ;; -m=*|--mode=*) - prole_set_mode "${1#*=}" + knoe_set_mode "${1#*=}" shift ;; -v|--verbose) @@ -1150,8 +1150,8 @@ done if [ -n "$PROLE_CFG_OVERRIDE" ]; then CFG_FILE="$PROLE_CFG_OVERRIDE" if [ -f "$CFG_FILE" ]; then - PROLE_CONF="$(cd "$(dirname "$CFG_FILE")" && pwd)" - export PROLE_CONF + KNOE_CONF="$(cd "$(dirname "$CFG_FILE")" && pwd)" + export KNOE_CONF fi fi if [ -z "${CFG_FILE:-}" ]; then diff --git a/mock_val/init_postgrest.sh b/mock_val/init_postgrest.sh index f9d4a8d..f202d00 100755 --- a/mock_val/init_postgrest.sh +++ b/mock_val/init_postgrest.sh @@ -11,13 +11,13 @@ set -euo pipefail # ./init_postgrest.sh [--mode MODE] [-n NAMESPACE] SCRIPT_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) # shellcheck disable=SC1090 -source "$SCRIPT_DIR/prole_cfg.sh" +source "$SCRIPT_DIR/knoe_cfg.sh" if [[ "${1:-}" == "--mode" || "${1:-}" == "-m" ]]; then - prole_set_mode "${2:-}" + knoe_set_mode "${2:-}" shift 2 elif [[ "${1:-}" == --mode=* || "${1:-}" == -m=* ]]; then - prole_set_mode "${1#*=}" + knoe_set_mode "${1#*=}" shift fi @@ -51,7 +51,7 @@ while [[ $# -gt 0 ]]; do done ACTION="${ACTION:-start}" -PROLE_HOME=${PROLE_HOME:-$(cd "$SCRIPT_DIR/.." && pwd)} +KNOE_HOME=${KNOE_HOME:-$(cd "$SCRIPT_DIR/.." && pwd)} POSTGREST_IMAGE="${POSTGREST_IMAGE:-postgrest/postgrest:v14.5}" POSTGREST_NAME="${POSTGREST_NAME:-knoe-db-postgrest}" POSTGREST_PORT="${POSTGREST_PORT:-3000}" @@ -94,7 +94,7 @@ resolve_postgres_password() { fi if [[ -z "$pw" ]]; then - # Fallback: check for POSTGRES_PASSWORD env var or prole.cfg + # Fallback: check for POSTGRES_PASSWORD env var or knoe.cfg pw="${POSTGRES_PASSWORD:-}" fi @@ -221,7 +221,7 @@ check_and_repair_pods() { deploy() { echo "Deploying $POSTGREST_NAME to namespace '$NAMESPACE' ..." - local manifests_dir="$PROLE_HOME/deploy/opentofu/k3s/manifests/prole" + local manifests_dir="$KNOE_HOME/deploy/opentofu/k3s/manifests/knoe" kubectl apply -f "$manifests_dir/postgrest-deployment.yaml" -n "$NAMESPACE" kubectl apply -f "$manifests_dir/postgrest-service.yaml" -n "$NAMESPACE" diff --git a/mock_val/init_registry.sh b/mock_val/init_registry.sh index 1bb3536..5b483ec 100755 --- a/mock_val/init_registry.sh +++ b/mock_val/init_registry.sh @@ -19,23 +19,23 @@ _has_config=0 for _arg in "$@"; do [[ "$_arg" == "-c" || "$_arg" == "--config" || "$_arg" == -c=* || "$_arg" == --config=* ]] && _has_config=1 done -if [[ $_has_config -eq 0 && -f "$SCRIPT_DIR/../conf/prole.cfg" ]]; then - set -- "-c" "$SCRIPT_DIR/../conf/prole.cfg" "$@" +if [[ $_has_config -eq 0 && -f "$SCRIPT_DIR/../conf/knoe.cfg" ]]; then + set -- "-c" "$SCRIPT_DIR/../conf/knoe.cfg" "$@" fi unset _has_config _arg common_core_preparse_config "$@" -# Remove -c/--config from the remaining args now that PROLE_CONF is set. +# Remove -c/--config from the remaining args now that KNOE_CONF is set. # `common_core_preparse_config` exposes the stripped args as `COMMON_CORE_ARGS`. set -- "${COMMON_CORE_ARGS[@]}" -# Load environment and config via prole_cfg.sh +# Load environment and config via knoe_cfg.sh # shellcheck disable=SC1090 -source "$SCRIPT_DIR/prole_cfg.sh" +source "$SCRIPT_DIR/knoe_cfg.sh" -if [[ -z "${PROLE_SERVICE:-}" ]]; then - echo "ERROR: PROLE_SERVICE is not defined. Provide PROLE_HOME/env.sh or ~/.prole/env.sh" >&2 +if [[ -z "${KNOE_SERVICE:-}" ]]; then + echo "ERROR: KNOE_SERVICE is not defined. Provide KNOE_HOME/env.sh or ~/.knoe/env.sh" >&2 exit 1 fi @@ -45,8 +45,8 @@ REGISTRY_NAMESPACE_OVERRIDE="" if [[ -d "$SCRIPT_DIR/../k8s/registry" ]]; then REGISTRY_MANIFEST_DIR="$SCRIPT_DIR/../k8s/registry" -elif [[ -n "${PROLE_HOME:-}" && -d "$PROLE_HOME/k8s/registry" ]]; then - REGISTRY_MANIFEST_DIR="$PROLE_HOME/k8s/registry" +elif [[ -n "${KNOE_HOME:-}" && -d "$KNOE_HOME/k8s/registry" ]]; then + REGISTRY_MANIFEST_DIR="$KNOE_HOME/k8s/registry" else REGISTRY_MANIFEST_DIR="$SCRIPT_DIR/../k8s/registry" fi @@ -70,10 +70,10 @@ while [[ $# -gt 0 ]]; do case "$1" in -m|--mode) shift - prole_set_mode "${1:-}" + knoe_set_mode "${1:-}" ;; -m=*|--mode=*) - prole_set_mode "${1#*=}" + knoe_set_mode "${1#*=}" ;; -n|--namespace) shift @@ -124,15 +124,15 @@ elif [[ -n "$NAMESPACE_OVERRIDE" ]]; then elif [[ -n "${REGISTRY_NAMESPACE:-}" ]]; then REGISTRY_NAMESPACE="$REGISTRY_NAMESPACE" else - # Default to the configured service namespace (driven by prole.cfg via prole_cfg.sh). + # Default to the configured service namespace (driven by knoe.cfg via knoe_cfg.sh). REGISTRY_NAMESPACE="${SERVICE_NAMESPACE:-${PROLE_NAMESPACE:-default}}" fi # In k3s mode, the in-cluster registry is a common core service and should live # in the common services namespace. -_mode_resolved="${PROLE_MODE:-${DEPLOYMENT_MODE:-}}" -if declare -F prole_normalize_mode >/dev/null 2>&1; then - _mode_resolved="$(prole_normalize_mode "$_mode_resolved")" +_mode_resolved="${KNOE_MODE:-${DEPLOYMENT_MODE:-}}" +if declare -F knoe_normalize_mode >/dev/null 2>&1; then + _mode_resolved="$(knoe_normalize_mode "$_mode_resolved")" fi if [[ "$_mode_resolved" == "k3s" && ( -z "${REGISTRY_NAMESPACE:-}" || "${REGISTRY_NAMESPACE}" == "default" ) ]]; then REGISTRY_NAMESPACE="${SERVICE_NAMESPACE:-${PROLE_NAMESPACE:-default}}" @@ -143,11 +143,11 @@ export REGISTRY_NAMESPACE REGISTRY_NODE_SELECTOR=${REGISTRY_NODE_SELECTOR:-} current_mode() { - if command -v prole_normalize_mode >/dev/null 2>&1; then - prole_normalize_mode "${PROLE_MODE:-${DEPLOYMENT_MODE:-}}" + if command -v knoe_normalize_mode >/dev/null 2>&1; then + knoe_normalize_mode "${KNOE_MODE:-${DEPLOYMENT_MODE:-}}" return 0 fi - printf '%s' "${PROLE_MODE:-${DEPLOYMENT_MODE:-}}" + printf '%s' "${KNOE_MODE:-${DEPLOYMENT_MODE:-}}" } registry_enabled() { @@ -170,7 +170,7 @@ resolve_registry_node_selector() { return 0 fi # Default: pin to the control-plane node so hostPort:5000 is reachable via - # the k3s server host (e.g. myrddin.prole.org:5000). + # the k3s server host (e.g. myrddin.knoe.org:5000). resolve_control_plane_node_selector } @@ -211,7 +211,7 @@ render_registry_manifest() { echo "ERROR: Registry manifest not found: $REGISTRY_MANIFEST_FILE" >&2 exit 1 fi - prole_render_manifest "$REGISTRY_MANIFEST_FILE" + knoe_render_manifest "$REGISTRY_MANIFEST_FILE" } cleanup_registry_k8s() { @@ -220,7 +220,7 @@ cleanup_registry_k8s() { configure_k3d_insecure_registry() { local cluster_name="${1:-knoe-dev-cluster}" - local reg_host="k3d-prole-registry" + local reg_host="k3d-knoe-registry" local reg_port="5000" local registries_yaml registries_yaml=$(cat </dev/null 2>&1 || return 0 @@ -323,23 +323,23 @@ apply_registry() { mode=$(current_mode) if [[ "$mode" == "k3d" ]]; then if command -v k3d >/dev/null 2>&1; then - echo "Ensuring k3d registry 'prole-registry' on port 5000 ..." - if ! k3d registry list prole-registry >/dev/null 2>&1; then - k3d registry create prole-registry --port 5000 || true + echo "Ensuring k3d registry 'knoe-registry' on port 5000 ..." + if ! k3d registry list knoe-registry >/dev/null 2>&1; then + k3d registry create knoe-registry --port 5000 || true fi local cluster_name cluster_name=$(resolve_k3d_cluster_name) if k3d cluster list "$cluster_name" >/dev/null 2>&1; then - echo "Connecting prole-registry to $cluster_name ..." + echo "Connecting knoe-registry to $cluster_name ..." # k3d v5+ uses 'k3d-NAME' as container name for registries - local reg_container="k3d-prole-registry" + local reg_container="k3d-knoe-registry" local net_name net_name=$(resolve_k3d_network_name "$cluster_name") if command -v docker >/dev/null 2>&1; then if [[ -n "${net_name:-}" ]] && docker inspect "$reg_container" >/dev/null 2>&1 && docker network inspect "$net_name" >/dev/null 2>&1; then if ! docker inspect "$reg_container" -f '{{json .NetworkSettings.Networks}}' | grep -q "$net_name"; then # Ensure the registry is reachable at the stable hostname used in manifests. - docker network connect --alias k3d-prole-registry "$net_name" "$reg_container" || true + docker network connect --alias k3d-knoe-registry "$net_name" "$reg_container" || true fi fi fi @@ -348,10 +348,10 @@ apply_registry() { configure_k3d_insecure_registry "$cluster_name" # Validate registry DNS from a node so image pulls won't fail later. - ensure_k3d_registry_dns "$cluster_name" "k3d-prole-registry" || true + ensure_k3d_registry_dns "$cluster_name" "k3d-knoe-registry" || true # Ensure no k8s registry resources remain in k3d clusters. - echo "Removing k8s registry resources (k3d uses k3d-prole-registry only) ..." + echo "Removing k8s registry resources (k3d uses k3d-knoe-registry only) ..." cleanup_registry_k8s return 0 else @@ -362,15 +362,15 @@ apply_registry() { # Fallback or k3s mode: use Docker container if k8s deploy fails or as alternative if [[ "$mode" == "k3d" ]] || [[ "${PROLE_REGISTRY_STANDALONE:-}" == "1" ]]; then if command -v docker >/dev/null 2>&1; then - if ! docker ps --format '{{.Names}}' | grep -q "^prole-registry$"; then - if docker ps -a --format '{{.Names}}' | grep -q "^prole-registry$"; then - docker start prole-registry || true + if ! docker ps --format '{{.Names}}' | grep -q "^knoe-registry$"; then + if docker ps -a --format '{{.Names}}' | grep -q "^knoe-registry$"; then + docker start knoe-registry || true else - docker run -d -p 5000:5000 --restart always --name prole-registry registry:2 || true + docker run -d -p 5000:5000 --restart always --name knoe-registry registry:2 || true fi fi if [[ "$mode" == "k3d" ]]; then - echo "Removing k8s registry resources (k3d uses k3d-prole-registry only) ..." + echo "Removing k8s registry resources (k3d uses k3d-knoe-registry only) ..." cleanup_registry_k8s fi return 0 @@ -378,7 +378,7 @@ apply_registry() { fi echo "Applying registry manifest to namespace '$REGISTRY_NAMESPACE' ..." - render_registry_manifest | kubectl apply --server-side --force-conflicts --field-manager=prole-installer --validate=false -n "$REGISTRY_NAMESPACE" -f - + render_registry_manifest | kubectl apply --server-side --force-conflicts --field-manager=knoe-installer --validate=false -n "$REGISTRY_NAMESPACE" -f - apply_registry_node_selector kubectl rollout status deploy/registry -n "$REGISTRY_NAMESPACE" --timeout=${ROLLOUT_TIMEOUT:-300s} || true } @@ -388,8 +388,8 @@ delete_registry() { mode=$(current_mode) if [[ "$mode" == "k3d" ]]; then if command -v k3d >/dev/null 2>&1; then - echo "Removing k3d registry 'prole-registry' ..." - k3d registry delete prole-registry || true + echo "Removing k3d registry 'knoe-registry' ..." + k3d registry delete knoe-registry || true fi echo "Removing registry resources from namespace '$REGISTRY_NAMESPACE' ..." render_registry_manifest | kubectl delete -n "$REGISTRY_NAMESPACE" -f - --ignore-not-found >/dev/null 2>&1 || true @@ -407,7 +407,7 @@ status_registry() { k3d registry list 2>/dev/null || true fi if command -v docker >/dev/null 2>&1; then - docker ps --format '{{.Names}}\t{{.Image}}\t{{.Ports}}' 2>/dev/null | grep -E 'k3d-prole-registry|prole-registry' || true + docker ps --format '{{.Names}}\t{{.Image}}\t{{.Ports}}' 2>/dev/null | grep -E 'k3d-knoe-registry|knoe-registry' || true fi return 0 fi diff --git a/mock_val/init_service_layer.sh b/mock_val/init_service_layer.sh index 19517b0..d49ca54 100755 --- a/mock_val/init_service_layer.sh +++ b/mock_val/init_service_layer.sh @@ -4,7 +4,7 @@ set -euo pipefail # init_service_layer.sh # Purpose: -# - Deploy the Prole service layer (OpenTofu, Garage, OpenBao, Kong; Kerberos optional) +# - Deploy the Knoe service layer (OpenTofu, Garage, OpenBao, Kong; Kerberos optional) # - Keep service-layer resources grouped in SERVICE_NAMESPACE # - Migrate service layer to a new namespace @@ -18,18 +18,18 @@ _has_config=0 for _arg in "$@"; do [[ "$_arg" == "-c" || "$_arg" == "--config" || "$_arg" == -c=* || "$_arg" == --config=* ]] && _has_config=1 done -if [[ $_has_config -eq 0 && -f "$SCRIPT_DIR/../conf/prole.cfg" ]]; then - set -- "-c" "$SCRIPT_DIR/../conf/prole.cfg" "$@" +if [[ $_has_config -eq 0 && -f "$SCRIPT_DIR/../conf/knoe.cfg" ]]; then + set -- "-c" "$SCRIPT_DIR/../conf/knoe.cfg" "$@" fi unset _has_config _arg common_core_preparse_config "$@" # shellcheck disable=SC1090 -source "$SCRIPT_DIR/prole_cfg.sh" +source "$SCRIPT_DIR/knoe_cfg.sh" -prole_ensure_kubeconfig >/dev/null 2>&1 || true -prole_ensure_kube_context || exit 1 +knoe_ensure_kubeconfig >/dev/null 2>&1 || true +knoe_ensure_kube_context || exit 1 ACTION="" SERVICE_NAMESPACE_OVERRIDE="" @@ -52,11 +52,11 @@ while [[ $# -gt 0 ]]; do ;; -m|--mode) shift - prole_set_mode "${1:-}" + knoe_set_mode "${1:-}" shift ;; -m=*|--mode=*) - prole_set_mode "${1#*=}" + knoe_set_mode "${1#*=}" shift ;; -n|--namespace) @@ -125,8 +125,8 @@ ARGOCD_NS="${ARGOCD_NAMESPACE:-argocd}" REGISTRY_NS="${REGISTRY_NAMESPACE:-${SERVICE_NAMESPACE}}" STATE_DIR="" -if [[ -n "${PROLE_SERVICE:-}" && -f "$PROLE_SERVICE/prole_cfg.sh" ]]; then - STATE_DIR="${PROLE_SERVICE}/secrets" +if [[ -n "${KNOE_SERVICE:-}" && -f "$KNOE_SERVICE/knoe_cfg.sh" ]]; then + STATE_DIR="${KNOE_SERVICE}/secrets" else STATE_DIR="${SCRIPT_DIR}/secrets" fi @@ -149,7 +149,7 @@ ensure_namespace() { label_namespace() { local ns="$1" - kubectl label namespace "$ns" prole.layer=service --overwrite >/dev/null 2>&1 || true + kubectl label namespace "$ns" knoe.layer=service --overwrite >/dev/null 2>&1 || true } read_last_namespace() { diff --git a/mock_val/init_supabase_ports.sh b/mock_val/init_supabase_ports.sh index 536dc84..62b25bf 100755 --- a/mock_val/init_supabase_ports.sh +++ b/mock_val/init_supabase_ports.sh @@ -12,15 +12,15 @@ set -euo pipefail PROG="init_supabase_ports" SCRIPT_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) -# Load environment and config via prole_cfg.sh +# Load environment and config via knoe_cfg.sh # shellcheck disable=SC1090 -source "$SCRIPT_DIR/prole_cfg.sh" +source "$SCRIPT_DIR/knoe_cfg.sh" if [[ "${1:-}" == "--mode" || "${1:-}" == "-m" ]]; then - prole_set_mode "${2:-}" + knoe_set_mode "${2:-}" shift 2 elif [[ "${1:-}" == --mode=* || "${1:-}" == -m=* ]]; then - prole_set_mode "${1#*=}" + knoe_set_mode "${1#*=}" shift fi @@ -193,8 +193,8 @@ metadata: name: ${SUPABASE_DB_SERVICE} namespace: ${SUPABASE_NAMESPACE} annotations: - prole.org/db-namespace: "${TARGET_NAMESPACE}" - prole.org/db-service: "${KNOE_DB_SERVICE}" + knoe.org/db-namespace: "${TARGET_NAMESPACE}" + knoe.org/db-service: "${KNOE_DB_SERVICE}" spec: type: ExternalName externalName: ${DESIRED_EXTERNAL} diff --git a/mock_val/k3d_route_fix.sh b/mock_val/k3d_route_fix.sh index 9207162..c42a49c 100755 --- a/mock_val/k3d_route_fix.sh +++ b/mock_val/k3d_route_fix.sh @@ -10,7 +10,7 @@ set -euo pipefail SCRIPT_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) # shellcheck disable=SC1090 -source "$SCRIPT_DIR/prole_cfg.sh" +source "$SCRIPT_DIR/knoe_cfg.sh" log() { printf '%s\n' "$*"; } err() { printf '%s\n' "$*" >&2; } diff --git a/mock_val/knoe-db-passwwd.sh b/mock_val/knoe-db-passwwd.sh index ebec095..fd0e1b4 100755 --- a/mock_val/knoe-db-passwwd.sh +++ b/mock_val/knoe-db-passwwd.sh @@ -5,7 +5,7 @@ SCRIPT_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) ROOT_DIR=$(cd "$SCRIPT_DIR/.." && pwd) # shellcheck disable=SC1090 -source "$SCRIPT_DIR/prole_cfg.sh" +source "$SCRIPT_DIR/knoe_cfg.sh" usage() { cat <] Options: -k, --kdc Authenticate current password against a running KDC -f, --force Skip current password verification - -c, --config Path to prole.cfg (default: detected) + -c, --config Path to knoe.cfg (default: detected) USAGE } @@ -49,17 +49,17 @@ while [[ $# -gt 0 ]]; do done if [[ -z "$CFG_PATH" ]]; then - if [[ -n "${PROLE_CONF:-}" && -f "$PROLE_CONF/prole.cfg" ]]; then - CFG_PATH="$PROLE_CONF/prole.cfg" - elif [[ -n "${PROLE_HOME:-}" && -f "$PROLE_HOME/conf/prole.cfg" ]]; then - CFG_PATH="$PROLE_HOME/conf/prole.cfg" - elif [[ -f "$ROOT_DIR/conf/prole.cfg" ]]; then - CFG_PATH="$ROOT_DIR/conf/prole.cfg" + if [[ -n "${KNOE_CONF:-}" && -f "$KNOE_CONF/knoe.cfg" ]]; then + CFG_PATH="$KNOE_CONF/knoe.cfg" + elif [[ -n "${KNOE_HOME:-}" && -f "$KNOE_HOME/conf/knoe.cfg" ]]; then + CFG_PATH="$KNOE_HOME/conf/knoe.cfg" + elif [[ -f "$ROOT_DIR/conf/knoe.cfg" ]]; then + CFG_PATH="$ROOT_DIR/conf/knoe.cfg" fi fi if [[ -z "$CFG_PATH" || ! -f "$CFG_PATH" ]]; then - echo "ERROR: prole.cfg not found. Use -c to specify path." >&2 + echo "ERROR: knoe.cfg not found. Use -c to specify path." >&2 exit 1 fi @@ -90,7 +90,7 @@ if [[ -z "$DB_USER" ]]; then DB_USER=$(cfg_get "KNOE_DB_USER") fi if [[ -z "$DB_USER" ]]; then - DB_USER="prole" + DB_USER="knoe" fi KRB5_USER=$(cfg_get "kerberos_config.user") @@ -127,7 +127,7 @@ fi openbao_ref() { local leaf="$1" key="$2" - printf '%s' "\${OPENBAO:kv/prole/${NAMESPACE}/${leaf}#${key}}" + printf '%s' "\${OPENBAO:kv/knoe/${NAMESPACE}/${leaf}#${key}}" } openbao_available() { @@ -138,7 +138,7 @@ openbao_available() { export PROLE_OPENBAO_URL="$url" fi fi - probe=$(_prole_resolve_openbao_ref "$(openbao_ref "db" "password")") + probe=$(_knoe_resolve_openbao_ref "$(openbao_ref "db" "password")") if [[ -n "$probe" && "$probe" != "null" ]]; then return 0 fi @@ -150,8 +150,8 @@ openbao_token() { printf '%s' "$OPENBAO_ROOT_TOKEN" return 0 fi - if [[ -n "${PROLE_SERVICE:-}" && -f "$PROLE_SERVICE/secrets/openbao-root-token" ]]; then - cat "$PROLE_SERVICE/secrets/openbao-root-token" + if [[ -n "${KNOE_SERVICE:-}" && -f "$KNOE_SERVICE/secrets/openbao-root-token" ]]; then + cat "$KNOE_SERVICE/secrets/openbao-root-token" return 0 fi return 1 @@ -162,12 +162,12 @@ openbao_url() { printf '%s' "$PROLE_OPENBAO_URL" return 0 fi - if [[ -f "$ROOT_DIR/etc/prole_cfg.sh" ]]; then + if [[ -f "$ROOT_DIR/etc/knoe_cfg.sh" ]]; then # We use the python version if it exists - url=$(python3 -c 'import os, sys; sys.path.append("."); import etc.prole_cfg as cfg; print(cfg.openbao_url())' 2>/dev/null || true) + url=$(python3 -c 'import os, sys; sys.path.append("."); import etc.knoe_cfg as cfg; print(cfg.openbao_url())' 2>/dev/null || true) if [[ -n "$url" ]]; then printf '%s' "$url"; return 0; fi fi - if prole_is_in_cluster; then + if knoe_is_in_cluster; then printf '%s' "http://openbao.${SERVICE_NAMESPACE:-${NAMESPACE}}.svc.cluster.local:8200" return 0 fi @@ -198,7 +198,7 @@ verify_current_password() { if [[ -n "$pod" ]]; then krb5_config="/etc/krb5.conf" if ! kubectl -n "$kdc_ns" exec "$pod" -- ls /etc/krb5.conf >/dev/null 2>&1; then - krb5_config="/opt/prole-kdc/krb5.conf" + krb5_config="/opt/knoe-kdc/krb5.conf" fi if printf '%s\n' "$current_pw" | kubectl -n "$kdc_ns" exec -i "$pod" -- env KRB5_CONFIG="$krb5_config" kinit "${KRB5_USER}@${KRB5_REALM}" >/dev/null 2>&1; then return 0 @@ -232,7 +232,7 @@ KRB5CONF if openbao_available; then local stored - stored=$(_prole_resolve_openbao_ref "$(openbao_ref "db" "password")") + stored=$(_knoe_resolve_openbao_ref "$(openbao_ref "db" "password")") if [[ -n "$stored" && "$stored" == "$current_pw" ]]; then return 0 fi @@ -242,8 +242,8 @@ KRB5CONF local cfg_pw cfg_pw=$(cfg_get "init_password.db_password") - if [[ "$cfg_pw" == '${PROLE_SECRET:'* ]]; then - cfg_pw=$(_prole_decrypt_prole_secret "$cfg_pw") + if [[ "$cfg_pw" == '${KNOE_SECRET:'* ]]; then + cfg_pw=$(_knoe_decrypt_knoe_secret "$cfg_pw") else cfg_pw="" fi @@ -252,7 +252,7 @@ KRB5CONF return 0 fi - echo "ERROR: Unable to verify current password (no OpenBao/KDC and no at-rest encrypted password in prole.cfg)." >&2 + echo "ERROR: Unable to verify current password (no OpenBao/KDC and no at-rest encrypted password in knoe.cfg)." >&2 return 1 } @@ -332,14 +332,14 @@ verify_access() { if kubectl -n "$ns" get svc knoe-db-rw >/dev/null 2>&1; then host="knoe-db-rw" fi - if kubectl -n "$ns" exec "$db_pod" -c postgres -- env PGPASSWORD="$pw" psql -h "$host" -U prole -d postgres -c "SELECT 1" >/dev/null 2>&1; then - echo " [PASS] Database access (user: prole)" + if kubectl -n "$ns" exec "$db_pod" -c postgres -- env PGPASSWORD="$pw" psql -h "$host" -U knoe -d postgres -c "SELECT 1" >/dev/null 2>&1; then + echo " [PASS] Database access (user: knoe)" break fi sleep 2 done if [[ $i -eq 10 ]]; then - echo " [FAIL] Database access (user: prole)" + echo " [FAIL] Database access (user: knoe)" fi fi fi @@ -498,7 +498,7 @@ cfg_path = sys.argv[1] ns = sys.argv[2] def ref(leaf: str, key: str) -> str: - return f"${{OPENBAO:kv/prole/{ns}/{leaf}#{key}}}" + return f"${{OPENBAO:kv/knoe/{ns}/{leaf}#{key}}}" secret_map = { "init_password.db_password": ref("db", "password"), @@ -576,11 +576,11 @@ PY ) curl -sS -H "X-Vault-Token: $token" -H 'Content-Type: application/json' \ - -X POST "$url/v1/kv/data/prole/${NAMESPACE}/db" -d "$db_payload" >/dev/null + -X POST "$url/v1/kv/data/knoe/${NAMESPACE}/db" -d "$db_payload" >/dev/null curl -sS -H "X-Vault-Token: $token" -H 'Content-Type: application/json' \ - -X POST "$url/v1/kv/data/prole/${NAMESPACE}/kerberos" -d "$krb_payload" >/dev/null + -X POST "$url/v1/kv/data/knoe/${NAMESPACE}/kerberos" -d "$krb_payload" >/dev/null curl -sS -H "X-Vault-Token: $token" -H 'Content-Type: application/json' \ - -X POST "$url/v1/kv/data/prole/${NAMESPACE}/monitoring" -d "$grafana_payload" >/dev/null + -X POST "$url/v1/kv/data/knoe/${NAMESPACE}/monitoring" -d "$grafana_payload" >/dev/null return 0 } @@ -713,7 +713,7 @@ if [[ "$NEW_PASSWORD" != "$confirm_pw" ]]; then exit 1 fi -# 3) Store at-rest encrypted in prole.cfg +# 3) Store at-rest encrypted in knoe.cfg ENC_PW=$(python3 - "$ROOT_DIR" "$NEW_PASSWORD" <<'PY' import sys @@ -723,13 +723,13 @@ pw = sys.argv[2] sys.path.insert(0, root) from knoe import config as inst_config -print(inst_config._encrypt_prole_secret(pw)) +print(inst_config._encrypt_knoe_secret(pw)) PY ) update_cfg_keys "$ENC_PW" -# 4) Push to OpenBao (if available) and replace prole.cfg refs +# 4) Push to OpenBao (if available) and replace knoe.cfg refs OPENBAO_UPDATED=0 if write_openbao_secrets; then OPENBAO_UPDATED=1 @@ -738,7 +738,7 @@ fi # 5) Update Kubernetes secrets (if available) if command -v kubectl >/dev/null 2>&1; then - prole_ensure_kubeconfig >/dev/null 2>&1 || true + knoe_ensure_kubeconfig >/dev/null 2>&1 || true update_k8s_db_secrets update_grafana_secret update_supabase_secrets @@ -755,7 +755,7 @@ if [[ "$OPENBAO_UPDATED" -eq 1 ]]; then export PROLE_OPENBAO_URL="$url" fi fi - resolved=$(_prole_resolve_openbao_ref "$(openbao_ref "db" "password")") + resolved=$(_knoe_resolve_openbao_ref "$(openbao_ref "db" "password")") if [[ "$resolved" != "$NEW_PASSWORD" ]]; then echo "WARN: OpenBao value did not match expected password." >&2 fi diff --git a/mock_val/lib/shell/common_core_lib.sh b/mock_val/lib/shell/common_core_lib.sh index 3d2942a..03f8bbc 100644 --- a/mock_val/lib/shell/common_core_lib.sh +++ b/mock_val/lib/shell/common_core_lib.sh @@ -1,16 +1,16 @@ #!/usr/bin/env bash # Shared helpers for common core init scripts (ArgoCD, OpenBao, OpenTofu, Garage). # Responsibilities: -# - handle [-c|--config] early so prole_cfg.sh loads the right prole.cfg +# - handle [-c|--config] early so knoe_cfg.sh loads the right knoe.cfg # - parse standard actions/options # - resolve and apply namespaces consistently # Actions supported by all common core scripts COMMON_CORE_ACTIONS="start|stop|status|restart|initialize|update|reload" -# Parse -c/--config before loading prole_cfg.sh so PROLE_CONF is set in time. +# Parse -c/--config before loading knoe_cfg.sh so KNOE_CONF is set in time. # Sets: -# COMMON_CORE_CONFIG_PATH - path to prole.cfg (if provided) +# COMMON_CORE_CONFIG_PATH - path to knoe.cfg (if provided) # COMMON_CORE_ARGS - original arguments minus -c/--config common_core_preparse_config() { COMMON_CORE_CONFIG_PATH="" @@ -42,8 +42,8 @@ common_core_preparse_config() { fi local cfg_dir cfg_dir=$(cd "$(dirname "$COMMON_CORE_CONFIG_PATH")" && pwd) - PROLE_CONF="$cfg_dir" - export PROLE_CONF + KNOE_CONF="$cfg_dir" + export KNOE_CONF fi } @@ -63,10 +63,10 @@ common_core_parse_args() { case "$1" in -m|--mode) shift - prole_set_mode "${1:-}" + knoe_set_mode "${1:-}" ;; -m=*|--mode=*) - prole_set_mode "${1#*=}" + knoe_set_mode "${1#*=}" ;; -n|--namespace) shift @@ -108,7 +108,7 @@ common_core_parse_args() { common_core_usage() { local prog="${1:-$0}" - echo "Usage: ${prog##*/} [${COMMON_CORE_ACTIONS//|/|}] [-n namespace] [--mode k3d|k3s|k8s] [-c conf/prole.cfg]" >&2 + echo "Usage: ${prog##*/} [${COMMON_CORE_ACTIONS//|/|}] [-n namespace] [--mode k3d|k3s|k8s] [-c conf/knoe.cfg]" >&2 } # Resolve namespace with precedence: CLI override -> SERVICE_NAMESPACE -> NAMESPACE -> provided default @@ -121,10 +121,10 @@ common_core_resolve_namespace() { # In k3s mode, common core services must not default into the `default` namespace. # If the caller didn't supply an explicit namespace, normalize `default` -> SERVICE_NAMESPACE - # from prole.cfg (Explicit `-n default` is treated as a legacy/mistake and will be corrected). - local mode="${PROLE_MODE:-}" - if declare -F prole_normalize_mode >/dev/null 2>&1; then - mode="$(prole_normalize_mode "$mode")" + # from knoe.cfg (Explicit `-n default` is treated as a legacy/mistake and will be corrected). + local mode="${KNOE_MODE:-}" + if declare -F knoe_normalize_mode >/dev/null 2>&1; then + mode="$(knoe_normalize_mode "$mode")" fi if [[ "$mode" == "k3s" && "$ns" == "default" ]]; then if [[ -n "${SERVICE_NAMESPACE:-}" && "${SERVICE_NAMESPACE}" != "default" ]]; then @@ -132,7 +132,7 @@ common_core_resolve_namespace() { elif [[ -n "${PROLE_NAMESPACE:-}" && "${PROLE_NAMESPACE}" != "default" ]]; then ns="$PROLE_NAMESPACE" else - echo "ERROR: k3s mode requires a non-default service namespace. Set SERVICE_NAMESPACE in prole.cfg or pass -n." >&2 + echo "ERROR: k3s mode requires a non-default service namespace. Set SERVICE_NAMESPACE in knoe.cfg or pass -n." >&2 exit 2 fi fi @@ -155,7 +155,7 @@ common_core_apply_namespace() { # - This is intended for early-install order-of-operations cases where a user-provided # secret/password is not available yet. # - Callers should treat this as a temporary credential that can be overwritten later. -prole_generate_password() { +knoe_generate_password() { local length="${1:-32}" local out="" diff --git a/mock_val/lib/shell/prole_cmd.sh b/mock_val/lib/shell/prole_cmd.sh index 1c9aeb9..48b1f6b 100644 --- a/mock_val/lib/shell/prole_cmd.sh +++ b/mock_val/lib/shell/prole_cmd.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -prole_kubectl_exec_cmd() { +knoe_kubectl_exec_cmd() { local ns="$1" local pod="$2" local cmd="$3" diff --git a/mock_val/lib/shell/prole_env.sh b/mock_val/lib/shell/prole_env.sh index 5c0c16d..ac44e67 100644 --- a/mock_val/lib/shell/prole_env.sh +++ b/mock_val/lib/shell/prole_env.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -prole_first_nonempty() { +knoe_first_nonempty() { local v for v in "$@"; do if [[ -n "$v" ]]; then diff --git a/mock_val/lib/shell/prole_guardrails.sh b/mock_val/lib/shell/prole_guardrails.sh index 59154b1..2cdb058 100644 --- a/mock_val/lib/shell/prole_guardrails.sh +++ b/mock_val/lib/shell/prole_guardrails.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -prole_guard_nonempty() { +knoe_guard_nonempty() { local name="$1" local value="${2:-}" if [[ -z "$value" ]]; then diff --git a/mock_val/lib/shell/prole_secrets.sh b/mock_val/lib/shell/prole_secrets.sh index e8d52e3..9787933 100644 --- a/mock_val/lib/shell/prole_secrets.sh +++ b/mock_val/lib/shell/prole_secrets.sh @@ -1,35 +1,35 @@ #!/usr/bin/env bash -prole_is_openbao_ref() { +knoe_is_openbao_ref() { local v="${1:-}" [[ "$v" == '${OPENBAO:'* ]] } -prole_is_prole_secret_ref() { +knoe_is_knoe_secret_ref() { local v="${1:-}" - [[ "$v" == '${PROLE_SECRET:'* ]] + [[ "$v" == '${KNOE_SECRET:'* ]] } -prole_is_secret_ref() { +knoe_is_secret_ref() { local v="${1:-}" - prole_is_openbao_ref "$v" || prole_is_prole_secret_ref "$v" + knoe_is_openbao_ref "$v" || knoe_is_knoe_secret_ref "$v" } # Returns 0 when the current value is empty or is a secret reference and therefore # should be resolved from the configured secret backend. -prole_secret_needs_resolution() { +knoe_secret_needs_resolution() { local current="${1:-}" - [[ -z "$current" ]] || prole_is_secret_ref "$current" + [[ -z "$current" ]] || knoe_is_secret_ref "$current" } # Pure precedence helper: # - If current value is a literal non-empty value, keep it. # - If current is empty or a secret ref, prefer a non-empty fetched value. -prole_secret_choose_value() { +knoe_secret_choose_value() { local current="${1:-}" local fetched="${2:-}" - if prole_secret_needs_resolution "$current"; then + if knoe_secret_needs_resolution "$current"; then if [[ -n "$fetched" && "$fetched" != "null" ]]; then printf '%s' "$fetched" return 0 diff --git a/mock_val/lib/shell/prole_string.sh b/mock_val/lib/shell/prole_string.sh index 85f8f8e..abe0a32 100644 --- a/mock_val/lib/shell/prole_string.sh +++ b/mock_val/lib/shell/prole_string.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -prole_trim() { +knoe_trim() { local s="${1:-}" # Trim leading/trailing whitespace without invoking external tools. s="${s#${s%%[![:space:]]*}}" @@ -8,9 +8,9 @@ prole_trim() { printf '%s' "$s" } -prole_normalize_realm() { +knoe_normalize_realm() { local realm - realm=$(prole_trim "${1:-}") + realm=$(knoe_trim "${1:-}") if [[ -z "$realm" ]]; then printf '%s' "" return 0 diff --git a/mock_val/lib/shell/prole_yaml.sh b/mock_val/lib/shell/prole_yaml.sh index a90eb25..4947a29 100644 --- a/mock_val/lib/shell/prole_yaml.sh +++ b/mock_val/lib/shell/prole_yaml.sh @@ -3,7 +3,7 @@ # Extract a simple scalar `key: value` from a YAML file. # - Intended for flat `group_vars` style YAML only (no nesting). # - Strips surrounding quotes. -prole_yaml_get_scalar() { +knoe_yaml_get_scalar() { local file="$1" local key="$2" diff --git a/mock_val/prole_cfg.sh b/mock_val/prole_cfg.sh index 051a217..70ecae2 100644 --- a/mock_val/prole_cfg.sh +++ b/mock_val/prole_cfg.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash -# Standard include for Prole etc scripts. +# Standard include for Knoe etc scripts. # - Loads environment from env.sh (if available) -# - Loads values from PROLE_CONF/prole.cfg (INI-style) +# - Loads values from KNOE_CONF/knoe.cfg (INI-style) # - Does not override already-set env vars if [[ "${_PROLE_CFG_LOADED:-}" == "1" ]]; then @@ -9,29 +9,29 @@ if [[ "${_PROLE_CFG_LOADED:-}" == "1" ]]; then fi _PROLE_CFG_LOADED=1 -_prole_cfg_script_dir=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) -_prole_cfg_home_guess=$(cd "$_prole_cfg_script_dir/.." && pwd) +_knoe_cfg_script_dir=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) +_knoe_cfg_home_guess=$(cd "$_knoe_cfg_script_dir/.." && pwd) -# 1. Try to load env.sh to establish base PROLE_HOME/PROLE_CONF -if [[ -n "${PROLE_HOME:-}" && -f "$PROLE_HOME/env.sh" ]]; then +# 1. Try to load env.sh to establish base KNOE_HOME/KNOE_CONF +if [[ -n "${KNOE_HOME:-}" && -f "$KNOE_HOME/env.sh" ]]; then # shellcheck disable=SC1090 - source "$PROLE_HOME/env.sh" -elif [[ -f "$HOME/.prole/env.sh" ]]; then + source "$KNOE_HOME/env.sh" +elif [[ -f "$HOME/.knoe/env.sh" ]]; then # shellcheck disable=SC1090 - source "$HOME/.prole/env.sh" -elif [[ -f "$_prole_cfg_home_guess/env.sh" ]]; then + source "$HOME/.knoe/env.sh" +elif [[ -f "$_knoe_cfg_home_guess/env.sh" ]]; then # shellcheck disable=SC1090 - source "$_prole_cfg_home_guess/env.sh" + source "$_knoe_cfg_home_guess/env.sh" fi -_prole_trim() { +_knoe_trim() { local s="$1" s="${s#"${s%%[![:space:]]*}"}" s="${s%"${s##*[![:space:]]}"}" printf '%s' "$s" } -_prole_cfg_expand() { +_knoe_cfg_expand() { local value="$1" local out="" rest="$value" local prefix token suffix var repl @@ -40,7 +40,7 @@ _prole_cfg_expand() { return 0 fi case "$value" in - '${OPENBAO:'*|'${PROLE_SECRET:'*) + '${OPENBAO:'*|'${KNOE_SECRET:'*) printf '%s' "$value" return 0 ;; @@ -64,7 +64,7 @@ _prole_cfg_expand() { printf '%s' "$out" } -_prole_host_from_url() { +_knoe_host_from_url() { local val="${1:-}" val="${val#http://}" val="${val#https://}" @@ -73,33 +73,33 @@ _prole_host_from_url() { printf '%s' "$val" } -prole_is_in_cluster() { +knoe_is_in_cluster() { [[ -n "${KUBERNETES_SERVICE_HOST:-}" && -f /var/run/secrets/kubernetes.io/serviceaccount/token ]] } -_prole_local_registry_enabled() { +_knoe_local_registry_enabled() { local raw="${PROLE_ENABLE_LOCAL_REGISTRY:-${ENABLE_LOCAL_REGISTRY:-}}" if [[ -n "$raw" ]]; then - _prole_bool_true "$raw" && return 0 + _knoe_bool_true "$raw" && return 0 return 1 fi local mode="" - if command -v prole_normalize_mode >/dev/null 2>&1; then - mode=$(prole_normalize_mode "${PROLE_MODE:-${DEPLOYMENT_MODE:-${CLUSTER_ENV:-}}}") + if command -v knoe_normalize_mode >/dev/null 2>&1; then + mode=$(knoe_normalize_mode "${KNOE_MODE:-${DEPLOYMENT_MODE:-${CLUSTER_ENV:-}}}") else - mode="${PROLE_MODE:-${DEPLOYMENT_MODE:-${CLUSTER_ENV:-}}}" + mode="${KNOE_MODE:-${DEPLOYMENT_MODE:-${CLUSTER_ENV:-}}}" fi [[ "$mode" == "k3d" || "$mode" == "k3s" ]] } -_prole_bool_true() { +_knoe_bool_true() { case "${1:-}" in 1|true|TRUE|True|yes|YES|Yes|on|ON|On) return 0 ;; esac return 1 } -_prole_kubeconfig_mark_insecure() { +_knoe_kubeconfig_mark_insecure() { local cfg="${1:-${KUBECONFIG:-}}" [[ -z "$cfg" || ! -f "$cfg" ]] && return 1 command -v kubectl >/dev/null 2>&1 || return 1 @@ -115,7 +115,7 @@ _prole_kubeconfig_mark_insecure() { _PROLE_CFG_SET_VARS="|" -_prole_cfg_set_default() { +_knoe_cfg_set_default() { local key="$1" value="$2" token="|$key|" # Only set if currently empty OR if we were the ones who set it from config previously if [[ -z "${!key:-}" || "$_PROLE_CFG_SET_VARS" == *"$token"* ]]; then @@ -127,10 +127,10 @@ _prole_cfg_set_default() { fi } -_prole_read_cfg() { +_knoe_read_cfg() { local cfg="$1" line key value while IFS= read -r line || [[ -n "$line" ]]; do - line="$(_prole_trim "$line")" + line="$(_knoe_trim "$line")" [[ -z "$line" ]] && continue case "$line" in \#*|\;*|\[*\]) @@ -138,18 +138,18 @@ _prole_read_cfg() { ;; esac if [[ "$line" == *"="* ]]; then - key="$(_prole_trim "${line%%=*}")" - value="$(_prole_trim "${line#*=}")" + key="$(_knoe_trim "${line%%=*}")" + value="$(_knoe_trim "${line#*=}")" [[ -z "$key" ]] && continue # Replace dots with underscores for shell compatibility key="${key//./_}" - value="$(_prole_cfg_expand "$value")" - _prole_cfg_set_default "$key" "$value" + value="$(_knoe_cfg_expand "$value")" + _knoe_cfg_set_default "$key" "$value" fi done <"$cfg" } -_prole_cfg_extract_key() { +_knoe_cfg_extract_key() { local cfg="$1" key="$2" local value value=$(awk -F= -v k="$key" ' @@ -164,11 +164,11 @@ _prole_cfg_extract_key() { } END { print val } ' "$cfg" 2>/dev/null || true) - value="$(_prole_cfg_expand "$value")" + value="$(_knoe_cfg_expand "$value")" printf '%s' "$value" } -_prole_cfg_extract_key_in_files() { +_knoe_cfg_extract_key_in_files() { local key="$1"; shift local value if [[ $# -lt 1 ]]; then @@ -186,11 +186,11 @@ _prole_cfg_extract_key_in_files() { } END { print val } ' "$@" 2>/dev/null || true) - value="$(_prole_cfg_expand "$value")" + value="$(_knoe_cfg_expand "$value")" printf '%s' "$value" } -_prole_cfg_realpath() { +_knoe_cfg_realpath() { local p="$1" if command -v python3 >/dev/null 2>&1; then python3 -c 'import os,sys; print(os.path.realpath(sys.argv[1]))' "$p" 2>/dev/null && return 0 @@ -202,19 +202,19 @@ _prole_cfg_realpath() { printf '%s' "$p" } -_prole_cfg_layer_files() { +_knoe_cfg_layer_files() { local entry="$1" [[ -z "$entry" ]] && return 0 local resolved env_dir env_name base f - resolved=$(_prole_cfg_realpath "$entry") + resolved=$(_knoe_cfg_realpath "$entry") env_dir=$(cd "$(dirname "$resolved")" 2>/dev/null && pwd || true) env_name=$(basename "$env_dir") - base="$env_dir/prole.cfg" + base="$env_dir/knoe.cfg" if [[ "$env_name" =~ ^(dev|service|prod|test)$ && -f "$base" ]]; then printf '%s\n' "$base" for f in "$env_dir"/*.cfg; do [[ -f "$f" ]] || continue - [[ "$(basename "$f")" == "prole.cfg" ]] && continue + [[ "$(basename "$f")" == "knoe.cfg" ]] && continue [[ "$(basename "$f")" == .* ]] && continue printf '%s\n' "$f" done @@ -223,42 +223,42 @@ _prole_cfg_layer_files() { printf '%s\n' "$entry" } -_prole_cfg_env_from_hint() { +_knoe_cfg_env_from_hint() { local s s=$(printf '%s' "${1:-}" | tr 'A-Z' 'a-z') case "$s" in - dev|k3d|k3d-*|prole-dev-*|knoe-dev-cluster|k3d-knoe-*) printf '%s' "dev"; return 0 ;; - service|k3s|k3s-*|prole-service-*|knoe-system|k3d-knoe-system) printf '%s' "service"; return 0 ;; - prod|production|k8s|k8s-*|prole-prod-*) printf '%s' "prod"; return 0 ;; + dev|k3d|k3d-*|knoe-dev-*|knoe-dev-cluster|k3d-knoe-*) printf '%s' "dev"; return 0 ;; + service|k3s|k3s-*|knoe-service-*|knoe-system|k3d-knoe-system) printf '%s' "service"; return 0 ;; + prod|production|k8s|k8s-*|knoe-prod-*) printf '%s' "prod"; return 0 ;; test|testing) printf '%s' "test"; return 0 ;; esac printf '%s' "" } -_prole_cfg_default_ns_for_env() { +_knoe_cfg_default_ns_for_env() { case "${1:-}" in - test) printf '%s' "prole-test" ;; + test) printf '%s' "knoe-test" ;; *) printf '%s' "knoe-db" ;; esac } -_prole_cfg_default_sns_for_env() { +_knoe_cfg_default_sns_for_env() { case "${1:-}" in dev) printf '%s' "default" ;; - test) printf '%s' "prole-test" ;; + test) printf '%s' "knoe-test" ;; *) printf '%s' "knoe-system" ;; esac } -_prole_cfg_write_default_base() { +_knoe_cfg_write_default_base() { local base="$1" env="$2" local ns sns - ns="$(_prole_cfg_default_ns_for_env "$env")" - sns="$(_prole_cfg_default_sns_for_env "$env")" + ns="$(_knoe_cfg_default_ns_for_env "$env")" + sns="$(_knoe_cfg_default_sns_for_env "$env")" mkdir -p "$(dirname "$base")" 2>/dev/null || true cat >"$base" </dev/null || true @@ -284,90 +284,90 @@ _prole_cfg_bootstrap_env_layout() { # If entry is a legacy regular file, infer env from its contents. if [[ -f "$entry" && ! -L "$entry" ]]; then - env_hint="$(_prole_cfg_extract_key "$entry" "DEPLOYMENT_MODE")" - env="$(_prole_cfg_env_from_hint "$env_hint")" + env_hint="$(_knoe_cfg_extract_key "$entry" "DEPLOYMENT_MODE")" + env="$(_knoe_cfg_env_from_hint "$env_hint")" if [[ -z "$env" ]]; then - env_hint="$(_prole_cfg_extract_key "$entry" "CLUSTER_ENV")" - env="$(_prole_cfg_env_from_hint "$env_hint")" + env_hint="$(_knoe_cfg_extract_key "$entry" "CLUSTER_ENV")" + env="$(_knoe_cfg_env_from_hint "$env_hint")" fi if [[ -z "$env" ]]; then - env_hint="$(_prole_cfg_extract_key "$entry" "ENVIRONMENT")" - env="$(_prole_cfg_env_from_hint "$env_hint")" + env_hint="$(_knoe_cfg_extract_key "$entry" "ENVIRONMENT")" + env="$(_knoe_cfg_env_from_hint "$env_hint")" fi if [[ -z "$env" ]]; then # Legacy key used by older configs. - env_hint="$(_prole_cfg_extract_key "$entry" "prole.mode")" - env="$(_prole_cfg_env_from_hint "$env_hint")" + env_hint="$(_knoe_cfg_extract_key "$entry" "knoe.mode")" + env="$(_knoe_cfg_env_from_hint "$env_hint")" fi fi # If still unknown, fall back to any already-exported mode/cluster hint. if [[ -z "$env" ]]; then - env_hint="${PROLE_MODE:-${DEPLOYMENT_MODE:-${CLUSTER_ENV:-}}}" - if command -v prole_normalize_mode >/dev/null 2>&1; then - env_hint=$(prole_normalize_mode "$env_hint") + env_hint="${KNOE_MODE:-${DEPLOYMENT_MODE:-${CLUSTER_ENV:-}}}" + if command -v knoe_normalize_mode >/dev/null 2>&1; then + env_hint=$(knoe_normalize_mode "$env_hint") fi - env="$(_prole_cfg_env_from_hint "$env_hint")" + env="$(_knoe_cfg_env_from_hint "$env_hint")" fi [[ -z "$env" ]] && env="dev" - local base="$conf_dir/$env/prole.cfg" + local base="$conf_dir/$env/knoe.cfg" # Heal broken symlink. if [[ -L "$entry" && ! -e "$entry" ]]; then - [[ -f "$base" ]] || _prole_cfg_write_default_base "$base" "$env" - ln -snf "$env/prole.cfg" "$entry" 2>/dev/null || true + [[ -f "$base" ]] || _knoe_cfg_write_default_base "$base" "$env" + ln -snf "$env/knoe.cfg" "$entry" 2>/dev/null || true return 0 fi # Migrate legacy regular-file entrypoint into env base. if [[ -f "$entry" && ! -L "$entry" ]]; then - if [[ ! -f "$base" ]] || grep -q "Generated by prole_conf" "$base" 2>/dev/null || grep -q "Generated by prole_cfg.sh" "$base" 2>/dev/null; then + if [[ ! -f "$base" ]] || grep -q "Generated by knoe_conf" "$base" 2>/dev/null || grep -q "Generated by knoe_cfg.sh" "$base" 2>/dev/null; then cp "$entry" "$base" 2>/dev/null || true fi local ts legacy ts=$(date +%s) - legacy="$conf_dir/prole.cfg.legacy.${ts}" + legacy="$conf_dir/knoe.cfg.legacy.${ts}" mv "$entry" "$legacy" 2>/dev/null || true - ln -snf "$env/prole.cfg" "$entry" 2>/dev/null || true + ln -snf "$env/knoe.cfg" "$entry" 2>/dev/null || true return 0 fi # If entrypoint is missing, create a base and link it. if [[ ! -e "$entry" ]]; then - [[ -f "$base" ]] || _prole_cfg_write_default_base "$base" "$env" - ln -snf "$env/prole.cfg" "$entry" 2>/dev/null || true + [[ -f "$base" ]] || _knoe_cfg_write_default_base "$base" "$env" + ln -snf "$env/knoe.cfg" "$entry" 2>/dev/null || true fi } -prole_normalize_mode() { +knoe_normalize_mode() { local s s=$(printf '%s' "${1:-}" | tr 'A-Z' 'a-z') case "$s" in dev|k3d|k3d-*) echo "k3d"; return 0 ;; service|k3s|k3s-*) echo "k3s"; return 0 ;; prod|production|k8s|k8s-*) echo "k8s"; return 0 ;; - prole-dev-cluster|k3d-prole-dev-cluster) echo "k3d"; return 0 ;; knoe-dev-cluster|k3d-knoe-dev-cluster) echo "k3d"; return 0 ;; - prole-service-cluster) echo "k3s"; return 0 ;; - prole-prod-cluster) echo "k8s"; return 0 ;; + knoe-dev-cluster|k3d-knoe-dev-cluster) echo "k3d"; return 0 ;; + knoe-service-cluster) echo "k3s"; return 0 ;; + knoe-prod-cluster) echo "k8s"; return 0 ;; esac echo "$s" } -prole_set_mode() { +knoe_set_mode() { local raw="$1" if [[ -z "$raw" ]]; then echo "ERROR: --mode requires a value (k3d, k3s, k8s)" >&2 exit 2 fi local norm - norm=$(prole_normalize_mode "$raw") + norm=$(knoe_normalize_mode "$raw") case "$norm" in k3d|k3s|k8s) - PROLE_MODE="$norm" - export PROLE_MODE + KNOE_MODE="$norm" + export KNOE_MODE ;; *) echo "ERROR: Unsupported mode '$raw' (use k3d, k3s, or k8s)" >&2 @@ -376,17 +376,17 @@ prole_set_mode() { esac } -prole_render_manifest() { +knoe_render_manifest() { local src="$1" - if [[ "${PROLE_MODE:-}" != "k3d" ]]; then + if [[ "${KNOE_MODE:-}" != "k3d" ]]; then cat "$src" return 0 fi local renderer="" - if [[ -n "${PROLE_SERVICE:-}" && -f "$PROLE_SERVICE/render_manifest.py" ]]; then - renderer="$PROLE_SERVICE/render_manifest.py" - elif [[ -n "${PROLE_HOME:-}" && -f "$PROLE_HOME/etc/render_manifest.py" ]]; then - renderer="$PROLE_HOME/etc/render_manifest.py" + if [[ -n "${KNOE_SERVICE:-}" && -f "$KNOE_SERVICE/render_manifest.py" ]]; then + renderer="$KNOE_SERVICE/render_manifest.py" + elif [[ -n "${KNOE_HOME:-}" && -f "$KNOE_HOME/etc/render_manifest.py" ]]; then + renderer="$KNOE_HOME/etc/render_manifest.py" fi if [[ -n "$renderer" ]]; then python3 "$renderer" "$src" @@ -395,36 +395,36 @@ prole_render_manifest() { cat "$src" } -_prole_cfg_file="" -if [[ -n "${PROLE_CONF:-}" && -f "$PROLE_CONF/prole.cfg" ]]; then - _prole_cfg_file="$PROLE_CONF/prole.cfg" -elif [[ -n "${PROLE_HOME:-}" && -f "$PROLE_HOME/conf/prole.cfg" ]]; then - _prole_cfg_file="$PROLE_HOME/conf/prole.cfg" -elif [[ -f "$_prole_cfg_home_guess/conf/prole.cfg" ]]; then - _prole_cfg_file="$_prole_cfg_home_guess/conf/prole.cfg" +_knoe_cfg_file="" +if [[ -n "${KNOE_CONF:-}" && -f "$KNOE_CONF/knoe.cfg" ]]; then + _knoe_cfg_file="$KNOE_CONF/knoe.cfg" +elif [[ -n "${KNOE_HOME:-}" && -f "$KNOE_HOME/conf/knoe.cfg" ]]; then + _knoe_cfg_file="$KNOE_HOME/conf/knoe.cfg" +elif [[ -f "$_knoe_cfg_home_guess/conf/knoe.cfg" ]]; then + _knoe_cfg_file="$_knoe_cfg_home_guess/conf/knoe.cfg" fi -if [[ -n "$_prole_cfg_file" ]]; then - if [[ -z "${PROLE_CONF:-}" ]]; then - PROLE_CONF=$(cd "$(dirname "$_prole_cfg_file")" && pwd) - export PROLE_CONF +if [[ -n "$_knoe_cfg_file" ]]; then + if [[ -z "${KNOE_CONF:-}" ]]; then + KNOE_CONF=$(cd "$(dirname "$_knoe_cfg_file")" && pwd) + export KNOE_CONF fi # Ensure env-dir layout exists and a stable entrypoint symlink is active. - _prole_cfg_bootstrap_env_layout "$PROLE_CONF" - _prole_cfg_file="$PROLE_CONF/prole.cfg" + _knoe_cfg_bootstrap_env_layout "$KNOE_CONF" + _knoe_cfg_file="$KNOE_CONF/knoe.cfg" - _prole_cfg_files=() - while IFS= read -r _prole_cfg_f || [[ -n "$_prole_cfg_f" ]]; do - [[ -n "$_prole_cfg_f" ]] || continue - _prole_cfg_files+=("$_prole_cfg_f") - done < <(_prole_cfg_layer_files "$_prole_cfg_file") - if [[ ${#_prole_cfg_files[@]} -eq 0 ]]; then - _prole_cfg_files=("$_prole_cfg_file") + _knoe_cfg_files=() + while IFS= read -r _knoe_cfg_f || [[ -n "$_knoe_cfg_f" ]]; do + [[ -n "$_knoe_cfg_f" ]] || continue + _knoe_cfg_files+=("$_knoe_cfg_f") + done < <(_knoe_cfg_layer_files "$_knoe_cfg_file") + if [[ ${#_knoe_cfg_files[@]} -eq 0 ]]; then + _knoe_cfg_files=("$_knoe_cfg_file") fi - for _prole_cfg_f in "${_prole_cfg_files[@]}"; do - [[ -f "$_prole_cfg_f" ]] || continue - _prole_read_cfg "$_prole_cfg_f" + for _knoe_cfg_f in "${_knoe_cfg_files[@]}"; do + [[ -f "$_knoe_cfg_f" ]] || continue + _knoe_read_cfg "$_knoe_cfg_f" done if [[ -z "${KERBEROS_ENABLED:-}" && -n "${ENABLED:-}" ]]; then @@ -432,50 +432,50 @@ if [[ -n "$_prole_cfg_file" ]]; then export KERBEROS_ENABLED fi - # Always prefer namespace from prole.cfg (single source of truth). - _cfg_ns=$(_prole_cfg_extract_key_in_files "NAMESPACE" "${_prole_cfg_files[@]}") + # Always prefer namespace from knoe.cfg (single source of truth). + _cfg_ns=$(_knoe_cfg_extract_key_in_files "NAMESPACE" "${_knoe_cfg_files[@]}") if [[ -n "$_cfg_ns" ]]; then export PROLE_NAMESPACE="$_cfg_ns" fi - _cfg_sns=$(_prole_cfg_extract_key_in_files "SERVICE_NAMESPACE" "${_prole_cfg_files[@]}") + _cfg_sns=$(_knoe_cfg_extract_key_in_files "SERVICE_NAMESPACE" "${_knoe_cfg_files[@]}") if [[ -n "$_cfg_sns" ]]; then export SERVICE_NAMESPACE="$_cfg_sns" fi - _cfg_sh=$(_prole_cfg_extract_key_in_files "SERVICE_HOSTNAME" "${_prole_cfg_files[@]}") + _cfg_sh=$(_knoe_cfg_extract_key_in_files "SERVICE_HOSTNAME" "${_knoe_cfg_files[@]}") if [[ -z "$_cfg_sh" ]]; then - _cfg_sh=$(_prole_cfg_extract_key_in_files "service_hostname" "${_prole_cfg_files[@]}") + _cfg_sh=$(_knoe_cfg_extract_key_in_files "service_hostname" "${_knoe_cfg_files[@]}") fi if [[ -n "$_cfg_sh" ]]; then export SERVICE_HOSTNAME="$_cfg_sh" fi # Supabase front-door hostname (canonical external entrypoint). - _cfg_sbh=$(_prole_cfg_extract_key_in_files "supabase_hostname" "${_prole_cfg_files[@]}") + _cfg_sbh=$(_knoe_cfg_extract_key_in_files "supabase_hostname" "${_knoe_cfg_files[@]}") if [[ -z "$_cfg_sbh" ]]; then - _cfg_sbh=$(_prole_cfg_extract_key_in_files "SUPABASE_HOSTNAME" "${_prole_cfg_files[@]}") + _cfg_sbh=$(_knoe_cfg_extract_key_in_files "SUPABASE_HOSTNAME" "${_knoe_cfg_files[@]}") fi if [[ -n "$_cfg_sbh" ]]; then export supabase_hostname="$_cfg_sbh" export SUPABASE_HOSTNAME="$_cfg_sbh" fi - _cfg_ctx=$(_prole_cfg_extract_key_in_files "KUBECONTEXT" "${_prole_cfg_files[@]}") + _cfg_ctx=$(_knoe_cfg_extract_key_in_files "KUBECONTEXT" "${_knoe_cfg_files[@]}") if [[ -n "$_cfg_ctx" ]]; then export KUBECONTEXT="$_cfg_ctx" fi - unset _cfg_ns _cfg_sns _cfg_sh _cfg_sbh _cfg_ctx _prole_cfg_files _prole_cfg_f + unset _cfg_ns _cfg_sns _cfg_sh _cfg_sbh _cfg_ctx _knoe_cfg_files _knoe_cfg_f fi -if [[ -z "${PROLE_HOME:-}" && -d "$_prole_cfg_home_guess" ]]; then - PROLE_HOME="$_prole_cfg_home_guess" - export PROLE_HOME +if [[ -z "${KNOE_HOME:-}" && -d "$_knoe_cfg_home_guess" ]]; then + KNOE_HOME="$_knoe_cfg_home_guess" + export KNOE_HOME fi # Final check for critical variables -if [[ -z "${PROLE_SERVICE:-}" && -n "${PROLE_HOME:-}" ]]; then - export PROLE_SERVICE="$PROLE_HOME/etc" +if [[ -z "${KNOE_SERVICE:-}" && -n "${KNOE_HOME:-}" ]]; then + export KNOE_SERVICE="$KNOE_HOME/etc" fi -# PROLE_NAMESPACE must be set from prole.cfg only — never from environment or kubectl context +# PROLE_NAMESPACE must be set from knoe.cfg only — never from environment or kubectl context if [[ -n "${PROLE_NAMESPACE:-}" ]]; then export PROLE_NAMESPACE fi @@ -486,57 +486,57 @@ if [[ -z "${SERVICE_NAMESPACE:-}" ]]; then fi fi -# Safety: prole.cfg must override any pre-set PROLE_MODE from the environment. -# Otherwise a leaked PROLE_MODE=k3d can trigger k3d-only manifest stripping (e.g., removing +# Safety: knoe.cfg must override any pre-set KNOE_MODE from the environment. +# Otherwise a leaked KNOE_MODE=k3d can trigger k3d-only manifest stripping (e.g., removing # `storageClassName: synology-iscsi`) while targeting a k3s cluster. -_prole_cfg_mode_hint="" -if [[ -n "${prole_mode:-}" ]]; then - _prole_cfg_mode_hint=$(prole_normalize_mode "$prole_mode") +_knoe_cfg_mode_hint="" +if [[ -n "${knoe_mode:-}" ]]; then + _knoe_cfg_mode_hint=$(knoe_normalize_mode "$knoe_mode") elif [[ -n "${DEPLOYMENT_MODE:-}" ]]; then - _prole_cfg_mode_hint=$(prole_normalize_mode "$DEPLOYMENT_MODE") + _knoe_cfg_mode_hint=$(knoe_normalize_mode "$DEPLOYMENT_MODE") elif [[ -n "${CLUSTER_ENV:-}" ]]; then - _prole_cfg_mode_hint=$(prole_normalize_mode "$CLUSTER_ENV") + _knoe_cfg_mode_hint=$(knoe_normalize_mode "$CLUSTER_ENV") fi -case "${_prole_cfg_mode_hint}" in +case "${_knoe_cfg_mode_hint}" in k3d|k3s|k8s) - if [[ -n "${PROLE_MODE:-}" ]]; then - _prole_env_mode=$(prole_normalize_mode "$PROLE_MODE") - if [[ "${_prole_env_mode}" != "${_prole_cfg_mode_hint}" ]]; then - echo "WARN: Overriding PROLE_MODE='${_prole_env_mode}' with prole.cfg mode '${_prole_cfg_mode_hint}'." >&2 - PROLE_MODE="${_prole_cfg_mode_hint}" - export PROLE_MODE + if [[ -n "${KNOE_MODE:-}" ]]; then + _knoe_env_mode=$(knoe_normalize_mode "$KNOE_MODE") + if [[ "${_knoe_env_mode}" != "${_knoe_cfg_mode_hint}" ]]; then + echo "WARN: Overriding KNOE_MODE='${_knoe_env_mode}' with knoe.cfg mode '${_knoe_cfg_mode_hint}'." >&2 + KNOE_MODE="${_knoe_cfg_mode_hint}" + export KNOE_MODE fi - unset _prole_env_mode + unset _knoe_env_mode fi ;; esac -unset _prole_cfg_mode_hint +unset _knoe_cfg_mode_hint -if [[ -z "${PROLE_MODE:-}" ]]; then - if [[ -n "${prole_mode:-}" ]]; then - _prole_mode_guess=$(prole_normalize_mode "$prole_mode") - case "$_prole_mode_guess" in - k3d|k3s|k8s) PROLE_MODE="$_prole_mode_guess"; export PROLE_MODE ;; +if [[ -z "${KNOE_MODE:-}" ]]; then + if [[ -n "${knoe_mode:-}" ]]; then + _knoe_mode_guess=$(knoe_normalize_mode "$knoe_mode") + case "$_knoe_mode_guess" in + k3d|k3s|k8s) KNOE_MODE="$_knoe_mode_guess"; export KNOE_MODE ;; esac - unset _prole_mode_guess + unset _knoe_mode_guess elif [[ -n "${DEPLOYMENT_MODE:-}" ]]; then - _prole_mode_guess=$(prole_normalize_mode "$DEPLOYMENT_MODE") - case "$_prole_mode_guess" in - k3d|k3s|k8s) PROLE_MODE="$_prole_mode_guess"; export PROLE_MODE ;; + _knoe_mode_guess=$(knoe_normalize_mode "$DEPLOYMENT_MODE") + case "$_knoe_mode_guess" in + k3d|k3s|k8s) KNOE_MODE="$_knoe_mode_guess"; export KNOE_MODE ;; esac - unset _prole_mode_guess + unset _knoe_mode_guess elif [[ -n "${CLUSTER_ENV:-}" ]]; then - _prole_mode_guess=$(prole_normalize_mode "$CLUSTER_ENV") - case "$_prole_mode_guess" in - k3d|k3s|k8s) PROLE_MODE="$_prole_mode_guess"; export PROLE_MODE ;; + _knoe_mode_guess=$(knoe_normalize_mode "$CLUSTER_ENV") + case "$_knoe_mode_guess" in + k3d|k3s|k8s) KNOE_MODE="$_knoe_mode_guess"; export KNOE_MODE ;; esac - unset _prole_mode_guess + unset _knoe_mode_guess fi fi if [[ -n "${PROLE_NAMESPACE:-}" ]]; then - _prole_mode_resolved=$(prole_normalize_mode "${PROLE_MODE:-}") - case "$_prole_mode_resolved" in + _knoe_mode_resolved=$(knoe_normalize_mode "${KNOE_MODE:-}") + case "$_knoe_mode_resolved" in k3d) if [[ -n "${LOCAL_REGISTRY_INTERNAL:-}" ]]; then if [[ "${LOCAL_REGISTRY_INTERNAL}" == *.localhost:5000 ]]; then @@ -546,16 +546,16 @@ if [[ -n "${PROLE_NAMESPACE:-}" ]]; then LOCAL_REGISTRY_INTERNAL="${LOCAL_REGISTRY_INTERNAL%.localhost}" export LOCAL_REGISTRY_INTERNAL fi - elif _prole_local_registry_enabled; then - LOCAL_REGISTRY_INTERNAL="k3d-prole-registry:5000" + elif _knoe_local_registry_enabled; then + LOCAL_REGISTRY_INTERNAL="k3d-knoe-registry:5000" export LOCAL_REGISTRY_INTERNAL fi ;; esac - case "$_prole_mode_resolved" in + case "$_knoe_mode_resolved" in k3s|k8s) # Registry namespace is driven by config (SERVICE_NAMESPACE) unless explicitly overridden. - _prole_registry_ns="${REGISTRY_NAMESPACE:-${SERVICE_NAMESPACE:-${PROLE_NAMESPACE:-}}}" + _knoe_registry_ns="${REGISTRY_NAMESPACE:-${SERVICE_NAMESPACE:-${PROLE_NAMESPACE:-}}}" if [[ -n "${LOCAL_REGISTRY_INTERNAL:-}" ]]; then # Values like ".localhost:5000" are host-only (k3d) and are not reachable from # k3s/k8s nodes. Treat them as unset so we can auto-resolve a usable in-cluster registry. @@ -565,41 +565,41 @@ if [[ -n "${PROLE_NAMESPACE:-}" ]]; then fi if [[ -n "${LOCAL_REGISTRY_INTERNAL:-}" ]]; then : - elif _prole_local_registry_enabled; then - _prole_registry_host="$(_prole_host_from_url "${PROLE_K3S_SERVER:-${K3S_SERVER_URL:-}}")" - if [[ -n "${_prole_registry_host:-}" ]]; then - LOCAL_REGISTRY_INTERNAL="${_prole_registry_host}:5000" + elif _knoe_local_registry_enabled; then + _knoe_registry_host="$(_knoe_host_from_url "${PROLE_K3S_SERVER:-${K3S_SERVER_URL:-}}")" + if [[ -n "${_knoe_registry_host:-}" ]]; then + LOCAL_REGISTRY_INTERNAL="${_knoe_registry_host}:5000" export LOCAL_REGISTRY_INTERNAL - elif [[ -n "${_prole_registry_ns:-}" ]]; then - LOCAL_REGISTRY_INTERNAL="registry.${_prole_registry_ns}.svc.cluster.local:5000" + elif [[ -n "${_knoe_registry_ns:-}" ]]; then + LOCAL_REGISTRY_INTERNAL="registry.${_knoe_registry_ns}.svc.cluster.local:5000" export LOCAL_REGISTRY_INTERNAL fi - unset _prole_registry_host + unset _knoe_registry_host fi - unset _prole_registry_ns + unset _knoe_registry_ns ;; esac - unset _prole_mode_resolved + unset _knoe_mode_resolved fi -_prole_is_secret_ref() { +_knoe_is_secret_ref() { case "${1:-}" in - '${PROLE_SECRET:'*|'${OPENBAO:'*) return 0 ;; + '${KNOE_SECRET:'*|'${OPENBAO:'*) return 0 ;; esac return 1 } -_prole_is_openbao_ref() { +_knoe_is_openbao_ref() { case "${1:-}" in '${OPENBAO:'*) return 0 ;; esac return 1 } -_prole_decrypt_prole_secret() { +_knoe_decrypt_knoe_secret() { local value="${1:-}" case "$value" in - '${PROLE_SECRET:'*) ;; + '${KNOE_SECRET:'*) ;; *) printf '%s' "$value"; return 0 ;; esac python3 - "$value" <<'PY' @@ -610,11 +610,11 @@ import subprocess import sys from pathlib import Path -PROLE_SECRET_PREFIX = "${PROLE_SECRET:" -PROLE_SECRET_SUFFIX = "}" -PROLE_SECRET_VERSION = "v1" -PROLE_SECRET_SERVICE = "prole-installer" -PROLE_SECRET_KEY_FILE = Path.home() / ".prole" / "secrets" / "installer.key" +KNOE_SECRET_PREFIX = "${KNOE_SECRET:" +KNOE_SECRET_SUFFIX = "}" +KNOE_SECRET_VERSION = "v1" +KNOE_SECRET_SERVICE = "knoe-installer" +KNOE_SECRET_KEY_FILE = Path.home() / ".knoe" / "secrets" / "installer.key" def get_keychain_key(service: str, account: str) -> bytes: try: @@ -640,17 +640,17 @@ def get_file_key(path: Path) -> bytes: def get_secret_key() -> bytes: system = platform.system() - account = getpass.getuser() or "prole" + account = getpass.getuser() or "knoe" if system == "Darwin": - return get_keychain_key(PROLE_SECRET_SERVICE, account) - return get_file_key(PROLE_SECRET_KEY_FILE) + return get_keychain_key(KNOE_SECRET_SERVICE, account) + return get_file_key(KNOE_SECRET_KEY_FILE) -def decrypt_prole_secret(value: str) -> str: - if not (value.startswith(PROLE_SECRET_PREFIX) and value.endswith(PROLE_SECRET_SUFFIX)): +def decrypt_knoe_secret(value: str) -> str: + if not (value.startswith(KNOE_SECRET_PREFIX) and value.endswith(KNOE_SECRET_SUFFIX)): return value - inner = value[len(PROLE_SECRET_PREFIX):-len(PROLE_SECRET_SUFFIX)] + inner = value[len(KNOE_SECRET_PREFIX):-len(KNOE_SECRET_SUFFIX)] parts = inner.split(":") - if len(parts) != 3 or parts[0] != PROLE_SECRET_VERSION: + if len(parts) != 3 or parts[0] != KNOE_SECRET_VERSION: return "" key = get_secret_key() if not key: @@ -665,12 +665,12 @@ def decrypt_prole_secret(value: str) -> str: return "" value = sys.argv[1] -out = decrypt_prole_secret(value) +out = decrypt_knoe_secret(value) print(out) PY } -_prole_resolve_openbao_ref() { +_knoe_resolve_openbao_ref() { local value="${1:-}" case "$value" in '${OPENBAO:'*) ;; @@ -702,9 +702,9 @@ def resolve_openbao_ref(value: str) -> str: token = os.environ.get("OPENBAO_ROOT_TOKEN", "") if not token: - prole_service = os.environ.get("PROLE_SERVICE", "") - if prole_service: - token_path = os.path.join(prole_service, "secrets", "openbao-root-token") + knoe_service = os.environ.get("KNOE_SERVICE", "") + if knoe_service: + token_path = os.path.join(knoe_service, "secrets", "openbao-root-token") try: if os.path.exists(token_path): token = open(token_path, "r", encoding="utf-8").read().strip() @@ -717,7 +717,7 @@ def resolve_openbao_ref(value: str) -> str: if not url: # In k3s mode, do NOT fall back to localhost/port-forward. Derive the external # OpenBao URL from the k3s API server URL when available. - mode = (os.environ.get("PROLE_MODE") or os.environ.get("DEPLOYMENT_MODE") or "").strip().lower() + mode = (os.environ.get("KNOE_MODE") or os.environ.get("DEPLOYMENT_MODE") or "").strip().lower() if mode == "k3s": k3s_server = (os.environ.get("PROLE_K3S_SERVER") or os.environ.get("K3S_SERVER_URL") or "").strip() if k3s_server: @@ -739,7 +739,7 @@ def resolve_openbao_ref(value: str) -> str: except Exception: pass if not url: - mode = (os.environ.get("PROLE_MODE") or os.environ.get("DEPLOYMENT_MODE") or "").strip().lower() + mode = (os.environ.get("KNOE_MODE") or os.environ.get("DEPLOYMENT_MODE") or "").strip().lower() if mode != "k3s": url = "http://127.0.0.1:8200" else: @@ -759,7 +759,7 @@ print(resolve_openbao_ref(value)) PY } -_prole_usable_dir() { +_knoe_usable_dir() { local dir="$1" if [[ -z "$dir" ]]; then return 1; fi if [[ -w "$dir" ]] || [[ ! -e "$dir" && -w "$(dirname "$dir" 2>/dev/null)" ]]; then @@ -769,32 +769,32 @@ _prole_usable_dir() { return 1 } -_prole_kubeconfig_path() { +_knoe_kubeconfig_path() { local base="" - # Try PROLE_SERVICE, then PROLE_HOME, then guess - local candidates=("${PROLE_SERVICE:-}/secrets" "${PROLE_HOME:-}" "${_prole_cfg_home_guess:-}") + # Try KNOE_SERVICE, then KNOE_HOME, then guess + local candidates=("${KNOE_SERVICE:-}/secrets" "${KNOE_HOME:-}" "${_knoe_cfg_home_guess:-}") for b in "${candidates[@]}"; do if [[ -z "$b" ]]; then continue; fi - if _prole_usable_dir "$b" >/dev/null; then + if _knoe_usable_dir "$b" >/dev/null; then base="$b" break fi done - # Fallback to ~/.prole if everything else failed + # Fallback to ~/.knoe if everything else failed if [[ -z "$base" ]]; then - base="$HOME/.prole/secrets" + base="$HOME/.knoe/secrets" mkdir -p "$base" 2>/dev/null || true fi if [[ "$base" == */secrets ]]; then printf '%s\n' "${base}/k3s.kubeconfig" else - printf '%s\n' "${base}/prole-k3s.kubeconfig" + printf '%s\n' "${base}/knoe-k3s.kubeconfig" fi } -_prole_token_is_bearer() { +_knoe_token_is_bearer() { local token="$1" [[ -z "$token" ]] && return 1 # K3s node tokens include '::' and are not valid API bearer tokens. @@ -814,35 +814,35 @@ _prole_token_is_bearer() { return 1 } -_prole_kubeconfig_from_token() { +_knoe_kubeconfig_from_token() { local server token ns server="${PROLE_K3S_SERVER:-${K3S_SERVER_URL:-}}" token="${PROLE_K3S_TOKEN:-${K3S_TOKEN:-}}" ns="${SERVICE_NAMESPACE:-${NAMESPACE:-default}}" - if _prole_is_openbao_ref "$token"; then - token=$(_prole_resolve_openbao_ref "$token") - elif [[ "$token" == '${PROLE_SECRET:'* ]]; then - token=$(_prole_decrypt_prole_secret "$token") + if _knoe_is_openbao_ref "$token"; then + token=$(_knoe_resolve_openbao_ref "$token") + elif [[ "$token" == '${KNOE_SECRET:'* ]]; then + token=$(_knoe_decrypt_knoe_secret "$token") fi if [[ -z "$server" ]]; then - echo "DEBUG: _prole_kubeconfig_from_token: server is empty" >&2 + echo "DEBUG: _knoe_kubeconfig_from_token: server is empty" >&2 return 1 fi if [[ -z "$token" ]]; then - echo "DEBUG: _prole_kubeconfig_from_token: token is empty" >&2 + echo "DEBUG: _knoe_kubeconfig_from_token: token is empty" >&2 return 1 fi - if ! _prole_token_is_bearer "$token"; then - echo "DEBUG: _prole_kubeconfig_from_token: token is not a bearer token" >&2 + if ! _knoe_token_is_bearer "$token"; then + echo "DEBUG: _knoe_kubeconfig_from_token: token is not a bearer token" >&2 return 1 fi if [[ "$server" != http* ]]; then server="https://$server" fi local cfg_path - cfg_path="$(_prole_kubeconfig_path)" || return 1 + cfg_path="$(_knoe_kubeconfig_path)" || return 1 # Never overwrite a kubeconfig that uses client-certificate auth if [[ -f "$cfg_path" ]] && grep -q "client-certificate-data" "$cfg_path" 2>/dev/null; then export KUBECONFIG="$cfg_path" @@ -853,36 +853,36 @@ _prole_kubeconfig_from_token() { apiVersion: v1 kind: Config clusters: -- name: prole-k3s +- name: knoe-k3s cluster: server: ${server} insecure-skip-tls-verify: true users: -- name: prole-k3s +- name: knoe-k3s user: token: ${token} contexts: -- name: prole-k3s +- name: knoe-k3s context: - cluster: prole-k3s - user: prole-k3s + cluster: knoe-k3s + user: knoe-k3s namespace: ${ns} -current-context: prole-k3s +current-context: knoe-k3s EOF chmod 600 "$cfg_path" 2>/dev/null || true export KUBECONFIG="$cfg_path" return 0 } -prole_ensure_kubeconfig() { - if [[ "${PROLE_MODE:-}" == "k3d" ]]; then +knoe_ensure_kubeconfig() { + if [[ "${KNOE_MODE:-}" == "k3d" ]]; then return 0 fi - local _prole_insecure_flag - _prole_insecure_flag="${PROLE_K3S_SKIP_TLS_VERIFY:-${K3S_SKIP_TLS_VERIFY:-${PROLE_K3S_INSECURE:-${K3S_INSECURE:-}}}}" - _prole_kubeconfig_maybe_insecure() { - if _prole_bool_true "${_prole_insecure_flag:-}"; then - _prole_kubeconfig_mark_insecure "${KUBECONFIG:-}" >/dev/null 2>&1 || true + local _knoe_insecure_flag + _knoe_insecure_flag="${PROLE_K3S_SKIP_TLS_VERIFY:-${K3S_SKIP_TLS_VERIFY:-${PROLE_K3S_INSECURE:-${K3S_INSECURE:-}}}}" + _knoe_kubeconfig_maybe_insecure() { + if _knoe_bool_true "${_knoe_insecure_flag:-}"; then + _knoe_kubeconfig_mark_insecure "${KUBECONFIG:-}" >/dev/null 2>&1 || true fi } @@ -898,44 +898,44 @@ prole_ensure_kubeconfig() { } # Prefer an existing valid kubeconfig (e.g. Ansible-fetched with client certs) - # over generating a new token-based one from prole.cfg. + # over generating a new token-based one from knoe.cfg. if [[ -n "${KUBECONFIG:-}" && -f "${KUBECONFIG:-}" ]]; then - _prole_kubeconfig_maybe_insecure + _knoe_kubeconfig_maybe_insecure if _verify_kubeconfig; then return 0; fi fi - if [[ -n "${PROLE_SERVICE:-}" && -f "${PROLE_SERVICE}/secrets/k3s.kubeconfig" ]]; then - export KUBECONFIG="${PROLE_SERVICE}/secrets/k3s.kubeconfig" - _prole_kubeconfig_maybe_insecure + if [[ -n "${KNOE_SERVICE:-}" && -f "${KNOE_SERVICE}/secrets/k3s.kubeconfig" ]]; then + export KUBECONFIG="${KNOE_SERVICE}/secrets/k3s.kubeconfig" + _knoe_kubeconfig_maybe_insecure if _verify_kubeconfig; then return 0; fi fi if [[ -n "${PROLE_K3S_KUBECONFIG:-}" && -f "${PROLE_K3S_KUBECONFIG}" ]]; then export KUBECONFIG="${PROLE_K3S_KUBECONFIG}" - _prole_kubeconfig_maybe_insecure + _knoe_kubeconfig_maybe_insecure if _verify_kubeconfig; then return 0; fi fi if [[ -n "${PROLE_KUBECONFIG:-}" && -f "${PROLE_KUBECONFIG}" ]]; then export KUBECONFIG="${PROLE_KUBECONFIG}" - _prole_kubeconfig_maybe_insecure + _knoe_kubeconfig_maybe_insecure if _verify_kubeconfig; then return 0; fi fi - if [[ -n "${PROLE_HOME:-}" && -f "${PROLE_HOME}/prole-k3s.kubeconfig" ]]; then - export KUBECONFIG="${PROLE_HOME}/prole-k3s.kubeconfig" - _prole_kubeconfig_maybe_insecure + if [[ -n "${KNOE_HOME:-}" && -f "${KNOE_HOME}/knoe-k3s.kubeconfig" ]]; then + export KUBECONFIG="${KNOE_HOME}/knoe-k3s.kubeconfig" + _knoe_kubeconfig_maybe_insecure if _verify_kubeconfig; then return 0; fi fi - if [[ -f "${_prole_cfg_home_guess:-}/prole-k3s.kubeconfig" ]]; then - export KUBECONFIG="${_prole_cfg_home_guess:-}/prole-k3s.kubeconfig" - _prole_kubeconfig_maybe_insecure + if [[ -f "${_knoe_cfg_home_guess:-}/knoe-k3s.kubeconfig" ]]; then + export KUBECONFIG="${_knoe_cfg_home_guess:-}/knoe-k3s.kubeconfig" + _knoe_kubeconfig_maybe_insecure if _verify_kubeconfig; then return 0; fi fi if [[ -r "/etc/rancher/k3s/k3s.yaml" ]]; then export KUBECONFIG="/etc/rancher/k3s/k3s.yaml" - _prole_kubeconfig_maybe_insecure + _knoe_kubeconfig_maybe_insecure if _verify_kubeconfig; then return 0; fi fi - _prole_kubeconfig_from_token - _prole_kubeconfig_maybe_insecure + _knoe_kubeconfig_from_token + _knoe_kubeconfig_maybe_insecure if _verify_kubeconfig; then return 0; fi # Final fallback: if nothing worked, restore original or unset so system default is used @@ -953,13 +953,13 @@ prole_ensure_kubeconfig() { return 1 } -# Validate and switch the active kubectl context to match PROLE_MODE set in prole.cfg. -# prole.cfg always overrides the local environment. -# Call this after prole_ensure_kubeconfig in every init_*.sh script. -# Usage: prole_ensure_kube_context -prole_ensure_kube_context() { +# Validate and switch the active kubectl context to match KNOE_MODE set in knoe.cfg. +# knoe.cfg always overrides the local environment. +# Call this after knoe_ensure_kubeconfig in every init_*.sh script. +# Usage: knoe_ensure_kube_context +knoe_ensure_kube_context() { local mode - mode="${PROLE_MODE:-}" + mode="${KNOE_MODE:-}" if [[ -z "$mode" ]]; then return 0 fi @@ -1012,8 +1012,8 @@ prole_ensure_kube_context() { fi if [[ $do_switch -eq 1 ]]; then - echo "DEBUG: prole_ensure_kube_context: Switching context to '${desired_context}'" >&2 - echo "INFO: Switching kubectl context to '${desired_context}' (prole.cfg overrides local env)" >&2 + echo "DEBUG: knoe_ensure_kube_context: Switching context to '${desired_context}'" >&2 + echo "INFO: Switching kubectl context to '${desired_context}' (knoe.cfg overrides local env)" >&2 if kubectl config use-context "$desired_context" >/dev/null 2>&1; then echo "INFO: kubectl context set to '${desired_context}'" >&2 return 0 @@ -1024,7 +1024,7 @@ prole_ensure_kube_context() { fi fi else - echo "DEBUG: prole_ensure_kube_context: current_context='${current_context}', KUBECONTEXT='${KUBECONTEXT:-}'" >&2 + echo "DEBUG: knoe_ensure_kube_context: current_context='${current_context}', KUBECONTEXT='${KUBECONTEXT:-}'" >&2 fi case "$mode" in @@ -1036,8 +1036,8 @@ prole_ensure_kube_context() { local cluster_name target_context cluster_name="${K3D_CLUSTER_NAME:-knoe-dev-cluster}" target_context="k3d-${cluster_name}" - echo "WARN: prole.cfg mode is 'k3d' but current kubectx is '${current_context:-}'" >&2 - echo "INFO: Switching kubectl context to '${target_context}' (prole.cfg overrides local env)" >&2 + echo "WARN: knoe.cfg mode is 'k3d' but current kubectx is '${current_context:-}'" >&2 + echo "INFO: Switching kubectl context to '${target_context}' (knoe.cfg overrides local env)" >&2 if kubectl config use-context "$target_context" >/dev/null 2>&1; then echo "INFO: kubectl context set to '${target_context}'" >&2 else @@ -1051,8 +1051,8 @@ prole_ensure_kube_context() { if [[ "$current_context" != k3d-* ]]; then return 0 fi - echo "WARN: prole.cfg mode is '${mode}' but current kubectx is '${current_context}' (a k3d context)" >&2 - echo "INFO: Switching kubectl context to match KUBECONFIG='${KUBECONFIG:-}' (prole.cfg overrides local env)" >&2 + echo "WARN: knoe.cfg mode is '${mode}' but current kubectx is '${current_context}' (a k3d context)" >&2 + echo "INFO: Switching kubectl context to match KUBECONFIG='${KUBECONFIG:-}' (knoe.cfg overrides local env)" >&2 local target_context if [[ -n "${KUBECONTEXT:-}" ]]; then target_context="${KUBECONTEXT}" @@ -1075,11 +1075,11 @@ prole_ensure_kube_context() { esac } -if _prole_is_secret_ref "${PROLE_K3S_TOKEN:-}"; then - if _prole_is_openbao_ref "${PROLE_K3S_TOKEN:-}"; then - _decoded=$(_prole_resolve_openbao_ref "${PROLE_K3S_TOKEN:-}") +if _knoe_is_secret_ref "${PROLE_K3S_TOKEN:-}"; then + if _knoe_is_openbao_ref "${PROLE_K3S_TOKEN:-}"; then + _decoded=$(_knoe_resolve_openbao_ref "${PROLE_K3S_TOKEN:-}") else - _decoded=$(_prole_decrypt_prole_secret "${PROLE_K3S_TOKEN:-}") + _decoded=$(_knoe_decrypt_knoe_secret "${PROLE_K3S_TOKEN:-}") fi if [[ -n "$_decoded" ]]; then PROLE_K3S_TOKEN="$_decoded" @@ -1088,11 +1088,11 @@ if _prole_is_secret_ref "${PROLE_K3S_TOKEN:-}"; then unset PROLE_K3S_TOKEN fi fi -if _prole_is_secret_ref "${K3S_TOKEN:-}"; then - if _prole_is_openbao_ref "${K3S_TOKEN:-}"; then - _decoded=$(_prole_resolve_openbao_ref "${K3S_TOKEN:-}") +if _knoe_is_secret_ref "${K3S_TOKEN:-}"; then + if _knoe_is_openbao_ref "${K3S_TOKEN:-}"; then + _decoded=$(_knoe_resolve_openbao_ref "${K3S_TOKEN:-}") else - _decoded=$(_prole_decrypt_prole_secret "${K3S_TOKEN:-}") + _decoded=$(_knoe_decrypt_knoe_secret "${K3S_TOKEN:-}") fi if [[ -n "$_decoded" ]]; then K3S_TOKEN="$_decoded" @@ -1103,49 +1103,49 @@ if _prole_is_secret_ref "${K3S_TOKEN:-}"; then fi if [[ -z "${KUBECONFIG:-}" ]]; then - _prole_mode_guess="" - if command -v prole_normalize_mode >/dev/null 2>&1; then - _prole_mode_guess=$(prole_normalize_mode "${PROLE_MODE:-${DEPLOYMENT_MODE:-${CLUSTER_ENV:-}}}") + _knoe_mode_guess="" + if command -v knoe_normalize_mode >/dev/null 2>&1; then + _knoe_mode_guess=$(knoe_normalize_mode "${KNOE_MODE:-${DEPLOYMENT_MODE:-${CLUSTER_ENV:-}}}") else - _prole_mode_guess="${PROLE_MODE:-${DEPLOYMENT_MODE:-${CLUSTER_ENV:-}}}" + _knoe_mode_guess="${KNOE_MODE:-${DEPLOYMENT_MODE:-${CLUSTER_ENV:-}}}" fi - if [[ "$_prole_mode_guess" == "k3s" ]]; then - prole_ensure_kubeconfig || true + if [[ "$_knoe_mode_guess" == "k3s" ]]; then + knoe_ensure_kubeconfig || true fi - unset _prole_mode_guess + unset _knoe_mode_guess fi -_prole_child_ns="${PROLE_NAMESPACE:-}" -_prole_child_id="" +_knoe_child_ns="${PROLE_NAMESPACE:-}" +_knoe_child_id="" if [[ -n "${PROLE_CHILD_ID:-}" ]]; then - _prole_child_id="${PROLE_CHILD_ID}" -elif [[ -n "$_prole_child_ns" && "$_prole_child_ns" =~ ^knoe-db-([A-Za-z0-9]+)$ ]]; then - _prole_child_id=$(printf '%s' "${BASH_REMATCH[1]}" | tr '[:lower:]' '[:upper:]') + _knoe_child_id="${PROLE_CHILD_ID}" +elif [[ -n "$_knoe_child_ns" && "$_knoe_child_ns" =~ ^knoe-db-([A-Za-z0-9]+)$ ]]; then + _knoe_child_id=$(printf '%s' "${BASH_REMATCH[1]}" | tr '[:lower:]' '[:upper:]') fi -_prole_parent_realm="${PROLE_PARENT_REALM:-${REALM:-${KRB5_REALM:-${kerberos_config_realm:-}}}}" -if [[ -n "$_prole_parent_realm" ]]; then - _prole_parent_realm=$(printf '%s' "$_prole_parent_realm" | tr '[:lower:]' '[:upper:]') +_knoe_parent_realm="${PROLE_PARENT_REALM:-${REALM:-${KRB5_REALM:-${kerberos_config_realm:-}}}}" +if [[ -n "$_knoe_parent_realm" ]]; then + _knoe_parent_realm=$(printf '%s' "$_knoe_parent_realm" | tr '[:lower:]' '[:upper:]') if [[ -z "${PROLE_PARENT_REALM:-}" ]]; then - PROLE_PARENT_REALM="$_prole_parent_realm" + PROLE_PARENT_REALM="$_knoe_parent_realm" export PROLE_PARENT_REALM fi fi -if [[ -n "$_prole_child_id" ]]; then - PROLE_CHILD_ID="${PROLE_CHILD_ID:-$_prole_child_id}" +if [[ -n "$_knoe_child_id" ]]; then + PROLE_CHILD_ID="${PROLE_CHILD_ID:-$_knoe_child_id}" export PROLE_CHILD_ID if [[ -n "${PROLE_CHILD_REALM:-}" ]]; then : - elif [[ -n "$_prole_parent_realm" ]]; then - if [[ "$_prole_parent_realm" == "${PROLE_CHILD_ID}."* ]]; then - PROLE_CHILD_REALM="$_prole_parent_realm" + elif [[ -n "$_knoe_parent_realm" ]]; then + if [[ "$_knoe_parent_realm" == "${PROLE_CHILD_ID}."* ]]; then + PROLE_CHILD_REALM="$_knoe_parent_realm" if [[ -z "${PROLE_PARENT_REALM:-}" ]]; then - PROLE_PARENT_REALM="${_prole_parent_realm#${PROLE_CHILD_ID}.}" + PROLE_PARENT_REALM="${_knoe_parent_realm#${PROLE_CHILD_ID}.}" export PROLE_PARENT_REALM fi else - PROLE_CHILD_REALM="${PROLE_CHILD_ID}.${_prole_parent_realm}" + PROLE_CHILD_REALM="${PROLE_CHILD_ID}.${_knoe_parent_realm}" fi fi @@ -1163,7 +1163,7 @@ if [[ -z "${PROLE_USE_CHILD_REALM:-}" && -n "${PROLE_CHILD_REALM:-}" ]]; then export PROLE_USE_CHILD_REALM fi -if _prole_bool_true "${PROLE_USE_CHILD_REALM:-}" && [[ -n "${PROLE_CHILD_REALM:-}" ]]; then +if _knoe_bool_true "${PROLE_USE_CHILD_REALM:-}" && [[ -n "${PROLE_CHILD_REALM:-}" ]]; then if [[ -z "${KRB5_REALM:-}" || ( -n "${PROLE_PARENT_REALM:-}" && "${KRB5_REALM}" == "${PROLE_PARENT_REALM}" ) ]]; then KRB5_REALM="${PROLE_CHILD_REALM}" export KRB5_REALM @@ -1174,7 +1174,7 @@ if _prole_bool_true "${PROLE_USE_CHILD_REALM:-}" && [[ -n "${PROLE_CHILD_REALM:- fi fi -prole_register_port_forward() { +knoe_register_port_forward() { local id="$1" ns="$2" target="$3" hostPort="$4" servicePort="$5" local addr="${6:-0.0.0.0}" local proto="${7:-TCP}" @@ -1182,7 +1182,7 @@ prole_register_port_forward() { echo "PORT_FORWARD_MAPPING: id=$id;namespace=$ns;target=$target;address=$addr;hostPort=$hostPort;servicePort=$servicePort;protocol=$proto;description=$desc" } -unset _prole_cfg_script_dir -unset _prole_cfg_home_guess -unset _prole_cfg_file +unset _knoe_cfg_script_dir +unset _knoe_cfg_home_guess +unset _knoe_cfg_file unset _PROLE_CFG_SET_VARS diff --git a/mock_val/render_manifest.py b/mock_val/render_manifest.py index 9986a17..bbdf63a 100644 --- a/mock_val/render_manifest.py +++ b/mock_val/render_manifest.py @@ -100,7 +100,7 @@ def main() -> int: return 1 text = path.read_text() - mode = os.environ.get("PROLE_MODE", "").strip().lower() + mode = os.environ.get("KNOE_MODE", "").strip().lower() if mode != "k3d": sys.stdout.write(text) return 0 diff --git a/mock_val/repair_pipeline.sh b/mock_val/repair_pipeline.sh index e904f24..92bdfb8 100755 --- a/mock_val/repair_pipeline.sh +++ b/mock_val/repair_pipeline.sh @@ -70,8 +70,8 @@ while [[ $# -gt 0 ]]; do shift done -export PROLE_HOME="${PROLE_HOME:-$ROOT_DIR}" -export PROLE_CONF="${PROLE_CONF:-${CFG_PATH:-$PROLE_HOME/conf}}" +export KNOE_HOME="${KNOE_HOME:-$ROOT_DIR}" +export KNOE_CONF="${KNOE_CONF:-${CFG_PATH:-$KNOE_HOME/conf}}" # Ensure local imports work when invoked from a copied script location. export PYTHONPATH="$ROOT_DIR${PYTHONPATH:+:$PYTHONPATH}" @@ -86,6 +86,6 @@ fi if [[ -n "$MODE" ]]; then args+=("--mode" "$MODE") fi -args+=("--config" "$PROLE_CONF") +args+=("--config" "$KNOE_CONF") exec python3 -m installer.core.repair_pipeline_cli "${args[@]}" diff --git a/mock_val/set-k3s-token-vault.sh b/mock_val/set-k3s-token-vault.sh index c4d8519..b8e3378 100755 --- a/mock_val/set-k3s-token-vault.sh +++ b/mock_val/set-k3s-token-vault.sh @@ -3,7 +3,7 @@ set -euo pipefail SCRIPT_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) # shellcheck disable=SC1090 -source "$SCRIPT_DIR/prole_cfg.sh" +source "$SCRIPT_DIR/knoe_cfg.sh" # Where k3s keeps the server join token on the first/control-plane server TOKEN_FILE="${TOKEN_FILE:-/var/lib/rancher/k3s/server/node-token}" @@ -17,7 +17,7 @@ VAR_NAME="${VAR_NAME:-vault_k3s_token}" if [[ ! -r "$TOKEN_FILE" ]]; then echo "ERROR: Cannot read token file: $TOKEN_FILE" - echo "Are you running this on a k3s server (pi.prole.org)?" + echo "Are you running this on a k3s server (pi.knoe.org)?" exit 1 fi @@ -68,4 +68,4 @@ echo "Wrote: $VAULT_FILE" echo "Var: $VAR_NAME" echo echo "Verify with:" -echo " ansible -i infrastructure/inventory/hosts.ini pi.prole.org -m assert -a 'that=${VAR_NAME} is defined' --ask-vault-pass" +echo " ansible -i infrastructure/inventory/hosts.ini pi.knoe.org -m assert -a 'that=${VAR_NAME} is defined' --ask-vault-pass" diff --git a/mock_val/status.sh b/mock_val/status.sh index e4dddac..53f4773 100755 --- a/mock_val/status.sh +++ b/mock_val/status.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -# etc/status.sh — Overall deployment health check for the Prole k3d environment. -# Usage: status.sh [-c conf/prole.cfg] [-v|--verbose] +# etc/status.sh — Overall deployment health check for the Knoe k3d environment. +# Usage: status.sh [-c conf/knoe.cfg] [-v|--verbose] # Exit 0 = score of 100% (all components healthy) # Exit 1 = score < 100% set -u @@ -30,10 +30,10 @@ CNPG_CLUSTER_NAME="${CNPG_CLUSTER_NAME:-knoe-db}" # ── helpers ────────────────────────────────────────────────────────────── usage() { cat <] [-v|--verbose] [-h|--help] +Usage: $(basename "$0") [-c ] [-v|--verbose] [-h|--help] Overall deployment health check. - -c, --config Path to prole.cfg (default: conf/prole.cfg) + -c, --config Path to knoe.cfg (default: conf/knoe.cfg) -v, --verbose Show full stdout/stderr from each status check -h, --help Show this help EOF @@ -81,17 +81,17 @@ while [[ $# -gt 0 ]]; do esac done -# ── load prole.cfg (always) ───────────────────────────────────────────── +# ── load knoe.cfg (always) ───────────────────────────────────────────── if [[ -z "$CFG_PATH" ]]; then - CFG_PATH="$PROJECT_ROOT/conf/prole.cfg" + CFG_PATH="$PROJECT_ROOT/conf/knoe.cfg" fi if [[ ! -f "$CFG_PATH" ]]; then - echo "FATAL: prole.cfg not found at $CFG_PATH" >&2 + echo "FATAL: knoe.cfg not found at $CFG_PATH" >&2 exit 1 fi # Minimal INI reader — pull NAMESPACE, KUBECONFIG, KERBEROS_ENABLED, -# SUPABASE_ENABLED from prole.cfg if not already set in the environment. +# SUPABASE_ENABLED from knoe.cfg if not already set in the environment. _read_cfg_value() { local key="$1" local val="" @@ -127,12 +127,12 @@ if [[ -z "$KUBECONFIG" ]]; then fi fi # Fallback: project-local kubeconfig (only if it can reach the cluster) -if [[ -z "${KUBECONFIG:-}" && -f "$PROJECT_ROOT/prole-k3s.kubeconfig" ]]; then +if [[ -z "${KUBECONFIG:-}" && -f "$PROJECT_ROOT/knoe-k3s.kubeconfig" ]]; then # Only auto-select the project-local k3s kubeconfig when explicitly running in k3s mode. # In k3d mode, this kubeconfig may be reachable but is the wrong cluster. if [[ "${_deployment_mode,,}" == "k3s" ]]; then - if KUBECONFIG="$PROJECT_ROOT/prole-k3s.kubeconfig" kubectl cluster-info >/dev/null 2>&1; then - export KUBECONFIG="$PROJECT_ROOT/prole-k3s.kubeconfig" + if KUBECONFIG="$PROJECT_ROOT/knoe-k3s.kubeconfig" kubectl cluster-info >/dev/null 2>&1; then + export KUBECONFIG="$PROJECT_ROOT/knoe-k3s.kubeconfig" fi fi fi @@ -165,7 +165,7 @@ SUPABASE_WEIGHT=10 # Only counted if supabase is enabled # ── header ─────────────────────────────────────────────────────────────── echo "" -printf "${BOLD}Prole Deployment Status${NC}\n" +printf "${BOLD}Knoe Deployment Status${NC}\n" echo "───────────────────────────────────────────" info "Config: $CFG_PATH" info "Namespace: $PROLE_NAMESPACE" @@ -286,7 +286,7 @@ run_status_check() { fi local _output_file - _output_file=$(mktemp "${TMPDIR:-/tmp}/prole_status_XXXXXX") + _output_file=$(mktemp "${TMPDIR:-/tmp}/knoe_status_XXXXXX") local rc run_with_timeout "$STATUS_CHECK_TIMEOUT" bash "$script_path" status >"$_output_file" 2>&1 && rc=0 || rc=$? @@ -374,7 +374,7 @@ if [[ -f "$SCRIPT_DIR/status_common_services.sh" ]]; then if _is_true "${_kerberos_enabled:-false}"; then cs_args+=("-k") fi - _cs_output_file=$(mktemp "${TMPDIR:-/tmp}/prole_cs_status_XXXXXX") + _cs_output_file=$(mktemp "${TMPDIR:-/tmp}/knoe_cs_status_XXXXXX") run_with_timeout "$STATUS_CHECK_TIMEOUT" bash "$SCRIPT_DIR/status_common_services.sh" "${cs_args[@]}" >"$_cs_output_file" 2>&1 && cs_rc=0 || cs_rc=$? cs_output=$(cat "$_cs_output_file" 2>/dev/null || true) rm -f "$_cs_output_file" diff --git a/mock_val/status_common_services.sh b/mock_val/status_common_services.sh index 8be40a3..35b4bcd 100755 --- a/mock_val/status_common_services.sh +++ b/mock_val/status_common_services.sh @@ -11,22 +11,22 @@ _has_config=0 for _arg in "$@"; do [[ "$_arg" == "-c" || "$_arg" == "--config" || "$_arg" == -c=* || "$_arg" == --config=* ]] && _has_config=1 done -if [[ $_has_config -eq 0 && -f "$SCRIPT_DIR/../conf/prole.cfg" ]]; then - set -- "-c" "$SCRIPT_DIR/../conf/prole.cfg" "$@" +if [[ $_has_config -eq 0 && -f "$SCRIPT_DIR/../conf/knoe.cfg" ]]; then + set -- "-c" "$SCRIPT_DIR/../conf/knoe.cfg" "$@" fi unset _has_config _arg common_core_preparse_config "$@" # shellcheck disable=SC1090 -source "$SCRIPT_DIR/prole_cfg.sh" +source "$SCRIPT_DIR/knoe_cfg.sh" usage() { cat </dev/null 2>&1; then fi current_mode() { - if declare -F prole_normalize_mode >/dev/null 2>&1; then - prole_normalize_mode "${PROLE_MODE:-${DEPLOYMENT_MODE:-}}" + if declare -F knoe_normalize_mode >/dev/null 2>&1; then + knoe_normalize_mode "${KNOE_MODE:-${DEPLOYMENT_MODE:-}}" return 0 fi - printf '%s' "${PROLE_MODE:-${DEPLOYMENT_MODE:-}}" + printf '%s' "${KNOE_MODE:-${DEPLOYMENT_MODE:-}}" } MODE="$(current_mode)" @@ -267,13 +267,13 @@ check_deploy_image() { check_k3d_registry() { if command -v k3d >/dev/null 2>&1; then - if k3d registry list --no-headers 2>/dev/null | awk '{print $1}' | grep -qx 'prole-registry'; then - echo "[OK] registry/registry exists (k3d: prole-registry)" + if k3d registry list --no-headers 2>/dev/null | awk '{print $1}' | grep -qx 'knoe-registry'; then + echo "[OK] registry/registry exists (k3d: knoe-registry)" return 0 fi fi if command -v docker >/dev/null 2>&1; then - if docker ps --format '{{.Names}}' 2>/dev/null | grep -Eq '^(k3d-prole-registry|prole-registry)$'; then + if docker ps --format '{{.Names}}' 2>/dev/null | grep -Eq '^(k3d-knoe-registry|knoe-registry)$'; then echo "[OK] registry/registry exists (docker)" return 0 fi @@ -534,8 +534,8 @@ if [ $blocked -gt 0 ]; then printf '%b' "$blocked_lines" # ── Round 4: reset k3d cluster, preserve registry ───────────────────────── - _prole_mode="${PROLE_MODE:-}" - if [[ "$_prole_mode" == "k3d" ]]; then + _knoe_mode="${KNOE_MODE:-}" + if [[ "$_knoe_mode" == "k3d" ]]; then echo "" echo "== Repair Round 4: resetting k3d cluster (preserving registry) ==" _cluster_name="${K3D_CLUSTER_NAME:-knoe-dev-cluster}" @@ -586,7 +586,7 @@ if [ $blocked -gt 0 ]; then fi echo "" - echo "Status: NOTICE (blocked pods remain; k3d cluster reset not applicable for mode '${_prole_mode:-unknown}')" + echo "Status: NOTICE (blocked pods remain; k3d cluster reset not applicable for mode '${_knoe_mode:-unknown}')" exit 3 fi diff --git a/mock_val/sync-prole-cfg.py b/mock_val/sync-prole-cfg.py index 2e951c5..f59d0f3 100644 --- a/mock_val/sync-prole-cfg.py +++ b/mock_val/sync-prole-cfg.py @@ -21,10 +21,10 @@ def main(): token = inst_config._try_read_ansible_vault_value(vault_path, "vault_k3s_token") if token: - print(f"Syncing K3S_TOKEN to conf/prole.cfg...") - inst_config._update_prole_cfg_value("Global", "PROLE_K3S_TOKEN", token) - inst_config._update_prole_cfg_value("Inputs", "init_cluster.k3s_token", token) - inst_config._update_prole_cfg_value("Service Cluster (k3s)", "K3S_TOKEN", token) + print(f"Syncing K3S_TOKEN to conf/knoe.cfg...") + inst_config._update_knoe_cfg_value("Global", "PROLE_K3S_TOKEN", token) + inst_config._update_knoe_cfg_value("Inputs", "init_cluster.k3s_token", token) + inst_config._update_knoe_cfg_value("Service Cluster (k3s)", "K3S_TOKEN", token) else: print("Warning: Could not extract vault_k3s_token from Ansible vault.") diff --git a/pom.xml b/pom.xml index 0625553..e5c001e 100644 --- a/pom.xml +++ b/pom.xml @@ -10,7 +10,7 @@ - org.prole + org.knoe knoe-db 0.0.1-SNAPSHOT knoe-db-ctrl diff --git a/prole.spec b/prole.spec deleted file mode 100644 index 44e317e..0000000 --- a/prole.spec +++ /dev/null @@ -1,38 +0,0 @@ -# -*- mode: python ; coding: utf-8 -*- - - -a = Analysis( - ['prole/cli.py'], - pathex=[], - binaries=[], - datas=[('etc', 'etc'), ('scan', 'scan'), ('k8s', 'k8s'), ('conf', 'conf')], - hiddenimports=[], - hookspath=[], - hooksconfig={}, - runtime_hooks=[], - excludes=['tkinter', '_tkinter', 'Tkinter'], - noarchive=False, - optimize=0, -) -pyz = PYZ(a.pure) - -exe = EXE( - pyz, - a.scripts, - a.binaries, - a.datas, - [], - name='prole', - debug=False, - bootloader_ignore_signals=False, - strip=False, - upx=True, - upx_exclude=[], - runtime_tmpdir=None, - console=True, - disable_windowed_traceback=False, - argv_emulation=False, - target_arch=None, - codesign_identity=None, - entitlements_file=None, -) diff --git a/prole_requirements.txt b/prole_requirements.txt deleted file mode 100644 index 1bf88a4..0000000 --- a/prole_requirements.txt +++ /dev/null @@ -1,127 +0,0 @@ -agate==1.9.1 -aiohappyeyeballs==2.6.1 -aiohttp==3.12.15 -aiosignal==1.4.0 -aiosqlite==0.21.0 -alembic==1.16.4 -annotated-types==0.7.0 -anyio==4.9.0 -attrs==25.3.0 -babel==2.17.0 -banks==2.2.0 -beautifulsoup4==4.13.4 -certifi==2025.7.14 -cffi==1.17.1 -charset-normalizer==3.4.2 -click==8.2.1 -colorama==0.4.6 -cryptography==45.0.5 -daff==1.4.2 -dataclasses-json==0.6.7 -dbt==1.0.0.40.5 -dbt-adapters==1.16.3 -dbt-common==1.27.1 -dbt-core==1.10.6 -dbt-extractor==0.6.0 -dbt-postgres==1.9.0 -dbt-protos==1.0.348 -dbt-semantic-interfaces==0.9.0 -deepdiff==7.0.1 -defusedxml==0.7.1 -Deprecated==1.2.18 -dirtyjson==1.0.8 -distro==1.9.0 -filetype==1.2.0 -frozenlist==1.7.0 -fsspec==2025.7.0 -greenlet==3.2.3 -griffe==1.9.0 -h11==0.16.0 -httpcore==1.0.9 -httpx==0.28.1 -idna==3.10 -importlib_metadata==8.7.0 -langchain -isodate==0.6.1 -Jinja2==3.1.6 -jiter==0.10.0 -joblib==1.5.1 -jsonschema==4.25.0 -jsonschema-specifications==2025.4.1 -leather==0.4.0 -llama-cloud==0.1.35 -llama-cloud-services==0.6.52 -llama-index==0.12.52 -llama-index-agent-openai==0.4.12 -llama-index-cli==0.4.4 -llama-index-core==0.12.52.post1 -llama-index-embeddings-openai==0.3.1 -llama-index-indices-managed-llama-cloud==0.8.0 -llama-index-instrumentation==0.3.0 -llama-index-llms-openai==0.4.7 -llama-index-multi-modal-llms-openai==0.5.3 -llama-index-program-openai==0.3.2 -llama-index-question-gen-openai==0.3.1 -llama-index-readers-file -llama-index-readers-llama-parse==0.4.0 -llama-index-workflows==1.2.0 -llama-parse==0.6.52 -Mako==1.3.10 -MarkupSafe==3.0.2 -marshmallow==3.26.1 -mashumaro==3.14 -more-itertools==10.7.0 -msgpack==1.1.1 -multidict==6.6.3 -mypy_extensions==1.1.0 -nest-asyncio==1.6.0 -networkx==3.5 -nltk==3.9.1 -numpy==2.3.2 -openai==1.97.1 -ordered-set==4.1.0 -packaging==25.0 -parsedatetime==2.6 -pathspec==0.12.1 -pillow==11.3.0 -platformdirs==4.3.8 -propcache==0.3.2 -protobuf==5.29.5 -psycopg2-binary==2.9.10 -pycparser==2.22 -pydantic==2.11.7 -pydantic_core==2.33.2 -pyodbc==5.2.0 -pyOpenSSL==25.1.0 -pypdf==5.9.0 -python-dateutil==2.9.0.post0 -python-dotenv==1.1.1 -python-slugify==8.0.4 -pytimeparse==1.1.8 -pytz==2025.2 -PyYAML==6.0.2 -referencing==0.36.2 -regex==2025.7.31 -requests==2.32.4 -rpds-py==0.26.0 -setuptools==80.9.0 -six==1.17.0 -sniffio==1.3.1 -snowplow-tracker==1.1.0 -soupsieve==2.7 -SQLAlchemy==2.0.42 -sqlparse==0.5.3 -striprtf==0.0.26 -tenacity==9.1.2 -text-unidecode==1.3 -tiktoken==0.9.0 -tqdm==4.67.1 -typing-inspect==0.9.0 -typing-inspection==0.4.1 -typing_extensions==4.14.1 -tzdata==2025.2 -urllib3==2.5.0 -wrapt==1.17.2 -yarl==1.20.1 -zipp==3.23.0 -pyinstaller==6.19.0 diff --git a/run_with_coverage.sh b/run_with_coverage.sh index 5bbbd7a..f96d888 100755 --- a/run_with_coverage.sh +++ b/run_with_coverage.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Run the Prole installer with execution instrumentation (coverage) +# Run the Knoe installer with execution instrumentation (coverage) # This helps identify unused code paths during manual testing/usage. set -e diff --git a/scan/ansible_inventory_flat.txt b/scan/ansible_inventory_flat.txt index b4f17f4..161f2e1 100644 --- a/scan/ansible_inventory_flat.txt +++ b/scan/ansible_inventory_flat.txt @@ -1,8 +1,8 @@ host,ip,roles -gandalf.prole.org,,iscsi,k3s_agents,k3s_hosts,linux_hosts +gandalf.knoe.org,,iscsi,k3s_agents,k3s_hosts,linux_hosts merlin,10.0.0.36,merlin_bootstrap -merlin.prole.org,,iscsi,k3s_agents,k3s_hosts,linux_hosts,mariadb,mariadb_primary -myrddin.prole.org,,ad_dc,iscsi,k3s_hosts,k3s_servers,linux_hosts,ssl_hosts -pi.prole.org,,iscsi,linux_hosts,pihole -raspberry.prole.org,,iscsi,linux_hosts,mariadb,mariadb_replica,pihole -retropie.prole.org,,iscsi,linux_hosts +merlin.knoe.org,,iscsi,k3s_agents,k3s_hosts,linux_hosts,mariadb,mariadb_primary +myrddin.knoe.org,,ad_dc,iscsi,k3s_hosts,k3s_servers,linux_hosts,ssl_hosts +pi.knoe.org,,iscsi,linux_hosts,pihole +raspberry.knoe.org,,iscsi,linux_hosts,mariadb,mariadb_replica,pihole +retropie.knoe.org,,iscsi,linux_hosts diff --git a/scan/network-agent b/scan/network-agent index e148a04abe7a32c004289c3672f070f78ed807f7..0070b52ad793c62a3e95467c1d0f1ff212cdc13c 100755 GIT binary patch delta 501 zcmW;JH&T=V0D#e178OvGyh>QsC4&S(lps+=f)bP@Iitd_C)gP~E&#(3Y%I2528N20 zP;dw;3f@w@nXmsYug}95{5=i*kA(Ms|2a%XLZlHUod-PR5gBBX#bch3%~PI{LoRvb zQ$Qg_M0m~%iYcL#GNP0d<0Ww_sHBQ&YN(}-dK!2|BTY2Z!fRS-;|=Y+7kcC`Wax54-D~*i93BP!JYsB delta 513 zcmXBR$xc%N0EOYyRulyX9IljFNSCrL9YT1eAM8yC39CEB@6hAVV%l}@_2#&vFRlUsDt z!)@+xmwWWm$9*2q&qJ~dFvuf@7-odWJYkfljPZMq%L=QkvCcc*^MQ|iVuM_{7=)Rf%5}Sc@?pGM|MFp~T8ToKu2eZ&2>&LlqmQ@B JKT6^E?f+zU#=ign diff --git a/scan/network_description.txt b/scan/network_description.txt index c76b2b5..6449b48 100644 --- a/scan/network_description.txt +++ b/scan/network_description.txt @@ -33,13 +33,13 @@ Detected Devices: Ollama Instances found at: 10.0.0.39, 10.0.0.204 Ansible Inventory Summary: -Inventory directory: /Users/chrisfu/dev/prole/infrastructure +Inventory directory: /Users/chrisfu/dev/knoe/infrastructure Hosts detected: 7 -- gandalf.prole.org (unknown): roles [iscsi, k3s_agents, k3s_hosts, linux_hosts] +- gandalf.knoe.org (unknown): roles [iscsi, k3s_agents, k3s_hosts, linux_hosts] - merlin (10.0.0.36): roles [merlin_bootstrap] -- merlin.prole.org (unknown): roles [iscsi, k3s_agents, k3s_hosts, linux_hosts, mariadb, mariadb_primary] -- myrddin.prole.org (unknown): roles [ad_dc, iscsi, k3s_hosts, k3s_servers, linux_hosts, ssl_hosts] -- pi.prole.org (unknown): roles [iscsi, linux_hosts, pihole] -- raspberry.prole.org (unknown): roles [iscsi, linux_hosts, mariadb, mariadb_replica, pihole] -- retropie.prole.org (unknown): roles [iscsi, linux_hosts] -Flat inventory file: /Users/chrisfu/dev/prole/scan/ansible_inventory_flat.txt \ No newline at end of file +- merlin.knoe.org (unknown): roles [iscsi, k3s_agents, k3s_hosts, linux_hosts, mariadb, mariadb_primary] +- myrddin.knoe.org (unknown): roles [ad_dc, iscsi, k3s_hosts, k3s_servers, linux_hosts, ssl_hosts] +- pi.knoe.org (unknown): roles [iscsi, linux_hosts, pihole] +- raspberry.knoe.org (unknown): roles [iscsi, linux_hosts, mariadb, mariadb_replica, pihole] +- retropie.knoe.org (unknown): roles [iscsi, linux_hosts] +Flat inventory file: /Users/chrisfu/dev/knoe/scan/ansible_inventory_flat.txt \ No newline at end of file diff --git a/scripts/docker-root-knoe-db.sh b/scripts/docker-root-knoe-db.sh index 19707c3..d57e948 100755 --- a/scripts/docker-root-knoe-db.sh +++ b/scripts/docker-root-knoe-db.sh @@ -1,16 +1,16 @@ #!/bin/bash -PROLE_HOME="${PROLE_HOME:-$HOME/dev/prole}" -PROLE_DATA="${PROLE_DATA:-$PROLE_HOME/data}" +KNOE_HOME="${KNOE_HOME:-$HOME/dev/knoe}" +PROLE_DATA="${PROLE_DATA:-$KNOE_HOME/data}" PROLE_DATA="${PROLE_DATA%/}" if [[ -z "${POSTGRES_PASSWORD:-}" ]]; then - echo "ERROR: POSTGRES_PASSWORD is required. Store it in OpenBao (kv/prole//db#password) or export it." >&2 + echo "ERROR: POSTGRES_PASSWORD is required. Store it in OpenBao (kv/knoe//db#password) or export it." >&2 exit 1 fi -PG_VERSION=$(cat "$PROLE_HOME/conf/postgresql/.version" 2>/dev/null | tr -d '[:space:]') -RELEASE=$(cat "$PROLE_HOME/knoe-db/.version" 2>/dev/null | tr -d '[:space:]') +PG_VERSION=$(cat "$KNOE_HOME/conf/postgresql/.version" 2>/dev/null | tr -d '[:space:]') +RELEASE=$(cat "$KNOE_HOME/knoe-db/.version" 2>/dev/null | tr -d '[:space:]') if [[ "$RELEASE" =~ ^[0-9]+$ ]]; then RELEASE=$(printf "%03d" "$RELEASE"); fi IMAGE="knoe-db:${PG_VERSION:-17.7}-${RELEASE:-043}" diff --git a/scripts/docker-run-knoe-db.sh b/scripts/docker-run-knoe-db.sh index 61b2d49..4fb880b 100755 --- a/scripts/docker-run-knoe-db.sh +++ b/scripts/docker-run-knoe-db.sh @@ -1,15 +1,15 @@ set -eux # export POSTGRES_PASSWORD=$(openssl rand -base64 32) if [[ -z "${POSTGRES_PASSWORD:-}" ]]; then - echo "ERROR: POSTGRES_PASSWORD is required. Store it in OpenBao (kv/prole//db#password) or export it." >&2 + echo "ERROR: POSTGRES_PASSWORD is required. Store it in OpenBao (kv/knoe//db#password) or export it." >&2 exit 1 fi -PROLE_HOME="${PROLE_HOME:-$HOME/dev/prole}" -PROLE_DATA="${PROLE_DATA:-$PROLE_HOME/data}" +KNOE_HOME="${KNOE_HOME:-$HOME/dev/knoe}" +PROLE_DATA="${PROLE_DATA:-$KNOE_HOME/data}" PROLE_DATA="${PROLE_DATA%/}" -PG_VERSION=$(cat "$PROLE_HOME/conf/postgresql/.version" 2>/dev/null | tr -d '[:space:]') -RELEASE=$(cat "$PROLE_HOME/knoe-db/.version" 2>/dev/null | tr -d '[:space:]') +PG_VERSION=$(cat "$KNOE_HOME/conf/postgresql/.version" 2>/dev/null | tr -d '[:space:]') +RELEASE=$(cat "$KNOE_HOME/knoe-db/.version" 2>/dev/null | tr -d '[:space:]') if [[ "$RELEASE" =~ ^[0-9]+$ ]]; then RELEASE=$(printf "%03d" "$RELEASE"); fi IMAGE="knoe-db:${PG_VERSION:-17.7}-${RELEASE:-043}" diff --git a/scripts/fix_gitlab_tls.sh b/scripts/fix_gitlab_tls.sh index 1d2a28e..5ef8547 100755 --- a/scripts/fix_gitlab_tls.sh +++ b/scripts/fix_gitlab_tls.sh @@ -36,8 +36,8 @@ kubectl --context="${CTX}" get ns "${NS}" >/dev/null \ # --------------------------------------------------------------------------- # 1. Apply ManagedCertificate + FrontendConfig # --------------------------------------------------------------------------- -log "Applying ManagedCertificate + FrontendConfig from k8s/prole/gitlab-managed-cert.yaml ..." -kubectl --context="${CTX}" apply -f "${REPO_ROOT}/k8s/prole/gitlab-managed-cert.yaml" +log "Applying ManagedCertificate + FrontendConfig from k8s/knoe/gitlab-managed-cert.yaml ..." +kubectl --context="${CTX}" apply -f "${REPO_ROOT}/k8s/knoe/gitlab-managed-cert.yaml" # --------------------------------------------------------------------------- # 2. Patch the existing Ingress with the required annotations @@ -56,7 +56,7 @@ kubectl --context="${CTX}" -n "${NS}" annotate ingress "${INGRESS}" \ # 2b. Reconcile ingress rules to exactly the configured host list. # # An earlier install with conf/k3d.cfg (or a manual edit) may have left stale -# hosts like git.prole.org on the ingress. We replace spec.rules outright so +# hosts like git.knoe.org on the ingress. We replace spec.rules outright so # only the ManagedCertificate-covered host(s) remain served. # # Multi-host setups: set GITLAB_HOST to a comma-separated list; we build one diff --git a/scripts/generate_spec.py b/scripts/generate_spec.py index 85799bd..14d733b 100755 --- a/scripts/generate_spec.py +++ b/scripts/generate_spec.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 """ -Generate PyInstaller spec file for Prole Database Installer. +Generate PyInstaller spec file for Knoe Database Installer. """ SPEC_CONTENT = """# -*- mode: python ; coding: utf-8 -*- @@ -22,7 +22,7 @@ datas = [ ('docs', 'docs'), ('k8s', 'k8s'), ('knoe-db', 'knoe-db'), - ('prole-app/dist/Prole Tools.app', 'prole-app/dist/Prole Tools.app'), + ('knoe-app/dist/Knoe Tools.app', 'knoe-app/dist/Knoe Tools.app'), ] # Binaries to include (with execute permissions) @@ -69,7 +69,7 @@ exe = EXE( a.zipfiles, a.datas, [], - name='prole-installer', + name='knoe-installer', debug=False, bootloader_ignore_signals=False, strip=False, @@ -81,18 +81,18 @@ exe = EXE( target_arch=None, codesign_identity=None, entitlements_file=None, - icon='build/prole.icns', + icon='build/knoe.icns', ) # Create macOS app bundle app = BUNDLE( exe, - name='Prole Installer.app', - icon='build/prole.icns', - bundle_identifier='com.prole.installer', + name='Knoe Installer.app', + icon='build/knoe.icns', + bundle_identifier='com.knoe.installer', info_plist={ - 'CFBundleName': 'Prole Installer', - 'CFBundleDisplayName': 'Prole Database Installer', + 'CFBundleName': 'Knoe.DB Installer', + 'CFBundleDisplayName': 'Knoe.DB Installer', 'CFBundleVersion': '1.0.0', 'CFBundleShortVersionString': '1.0.0', 'NSHighResolutionCapable': 'True', diff --git a/scripts/patch_garage_cross_cluster.sh b/scripts/patch_garage_cross_cluster.sh index 9252b0f..da80300 100755 --- a/scripts/patch_garage_cross_cluster.sh +++ b/scripts/patch_garage_cross_cluster.sh @@ -126,7 +126,7 @@ log " cnpg-backup-sa applied." # --------------------------------------------------------------------------- log "[phase 3] Applying GCS barman ObjectStore in ${DB_CLUSTER}/${DB_NS} ..." -GCS_OBJ_MANIFEST="${REPO_ROOT}/k8s/prole/knoe-db-barman-objectstore-gcs.yaml" +GCS_OBJ_MANIFEST="${REPO_ROOT}/k8s/knoe/knoe-db-barman-objectstore-gcs.yaml" [[ -f "${GCS_OBJ_MANIFEST}" ]] || die "GCS ObjectStore manifest not found: ${GCS_OBJ_MANIFEST}" kubectl --context="${DB_CTX}" -n "${DB_NS}" apply -f "${GCS_OBJ_MANIFEST}" @@ -158,7 +158,7 @@ if [[ -n "${CNPG_NODES}" && -f "${PROLE_CFG}" ]]; then "s|^CNPG_STAGE1_NODE = .*|CNPG_STAGE1_NODE = ${STAGE1_NODE}|" \ "${PROLE_CFG}" rm -f "${PROLE_CFG}.bak" - log " prole.cfg updated." + log " knoe.cfg updated." else log " WARNING: Could not read nodes from ${DB_CLUSTER} — CNPG_ELIGIBLE_NODES not updated." fi diff --git a/scripts/test-cnpg-knoe-db.sh b/scripts/test-cnpg-knoe-db.sh index ac01d64..add08ad 100755 --- a/scripts/test-cnpg-knoe-db.sh +++ b/scripts/test-cnpg-knoe-db.sh @@ -2,13 +2,13 @@ set -euo pipefail SCRIPT_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) -PROLE_HOME=${PROLE_HOME:-$(cd "$SCRIPT_DIR/.." && pwd)} +KNOE_HOME=${KNOE_HOME:-$(cd "$SCRIPT_DIR/.." && pwd)} -CNPG_TEST_NAMESPACE=${CNPG_TEST_NAMESPACE:-prole-cnpg-test} +CNPG_TEST_NAMESPACE=${CNPG_TEST_NAMESPACE:-knoe-cnpg-test} CNPG_CLUSTER_NAME=${CNPG_CLUSTER_NAME:-knoe-db} CNPG_OPERATOR_NAMESPACE=${CNPG_OPERATOR_NAMESPACE:-cnpg-system} -CNPG_CLUSTER_MANIFEST=${CNPG_CLUSTER_MANIFEST:-$PROLE_HOME/k8s/prole/knoe-db.yaml} -CNPG_USER_SECRET_FILE=${CNPG_USER_SECRET_FILE:-$PROLE_HOME/knoe-db/knoe-db-user-secret.yaml} +CNPG_CLUSTER_MANIFEST=${CNPG_CLUSTER_MANIFEST:-$KNOE_HOME/k8s/knoe/knoe-db.yaml} +CNPG_USER_SECRET_FILE=${CNPG_USER_SECRET_FILE:-$KNOE_HOME/knoe-db/knoe-db-user-secret.yaml} CNPG_WAIT_TIMEOUT=${CNPG_WAIT_TIMEOUT:-300} CNPG_FALLBACK_VERSION=${CNPG_FALLBACK_VERSION:-1.27.0} @@ -68,8 +68,8 @@ resolve_cnpg_manifest_url() { compute_image_tag() { local pg_version release - pg_version=$(tr -d '[:space:]' < "$PROLE_HOME/conf/postgresql/.version" 2>/dev/null || true) - release=$(tr -d '[:space:]' < "$PROLE_HOME/knoe-db/.version" 2>/dev/null || true) + pg_version=$(tr -d '[:space:]' < "$KNOE_HOME/conf/postgresql/.version" 2>/dev/null || true) + release=$(tr -d '[:space:]' < "$KNOE_HOME/knoe-db/.version" 2>/dev/null || true) if [[ -z "$pg_version" ]]; then pg_version="17.7" @@ -120,7 +120,7 @@ build_image() { fi log "Building image $IMAGE" - docker build -t "$IMAGE" "$PROLE_HOME/knoe-db" + docker build -t "$IMAGE" "$KNOE_HOME/knoe-db" } load_image_if_requested() { @@ -247,7 +247,7 @@ main() { if ! wait_for_primary_ready; then local log_dir local base_log_dir - base_log_dir="${PROLE_LOGS:-$PROLE_HOME/logs}" + base_log_dir="${PROLE_LOGS:-$KNOE_HOME/logs}" base_log_dir="${base_log_dir%/}" log_dir=${CNPG_TEST_LOG_DIR:-$base_log_dir/cnpg-test-$(date +%Y%m%dT%H%M%S)} collect_error_pod_logs "$log_dir" diff --git a/scripts/validation/check_kerberos.sh b/scripts/validation/check_kerberos.sh index fddaead..04bbb04 100755 --- a/scripts/validation/check_kerberos.sh +++ b/scripts/validation/check_kerberos.sh @@ -18,36 +18,36 @@ fi ORIG_ARGS=("$@") # Load env -if [[ -n "${PROLE_HOME:-}" && -f "$PROLE_HOME/env.sh" ]]; then +if [[ -n "${KNOE_HOME:-}" && -f "$KNOE_HOME/env.sh" ]]; then set -- # shellcheck disable=SC1090 - source "$PROLE_HOME/env.sh" + source "$KNOE_HOME/env.sh" set -- "${ORIG_ARGS[@]}" -elif [[ -f "$HOME/.prole/env.sh" ]]; then +elif [[ -f "$HOME/.knoe/env.sh" ]]; then set -- # shellcheck disable=SC1090 - source "$HOME/.prole/env.sh" + source "$HOME/.knoe/env.sh" set -- "${ORIG_ARGS[@]}" fi -# Load config values from prole.cfg before applying defaults/CLI overrides. +# Load config values from knoe.cfg before applying defaults/CLI overrides. # shellcheck disable=SC1090 -source "$ETC_DIR/prole_cfg.sh" +source "$ETC_DIR/knoe_cfg.sh" # shellcheck disable=SC1090 -source "$LIB_SHELL_DIR/prole_env.sh" +source "$LIB_SHELL_DIR/knoe_env.sh" # shellcheck disable=SC1090 -source "$LIB_SHELL_DIR/prole_secrets.sh" +source "$LIB_SHELL_DIR/knoe_secrets.sh" # shellcheck disable=SC1090 -source "$LIB_SHELL_DIR/prole_string.sh" +source "$LIB_SHELL_DIR/knoe_string.sh" # shellcheck disable=SC1090 -source "$LIB_SHELL_DIR/prole_yaml.sh" +source "$LIB_SHELL_DIR/knoe_yaml.sh" if [[ "${1:-}" == "--mode" || "${1:-}" == "-m" ]]; then - prole_set_mode "${2:-}" + knoe_set_mode "${2:-}" shift 2 elif [[ "${1:-}" == --mode=* || "${1:-}" == -m=* ]]; then - prole_set_mode "${1#*=}" + knoe_set_mode "${1#*=}" shift fi @@ -68,7 +68,7 @@ KDC_POD_READY_TIMEOUT=${KDC_POD_READY_TIMEOUT:-60} KDC_POD_READY_RETRIES=${KDC_POD_READY_RETRIES:-5} PROLE_KDC_PRECHECK_TIMEOUT=${PROLE_KDC_PRECHECK_TIMEOUT:-5} -KRB5_REALM=$(prole_normalize_realm "${KRB5_REALM:-}") +KRB5_REALM=$(knoe_normalize_realm "${KRB5_REALM:-}") ensure_tools() { for t in kubectl curl jq; do @@ -249,10 +249,10 @@ run_kinit() { local pod_name="$2" local output="" - # Prefer /etc/krb5.conf if it exists, otherwise fallback to /opt/prole-kdc/krb5.conf + # Prefer /etc/krb5.conf if it exists, otherwise fallback to /opt/knoe-kdc/krb5.conf local krb5_config="/etc/krb5.conf" if ! kubectl -n "$kdc_ns" exec "$pod_name" -- ls /etc/krb5.conf >/dev/null 2>&1; then - krb5_config="/opt/prole-kdc/krb5.conf" + krb5_config="/opt/knoe-kdc/krb5.conf" fi echo "Running kinit for ${KRB5_USER}@${KRB5_REALM} inside ${PROLE_KDC_NAME} (${pod_name}) using ${krb5_config} ..." @@ -332,7 +332,7 @@ openbao_url() { echo "$PROLE_OPENBAO_URL" return 0 fi - if prole_is_in_cluster; then + if knoe_is_in_cluster; then echo "http://openbao.${SERVICE_NAMESPACE:-${NAMESPACE:-default}}.svc.cluster.local:8200" return 0 fi @@ -349,8 +349,8 @@ openbao_url() { } openbao_token() { - if [[ -f "$PROLE_SERVICE/secrets/openbao-root-token" ]]; then - cat "$PROLE_SERVICE/secrets/openbao-root-token" + if [[ -f "$KNOE_SERVICE/secrets/openbao-root-token" ]]; then + cat "$KNOE_SERVICE/secrets/openbao-root-token" else echo "${OPENBAO_ROOT_TOKEN:-}" fi @@ -370,11 +370,11 @@ fetch_openbao_secret() { } resolve_krb5_password() { - if prole_secret_needs_resolution "${KRB5_PASSWORD:-}"; then - local path="prole/${NAMESPACE:-default}/kerberos" + if knoe_secret_needs_resolution "${KRB5_PASSWORD:-}"; then + local path="knoe/${NAMESPACE:-default}/kerberos" local fetched fetched=$(fetch_openbao_secret "$path" "password") - KRB5_PASSWORD=$(prole_secret_choose_value "${KRB5_PASSWORD:-}" "$fetched") + KRB5_PASSWORD=$(knoe_secret_choose_value "${KRB5_PASSWORD:-}" "$fetched") fi } @@ -383,7 +383,7 @@ resolve_samba_vars() { return 0 fi - # 1. Fallback for DNS server from prole.cfg env (AD_DC_HOST) + # 1. Fallback for DNS server from knoe.cfg env (AD_DC_HOST) if [[ -z "$SAMBA_DNS_SERVER" && -n "${AD_DC_HOST:-}" ]]; then SAMBA_DNS_SERVER="$AD_DC_HOST" echo "Using SAMBA_DNS_SERVER=${SAMBA_DNS_SERVER} from AD_DC_HOST" @@ -391,8 +391,8 @@ resolve_samba_vars() { # 2. Try to resolve from Ansible inventory if possible local root - if [[ -n "${PROLE_HOME:-}" && -d "${PROLE_HOME}" ]]; then - root="${PROLE_HOME}" + if [[ -n "${KNOE_HOME:-}" && -d "${KNOE_HOME}" ]]; then + root="${KNOE_HOME}" else root="${SCRIPT_DIR}/.." fi @@ -400,10 +400,10 @@ resolve_samba_vars() { local vars_file="${root}/infrastructure/inventory/group_vars/ad_dc/vars.yml" if [[ -f "$vars_file" ]]; then if [[ -z "$SAMBA_DNS_SERVER" ]]; then - SAMBA_DNS_SERVER=$(prole_yaml_get_scalar "$vars_file" "samba_dns_server") + SAMBA_DNS_SERVER=$(knoe_yaml_get_scalar "$vars_file" "samba_dns_server") fi if [[ -z "$SAMBA_ADMIN_USER" ]]; then - SAMBA_ADMIN_USER=$(prole_yaml_get_scalar "$vars_file" "samba_dns_admin_user") + SAMBA_ADMIN_USER=$(knoe_yaml_get_scalar "$vars_file" "samba_dns_admin_user") fi fi @@ -424,8 +424,8 @@ resolve_samba_vars() { local vault_pass_file="" if [[ -n "${ANSIBLE_VAULT_PASSWORD_FILE:-}" && -f "${ANSIBLE_VAULT_PASSWORD_FILE}" ]]; then vault_pass_file="${ANSIBLE_VAULT_PASSWORD_FILE}" - elif [[ -n "${PROLE_HOME:-}" && -f "${PROLE_HOME}/.vault_pass" ]]; then - vault_pass_file="${PROLE_HOME}/.vault_pass" + elif [[ -n "${KNOE_HOME:-}" && -f "${KNOE_HOME}/.vault_pass" ]]; then + vault_pass_file="${KNOE_HOME}/.vault_pass" elif [[ -f "${root}/.vault_pass" ]]; then vault_pass_file="${root}/.vault_pass" fi @@ -441,7 +441,7 @@ resolve_samba_vars() { # 5. Fallback for Password from OpenBao if [[ -z "$SAMBA_ADMIN_PASSWORD" ]]; then - local path="prole/${NAMESPACE:-default}/ad_dc" + local path="knoe/${NAMESPACE:-default}/ad_dc" local fetched fetched=$(fetch_openbao_secret "$path" "password") if [[ -n "$fetched" && "$fetched" != "null" ]]; then @@ -449,7 +449,7 @@ resolve_samba_vars() { echo "Fetched SAMBA_ADMIN_PASSWORD from OpenBao (${path})" else # Try kerberos path as fallback - path="prole/${NAMESPACE:-default}/kerberos" + path="knoe/${NAMESPACE:-default}/kerberos" fetched=$(fetch_openbao_secret "$path" "samba_password") if [[ -n "$fetched" && "$fetched" != "null" ]]; then SAMBA_ADMIN_PASSWORD="$fetched" @@ -514,7 +514,7 @@ run_test() { ensure_namespace resolve_krb5_password - # Support both names for the toggle from prole.cfg + # Support both names for the toggle from knoe.cfg local enabled="${KERBEROS_ENABLED:-${ENABLED:-false}}" if [[ "$enabled" == "false" || "$enabled" == "0" || "$enabled" == "False" ]]; then echo "Kerberos is disabled (KERBEROS_ENABLED=$enabled). Skipping test." @@ -539,12 +539,12 @@ run_test() { else kubectl -n "$kdc_ns" delete deploy "$PROLE_KDC_NAME" --ignore-not-found || true kubectl -n "$kdc_ns" delete svc "$PROLE_KDC_SERVICE" --ignore-not-found || true - kubectl -n "$kdc_ns" delete configmap prole-kdc-config --ignore-not-found || true + kubectl -n "$kdc_ns" delete configmap knoe-kdc-config --ignore-not-found || true fi fi fi - local kdc_mode="${PROLE_MODE:-${DEPLOYMENT_MODE:-}}" + local kdc_mode="${KNOE_MODE:-${DEPLOYMENT_MODE:-}}" local kdc_mode_args=() if [[ -n "$kdc_mode" ]]; then kdc_mode_args=(--mode "$kdc_mode") @@ -611,7 +611,7 @@ run_test() { # Determine krb5 config path in the pod similar to run_kinit() local krb5_config_in_pod="/etc/krb5.conf" if ! kubectl -n "$kdc_ns" exec "$pod_name" -- ls /etc/krb5.conf >/dev/null 2>&1; then - krb5_config_in_pod="/opt/prole-kdc/krb5.conf" + krb5_config_in_pod="/opt/knoe-kdc/krb5.conf" fi kubectl -n "$kdc_ns" exec "$pod_name" -- env KRB5_CONFIG="$krb5_config_in_pod" klist || true } diff --git a/status.py b/status.py index 0629507..725b95b 100755 --- a/status.py +++ b/status.py @@ -1,14 +1,14 @@ #!/usr/bin/env python3 """ -Prole Status Viewer — tk / ncurses status window. +Knoe Status Viewer — tk / ncurses status window. A standalone top-level script that displays cluster service status through a navigation sidebar of milestones and a live console output panel. Usage: - python -m prole.status # GUI mode (tk) - python -m prole.status --no-gui # ncurses fallback - python prole/status.py # direct invocation + python -m knoe.status # GUI mode (tk) + python -m knoe.status --no-gui # ncurses fallback + python knoe/status.py # direct invocation """ from __future__ import annotations @@ -36,29 +36,29 @@ PROJECT_ROOT = _SELF.parent # status.py lives at the project root # --------------------------------------------------------------------------- -def _load_prole_cfg(cfg_path: Path | None = None) -> configparser.ConfigParser: - """Load prole.cfg (with per-environment override layering). +def _load_knoe_cfg(cfg_path: Path | None = None) -> configparser.ConfigParser: + """Load knoe.cfg (with per-environment override layering). Resolution order for the config file: 1. Explicit *cfg_path* argument (from ``-c`` CLI flag). - 2. ``$PROLE_CONF/{k3d|k3s|gke}.cfg`` environment variable directory. + 2. ``$KNOE_CONF/{k3d|k3s|gke}.cfg`` environment variable directory. 3. ``/conf/{k3d|k3s|gke}.cfg`` fallback. """ if cfg_path is None: try: - from knoe import prole_conf as prole_conf_mgr + from knoe import knoe_conf as knoe_conf_mgr - conf_dir = prole_conf_mgr.resolve_prole_conf_dir(PROJECT_ROOT) - cfg_path = prole_conf_mgr.entrypoint_path(conf_dir) + conf_dir = knoe_conf_mgr.resolve_knoe_conf_dir(PROJECT_ROOT) + cfg_path = knoe_conf_mgr.entrypoint_path(conf_dir) except Exception: - cfg_path = PROJECT_ROOT / "conf" / "prole.cfg" + cfg_path = PROJECT_ROOT / "conf" / "knoe.cfg" cp = configparser.ConfigParser(interpolation=configparser.BasicInterpolation()) try: - from knoe import prole_conf as prole_conf_mgr + from knoe import knoe_conf as knoe_conf_mgr files = [ str(p) - for p in prole_conf_mgr.layered_cfg_files(cfg_path) + for p in knoe_conf_mgr.layered_cfg_files(cfg_path) if p.exists() ] cp.read(files) @@ -95,7 +95,7 @@ def _get_service_namespace(cp: configparser.ConfigParser) -> str: def _get_etc_dir(cp: configparser.ConfigParser) -> Path: - svc = _cfg_get(cp, "User", "PROLE_SERVICE", "") + svc = _cfg_get(cp, "User", "KNOE_SERVICE", "") if svc: p = Path(svc) if p.is_dir(): @@ -110,7 +110,7 @@ def _get_etc_dir(cp: configparser.ConfigParser) -> Path: # --------------------------------------------------------------------------- # The canonical list of service init scripts checked by etc/status.sh. -# Order matches the deployment sequence used by prole.sh / install.py. +# Order matches the deployment sequence used by knoe.sh / install.py. _STATUS_SCRIPTS: list[str] = [ "init_common_services.sh", "init_openbao.sh", @@ -144,13 +144,13 @@ def _build_milestones( 4. One entry per active service init script (same list as status.sh) """ milestones: list[tuple[str, list[str]]] = [] - prole_sh = PROJECT_ROOT / "knoe.sh" + knoe_sh = PROJECT_ROOT / "knoe.sh" # 1. Overall knoe.sh status milestones.append( ( - "Prole Status", - [str(prole_sh), "status"], + "Knoe Status", + [str(knoe_sh), "status"], ) ) @@ -270,12 +270,12 @@ def _run_tk( try: from Foundation import NSProcessInfo - NSProcessInfo.processInfo().setProcessName_("Prole Status") + NSProcessInfo.processInfo().setProcessName_("Knoe Status") except Exception: pass root = tk.Tk() - root.title("Prole Status Viewer") + root.title("Knoe Status Viewer") # Center on screen win_w, win_h = 1300, 910 @@ -626,7 +626,7 @@ def _run_ncurses( console_x = nav_width + 1 # Header - hdr = f" Prole Status Viewer [Refresh: {'off' if refresh_secs == 0 else f'{refresh_secs}s'}]" + hdr = f" Knoe Status Viewer [Refresh: {'off' if refresh_secs == 0 else f'{refresh_secs}s'}]" stdscr.addnstr( 0, 0, hdr.ljust(max_x), max_x, curses.color_pair(2) | curses.A_BOLD ) @@ -730,8 +730,8 @@ def _has_display() -> bool: def main(): - parser = argparse.ArgumentParser(description="Prole Status Viewer") - parser.add_argument("-c", "--config", default=None, help="Path to prole.cfg") + parser = argparse.ArgumentParser(description="Knoe Status Viewer") + parser.add_argument("-c", "--config", default=None, help="Path to knoe.cfg") parser.add_argument( "--no-gui", action="store_true", help="Use ncurses terminal interface" ) @@ -739,7 +739,7 @@ def main(): args = parser.parse_args() cfg_path = Path(args.config) if args.config else None - cp = _load_prole_cfg(cfg_path) + cp = _load_knoe_cfg(cfg_path) namespace = _get_namespace(cp) svc_namespace = _get_service_namespace(cp) etc_dir = _get_etc_dir(cp) diff --git a/supabase/deploy.sh b/supabase/deploy.sh index 067473d..0037d26 100755 --- a/supabase/deploy.sh +++ b/supabase/deploy.sh @@ -39,7 +39,7 @@ Options: --foreground Run docker compose in the foreground (default: detached, local mode only) -f, --force Reset the Supabase namespace before applying manifests (k3d only; default) --no-force Skip namespace reset (k3d only) - -c, --config Path to prole.cfg (loads environment defaults) + -c, --config Path to knoe.cfg (loads environment defaults) -h, --help Show help Notes: @@ -855,8 +855,8 @@ apply_defaults() { ENV_FILE="$DOCKER_DIR/.env" SUPABASE_K8S_DIR="${SUPABASE_K8S_DIR:-$SCRIPT_DIR/../build/supabase-k8s}" local default_owner - default_owner="$(id -un 2>/dev/null || echo prole)" - local data_root="${PROLE_DATA:-/opt/prole/data/${default_owner}}" + default_owner="$(id -un 2>/dev/null || echo knoe)" + local data_root="${PROLE_DATA:-/opt/knoe/data/${default_owner}}" data_root="${data_root%/}" DOCKER_IMPORT_DIR="${DOCKER_IMPORT_DIR:-$data_root/docker-import}" SUPABASE_IMAGE_PLATFORM="${SUPABASE_IMAGE_PLATFORM:-}" @@ -866,19 +866,19 @@ apply_defaults() { KNOE_DB_NAMESPACE="${KNOE_DB_NAMESPACE:-}" } -load_prole_cfg() { - local cfg_loader="$PROJECT_ROOT/etc/prole_cfg.sh" +load_knoe_cfg() { + local cfg_loader="$PROJECT_ROOT/etc/knoe_cfg.sh" local cfg_path="${PROLE_CFG_PATH:-}" local candidate="" if [[ -z "$cfg_path" ]]; then - if [[ -n "${PROLE_CONF:-}" ]]; then + if [[ -n "${KNOE_CONF:-}" ]]; then for candidate in \ - "${PROLE_CONF%/}/k3d.cfg" \ - "${PROLE_CONF%/}/k3s.cfg" \ - "${PROLE_CONF%/}/gke.cfg" \ - "${PROLE_CONF%/}/prole.cfg" \ - "${PROLE_CONF%/}/service/prod.cfg"; do + "${KNOE_CONF%/}/k3d.cfg" \ + "${KNOE_CONF%/}/k3s.cfg" \ + "${KNOE_CONF%/}/gke.cfg" \ + "${KNOE_CONF%/}/knoe.cfg" \ + "${KNOE_CONF%/}/service/prod.cfg"; do if [[ -f "$candidate" ]]; then cfg_path="$candidate" break @@ -890,8 +890,8 @@ load_prole_cfg() { cfg_path="$PROJECT_ROOT/conf/k3s.cfg" elif [[ -f "$PROJECT_ROOT/conf/gke.cfg" ]]; then cfg_path="$PROJECT_ROOT/conf/gke.cfg" - elif [[ -f "$PROJECT_ROOT/conf/prole.cfg" ]]; then - cfg_path="$PROJECT_ROOT/conf/prole.cfg" + elif [[ -f "$PROJECT_ROOT/conf/knoe.cfg" ]]; then + cfg_path="$PROJECT_ROOT/conf/knoe.cfg" elif [[ -f "$PROJECT_ROOT/conf/service/prod.cfg" ]]; then cfg_path="$PROJECT_ROOT/conf/service/prod.cfg" fi @@ -907,7 +907,7 @@ load_prole_cfg() { "$cfg_path/k3d.cfg" \ "$cfg_path/k3s.cfg" \ "$cfg_path/gke.cfg" \ - "$cfg_path/prole.cfg" \ + "$cfg_path/knoe.cfg" \ "$cfg_path/prod.cfg" \ "$cfg_path/service/prod.cfg"; do if [[ -f "$candidate" ]]; then @@ -917,8 +917,8 @@ load_prole_cfg() { done fi [[ -f "$cfg_path" ]] || die "Config file not found: $cfg_path" - PROLE_CONF="$(cd "$(dirname "$cfg_path")" && pwd)" - export PROLE_CONF + KNOE_CONF="$(cd "$(dirname "$cfg_path")" && pwd)" + export KNOE_CONF PROLE_CFG_PATH="$cfg_path" fi @@ -926,15 +926,15 @@ load_prole_cfg() { # shellcheck disable=SC1090 source "$cfg_loader" else - warn "prole_cfg.sh not found; config defaults may be incomplete." + warn "knoe_cfg.sh not found; config defaults may be incomplete." fi } register_supabase_ports() { # Register port forwards if helper is available # Kong is no longer deployed locally; API routing is handled by shared Kong in kube-system. - if command -v prole_register_port_forward >/dev/null 2>&1; then - prole_register_port_forward "supabase-studio" "supabase" "svc/studio" "8082" "3000" "0.0.0.0" "TCP" "Supabase Studio" + if command -v knoe_register_port_forward >/dev/null 2>&1; then + knoe_register_port_forward "supabase-studio" "supabase" "svc/studio" "8082" "3000" "0.0.0.0" "TCP" "Supabase Studio" fi } @@ -1686,8 +1686,8 @@ resolve_knoe_db_namespace() { return 0 fi - if db_kubectl get namespace prole >/dev/null 2>&1; then - KNOE_DB_NAMESPACE="prole" + if db_kubectl get namespace knoe >/dev/null 2>&1; then + KNOE_DB_NAMESPACE="knoe" else KNOE_DB_NAMESPACE="default" fi @@ -2273,7 +2273,7 @@ helm_render_values() { # Resolve the live postgres password from the CNPG secret so the renderer # always uses the actual cluster password rather than the (potentially stale) - # value stored in prole.cfg. + # value stored in knoe.cfg. local _live_pg_pw _live_pg_pw=$(db_kubectl get secret knoe-db-superuser \ -n "${DATABASE_NAMESPACE:-knoe-db}" \ @@ -2283,7 +2283,7 @@ helm_render_values() { fi # Resolve Garage S3 credentials from the live k8s secret so the renderer - # always has concrete values regardless of prole.cfg state. + # always has concrete values regardless of knoe.cfg state. if [[ -z "${GARAGE_S3_KEY_ID:-}" ]]; then local _live_garage_key_id _live_garage_key_id=$(db_kubectl get secret knoe-db-barman-s3 \ @@ -2670,7 +2670,7 @@ enforce_supabase_workload_node() { for clear_kind in deployment statefulset; do while IFS= read -r clear_resource; do [[ -n "$clear_resource" ]] || continue - kubectl -n "$clear_ns" patch "$clear_resource" --type merge -p '{"spec":{"template":{"spec":{"nodeSelector":{"kubernetes.io/hostname":null,"knoe.dev/node-role":null,"prole.org/node-role":null},"affinity":{"nodeAffinity":null},"topologySpreadConstraints":null}}}}' >/dev/null 2>&1 || true + kubectl -n "$clear_ns" patch "$clear_resource" --type merge -p '{"spec":{"template":{"spec":{"nodeSelector":{"kubernetes.io/hostname":null,"knoe.dev/node-role":null,"knoe.org/node-role":null},"affinity":{"nodeAffinity":null},"topologySpreadConstraints":null}}}}' >/dev/null 2>&1 || true done < <(kubectl -n "$clear_ns" get "$clear_kind" -o name 2>/dev/null || true) done } @@ -3031,9 +3031,9 @@ print(base)" 2>/dev/null || true) ensure_k8s_supabase_static_pvs "$storage_class" # k3s: apply static PV manifest (idempotent) so PVCs can bind on merlin - if [[ "${MODE:-}" == "k3s" && -f "$PROJECT_ROOT/k8s/prole/supabase-pvs.yaml" ]]; then - log "Applying Supabase static PVs from k8s/prole/supabase-pvs.yaml..." - kubectl apply -f "$PROJECT_ROOT/k8s/prole/supabase-pvs.yaml" 2>&1 || true + if [[ "${MODE:-}" == "k3s" && -f "$PROJECT_ROOT/k8s/knoe/supabase-pvs.yaml" ]]; then + log "Applying Supabase static PVs from k8s/knoe/supabase-pvs.yaml..." + kubectl apply -f "$PROJECT_ROOT/k8s/knoe/supabase-pvs.yaml" 2>&1 || true fi local helm_set_args=() @@ -3376,7 +3376,7 @@ run_k8s() { main() { parse_args "$@" - load_prole_cfg + load_knoe_cfg apply_defaults if [[ -z "$MODE" ]]; then diff --git a/supabase/helm/generated/manifest-summary.json b/supabase/helm/generated/manifest-summary.json index eee0823..4fac2ad 100644 --- a/supabase/helm/generated/manifest-summary.json +++ b/supabase/helm/generated/manifest-summary.json @@ -1,10 +1,10 @@ { - "values": "/Users/chrisfu/dev/prole/supabase/helm/generated/values.generated.json", - "manifests": "/Users/chrisfu/dev/prole/supabase/k8s/supabase-helm.yaml", - "manifests_app": "/Users/chrisfu/dev/prole/supabase/helm/generated/supabase-helm.app.yaml", - "manifests_frontdoor_db": "/Users/chrisfu/dev/prole/supabase/helm/generated/supabase-helm.frontdoor-db.yaml", - "manifests_public_ingress_tls": "/Users/chrisfu/dev/prole/supabase/k8s/public-ingress-tls.yaml", - "manifests_public_ingress_kong": "/Users/chrisfu/dev/prole/supabase/k8s/public-ingress-kong.yaml", + "values": "/Users/chrisfu/dev/knoe/supabase/helm/generated/values.generated.json", + "manifests": "/Users/chrisfu/dev/knoe/supabase/k8s/supabase-helm.yaml", + "manifests_app": "/Users/chrisfu/dev/knoe/supabase/helm/generated/supabase-helm.app.yaml", + "manifests_frontdoor_db": "/Users/chrisfu/dev/knoe/supabase/helm/generated/supabase-helm.frontdoor-db.yaml", + "manifests_public_ingress_tls": "/Users/chrisfu/dev/knoe/supabase/k8s/public-ingress-tls.yaml", + "manifests_public_ingress_kong": "/Users/chrisfu/dev/knoe/supabase/k8s/public-ingress-kong.yaml", "db_host": "10.180.15.236", "supabase_namespace": "supabase" } \ No newline at end of file diff --git a/supabase/helm/render_supabase.py b/supabase/helm/render_supabase.py index f5758e6..d1a356a 100755 --- a/supabase/helm/render_supabase.py +++ b/supabase/helm/render_supabase.py @@ -1,7 +1,7 @@ #!/usr/bin/env python3 """ Render a personalized Supabase Helm values file and pre-template manifests -using the local prole.cfg. Defaults are tailored for knoe's CNPG cluster +using the local knoe.cfg. Defaults are tailored for knoe's CNPG cluster (knoe-db-rw Service) and unattended k8s ingress. """ from __future__ import annotations @@ -38,9 +38,9 @@ except Exception: # pragma: no cover - fallback for minimal environments def _read_cfg(path: Path) -> configparser.ConfigParser: parser = configparser.ConfigParser(interpolation=None) try: - from knoe import prole_conf as prole_conf_mgr # type: ignore + from knoe import knoe_conf as knoe_conf_mgr # type: ignore - files = [p for p in prole_conf_mgr.layered_cfg_files(path) if p.exists()] + files = [p for p in knoe_conf_mgr.layered_cfg_files(path) if p.exists()] if files: parser.read([str(p) for p in files]) else: @@ -85,7 +85,7 @@ def _as_bool(value: str | bool | None, default: bool = False) -> bool: return default -def _parse_hosts(raw_hosts: str, fallback: str = "db.prole.org") -> list[str]: +def _parse_hosts(raw_hosts: str, fallback: str = "db.knoe.org") -> list[str]: entries: list[str] = [] seen: set[str] = set() for entry in (raw_hosts or "").split(","): @@ -286,7 +286,7 @@ def _derive_api_hostname_from_studio(studio_hostname_raw: str, auth_hostname: st if mode != "k8s": return studio_hostname_raw - normalized_studio = _normalize_hostname(studio_hostname_raw, fallback="db.prole.org") + normalized_studio = _normalize_hostname(studio_hostname_raw, fallback="db.knoe.org") if mode == "k8s": if normalized_studio.startswith("db."): return f"api.{normalized_studio[3:]}" @@ -435,22 +435,22 @@ def _build_overlay(cfg: configparser.ConfigParser, args: argparse.Namespace) -> _cfg_get(cfg, "Global", "SUPABASE_HOSTNAME"), os.environ.get("SUPABASE_HOSTNAME", ""), os.environ.get("SUPABASE_HOST", ""), - default="db.prole.org", + default="db.knoe.org", ).strip() if _is_placeholder(legacy_supabase_hostname_raw): legacy_supabase_hostname_raw = "" if not legacy_supabase_hostname_raw: - legacy_supabase_hostname_raw = "db.prole.org" + legacy_supabase_hostname_raw = "db.knoe.org" mode = _first( - os.environ.get("PROLE_MODE", ""), + os.environ.get("KNOE_MODE", ""), _cfg_get(cfg, "Global", "DEPLOYMENT_MODE"), - _cfg_get(cfg, "globals", "prole.mode"), + _cfg_get(cfg, "globals", "knoe.mode"), default="", ).strip().lower() - default_auth_hostname = "api.knoe.dev" if mode == "k8s" else "api.prole.org" + default_auth_hostname = "api.knoe.dev" if mode == "k8s" else "api.knoe.org" auth_hostname = _normalize_hostname( _first( os.environ.get("AUTH_HOSTNAME", ""), @@ -469,7 +469,7 @@ def _build_overlay(cfg: configparser.ConfigParser, args: argparse.Namespace) -> _cfg_get(cfg, "Global", "SUPABASE_STUDIO_HOSTNAME"), _cfg_get(cfg, "Inputs", "init_cluster.supabase_studio_url"), legacy_supabase_hostname_raw, - default="db.prole.org", + default="db.knoe.org", ).strip() if _is_placeholder(studio_hostname_raw): studio_hostname_raw = "" @@ -485,7 +485,7 @@ def _build_overlay(cfg: configparser.ConfigParser, args: argparse.Namespace) -> _cfg_get(cfg, "Global", "SUPABASE_API_HOSTNAME"), _cfg_get(cfg, "Inputs", "init_cluster.supabase_api_url"), api_host_fallback, - default="supabase.prole.org", + default="supabase.knoe.org", ).strip() if _is_placeholder(api_hostname_raw): api_hostname_raw = "" @@ -540,7 +540,7 @@ def _build_overlay(cfg: configparser.ConfigParser, args: argparse.Namespace) -> studio_host_entries, studio_public_url = _normalize_public_hosts( studio_hostname_raw, - fallback_host="db.prole.org", + fallback_host="db.knoe.org", ) api_host_entries, api_public_url = _normalize_public_hosts( api_hostname_raw, @@ -735,7 +735,7 @@ def _build_overlay(cfg: configparser.ConfigParser, args: argparse.Namespace) -> auth_response_headers = _first( os.environ.get("AUTH_RESPONSE_HEADERS", ""), _cfg_get(cfg, "Global", "AUTH_RESPONSE_HEADERS"), - default="X-Prole-User,X-Prole-Email,X-Prole-Groups", + default="X-Knoe-User,X-Knoe-Email,X-Knoe-Groups", ).strip() auth_verify_url = _first( os.environ.get("AUTH_VERIFY_URL", ""), @@ -1132,7 +1132,7 @@ def _build_overlay(cfg: configparser.ConfigParser, args: argparse.Namespace) -> def render(args: argparse.Namespace) -> None: cfg_path = Path(args.config) if cfg_path.is_dir(): - cfg_path = cfg_path / "prole.cfg" + cfg_path = cfg_path / "knoe.cfg" if not cfg_path.exists(): raise SystemExit(f"Config not found: {cfg_path}") @@ -1408,12 +1408,12 @@ def render(args: argparse.Namespace) -> None: if __name__ == "__main__": - parser = argparse.ArgumentParser(description="Render Supabase Helm chart from prole.cfg") + parser = argparse.ArgumentParser(description="Render Supabase Helm chart from knoe.cfg") parser.add_argument( "--config", "-c", - default=os.environ.get("PROLE_CONF", str(REPO_ROOT / "conf")), - help="Path to prole.cfg or its directory", + default=os.environ.get("KNOE_CONF", str(REPO_ROOT / "conf")), + help="Path to knoe.cfg or its directory", ) parser.add_argument( "--output-dir", diff --git a/tests/etc/run_all.sh b/tests/etc/run_all.sh index 071f670..8bbb604 100644 --- a/tests/etc/run_all.sh +++ b/tests/etc/run_all.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -# prole/tests/etc/run_all.sh +# knoe/tests/etc/run_all.sh # Runner for all script unit tests in etc/ SCRIPT_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) diff --git a/tests/etc/test_argocd_repo_server_hostpath_permissions.sh b/tests/etc/test_argocd_repo_server_hostpath_permissions.sh index da8a055..8471a96 100644 --- a/tests/etc/test_argocd_repo_server_hostpath_permissions.sh +++ b/tests/etc/test_argocd_repo_server_hostpath_permissions.sh @@ -5,9 +5,9 @@ set -euo pipefail SCRIPT_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) -PROLE_HOME=$(cd "$SCRIPT_DIR/../.." && pwd) +KNOE_HOME=$(cd "$SCRIPT_DIR/../.." && pwd) -MANIFEST="$PROLE_HOME/k8s/argocd/install.yaml" +MANIFEST="$KNOE_HOME/k8s/argocd/install.yaml" python3 - "$MANIFEST" <<'PY' import sys diff --git a/tests/etc/test_build-a-bao.sh b/tests/etc/test_build-a-bao.sh index d05a172..2294433 100644 --- a/tests/etc/test_build-a-bao.sh +++ b/tests/etc/test_build-a-bao.sh @@ -2,8 +2,8 @@ # Unit test for etc/build-a-bao.sh SCRIPT_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) -PROLE_HOME=$(cd "$SCRIPT_DIR/../.." && pwd) -ETC_DIR="$PROLE_HOME/etc" +KNOE_HOME=$(cd "$SCRIPT_DIR/../.." && pwd) +ETC_DIR="$KNOE_HOME/etc" SCRIPT_UNDER_TEST="$ETC_DIR/build-a-bao.sh" TMP_DIR=$(mktemp -d) @@ -30,20 +30,20 @@ mock_tool terraform mock_tool ollama mock_tool jq -# Mock prole.cfg +# Mock knoe.cfg mkdir -p "$TMP_DIR/conf" -cat < "$TMP_DIR/conf/prole.cfg" +cat < "$TMP_DIR/conf/knoe.cfg" [globals] -prole.home = $PROLE_HOME -prole.mode = k3d +knoe.home = $KNOE_HOME +knoe.mode = k3d [k3s] server = https://localhost:6443 token = test-token C_EOF export PATH="$TMP_DIR:$PATH" -export PROLE_HOME="$PROLE_HOME" -export PROLE_CONF="$TMP_DIR/conf" +export KNOE_HOME="$KNOE_HOME" +export KNOE_CONF="$TMP_DIR/conf" export NAMESPACE="test-ns" export PROLE_PASSWD="test-password" diff --git a/tests/etc/test_cnpg_k3s_storage_guards.sh b/tests/etc/test_cnpg_k3s_storage_guards.sh index d6ab60a..e3fc813 100644 --- a/tests/etc/test_cnpg_k3s_storage_guards.sh +++ b/tests/etc/test_cnpg_k3s_storage_guards.sh @@ -18,7 +18,7 @@ run_case() { # Ensure case-local env doesn't leak across runs. unset CNPG_MANIFEST_OVERRIDE || true - unset PROLE_NAMESPACE PROLE_MODE DEPLOYMENT_MODE CLUSTER_ENV prole_mode \ + unset PROLE_NAMESPACE KNOE_MODE DEPLOYMENT_MODE CLUSTER_ENV knoe_mode \ LOCAL_REGISTRY LOCAL_REGISTRY_INTERNAL PROLE_K3S_SERVER K3S_SERVER_URL || true local TMP_DIR @@ -117,14 +117,14 @@ if [[ "${args}" == patch*" --local "*" -o yaml"* ]]; then if ($0 ~ /^[[:space:]]*synology\.storage\/role:[[:space:]]*data[[:space:]]*$/) { match($0, /^[[:space:]]*/) indent = substr($0, RSTART, RLENGTH) - print indent "prole.io/namespace: test-ns" - print indent "prole.io/cluster: knoe-db" + print indent "knoe.io/namespace: test-ns" + print indent "knoe.io/cluster: knoe-db" } if ($0 ~ /^[[:space:]]*synology\.storage\/role:[[:space:]]*wal[[:space:]]*$/) { match($0, /^[[:space:]]*/) indent = substr($0, RSTART, RLENGTH) - print indent "prole.io/namespace: test-ns" - print indent "prole.io/cluster: knoe-db" + print indent "knoe.io/namespace: test-ns" + print indent "knoe.io/cluster: knoe-db" } } ' "${src}" @@ -195,7 +195,7 @@ if [[ "$args" == *" get cluster knoe-db -o jsonpath="* ]]; then fi if [[ "$args" == *" get cluster knoe-db -o json"* ]]; then cat <"$CONF_DIR/service/prole.cfg" <"$CONF_DIR/service/knoe.cfg" < "$TMP_DIR/conf/prole.cfg" +cat < "$TMP_DIR/conf/knoe.cfg" [globals] -prole.home = $PROLE_HOME -prole.mode = k3d +knoe.home = $KNOE_HOME +knoe.mode = k3d [k3s] server = https://localhost:6443 token = test-token C_EOF export PATH="$TMP_DIR:$PATH" -export PROLE_HOME="$PROLE_HOME" -export PROLE_CONF="$TMP_DIR/conf" +export KNOE_HOME="$KNOE_HOME" +export KNOE_CONF="$TMP_DIR/conf" export NAMESPACE="test-ns" export PROLE_PASSWD="test-password" diff --git a/tests/etc/test_final_deployment.sh b/tests/etc/test_final_deployment.sh index a3b0ea6..7f00502 100644 --- a/tests/etc/test_final_deployment.sh +++ b/tests/etc/test_final_deployment.sh @@ -2,8 +2,8 @@ # Unit test for etc/final_deployment.sh SCRIPT_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) -PROLE_HOME=$(cd "$SCRIPT_DIR/../.." && pwd) -ETC_DIR="$PROLE_HOME/etc" +KNOE_HOME=$(cd "$SCRIPT_DIR/../.." && pwd) +ETC_DIR="$KNOE_HOME/etc" SCRIPT_UNDER_TEST="$ETC_DIR/final_deployment.sh" TMP_DIR=$(mktemp -d) @@ -30,20 +30,20 @@ mock_tool terraform mock_tool ollama mock_tool jq -# Mock prole.cfg +# Mock knoe.cfg mkdir -p "$TMP_DIR/conf" -cat < "$TMP_DIR/conf/prole.cfg" +cat < "$TMP_DIR/conf/knoe.cfg" [globals] -prole.home = $PROLE_HOME -prole.mode = k3d +knoe.home = $KNOE_HOME +knoe.mode = k3d [k3s] server = https://localhost:6443 token = test-token C_EOF export PATH="$TMP_DIR:$PATH" -export PROLE_HOME="$PROLE_HOME" -export PROLE_CONF="$TMP_DIR/conf" +export KNOE_HOME="$KNOE_HOME" +export KNOE_CONF="$TMP_DIR/conf" export NAMESPACE="test-ns" export PROLE_PASSWD="test-password" diff --git a/tests/etc/test_init_ansible.sh b/tests/etc/test_init_ansible.sh index be691e8..78440d8 100644 --- a/tests/etc/test_init_ansible.sh +++ b/tests/etc/test_init_ansible.sh @@ -2,8 +2,8 @@ # Unit test for etc/init_ansible.sh SCRIPT_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) -PROLE_HOME=$(cd "$SCRIPT_DIR/../.." && pwd) -ETC_DIR="$PROLE_HOME/etc" +KNOE_HOME=$(cd "$SCRIPT_DIR/../.." && pwd) +ETC_DIR="$KNOE_HOME/etc" SCRIPT_UNDER_TEST="$ETC_DIR/init_ansible.sh" TMP_DIR=$(mktemp -d) @@ -30,20 +30,20 @@ mock_tool terraform mock_tool ollama mock_tool jq -# Mock prole.cfg +# Mock knoe.cfg mkdir -p "$TMP_DIR/conf" -cat < "$TMP_DIR/conf/prole.cfg" +cat < "$TMP_DIR/conf/knoe.cfg" [globals] -prole.home = $PROLE_HOME -prole.mode = k3d +knoe.home = $KNOE_HOME +knoe.mode = k3d [k3s] server = https://localhost:6443 token = test-token C_EOF export PATH="$TMP_DIR:$PATH" -export PROLE_HOME="$PROLE_HOME" -export PROLE_CONF="$TMP_DIR/conf" +export KNOE_HOME="$KNOE_HOME" +export KNOE_CONF="$TMP_DIR/conf" export NAMESPACE="test-ns" export PROLE_PASSWD="test-password" export PROLE_VAULT_PASS_FILE="$TMP_DIR/.vault_pass" diff --git a/tests/etc/test_init_cloudnative_pg.sh b/tests/etc/test_init_cloudnative_pg.sh index 6f7d2ca..9540843 100644 --- a/tests/etc/test_init_cloudnative_pg.sh +++ b/tests/etc/test_init_cloudnative_pg.sh @@ -2,8 +2,8 @@ # Unit test for etc/init_cloudnative_pg.sh SCRIPT_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) -PROLE_HOME=$(cd "$SCRIPT_DIR/../.." && pwd) -ETC_DIR="$PROLE_HOME/etc" +KNOE_HOME=$(cd "$SCRIPT_DIR/../.." && pwd) +ETC_DIR="$KNOE_HOME/etc" SCRIPT_UNDER_TEST="$ETC_DIR/init_cloudnative_pg.sh" TMP_DIR=$(mktemp -d) @@ -83,22 +83,22 @@ mock_tool terraform mock_tool ollama mock_tool jq -# Mock prole.cfg (k3s mode, but with a k3d-looking LOCAL_REGISTRY_INTERNAL to reproduce the bug). +# Mock knoe.cfg (k3s mode, but with a k3d-looking LOCAL_REGISTRY_INTERNAL to reproduce the bug). mkdir -p "$TMP_DIR/conf" -cat < "$TMP_DIR/conf/prole.cfg" +cat < "$TMP_DIR/conf/knoe.cfg" [User] NAMESPACE = test-ns SERVICE_NAMESPACE = test-system -PROLE_HOME = $PROLE_HOME -PROLE_SERVICE = $TMP_DIR/service +KNOE_HOME = $KNOE_HOME +KNOE_SERVICE = $TMP_DIR/service [Global] DEPLOYMENT_MODE = k3s -PROLE_K3S_SERVER = https://myrddin.prole.org:6443 +PROLE_K3S_SERVER = https://myrddin.knoe.org:6443 [Docker Build] LOCAL_REGISTRY = localhost:5000 -LOCAL_REGISTRY_INTERNAL = k3d-prole-registry.localhost:5000 +LOCAL_REGISTRY_INTERNAL = k3d-knoe-registry.localhost:5000 C_EOF mkdir -p "$TMP_DIR/service/secrets" @@ -106,11 +106,11 @@ printf '%s' "dummy-private-key" > "$TMP_DIR/service/secrets/admin.key" printf '%s' "dummy-public-key" > "$TMP_DIR/service/secrets/admin.pub" export PATH="$BIN_DIR:$PATH" -export PROLE_HOME="$PROLE_HOME" -export PROLE_CONF="$TMP_DIR/conf" +export KNOE_HOME="$KNOE_HOME" +export KNOE_CONF="$TMP_DIR/conf" export PROLE_PASSWD="test-password" -export PROLE_SERVICE="$TMP_DIR/service" -export CNPG_IMAGE="k3d-prole-registry:5000/knoe-db:18-140" +export KNOE_SERVICE="$TMP_DIR/service" +export CNPG_IMAGE="k3d-knoe-registry:5000/knoe-db:18-140" # Run the script if [[ "init_cloudnative_pg.sh" == *.py ]]; then @@ -135,7 +135,7 @@ if grep -q "Mocked k3d called" "$TMP_DIR/mock_calls.log"; then fi # And we must not produce k3d registry image names. -if grep -q "k3d-prole-registry" "$TMP_DIR/stdout" "$TMP_DIR/stderr" 2>/dev/null; then +if grep -q "k3d-knoe-registry" "$TMP_DIR/stdout" "$TMP_DIR/stderr" 2>/dev/null; then echo "FAILURE: init_cloudnative_pg.sh used k3d registry prefix in k3s mode" echo "--- stdout ---" sed -n '1,200p' "$TMP_DIR/stdout" || true @@ -144,7 +144,7 @@ if grep -q "k3d-prole-registry" "$TMP_DIR/stdout" "$TMP_DIR/stderr" 2>/dev/null; exit 1 fi -if ! grep -q "myrddin.prole.org:5000/knoe-db:18-140" "$TMP_DIR/stdout" "$TMP_DIR/stderr" 2>/dev/null; then +if ! grep -q "myrddin.knoe.org:5000/knoe-db:18-140" "$TMP_DIR/stdout" "$TMP_DIR/stderr" 2>/dev/null; then echo "FAILURE: init_cloudnative_pg.sh did not rewrite CNPG_IMAGE to k3s registry host" echo "--- stdout ---" sed -n '1,200p' "$TMP_DIR/stdout" || true diff --git a/tests/etc/test_init_cloudnative_pg_bootstrap_admin_keys.sh b/tests/etc/test_init_cloudnative_pg_bootstrap_admin_keys.sh index 525a786..dadfc9e 100644 --- a/tests/etc/test_init_cloudnative_pg_bootstrap_admin_keys.sh +++ b/tests/etc/test_init_cloudnative_pg_bootstrap_admin_keys.sh @@ -5,8 +5,8 @@ set -euo pipefail SCRIPT_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) -PROLE_HOME=$(cd "$SCRIPT_DIR/../.." && pwd) -ETC_DIR="$PROLE_HOME/etc" +KNOE_HOME=$(cd "$SCRIPT_DIR/../.." && pwd) +ETC_DIR="$KNOE_HOME/etc" SCRIPT_UNDER_TEST="$ETC_DIR/init_cloudnative_pg.sh" TMP_DIR=$(mktemp -d) @@ -148,7 +148,7 @@ mock_tool k3d mock_tool skopeo mock_tool jq -# Mock prole.cfg: point PROLE_SERVICE at a non-writable dir so the script must fallback to HOME +# Mock knoe.cfg: point KNOE_SERVICE at a non-writable dir so the script must fallback to HOME mkdir -p "$TMP_DIR/conf" mkdir -p "$TMP_DIR/service" chmod 0500 "$TMP_DIR/service" || true @@ -156,12 +156,12 @@ chmod 0500 "$TMP_DIR/service" || true TMP_HOME="$TMP_DIR/home" mkdir -p "$TMP_HOME" -cat <"$TMP_DIR/conf/prole.cfg" +cat <"$TMP_DIR/conf/knoe.cfg" [User] NAMESPACE = test-ns SERVICE_NAMESPACE = test-system -PROLE_HOME = $PROLE_HOME -PROLE_SERVICE = $TMP_DIR/service +KNOE_HOME = $KNOE_HOME +KNOE_SERVICE = $TMP_DIR/service [Global] DEPLOYMENT_MODE = k3d @@ -169,15 +169,15 @@ KUBECONTEXT = test [Docker Build] LOCAL_REGISTRY = localhost:5000 -LOCAL_REGISTRY_INTERNAL = k3d-prole-registry.localhost:5000 +LOCAL_REGISTRY_INTERNAL = k3d-knoe-registry.localhost:5000 C_EOF export PATH="$BIN_DIR:$PATH" export HOME="$TMP_HOME" -export PROLE_HOME="$PROLE_HOME" -export PROLE_CONF="$TMP_DIR/conf" +export KNOE_HOME="$KNOE_HOME" +export KNOE_CONF="$TMP_DIR/conf" export PROLE_PASSWD="test-password" -export PROLE_SERVICE="$TMP_DIR/service" +export KNOE_SERVICE="$TMP_DIR/service" export CNPG_WAIT_TIMEOUT=5 set +e @@ -194,7 +194,7 @@ if [[ $RC -ne 0 ]]; then exit 1 fi -SECRETS_DIR_FALLBACK="$TMP_HOME/.prole/etc/secrets" +SECRETS_DIR_FALLBACK="$TMP_HOME/.knoe/etc/secrets" if [[ ! -f "$SECRETS_DIR_FALLBACK/admin.key" || ! -f "$SECRETS_DIR_FALLBACK/admin.pub" ]]; then echo "FAILURE: expected bootstrap-generated admin.key/admin.pub in fallback secrets dir: $SECRETS_DIR_FALLBACK" ls -la "$SECRETS_DIR_FALLBACK" 2>/dev/null || true diff --git a/tests/etc/test_init_cloudnative_pg_db_password_fallback.sh b/tests/etc/test_init_cloudnative_pg_db_password_fallback.sh index 2e2ea5f..43c4120 100644 --- a/tests/etc/test_init_cloudnative_pg_db_password_fallback.sh +++ b/tests/etc/test_init_cloudnative_pg_db_password_fallback.sh @@ -6,8 +6,8 @@ set -euo pipefail SCRIPT_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) -PROLE_HOME=$(cd "$SCRIPT_DIR/../.." && pwd) -ETC_DIR="$PROLE_HOME/etc" +KNOE_HOME=$(cd "$SCRIPT_DIR/../.." && pwd) +ETC_DIR="$KNOE_HOME/etc" SCRIPT_UNDER_TEST="$ETC_DIR/init_cloudnative_pg.sh" TMP_DIR=$(mktemp -d) @@ -190,12 +190,12 @@ chmod 0500 "$TMP_DIR/service" || true TMP_HOME="$TMP_DIR/home" mkdir -p "$TMP_HOME" -cat <"$TMP_DIR/conf/prole.cfg" +cat <"$TMP_DIR/conf/knoe.cfg" [User] NAMESPACE = test-ns SERVICE_NAMESPACE = test-system -PROLE_HOME = $PROLE_HOME -PROLE_SERVICE = $TMP_DIR/service +KNOE_HOME = $KNOE_HOME +KNOE_SERVICE = $TMP_DIR/service [Global] DEPLOYMENT_MODE = k3d @@ -203,17 +203,17 @@ KUBECONTEXT = test [Docker Build] LOCAL_REGISTRY = localhost:5000 -LOCAL_REGISTRY_INTERNAL = k3d-prole-registry.localhost:5000 +LOCAL_REGISTRY_INTERNAL = k3d-knoe-registry.localhost:5000 C_EOF export PATH="$BIN_DIR:$PATH" export HOME="$TMP_HOME" -export PROLE_HOME="$PROLE_HOME" -export PROLE_CONF="$TMP_DIR/conf" -export PROLE_SERVICE="$TMP_DIR/service" +export KNOE_HOME="$KNOE_HOME" +export KNOE_CONF="$TMP_DIR/conf" +export KNOE_SERVICE="$TMP_DIR/service" export CNPG_WAIT_TIMEOUT=5 -export KNOE_DB_USER="prole" +export KNOE_DB_USER="knoe" export DB_PASSWORD="test-password" set +e diff --git a/tests/etc/test_init_cloudnative_pg_image_policy.sh b/tests/etc/test_init_cloudnative_pg_image_policy.sh index b5c18fc..de189e6 100644 --- a/tests/etc/test_init_cloudnative_pg_image_policy.sh +++ b/tests/etc/test_init_cloudnative_pg_image_policy.sh @@ -140,20 +140,20 @@ printf '%s' "dummy-private-key" > "$SERVICE_DIR/secrets/admin.key" printf '%s' "dummy-public-key" > "$SERVICE_DIR/secrets/admin.pub" write_cfg() { - local prole_home_val="$1" - cat < "$CONF_DIR/prole.cfg" + local knoe_home_val="$1" + cat < "$CONF_DIR/knoe.cfg" [User] NAMESPACE = test-ns SERVICE_NAMESPACE = test-system -PROLE_HOME = ${prole_home_val} -PROLE_SERVICE = ${SERVICE_DIR} +KNOE_HOME = ${knoe_home_val} +KNOE_SERVICE = ${SERVICE_DIR} [Global] DEPLOYMENT_MODE = k3d [Docker Build] LOCAL_REGISTRY = localhost:5000 -LOCAL_REGISTRY_INTERNAL = k3d-prole-registry:5000 +LOCAL_REGISTRY_INTERNAL = k3d-knoe-registry:5000 C_EOF } @@ -208,12 +208,12 @@ run_case() { # Case 1: no-op on same image (initialize) ############################################### -export PROLE_CONF="$CONF_DIR" -export PROLE_SERVICE="$SERVICE_DIR" +export KNOE_CONF="$CONF_DIR" +export KNOE_SERVICE="$SERVICE_DIR" write_cfg "$REPO_ROOT" -export MOCK_CLUSTER_IMAGE="k3d-prole-registry:5000/knoe-db:18-140" +export MOCK_CLUSTER_IMAGE="k3d-knoe-registry:5000/knoe-db:18-140" run_case "noop_initialize" 0 \ bash "$SCRIPT_UNDER_TEST" --mode k3d --namespace test-ns initialize knoe-db 18-140 @@ -224,7 +224,7 @@ assert_not_called "create namespace" # Case 2: mismatch without --upgrade fails early ############################################### -export MOCK_CLUSTER_IMAGE="k3d-prole-registry:5000/knoe-db:18-138" +export MOCK_CLUSTER_IMAGE="k3d-knoe-registry:5000/knoe-db:18-138" run_case "mismatch_initialize" 1 \ bash "$SCRIPT_UNDER_TEST" --mode k3d --namespace test-ns initialize knoe-db 18-140 @@ -235,9 +235,9 @@ assert_not_called "create namespace" # Case 3: mismatch with --upgrade triggers restart hook (deploy) ############################################### -PROLE_HOME_UPGRADE="$TMP_DIR/prole_home" -mkdir -p "$PROLE_HOME_UPGRADE/deploy/opentofu/k3s/manifests/prole" -cat <<'Y_EOF' > "$PROLE_HOME_UPGRADE/deploy/opentofu/k3s/manifests/prole/knoe-db.yaml" +KNOE_HOME_UPGRADE="$TMP_DIR/knoe_home" +mkdir -p "$KNOE_HOME_UPGRADE/deploy/opentofu/k3s/manifests/knoe" +cat <<'Y_EOF' > "$KNOE_HOME_UPGRADE/deploy/opentofu/k3s/manifests/knoe/knoe-db.yaml" apiVersion: postgresql.cnpg.io/v1 kind: Cluster metadata: @@ -246,7 +246,7 @@ spec: instances: 1 imageName: knoe-db:dummy Y_EOF -cat <<'Y_EOF' > "$PROLE_HOME_UPGRADE/deploy/opentofu/k3s/manifests/prole/knoe-db-barman-objectstore.yaml" +cat <<'Y_EOF' > "$KNOE_HOME_UPGRADE/deploy/opentofu/k3s/manifests/knoe/knoe-db-barman-objectstore.yaml" apiVersion: postgresql.cnpg.io/v1 kind: ObjectStore metadata: @@ -254,9 +254,9 @@ metadata: spec: {} Y_EOF -write_cfg "$PROLE_HOME_UPGRADE" +write_cfg "$KNOE_HOME_UPGRADE" -export MOCK_CLUSTER_IMAGE="k3d-prole-registry:5000/knoe-db:18-138" +export MOCK_CLUSTER_IMAGE="k3d-knoe-registry:5000/knoe-db:18-138" run_case "upgrade_deploy" 0 \ bash "$SCRIPT_UNDER_TEST" --mode k3d --namespace test-ns --upgrade deploy 18-140 diff --git a/tests/etc/test_init_cloudnative_pg_instances.sh b/tests/etc/test_init_cloudnative_pg_instances.sh index 7296d96..b1cffe9 100644 --- a/tests/etc/test_init_cloudnative_pg_instances.sh +++ b/tests/etc/test_init_cloudnative_pg_instances.sh @@ -6,8 +6,8 @@ set -euo pipefail SCRIPT_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) -PROLE_HOME=$(cd "$SCRIPT_DIR/../.." && pwd) -ETC_DIR="$PROLE_HOME/etc" +KNOE_HOME=$(cd "$SCRIPT_DIR/../.." && pwd) +ETC_DIR="$KNOE_HOME/etc" SCRIPT_UNDER_TEST="$ETC_DIR/init_cloudnative_pg.sh" TMP_DIR=$(mktemp -d) @@ -129,14 +129,14 @@ if [[ "${args}" == patch*" --local "*" -o yaml"* ]]; then if ($0 ~ /^[[:space:]]*synology\.storage\/role:[[:space:]]*data[[:space:]]*$/) { match($0, /^[[:space:]]*/) indent = substr($0, RSTART, RLENGTH) - print indent "prole.io/namespace: test-ns" - print indent "prole.io/cluster: knoe-db" + print indent "knoe.io/namespace: test-ns" + print indent "knoe.io/cluster: knoe-db" } if ($0 ~ /^[[:space:]]*synology\.storage\/role:[[:space:]]*wal[[:space:]]*$/) { match($0, /^[[:space:]]*/) indent = substr($0, RSTART, RLENGTH) - print indent "prole.io/namespace: test-ns" - print indent "prole.io/cluster: knoe-db" + print indent "knoe.io/namespace: test-ns" + print indent "knoe.io/cluster: knoe-db" } } ' "${src}" @@ -200,7 +200,7 @@ if [[ "${args}" == "get nodes --no-headers" ]]; then done exit 0 fi -if [[ "${args}" == "get nodes -l prole.org/node-role=db --no-headers" ]]; then +if [[ "${args}" == "get nodes -l knoe.org/node-role=db --no-headers" ]]; then n="${MOCK_DB_NODES:-1}" for i in $(seq 1 "$n"); do echo "dbnode-${i} Ready 0d v0" @@ -253,8 +253,8 @@ run_case() { local mock_db_nodes="${4:-1}" local selector_mode="${5:-provided}" - local data_selector_env='{"synology.storage/role":"data","prole.io/namespace":"test-ns","prole.io/cluster":"knoe-db"}' - local wal_selector_env='{"synology.storage/role":"wal","prole.io/namespace":"test-ns","prole.io/cluster":"knoe-db"}' + local data_selector_env='{"synology.storage/role":"data","knoe.io/namespace":"test-ns","knoe.io/cluster":"knoe-db"}' + local wal_selector_env='{"synology.storage/role":"wal","knoe.io/namespace":"test-ns","knoe.io/cluster":"knoe-db"}' if [[ "$selector_mode" == "missing" ]]; then data_selector_env="" wal_selector_env="" @@ -264,26 +264,26 @@ run_case() { local env_home="$TMP_DIR/env-${label}" mkdir -p "$conf_dir" mkdir -p "$env_home" - cat < "$conf_dir/prole.cfg" + cat < "$conf_dir/knoe.cfg" [User] NAMESPACE = test-ns SERVICE_NAMESPACE = test-system -PROLE_HOME = $PROLE_HOME -PROLE_SERVICE = $TMP_DIR/service +KNOE_HOME = $KNOE_HOME +KNOE_SERVICE = $TMP_DIR/service [Global] DEPLOYMENT_MODE = k3s ${cnpg_instances_cfg} C_EOF - # `etc/prole_cfg.sh` sources `$PROLE_HOME/env.sh` unconditionally if present. - # The repo's generated `env.sh` hard-codes PROLE_CONF to the real conf dir, - # so for tests we provide a minimal env.sh that points PROLE_CONF at our temp config. + # `etc/knoe_cfg.sh` sources `$KNOE_HOME/env.sh` unconditionally if present. + # The repo's generated `env.sh` hard-codes KNOE_CONF to the real conf dir, + # so for tests we provide a minimal env.sh that points KNOE_CONF at our temp config. cat < "$env_home/env.sh" #!/usr/bin/env bash -export PROLE_HOME="$PROLE_HOME" -export PROLE_CONF="$conf_dir" -export PROLE_SERVICE="$TMP_DIR/service" +export KNOE_HOME="$KNOE_HOME" +export KNOE_CONF="$conf_dir" +export KNOE_SERVICE="$TMP_DIR/service" E_EOF chmod +x "$env_home/env.sh" @@ -296,7 +296,7 @@ E_EOF CNPG_WAL_SELECTOR_JSON="$wal_selector_env" \ BARMAN_CRD_TIMEOUT=5 BARMAN_TLS_TIMEOUT=5 BARMAN_DEPLOY_TIMEOUT=5 BARMAN_SERVICE_TIMEOUT=5 \ CNPG_STORAGE_VALIDATE_TIMEOUT=5 \ - PROLE_HOME="$env_home" \ + KNOE_HOME="$env_home" \ bash "$SCRIPT_UNDER_TEST" --mode k3s start >/dev/null 2>"$TMP_DIR/stderr-${label}" local rc=$? set -e @@ -320,8 +320,8 @@ assert_applied_has_namespace_cluster_selectors() { local label="$1" local ns_count cluster_count - ns_count=$(grep -cE '^\s*prole\.io/namespace:\s*test-ns\s*$' "$TMP_DIR/applied.yaml" || true) - cluster_count=$(grep -cE '^\s*prole\.io/cluster:\s*knoe-db\s*$' "$TMP_DIR/applied.yaml" || true) + ns_count=$(grep -cE '^\s*knoe\.io/namespace:\s*test-ns\s*$' "$TMP_DIR/applied.yaml" || true) + cluster_count=$(grep -cE '^\s*knoe\.io/cluster:\s*knoe-db\s*$' "$TMP_DIR/applied.yaml" || true) if (( ns_count < 2 )); then echo "FAILURE: expected namespace selectors for both data and wal in case '${label}'" @@ -340,7 +340,7 @@ assert_applied_has_namespace_cluster_selectors() { # when only one node is Ready/schedulable. run_case "default" "" 1 1 assert_applied_has_namespace_cluster_selectors "default" -if grep -qE '^\s*- key:\s*kubernetes\\.io/hostname\s*$|myrddin\\.prole\\.org' "$TMP_DIR/applied.yaml"; then +if grep -qE '^\s*- key:\s*kubernetes\\.io/hostname\s*$|myrddin\\.knoe\\.org' "$TMP_DIR/applied.yaml"; then echo "FAILURE: expected no hostname pinning in applied manifest (default)" sed -n '1,160p' "$TMP_DIR/applied.yaml" || true exit 1 diff --git a/tests/etc/test_init_cloudnative_pg_k3d_k3s_registry_cache.sh b/tests/etc/test_init_cloudnative_pg_k3d_k3s_registry_cache.sh index 2a8895f..55c19c0 100644 --- a/tests/etc/test_init_cloudnative_pg_k3d_k3s_registry_cache.sh +++ b/tests/etc/test_init_cloudnative_pg_k3d_k3s_registry_cache.sh @@ -52,7 +52,7 @@ fi if [[ "$cmd1" == "pull" ]]; then # Succeed only for the expected k3s registry ref. - if [[ "$cmd2" == myrddin.prole.org:5000/knoe-db:* ]]; then + if [[ "$cmd2" == myrddin.knoe.org:5000/knoe-db:* ]]; then exit 0 fi exit 1 @@ -89,21 +89,21 @@ M_EOF chmod +x "$BIN_DIR/$t" done -# Mock prole.cfg for k3d mode. +# Mock knoe.cfg for k3d mode. mkdir -p "$TMP_DIR/conf" -cat < "$TMP_DIR/conf/prole.cfg" +cat < "$TMP_DIR/conf/knoe.cfg" [User] NAMESPACE = test-ns SERVICE_NAMESPACE = test-system -PROLE_HOME = $REPO_ROOT -PROLE_SERVICE = $TMP_DIR/service +KNOE_HOME = $REPO_ROOT +KNOE_SERVICE = $TMP_DIR/service [Global] DEPLOYMENT_MODE = k3d [Docker Build] LOCAL_REGISTRY = localhost:5000 -LOCAL_REGISTRY_INTERNAL = k3d-prole-registry.localhost:5000 +LOCAL_REGISTRY_INTERNAL = k3d-knoe-registry.localhost:5000 C_EOF mkdir -p "$TMP_DIR/service/secrets" @@ -111,17 +111,17 @@ printf '%s' "dummy-private-key" > "$TMP_DIR/service/secrets/admin.key" printf '%s' "dummy-public-key" > "$TMP_DIR/service/secrets/admin.pub" export PATH="$BIN_DIR:$PATH" -export PROLE_HOME="$REPO_ROOT" -export PROLE_CONF="$TMP_DIR/conf" +export KNOE_HOME="$REPO_ROOT" +export KNOE_CONF="$TMP_DIR/conf" export PROLE_PASSWD="test-password" -export PROLE_SERVICE="$TMP_DIR/service" +export KNOE_SERVICE="$TMP_DIR/service" # Run a path that triggers image preflight. bash "$SCRIPT_UNDER_TEST" --mode k3d preflight-image > "$TMP_DIR/stdout" 2> "$TMP_DIR/stderr" RC=$? # Assertions -if ! grep -q "Mocked docker called with pull myrddin.prole.org:5000/knoe-db:" "${_log_file}"; then +if ! grep -q "Mocked docker called with pull myrddin.knoe.org:5000/knoe-db:" "${_log_file}"; then echo "FAILURE: expected a k3s-registry pull attempt in k3d mode" >&2 echo "--- mock calls ---" >&2 sed -n '1,200p' "${_log_file}" >&2 || true diff --git a/tests/etc/test_init_cloudnative_pg_manifest_validation_fail_fast.sh b/tests/etc/test_init_cloudnative_pg_manifest_validation_fail_fast.sh index 0c70e2c..1bf4ad7 100644 --- a/tests/etc/test_init_cloudnative_pg_manifest_validation_fail_fast.sh +++ b/tests/etc/test_init_cloudnative_pg_manifest_validation_fail_fast.sh @@ -21,13 +21,13 @@ M_EOF chmod +x "$BIN_DIR/$1" } -RECOVERY_TEMPLATE_REAL="$PROLE_REPO_HOME/k8s/prole/knoe-db-recovery.yaml.tpl" +RECOVERY_TEMPLATE_REAL="$PROLE_REPO_HOME/k8s/knoe/knoe-db-recovery.yaml.tpl" RECOVERY_TEMPLATE_BAK="$TMP_DIR/knoe-db-recovery.yaml.tpl.bak" cp "$RECOVERY_TEMPLATE_REAL" "$RECOVERY_TEMPLATE_BAK" trap 'cp "$RECOVERY_TEMPLATE_BAK" "$RECOVERY_TEMPLATE_REAL" 2>/dev/null || true; rm -rf "$TMP_DIR"' EXIT -FAKE_PROLE_HOME="$TMP_DIR/fake-prole-home" -MANIFEST_DIR="$FAKE_PROLE_HOME/deploy/opentofu/k3s/manifests/prole" +FAKE_KNOE_HOME="$TMP_DIR/fake-knoe-home" +MANIFEST_DIR="$FAKE_KNOE_HOME/deploy/opentofu/k3s/manifests/knoe" mkdir -p "$MANIFEST_DIR" cat <<'Y_EOF' > "$MANIFEST_DIR/knoe-db.yaml" @@ -243,12 +243,12 @@ CONF_DIR="$TMP_DIR/conf" ENV_HOME="$TMP_DIR/env" mkdir -p "$CONF_DIR" "$ENV_HOME" -cat < "$CONF_DIR/prole.cfg" +cat < "$CONF_DIR/knoe.cfg" [User] NAMESPACE = test-ns SERVICE_NAMESPACE = test-system -PROLE_HOME = $FAKE_PROLE_HOME -PROLE_SERVICE = $TMP_DIR/service +KNOE_HOME = $FAKE_KNOE_HOME +KNOE_SERVICE = $TMP_DIR/service [Global] DEPLOYMENT_MODE = k3s @@ -256,14 +256,14 @@ C_EOF cat < "$ENV_HOME/env.sh" #!/usr/bin/env bash -export PROLE_HOME="$ENV_HOME" -export PROLE_CONF="$CONF_DIR" -export PROLE_SERVICE="$TMP_DIR/service" +export KNOE_HOME="$ENV_HOME" +export KNOE_CONF="$CONF_DIR" +export KNOE_SERVICE="$TMP_DIR/service" E_EOF chmod +x "$ENV_HOME/env.sh" set +e -PROLE_HOME="$ENV_HOME" \ +KNOE_HOME="$ENV_HOME" \ SYNOLOGY_ROOTS="$TMP_DIR/synology/d001,$TMP_DIR/synology/d002,$TMP_DIR/synology/d003,$TMP_DIR/synology/d004" \ CNPG_DATA_HOST_PATH="$TMP_DIR/synology/d001/knoe/knoe-db/test-ns/knoe-db/data" \ CNPG_WAL_HOST_PATH="$TMP_DIR/synology/d002/knoe/knoe-db/test-ns/knoe-db/wal" \ diff --git a/tests/etc/test_init_cloudnative_pg_no_kong_in_db_namespace.sh b/tests/etc/test_init_cloudnative_pg_no_kong_in_db_namespace.sh index c207f31..cbae659 100644 --- a/tests/etc/test_init_cloudnative_pg_no_kong_in_db_namespace.sh +++ b/tests/etc/test_init_cloudnative_pg_no_kong_in_db_namespace.sh @@ -24,14 +24,14 @@ M_EOF chmod +x "$BIN_DIR/$1" } -RECOVERY_TEMPLATE_REAL="$PROLE_REPO_HOME/k8s/prole/knoe-db-recovery.yaml.tpl" +RECOVERY_TEMPLATE_REAL="$PROLE_REPO_HOME/k8s/knoe/knoe-db-recovery.yaml.tpl" RECOVERY_TEMPLATE_BAK="$TMP_DIR/knoe-db-recovery.yaml.tpl.bak" cp "$RECOVERY_TEMPLATE_REAL" "$RECOVERY_TEMPLATE_BAK" trap 'cp "$RECOVERY_TEMPLATE_BAK" "$RECOVERY_TEMPLATE_REAL" 2>/dev/null || true' EXIT -# Fake PROLE_HOME with a minimal manifest set that includes Kong YAMLs. -FAKE_PROLE_HOME="$TMP_DIR/fake-prole-home" -MANIFEST_DIR="$FAKE_PROLE_HOME/deploy/opentofu/k3s/manifests/prole" +# Fake KNOE_HOME with a minimal manifest set that includes Kong YAMLs. +FAKE_KNOE_HOME="$TMP_DIR/fake-knoe-home" +MANIFEST_DIR="$FAKE_KNOE_HOME/deploy/opentofu/k3s/manifests/knoe" mkdir -p "$MANIFEST_DIR" cat < "$MANIFEST_DIR/knoe-db.yaml" @@ -48,16 +48,16 @@ cat < "$MANIFEST_DIR/kong-deployment.yaml" apiVersion: apps/v1 kind: Deployment metadata: - name: prole-svc-kong + name: knoe-svc-kong spec: replicas: 1 selector: matchLabels: - app: prole-svc-kong + app: knoe-svc-kong template: metadata: labels: - app: prole-svc-kong + app: knoe-svc-kong spec: containers: - name: kong @@ -68,7 +68,7 @@ cat < "$MANIFEST_DIR/kong-configmap.yaml" apiVersion: v1 kind: ConfigMap metadata: - name: prole-svc-kong-config + name: knoe-svc-kong-config data: kong.yml: | _format_version: "3.0" @@ -180,12 +180,12 @@ if [[ "${args}" == apply* && "${args}" == *" -f "* ]]; then if [[ "${f}" == "-" ]]; then tmpf="${TMP_DIR}/kubectl-stdin-apply.yaml" cat >"${tmpf}" || true - if grep -qE 'prole-svc-kong|prole-svc-kong-config' "${tmpf}"; then + if grep -qE 'knoe-svc-kong|knoe-svc-kong-config' "${tmpf}"; then echo "FAILURE: Kong manifest applied via stdin" >> "${TMP_DIR}/failures.log" touch "${TMP_DIR}/kong_applied" fi elif [[ -n "${f}" && -f "${f}" ]]; then - if grep -qE 'prole-svc-kong|prole-svc-kong-config' "${f}"; then + if grep -qE 'knoe-svc-kong|knoe-svc-kong-config' "${f}"; then echo "FAILURE: Kong manifest applied from file ${f}" >> "${TMP_DIR}/failures.log" touch "${TMP_DIR}/kong_applied" fi @@ -210,29 +210,29 @@ mock_tool jq export PATH="$BIN_DIR:$PATH" export TMP_DIR -# Minimal prole.cfg +# Minimal knoe.cfg CONF_DIR="$TMP_DIR/conf" ENV_HOME="$TMP_DIR/env-home" mkdir -p "$CONF_DIR" "$ENV_HOME" "$TMP_DIR/service/secrets" -cat < "$CONF_DIR/prole.cfg" +cat < "$CONF_DIR/knoe.cfg" [User] NAMESPACE = test-ns SERVICE_NAMESPACE = test-system -PROLE_HOME = $FAKE_PROLE_HOME -PROLE_SERVICE = $TMP_DIR/service +KNOE_HOME = $FAKE_KNOE_HOME +KNOE_SERVICE = $TMP_DIR/service [Global] DEPLOYMENT_MODE = k3s -PROLE_K3S_SERVER = https://myrddin.prole.org:6443 +PROLE_K3S_SERVER = https://myrddin.knoe.org:6443 C_EOF -# Provide a minimal env.sh so prole_cfg.sh reads our temp config. +# Provide a minimal env.sh so knoe_cfg.sh reads our temp config. cat < "$ENV_HOME/env.sh" #!/usr/bin/env bash -export PROLE_HOME="$FAKE_PROLE_HOME" -export PROLE_CONF="$CONF_DIR" -export PROLE_SERVICE="$TMP_DIR/service" +export KNOE_HOME="$FAKE_KNOE_HOME" +export KNOE_CONF="$CONF_DIR" +export KNOE_SERVICE="$TMP_DIR/service" E_EOF chmod +x "$ENV_HOME/env.sh" @@ -240,10 +240,10 @@ chmod +x "$ENV_HOME/env.sh" printf '%s' "dummy-private-key" > "$TMP_DIR/service/secrets/admin.key" printf '%s' "dummy-public-key" > "$TMP_DIR/service/secrets/admin.pub" -# Run initialize, but force a fast failure after ensure_prole_stack_resources +# Run initialize, but force a fast failure after ensure_knoe_stack_resources # by making CNPG readiness timeout tiny. set +e -CNPG_IMAGE="knoe-db:test" CNPG_WAIT_TIMEOUT=1 PROLE_PASSWD="test-password" PROLE_HOME="$ENV_HOME" \ +CNPG_IMAGE="knoe-db:test" CNPG_WAIT_TIMEOUT=1 PROLE_PASSWD="test-password" KNOE_HOME="$ENV_HOME" \ bash "$SCRIPT_UNDER_TEST" --mode k3s initialize >"$TMP_DIR/stdout" 2>"$TMP_DIR/stderr" RC=$? set -e diff --git a/tests/etc/test_init_cnpg_backup.sh b/tests/etc/test_init_cnpg_backup.sh index 7a486eb..b1127e5 100644 --- a/tests/etc/test_init_cnpg_backup.sh +++ b/tests/etc/test_init_cnpg_backup.sh @@ -5,8 +5,8 @@ set -euo pipefail SCRIPT_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) -PROLE_HOME_REPO=$(cd "$SCRIPT_DIR/../.." && pwd) -ETC_DIR="$PROLE_HOME_REPO/etc" +KNOE_HOME_REPO=$(cd "$SCRIPT_DIR/../.." && pwd) +ETC_DIR="$KNOE_HOME_REPO/etc" SCRIPT_UNDER_TEST="$ETC_DIR/init_cnpg_backup.sh" TMP_DIR=$(mktemp -d) @@ -221,17 +221,17 @@ chmod +x "$BIN_DIR/kubectl" export PATH="$BIN_DIR:$PATH" export TMP_DIR -# prole_cfg.sh sources $PROLE_HOME/env.sh if present; provide a minimal env.sh that points to our temp config. +# knoe_cfg.sh sources $KNOE_HOME/env.sh if present; provide a minimal env.sh that points to our temp config. CONF_DIR="$TMP_DIR/conf" ENV_HOME="$TMP_DIR/env-home" mkdir -p "$CONF_DIR" "$ENV_HOME" -cat < "$CONF_DIR/prole.cfg" +cat < "$CONF_DIR/knoe.cfg" [User] NAMESPACE = test-ns SERVICE_NAMESPACE = test-system -PROLE_HOME = $PROLE_HOME_REPO -PROLE_SERVICE = $TMP_DIR/service +KNOE_HOME = $KNOE_HOME_REPO +KNOE_SERVICE = $TMP_DIR/service [Global] DEPLOYMENT_MODE = k3s @@ -239,13 +239,13 @@ C_EOF cat < "$ENV_HOME/env.sh" #!/usr/bin/env bash -export PROLE_HOME="$PROLE_HOME_REPO" -export PROLE_CONF="$CONF_DIR" +export KNOE_HOME="$KNOE_HOME_REPO" +export KNOE_CONF="$CONF_DIR" E_EOF chmod +x "$ENV_HOME/env.sh" set +e -PROLE_HOME="$ENV_HOME" PROLE_NAMESPACE="test-ns" SERVICE_NAMESPACE="test-system" GARAGE_NAMESPACE="test-system" GARAGE_S3_ENDPOINT="http://garage.test-system.svc.cluster.local:3900" bash "$SCRIPT_UNDER_TEST" backup full >"$TMP_DIR/stdout" 2>"$TMP_DIR/stderr" +KNOE_HOME="$ENV_HOME" PROLE_NAMESPACE="test-ns" SERVICE_NAMESPACE="test-system" GARAGE_NAMESPACE="test-system" GARAGE_S3_ENDPOINT="http://garage.test-system.svc.cluster.local:3900" bash "$SCRIPT_UNDER_TEST" backup full >"$TMP_DIR/stdout" 2>"$TMP_DIR/stderr" RC=$? set -e diff --git a/tests/etc/test_init_cnpg_backup_does_not_patch_cluster_backup_spec.sh b/tests/etc/test_init_cnpg_backup_does_not_patch_cluster_backup_spec.sh index bb88564..d63ce62 100644 --- a/tests/etc/test_init_cnpg_backup_does_not_patch_cluster_backup_spec.sh +++ b/tests/etc/test_init_cnpg_backup_does_not_patch_cluster_backup_spec.sh @@ -5,8 +5,8 @@ set -euo pipefail SCRIPT_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) -PROLE_HOME_REPO=$(cd "$SCRIPT_DIR/../.." && pwd) -ETC_DIR="$PROLE_HOME_REPO/etc" +KNOE_HOME_REPO=$(cd "$SCRIPT_DIR/../.." && pwd) +ETC_DIR="$KNOE_HOME_REPO/etc" SCRIPT_UNDER_TEST="$ETC_DIR/init_cnpg_backup.sh" TMP_DIR=$(mktemp -d) @@ -228,17 +228,17 @@ chmod +x "$BIN_DIR/kubectl" export PATH="$BIN_DIR:$PATH" -# Minimal prole.cfg +# Minimal knoe.cfg CONF_DIR="$TMP_DIR/conf" ENV_HOME="$TMP_DIR/env-home" mkdir -p "$CONF_DIR" "$ENV_HOME" -cat <"$CONF_DIR/prole.cfg" +cat <"$CONF_DIR/knoe.cfg" [User] NAMESPACE = test-ns SERVICE_NAMESPACE = test-system -PROLE_HOME = $PROLE_HOME_REPO -PROLE_SERVICE = $TMP_DIR/service +KNOE_HOME = $KNOE_HOME_REPO +KNOE_SERVICE = $TMP_DIR/service [Global] DEPLOYMENT_MODE = k3s @@ -246,13 +246,13 @@ C_EOF cat <"$ENV_HOME/env.sh" #!/usr/bin/env bash -export PROLE_HOME="$PROLE_HOME_REPO" -export PROLE_CONF="$CONF_DIR" +export KNOE_HOME="$KNOE_HOME_REPO" +export KNOE_CONF="$CONF_DIR" E_EOF chmod +x "$ENV_HOME/env.sh" set +e -PROLE_HOME="$ENV_HOME" PROLE_NAMESPACE="test-ns" SERVICE_NAMESPACE="test-system" GARAGE_NAMESPACE="test-system" GARAGE_S3_ENDPOINT="http://garage.test-system.svc.cluster.local:3900" bash "$SCRIPT_UNDER_TEST" backup full >"$TMP_DIR/stdout" 2>"$TMP_DIR/stderr" +KNOE_HOME="$ENV_HOME" PROLE_NAMESPACE="test-ns" SERVICE_NAMESPACE="test-system" GARAGE_NAMESPACE="test-system" GARAGE_S3_ENDPOINT="http://garage.test-system.svc.cluster.local:3900" bash "$SCRIPT_UNDER_TEST" backup full >"$TMP_DIR/stdout" 2>"$TMP_DIR/stderr" RC=$? set -e diff --git a/tests/etc/test_init_cnpg_backup_start_waits_for_plugin_socket.sh b/tests/etc/test_init_cnpg_backup_start_waits_for_plugin_socket.sh index 739248d..7e1aefe 100644 --- a/tests/etc/test_init_cnpg_backup_start_waits_for_plugin_socket.sh +++ b/tests/etc/test_init_cnpg_backup_start_waits_for_plugin_socket.sh @@ -5,8 +5,8 @@ set -euo pipefail SCRIPT_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) -PROLE_HOME_REPO=$(cd "$SCRIPT_DIR/../.." && pwd) -ETC_DIR="$PROLE_HOME_REPO/etc" +KNOE_HOME_REPO=$(cd "$SCRIPT_DIR/../.." && pwd) +ETC_DIR="$KNOE_HOME_REPO/etc" SCRIPT_UNDER_TEST="$ETC_DIR/init_cnpg_backup.sh" TMP_DIR=$(mktemp -d) @@ -285,17 +285,17 @@ chmod +x "$BIN_DIR/kubectl" export PATH="$BIN_DIR:$PATH" -# prole_cfg.sh sources $PROLE_HOME/env.sh if present; provide a minimal env.sh that points to our temp config. +# knoe_cfg.sh sources $KNOE_HOME/env.sh if present; provide a minimal env.sh that points to our temp config. CONF_DIR="$TMP_DIR/conf" ENV_HOME="$TMP_DIR/env-home" mkdir -p "$CONF_DIR" "$ENV_HOME" -cat <"$CONF_DIR/prole.cfg" +cat <"$CONF_DIR/knoe.cfg" [User] NAMESPACE = test-ns SERVICE_NAMESPACE = test-system -PROLE_HOME = $PROLE_HOME_REPO -PROLE_SERVICE = $TMP_DIR/service +KNOE_HOME = $KNOE_HOME_REPO +KNOE_SERVICE = $TMP_DIR/service [Global] DEPLOYMENT_MODE = k3d @@ -303,13 +303,13 @@ C_EOF cat <"$ENV_HOME/env.sh" #!/usr/bin/env bash -export PROLE_HOME="$PROLE_HOME_REPO" -export PROLE_CONF="$CONF_DIR" +export KNOE_HOME="$KNOE_HOME_REPO" +export KNOE_CONF="$CONF_DIR" E_EOF chmod +x "$ENV_HOME/env.sh" set +e -PROLE_HOME="$ENV_HOME" PROLE_NAMESPACE="test-ns" SERVICE_NAMESPACE="test-system" GARAGE_NAMESPACE="test-system" GARAGE_S3_ENDPOINT="http://garage.test-system.svc.cluster.local:3900" bash "$SCRIPT_UNDER_TEST" start >"$TMP_DIR/stdout" 2>"$TMP_DIR/stderr" +KNOE_HOME="$ENV_HOME" PROLE_NAMESPACE="test-ns" SERVICE_NAMESPACE="test-system" GARAGE_NAMESPACE="test-system" GARAGE_S3_ENDPOINT="http://garage.test-system.svc.cluster.local:3900" bash "$SCRIPT_UNDER_TEST" start >"$TMP_DIR/stdout" 2>"$TMP_DIR/stderr" RC=$? set -e diff --git a/tests/etc/test_init_common_services.sh b/tests/etc/test_init_common_services.sh index 9b17510..8b0f08b 100644 --- a/tests/etc/test_init_common_services.sh +++ b/tests/etc/test_init_common_services.sh @@ -2,8 +2,8 @@ # Unit test for etc/init_common_services.sh SCRIPT_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) -PROLE_HOME=$(cd "$SCRIPT_DIR/../.." && pwd) -ETC_DIR="$PROLE_HOME/etc" +KNOE_HOME=$(cd "$SCRIPT_DIR/../.." && pwd) +ETC_DIR="$KNOE_HOME/etc" SCRIPT_UNDER_TEST="$ETC_DIR/init_common_services.sh" # Ensure docker-preload is opt-in (disabled by default) @@ -40,20 +40,20 @@ mock_tool terraform mock_tool ollama mock_tool jq -# Mock prole.cfg +# Mock knoe.cfg mkdir -p "$TMP_DIR/conf" -cat < "$TMP_DIR/conf/prole.cfg" +cat < "$TMP_DIR/conf/knoe.cfg" [globals] -prole.home = $PROLE_HOME -prole.mode = k3d +knoe.home = $KNOE_HOME +knoe.mode = k3d [k3s] server = https://localhost:6443 token = test-token C_EOF export PATH="$TMP_DIR:$PATH" -export PROLE_HOME="$PROLE_HOME" -export PROLE_CONF="$TMP_DIR/conf" +export KNOE_HOME="$KNOE_HOME" +export KNOE_CONF="$TMP_DIR/conf" export NAMESPACE="test-ns" export PROLE_PASSWD="test-password" diff --git a/tests/etc/test_init_db_manager.sh b/tests/etc/test_init_db_manager.sh index d073483..edb2023 100755 --- a/tests/etc/test_init_db_manager.sh +++ b/tests/etc/test_init_db_manager.sh @@ -1,8 +1,8 @@ #!/usr/bin/env bash # Unit test for etc/init_db_manager.sh SCRIPT_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) -PROLE_HOME=$(cd "$SCRIPT_DIR/../.." && pwd) -ETC_DIR="$PROLE_HOME/etc" +KNOE_HOME=$(cd "$SCRIPT_DIR/../.." && pwd) +ETC_DIR="$KNOE_HOME/etc" SCRIPT_UNDER_TEST="$ETC_DIR/init_db_manager.sh" TMP_DIR=$(mktemp -d) trap 'rm -rf "$TMP_DIR"' EXIT @@ -25,19 +25,19 @@ mock_tool tofu mock_tool terraform mock_tool ollama mock_tool jq -# Mock prole.cfg +# Mock knoe.cfg mkdir -p "$TMP_DIR/conf" -cat < "$TMP_DIR/conf/prole.cfg" +cat < "$TMP_DIR/conf/knoe.cfg" [globals] -prole.home = $PROLE_HOME -prole.mode = k3d +knoe.home = $KNOE_HOME +knoe.mode = k3d [k3s] server = https://localhost:6443 token = test-token C_EOF export PATH="$TMP_DIR:$PATH" -export PROLE_HOME="$PROLE_HOME" -export PROLE_CONF="$TMP_DIR/conf" +export KNOE_HOME="$KNOE_HOME" +export KNOE_CONF="$TMP_DIR/conf" export NAMESPACE="test-ns" export PROLE_PASSWD="test-password" # Run the script diff --git a/tests/etc/test_init_garage_recycles_released_pv_claimref.sh b/tests/etc/test_init_garage_recycles_released_pv_claimref.sh index c73edee..bb1c118 100644 --- a/tests/etc/test_init_garage_recycles_released_pv_claimref.sh +++ b/tests/etc/test_init_garage_recycles_released_pv_claimref.sh @@ -5,32 +5,32 @@ set -euo pipefail SCRIPT_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) -PROLE_HOME=$(cd "$SCRIPT_DIR/../.." && pwd) -SOURCE_ETC_DIR="$PROLE_HOME/etc" -SOURCE_ETC_LIB_SHELL_DIR="$PROLE_HOME/etc/lib/shell" +KNOE_HOME=$(cd "$SCRIPT_DIR/../.." && pwd) +SOURCE_ETC_DIR="$KNOE_HOME/etc" +SOURCE_ETC_LIB_SHELL_DIR="$KNOE_HOME/etc/lib/shell" TMP_DIR=$(mktemp -d) trap 'rm -rf "$TMP_DIR"' EXIT WORK_DIR="$TMP_DIR/work" BIN_DIR="$TMP_DIR/bin" -mkdir -p "$WORK_DIR/etc/lib/shell" "$WORK_DIR/conf" "$WORK_DIR/k8s/prole" "$BIN_DIR" +mkdir -p "$WORK_DIR/etc/lib/shell" "$WORK_DIR/conf" "$WORK_DIR/k8s/knoe" "$BIN_DIR" cp "$SOURCE_ETC_DIR/init_garage_store.sh" "$WORK_DIR/etc/init_garage_store.sh" cp "$SOURCE_ETC_DIR/common_core_lib.sh" "$WORK_DIR/etc/common_core_lib.sh" cp "$SOURCE_ETC_LIB_SHELL_DIR/common_core_lib.sh" "$WORK_DIR/etc/lib/shell/common_core_lib.sh" -cp "$SOURCE_ETC_DIR/prole_cfg.sh" "$WORK_DIR/etc/prole_cfg.sh" +cp "$SOURCE_ETC_DIR/knoe_cfg.sh" "$WORK_DIR/etc/knoe_cfg.sh" chmod +x "$WORK_DIR/etc/init_garage_store.sh" # Dummy manifests required by init_garage_store.sh for f in storageclass-synology-iscsi.yaml iscsi-pvs.yaml garage-configmap.yaml garage-statefulset.yaml garage-service.yaml; do - printf '%s\n' "apiVersion: v1" > "$WORK_DIR/k8s/prole/$f" + printf '%s\n' "apiVersion: v1" > "$WORK_DIR/k8s/knoe/$f" done -cat < "$WORK_DIR/conf/prole.cfg" +cat < "$WORK_DIR/conf/knoe.cfg" [globals] -prole.home = $WORK_DIR -prole.mode = k3s +knoe.home = $WORK_DIR +knoe.mode = k3s NAMESPACE = test-ns SERVICE_NAMESPACE = knoe-system EOF @@ -135,9 +135,9 @@ chmod +x "$BIN_DIR/kubectl" export PATH="$BIN_DIR:$PATH" -export PROLE_HOME="$WORK_DIR" -export PROLE_CONF="$WORK_DIR/conf" -export PROLE_MODE="k3s" +export KNOE_HOME="$WORK_DIR" +export KNOE_CONF="$WORK_DIR/conf" +export KNOE_MODE="k3s" export PVC_REPAIR_WAIT_TIMEOUT="0s" if "$WORK_DIR/etc/init_garage_store.sh" -n "test-ns" restart >"$TMP_DIR/stdout" 2>"$TMP_DIR/stderr"; then diff --git a/tests/etc/test_init_garage_store.sh b/tests/etc/test_init_garage_store.sh index 4b404fc..162a495 100644 --- a/tests/etc/test_init_garage_store.sh +++ b/tests/etc/test_init_garage_store.sh @@ -2,8 +2,8 @@ # Unit test for etc/init_garage_store.sh SCRIPT_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) -PROLE_HOME=$(cd "$SCRIPT_DIR/../.." && pwd) -ETC_DIR="$PROLE_HOME/etc" +KNOE_HOME=$(cd "$SCRIPT_DIR/../.." && pwd) +ETC_DIR="$KNOE_HOME/etc" SCRIPT_UNDER_TEST="$ETC_DIR/init_garage_store.sh" TMP_DIR=$(mktemp -d) @@ -30,20 +30,20 @@ mock_tool terraform mock_tool ollama mock_tool jq -# Mock prole.cfg +# Mock knoe.cfg mkdir -p "$TMP_DIR/conf" -cat < "$TMP_DIR/conf/prole.cfg" +cat < "$TMP_DIR/conf/knoe.cfg" [globals] -prole.home = $PROLE_HOME -prole.mode = k3d +knoe.home = $KNOE_HOME +knoe.mode = k3d [k3s] server = https://localhost:6443 token = test-token C_EOF export PATH="$TMP_DIR:$PATH" -export PROLE_HOME="$PROLE_HOME" -export PROLE_CONF="$TMP_DIR/conf" +export KNOE_HOME="$KNOE_HOME" +export KNOE_CONF="$TMP_DIR/conf" export NAMESPACE="test-ns" export PROLE_PASSWD="test-password" diff --git a/tests/etc/test_init_garage_store_k8s_non_authoritative_context_cleans_up.sh b/tests/etc/test_init_garage_store_k8s_non_authoritative_context_cleans_up.sh index 9ad5a6d..f2aa54f 100644 --- a/tests/etc/test_init_garage_store_k8s_non_authoritative_context_cleans_up.sh +++ b/tests/etc/test_init_garage_store_k8s_non_authoritative_context_cleans_up.sh @@ -3,35 +3,35 @@ set -euo pipefail SCRIPT_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) -PROLE_HOME=$(cd "$SCRIPT_DIR/../.." && pwd) -SOURCE_ETC_DIR="$PROLE_HOME/etc" -SOURCE_ETC_LIB_SHELL_DIR="$PROLE_HOME/etc/lib/shell" +KNOE_HOME=$(cd "$SCRIPT_DIR/../.." && pwd) +SOURCE_ETC_DIR="$KNOE_HOME/etc" +SOURCE_ETC_LIB_SHELL_DIR="$KNOE_HOME/etc/lib/shell" TMP_DIR=$(mktemp -d) trap 'rm -rf "$TMP_DIR"' EXIT WORK_DIR="$TMP_DIR/work" BIN_DIR="$TMP_DIR/bin" -mkdir -p "$WORK_DIR/etc/lib/shell" "$WORK_DIR/conf" "$WORK_DIR/k8s/prole" "$BIN_DIR" +mkdir -p "$WORK_DIR/etc/lib/shell" "$WORK_DIR/conf" "$WORK_DIR/k8s/knoe" "$BIN_DIR" cp "$SOURCE_ETC_DIR/init_garage_store.sh" "$WORK_DIR/etc/init_garage_store.sh" cp "$SOURCE_ETC_DIR/common_core_lib.sh" "$WORK_DIR/etc/common_core_lib.sh" -cp "$SOURCE_ETC_DIR/prole_cfg.sh" "$WORK_DIR/etc/prole_cfg.sh" +cp "$SOURCE_ETC_DIR/knoe_cfg.sh" "$WORK_DIR/etc/knoe_cfg.sh" cp "$SOURCE_ETC_LIB_SHELL_DIR/common_core_lib.sh" "$WORK_DIR/etc/lib/shell/common_core_lib.sh" chmod +x "$WORK_DIR/etc/init_garage_store.sh" # Minimal manifest files expected in k8s mode for f in storageclass-gcp-hdd.yaml garage-configmap.yaml garage-statefulset-gcp.yaml garage-service.yaml; do - printf '%s\n' "apiVersion: v1" > "$WORK_DIR/k8s/prole/$f" + printf '%s\n' "apiVersion: v1" > "$WORK_DIR/k8s/knoe/$f" done app_ctx="gke_plenary-truck-485623-p7_us-west3_knoe-dev-0" db_ctx="gke_plenary-truck-485623-p7_us-west3_knoe-dev-cnpg-0" -cat < "$WORK_DIR/conf/prole.cfg" +cat < "$WORK_DIR/conf/knoe.cfg" [globals] -prole.home = $WORK_DIR -prole.mode = k8s +knoe.home = $WORK_DIR +knoe.mode = k8s NAMESPACE = knoe-system SERVICE_NAMESPACE = knoe-system APP_CLUSTER_KUBECONTEXT = $app_ctx @@ -72,9 +72,9 @@ EOF chmod +x "$BIN_DIR/openssl" export PATH="$BIN_DIR:$PATH" -export PROLE_HOME="$WORK_DIR" -export PROLE_CONF="$WORK_DIR/conf" -export PROLE_MODE="k8s" +export KNOE_HOME="$WORK_DIR" +export KNOE_CONF="$WORK_DIR/conf" +export KNOE_MODE="k8s" export KUBECTL_CONTEXT="$app_ctx" unset KUBE_CONTEXT_NAME unset KUBECONTEXT diff --git a/tests/etc/test_init_gitlab_k8s_fails_on_foreign_ingress_host_conflict.sh b/tests/etc/test_init_gitlab_k8s_fails_on_foreign_ingress_host_conflict.sh index 303a321..b4d3db1 100644 --- a/tests/etc/test_init_gitlab_k8s_fails_on_foreign_ingress_host_conflict.sh +++ b/tests/etc/test_init_gitlab_k8s_fails_on_foreign_ingress_host_conflict.sh @@ -3,10 +3,10 @@ set -euo pipefail SCRIPT_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) -PROLE_HOME=$(cd "$SCRIPT_DIR/../.." && pwd) -SOURCE_ETC_DIR="$PROLE_HOME/etc" -SOURCE_ETC_LIB_SHELL_DIR="$PROLE_HOME/etc/lib/shell" -SOURCE_GITLAB_OIDC_TEMPLATE="$PROLE_HOME/deploy/gcp/gke/gitlab-google-oidc-secret.example.yaml" +KNOE_HOME=$(cd "$SCRIPT_DIR/../.." && pwd) +SOURCE_ETC_DIR="$KNOE_HOME/etc" +SOURCE_ETC_LIB_SHELL_DIR="$KNOE_HOME/etc/lib/shell" +SOURCE_GITLAB_OIDC_TEMPLATE="$KNOE_HOME/deploy/gcp/gke/gitlab-google-oidc-secret.example.yaml" TMP_DIR=$(mktemp -d) trap 'rm -rf "$TMP_DIR"' EXIT @@ -16,7 +16,7 @@ BIN_DIR="$TMP_DIR/bin" mkdir -p "$WORK_DIR/etc/lib/shell" "$WORK_DIR/conf" "$WORK_DIR/deploy/gcp/gke" "$BIN_DIR" cp "$SOURCE_ETC_DIR/init_gitlab.sh" "$WORK_DIR/etc/init_gitlab.sh" -cp "$SOURCE_ETC_DIR/prole_cfg.sh" "$WORK_DIR/etc/prole_cfg.sh" +cp "$SOURCE_ETC_DIR/knoe_cfg.sh" "$WORK_DIR/etc/knoe_cfg.sh" cp "$SOURCE_ETC_DIR/common_core_lib.sh" "$WORK_DIR/etc/common_core_lib.sh" cp "$SOURCE_ETC_LIB_SHELL_DIR/common_core_lib.sh" "$WORK_DIR/etc/lib/shell/common_core_lib.sh" cp "$SOURCE_GITLAB_OIDC_TEMPLATE" "$WORK_DIR/deploy/gcp/gke/gitlab-google-oidc-secret.example.yaml" @@ -25,9 +25,9 @@ chmod +x "$WORK_DIR/etc/init_gitlab.sh" app_ctx="gke_plenary-truck-485623-p7_us-west3_knoe-dev-0" db_ctx="gke_plenary-truck-485623-p7_us-west3_knoe-dev-cnpg-0" -cat < "$WORK_DIR/conf/prole.cfg" +cat < "$WORK_DIR/conf/knoe.cfg" [globals] -prole.home = $WORK_DIR +knoe.home = $WORK_DIR DEPLOYMENT_MODE = k8s APP_CLUSTER_KUBECONTEXT = $app_ctx DB_CLUSTER_KUBECONTEXT = $db_ctx @@ -215,8 +215,8 @@ EOF chmod +x "$BIN_DIR/kubectl" export PATH="$BIN_DIR:$PATH" -export PROLE_HOME="$WORK_DIR" -export PROLE_CONF="$WORK_DIR/conf" +export KNOE_HOME="$WORK_DIR" +export KNOE_CONF="$WORK_DIR/conf" export GITLAB_NO_WAIT=1 export SKIP_REGISTRY_MIGRATE=1 export GARAGE_S3_ENDPOINT="http://garage.internal.knoe:3900" @@ -225,7 +225,7 @@ export GITLAB_OIDC_CLIENT_ID="dummy-client-id" export GITLAB_OIDC_CLIENT_SECRET="dummy-client-secret" export GITLAB_REPAIR_BLOCKED_AUTOCLEAN=1 export GITLAB_FRONTDOOR_OWNER=operator -unset PROLE_MODE +unset KNOE_MODE unset KUBE_CONTEXT_NAME unset KUBECTL_CONTEXT unset KUBECONTEXT diff --git a/tests/etc/test_init_gitlab_k8s_fails_when_garage_admin_unauthenticated.sh b/tests/etc/test_init_gitlab_k8s_fails_when_garage_admin_unauthenticated.sh index efced46..b242531 100644 --- a/tests/etc/test_init_gitlab_k8s_fails_when_garage_admin_unauthenticated.sh +++ b/tests/etc/test_init_gitlab_k8s_fails_when_garage_admin_unauthenticated.sh @@ -3,9 +3,9 @@ set -euo pipefail SCRIPT_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) -PROLE_HOME=$(cd "$SCRIPT_DIR/../.." && pwd) -SOURCE_ETC_DIR="$PROLE_HOME/etc" -SOURCE_ETC_LIB_SHELL_DIR="$PROLE_HOME/etc/lib/shell" +KNOE_HOME=$(cd "$SCRIPT_DIR/../.." && pwd) +SOURCE_ETC_DIR="$KNOE_HOME/etc" +SOURCE_ETC_LIB_SHELL_DIR="$KNOE_HOME/etc/lib/shell" TMP_DIR=$(mktemp -d) trap 'rm -rf "$TMP_DIR"' EXIT @@ -15,7 +15,7 @@ BIN_DIR="$TMP_DIR/bin" mkdir -p "$WORK_DIR/etc/lib/shell" "$WORK_DIR/conf" "$BIN_DIR" cp "$SOURCE_ETC_DIR/init_gitlab.sh" "$WORK_DIR/etc/init_gitlab.sh" -cp "$SOURCE_ETC_DIR/prole_cfg.sh" "$WORK_DIR/etc/prole_cfg.sh" +cp "$SOURCE_ETC_DIR/knoe_cfg.sh" "$WORK_DIR/etc/knoe_cfg.sh" cp "$SOURCE_ETC_DIR/common_core_lib.sh" "$WORK_DIR/etc/common_core_lib.sh" cp "$SOURCE_ETC_LIB_SHELL_DIR/common_core_lib.sh" "$WORK_DIR/etc/lib/shell/common_core_lib.sh" chmod +x "$WORK_DIR/etc/init_gitlab.sh" @@ -23,9 +23,9 @@ chmod +x "$WORK_DIR/etc/init_gitlab.sh" app_ctx="gke_plenary-truck-485623-p7_us-west3_knoe-dev-0" db_ctx="gke_plenary-truck-485623-p7_us-west3_knoe-dev-cnpg-0" -cat < "$WORK_DIR/conf/prole.cfg" +cat < "$WORK_DIR/conf/knoe.cfg" [globals] -prole.home = $WORK_DIR +knoe.home = $WORK_DIR DEPLOYMENT_MODE = k8s APP_CLUSTER_KUBECONTEXT = $app_ctx DB_CLUSTER_KUBECONTEXT = $db_ctx @@ -167,13 +167,13 @@ EOF chmod +x "$BIN_DIR/kubectl" export PATH="$BIN_DIR:$PATH" -export PROLE_HOME="$WORK_DIR" -export PROLE_CONF="$WORK_DIR/conf" +export KNOE_HOME="$WORK_DIR" +export KNOE_CONF="$WORK_DIR/conf" export GITLAB_NO_WAIT=1 export SKIP_REGISTRY_MIGRATE=1 export GARAGE_S3_ENDPOINT="http://garage.internal.knoe:3900" export GITLAB_OBJECT_STORAGE_REQUIRED=1 -unset PROLE_MODE +unset KNOE_MODE unset KUBE_CONTEXT_NAME unset KUBECTL_CONTEXT unset KUBECONTEXT diff --git a/tests/etc/test_init_gitlab_k8s_fails_when_garage_required_missing.sh b/tests/etc/test_init_gitlab_k8s_fails_when_garage_required_missing.sh index 666eac1..925d960 100644 --- a/tests/etc/test_init_gitlab_k8s_fails_when_garage_required_missing.sh +++ b/tests/etc/test_init_gitlab_k8s_fails_when_garage_required_missing.sh @@ -3,9 +3,9 @@ set -euo pipefail SCRIPT_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) -PROLE_HOME=$(cd "$SCRIPT_DIR/../.." && pwd) -SOURCE_ETC_DIR="$PROLE_HOME/etc" -SOURCE_ETC_LIB_SHELL_DIR="$PROLE_HOME/etc/lib/shell" +KNOE_HOME=$(cd "$SCRIPT_DIR/../.." && pwd) +SOURCE_ETC_DIR="$KNOE_HOME/etc" +SOURCE_ETC_LIB_SHELL_DIR="$KNOE_HOME/etc/lib/shell" TMP_DIR=$(mktemp -d) trap 'rm -rf "$TMP_DIR"' EXIT @@ -15,7 +15,7 @@ BIN_DIR="$TMP_DIR/bin" mkdir -p "$WORK_DIR/etc/lib/shell" "$WORK_DIR/conf" "$BIN_DIR" cp "$SOURCE_ETC_DIR/init_gitlab.sh" "$WORK_DIR/etc/init_gitlab.sh" -cp "$SOURCE_ETC_DIR/prole_cfg.sh" "$WORK_DIR/etc/prole_cfg.sh" +cp "$SOURCE_ETC_DIR/knoe_cfg.sh" "$WORK_DIR/etc/knoe_cfg.sh" cp "$SOURCE_ETC_DIR/common_core_lib.sh" "$WORK_DIR/etc/common_core_lib.sh" cp "$SOURCE_ETC_LIB_SHELL_DIR/common_core_lib.sh" "$WORK_DIR/etc/lib/shell/common_core_lib.sh" chmod +x "$WORK_DIR/etc/init_gitlab.sh" @@ -23,9 +23,9 @@ chmod +x "$WORK_DIR/etc/init_gitlab.sh" app_ctx="gke_plenary-truck-485623-p7_us-west3_knoe-dev-0" db_ctx="gke_plenary-truck-485623-p7_us-west3_knoe-dev-cnpg-0" -cat < "$WORK_DIR/conf/prole.cfg" +cat < "$WORK_DIR/conf/knoe.cfg" [globals] -prole.home = $WORK_DIR +knoe.home = $WORK_DIR DEPLOYMENT_MODE = k8s APP_CLUSTER_KUBECONTEXT = $app_ctx DB_CLUSTER_KUBECONTEXT = $db_ctx @@ -151,13 +151,13 @@ EOF chmod +x "$BIN_DIR/kubectl" export PATH="$BIN_DIR:$PATH" -export PROLE_HOME="$WORK_DIR" -export PROLE_CONF="$WORK_DIR/conf" +export KNOE_HOME="$WORK_DIR" +export KNOE_CONF="$WORK_DIR/conf" export GITLAB_NO_WAIT=1 export SKIP_REGISTRY_MIGRATE=1 export GARAGE_S3_ENDPOINT="http://garage.internal.knoe:3900" export GITLAB_OBJECT_STORAGE_REQUIRED=1 -unset PROLE_MODE +unset KNOE_MODE unset KUBE_CONTEXT_NAME unset KUBECTL_CONTEXT unset KUBECONTEXT diff --git a/tests/etc/test_init_gitlab_k8s_garage_creates_key_and_resolves_id.sh b/tests/etc/test_init_gitlab_k8s_garage_creates_key_and_resolves_id.sh index 228a9ec..d470007 100644 --- a/tests/etc/test_init_gitlab_k8s_garage_creates_key_and_resolves_id.sh +++ b/tests/etc/test_init_gitlab_k8s_garage_creates_key_and_resolves_id.sh @@ -3,9 +3,9 @@ set -euo pipefail SCRIPT_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) -PROLE_HOME=$(cd "$SCRIPT_DIR/../.." && pwd) -SOURCE_ETC_DIR="$PROLE_HOME/etc" -SOURCE_ETC_LIB_SHELL_DIR="$PROLE_HOME/etc/lib/shell" +KNOE_HOME=$(cd "$SCRIPT_DIR/../.." && pwd) +SOURCE_ETC_DIR="$KNOE_HOME/etc" +SOURCE_ETC_LIB_SHELL_DIR="$KNOE_HOME/etc/lib/shell" TMP_DIR=$(mktemp -d) trap 'rm -rf "$TMP_DIR"' EXIT @@ -15,7 +15,7 @@ BIN_DIR="$TMP_DIR/bin" mkdir -p "$WORK_DIR/etc/lib/shell" "$WORK_DIR/conf" "$BIN_DIR" cp "$SOURCE_ETC_DIR/init_gitlab.sh" "$WORK_DIR/etc/init_gitlab.sh" -cp "$SOURCE_ETC_DIR/prole_cfg.sh" "$WORK_DIR/etc/prole_cfg.sh" +cp "$SOURCE_ETC_DIR/knoe_cfg.sh" "$WORK_DIR/etc/knoe_cfg.sh" cp "$SOURCE_ETC_DIR/common_core_lib.sh" "$WORK_DIR/etc/common_core_lib.sh" cp "$SOURCE_ETC_LIB_SHELL_DIR/common_core_lib.sh" "$WORK_DIR/etc/lib/shell/common_core_lib.sh" chmod +x "$WORK_DIR/etc/init_gitlab.sh" @@ -23,9 +23,9 @@ chmod +x "$WORK_DIR/etc/init_gitlab.sh" app_ctx="gke_plenary-truck-485623-p7_us-west3_knoe-dev-0" db_ctx="gke_plenary-truck-485623-p7_us-west3_knoe-dev-cnpg-0" -cat < "$WORK_DIR/conf/prole.cfg" +cat < "$WORK_DIR/conf/knoe.cfg" [globals] -prole.home = $WORK_DIR +knoe.home = $WORK_DIR DEPLOYMENT_MODE = k8s APP_CLUSTER_KUBECONTEXT = $app_ctx DB_CLUSTER_KUBECONTEXT = $db_ctx @@ -211,13 +211,13 @@ EOF chmod +x "$BIN_DIR/kubectl" export PATH="$BIN_DIR:$PATH" -export PROLE_HOME="$WORK_DIR" -export PROLE_CONF="$WORK_DIR/conf" +export KNOE_HOME="$WORK_DIR" +export KNOE_CONF="$WORK_DIR/conf" export GITLAB_NO_WAIT=1 export SKIP_REGISTRY_MIGRATE=1 export GARAGE_S3_ENDPOINT="http://garage.internal.knoe:3900" export GITLAB_OBJECT_STORAGE_REQUIRED=1 -unset PROLE_MODE +unset KNOE_MODE unset KUBE_CONTEXT_NAME unset KUBECTL_CONTEXT unset KUBECONTEXT diff --git a/tests/etc/test_init_gitlab_k8s_garage_existing_key_uses_show_secret.sh b/tests/etc/test_init_gitlab_k8s_garage_existing_key_uses_show_secret.sh index 8f16e3b..23ab0d9 100644 --- a/tests/etc/test_init_gitlab_k8s_garage_existing_key_uses_show_secret.sh +++ b/tests/etc/test_init_gitlab_k8s_garage_existing_key_uses_show_secret.sh @@ -3,9 +3,9 @@ set -euo pipefail SCRIPT_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) -PROLE_HOME=$(cd "$SCRIPT_DIR/../.." && pwd) -SOURCE_ETC_DIR="$PROLE_HOME/etc" -SOURCE_ETC_LIB_SHELL_DIR="$PROLE_HOME/etc/lib/shell" +KNOE_HOME=$(cd "$SCRIPT_DIR/../.." && pwd) +SOURCE_ETC_DIR="$KNOE_HOME/etc" +SOURCE_ETC_LIB_SHELL_DIR="$KNOE_HOME/etc/lib/shell" TMP_DIR=$(mktemp -d) trap 'rm -rf "$TMP_DIR"' EXIT @@ -15,7 +15,7 @@ BIN_DIR="$TMP_DIR/bin" mkdir -p "$WORK_DIR/etc/lib/shell" "$WORK_DIR/conf" "$BIN_DIR" cp "$SOURCE_ETC_DIR/init_gitlab.sh" "$WORK_DIR/etc/init_gitlab.sh" -cp "$SOURCE_ETC_DIR/prole_cfg.sh" "$WORK_DIR/etc/prole_cfg.sh" +cp "$SOURCE_ETC_DIR/knoe_cfg.sh" "$WORK_DIR/etc/knoe_cfg.sh" cp "$SOURCE_ETC_DIR/common_core_lib.sh" "$WORK_DIR/etc/common_core_lib.sh" cp "$SOURCE_ETC_LIB_SHELL_DIR/common_core_lib.sh" "$WORK_DIR/etc/lib/shell/common_core_lib.sh" chmod +x "$WORK_DIR/etc/init_gitlab.sh" @@ -23,9 +23,9 @@ chmod +x "$WORK_DIR/etc/init_gitlab.sh" app_ctx="gke_plenary-truck-485623-p7_us-west3_knoe-dev-0" db_ctx="gke_plenary-truck-485623-p7_us-west3_knoe-dev-cnpg-0" -cat < "$WORK_DIR/conf/prole.cfg" +cat < "$WORK_DIR/conf/knoe.cfg" [globals] -prole.home = $WORK_DIR +knoe.home = $WORK_DIR DEPLOYMENT_MODE = k8s APP_CLUSTER_KUBECONTEXT = $app_ctx DB_CLUSTER_KUBECONTEXT = $db_ctx @@ -209,13 +209,13 @@ EOF chmod +x "$BIN_DIR/kubectl" export PATH="$BIN_DIR:$PATH" -export PROLE_HOME="$WORK_DIR" -export PROLE_CONF="$WORK_DIR/conf" +export KNOE_HOME="$WORK_DIR" +export KNOE_CONF="$WORK_DIR/conf" export GITLAB_NO_WAIT=1 export SKIP_REGISTRY_MIGRATE=1 export GARAGE_S3_ENDPOINT="http://garage.internal.knoe:3900" export GITLAB_OBJECT_STORAGE_REQUIRED=1 -unset PROLE_MODE +unset KNOE_MODE unset KUBE_CONTEXT_NAME unset KUBECTL_CONTEXT unset KUBECONTEXT diff --git a/tests/etc/test_init_gitlab_k8s_skips_fallback_ingress_when_operator_owns_host.sh b/tests/etc/test_init_gitlab_k8s_skips_fallback_ingress_when_operator_owns_host.sh index 8378e3d..07db24a 100644 --- a/tests/etc/test_init_gitlab_k8s_skips_fallback_ingress_when_operator_owns_host.sh +++ b/tests/etc/test_init_gitlab_k8s_skips_fallback_ingress_when_operator_owns_host.sh @@ -3,10 +3,10 @@ set -euo pipefail SCRIPT_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) -PROLE_HOME=$(cd "$SCRIPT_DIR/../.." && pwd) -SOURCE_ETC_DIR="$PROLE_HOME/etc" -SOURCE_ETC_LIB_SHELL_DIR="$PROLE_HOME/etc/lib/shell" -SOURCE_GITLAB_OIDC_TEMPLATE="$PROLE_HOME/deploy/gcp/gke/gitlab-google-oidc-secret.example.yaml" +KNOE_HOME=$(cd "$SCRIPT_DIR/../.." && pwd) +SOURCE_ETC_DIR="$KNOE_HOME/etc" +SOURCE_ETC_LIB_SHELL_DIR="$KNOE_HOME/etc/lib/shell" +SOURCE_GITLAB_OIDC_TEMPLATE="$KNOE_HOME/deploy/gcp/gke/gitlab-google-oidc-secret.example.yaml" TMP_DIR=$(mktemp -d) trap 'rm -rf "$TMP_DIR"' EXIT @@ -16,7 +16,7 @@ BIN_DIR="$TMP_DIR/bin" mkdir -p "$WORK_DIR/etc/lib/shell" "$WORK_DIR/conf" "$WORK_DIR/deploy/gcp/gke" "$BIN_DIR" cp "$SOURCE_ETC_DIR/init_gitlab.sh" "$WORK_DIR/etc/init_gitlab.sh" -cp "$SOURCE_ETC_DIR/prole_cfg.sh" "$WORK_DIR/etc/prole_cfg.sh" +cp "$SOURCE_ETC_DIR/knoe_cfg.sh" "$WORK_DIR/etc/knoe_cfg.sh" cp "$SOURCE_ETC_DIR/common_core_lib.sh" "$WORK_DIR/etc/common_core_lib.sh" cp "$SOURCE_ETC_LIB_SHELL_DIR/common_core_lib.sh" "$WORK_DIR/etc/lib/shell/common_core_lib.sh" cp "$SOURCE_GITLAB_OIDC_TEMPLATE" "$WORK_DIR/deploy/gcp/gke/gitlab-google-oidc-secret.example.yaml" @@ -25,9 +25,9 @@ chmod +x "$WORK_DIR/etc/init_gitlab.sh" app_ctx="gke_plenary-truck-485623-p7_us-west3_knoe-dev-0" db_ctx="gke_plenary-truck-485623-p7_us-west3_knoe-dev-cnpg-0" -cat < "$WORK_DIR/conf/prole.cfg" +cat < "$WORK_DIR/conf/knoe.cfg" [globals] -prole.home = $WORK_DIR +knoe.home = $WORK_DIR DEPLOYMENT_MODE = k8s APP_CLUSTER_KUBECONTEXT = $app_ctx DB_CLUSTER_KUBECONTEXT = $db_ctx @@ -216,8 +216,8 @@ EOF chmod +x "$BIN_DIR/kubectl" export PATH="$BIN_DIR:$PATH" -export PROLE_HOME="$WORK_DIR" -export PROLE_CONF="$WORK_DIR/conf" +export KNOE_HOME="$WORK_DIR" +export KNOE_CONF="$WORK_DIR/conf" export GITLAB_NO_WAIT=1 export SKIP_REGISTRY_MIGRATE=1 export GARAGE_S3_ENDPOINT="http://garage.internal.knoe:3900" @@ -226,7 +226,7 @@ export GITLAB_OIDC_CLIENT_ID="dummy-client-id" export GITLAB_OIDC_CLIENT_SECRET="dummy-client-secret" export GITLAB_REPAIR_BLOCKED_AUTOCLEAN=1 export GITLAB_FRONTDOOR_OWNER=operator -unset PROLE_MODE +unset KNOE_MODE unset KUBE_CONTEXT_NAME unset KUBECTL_CONTEXT unset KUBECONTEXT diff --git a/tests/etc/test_init_gitlab_k8s_skips_legacy_storage_prep.sh b/tests/etc/test_init_gitlab_k8s_skips_legacy_storage_prep.sh index 8d39b51..7a54fa4 100644 --- a/tests/etc/test_init_gitlab_k8s_skips_legacy_storage_prep.sh +++ b/tests/etc/test_init_gitlab_k8s_skips_legacy_storage_prep.sh @@ -3,9 +3,9 @@ set -euo pipefail SCRIPT_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) -PROLE_HOME=$(cd "$SCRIPT_DIR/../.." && pwd) -SOURCE_ETC_DIR="$PROLE_HOME/etc" -SOURCE_ETC_LIB_SHELL_DIR="$PROLE_HOME/etc/lib/shell" +KNOE_HOME=$(cd "$SCRIPT_DIR/../.." && pwd) +SOURCE_ETC_DIR="$KNOE_HOME/etc" +SOURCE_ETC_LIB_SHELL_DIR="$KNOE_HOME/etc/lib/shell" TMP_DIR=$(mktemp -d) trap 'rm -rf "$TMP_DIR"' EXIT @@ -15,7 +15,7 @@ BIN_DIR="$TMP_DIR/bin" mkdir -p "$WORK_DIR/etc/lib/shell" "$WORK_DIR/conf" "$BIN_DIR" cp "$SOURCE_ETC_DIR/init_gitlab.sh" "$WORK_DIR/etc/init_gitlab.sh" -cp "$SOURCE_ETC_DIR/prole_cfg.sh" "$WORK_DIR/etc/prole_cfg.sh" +cp "$SOURCE_ETC_DIR/knoe_cfg.sh" "$WORK_DIR/etc/knoe_cfg.sh" cp "$SOURCE_ETC_DIR/common_core_lib.sh" "$WORK_DIR/etc/common_core_lib.sh" cp "$SOURCE_ETC_LIB_SHELL_DIR/common_core_lib.sh" "$WORK_DIR/etc/lib/shell/common_core_lib.sh" chmod +x "$WORK_DIR/etc/init_gitlab.sh" @@ -23,9 +23,9 @@ chmod +x "$WORK_DIR/etc/init_gitlab.sh" app_ctx="gke_plenary-truck-485623-p7_us-west3_knoe-dev-0" db_ctx="gke_plenary-truck-485623-p7_us-west3_knoe-dev-cnpg-0" -cat < "$WORK_DIR/conf/prole.cfg" +cat < "$WORK_DIR/conf/knoe.cfg" [globals] -prole.home = $WORK_DIR +knoe.home = $WORK_DIR DEPLOYMENT_MODE = k8s APP_CLUSTER_KUBECONTEXT = $app_ctx DB_CLUSTER_KUBECONTEXT = $db_ctx @@ -171,13 +171,13 @@ EOF chmod +x "$BIN_DIR/kubectl" export PATH="$BIN_DIR:$PATH" -export PROLE_HOME="$WORK_DIR" -export PROLE_CONF="$WORK_DIR/conf" +export KNOE_HOME="$WORK_DIR" +export KNOE_CONF="$WORK_DIR/conf" export GITLAB_NO_WAIT=1 export SKIP_REGISTRY_MIGRATE=1 export GARAGE_S3_ENDPOINT="http://garage.internal.knoe:3900" export GITLAB_OBJECT_STORAGE_REQUIRED=0 -unset PROLE_MODE +unset KNOE_MODE unset KUBE_CONTEXT_NAME unset KUBECTL_CONTEXT unset KUBECONTEXT diff --git a/tests/etc/test_init_gitlab_k8s_uses_db_cluster_context.sh b/tests/etc/test_init_gitlab_k8s_uses_db_cluster_context.sh index 048ce7c..78e52ed 100644 --- a/tests/etc/test_init_gitlab_k8s_uses_db_cluster_context.sh +++ b/tests/etc/test_init_gitlab_k8s_uses_db_cluster_context.sh @@ -3,9 +3,9 @@ set -euo pipefail SCRIPT_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) -PROLE_HOME=$(cd "$SCRIPT_DIR/../.." && pwd) -SOURCE_ETC_DIR="$PROLE_HOME/etc" -SOURCE_ETC_LIB_SHELL_DIR="$PROLE_HOME/etc/lib/shell" +KNOE_HOME=$(cd "$SCRIPT_DIR/../.." && pwd) +SOURCE_ETC_DIR="$KNOE_HOME/etc" +SOURCE_ETC_LIB_SHELL_DIR="$KNOE_HOME/etc/lib/shell" TMP_DIR=$(mktemp -d) trap 'rm -rf "$TMP_DIR"' EXIT @@ -15,7 +15,7 @@ BIN_DIR="$TMP_DIR/bin" mkdir -p "$WORK_DIR/etc/lib/shell" "$WORK_DIR/conf" "$BIN_DIR" cp "$SOURCE_ETC_DIR/init_gitlab.sh" "$WORK_DIR/etc/init_gitlab.sh" -cp "$SOURCE_ETC_DIR/prole_cfg.sh" "$WORK_DIR/etc/prole_cfg.sh" +cp "$SOURCE_ETC_DIR/knoe_cfg.sh" "$WORK_DIR/etc/knoe_cfg.sh" cp "$SOURCE_ETC_DIR/common_core_lib.sh" "$WORK_DIR/etc/common_core_lib.sh" cp "$SOURCE_ETC_LIB_SHELL_DIR/common_core_lib.sh" "$WORK_DIR/etc/lib/shell/common_core_lib.sh" chmod +x "$WORK_DIR/etc/init_gitlab.sh" @@ -23,9 +23,9 @@ chmod +x "$WORK_DIR/etc/init_gitlab.sh" app_ctx="gke_plenary-truck-485623-p7_us-west3_knoe-dev-0" db_ctx="gke_plenary-truck-485623-p7_us-west3_knoe-dev-cnpg-0" -cat < "$WORK_DIR/conf/prole.cfg" +cat < "$WORK_DIR/conf/knoe.cfg" [globals] -prole.home = $WORK_DIR +knoe.home = $WORK_DIR DEPLOYMENT_MODE = k8s APP_CLUSTER_KUBECONTEXT = $app_ctx DB_CLUSTER_KUBECONTEXT = $db_ctx @@ -151,13 +151,13 @@ EOF chmod +x "$BIN_DIR/kubectl" export PATH="$BIN_DIR:$PATH" -export PROLE_HOME="$WORK_DIR" -export PROLE_CONF="$WORK_DIR/conf" +export KNOE_HOME="$WORK_DIR" +export KNOE_CONF="$WORK_DIR/conf" export GITLAB_NO_WAIT=1 export SKIP_REGISTRY_MIGRATE=1 export GARAGE_S3_ENDPOINT="http://garage.internal.knoe:3900" export GITLAB_OBJECT_STORAGE_REQUIRED=0 -unset PROLE_MODE +unset KNOE_MODE unset KUBE_CONTEXT_NAME unset KUBECTL_CONTEXT unset KUBECONTEXT diff --git a/tests/etc/test_init_k3s_registry.sh b/tests/etc/test_init_k3s_registry.sh index 2d7f1e3..f0ec0e7 100644 --- a/tests/etc/test_init_k3s_registry.sh +++ b/tests/etc/test_init_k3s_registry.sh @@ -2,8 +2,8 @@ # Unit test for etc/init_k3s_registry.sh SCRIPT_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) -PROLE_HOME=$(cd "$SCRIPT_DIR/../.." && pwd) -ETC_DIR="$PROLE_HOME/etc" +KNOE_HOME=$(cd "$SCRIPT_DIR/../.." && pwd) +ETC_DIR="$KNOE_HOME/etc" SCRIPT_UNDER_TEST="$ETC_DIR/init_k3s_registry.sh" TMP_DIR=$(mktemp -d) @@ -30,20 +30,20 @@ mock_tool terraform mock_tool ollama mock_tool jq -# Mock prole.cfg +# Mock knoe.cfg mkdir -p "$TMP_DIR/conf" -cat < "$TMP_DIR/conf/prole.cfg" +cat < "$TMP_DIR/conf/knoe.cfg" [globals] -prole.home = $PROLE_HOME -prole.mode = k3d +knoe.home = $KNOE_HOME +knoe.mode = k3d [k3s] server = https://localhost:6443 token = test-token C_EOF export PATH="$TMP_DIR:$PATH" -export PROLE_HOME="$PROLE_HOME" -export PROLE_CONF="$TMP_DIR/conf" +export KNOE_HOME="$KNOE_HOME" +export KNOE_CONF="$TMP_DIR/conf" export NAMESPACE="test-ns" export PROLE_PASSWD="test-password" diff --git a/tests/etc/test_init_k8s.sh b/tests/etc/test_init_k8s.sh index 24d397c..674b330 100644 --- a/tests/etc/test_init_k8s.sh +++ b/tests/etc/test_init_k8s.sh @@ -2,8 +2,8 @@ # Unit test for etc/init_k8s.sh SCRIPT_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) -PROLE_HOME=$(cd "$SCRIPT_DIR/../.." && pwd) -ETC_DIR="$PROLE_HOME/etc" +KNOE_HOME=$(cd "$SCRIPT_DIR/../.." && pwd) +ETC_DIR="$KNOE_HOME/etc" SCRIPT_UNDER_TEST="$ETC_DIR/init_k8s.sh" TMP_DIR=$(mktemp -d) @@ -30,20 +30,20 @@ mock_tool terraform mock_tool ollama mock_tool jq -# Mock prole.cfg +# Mock knoe.cfg mkdir -p "$TMP_DIR/conf" -cat < "$TMP_DIR/conf/prole.cfg" +cat < "$TMP_DIR/conf/knoe.cfg" [globals] -prole.home = $PROLE_HOME -prole.mode = k3d +knoe.home = $KNOE_HOME +knoe.mode = k3d [k3s] server = https://localhost:6443 token = test-token C_EOF export PATH="$TMP_DIR:$PATH" -export PROLE_HOME="$PROLE_HOME" -export PROLE_CONF="$TMP_DIR/conf" +export KNOE_HOME="$KNOE_HOME" +export KNOE_CONF="$TMP_DIR/conf" export NAMESPACE="test-ns" export PROLE_PASSWD="test-password" diff --git a/tests/etc/test_init_kdc.sh b/tests/etc/test_init_kdc.sh index fa6e716..5866b3c 100644 --- a/tests/etc/test_init_kdc.sh +++ b/tests/etc/test_init_kdc.sh @@ -2,8 +2,8 @@ # Unit test for etc/init_kdc.sh SCRIPT_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) -PROLE_HOME=$(cd "$SCRIPT_DIR/../.." && pwd) -ETC_DIR="$PROLE_HOME/etc" +KNOE_HOME=$(cd "$SCRIPT_DIR/../.." && pwd) +ETC_DIR="$KNOE_HOME/etc" SCRIPT_UNDER_TEST="$ETC_DIR/init_kdc.sh" TMP_DIR=$(mktemp -d) @@ -30,20 +30,20 @@ mock_tool terraform mock_tool ollama mock_tool jq -# Mock prole.cfg +# Mock knoe.cfg mkdir -p "$TMP_DIR/conf" -cat < "$TMP_DIR/conf/prole.cfg" +cat < "$TMP_DIR/conf/knoe.cfg" [globals] -prole.home = $PROLE_HOME -prole.mode = k3d +knoe.home = $KNOE_HOME +knoe.mode = k3d [k3s] server = https://localhost:6443 token = test-token C_EOF export PATH="$TMP_DIR:$PATH" -export PROLE_HOME="$PROLE_HOME" -export PROLE_CONF="$TMP_DIR/conf" +export KNOE_HOME="$KNOE_HOME" +export KNOE_CONF="$TMP_DIR/conf" export NAMESPACE="test-ns" export PROLE_PASSWD="test-password" diff --git a/tests/etc/test_init_kdc_applies_configmap_to_prole_auth_namespace.sh b/tests/etc/test_init_kdc_applies_configmap_to_knoe_auth_namespace.sh similarity index 73% rename from tests/etc/test_init_kdc_applies_configmap_to_prole_auth_namespace.sh rename to tests/etc/test_init_kdc_applies_configmap_to_knoe_auth_namespace.sh index 8f30e44..ce7328c 100644 --- a/tests/etc/test_init_kdc_applies_configmap_to_prole_auth_namespace.sh +++ b/tests/etc/test_init_kdc_applies_configmap_to_knoe_auth_namespace.sh @@ -1,12 +1,12 @@ #!/usr/bin/env bash -# Regression test: etc/init_kdc.sh should ensure ConfigMap `prole-kdc-config` -# exists in the prole-auth namespace when it differs from the KDC namespace. +# Regression test: etc/init_kdc.sh should ensure ConfigMap `knoe-kdc-config` +# exists in the knoe-auth namespace when it differs from the KDC namespace. set -euo pipefail SCRIPT_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) -PROLE_HOME=$(cd "$SCRIPT_DIR/../.." && pwd) -SOURCE_ETC_DIR="$PROLE_HOME/etc" +KNOE_HOME=$(cd "$SCRIPT_DIR/../.." && pwd) +SOURCE_ETC_DIR="$KNOE_HOME/etc" TMP_DIR=$(mktemp -d) trap 'rm -rf "$TMP_DIR"' EXIT @@ -16,13 +16,13 @@ BIN_DIR="$TMP_DIR/bin" mkdir -p "$WORK_DIR/etc" "$WORK_DIR/conf" "$BIN_DIR" cp "$SOURCE_ETC_DIR/init_kdc.sh" "$WORK_DIR/etc/init_kdc.sh" -cp "$SOURCE_ETC_DIR/prole_cfg.sh" "$WORK_DIR/etc/prole_cfg.sh" +cp "$SOURCE_ETC_DIR/knoe_cfg.sh" "$WORK_DIR/etc/knoe_cfg.sh" chmod +x "$WORK_DIR/etc/init_kdc.sh" -cat < "$WORK_DIR/conf/prole.cfg" +cat < "$WORK_DIR/conf/knoe.cfg" [globals] -prole.home = $WORK_DIR -prole.mode = k3s +knoe.home = $WORK_DIR +knoe.mode = k3s NAMESPACE = knoe-db SERVICE_NAMESPACE = knoe-system EOF @@ -75,12 +75,12 @@ chmod +x "$BIN_DIR/kubectl" export PATH="$BIN_DIR:$PATH" -export PROLE_HOME="$WORK_DIR" -export PROLE_CONF="$WORK_DIR/conf" -export PROLE_MODE="k3s" +export KNOE_HOME="$WORK_DIR" +export KNOE_CONF="$WORK_DIR/conf" +export KNOE_MODE="k3s" # Provide a prebuilt image and explicit passwords to avoid docker/interactive paths. -export PROLE_KDC_IMAGE="ghcr.io/example/prole-authority:1.2.3" +export PROLE_KDC_IMAGE="ghcr.io/example/knoe-authority:1.2.3" export PROLE_KDC_ADMIN_PASSWORD="test-admin" export PROLE_KDC_MASTER_PASSWORD="test-master" export PROLE_KDC_TRUST_PASSWORD="test-trust" @@ -89,7 +89,7 @@ export PROLE_KDC_TRUST_SHARED_PASSWORD="test-shared" "$WORK_DIR/etc/init_kdc.sh" update >"$TMP_DIR/stdout" 2>"$TMP_DIR/stderr" if ! grep -q "apply -n knoe-db" "$KUBECTL_LOG"; then - echo "FAILURE: expected init_kdc.sh to apply resources in prole-auth namespace (knoe-db)" >&2 + echo "FAILURE: expected init_kdc.sh to apply resources in knoe-auth namespace (knoe-db)" >&2 echo "--- kubectl log ---" >&2 cat "$KUBECTL_LOG" >&2 exit 1 diff --git a/tests/etc/test_init_kdc_auto_skips_docker_when_unavailable.sh b/tests/etc/test_init_kdc_auto_skips_docker_when_unavailable.sh index 3d61d5e..18fa010 100644 --- a/tests/etc/test_init_kdc_auto_skips_docker_when_unavailable.sh +++ b/tests/etc/test_init_kdc_auto_skips_docker_when_unavailable.sh @@ -5,8 +5,8 @@ set -euo pipefail SCRIPT_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) -PROLE_HOME=$(cd "$SCRIPT_DIR/../.." && pwd) -SOURCE_ETC_DIR="$PROLE_HOME/etc" +KNOE_HOME=$(cd "$SCRIPT_DIR/../.." && pwd) +SOURCE_ETC_DIR="$KNOE_HOME/etc" TMP_DIR=$(mktemp -d) trap 'rm -rf "$TMP_DIR"' EXIT @@ -16,13 +16,13 @@ BIN_DIR="$TMP_DIR/bin" mkdir -p "$WORK_DIR/etc" "$WORK_DIR/conf" "$BIN_DIR" cp "$SOURCE_ETC_DIR/init_kdc.sh" "$WORK_DIR/etc/init_kdc.sh" -cp "$SOURCE_ETC_DIR/prole_cfg.sh" "$WORK_DIR/etc/prole_cfg.sh" +cp "$SOURCE_ETC_DIR/knoe_cfg.sh" "$WORK_DIR/etc/knoe_cfg.sh" chmod +x "$WORK_DIR/etc/init_kdc.sh" -cat < "$WORK_DIR/conf/prole.cfg" +cat < "$WORK_DIR/conf/knoe.cfg" [globals] -prole.home = $WORK_DIR -prole.mode = k3s +knoe.home = $WORK_DIR +knoe.mode = k3s NAMESPACE = knoe-db-a0001 EOF @@ -91,9 +91,9 @@ chmod +x "$BIN_DIR/docker" export PATH="$BIN_DIR:$PATH" -export PROLE_HOME="$WORK_DIR" -export PROLE_CONF="$WORK_DIR/conf" -export PROLE_MODE="k3s" +export KNOE_HOME="$WORK_DIR" +export KNOE_CONF="$WORK_DIR/conf" +export KNOE_MODE="k3s" # Ensure we don't explicitly request a build and don't provide an explicit image. unset PROLE_KDC_BUILD_IMAGE || true @@ -116,7 +116,7 @@ if [[ -s "$DOCKER_LOG" ]]; then fi fi -if ! grep -q "Docker is not available; skipping Prole KDC image build" "$TMP_DIR/stdout" "$TMP_DIR/stderr"; then +if ! grep -q "Docker is not available; skipping Knoe KDC image build" "$TMP_DIR/stdout" "$TMP_DIR/stderr"; then echo "FAILURE: expected a warning about skipping KDC image build" >&2 cat "$TMP_DIR/stderr" >&2 exit 1 diff --git a/tests/etc/test_init_kdc_k3s_registry_default.sh b/tests/etc/test_init_kdc_k3s_registry_default.sh index f3f6217..6fe16ee 100644 --- a/tests/etc/test_init_kdc_k3s_registry_default.sh +++ b/tests/etc/test_init_kdc_k3s_registry_default.sh @@ -1,12 +1,12 @@ #!/usr/bin/env bash # Regression test: etc/init_kdc.sh should treat local registry as enabled by default in k3s mode -# (matching etc/prole_cfg.sh defaults), so it must not fail with “No registry host configured for k3s”. +# (matching etc/knoe_cfg.sh defaults), so it must not fail with “No registry host configured for k3s”. set -euo pipefail SCRIPT_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) -PROLE_HOME=$(cd "$SCRIPT_DIR/../.." && pwd) -SOURCE_ETC_DIR="$PROLE_HOME/etc" +KNOE_HOME=$(cd "$SCRIPT_DIR/../.." && pwd) +SOURCE_ETC_DIR="$KNOE_HOME/etc" TMP_DIR=$(mktemp -d) trap 'rm -rf "$TMP_DIR"' EXIT @@ -16,19 +16,19 @@ BIN_DIR="$TMP_DIR/bin" mkdir -p "$WORK_DIR/etc" "$WORK_DIR/conf" "$WORK_DIR/authority" "$BIN_DIR" cp "$SOURCE_ETC_DIR/init_kdc.sh" "$WORK_DIR/etc/init_kdc.sh" -cp "$SOURCE_ETC_DIR/prole_cfg.sh" "$WORK_DIR/etc/prole_cfg.sh" +cp "$SOURCE_ETC_DIR/knoe_cfg.sh" "$WORK_DIR/etc/knoe_cfg.sh" chmod +x "$WORK_DIR/etc/init_kdc.sh" cat < "$WORK_DIR/env.sh" #!/usr/bin/env bash -export PROLE_HOME="$WORK_DIR" -export PROLE_CONF="$WORK_DIR/conf" +export KNOE_HOME="$WORK_DIR" +export KNOE_CONF="$WORK_DIR/conf" EOF -cat < "$WORK_DIR/conf/prole.cfg" +cat < "$WORK_DIR/conf/knoe.cfg" [globals] -prole.home = $WORK_DIR -prole.mode = k3s +knoe.home = $WORK_DIR +knoe.mode = k3s NAMESPACE = knoe-db-a0001 EOF @@ -116,9 +116,9 @@ chmod +x "$BIN_DIR/docker" export PATH="$BIN_DIR:$PATH" -export PROLE_HOME="$WORK_DIR" -export PROLE_CONF="$WORK_DIR/conf" -export PROLE_MODE="k3s" +export KNOE_HOME="$WORK_DIR" +export KNOE_CONF="$WORK_DIR/conf" +export KNOE_MODE="k3s" export PROLE_K3S_SERVER="https://k3s.example.test:6443" # Avoid secret generation paths (python/openssl) by providing explicit values. @@ -147,7 +147,7 @@ if ! grep -q "push" "$DOCKER_LOG"; then exit 1 fi -if ! grep -q "push k3s.example.test:5000/prole-authority:latest" "$DOCKER_LOG"; then +if ! grep -q "push k3s.example.test:5000/knoe-authority:latest" "$DOCKER_LOG"; then echo "FAILURE: expected docker push to remote k3s registry host in k3s mode" cat "$DOCKER_LOG" exit 1 diff --git a/tests/etc/test_init_kdc_skips_docker_when_image_explicit.sh b/tests/etc/test_init_kdc_skips_docker_when_image_explicit.sh index 7801431..c35f838 100644 --- a/tests/etc/test_init_kdc_skips_docker_when_image_explicit.sh +++ b/tests/etc/test_init_kdc_skips_docker_when_image_explicit.sh @@ -5,8 +5,8 @@ set -euo pipefail SCRIPT_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) -PROLE_HOME=$(cd "$SCRIPT_DIR/../.." && pwd) -SOURCE_ETC_DIR="$PROLE_HOME/etc" +KNOE_HOME=$(cd "$SCRIPT_DIR/../.." && pwd) +SOURCE_ETC_DIR="$KNOE_HOME/etc" TMP_DIR=$(mktemp -d) trap 'rm -rf "$TMP_DIR"' EXIT @@ -16,13 +16,13 @@ BIN_DIR="$TMP_DIR/bin" mkdir -p "$WORK_DIR/etc" "$WORK_DIR/conf" "$BIN_DIR" cp "$SOURCE_ETC_DIR/init_kdc.sh" "$WORK_DIR/etc/init_kdc.sh" -cp "$SOURCE_ETC_DIR/prole_cfg.sh" "$WORK_DIR/etc/prole_cfg.sh" +cp "$SOURCE_ETC_DIR/knoe_cfg.sh" "$WORK_DIR/etc/knoe_cfg.sh" chmod +x "$WORK_DIR/etc/init_kdc.sh" -cat < "$WORK_DIR/conf/prole.cfg" +cat < "$WORK_DIR/conf/knoe.cfg" [globals] -prole.home = $WORK_DIR -prole.mode = k3s +knoe.home = $WORK_DIR +knoe.mode = k3s NAMESPACE = knoe-db-a0001 EOF @@ -82,12 +82,12 @@ chmod +x "$BIN_DIR/docker" export PATH="$BIN_DIR:$PATH" -export PROLE_HOME="$WORK_DIR" -export PROLE_CONF="$WORK_DIR/conf" -export PROLE_MODE="k3s" +export KNOE_HOME="$WORK_DIR" +export KNOE_CONF="$WORK_DIR/conf" +export KNOE_MODE="k3s" # Provide a prebuilt image and explicit passwords to avoid generation paths. -export PROLE_KDC_IMAGE="ghcr.io/example/prole-authority:1.2.3" +export PROLE_KDC_IMAGE="ghcr.io/example/knoe-authority:1.2.3" export PROLE_KDC_ADMIN_PASSWORD="test-admin" export PROLE_KDC_MASTER_PASSWORD="test-master" export PROLE_KDC_TRUST_PASSWORD="test-trust" diff --git a/tests/etc/test_init_kerberos.sh b/tests/etc/test_init_kerberos.sh index bdba06a..f7d96cb 100644 --- a/tests/etc/test_init_kerberos.sh +++ b/tests/etc/test_init_kerberos.sh @@ -2,8 +2,8 @@ # Unit test for etc/init_kerberos.sh SCRIPT_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) -PROLE_HOME=$(cd "$SCRIPT_DIR/../.." && pwd) -ETC_DIR="$PROLE_HOME/etc" +KNOE_HOME=$(cd "$SCRIPT_DIR/../.." && pwd) +ETC_DIR="$KNOE_HOME/etc" SCRIPT_UNDER_TEST="$ETC_DIR/init_kerberos.sh" TMP_DIR=$(mktemp -d) @@ -30,20 +30,20 @@ mock_tool terraform mock_tool ollama mock_tool jq -# Mock prole.cfg +# Mock knoe.cfg mkdir -p "$TMP_DIR/conf" -cat < "$TMP_DIR/conf/prole.cfg" +cat < "$TMP_DIR/conf/knoe.cfg" [globals] -prole.home = $PROLE_HOME -prole.mode = k3d +knoe.home = $KNOE_HOME +knoe.mode = k3d [k3s] server = https://localhost:6443 token = test-token C_EOF export PATH="$TMP_DIR:$PATH" -export PROLE_HOME="$PROLE_HOME" -export PROLE_CONF="$TMP_DIR/conf" +export KNOE_HOME="$KNOE_HOME" +export KNOE_CONF="$TMP_DIR/conf" export NAMESPACE="test-ns" export PROLE_PASSWD="test-password" diff --git a/tests/etc/test_init_kerberos_k3s_real_kdc.sh b/tests/etc/test_init_kerberos_k3s_real_kdc.sh index cd4c114..9ecca4e 100644 --- a/tests/etc/test_init_kerberos_k3s_real_kdc.sh +++ b/tests/etc/test_init_kerberos_k3s_real_kdc.sh @@ -4,8 +4,8 @@ set -euo pipefail SCRIPT_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) -PROLE_HOME=$(cd "$SCRIPT_DIR/../.." && pwd) -SOURCE_ETC_DIR="$PROLE_HOME/etc" +KNOE_HOME=$(cd "$SCRIPT_DIR/../.." && pwd) +SOURCE_ETC_DIR="$KNOE_HOME/etc" TMP_DIR=$(mktemp -d) trap 'rm -rf "$TMP_DIR"' EXIT @@ -15,7 +15,7 @@ BIN_DIR="$TMP_DIR/bin" mkdir -p "$WORK_DIR/etc" "$WORK_DIR/conf" "$BIN_DIR" cp "$SOURCE_ETC_DIR/init_kerberos.sh" "$WORK_DIR/etc/init_kerberos.sh" -cp "$SOURCE_ETC_DIR/prole_cfg.sh" "$WORK_DIR/etc/prole_cfg.sh" +cp "$SOURCE_ETC_DIR/knoe_cfg.sh" "$WORK_DIR/etc/knoe_cfg.sh" chmod +x "$WORK_DIR/etc/init_kerberos.sh" cat < "$WORK_DIR/etc/init_kerberos_test.sh" @@ -26,14 +26,14 @@ chmod +x "$WORK_DIR/etc/init_kerberos_test.sh" cat < "$WORK_DIR/env.sh" #!/usr/bin/env bash -export PROLE_HOME="$WORK_DIR" -export PROLE_CONF="$WORK_DIR/conf" +export KNOE_HOME="$WORK_DIR" +export KNOE_CONF="$WORK_DIR/conf" EOF -cat < "$WORK_DIR/conf/prole.cfg" +cat < "$WORK_DIR/conf/knoe.cfg" [globals] -prole.home = $WORK_DIR -prole.mode = k3s +knoe.home = $WORK_DIR +knoe.mode = k3s EOF export KUBECTL_LOG="$TMP_DIR/kubectl.log" @@ -90,7 +90,7 @@ case "$sub" in apiVersion: v1 kind: ConfigMap metadata: - name: prole-krb5-conf + name: knoe-krb5-conf YAML exit 0 fi @@ -109,7 +109,7 @@ YAML ;; esac - if [[ "$payload" == *"name: prole-kdc-egress"* ]]; then + if [[ "$payload" == *"name: knoe-kdc-egress"* ]]; then if [[ "$payload" != *"cidr: 10.0.0.3/32"* ]]; then echo "missing expected kdc cidr in NetworkPolicy payload" >&2 exit 1 @@ -146,11 +146,11 @@ chmod +x "$BIN_DIR/jq" export PATH="$BIN_DIR:$PATH" -export PROLE_HOME="$WORK_DIR" -export PROLE_CONF="$WORK_DIR/conf" +export KNOE_HOME="$WORK_DIR" +export KNOE_CONF="$WORK_DIR/conf" export NAMESPACE="knoe-db-a0001" export SERVICE_NAMESPACE="default" -export PROLE_MODE="k3s" +export KNOE_MODE="k3s" export KRB5_REALM="PROLE.ORG" export KRB5_KDC="10.0.0.3" export KRB5_ADMIN="10.0.0.3" diff --git a/tests/etc/test_init_kerberos_test.sh b/tests/etc/test_init_kerberos_test.sh index 74083f5..ea14401 100644 --- a/tests/etc/test_init_kerberos_test.sh +++ b/tests/etc/test_init_kerberos_test.sh @@ -2,8 +2,8 @@ # Unit test for etc/init_kerberos_test.sh SCRIPT_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) -PROLE_HOME=$(cd "$SCRIPT_DIR/../.." && pwd) -ETC_DIR="$PROLE_HOME/etc" +KNOE_HOME=$(cd "$SCRIPT_DIR/../.." && pwd) +ETC_DIR="$KNOE_HOME/etc" SCRIPT_UNDER_TEST="$ETC_DIR/init_kerberos_test.sh" TMP_DIR=$(mktemp -d) @@ -30,20 +30,20 @@ mock_tool terraform mock_tool ollama mock_tool jq -# Mock prole.cfg +# Mock knoe.cfg mkdir -p "$TMP_DIR/conf" -cat < "$TMP_DIR/conf/prole.cfg" +cat < "$TMP_DIR/conf/knoe.cfg" [globals] -prole.home = $PROLE_HOME -prole.mode = k3d +knoe.home = $KNOE_HOME +knoe.mode = k3d [k3s] server = https://localhost:6443 token = test-token C_EOF export PATH="$TMP_DIR:$PATH" -export PROLE_HOME="$PROLE_HOME" -export PROLE_CONF="$TMP_DIR/conf" +export KNOE_HOME="$KNOE_HOME" +export KNOE_CONF="$TMP_DIR/conf" export NAMESPACE="test-ns" export PROLE_PASSWD="test-password" diff --git a/tests/etc/test_init_knoe-db-reset.sh b/tests/etc/test_init_knoe-db-reset.sh index c3ac1cf..d48ce4c 100644 --- a/tests/etc/test_init_knoe-db-reset.sh +++ b/tests/etc/test_init_knoe-db-reset.sh @@ -2,8 +2,8 @@ # Unit test for etc/init_knoe-db-reset.sh SCRIPT_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) -PROLE_HOME=$(cd "$SCRIPT_DIR/../.." && pwd) -ETC_DIR="$PROLE_HOME/etc" +KNOE_HOME=$(cd "$SCRIPT_DIR/../.." && pwd) +ETC_DIR="$KNOE_HOME/etc" SCRIPT_UNDER_TEST="$ETC_DIR/init_knoe-db-reset.sh" TMP_DIR=$(mktemp -d) @@ -30,20 +30,20 @@ mock_tool terraform mock_tool ollama mock_tool jq -# Mock prole.cfg +# Mock knoe.cfg mkdir -p "$TMP_DIR/conf" -cat < "$TMP_DIR/conf/prole.cfg" +cat < "$TMP_DIR/conf/knoe.cfg" [globals] -prole.home = $PROLE_HOME -prole.mode = k3d +knoe.home = $KNOE_HOME +knoe.mode = k3d [k3s] server = https://localhost:6443 token = test-token C_EOF export PATH="$TMP_DIR:$PATH" -export PROLE_HOME="$PROLE_HOME" -export PROLE_CONF="$TMP_DIR/conf" +export KNOE_HOME="$KNOE_HOME" +export KNOE_CONF="$TMP_DIR/conf" export NAMESPACE="test-ns" export PROLE_PASSWD="test-password" diff --git a/tests/etc/test_init_kong_k8s_allows_delegated_host_owners.sh b/tests/etc/test_init_kong_k8s_allows_delegated_host_owners.sh index 962d1c5..9695212 100644 --- a/tests/etc/test_init_kong_k8s_allows_delegated_host_owners.sh +++ b/tests/etc/test_init_kong_k8s_allows_delegated_host_owners.sh @@ -3,9 +3,9 @@ set -euo pipefail SCRIPT_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) -PROLE_HOME=$(cd "$SCRIPT_DIR/../.." && pwd) -SOURCE_ETC_DIR="$PROLE_HOME/etc" -SOURCE_ETC_LIB_SHELL_DIR="$PROLE_HOME/etc/lib/shell" +KNOE_HOME=$(cd "$SCRIPT_DIR/../.." && pwd) +SOURCE_ETC_DIR="$KNOE_HOME/etc" +SOURCE_ETC_LIB_SHELL_DIR="$KNOE_HOME/etc/lib/shell" TMP_DIR=$(mktemp -d) trap 'rm -rf "$TMP_DIR"' EXIT @@ -17,15 +17,15 @@ mkdir -p "$WORK_DIR/etc/lib/shell" "$WORK_DIR/conf" "$BIN_DIR" cp "$SOURCE_ETC_DIR/init_kong.sh" "$WORK_DIR/etc/init_kong.sh" cp "$SOURCE_ETC_DIR/common_core_lib.sh" "$WORK_DIR/etc/common_core_lib.sh" cp "$SOURCE_ETC_LIB_SHELL_DIR/common_core_lib.sh" "$WORK_DIR/etc/lib/shell/common_core_lib.sh" -cp "$SOURCE_ETC_DIR/prole_cfg.sh" "$WORK_DIR/etc/prole_cfg.sh" +cp "$SOURCE_ETC_DIR/knoe_cfg.sh" "$WORK_DIR/etc/knoe_cfg.sh" chmod +x "$WORK_DIR/etc/init_kong.sh" app_ctx="gke_plenary-truck-485623-p7_us-west3_knoe-dev-0" db_ctx="gke_plenary-truck-485623-p7_us-west3_knoe-dev-cnpg-0" -cat < "$WORK_DIR/conf/prole.cfg" +cat < "$WORK_DIR/conf/knoe.cfg" [globals] -prole.home = $WORK_DIR +knoe.home = $WORK_DIR DEPLOYMENT_MODE = k8s APP_CLUSTER_KUBECONTEXT = $app_ctx DB_CLUSTER_KUBECONTEXT = $db_ctx @@ -111,9 +111,9 @@ EOF chmod +x "$BIN_DIR/kubectl" export PATH="$BIN_DIR:$PATH" -export PROLE_HOME="$WORK_DIR" -export PROLE_CONF="$WORK_DIR/conf" -unset PROLE_MODE +export KNOE_HOME="$WORK_DIR" +export KNOE_CONF="$WORK_DIR/conf" +unset KNOE_MODE unset KUBE_CONTEXT_NAME unset KUBECTL_CONTEXT unset KUBECONTEXT diff --git a/tests/etc/test_init_kong_k8s_prefers_app_cluster_context.sh b/tests/etc/test_init_kong_k8s_prefers_app_cluster_context.sh index 0377525..ddd8877 100644 --- a/tests/etc/test_init_kong_k8s_prefers_app_cluster_context.sh +++ b/tests/etc/test_init_kong_k8s_prefers_app_cluster_context.sh @@ -3,9 +3,9 @@ set -euo pipefail SCRIPT_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) -PROLE_HOME=$(cd "$SCRIPT_DIR/../.." && pwd) -SOURCE_ETC_DIR="$PROLE_HOME/etc" -SOURCE_ETC_LIB_SHELL_DIR="$PROLE_HOME/etc/lib/shell" +KNOE_HOME=$(cd "$SCRIPT_DIR/../.." && pwd) +SOURCE_ETC_DIR="$KNOE_HOME/etc" +SOURCE_ETC_LIB_SHELL_DIR="$KNOE_HOME/etc/lib/shell" TMP_DIR=$(mktemp -d) trap 'rm -rf "$TMP_DIR"' EXIT @@ -17,15 +17,15 @@ mkdir -p "$WORK_DIR/etc/lib/shell" "$WORK_DIR/conf" "$BIN_DIR" cp "$SOURCE_ETC_DIR/init_kong.sh" "$WORK_DIR/etc/init_kong.sh" cp "$SOURCE_ETC_DIR/common_core_lib.sh" "$WORK_DIR/etc/common_core_lib.sh" cp "$SOURCE_ETC_LIB_SHELL_DIR/common_core_lib.sh" "$WORK_DIR/etc/lib/shell/common_core_lib.sh" -cp "$SOURCE_ETC_DIR/prole_cfg.sh" "$WORK_DIR/etc/prole_cfg.sh" +cp "$SOURCE_ETC_DIR/knoe_cfg.sh" "$WORK_DIR/etc/knoe_cfg.sh" chmod +x "$WORK_DIR/etc/init_kong.sh" app_ctx="gke_plenary-truck-485623-p7_us-west3_knoe-dev-0" db_ctx="gke_plenary-truck-485623-p7_us-west3_knoe-dev-cnpg-0" -cat < "$WORK_DIR/conf/prole.cfg" +cat < "$WORK_DIR/conf/knoe.cfg" [globals] -prole.home = $WORK_DIR +knoe.home = $WORK_DIR DEPLOYMENT_MODE = k8s APP_CLUSTER_KUBECONTEXT = $app_ctx DB_CLUSTER_KUBECONTEXT = $db_ctx @@ -80,9 +80,9 @@ EOF chmod +x "$BIN_DIR/kubectl" export PATH="$BIN_DIR:$PATH" -export PROLE_HOME="$WORK_DIR" -export PROLE_CONF="$WORK_DIR/conf" -unset PROLE_MODE +export KNOE_HOME="$WORK_DIR" +export KNOE_CONF="$WORK_DIR/conf" +unset KNOE_MODE unset KUBE_CONTEXT_NAME unset KUBECTL_CONTEXT unset KUBECONTEXT diff --git a/tests/etc/test_init_kong_tmp_unbound.sh b/tests/etc/test_init_kong_tmp_unbound.sh index 46ed6ef..a526c1e 100644 --- a/tests/etc/test_init_kong_tmp_unbound.sh +++ b/tests/etc/test_init_kong_tmp_unbound.sh @@ -5,9 +5,9 @@ set -euo pipefail SCRIPT_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) -PROLE_HOME=$(cd "$SCRIPT_DIR/../.." && pwd) -SOURCE_ETC_DIR="$PROLE_HOME/etc" -SOURCE_ETC_LIB_SHELL_DIR="$PROLE_HOME/etc/lib/shell" +KNOE_HOME=$(cd "$SCRIPT_DIR/../.." && pwd) +SOURCE_ETC_DIR="$KNOE_HOME/etc" +SOURCE_ETC_LIB_SHELL_DIR="$KNOE_HOME/etc/lib/shell" TMP_DIR=$(mktemp -d) trap 'rm -rf "$TMP_DIR"' EXIT @@ -19,13 +19,13 @@ mkdir -p "$WORK_DIR/etc/lib/shell" "$WORK_DIR/conf" "$BIN_DIR" cp "$SOURCE_ETC_DIR/init_kong.sh" "$WORK_DIR/etc/init_kong.sh" cp "$SOURCE_ETC_DIR/common_core_lib.sh" "$WORK_DIR/etc/common_core_lib.sh" cp "$SOURCE_ETC_LIB_SHELL_DIR/common_core_lib.sh" "$WORK_DIR/etc/lib/shell/common_core_lib.sh" -cp "$SOURCE_ETC_DIR/prole_cfg.sh" "$WORK_DIR/etc/prole_cfg.sh" +cp "$SOURCE_ETC_DIR/knoe_cfg.sh" "$WORK_DIR/etc/knoe_cfg.sh" chmod +x "$WORK_DIR/etc/init_kong.sh" -cat < "$WORK_DIR/conf/prole.cfg" +cat < "$WORK_DIR/conf/knoe.cfg" [globals] -prole.home = $WORK_DIR -prole.mode = k3s +knoe.home = $WORK_DIR +knoe.mode = k3s NAMESPACE = knoe-db-a0001 SERVICE_NAMESPACE = knoe-system EOF @@ -80,9 +80,9 @@ chmod +x "$BIN_DIR/kubectl" export PATH="$BIN_DIR:$PATH" -export PROLE_HOME="$WORK_DIR" -export PROLE_CONF="$WORK_DIR/conf" -export PROLE_MODE="k3s" +export KNOE_HOME="$WORK_DIR" +export KNOE_CONF="$WORK_DIR/conf" +export KNOE_MODE="k3s" if "$WORK_DIR/etc/init_kong.sh" -n "knoe-system" update >"$TMP_DIR/stdout" 2>"$TMP_DIR/stderr"; then : diff --git a/tests/etc/test_init_monitoring.sh b/tests/etc/test_init_monitoring.sh index 0f0d1f8..e0fe832 100644 --- a/tests/etc/test_init_monitoring.sh +++ b/tests/etc/test_init_monitoring.sh @@ -2,8 +2,8 @@ # Unit test for etc/init_monitoring.sh SCRIPT_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) -PROLE_HOME=$(cd "$SCRIPT_DIR/../.." && pwd) -ETC_DIR="$PROLE_HOME/etc" +KNOE_HOME=$(cd "$SCRIPT_DIR/../.." && pwd) +ETC_DIR="$KNOE_HOME/etc" SCRIPT_UNDER_TEST="$ETC_DIR/init_monitoring.sh" TMP_DIR=$(mktemp -d) @@ -188,7 +188,7 @@ fi exit 0 EOF -# Create mocks for other tools that may be on PATH in prole_cfg.sh +# Create mocks for other tools that may be on PATH in knoe_cfg.sh for tool in curl docker k3d ansible-playbook tofu terraform ollama; do cat > "$TMP_DIR/$tool" < "$TMP_DIR/conf/prole.cfg" +cat < "$TMP_DIR/conf/knoe.cfg" [globals] -prole.home = $PROLE_HOME -prole.mode = k3d +knoe.home = $KNOE_HOME +knoe.mode = k3d [k3s] server = https://localhost:6443 token = test-token C_EOF export PATH="$TMP_DIR:$PATH" -export PROLE_HOME="$PROLE_HOME" -export PROLE_CONF="$TMP_DIR/conf" -export PROLE_SERVICE="$PROLE_HOME" +export KNOE_HOME="$KNOE_HOME" +export KNOE_CONF="$TMP_DIR/conf" +export KNOE_SERVICE="$KNOE_HOME" export NAMESPACE="test-ns" export PROLE_PASSWD="test-password" @@ -259,7 +259,7 @@ fi # In k3d mode, we should not pin monitoring to the merlin hostname. if [[ -f "$TMP_DIR/helm_values_kps.yaml" ]]; then - if grep -q "kubernetes.io/hostname: merlin.prole.org" "$TMP_DIR/helm_values_kps.yaml"; then + if grep -q "kubernetes.io/hostname: merlin.knoe.org" "$TMP_DIR/helm_values_kps.yaml"; then echo "FAILURE: did not expect merlin hostname pinning in k3d mode" sed -n '1,200p' "$TMP_DIR/helm_values_kps.yaml" || true exit 1 @@ -274,7 +274,7 @@ if [[ -f "$TMP_DIR/helm_values_kps.yaml" ]]; then fi # Assert we applied a ConfigMap that provisions the Prometheus datasource. -if ! grep -q "name: prole-grafana-datasource" "$TMP_DIR"/kubectl_apply_*.yaml 2>/dev/null; then +if ! grep -q "name: knoe-grafana-datasource" "$TMP_DIR"/kubectl_apply_*.yaml 2>/dev/null; then echo "FAILURE: expected Grafana datasource ConfigMap to be applied" ls -la "$TMP_DIR" || true for f in "$TMP_DIR"/kubectl_apply_*.yaml; do diff --git a/tests/etc/test_init_monitoring_k3s_primary_node_pinning.sh b/tests/etc/test_init_monitoring_k3s_primary_node_pinning.sh index aa4ec95..2cb4dd3 100644 --- a/tests/etc/test_init_monitoring_k3s_primary_node_pinning.sh +++ b/tests/etc/test_init_monitoring_k3s_primary_node_pinning.sh @@ -1,12 +1,12 @@ #!/usr/bin/env bash # Unit test for etc/init_monitoring.sh (k3s mode): persistent monitoring components must be pinned -# to the primary monitoring node (merlin.prole.org) via `kubernetes.io/hostname`. +# to the primary monitoring node (merlin.knoe.org) via `kubernetes.io/hostname`. set -euo pipefail SCRIPT_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) -PROLE_HOME=$(cd "$SCRIPT_DIR/../.." && pwd) -ETC_DIR="$PROLE_HOME/etc" +KNOE_HOME=$(cd "$SCRIPT_DIR/../.." && pwd) +ETC_DIR="$KNOE_HOME/etc" SCRIPT_UNDER_TEST="$ETC_DIR/init_monitoring.sh" TMP_DIR=$(mktemp -d) @@ -64,16 +64,16 @@ if [[ "${1:-}" == "get" && "${2:-}" == "pvc" && "${3:-}" == "-o" && "${4:-}" == exit 0 fi -if [[ "${1:-}" == "get" && "${2:-}" == "node" && "${3:-}" == "merlin.prole.org" ]]; then +if [[ "${1:-}" == "get" && "${2:-}" == "node" && "${3:-}" == "merlin.knoe.org" ]]; then # Resolve the monitoring primary node. - echo "merlin.prole.org" + echo "merlin.knoe.org" exit 0 fi if [[ "${1:-}" == "get" && "${2:-}" == "nodes" ]]; then # Used by monitoring_nodes_available(). Provide at least one general node. - echo "node/merlin.prole.org" - echo "node/pi.prole.org" + echo "node/merlin.knoe.org" + echo "node/pi.knoe.org" exit 0 fi @@ -174,7 +174,7 @@ fi exit 0 EOF -# Create mocks for other tools that may be on PATH in prole_cfg.sh +# Create mocks for other tools that may be on PATH in knoe_cfg.sh for tool in curl docker k3d ansible-playbook tofu terraform ollama; do cat > "$TMP_DIR/$tool" < "$TMP_DIR/conf/prole.cfg" +cat < "$TMP_DIR/conf/knoe.cfg" [globals] -prole.home = $PROLE_HOME -prole.mode = k3s +knoe.home = $KNOE_HOME +knoe.mode = k3s [k3s] server = https://localhost:6443 token = test-token C_EOF export PATH="$TMP_DIR:$PATH" -export PROLE_HOME="$PROLE_HOME" -export PROLE_CONF="$TMP_DIR/conf" -export PROLE_SERVICE="$PROLE_HOME" +export KNOE_HOME="$KNOE_HOME" +export KNOE_CONF="$TMP_DIR/conf" +export KNOE_SERVICE="$KNOE_HOME" export NAMESPACE="test-ns" export PROLE_PASSWD="test-password" @@ -214,7 +214,7 @@ export MONITORING_RESET_RETRIES=1 export HELM_UPGRADE_RETRIES=2 export HELM_RETRY_DELAY=0 export MONITORING_HELM_TIMEOUT=1s -export PROLE_MONITORING_DATA_DIR=/prole/d004 +export PROLE_MONITORING_DATA_DIR=/knoe/d004 export PROLE_MONITORING_PREP_TIMEOUT=1s # Run the script (initialize) @@ -237,7 +237,7 @@ if [[ ! -f "$TMP_DIR/helm_values_kps.yaml" ]]; then exit 1 fi -if ! grep -q "kubernetes.io/hostname: merlin.prole.org" "$TMP_DIR/helm_values_kps.yaml"; then +if ! grep -q "kubernetes.io/hostname: merlin.knoe.org" "$TMP_DIR/helm_values_kps.yaml"; then echo "FAILURE: expected merlin hostname pinning in k3s mode" echo "--- captured values ---" sed -n '1,250p' "$TMP_DIR/helm_values_kps.yaml" || true diff --git a/tests/etc/test_init_monitoring_k8s_storage_class_validation.sh b/tests/etc/test_init_monitoring_k8s_storage_class_validation.sh index 7acd168..f7b6e98 100644 --- a/tests/etc/test_init_monitoring_k8s_storage_class_validation.sh +++ b/tests/etc/test_init_monitoring_k8s_storage_class_validation.sh @@ -5,8 +5,8 @@ set -euo pipefail SCRIPT_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) -PROLE_HOME=$(cd "$SCRIPT_DIR/../.." && pwd) -ETC_DIR="$PROLE_HOME/etc" +KNOE_HOME=$(cd "$SCRIPT_DIR/../.." && pwd) +ETC_DIR="$KNOE_HOME/etc" SCRIPT_UNDER_TEST="$ETC_DIR/init_monitoring.sh" TMP_DIR=$(mktemp -d) @@ -64,7 +64,7 @@ if [[ "${1:-}" == "get" && "${2:-}" == "pvc" && "${3:-}" == "-o" && "${4:-}" == fi if [[ "${1:-}" == "get" && "${2:-}" == "nodes" ]]; then - echo "node/prole-gke-node-0" + echo "node/knoe-gke-node-0" exit 0 fi @@ -192,19 +192,19 @@ EOF done mkdir -p "$TMP_DIR/conf" -cat < "$TMP_DIR/conf/prole.cfg" +cat < "$TMP_DIR/conf/knoe.cfg" [globals] -prole.home = $PROLE_HOME -prole.mode = k8s +knoe.home = $KNOE_HOME +knoe.mode = k8s [k3s] server = https://localhost:6443 token = test-token C_EOF export PATH="$TMP_DIR:$PATH" -export PROLE_HOME="$PROLE_HOME" -export PROLE_CONF="$TMP_DIR/conf" -export PROLE_SERVICE="$PROLE_HOME" +export KNOE_HOME="$KNOE_HOME" +export KNOE_CONF="$TMP_DIR/conf" +export KNOE_SERVICE="$KNOE_HOME" export NAMESPACE="test-ns" export PROLE_PASSWD="test-password" diff --git a/tests/etc/test_init_ollama.sh b/tests/etc/test_init_ollama.sh index f73cc28..45b7774 100644 --- a/tests/etc/test_init_ollama.sh +++ b/tests/etc/test_init_ollama.sh @@ -2,8 +2,8 @@ # Unit test for etc/init_ollama.sh SCRIPT_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) -PROLE_HOME=$(cd "$SCRIPT_DIR/../.." && pwd) -ETC_DIR="$PROLE_HOME/etc" +KNOE_HOME=$(cd "$SCRIPT_DIR/../.." && pwd) +ETC_DIR="$KNOE_HOME/etc" SCRIPT_UNDER_TEST="$ETC_DIR/init_ollama.sh" TMP_DIR=$(mktemp -d) @@ -30,20 +30,20 @@ mock_tool terraform mock_tool ollama mock_tool jq -# Mock prole.cfg +# Mock knoe.cfg mkdir -p "$TMP_DIR/conf" -cat < "$TMP_DIR/conf/prole.cfg" +cat < "$TMP_DIR/conf/knoe.cfg" [globals] -prole.home = $PROLE_HOME -prole.mode = k3d +knoe.home = $KNOE_HOME +knoe.mode = k3d [k3s] server = https://localhost:6443 token = test-token C_EOF export PATH="$TMP_DIR:$PATH" -export PROLE_HOME="$PROLE_HOME" -export PROLE_CONF="$TMP_DIR/conf" +export KNOE_HOME="$KNOE_HOME" +export KNOE_CONF="$TMP_DIR/conf" export NAMESPACE="test-ns" export PROLE_PASSWD="test-password" diff --git a/tests/etc/test_init_openbao.sh b/tests/etc/test_init_openbao.sh index 6ccde3e..9e90a5a 100644 --- a/tests/etc/test_init_openbao.sh +++ b/tests/etc/test_init_openbao.sh @@ -2,8 +2,8 @@ # Unit test for etc/init_openbao.sh SCRIPT_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) -PROLE_HOME=$(cd "$SCRIPT_DIR/../.." && pwd) -ETC_DIR="$PROLE_HOME/etc" +KNOE_HOME=$(cd "$SCRIPT_DIR/../.." && pwd) +ETC_DIR="$KNOE_HOME/etc" SCRIPT_UNDER_TEST="$ETC_DIR/init_openbao.sh" TMP_DIR=$(mktemp -d) @@ -30,20 +30,20 @@ mock_tool terraform mock_tool ollama mock_tool jq -# Mock prole.cfg +# Mock knoe.cfg mkdir -p "$TMP_DIR/conf" -cat < "$TMP_DIR/conf/prole.cfg" +cat < "$TMP_DIR/conf/knoe.cfg" [globals] -prole.home = $PROLE_HOME -prole.mode = k3d +knoe.home = $KNOE_HOME +knoe.mode = k3d [k3s] server = https://localhost:6443 token = test-token C_EOF export PATH="$TMP_DIR:$PATH" -export PROLE_HOME="$PROLE_HOME" -export PROLE_CONF="$TMP_DIR/conf" +export KNOE_HOME="$KNOE_HOME" +export KNOE_CONF="$TMP_DIR/conf" export NAMESPACE="test-ns" export PROLE_PASSWD="test-password" diff --git a/tests/etc/test_init_openbao_recycles_released_pv_claimref.sh b/tests/etc/test_init_openbao_recycles_released_pv_claimref.sh index 17ac989..b3966a2 100644 --- a/tests/etc/test_init_openbao_recycles_released_pv_claimref.sh +++ b/tests/etc/test_init_openbao_recycles_released_pv_claimref.sh @@ -5,9 +5,9 @@ set -euo pipefail SCRIPT_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) -PROLE_HOME=$(cd "$SCRIPT_DIR/../.." && pwd) -SOURCE_ETC_DIR="$PROLE_HOME/etc" -SOURCE_ETC_LIB_SHELL_DIR="$PROLE_HOME/etc/lib/shell" +KNOE_HOME=$(cd "$SCRIPT_DIR/../.." && pwd) +SOURCE_ETC_DIR="$KNOE_HOME/etc" +SOURCE_ETC_LIB_SHELL_DIR="$KNOE_HOME/etc/lib/shell" TMP_DIR=$(mktemp -d) trap 'rm -rf "$TMP_DIR"' EXIT @@ -19,13 +19,13 @@ mkdir -p "$WORK_DIR/etc/lib/shell" "$WORK_DIR/conf" "$BIN_DIR" cp "$SOURCE_ETC_DIR/init_openbao.sh" "$WORK_DIR/etc/init_openbao.sh" cp "$SOURCE_ETC_DIR/common_core_lib.sh" "$WORK_DIR/etc/common_core_lib.sh" cp "$SOURCE_ETC_LIB_SHELL_DIR/common_core_lib.sh" "$WORK_DIR/etc/lib/shell/common_core_lib.sh" -cp "$SOURCE_ETC_DIR/prole_cfg.sh" "$WORK_DIR/etc/prole_cfg.sh" +cp "$SOURCE_ETC_DIR/knoe_cfg.sh" "$WORK_DIR/etc/knoe_cfg.sh" chmod +x "$WORK_DIR/etc/init_openbao.sh" -cat < "$WORK_DIR/conf/prole.cfg" +cat < "$WORK_DIR/conf/knoe.cfg" [globals] -prole.home = $WORK_DIR -prole.mode = k3s +knoe.home = $WORK_DIR +knoe.mode = k3s NAMESPACE = test-ns SERVICE_NAMESPACE = knoe-system EOF @@ -103,9 +103,9 @@ chmod +x "$BIN_DIR/kubectl" export PATH="$BIN_DIR:$PATH" -export PROLE_HOME="$WORK_DIR" -export PROLE_CONF="$WORK_DIR/conf" -export PROLE_MODE="k3s" +export KNOE_HOME="$WORK_DIR" +export KNOE_CONF="$WORK_DIR/conf" +export KNOE_MODE="k3s" export PVC_REPAIR_WAIT_TIMEOUT="0s" if "$WORK_DIR/etc/init_openbao.sh" -n "knoe-system" restart >"$TMP_DIR/stdout" 2>"$TMP_DIR/stderr"; then diff --git a/tests/etc/test_init_opentofu.sh b/tests/etc/test_init_opentofu.sh index ff98b40..1826472 100644 --- a/tests/etc/test_init_opentofu.sh +++ b/tests/etc/test_init_opentofu.sh @@ -2,8 +2,8 @@ # Unit test for etc/init_opentofu.sh SCRIPT_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) -PROLE_HOME=$(cd "$SCRIPT_DIR/../.." && pwd) -ETC_DIR="$PROLE_HOME/etc" +KNOE_HOME=$(cd "$SCRIPT_DIR/../.." && pwd) +ETC_DIR="$KNOE_HOME/etc" SCRIPT_UNDER_TEST="$ETC_DIR/init_opentofu.sh" TMP_DIR=$(mktemp -d) @@ -65,9 +65,9 @@ mock_tool terraform mock_tool ollama mock_tool jq -# Mock prole.cfg +# Mock knoe.cfg mkdir -p "$TMP_DIR/conf" -cat < "$TMP_DIR/conf/prole.cfg" +cat < "$TMP_DIR/conf/knoe.cfg" [Global] MODE = k3d NAMESPACE = test-ns @@ -77,9 +77,9 @@ ENVIRONMENT = dev C_EOF export PATH="$TMP_DIR:$PATH" -export PROLE_HOME="$PROLE_HOME" -export PROLE_CONF="$TMP_DIR/conf" -export PROLE_SERVICE="$PROLE_HOME/etc" +export KNOE_HOME="$KNOE_HOME" +export KNOE_CONF="$TMP_DIR/conf" +export KNOE_SERVICE="$KNOE_HOME/etc" export NAMESPACE="test-ns" export PROLE_PASSWD="test-password" diff --git a/tests/etc/test_init_port_forwards.sh b/tests/etc/test_init_port_forwards.sh index 83f2b64..5dee5fa 100644 --- a/tests/etc/test_init_port_forwards.sh +++ b/tests/etc/test_init_port_forwards.sh @@ -2,8 +2,8 @@ # Unit test for etc/init_port_forwards.sh SCRIPT_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) -PROLE_HOME=$(cd "$SCRIPT_DIR/../.." && pwd) -ETC_DIR="$PROLE_HOME/etc" +KNOE_HOME=$(cd "$SCRIPT_DIR/../.." && pwd) +ETC_DIR="$KNOE_HOME/etc" SCRIPT_UNDER_TEST="$ETC_DIR/init_port_forwards.sh" TMP_DIR=$(mktemp -d) @@ -30,20 +30,20 @@ mock_tool terraform mock_tool ollama mock_tool jq -# Mock prole.cfg +# Mock knoe.cfg mkdir -p "$TMP_DIR/conf" -cat < "$TMP_DIR/conf/prole.cfg" +cat < "$TMP_DIR/conf/knoe.cfg" [globals] -prole.home = $PROLE_HOME -prole.mode = k3d +knoe.home = $KNOE_HOME +knoe.mode = k3d [k3s] server = https://localhost:6443 token = test-token C_EOF export PATH="$TMP_DIR:$PATH" -export PROLE_HOME="$PROLE_HOME" -export PROLE_CONF="$TMP_DIR/conf" +export KNOE_HOME="$KNOE_HOME" +export KNOE_CONF="$TMP_DIR/conf" export NAMESPACE="test-ns" export PROLE_PASSWD="test-password" diff --git a/tests/etc/test_init_registry.sh b/tests/etc/test_init_registry.sh index ab4cbe2..c3c4ea8 100644 --- a/tests/etc/test_init_registry.sh +++ b/tests/etc/test_init_registry.sh @@ -2,8 +2,8 @@ # Unit test for etc/init_registry.sh SCRIPT_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) -PROLE_HOME=$(cd "$SCRIPT_DIR/../.." && pwd) -ETC_DIR="$PROLE_HOME/etc" +KNOE_HOME=$(cd "$SCRIPT_DIR/../.." && pwd) +ETC_DIR="$KNOE_HOME/etc" SCRIPT_UNDER_TEST="$ETC_DIR/init_registry.sh" TMP_DIR=$(mktemp -d) @@ -30,20 +30,20 @@ mock_tool terraform mock_tool ollama mock_tool jq -# Mock prole.cfg +# Mock knoe.cfg mkdir -p "$TMP_DIR/conf" -cat < "$TMP_DIR/conf/prole.cfg" +cat < "$TMP_DIR/conf/knoe.cfg" [globals] -prole.home = $PROLE_HOME -prole.mode = k3d +knoe.home = $KNOE_HOME +knoe.mode = k3d [k3s] server = https://localhost:6443 token = test-token C_EOF export PATH="$TMP_DIR:$PATH" -export PROLE_HOME="$PROLE_HOME" -export PROLE_CONF="$TMP_DIR/conf" +export KNOE_HOME="$KNOE_HOME" +export KNOE_CONF="$TMP_DIR/conf" export NAMESPACE="test-ns" export PROLE_PASSWD="test-password" diff --git a/tests/etc/test_init_registry_k3d_cluster_from_kubectx.sh b/tests/etc/test_init_registry_k3d_cluster_from_kubectx.sh index bef9d2d..96fbe23 100644 --- a/tests/etc/test_init_registry_k3d_cluster_from_kubectx.sh +++ b/tests/etc/test_init_registry_k3d_cluster_from_kubectx.sh @@ -5,8 +5,8 @@ set -euo pipefail SCRIPT_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) -PROLE_HOME=$(cd "$SCRIPT_DIR/../.." && pwd) -ETC_DIR="$PROLE_HOME/etc" +KNOE_HOME=$(cd "$SCRIPT_DIR/../.." && pwd) +ETC_DIR="$KNOE_HOME/etc" SCRIPT_UNDER_TEST="$ETC_DIR/init_registry.sh" TMP_DIR=$(mktemp -d) @@ -71,20 +71,20 @@ EOF chmod +x "$TMP_DIR/kubectl" "$TMP_DIR/docker" "$TMP_DIR/k3d" "$TMP_DIR/curl" -# Minimal prole.cfg +# Minimal knoe.cfg mkdir -p "$TMP_DIR/conf" -cat < "$TMP_DIR/conf/prole.cfg" +cat < "$TMP_DIR/conf/knoe.cfg" [globals] -prole.home = $PROLE_HOME -prole.mode = k3d +knoe.home = $KNOE_HOME +knoe.mode = k3d [k3s] server = https://localhost:6443 token = test-token C_EOF export PATH="$TMP_DIR:$PATH" -export PROLE_HOME="$PROLE_HOME" -export PROLE_CONF="$TMP_DIR/conf" +export KNOE_HOME="$KNOE_HOME" +export KNOE_CONF="$TMP_DIR/conf" # Ensure we are testing kubectl-context based resolution. unset K3D_CLUSTER_NAME @@ -101,7 +101,7 @@ if [[ $RC -ne 0 ]]; then exit 1 fi -if ! grep -q "docker called with network connect --alias k3d-prole-registry k3d-knoe-system k3d-prole-registry" "$TMP_DIR/mock_calls.log"; then +if ! grep -q "docker called with network connect --alias k3d-knoe-registry k3d-knoe-system k3d-knoe-registry" "$TMP_DIR/mock_calls.log"; then echo "FAILURE: expected registry network connect to target k3d-knoe-system network (derived from kubectx)" echo "--- mock_calls.log ---" cat "$TMP_DIR/mock_calls.log" || true diff --git a/tests/etc/test_init_service_layer.sh b/tests/etc/test_init_service_layer.sh index a92dd93..2f47043 100644 --- a/tests/etc/test_init_service_layer.sh +++ b/tests/etc/test_init_service_layer.sh @@ -2,8 +2,8 @@ # Unit test for etc/init_service_layer.sh SCRIPT_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) -PROLE_HOME=$(cd "$SCRIPT_DIR/../.." && pwd) -ETC_DIR="$PROLE_HOME/etc" +KNOE_HOME=$(cd "$SCRIPT_DIR/../.." && pwd) +ETC_DIR="$KNOE_HOME/etc" SCRIPT_UNDER_TEST="$ETC_DIR/init_service_layer.sh" TMP_DIR=$(mktemp -d) @@ -30,20 +30,20 @@ mock_tool terraform mock_tool ollama mock_tool jq -# Mock prole.cfg +# Mock knoe.cfg mkdir -p "$TMP_DIR/conf" -cat < "$TMP_DIR/conf/prole.cfg" +cat < "$TMP_DIR/conf/knoe.cfg" [globals] -prole.home = $PROLE_HOME -prole.mode = k3d +knoe.home = $KNOE_HOME +knoe.mode = k3d [k3s] server = https://localhost:6443 token = test-token C_EOF export PATH="$TMP_DIR:$PATH" -export PROLE_HOME="$PROLE_HOME" -export PROLE_CONF="$TMP_DIR/conf" +export KNOE_HOME="$KNOE_HOME" +export KNOE_CONF="$TMP_DIR/conf" export NAMESPACE="test-ns" export PROLE_PASSWD="test-password" diff --git a/tests/etc/test_init_supabase_ports.sh b/tests/etc/test_init_supabase_ports.sh index e2ed78e..9a7935b 100644 --- a/tests/etc/test_init_supabase_ports.sh +++ b/tests/etc/test_init_supabase_ports.sh @@ -2,8 +2,8 @@ # Unit test for etc/init_supabase_ports.sh SCRIPT_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) -PROLE_HOME=$(cd "$SCRIPT_DIR/../.." && pwd) -ETC_DIR="$PROLE_HOME/etc" +KNOE_HOME=$(cd "$SCRIPT_DIR/../.." && pwd) +ETC_DIR="$KNOE_HOME/etc" SCRIPT_UNDER_TEST="$ETC_DIR/init_supabase_ports.sh" TMP_DIR=$(mktemp -d) @@ -30,20 +30,20 @@ mock_tool terraform mock_tool ollama mock_tool jq -# Mock prole.cfg +# Mock knoe.cfg mkdir -p "$TMP_DIR/conf" -cat < "$TMP_DIR/conf/prole.cfg" +cat < "$TMP_DIR/conf/knoe.cfg" [globals] -prole.home = $PROLE_HOME -prole.mode = k3d +knoe.home = $KNOE_HOME +knoe.mode = k3d [k3s] server = https://localhost:6443 token = test-token C_EOF export PATH="$TMP_DIR:$PATH" -export PROLE_HOME="$PROLE_HOME" -export PROLE_CONF="$TMP_DIR/conf" +export KNOE_HOME="$KNOE_HOME" +export KNOE_CONF="$TMP_DIR/conf" export NAMESPACE="test-ns" export PROLE_PASSWD="test-password" diff --git a/tests/etc/test_k3s_cluster_rename.sh b/tests/etc/test_k3s_cluster_rename.sh index d045e09..e0c35ed 100644 --- a/tests/etc/test_k3s_cluster_rename.sh +++ b/tests/etc/test_k3s_cluster_rename.sh @@ -3,8 +3,8 @@ set -euo pipefail SCRIPT_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) -PROLE_HOME=$(cd "$SCRIPT_DIR/../.." && pwd) -SCRIPT_UNDER_TEST="$PROLE_HOME/tools/k3s-cluster-rename.sh" +KNOE_HOME=$(cd "$SCRIPT_DIR/../.." && pwd) +SCRIPT_UNDER_TEST="$KNOE_HOME/tools/k3s-cluster-rename.sh" TMP_DIR=$(mktemp -d) trap 'rm -rf "$TMP_DIR"' EXIT @@ -59,7 +59,7 @@ assert_target_names() { import json import sys -target = "knoe.dev.prole.org" +target = "knoe.dev.knoe.org" with open(sys.argv[1], "r", encoding="utf-8") as fh: data = json.load(fh) @@ -89,8 +89,8 @@ assert_has_kubectx_call() { echo "FAILURE: expected kubectx to be called" >&2 exit 1 fi - if ! grep -q '^knoe.dev.prole.org$' "$TMP_DIR/kubectx_calls.log"; then - echo "FAILURE: expected kubectx to be called with knoe.dev.prole.org" >&2 + if ! grep -q '^knoe.dev.knoe.org$' "$TMP_DIR/kubectx_calls.log"; then + echo "FAILURE: expected kubectx to be called with knoe.dev.knoe.org" >&2 cat "$TMP_DIR/kubectx_calls.log" >&2 exit 1 fi @@ -139,7 +139,7 @@ export PATH="$BIN_DIR:$PATH" # Core rename + idempotency cfg_primary="$TMP_DIR/kubeconfig-primary.json" -create_single_context_cfg "$cfg_primary" "prole-k3s" +create_single_context_cfg "$cfg_primary" "knoe-k3s" bash "$SCRIPT_UNDER_TEST" --kubeconfig "$cfg_primary" --no-backup assert_target_names "$cfg_primary" @@ -159,7 +159,7 @@ assert_target_names "$cfg_repair" home_dir="$TMP_DIR/home" mkdir -p "$home_dir/.kube" cfg_default="$home_dir/.kube/config" -create_single_context_cfg "$cfg_default" "prole-k3s" +create_single_context_cfg "$cfg_default" "knoe-k3s" unset KUBECONFIG || true HOME="$home_dir" bash "$SCRIPT_UNDER_TEST" --no-backup diff --git a/tests/etc/test_prole_auth_keytab_bootstrap_manifest.sh b/tests/etc/test_knoe_auth_keytab_bootstrap_manifest.sh similarity index 57% rename from tests/etc/test_prole_auth_keytab_bootstrap_manifest.sh rename to tests/etc/test_knoe_auth_keytab_bootstrap_manifest.sh index bfaa018..2378fa0 100644 --- a/tests/etc/test_prole_auth_keytab_bootstrap_manifest.sh +++ b/tests/etc/test_knoe_auth_keytab_bootstrap_manifest.sh @@ -1,13 +1,13 @@ #!/usr/bin/env bash -# Regression test: prole-auth manifest should not hard-require the `prole-auth-keytab` +# Regression test: knoe-auth manifest should not hard-require the `knoe-auth-keytab` # secret and should include a keytab bootstrap initContainer. set -euo pipefail SCRIPT_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) -PROLE_HOME=$(cd "$SCRIPT_DIR/../.." && pwd) +KNOE_HOME=$(cd "$SCRIPT_DIR/../.." && pwd) -MANIFEST="$PROLE_HOME/deploy/opentofu/k3s/manifests/prole/prole-auth-deployment.yaml" +MANIFEST="$KNOE_HOME/deploy/opentofu/k3s/manifests/knoe/knoe-auth-deployment.yaml" if [[ ! -f "$MANIFEST" ]]; then echo "FAILURE: manifest not found: $MANIFEST" >&2 @@ -15,7 +15,7 @@ if [[ ! -f "$MANIFEST" ]]; then fi if ! grep -q "^[[:space:]]*initContainers:" "$MANIFEST"; then - echo "FAILURE: expected initContainers in prole-auth deployment" >&2 + echo "FAILURE: expected initContainers in knoe-auth deployment" >&2 exit 1 fi @@ -24,13 +24,13 @@ if ! grep -q "^[[:space:]]*- name: keytab-bootstrap" "$MANIFEST"; then exit 1 fi -if ! grep -Fq "secretName: prole-auth-keytab" "$MANIFEST"; then - echo "FAILURE: expected reference to secretName prole-auth-keytab (optional)" >&2 +if ! grep -Fq "secretName: knoe-auth-keytab" "$MANIFEST"; then + echo "FAILURE: expected reference to secretName knoe-auth-keytab (optional)" >&2 exit 1 fi if ! grep -Fq "optional: true" "$MANIFEST"; then - echo "FAILURE: expected prole-auth-keytab secret to be optional" >&2 + echo "FAILURE: expected knoe-auth-keytab secret to be optional" >&2 exit 1 fi diff --git a/tests/etc/test_knoe_cfg_bootstrap_env_layout.sh b/tests/etc/test_knoe_cfg_bootstrap_env_layout.sh new file mode 100644 index 0000000..29c7663 --- /dev/null +++ b/tests/etc/test_knoe_cfg_bootstrap_env_layout.sh @@ -0,0 +1,65 @@ +#!/usr/bin/env bash +# Regression test: sourcing etc/knoe_cfg.sh should bootstrap config layout +# and migrate a legacy regular-file knoe.cfg entrypoint into the right root file. + +set -euo pipefail + +SCRIPT_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) +PROLE_REPO_ROOT=$(cd "$SCRIPT_DIR/../.." && pwd) + +TMP_DIR=$(mktemp -d) +trap 'rm -rf "$TMP_DIR"' EXIT + +TEST_HOME="$TMP_DIR/knoe-home" +mkdir -p "$TEST_HOME/conf" + +cat >"$TEST_HOME/env.sh" <"$TEST_HOME/conf/knoe.cfg" <<'EOF' +[Global] +DEPLOYMENT_MODE = k3d +CLUSTER_ENV = k3d-knoe-dev-cluster +NAMESPACE = knoe-db-legacy +SERVICE_NAMESPACE = default +EOF + +export KNOE_HOME="$TEST_HOME" +export KNOE_CONF="$TEST_HOME/conf" + +# Source the shared loader (this should bootstrap the config layout) +# shellcheck disable=SC1090 +source "$PROLE_REPO_ROOT/etc/knoe_cfg.sh" + +if [[ ! -f "$KNOE_CONF/k3d.cfg" ]]; then + echo "FAILURE: expected $KNOE_CONF/k3d.cfg to exist" >&2 + exit 1 +fi + +if ! grep -q "NAMESPACE = knoe-db-legacy" "$KNOE_CONF/k3d.cfg"; then + echo "FAILURE: expected migrated k3d base to contain legacy content" >&2 + echo "--- k3d.cfg ---" >&2 + cat "$KNOE_CONF/k3d.cfg" >&2 || true + exit 1 +fi + +if ! ls "$KNOE_CONF"/knoe.cfg.legacy.* >/dev/null 2>&1; then + echo "FAILURE: expected legacy backup knoe.cfg.legacy.* to be created" >&2 + ls -la "$KNOE_CONF" >&2 || true + exit 1 +fi + +for env in dev service prod test; do + if [[ ! -d "$KNOE_CONF/$env" ]]; then + echo "FAILURE: expected env dir to exist: $KNOE_CONF/$env" >&2 + exit 1 + fi +done + +echo "SUCCESS" diff --git a/tests/etc/test_prole_cfg_hyphenated_keys_normalized.sh b/tests/etc/test_knoe_cfg_hyphenated_keys_normalized.sh similarity index 77% rename from tests/etc/test_prole_cfg_hyphenated_keys_normalized.sh rename to tests/etc/test_knoe_cfg_hyphenated_keys_normalized.sh index 7fd966c..0768711 100644 --- a/tests/etc/test_prole_cfg_hyphenated_keys_normalized.sh +++ b/tests/etc/test_knoe_cfg_hyphenated_keys_normalized.sh @@ -6,7 +6,7 @@ set -euo pipefail # shell-safe variable names instead of crashing with "invalid variable name". SCRIPT_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) -PROLE_HOME=$(cd "$SCRIPT_DIR/../.." && pwd) +KNOE_HOME=$(cd "$SCRIPT_DIR/../.." && pwd) TMP_DIR=$(mktemp -d) trap 'rm -rf "$TMP_DIR"' EXIT @@ -37,23 +37,23 @@ export PATH="$BIN_DIR:$PATH" CONF_DIR="$TMP_DIR/conf" mkdir -p "$CONF_DIR/service" -cat >"$CONF_DIR/service/prole.cfg" <"$CONF_DIR/service/knoe.cfg" < "$TMP_DIR/conf/prole.cfg" +cat < "$TMP_DIR/conf/knoe.cfg" [User] NAMESPACE = test-ns SERVICE_NAMESPACE = test-system [Global] DEPLOYMENT_MODE = k3s -PROLE_K3S_SERVER = https://myrddin.prole.org:6443 +PROLE_K3S_SERVER = https://myrddin.knoe.org:6443 [Docker Build] ENABLE_LOCAL_REGISTRY = 1 -LOCAL_REGISTRY_INTERNAL = k3d-prole-registry.localhost:5000 +LOCAL_REGISTRY_INTERNAL = k3d-knoe-registry.localhost:5000 C_EOF -export PROLE_HOME -export PROLE_CONF="$TMP_DIR/conf" +export KNOE_HOME +export KNOE_CONF="$TMP_DIR/conf" -# `prole_cfg.sh` will try to bootstrap a kubeconfig when `KUBECONFIG` is empty in k3s mode. +# `knoe_cfg.sh` will try to bootstrap a kubeconfig when `KUBECONFIG` is empty in k3s mode. # For this unit test we only care about config/env resolution logic, so keep it non-empty. export KUBECONFIG="$TMP_DIR/dummy.kubeconfig" resolved=$(bash -c 'set -euo pipefail; source "$0" >/dev/null; printf "%s" "${LOCAL_REGISTRY_INTERNAL:-}"' "$CFG_SCRIPT") -if [[ "$resolved" != "myrddin.prole.org:5000" ]]; then - echo "FAILURE: expected LOCAL_REGISTRY_INTERNAL to resolve to myrddin.prole.org:5000" >&2 +if [[ "$resolved" != "myrddin.knoe.org:5000" ]]; then + echo "FAILURE: expected LOCAL_REGISTRY_INTERNAL to resolve to myrddin.knoe.org:5000" >&2 echo "Got: '$resolved'" >&2 exit 1 fi # Case 2: without a server URL, fall back to in-cluster registry DNS using the registry namespace. -cat < "$TMP_DIR/conf/prole.cfg" +cat < "$TMP_DIR/conf/knoe.cfg" [User] NAMESPACE = test-ns SERVICE_NAMESPACE = test-system @@ -55,7 +55,7 @@ DEPLOYMENT_MODE = k3s [Docker Build] ENABLE_LOCAL_REGISTRY = 1 -LOCAL_REGISTRY_INTERNAL = k3d-prole-registry.localhost:5000 +LOCAL_REGISTRY_INTERNAL = k3d-knoe-registry.localhost:5000 C2_EOF resolved2=$(bash -c 'set -euo pipefail; source "$0" >/dev/null; printf "%s" "${LOCAL_REGISTRY_INTERNAL:-}"' "$CFG_SCRIPT") diff --git a/tests/etc/test_prole_cfg_k8s_prefers_app_cluster_context.sh b/tests/etc/test_knoe_cfg_k8s_prefers_app_cluster_context.sh similarity index 86% rename from tests/etc/test_prole_cfg_k8s_prefers_app_cluster_context.sh rename to tests/etc/test_knoe_cfg_k8s_prefers_app_cluster_context.sh index 6bdce68..1f7186d 100644 --- a/tests/etc/test_prole_cfg_k8s_prefers_app_cluster_context.sh +++ b/tests/etc/test_knoe_cfg_k8s_prefers_app_cluster_context.sh @@ -3,7 +3,7 @@ set -euo pipefail SCRIPT_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) -PROLE_HOME=$(cd "$SCRIPT_DIR/../.." && pwd) +KNOE_HOME=$(cd "$SCRIPT_DIR/../.." && pwd) TMP_DIR=$(mktemp -d) trap 'rm -rf "$TMP_DIR"' EXIT @@ -11,7 +11,7 @@ trap 'rm -rf "$TMP_DIR"' EXIT CONF_DIR="$TMP_DIR/conf" mkdir -p "$CONF_DIR" -cat <<'CFG_EOF' >"$CONF_DIR/prole.cfg" +cat <<'CFG_EOF' >"$CONF_DIR/knoe.cfg" [globals] DEPLOYMENT_MODE = k8s APP_CLUSTER_KUBECONTEXT = gke_plenary-truck-485623-p7_us-west3_knoe-dev-0 @@ -22,15 +22,15 @@ CFG_EOF export HOME="$TMP_DIR/home" mkdir -p "$HOME" -export PROLE_HOME="$PROLE_HOME" -export PROLE_CONF="$CONF_DIR" -unset PROLE_MODE +export KNOE_HOME="$KNOE_HOME" +export KNOE_CONF="$CONF_DIR" +unset KNOE_MODE unset KUBE_CONTEXT_NAME unset KUBECTL_CONTEXT unset KUBECONTEXT # shellcheck disable=SC1090 -source "$PROLE_HOME/etc/prole_cfg.sh" +source "$KNOE_HOME/etc/knoe_cfg.sh" expected_ctx="gke_plenary-truck-485623-p7_us-west3_knoe-dev-0" diff --git a/tests/etc/test_prole_cfg_kube_context_k3d_prefix.sh b/tests/etc/test_knoe_cfg_kube_context_k3d_prefix.sh similarity index 87% rename from tests/etc/test_prole_cfg_kube_context_k3d_prefix.sh rename to tests/etc/test_knoe_cfg_kube_context_k3d_prefix.sh index 2c70b1b..1bc200a 100644 --- a/tests/etc/test_prole_cfg_kube_context_k3d_prefix.sh +++ b/tests/etc/test_knoe_cfg_kube_context_k3d_prefix.sh @@ -3,7 +3,7 @@ set -euo pipefail SCRIPT_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) -PROLE_HOME=$(cd "$SCRIPT_DIR/../.." && pwd) +KNOE_HOME=$(cd "$SCRIPT_DIR/../.." && pwd) TMP_DIR=$(mktemp -d) trap 'rm -rf "$TMP_DIR"' EXIT @@ -48,7 +48,7 @@ K_EOF chmod +x "$BIN_DIR/kubectl" mkdir -p "$TMP_DIR/conf" -cat <"$TMP_DIR/conf/prole.cfg" +cat <"$TMP_DIR/conf/knoe.cfg" [Global] DEPLOYMENT_MODE = k3d KUBECONTEXT = knoe-system @@ -58,13 +58,13 @@ export PATH="$BIN_DIR:$PATH" export HOME="$TMP_DIR/home" mkdir -p "$HOME" -export PROLE_HOME="$PROLE_HOME" -export PROLE_CONF="$TMP_DIR/conf" -export PROLE_MODE="k3d" +export KNOE_HOME="$KNOE_HOME" +export KNOE_CONF="$TMP_DIR/conf" +export KNOE_MODE="k3d" export KUBECONTEXT="knoe-system" # shellcheck disable=SC1090 -source "$PROLE_HOME/etc/prole_cfg.sh" +source "$KNOE_HOME/etc/knoe_cfg.sh" ensure_kube_context diff --git a/tests/etc/test_prole_cfg_kube_context_local_node_skip_switch.sh b/tests/etc/test_knoe_cfg_kube_context_local_node_skip_switch.sh similarity index 87% rename from tests/etc/test_prole_cfg_kube_context_local_node_skip_switch.sh rename to tests/etc/test_knoe_cfg_kube_context_local_node_skip_switch.sh index 3060aca..9c9e406 100644 --- a/tests/etc/test_prole_cfg_kube_context_local_node_skip_switch.sh +++ b/tests/etc/test_knoe_cfg_kube_context_local_node_skip_switch.sh @@ -3,7 +3,7 @@ set -euo pipefail SCRIPT_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) -PROLE_HOME=$(cd "$SCRIPT_DIR/../.." && pwd) +KNOE_HOME=$(cd "$SCRIPT_DIR/../.." && pwd) TMP_DIR=$(mktemp -d) trap 'rm -rf "$TMP_DIR"' EXIT @@ -31,7 +31,7 @@ fi if [[ "$args" == "config get-contexts -o name" ]]; then echo "default" - echo "prole-k3s" + echo "knoe-k3s" exit 0 fi @@ -48,13 +48,13 @@ export PATH="$BIN_DIR:$PATH" export HOME="$TMP_DIR/home" mkdir -p "$HOME" -export PROLE_HOME="$PROLE_HOME" -export PROLE_MODE="k3s" +export KNOE_HOME="$KNOE_HOME" +export KNOE_MODE="k3s" export KUBECONFIG="/etc/rancher/k3s/k3s.yaml" -export KUBE_CONTEXT_NAME="prole-k3s" +export KUBE_CONTEXT_NAME="knoe-k3s" # shellcheck disable=SC1090 -source "$PROLE_HOME/etc/prole_cfg.sh" +source "$KNOE_HOME/etc/knoe_cfg.sh" ensure_kube_context diff --git a/tests/etc/test_prole_cfg_kube_context_remote_readonly_requires_switch.sh b/tests/etc/test_knoe_cfg_kube_context_remote_readonly_requires_switch.sh similarity index 89% rename from tests/etc/test_prole_cfg_kube_context_remote_readonly_requires_switch.sh rename to tests/etc/test_knoe_cfg_kube_context_remote_readonly_requires_switch.sh index d5857ba..7e9c7ae 100644 --- a/tests/etc/test_prole_cfg_kube_context_remote_readonly_requires_switch.sh +++ b/tests/etc/test_knoe_cfg_kube_context_remote_readonly_requires_switch.sh @@ -3,7 +3,7 @@ set -euo pipefail SCRIPT_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) -PROLE_HOME=$(cd "$SCRIPT_DIR/../.." && pwd) +KNOE_HOME=$(cd "$SCRIPT_DIR/../.." && pwd) TMP_DIR=$(mktemp -d) trap 'rm -rf "$TMP_DIR"' EXIT @@ -31,7 +31,7 @@ fi if [[ "$args" == "config get-contexts -o name" ]]; then echo "docker-desktop" - echo "prole-k3s" + echo "knoe-k3s" exit 0 fi @@ -51,15 +51,15 @@ mkdir -p "$HOME" touch "$TMP_DIR/kubeconfig" chmod 444 "$TMP_DIR/kubeconfig" -export PROLE_HOME="$PROLE_HOME" -export PROLE_MODE="k3s" +export KNOE_HOME="$KNOE_HOME" +export KNOE_MODE="k3s" export KUBECONFIG="$TMP_DIR/kubeconfig" -export KUBE_CONTEXT_NAME="prole-k3s" +export KUBE_CONTEXT_NAME="knoe-k3s" # shellcheck disable=SC1090 -source "$PROLE_HOME/etc/prole_cfg.sh" +source "$KNOE_HOME/etc/knoe_cfg.sh" -CURRENT_CONTEXT="prole-k3s" +CURRENT_CONTEXT="knoe-k3s" export CURRENT_CONTEXT ensure_kube_context diff --git a/tests/etc/test_prole_cfg_kube_context_remote_writable_switch_only_when_needed.sh b/tests/etc/test_knoe_cfg_kube_context_remote_writable_switch_only_when_needed.sh similarity index 80% rename from tests/etc/test_prole_cfg_kube_context_remote_writable_switch_only_when_needed.sh rename to tests/etc/test_knoe_cfg_kube_context_remote_writable_switch_only_when_needed.sh index 02c57d4..21a34a0 100644 --- a/tests/etc/test_prole_cfg_kube_context_remote_writable_switch_only_when_needed.sh +++ b/tests/etc/test_knoe_cfg_kube_context_remote_writable_switch_only_when_needed.sh @@ -3,7 +3,7 @@ set -euo pipefail SCRIPT_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) -PROLE_HOME=$(cd "$SCRIPT_DIR/../.." && pwd) +KNOE_HOME=$(cd "$SCRIPT_DIR/../.." && pwd) TMP_DIR=$(mktemp -d) trap 'rm -rf "$TMP_DIR"' EXIT @@ -31,13 +31,13 @@ fi if [[ "$args" == "config get-contexts -o name" ]]; then echo "docker-desktop" - echo "prole-k3s" + echo "knoe-k3s" exit 0 fi if [[ "$args" == "config get-contexts --no-headers" ]]; then echo "* docker-desktop docker-desktop user" - echo " prole-k3s prole-k3s user" + echo " knoe-k3s knoe-k3s user" exit 0 fi @@ -57,15 +57,15 @@ mkdir -p "$HOME" touch "$TMP_DIR/kubeconfig" chmod 600 "$TMP_DIR/kubeconfig" -export PROLE_HOME="$PROLE_HOME" -export PROLE_MODE="k3s" +export KNOE_HOME="$KNOE_HOME" +export KNOE_MODE="k3s" export KUBECONFIG="$TMP_DIR/kubeconfig" -export KUBE_CONTEXT_NAME="prole-k3s" +export KUBE_CONTEXT_NAME="knoe-k3s" # shellcheck disable=SC1090 -source "$PROLE_HOME/etc/prole_cfg.sh" +source "$KNOE_HOME/etc/knoe_cfg.sh" -CURRENT_CONTEXT="prole-k3s" +CURRENT_CONTEXT="knoe-k3s" export CURRENT_CONTEXT ensure_kube_context @@ -91,8 +91,8 @@ if [[ "$(wc -l <"$TMP_DIR/used_contexts")" -ne 1 ]]; then exit 1 fi -if [[ "$(cat "$TMP_DIR/used_contexts")" != "prole-k3s" ]]; then - echo "FAILURE: expected switch target 'prole-k3s' but got '$(cat "$TMP_DIR/used_contexts")'" >&2 +if [[ "$(cat "$TMP_DIR/used_contexts")" != "knoe-k3s" ]]; then + echo "FAILURE: expected switch target 'knoe-k3s' but got '$(cat "$TMP_DIR/used_contexts")'" >&2 exit 1 fi diff --git a/tests/etc/test_prole_cfg_kube_context_single_context_fallback.sh b/tests/etc/test_knoe_cfg_kube_context_single_context_fallback.sh similarity index 82% rename from tests/etc/test_prole_cfg_kube_context_single_context_fallback.sh rename to tests/etc/test_knoe_cfg_kube_context_single_context_fallback.sh index 5ccce25..27ed04d 100644 --- a/tests/etc/test_prole_cfg_kube_context_single_context_fallback.sh +++ b/tests/etc/test_knoe_cfg_kube_context_single_context_fallback.sh @@ -3,7 +3,7 @@ set -euo pipefail SCRIPT_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) -PROLE_HOME=$(cd "$SCRIPT_DIR/../.." && pwd) +KNOE_HOME=$(cd "$SCRIPT_DIR/../.." && pwd) TMP_DIR=$(mktemp -d) trap 'rm -rf "$TMP_DIR"' EXIT @@ -51,15 +51,15 @@ export PATH="$BIN_DIR:$PATH" export HOME="$TMP_DIR/home" mkdir -p "$HOME" -# Prevent prole_cfg.sh from trying to auto-discover kubeconfig during sourcing. +# Prevent knoe_cfg.sh from trying to auto-discover kubeconfig during sourcing. export KUBECONFIG="$TMP_DIR/kubeconfig" -export PROLE_HOME="$PROLE_HOME" -export PROLE_MODE="k3s" -export KUBECONTEXT="prole-k3s" +export KNOE_HOME="$KNOE_HOME" +export KNOE_MODE="k3s" +export KUBECONTEXT="knoe-k3s" # shellcheck disable=SC1090 -source "$PROLE_HOME/etc/prole_cfg.sh" +source "$KNOE_HOME/etc/knoe_cfg.sh" ensure_kube_context diff --git a/tests/etc/test_prole_cfg_overrides_env_mode.sh b/tests/etc/test_knoe_cfg_overrides_env_mode.sh similarity index 55% rename from tests/etc/test_prole_cfg_overrides_env_mode.sh rename to tests/etc/test_knoe_cfg_overrides_env_mode.sh index 3f5337a..108f448 100644 --- a/tests/etc/test_prole_cfg_overrides_env_mode.sh +++ b/tests/etc/test_knoe_cfg_overrides_env_mode.sh @@ -2,10 +2,10 @@ set -euo pipefail -# Regression test: prole.cfg must override a leaked PROLE_MODE from environment. +# Regression test: knoe.cfg must override a leaked KNOE_MODE from environment. SCRIPT_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) -PROLE_HOME=$(cd "$SCRIPT_DIR/../.." && pwd) +KNOE_HOME=$(cd "$SCRIPT_DIR/../.." && pwd) TMP_DIR=$(mktemp -d) trap 'rm -rf "$TMP_DIR"' EXIT @@ -36,29 +36,29 @@ export PATH="$BIN_DIR:$PATH" CONF_DIR="$TMP_DIR/conf" mkdir -p "$CONF_DIR/service" -cat >"$CONF_DIR/service/prole.cfg" <"$CONF_DIR/service/knoe.cfg" <}'" >&2 +if [[ "${KNOE_MODE:-}" != "k3s" ]]; then + echo "FAILURE: Expected KNOE_MODE to be overridden to 'k3s' from knoe.cfg; got '${KNOE_MODE:-}'" >&2 exit 1 fi diff --git a/tests/etc/test_prole_cfg_bootstrap_env_layout.sh b/tests/etc/test_prole_cfg_bootstrap_env_layout.sh deleted file mode 100644 index 36d6b34..0000000 --- a/tests/etc/test_prole_cfg_bootstrap_env_layout.sh +++ /dev/null @@ -1,65 +0,0 @@ -#!/usr/bin/env bash -# Regression test: sourcing etc/prole_cfg.sh should bootstrap config layout -# and migrate a legacy regular-file prole.cfg entrypoint into the right root file. - -set -euo pipefail - -SCRIPT_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) -PROLE_REPO_ROOT=$(cd "$SCRIPT_DIR/../.." && pwd) - -TMP_DIR=$(mktemp -d) -trap 'rm -rf "$TMP_DIR"' EXIT - -TEST_HOME="$TMP_DIR/prole-home" -mkdir -p "$TEST_HOME/conf" - -cat >"$TEST_HOME/env.sh" <"$TEST_HOME/conf/prole.cfg" <<'EOF' -[Global] -DEPLOYMENT_MODE = k3d -CLUSTER_ENV = k3d-knoe-dev-cluster -NAMESPACE = knoe-db-legacy -SERVICE_NAMESPACE = default -EOF - -export PROLE_HOME="$TEST_HOME" -export PROLE_CONF="$TEST_HOME/conf" - -# Source the shared loader (this should bootstrap the config layout) -# shellcheck disable=SC1090 -source "$PROLE_REPO_ROOT/etc/prole_cfg.sh" - -if [[ ! -f "$PROLE_CONF/k3d.cfg" ]]; then - echo "FAILURE: expected $PROLE_CONF/k3d.cfg to exist" >&2 - exit 1 -fi - -if ! grep -q "NAMESPACE = knoe-db-legacy" "$PROLE_CONF/k3d.cfg"; then - echo "FAILURE: expected migrated k3d base to contain legacy content" >&2 - echo "--- k3d.cfg ---" >&2 - cat "$PROLE_CONF/k3d.cfg" >&2 || true - exit 1 -fi - -if ! ls "$PROLE_CONF"/prole.cfg.legacy.* >/dev/null 2>&1; then - echo "FAILURE: expected legacy backup prole.cfg.legacy.* to be created" >&2 - ls -la "$PROLE_CONF" >&2 || true - exit 1 -fi - -for env in dev service prod test; do - if [[ ! -d "$PROLE_CONF/$env" ]]; then - echo "FAILURE: expected env dir to exist: $PROLE_CONF/$env" >&2 - exit 1 - fi -done - -echo "SUCCESS" diff --git a/tests/etc/test_render_manifest.sh b/tests/etc/test_render_manifest.sh index 51517cd..6a6785c 100644 --- a/tests/etc/test_render_manifest.sh +++ b/tests/etc/test_render_manifest.sh @@ -2,8 +2,8 @@ # Unit test for etc/render_manifest.py SCRIPT_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) -PROLE_HOME=$(cd "$SCRIPT_DIR/../.." && pwd) -ETC_DIR="$PROLE_HOME/etc" +KNOE_HOME=$(cd "$SCRIPT_DIR/../.." && pwd) +ETC_DIR="$KNOE_HOME/etc" SCRIPT_UNDER_TEST="$ETC_DIR/render_manifest.py" TMP_DIR=$(mktemp -d) @@ -30,20 +30,20 @@ mock_tool terraform mock_tool ollama mock_tool jq -# Mock prole.cfg +# Mock knoe.cfg mkdir -p "$TMP_DIR/conf" -cat < "$TMP_DIR/conf/prole.cfg" +cat < "$TMP_DIR/conf/knoe.cfg" [globals] -prole.home = $PROLE_HOME -prole.mode = k3d +knoe.home = $KNOE_HOME +knoe.mode = k3d [k3s] server = https://localhost:6443 token = test-token C_EOF export PATH="$TMP_DIR:$PATH" -export PROLE_HOME="$PROLE_HOME" -export PROLE_CONF="$TMP_DIR/conf" +export KNOE_HOME="$KNOE_HOME" +export KNOE_CONF="$TMP_DIR/conf" export NAMESPACE="test-ns" export PROLE_PASSWD="test-password" diff --git a/tests/etc/test_set-k3s-token-vault.sh b/tests/etc/test_set-k3s-token-vault.sh index 7cd7bf3..4085484 100644 --- a/tests/etc/test_set-k3s-token-vault.sh +++ b/tests/etc/test_set-k3s-token-vault.sh @@ -2,8 +2,8 @@ # Unit test for etc/set-k3s-token-vault.sh SCRIPT_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) -PROLE_HOME=$(cd "$SCRIPT_DIR/../.." && pwd) -ETC_DIR="$PROLE_HOME/etc" +KNOE_HOME=$(cd "$SCRIPT_DIR/../.." && pwd) +ETC_DIR="$KNOE_HOME/etc" SCRIPT_UNDER_TEST="$ETC_DIR/set-k3s-token-vault.sh" TMP_DIR=$(mktemp -d) @@ -30,20 +30,20 @@ mock_tool terraform mock_tool ollama mock_tool jq -# Mock prole.cfg +# Mock knoe.cfg mkdir -p "$TMP_DIR/conf" -cat < "$TMP_DIR/conf/prole.cfg" +cat < "$TMP_DIR/conf/knoe.cfg" [globals] -prole.home = $PROLE_HOME -prole.mode = k3d +knoe.home = $KNOE_HOME +knoe.mode = k3d [k3s] server = https://localhost:6443 token = test-token C_EOF export PATH="$TMP_DIR:$PATH" -export PROLE_HOME="$PROLE_HOME" -export PROLE_CONF="$TMP_DIR/conf" +export KNOE_HOME="$KNOE_HOME" +export KNOE_CONF="$TMP_DIR/conf" export NAMESPACE="test-ns" export PROLE_PASSWD="test-password" diff --git a/tests/etc/test_status_common_services.sh b/tests/etc/test_status_common_services.sh index b29ea11..c248d4a 100644 --- a/tests/etc/test_status_common_services.sh +++ b/tests/etc/test_status_common_services.sh @@ -2,8 +2,8 @@ # Unit test for etc/status_common_services.sh SCRIPT_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) -PROLE_HOME=$(cd "$SCRIPT_DIR/../.." && pwd) -ETC_DIR="$PROLE_HOME/etc" +KNOE_HOME=$(cd "$SCRIPT_DIR/../.." && pwd) +ETC_DIR="$KNOE_HOME/etc" SCRIPT_UNDER_TEST="$ETC_DIR/status_common_services.sh" TMP_DIR=$(mktemp -d) @@ -30,20 +30,20 @@ mock_tool terraform mock_tool ollama mock_tool jq -# Mock prole.cfg +# Mock knoe.cfg mkdir -p "$TMP_DIR/conf" -cat < "$TMP_DIR/conf/prole.cfg" +cat < "$TMP_DIR/conf/knoe.cfg" [globals] -prole.home = $PROLE_HOME -prole.mode = k3d +knoe.home = $KNOE_HOME +knoe.mode = k3d [k3s] server = https://localhost:6443 token = test-token C_EOF export PATH="$TMP_DIR:$PATH" -export PROLE_HOME="$PROLE_HOME" -export PROLE_CONF="$TMP_DIR/conf" +export KNOE_HOME="$KNOE_HOME" +export KNOE_CONF="$TMP_DIR/conf" export NAMESPACE="test-ns" export PROLE_PASSWD="test-password" diff --git a/tests/etc/test_status_common_services_k8s_skips_opentofu.sh b/tests/etc/test_status_common_services_k8s_skips_opentofu.sh index 5d8cc99..2fd4f92 100644 --- a/tests/etc/test_status_common_services_k8s_skips_opentofu.sh +++ b/tests/etc/test_status_common_services_k8s_skips_opentofu.sh @@ -2,8 +2,8 @@ set -euo pipefail SCRIPT_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) -PROLE_HOME_REPO=$(cd "$SCRIPT_DIR/../.." && pwd) -SCRIPT_UNDER_TEST="$PROLE_HOME_REPO/etc/status_common_services.sh" +KNOE_HOME_REPO=$(cd "$SCRIPT_DIR/../.." && pwd) +SCRIPT_UNDER_TEST="$KNOE_HOME_REPO/etc/status_common_services.sh" TMP_DIR=$(mktemp -d) trap 'rm -rf "$TMP_DIR"' EXIT @@ -126,7 +126,7 @@ chmod +x "$BIN_DIR/kubectl" CFG_DIR="$TMP_DIR/conf" mkdir -p "$CFG_DIR" -cat <"$CFG_DIR/prole.cfg" +cat <"$CFG_DIR/knoe.cfg" [User] NAMESPACE = test-ns SERVICE_NAMESPACE = test-ns @@ -140,7 +140,7 @@ C_EOF export PATH="$BIN_DIR:$PATH" set +e -KONG_NAME=knoe-svc-kong bash "$SCRIPT_UNDER_TEST" -c "$CFG_DIR/prole.cfg" --mode k8s -n test-ns >"$TMP_DIR/stdout" 2>"$TMP_DIR/stderr" +KONG_NAME=knoe-svc-kong bash "$SCRIPT_UNDER_TEST" -c "$CFG_DIR/knoe.cfg" --mode k8s -n test-ns >"$TMP_DIR/stdout" 2>"$TMP_DIR/stderr" RC=$? set -e diff --git a/tests/etc/test_status_k3d_common_services_namespace.sh b/tests/etc/test_status_k3d_common_services_namespace.sh index 6b91143..95a8347 100644 --- a/tests/etc/test_status_k3d_common_services_namespace.sh +++ b/tests/etc/test_status_k3d_common_services_namespace.sh @@ -1,19 +1,19 @@ #!/usr/bin/env bash # Regression test for etc/status.sh -# - In k3d mode, it must not auto-select prole-k3s.kubeconfig via the fallback. +# - In k3d mode, it must not auto-select knoe-k3s.kubeconfig via the fallback. # - It must call status_common_services.sh using SERVICE_NAMESPACE (not DB NAMESPACE). set -euo pipefail SCRIPT_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) -PROLE_HOME_REPO=$(cd "$SCRIPT_DIR/../.." && pwd) -ETC_DIR="$PROLE_HOME_REPO/etc" +KNOE_HOME_REPO=$(cd "$SCRIPT_DIR/../.." && pwd) +ETC_DIR="$KNOE_HOME_REPO/etc" SCRIPT_UNDER_TEST="$ETC_DIR/status.sh" TMP_DIR=$(mktemp -d) trap 'rm -rf "$TMP_DIR"' EXIT export TMP_DIR -export PROLE_K3S_KUBECONFIG_PATH="$PROLE_HOME_REPO/prole-k3s.kubeconfig" +export PROLE_K3S_KUBECONFIG_PATH="$KNOE_HOME_REPO/knoe-k3s.kubeconfig" BIN_DIR="$TMP_DIR/bin" mkdir -p "$BIN_DIR" @@ -75,13 +75,13 @@ chmod +x "$BIN_DIR/kubectl" export PATH="$BIN_DIR:$PATH" -# Provide a reachable prole-k3s.kubeconfig file (fallback must NOT probe it in k3d mode) -touch "$PROLE_HOME_REPO/prole-k3s.kubeconfig" +# Provide a reachable knoe-k3s.kubeconfig file (fallback must NOT probe it in k3d mode) +touch "$KNOE_HOME_REPO/knoe-k3s.kubeconfig" CFG_DIR="$TMP_DIR/conf" mkdir -p "$CFG_DIR" -cat <"$CFG_DIR/prole.cfg" +cat <"$CFG_DIR/knoe.cfg" [User] NAMESPACE = db-ns SERVICE_NAMESPACE = svc-ns @@ -91,14 +91,14 @@ DEPLOYMENT_MODE = k3d C_EOF set +e -STATUS_CHECK_TIMEOUT=2 bash "$SCRIPT_UNDER_TEST" -c "$CFG_DIR/prole.cfg" >"$TMP_DIR/stdout" 2>"$TMP_DIR/stderr" +STATUS_CHECK_TIMEOUT=2 bash "$SCRIPT_UNDER_TEST" -c "$CFG_DIR/knoe.cfg" >"$TMP_DIR/stdout" 2>"$TMP_DIR/stderr" RC=$? set -e # We don't require rc=0; we only assert the correct calls were made. if [[ -f "$TMP_DIR/k3s_kubeconfig_probe" ]]; then - echo "FAILURE: expected status.sh not to probe prole-k3s.kubeconfig via kubectl cluster-info in k3d mode" >&2 + echo "FAILURE: expected status.sh not to probe knoe-k3s.kubeconfig via kubectl cluster-info in k3d mode" >&2 sed -n '1,200p' "$TMP_DIR/mock_calls.log" >&2 || true exit 1 fi diff --git a/tests/etc/test_supabase_patch_realtime_probe.sh b/tests/etc/test_supabase_patch_realtime_probe.sh index 578e940..429ba51 100644 --- a/tests/etc/test_supabase_patch_realtime_probe.sh +++ b/tests/etc/test_supabase_patch_realtime_probe.sh @@ -3,7 +3,7 @@ set -euo pipefail SCRIPT_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) -PROLE_HOME=$(cd "$SCRIPT_DIR/../.." && pwd) +KNOE_HOME=$(cd "$SCRIPT_DIR/../.." && pwd) TMP_DIR=$(mktemp -d) trap 'rm -rf "$TMP_DIR"' EXIT @@ -39,7 +39,7 @@ spec: periodSeconds: 30 YAML -python3 "$PROLE_HOME/supabase/patch_realtime_probe.py" "$YAML_PATH" >/dev/null +python3 "$KNOE_HOME/supabase/patch_realtime_probe.py" "$YAML_PATH" >/dev/null # Validate that the curl command is YAML-quoted. # (We avoid using `kubectl ... -o json` here because it may contact the cluster for discovery diff --git a/tests/final_comprehensive_test.sh b/tests/final_comprehensive_test.sh index 23ff35c..e52e87e 100755 --- a/tests/final_comprehensive_test.sh +++ b/tests/final_comprehensive_test.sh @@ -1,7 +1,7 @@ #!/bin/bash echo "==========================================" -echo " Prole Installer - Final Verification" +echo " Knoe Installer - Final Verification" echo "==========================================" echo "" @@ -35,22 +35,22 @@ from pathlib import Path import sys sys.path.insert(0, str(Path.cwd())) from knoe.ui.screens import get_resource_path -for img in ['img/proleIcon.png', 'img/proleLogo.png', 'img/proleLogoSepia.png']: +for img in ['img/knoeIcon.png', 'img/knoeLogo.png', 'img/knoeLogoSepia.png']: if not get_resource_path(img).exists(): sys.exit(1) " run_test "Binary executable" test -x scan/network-agent -run_test "App bundle" test -d "prole-app/dist/Prole Tools.app" +run_test "App bundle" test -d "knoe-app/dist/Knoe Tools.app" # Build system tests run_test "Spec generator" python3 scripts/generate_spec.py -run_test "Icon conversion" make build/prole.icns +run_test "Icon conversion" make build/knoe.icns # Verify spec includes everything echo -n "[$((TESTS_TOTAL + 1))] Spec includes all resources... " TESTS_TOTAL=$((TESTS_TOTAL + 1)) -if grep -q "prole-app/dist/Prole Tools.app" installer.spec && \ +if grep -q "knoe-app/dist/Knoe Tools.app" installer.spec && \ grep -q "scan/network-agent" installer.spec && \ grep -q "img.*img" installer.spec; then echo "✓" @@ -74,19 +74,19 @@ if [ $TESTS_PASSED -eq $TESTS_TOTAL ]; then echo " ✓ Automatic display detection" echo " ✓ Image resources embedded" echo " ✓ Binary executables embedded (network-agent)" - echo " ✓ App bundles embedded (Prole Tools.app)" + echo " ✓ App bundles embedded (Knoe Tools.app)" echo " ✓ Build system configured" echo "" echo "Embedded resources:" echo " • Images: ~11 MB" echo " • network-agent: 6.8 MB (universal)" - echo " • Prole Tools.app: ~12 MB" + echo " • Knoe Tools.app: ~12 MB" echo " • Expected final size: ~50-100 MB" echo "" echo "Next steps:" echo " 1. Build: make package" - echo " 2. Test: ./dist/Prole\\ Installer.app/Contents/MacOS/prole-installer" - echo " 3. Install: cp -r 'dist/Prole Installer.app' /Applications/" + echo " 2. Test: ./dist/Knoe\\ Installer.app/Contents/MacOS/knoe-installer" + echo " 3. Install: cp -r 'dist/Knoe Installer.app' /Applications/" echo "" exit 0 else diff --git a/tests/final_test.sh b/tests/final_test.sh index 0516b8e..b86d55d 100755 --- a/tests/final_test.sh +++ b/tests/final_test.sh @@ -2,7 +2,7 @@ echo "==============================================" echo " FINAL COMPREHENSIVE TEST" -echo " Prole Database Installer" +echo " Knoe Database Installer" echo "==============================================" echo "" @@ -35,14 +35,14 @@ echo "" echo "BUILD SYSTEM" test_item "Makefile" make help test_item "Spec generator" python3 scripts/generate_spec.py -test_item "Icon conversion" make build/prole.icns +test_item "Icon conversion" make build/knoe.icns # Image Resources echo "" echo "IMAGE RESOURCES" -test_item "proleIcon.png" test -f img/proleIcon.png -test_item "proleLogo.png" test -f img/proleLogo.png -test_item "proleLogoSepia.png" test -f img/proleLogoSepia.png +test_item "knoeIcon.png" test -f img/knoeIcon.png +test_item "knoeLogo.png" test -f img/knoeLogo.png +test_item "knoeLogoSepia.png" test -f img/knoeLogoSepia.png # Binary Resources echo "" @@ -53,7 +53,7 @@ test_item "network-agent executable" test -x scan/network-agent # App Bundle echo "" echo "APP BUNDLE" -test_item "Prole Tools.app exists" test -d "prole-app/dist/Prole Tools.app" +test_item "Knoe Tools.app exists" test -d "knoe-app/dist/Knoe Tools.app" # Docker Build Context echo "" @@ -68,7 +68,7 @@ python3 scripts/generate_spec.py > /dev/null 2>&1 test_item "Spec includes img" grep -q "img" installer.spec test_item "Spec includes knoe-db" grep -q "knoe-db" installer.spec test_item "Spec includes network-agent" grep -q "network-agent" installer.spec -test_item "Spec includes Prole Tools" grep -q "Prole Tools" installer.spec +test_item "Spec includes Knoe Tools" grep -q "Knoe Tools" installer.spec # Resource Path Tests echo "" @@ -78,7 +78,7 @@ from pathlib import Path import sys sys.path.insert(0, str(Path.cwd())) from install import get_resource_path -assert get_resource_path('img/proleIcon.png').exists() +assert get_resource_path('img/knoeIcon.png').exists() " test_item "Binary paths work" python3 -c " from pathlib import Path @@ -114,14 +114,14 @@ if [ $TESTS_PASSED -eq $TESTS_TOTAL ]; then echo " ✓ Static universal binary build system" echo " ✓ Image resources embedded" echo " ✓ network-agent binary embedded" - echo " ✓ Prole Tools.app embedded" + echo " ✓ Knoe Tools.app embedded" echo " ✓ Docker build context embedded" - echo " ✓ Docker build uses ~/.prole/build (writable)" + echo " ✓ Docker build uses ~/.knoe/build (writable)" echo "" echo "PACKAGE WILL INCLUDE:" echo " • Images (~11 MB)" echo " • network-agent (6.8 MB)" - echo " • Prole Tools.app (~12 MB)" + echo " • Knoe Tools.app (~12 MB)" echo " • knoe-db build context (~1-5 MB)" echo " • Python runtime + deps (~30-50 MB)" echo " • Total: ~50-100 MB" diff --git a/tests/fixtures/test-knoe.cfg b/tests/fixtures/test-knoe.cfg new file mode 100644 index 0000000..66de73e --- /dev/null +++ b/tests/fixtures/test-knoe.cfg @@ -0,0 +1,30 @@ +; Knoe Master Configuration File (test fixture) + +[Inputs] +init_cluster.cluster_env = k3d-knoe-dev-cluster +init_cluster.deployment_target = knoe-dev-cluster +init_cluster.k3s_server_url = https://example.knoe.org:6443 +init_cluster.k3s_token = TEST_K3S_TOKEN +init_cluster.kerberos_enabled = false +init_cluster.start_cluster = true +init_cluster.supabase_enabled = false +init_db_build.run_build = false +init_scripts.run_scripts = false +network_scan.run = false +env_setup.NAMESPACE = knoe-test +env_setup.KNOE_CONF = /tmp/knoe/conf +env_setup.PROLE_DATA = /tmp/knoe/data +env_setup.KNOE_HOME = /tmp/knoe +env_setup.PROLE_LOGS = /tmp/knoe/logs +env_setup.KNOE_SERVICE = /tmp/knoe/etc + +[Global] +CLUSTER_ENV = k3d-knoe-dev-cluster +DEPLOYMENT_MODE = k3d +DEPLOYMENT_TARGET = knoe-dev-cluster +NAMESPACE = knoe-test +SERVICE_NAMESPACE = default +KNOE_HOME = /tmp/knoe +PROLE_K3S_SERVER = https://example.knoe.org:6443 +PROLE_K3S_TOKEN = TEST_K3S_TOKEN +PROLE_OPENTOFU_URL = http://127.0.0.1:8080 diff --git a/tests/fixtures/test-prole.cfg b/tests/fixtures/test-prole.cfg deleted file mode 100644 index 12d9347..0000000 --- a/tests/fixtures/test-prole.cfg +++ /dev/null @@ -1,30 +0,0 @@ -; Prole Master Configuration File (test fixture) - -[Inputs] -init_cluster.cluster_env = k3d-prole-dev-cluster -init_cluster.deployment_target = prole-dev-cluster -init_cluster.k3s_server_url = https://example.prole.org:6443 -init_cluster.k3s_token = TEST_K3S_TOKEN -init_cluster.kerberos_enabled = false -init_cluster.start_cluster = true -init_cluster.supabase_enabled = false -init_db_build.run_build = false -init_scripts.run_scripts = false -network_scan.run = false -env_setup.NAMESPACE = prole-test -env_setup.PROLE_CONF = /tmp/prole/conf -env_setup.PROLE_DATA = /tmp/prole/data -env_setup.PROLE_HOME = /tmp/prole -env_setup.PROLE_LOGS = /tmp/prole/logs -env_setup.PROLE_SERVICE = /tmp/prole/etc - -[Global] -CLUSTER_ENV = k3d-prole-dev-cluster -DEPLOYMENT_MODE = k3d -DEPLOYMENT_TARGET = prole-dev-cluster -NAMESPACE = prole-test -SERVICE_NAMESPACE = default -PROLE_HOME = /tmp/prole -PROLE_K3S_SERVER = https://example.prole.org:6443 -PROLE_K3S_TOKEN = TEST_K3S_TOKEN -PROLE_OPENTOFU_URL = http://127.0.0.1:8080 diff --git a/tests/installer/test_actions_env_setup_expands_shell_vars.py b/tests/installer/test_actions_env_setup_expands_shell_vars.py index ef98724..654756e 100644 --- a/tests/installer/test_actions_env_setup_expands_shell_vars.py +++ b/tests/installer/test_actions_env_setup_expands_shell_vars.py @@ -4,7 +4,7 @@ from pathlib import Path def test_actions_save_env_to_file_expands_shell_vars(monkeypatch, tmp_path: Path): - """Regression: core env setup must expand `$HOME`/`$PROLE_HOME` for filesystem ops. + """Regression: core env setup must expand `$HOME`/`$KNOE_HOME` for filesystem ops. This complements the Environment UI regression test by covering the non-UI installer/actions code paths that can run during status checks. @@ -38,15 +38,15 @@ def test_actions_save_env_to_file_expands_shell_vars(monkeypatch, tmp_path: Path dummy = Dummy(proj) values = { - "PROLE_HOME": "$HOME/prole", - "PROLE_CONF": "$PROLE_HOME/conf", - "PROLE_DATA": "$PROLE_HOME/data", - "PROLE_LOGS": "$PROLE_HOME/logs", - "PROLE_SERVICE": "$PROLE_HOME/etc", + "KNOE_HOME": "$HOME/knoe", + "KNOE_CONF": "$KNOE_HOME/conf", + "PROLE_DATA": "$KNOE_HOME/data", + "PROLE_LOGS": "$KNOE_HOME/logs", + "KNOE_SERVICE": "$KNOE_HOME/etc", } dummy._save_env_to_file(values) - expected_home = home_dir / "prole" + expected_home = home_dir / "knoe" assert expected_home.is_dir() assert (expected_home / "conf").is_dir() assert (expected_home / "data").is_dir() @@ -55,6 +55,6 @@ def test_actions_save_env_to_file_expands_shell_vars(monkeypatch, tmp_path: Path assert (expected_home / "env.sh").is_file() assert (expected_home / "init-port-forward.sh").is_file() - # Critical assertions: we must NOT create literal `$HOME`/`$PROLE_HOME` dirs in CWD. + # Critical assertions: we must NOT create literal `$HOME`/`$KNOE_HOME` dirs in CWD. assert not (tmp_path / "$HOME").exists() - assert not (tmp_path / "$PROLE_HOME").exists() + assert not (tmp_path / "$KNOE_HOME").exists() diff --git a/tests/installer/test_actions_helpers.py b/tests/installer/test_actions_helpers.py index 3972bcc..4d7bfb9 100644 --- a/tests/installer/test_actions_helpers.py +++ b/tests/installer/test_actions_helpers.py @@ -1,4 +1,4 @@ -"""Tests for installer/core/actions.py – ProleInstallerBase helper methods.""" +"""Tests for installer/core/actions.py – KnoeInstallerBase helper methods.""" from __future__ import annotations @@ -27,7 +27,7 @@ class _TestableInstaller(KnoeInstaller): def __init__(self, inputs=None, project_root=None): self._inputs = inputs or {} - self.project_root = project_root or Path("/tmp/fake-prole") + self.project_root = project_root or Path("/tmp/fake-knoe") self.controller = MagicMock() self._init_shared_state() @@ -125,7 +125,7 @@ class TestInitSharedState: "Install", ] for section in expected_sections: - assert section in inst.prole_cfg_data + assert section in inst.knoe_cfg_data def test_initial_flags(self): inst = _TestableInstaller() @@ -216,7 +216,7 @@ class TestSecretNamespace: def test_from_cfg_data(self): inst = _TestableInstaller() - inst.prole_cfg_data["Global"]["NAMESPACE"] = "cfg-ns" + inst.knoe_cfg_data["Global"]["NAMESPACE"] = "cfg-ns" assert inst._secret_namespace() == "cfg-ns" def test_default(self): @@ -245,7 +245,7 @@ class TestSecretNamespace: class TestServiceNamespace: def test_from_cfg_data(self): inst = _TestableInstaller() - inst.prole_cfg_data["Global"]["SERVICE_NAMESPACE"] = "svc-ns" + inst.knoe_cfg_data["Global"]["SERVICE_NAMESPACE"] = "svc-ns" assert inst._service_namespace() == "svc-ns" def test_from_env_var(self): @@ -267,7 +267,7 @@ class TestServiceNamespace: class TestCollectDependentImages: def test_filters_supabase_when_disabled(self, tmp_path): - base = tmp_path / "k8s" / "prole" + base = tmp_path / "k8s" / "knoe" base.mkdir(parents=True) f = base / "test.yaml" f.write_text( @@ -293,7 +293,7 @@ spec: assert all("supabase" not in img for img in images) def test_includes_supabase_and_kerberos_when_enabled(self, tmp_path): - base = tmp_path / "k8s" / "prole" + base = tmp_path / "k8s" / "knoe" base.mkdir(parents=True) f = base / "test.yaml" f.write_text( @@ -333,7 +333,7 @@ class _TestableSilentInstaller(KnoeConsoleInstaller): def __init__(self, inputs=None, project_root=None): self._inputs_dict = inputs or {} - self.project_root = project_root or Path("/tmp/fake-prole") + self.project_root = project_root or Path("/tmp/fake-knoe") self.controller = MagicMock() self.cfg_path = None self.silent = True @@ -346,7 +346,7 @@ class _TestableSilentInstaller(KnoeConsoleInstaller): class TestNamespaceHelpers: def test_argocd_from_cfg(self): inst = _TestableSilentInstaller() - inst.prole_cfg_data["Global"]["ARGOCD_NAMESPACE"] = "argo-ns" + inst.knoe_cfg_data["Global"]["ARGOCD_NAMESPACE"] = "argo-ns" assert inst._argocd_namespace() == "argo-ns" def test_argocd_from_env(self): @@ -362,7 +362,7 @@ class TestNamespaceHelpers: def test_registry_from_cfg(self): inst = _TestableSilentInstaller() - inst.prole_cfg_data["Global"]["REGISTRY_NAMESPACE"] = "reg-ns" + inst.knoe_cfg_data["Global"]["REGISTRY_NAMESPACE"] = "reg-ns" assert inst._registry_namespace() == "reg-ns" def test_registry_from_env(self): @@ -387,9 +387,9 @@ class TestNamespaceHelpers: class TestK3sRegistryDefaults: def test_ensure_registry_defaults_k3s_overrides_localhost(self): inst = _TestableSilentInstaller(inputs={"init_cluster.cluster_env": "service"}) - inst.prole_cfg_data.setdefault("Docker Build", {}) - inst.prole_cfg_data["Docker Build"]["LOCAL_REGISTRY"] = "localhost:5000" - inst.prole_cfg_data["Docker Build"].pop("LOCAL_REGISTRY_INTERNAL", None) + inst.knoe_cfg_data.setdefault("Docker Build", {}) + inst.knoe_cfg_data["Docker Build"]["LOCAL_REGISTRY"] = "localhost:5000" + inst.knoe_cfg_data["Docker Build"].pop("LOCAL_REGISTRY_INTERNAL", None) with mock.patch.dict( os.environ, @@ -398,17 +398,17 @@ class TestK3sRegistryDefaults: ): inst._ensure_registry_defaults("service") - assert inst.prole_cfg_data["Docker Build"]["LOCAL_REGISTRY"] == "k3s.example.test:5000" + assert inst.knoe_cfg_data["Docker Build"]["LOCAL_REGISTRY"] == "k3s.example.test:5000" assert ( - inst.prole_cfg_data["Docker Build"]["LOCAL_REGISTRY_INTERNAL"] + inst.knoe_cfg_data["Docker Build"]["LOCAL_REGISTRY_INTERNAL"] == "registry.knoe-system.svc.cluster.local:5000" ) def test_db_build_k3s_push_failure_marks_failed(self): inst = _TestableSilentInstaller(inputs={"init_cluster.cluster_env": "service"}) - inst.prole_cfg_data.setdefault("Docker Build", {}) - inst.prole_cfg_data["Docker Build"].pop("LOCAL_REGISTRY", None) - inst.prole_cfg_data["Docker Build"].pop("LOCAL_REGISTRY_INTERNAL", None) + inst.knoe_cfg_data.setdefault("Docker Build", {}) + inst.knoe_cfg_data["Docker Build"].pop("LOCAL_REGISTRY", None) + inst.knoe_cfg_data["Docker Build"].pop("LOCAL_REGISTRY_INTERNAL", None) inst.controller.get_knoe_db_version.return_value = "latest" def fake_run(cmd, *args, **kwargs): @@ -431,7 +431,7 @@ class TestK3sRegistryDefaults: inst._step_db_build() assert inst._db_built_success is False - assert inst.prole_cfg_data["Docker Build"]["STATUS"] == "Failed" + assert inst.knoe_cfg_data["Docker Build"]["STATUS"] == "Failed" # --------------------------------------------------------------------------- @@ -445,13 +445,13 @@ class TestEnvPortability: ): # Simulate a shared/synced HOME that contains an env.sh written on macOS. fake_home = tmp_path / "testuser" - (fake_home / ".prole").mkdir(parents=True) - (fake_home / ".prole" / "env.sh").write_text( + (fake_home / ".knoe").mkdir(parents=True) + (fake_home / ".knoe" / "env.sh").write_text( '\n'.join( [ - 'export PROLE_HOME="/Users/testuser/dev/prole"', - 'export PROLE_CONF="/Users/testuser/dev/prole/conf"', - 'export PROLE_DATA="/Users/testuser/.prole/data"', + 'export KNOE_HOME="/Users/testuser/dev/knoe"', + 'export KNOE_CONF="/Users/testuser/dev/knoe/conf"', + 'export PROLE_DATA="/Users/testuser/.knoe/data"', "", ] ) @@ -463,41 +463,41 @@ class TestEnvPortability: monkeypatch.setattr("knoe.core.actions.Path.home", lambda: fake_home) with mock.patch.dict(os.environ, {}, clear=False): - os.environ.pop("PROLE_HOME", None) - os.environ.pop("PROLE_CONF", None) + os.environ.pop("KNOE_HOME", None) + os.environ.pop("KNOE_CONF", None) os.environ.pop("PROLE_DATA", None) env = inst._env_defaults(namespace="knoe-db") - assert env["PROLE_HOME"] == str(fake_home / "dev" / "prole") - assert env["PROLE_CONF"] == str(fake_home / "dev" / "prole" / "conf") - assert env["PROLE_DATA"] == str(fake_home / ".prole" / "data") + assert env["KNOE_HOME"] == str(fake_home / "dev" / "knoe") + assert env["KNOE_CONF"] == str(fake_home / "dev" / "knoe" / "conf") + assert env["PROLE_DATA"] == str(fake_home / ".knoe" / "data") def test_save_env_to_file_uses_home_var_not_absolute_home(self, tmp_path, monkeypatch): fake_home = tmp_path / "testuser" - prole_home = fake_home / "dev" / "prole" - (prole_home / "conf").mkdir(parents=True) - (prole_home / "etc").mkdir(parents=True) + knoe_home = fake_home / "dev" / "knoe" + (knoe_home / "conf").mkdir(parents=True) + (knoe_home / "etc").mkdir(parents=True) inst = _TestableInstaller(project_root=tmp_path) monkeypatch.setattr("knoe.core.actions.Path.home", lambda: fake_home) values = { - "PROLE_HOME": str(prole_home), - "PROLE_CONF": str(prole_home / "conf"), - "PROLE_DATA": str(fake_home / ".prole" / "data"), - "PROLE_LOGS": "/opt/prole/logs/chrisfu", - "PROLE_SERVICE": str(prole_home / "etc"), + "KNOE_HOME": str(knoe_home), + "KNOE_CONF": str(knoe_home / "conf"), + "PROLE_DATA": str(fake_home / ".knoe" / "data"), + "PROLE_LOGS": "/opt/knoe/logs/chrisfu", + "KNOE_SERVICE": str(knoe_home / "etc"), } inst._save_env_to_file(values) - env_sh = (prole_home / "env.sh").read_text() - assert 'export PROLE_HOME="$HOME/dev/prole"' in env_sh + env_sh = (knoe_home / "env.sh").read_text() + assert 'export KNOE_HOME="$HOME/dev/knoe"' in env_sh assert str(fake_home) not in env_sh # --------------------------------------------------------------------------- -# prole.cfg path variable handling +# knoe.cfg path variable handling # --------------------------------------------------------------------------- @@ -505,9 +505,9 @@ class TestCfgPathVariables: def test_apply_inputs_keeps_cfg_path_variables_literal(self): inst = _TestableSilentInstaller() loaded = { - "env_setup.PROLE_HOME": "$HOME/dev/prole", - "env_setup.PROLE_CONF": "$HOME/dev/prole/conf", - "env_setup.PROLE_DATA": "$HOME/.prole/data", + "env_setup.KNOE_HOME": "$HOME/dev/knoe", + "env_setup.KNOE_CONF": "$HOME/dev/knoe/conf", + "env_setup.PROLE_DATA": "$HOME/.knoe/data", } with ( @@ -516,21 +516,21 @@ class TestCfgPathVariables: ): inst._apply_inputs() - assert inst.inputs["env_setup.PROLE_HOME"] == "$HOME/dev/prole" - assert inst.inputs["env_setup.PROLE_CONF"] == "$HOME/dev/prole/conf" - assert inst.inputs["env_setup.PROLE_DATA"] == "$HOME/.prole/data" + assert inst.inputs["env_setup.KNOE_HOME"] == "$HOME/dev/knoe" + assert inst.inputs["env_setup.KNOE_CONF"] == "$HOME/dev/knoe/conf" + assert inst.inputs["env_setup.PROLE_DATA"] == "$HOME/.knoe/data" def test_load_inputs_from_cfg_keeps_legacy_system_environment_shell_vars(self, tmp_path): import configparser cfg_dir = tmp_path / "dev" cfg_dir.mkdir(parents=True, exist_ok=True) - cfg_path = cfg_dir / "prole.cfg" + cfg_path = cfg_dir / "knoe.cfg" cfg = configparser.ConfigParser(interpolation=None) cfg.optionxform = str cfg.add_section("System Environment") - cfg.set("System Environment", "PROLE_HOME", "$HOME/dev/prole") - cfg.set("System Environment", "PROLE_CONF", "$HOME/dev/prole/conf") + cfg.set("System Environment", "KNOE_HOME", "$HOME/dev/knoe") + cfg.set("System Environment", "KNOE_CONF", "$HOME/dev/knoe/conf") with open(cfg_path, "w") as f: cfg.write(f) @@ -539,8 +539,8 @@ class TestCfgPathVariables: loaded = inst._load_inputs_from_cfg() - assert loaded["env_setup.PROLE_HOME"] == "$HOME/dev/prole" - assert loaded["env_setup.PROLE_CONF"] == "$HOME/dev/prole/conf" + assert loaded["env_setup.KNOE_HOME"] == "$HOME/dev/knoe" + assert loaded["env_setup.KNOE_CONF"] == "$HOME/dev/knoe/conf" def test_load_inputs_from_cfg_backfills_auth_oidc_refs_from_global_when_inputs_missing( self, tmp_path @@ -632,15 +632,15 @@ class TestCfgPathVariables: assert defaults["auth.clientId"] == "secretref://google-oidc-client-id" assert defaults["auth.clientSecret"] == "secretref://google-oidc-client-secret" - def test_write_cfg_normalizes_global_prole_home_to_home_var(self, tmp_path, monkeypatch): + def test_write_cfg_normalizes_global_knoe_home_to_home_var(self, tmp_path, monkeypatch): fake_home = tmp_path / "testuser" - project_root = fake_home / "dev" / "prole" + project_root = fake_home / "dev" / "knoe" project_root.mkdir(parents=True, exist_ok=True) - cfg_path = tmp_path / "prole.cfg" + cfg_path = tmp_path / "knoe.cfg" inst = _TestableSilentInstaller( inputs={ - "env_setup.PROLE_HOME": str(project_root), + "env_setup.KNOE_HOME": str(project_root), "init_cluster.cluster_env": "prod", }, project_root=project_root, @@ -654,7 +654,7 @@ class TestCfgPathVariables: inst._write_cfg() cfg_text = cfg_path.read_text() - assert "PROLE_HOME = $HOME/dev/prole" in cfg_text + assert "KNOE_HOME = $HOME/dev/knoe" in cfg_text assert str(project_root) not in cfg_text @@ -682,7 +682,7 @@ class TestReadK3sCfgValues: cfg.add_section("Initialize Cluster") cfg.set("Initialize Cluster", "K3S_SERVER_URL", "https://10.0.0.1:6443") cfg.set("Initialize Cluster", "K3S_TOKEN", "mytoken") - cfg_path = tmp_path / "prole.cfg" + cfg_path = tmp_path / "knoe.cfg" with open(cfg_path, "w") as f: cfg.write(f) inst = _TestableInstaller() @@ -713,12 +713,12 @@ class TestScriptEnvForNamespace: def test_exports_cnpg_planner_rendered_env_for_shell_consumption(self, tmp_path): inst = _TestableInstaller( inputs={ - "env_setup.PROLE_CONF": str(tmp_path / "conf"), + "env_setup.KNOE_CONF": str(tmp_path / "conf"), "init_password.db_namespace": "knoe-system", }, project_root=tmp_path, ) - inst.prole_cfg_data.setdefault("Global", {})["CNPG_ELIGIBLE_NODES"] = "db-b,db-a" + inst.knoe_cfg_data.setdefault("Global", {})["CNPG_ELIGIBLE_NODES"] = "db-b,db-a" env = inst._script_env_for_namespace("knoe-system") plan_file = Path(env.get("CNPG_PLACEMENT_PLAN_FILE", "")) @@ -730,11 +730,11 @@ class TestScriptEnvForNamespace: assert env.get("CNPG_INSTANCES") == "3" def test_resolves_db_kubecontext_from_selected_gke_context(self): - inst = _TestableInstaller(inputs={"init_cluster.cluster_env": "prole-prod-cluster"}) - inst.prole_cfg_data.setdefault("Global", {})["KUBECONTEXT"] = ( + inst = _TestableInstaller(inputs={"init_cluster.cluster_env": "knoe-prod-cluster"}) + inst.knoe_cfg_data.setdefault("Global", {})["KUBECONTEXT"] = ( "gke_plenary-truck-485623-p7_us-west3_knoe-dev-0" ) - inst.prole_cfg_data.setdefault("Global", {})["DB_CLUSTER_NAME"] = "knoe-cnpg-0" + inst.knoe_cfg_data.setdefault("Global", {})["DB_CLUSTER_NAME"] = "knoe-cnpg-0" env = inst._script_env_for_namespace("knoe-db-0", cluster_role="db") @@ -757,13 +757,13 @@ class TestEnsureDbK8sSecrets: fake_home = tmp_path / "home" ssh_dir = fake_home / ".ssh" ssh_dir.mkdir(parents=True) - (ssh_dir / "id_prole_ed25519").write_text("PRIVATE") - (ssh_dir / "id_prole_ed25519.pub").write_text("PUBLIC") + (ssh_dir / "id_knoe_ed25519").write_text("PRIVATE") + (ssh_dir / "id_knoe_ed25519.pub").write_text("PUBLIC") monkeypatch.setattr(Path, "home", classmethod(lambda cls: fake_home)) service_dir = tmp_path / "etc" - inst = _TestableInstaller(inputs={"env_setup.PROLE_SERVICE": str(service_dir)}) + inst = _TestableInstaller(inputs={"env_setup.KNOE_SERVICE": str(service_dir)}) calls: list[list[str]] = [] logs: list[str] = [] @@ -811,7 +811,7 @@ class TestEnsureDbK8sSecrets: # Ensure DB user/superuser secrets were rendered with expected usernames rendered_cmds = [c for c in calls if c[:4] == ["kubectl", "create", "secret", "generic"]] assert any( - c[4] == "knoe-db-user" and any(a == "--from-literal=username=prole" for a in c) and any( + c[4] == "knoe-db-user" and any(a == "--from-literal=username=knoe" for a in c) and any( a == f"--from-literal=password={pw}" for a in c ) for c in rendered_cmds @@ -829,12 +829,12 @@ class TestEnsureDbK8sSecrets: fake_home = tmp_path / "home" ssh_dir = fake_home / ".ssh" ssh_dir.mkdir(parents=True) - (ssh_dir / "id_prole_ed25519").write_text("PRIVATE") - (ssh_dir / "id_prole_ed25519.pub").write_text("PUBLIC") + (ssh_dir / "id_knoe_ed25519").write_text("PRIVATE") + (ssh_dir / "id_knoe_ed25519.pub").write_text("PUBLIC") monkeypatch.setattr(Path, "home", classmethod(lambda cls: fake_home)) service_dir = tmp_path / "etc" - inst = _TestableInstaller(inputs={"env_setup.PROLE_SERVICE": str(service_dir)}) + inst = _TestableInstaller(inputs={"env_setup.KNOE_SERVICE": str(service_dir)}) calls: list[list[str]] = [] ns = "knoe-db" @@ -938,7 +938,7 @@ class TestStepInitScripts: assert "init_certmgr.sh" in scripts # CNPG shell script must NOT be dispatched assert "init_cloudnative_pg.sh" not in scripts - assert inst.prole_cfg_data["Initialization Scripts"]["STATUS"] == "Completed" + assert inst.knoe_cfg_data["Initialization Scripts"]["STATUS"] == "Completed" assert inst._scripts_success is True def test_verifies_critical_secrets_with_db_env(self, monkeypatch): @@ -1008,7 +1008,7 @@ class TestStepCnpgDeploy: "init_password.db_namespace": "knoe-db", } ) - inst.prole_cfg_data.setdefault("Deployment", {}) + inst.knoe_cfg_data.setdefault("Deployment", {}) env = {"CNPG_CLUSTER_NAME": "cluster-a"} monkeypatch.setattr( @@ -1031,7 +1031,7 @@ class TestStepCnpgDeploy: assert calls["deploy"] == 1 assert inst._cnpg_success is True - assert inst.prole_cfg_data["Deployment"]["STATUS"] == "Deployed" + assert inst.knoe_cfg_data["Deployment"]["STATUS"] == "Deployed" def test_stops_deploy_on_storage_provision_failure(self, monkeypatch): inst = _TestableSilentInstaller( @@ -1041,7 +1041,7 @@ class TestStepCnpgDeploy: "init_password.db_namespace": "knoe-db", } ) - inst.prole_cfg_data.setdefault("Deployment", {}) + inst.knoe_cfg_data.setdefault("Deployment", {}) monkeypatch.setattr( inst, @@ -1060,7 +1060,7 @@ class TestStepCnpgDeploy: run_mock.assert_not_called() assert inst._cnpg_success is False - assert inst.prole_cfg_data["Deployment"]["STATUS"] == "Attempted" + assert inst.knoe_cfg_data["Deployment"]["STATUS"] == "Attempted" # --------------------------------------------------------------------------- @@ -1077,12 +1077,12 @@ class TestPrepareOpenTofuPipeline: "init_cluster.cluster_env": "dev", "init_cluster.mode": "k3d", "init_password.db_namespace": "test-ns", - "init_cluster.k3s_server_url": "myrddin.prole.org:6443", + "init_cluster.k3s_server_url": "myrddin.knoe.org:6443", "init_cluster.k3s_token": "dummy", }, project_root=tmp_path, ) - inst.prole_cfg_data.setdefault("Deployment", {}) + inst.knoe_cfg_data.setdefault("Deployment", {}) expected_dir = tmp_path / "deploy" / "opentofu" / "k3s" called = {"count": 0} @@ -1100,7 +1100,7 @@ class TestPrepareOpenTofuPipeline: inst._prepare_opentofu_pipeline() assert called["count"] == 1 - assert inst.prole_cfg_data["Deployment"]["OPENTOFU_PIPELINE_DIR"] == str( + assert inst.knoe_cfg_data["Deployment"]["OPENTOFU_PIPELINE_DIR"] == str( expected_dir ) @@ -1124,7 +1124,7 @@ class TestStepDependencies: ok = inst._step_dependencies() assert ok is False - assert inst.prole_cfg_data["Dependencies"]["STATUS"] == "Missing" + assert inst.knoe_cfg_data["Dependencies"]["STATUS"] == "Missing" def test_ensure_gcloud_auth_for_k8s_non_interactive_failure(self, monkeypatch): import knoe.core.actions as actions_mod diff --git a/tests/installer/test_cfg_save_kubecontext.py b/tests/installer/test_cfg_save_kubecontext.py index 8b258c1..0d2213c 100644 --- a/tests/installer/test_cfg_save_kubecontext.py +++ b/tests/installer/test_cfg_save_kubecontext.py @@ -28,11 +28,11 @@ class _DummyCfgApp(ConfigMixin): existing_global: dict | None = None, ): self._conf_dir = conf_dir - self._cfg_path_override = conf_dir / "prole.cfg" + self._cfg_path_override = conf_dir / "knoe.cfg" self._mode = mode self._resolved_service_namespace = resolved_service_namespace - # Minimal surface required by ConfigMixin._save_prole_cfg + # Minimal surface required by ConfigMixin._save_knoe_cfg self.cluster_env = _Var(cluster_env) self.selected_kubectx = _Var(kubectx) self.db_username = _Var("knoe-db") @@ -46,7 +46,7 @@ class _DummyCfgApp(ConfigMixin): self.service_namespace = _Var(service_namespace_input) - self.prole_cfg_data = { + self.knoe_cfg_data = { "Global": dict(existing_global or {}), "Initialize Cluster": {}, "Dev Cluster (k3d)": {}, @@ -54,7 +54,7 @@ class _DummyCfgApp(ConfigMixin): "Prod Cluster (k8s)": {}, } - def _resolve_prole_conf_dir(self) -> Path: + def _resolve_knoe_conf_dir(self) -> Path: return self._conf_dir def _deployment_mode(self) -> str: @@ -66,7 +66,7 @@ class _DummyCfgApp(ConfigMixin): def _secret_cfg_value(self, _section: str, _key: str, value: str, *_args) -> str: return value - def _save_ansible_prole_vault(self, _db_password: str): + def _save_ansible_knoe_vault(self, _db_password: str): return None def _sanitize_sections_for_cfg(self, sections: dict) -> dict: @@ -80,26 +80,26 @@ class _DummyCfgApp(ConfigMixin): return {} -def test_save_prole_cfg_persists_kubecontext(tmp_path, monkeypatch): +def test_save_knoe_cfg_persists_kubecontext(tmp_path, monkeypatch): # Avoid touching real env activation during unit test. import knoe.ui.screens.cfg as cfg_mod - monkeypatch.setattr(cfg_mod.prole_conf, "activate_environment", lambda *_a, **_k: None) + monkeypatch.setattr(cfg_mod.knoe_conf, "activate_environment", lambda *_a, **_k: None) app = _DummyCfgApp(conf_dir=tmp_path, kubectx="k3d-knoe-system") - app._save_prole_cfg() + app._save_knoe_cfg() - text = (tmp_path / "prole.cfg").read_text(encoding="utf-8") + text = (tmp_path / "knoe.cfg").read_text(encoding="utf-8") assert "KUBECONTEXT" in text assert "k3d-knoe-system" in text -def test_save_prole_cfg_service_mode_drops_generated_localhost_values( +def test_save_knoe_cfg_service_mode_drops_generated_localhost_values( tmp_path, monkeypatch ): import knoe.ui.screens.cfg as cfg_mod - monkeypatch.setattr(cfg_mod.prole_conf, "activate_environment", lambda *_a, **_k: None) + monkeypatch.setattr(cfg_mod.knoe_conf, "activate_environment", lambda *_a, **_k: None) app = _DummyCfgApp( conf_dir=tmp_path, @@ -114,21 +114,21 @@ def test_save_prole_cfg_service_mode_drops_generated_localhost_values( "PROLE_OPENTOFU_URL": "http://127.0.0.1:8080", }, ) - app._save_prole_cfg() + app._save_knoe_cfg() - text = (tmp_path / "prole.cfg").read_text(encoding="utf-8") + text = (tmp_path / "knoe.cfg").read_text(encoding="utf-8") assert "SERVICE_HOSTNAME" not in text assert "API_SERVICE_ENDPOINT" not in text assert "localhost" not in text assert "SERVICE_NAMESPACE" not in text -def test_save_prole_cfg_service_mode_keeps_explicit_service_namespace( +def test_save_knoe_cfg_service_mode_keeps_explicit_service_namespace( tmp_path, monkeypatch ): import knoe.ui.screens.cfg as cfg_mod - monkeypatch.setattr(cfg_mod.prole_conf, "activate_environment", lambda *_a, **_k: None) + monkeypatch.setattr(cfg_mod.knoe_conf, "activate_environment", lambda *_a, **_k: None) app = _DummyCfgApp( conf_dir=tmp_path, @@ -138,16 +138,16 @@ def test_save_prole_cfg_service_mode_keeps_explicit_service_namespace( service_namespace_input="explicit-ns", resolved_service_namespace="explicit-ns", ) - app._save_prole_cfg() + app._save_knoe_cfg() - text = (tmp_path / "prole.cfg").read_text(encoding="utf-8") + text = (tmp_path / "knoe.cfg").read_text(encoding="utf-8") assert "SERVICE_NAMESPACE = explicit-ns" in text -def test_save_prole_cfg_service_mode_repeated_saves_remain_clean(tmp_path, monkeypatch): +def test_save_knoe_cfg_service_mode_repeated_saves_remain_clean(tmp_path, monkeypatch): import knoe.ui.screens.cfg as cfg_mod - monkeypatch.setattr(cfg_mod.prole_conf, "activate_environment", lambda *_a, **_k: None) + monkeypatch.setattr(cfg_mod.knoe_conf, "activate_environment", lambda *_a, **_k: None) app = _DummyCfgApp( conf_dir=tmp_path, @@ -162,10 +162,10 @@ def test_save_prole_cfg_service_mode_repeated_saves_remain_clean(tmp_path, monke }, ) - app._save_prole_cfg() - first = (tmp_path / "prole.cfg").read_text(encoding="utf-8") - app._save_prole_cfg() - second = (tmp_path / "prole.cfg").read_text(encoding="utf-8") + app._save_knoe_cfg() + first = (tmp_path / "knoe.cfg").read_text(encoding="utf-8") + app._save_knoe_cfg() + second = (tmp_path / "knoe.cfg").read_text(encoding="utf-8") for text in (first, second): assert "SERVICE_HOSTNAME" not in text diff --git a/tests/installer/test_cleanup_cnpg_storage.py b/tests/installer/test_cleanup_cnpg_storage.py index 1abe22a..e7ad553 100644 --- a/tests/installer/test_cleanup_cnpg_storage.py +++ b/tests/installer/test_cleanup_cnpg_storage.py @@ -2,7 +2,7 @@ from __future__ import annotations import pytest -from prole.tools import cleanup_cnpg_storage as cleanup +from knoe.tools import cleanup_cnpg_storage as cleanup def test_parse_cli_args_defaults_to_dry_run(): @@ -28,20 +28,20 @@ def test_select_resources_matches_namespace_cluster_and_cnpg_hints(): clusters=[ { "metadata": { - "name": "prole-db", + "name": "knoe-db", "namespace": "knoe-db", - "labels": {"prole.io/cluster": "prole-db"}, + "labels": {"knoe.io/cluster": "knoe-db"}, } } ], pvcs=[ { "metadata": { - "name": "prole-db-1", + "name": "knoe-db-1", "namespace": "knoe-db", "labels": { - "cnpg.io/cluster": "prole-db", - "prole.io/namespace": "knoe-db", + "cnpg.io/cluster": "knoe-db", + "knoe.io/namespace": "knoe-db", }, }, "status": {"phase": "Bound"}, @@ -50,21 +50,21 @@ def test_select_resources_matches_namespace_cluster_and_cnpg_hints(): pvs=[ { "metadata": { - "name": "synology-iscsi-knoe-db-prole-db-data", + "name": "synology-iscsi-knoe-db-knoe-db-data", "labels": { "synology.storage/role": "data", - "prole.io/namespace": "knoe-db", - "prole.io/cluster": "prole-db", + "knoe.io/namespace": "knoe-db", + "knoe.io/cluster": "knoe-db", }, }, "spec": { "storageClassName": "synology-iscsi", "claimRef": { "namespace": "knoe-db", - "name": "prole-db-1", + "name": "knoe-db-1", }, "local": { - "path": "/synology/d001/knoe/knoe-db/knoe-db/prole-db/data" + "path": "/synology/d001/knoe/knoe-db/knoe-db/knoe-db/data" }, }, "status": {"phase": "Released"}, @@ -73,9 +73,9 @@ def test_select_resources_matches_namespace_cluster_and_cnpg_hints(): pods=[ { "metadata": { - "name": "prole-db-1", + "name": "knoe-db-1", "namespace": "knoe-db", - "labels": {"cnpg.io/cluster": "prole-db"}, + "labels": {"cnpg.io/cluster": "knoe-db"}, }, "status": {"phase": "Running"}, } @@ -83,24 +83,24 @@ def test_select_resources_matches_namespace_cluster_and_cnpg_hints(): jobs=[ { "metadata": { - "name": "prole-db-init-job", + "name": "knoe-db-init-job", "namespace": "knoe-db", - "labels": {"cnpg.io/cluster": "prole-db"}, + "labels": {"cnpg.io/cluster": "knoe-db"}, } } ], ) - filters = cleanup.MatchFilters(namespace="knoe-db", cluster_name="prole-db") + filters = cleanup.MatchFilters(namespace="knoe-db", cluster_name="knoe-db") selected = cleanup.select_resources(snapshot, filters) - assert [item.name for item in selected.clusters] == ["prole-db"] - assert [item.name for item in selected.pvcs] == ["prole-db-1"] + assert [item.name for item in selected.clusters] == ["knoe-db"] + assert [item.name for item in selected.pvcs] == ["knoe-db-1"] assert [item.name for item in selected.pvs] == [ - "synology-iscsi-knoe-db-prole-db-data" + "synology-iscsi-knoe-db-knoe-db-data" ] - assert [item.name for item in selected.pods] == ["prole-db-1"] - assert [item.name for item in selected.jobs] == ["prole-db-init-job"] + assert [item.name for item in selected.pods] == ["knoe-db-1"] + assert [item.name for item in selected.jobs] == ["knoe-db-init-job"] assert any( reason.startswith("spec.claimRef.namespace=") for reason in selected.pvs[0].reasons @@ -110,7 +110,7 @@ def test_select_resources_matches_namespace_cluster_and_cnpg_hints(): def test_released_pv_prefers_claimref_patch_by_default(): pv = { "spec": { - "claimRef": {"namespace": "knoe-db", "name": "prole-db-1"} + "claimRef": {"namespace": "knoe-db", "name": "knoe-db-1"} }, "status": {"phase": "Released"}, } diff --git a/tests/installer/test_cluster_nodes_policy.py b/tests/installer/test_cluster_nodes_policy.py index d13e385..4576173 100644 --- a/tests/installer/test_cluster_nodes_policy.py +++ b/tests/installer/test_cluster_nodes_policy.py @@ -7,29 +7,29 @@ from knoe.ui.screens.cluster_nodes import ClusterNodesScreenMixin class _DummyClusterNodesScreen(ClusterNodesScreenMixin): - def __init__(self, prole_cfg_data: dict | None = None): - self.prole_cfg_data = prole_cfg_data or {} + def __init__(self, knoe_cfg_data: dict | None = None): + self.knoe_cfg_data = knoe_cfg_data or {} self._save_calls = 0 - def _save_prole_cfg(self): + def _save_knoe_cfg(self): self._save_calls += 1 def test_advanced_assignment_grid_disabled_by_default(): - app = _DummyClusterNodesScreen(prole_cfg_data={"Cluster Nodes": {}}) + app = _DummyClusterNodesScreen(knoe_cfg_data={"Cluster Nodes": {}}) assert app._cluster_nodes_advanced_enabled() is False def test_set_advanced_assignment_grid_flag_persists_setting(): - app = _DummyClusterNodesScreen(prole_cfg_data={"Cluster Nodes": {}}) + app = _DummyClusterNodesScreen(knoe_cfg_data={"Cluster Nodes": {}}) app._cluster_nodes_set_advanced_enabled(True) - assert app.prole_cfg_data["Cluster Nodes"]["ADVANCED_ASSIGNMENT_GRID"] == "true" + assert app.knoe_cfg_data["Cluster Nodes"]["ADVANCED_ASSIGNMENT_GRID"] == "true" assert app._save_calls == 1 def test_default_policy_uses_round_robin_cnpg_and_prefers_d004_for_monitoring(): - app = _DummyClusterNodesScreen(prole_cfg_data={}) + app = _DummyClusterNodesScreen(knoe_cfg_data={}) policy = app._cluster_nodes_default_policy(["node-a", "node-d004", "node-c"]) @@ -45,7 +45,7 @@ def test_default_policy_uses_round_robin_cnpg_and_prefers_d004_for_monitoring(): def test_load_policy_falls_back_to_default_when_policy_json_missing(): - app = _DummyClusterNodesScreen(prole_cfg_data={"Cluster Nodes": {}}) + app = _DummyClusterNodesScreen(knoe_cfg_data={"Cluster Nodes": {}}) policy = app._cluster_nodes_load_policy(["node-a", "node-b"]) @@ -56,7 +56,7 @@ def test_load_policy_falls_back_to_default_when_policy_json_missing(): def test_storage_summary_prefers_probe_results_when_present(): - app = _DummyClusterNodesScreen(prole_cfg_data={}) + app = _DummyClusterNodesScreen(knoe_cfg_data={}) storage_item = storage_probe_mod.StorageProbeResult( target_id="t-1", node_name="node-a", diff --git a/tests/installer/test_cluster_save_triggers_status_check.py b/tests/installer/test_cluster_save_triggers_status_check.py index 961df00..679dfb1 100644 --- a/tests/installer/test_cluster_save_triggers_status_check.py +++ b/tests/installer/test_cluster_save_triggers_status_check.py @@ -41,7 +41,7 @@ class _DummyClusterSaveApp(ScreenBaseMixin, ClusterScreenMixin): self.at_rest_encryption_enabled = tk.BooleanVar(master=root, value=False) # Minimal config structure required by `_validate_and_save_cluster_config`. - self.prole_cfg_data = { + self.knoe_cfg_data = { "Initialize Cluster": { "ENVIRONMENT": "service", "K3S_SERVER_URL": "", @@ -58,7 +58,7 @@ class _DummyClusterSaveApp(ScreenBaseMixin, ClusterScreenMixin): self.saved_calls = 0 self.status_check_calls = 0 - def _save_prole_cfg(self): + def _save_knoe_cfg(self): self.saved_calls += 1 def _verify_k3s_services(self): @@ -92,13 +92,13 @@ def test_cluster_env_save_triggers_status_check(monkeypatch): pass -def test_cluster_env_prod_artifacts_dir_expands_prole_home_from_cfg(monkeypatch, tmp_path): +def test_cluster_env_prod_artifacts_dir_expands_knoe_home_from_cfg(monkeypatch, tmp_path): # Some test modules replace tkinter with MagicMocks at import-time. if isinstance(sys.modules.get("tkinter"), MagicMock): pytest.skip("tkinter is mocked in this test run") - # Ensure `$PROLE_HOME` is NOT available as an OS env var; it must come from config. - monkeypatch.delenv("PROLE_HOME", raising=False) + # Ensure `$KNOE_HOME` is NOT available as an OS env var; it must come from config. + monkeypatch.delenv("KNOE_HOME", raising=False) monkeypatch.chdir(tmp_path) root = tk.Tk() @@ -109,20 +109,20 @@ def test_cluster_env_prod_artifacts_dir_expands_prole_home_from_cfg(monkeypatch, # Switch to prod so the artifacts directory is validated/created. app.cluster_env.set("prod") - # Provide PROLE_HOME via config data only. - prole_home = tmp_path / "prole-home" - prole_home.mkdir(parents=True, exist_ok=True) - app.prole_cfg_data.setdefault("System Environment", {})["PROLE_HOME"] = str( - prole_home + # Provide KNOE_HOME via config data only. + knoe_home = tmp_path / "knoe-home" + knoe_home.mkdir(parents=True, exist_ok=True) + app.knoe_cfg_data.setdefault("System Environment", {})["KNOE_HOME"] = str( + knoe_home ) - # Use a path expression that previously would create a literal `$PROLE_HOME` dir. - app.prod_artifacts_path.set("$PROLE_HOME/staging") + # Use a path expression that previously would create a literal `$KNOE_HOME` dir. + app.prod_artifacts_path.set("$KNOE_HOME/staging") assert app._validate_and_save_cluster_config() is True - assert (prole_home / "staging").is_dir() - assert not (tmp_path / "$PROLE_HOME" / "staging").exists() + assert (knoe_home / "staging").is_dir() + assert not (tmp_path / "$KNOE_HOME" / "staging").exists() finally: try: root.destroy() diff --git a/tests/installer/test_cluster_screen_layout.py b/tests/installer/test_cluster_screen_layout.py index e6552fa..1e9e0d9 100644 --- a/tests/installer/test_cluster_screen_layout.py +++ b/tests/installer/test_cluster_screen_layout.py @@ -52,7 +52,7 @@ class _DummyClusterApp(ScreenBaseMixin, ClusterScreenMixin): return None def _get_k3d_cluster_list(self) -> list[str]: - return ["prole-dev"] + return ["knoe-dev"] def _on_create_k3d_cluster(self): return None @@ -166,7 +166,7 @@ def test_service_namespace_default_is_knoe_system_for_dev_and_service(env: str): app = _DummyClusterApp(root, canvas, kubectx_values=["ctx-001"]) app.cluster_env.set(env) app.service_namespace.set("") - app.prole_cfg_data = {} + app.knoe_cfg_data = {} assert app._get_service_namespace() == "knoe-system" diff --git a/tests/installer/test_cnpg_barman_webhook.py b/tests/installer/test_cnpg_barman_webhook.py index 8ad41d6..4384dc4 100644 --- a/tests/installer/test_cnpg_barman_webhook.py +++ b/tests/installer/test_cnpg_barman_webhook.py @@ -513,7 +513,7 @@ spec: namespace="knoe-db-0", manifest=manifest, env={ - "ARTIFACT_REGISTRY": "us-west3-docker.pkg.dev/example/prole", + "ARTIFACT_REGISTRY": "us-west3-docker.pkg.dev/example/knoe", "KNOE_DB_IMAGE_TAG": "18-030", }, log=None, @@ -522,7 +522,7 @@ spec: assert "${ARTIFACT_REGISTRY}" not in seen["manifest"] assert "${KNOE_DB_IMAGE_TAG}" not in seen["manifest"] - assert "us-west3-docker.pkg.dev/example/prole/knoe-db:18-030" in seen["manifest"] + assert "us-west3-docker.pkg.dev/example/knoe/knoe-db:18-030" in seen["manifest"] assert seen["path"] != str(manifest) @@ -609,7 +609,7 @@ spec: cloudnative_pg._apply_manifest( namespace="knoe-db-0", manifest=manifest, - env={"PROLE_MODE": "k3d"}, + env={"KNOE_MODE": "k3d"}, log=None, attempts=1, ) @@ -646,14 +646,14 @@ spec: namespace="knoe-db-0", manifest=manifest, env={ - "PROLE_MODE": "k3d", + "KNOE_MODE": "k3d", "KNOE_DB_IMAGE_TAG": "18-014", }, log=None, attempts=1, ) - assert "k3d-prole-registry:5000/knoe-db:18-014" in seen["manifest"] + assert "k3d-knoe-registry:5000/knoe-db:18-014" in seen["manifest"] def test_apply_manifest_resolves_knoe_db_image_tag_from_version_files(monkeypatch, tmp_path): @@ -688,12 +688,12 @@ spec: cloudnative_pg._apply_manifest( namespace="knoe-db-0", manifest=manifest, - env={"ARTIFACT_REGISTRY": "us-west3-docker.pkg.dev/example/prole", "PROLE_MODE": "k8s"}, + env={"ARTIFACT_REGISTRY": "us-west3-docker.pkg.dev/example/knoe", "KNOE_MODE": "k8s"}, log=None, attempts=1, ) - assert "us-west3-docker.pkg.dev/example/prole/knoe-db:18-030" in seen["manifest"] + assert "us-west3-docker.pkg.dev/example/knoe/knoe-db:18-030" in seen["manifest"] def test_apply_manifest_raises_on_unresolved_image_placeholder(monkeypatch, tmp_path): diff --git a/tests/installer/test_config_extended.py b/tests/installer/test_config_extended.py index 5562d83..33f8671 100644 --- a/tests/installer/test_config_extended.py +++ b/tests/installer/test_config_extended.py @@ -9,10 +9,10 @@ from unittest import mock from unittest.mock import MagicMock, patch from knoe.config import ( - _is_prole_secret, + _is_knoe_secret, _is_openbao_ref, - _encrypt_prole_secret, - _decrypt_prole_secret, + _encrypt_knoe_secret, + _decrypt_knoe_secret, _encrypt_cfg_secret, _resolve_secret_value, _load_properties, @@ -28,34 +28,34 @@ from knoe.config import ( get_resource_path, get_docker_build_platform_args, setup_logging, - PROLE_SECRET_PREFIX, - PROLE_SECRET_SUFFIX, + KNOE_SECRET_PREFIX, + KNOE_SECRET_SUFFIX, OPENBAO_PREFIX, OPENBAO_SUFFIX, ) # --------------------------------------------------------------------------- -# _is_prole_secret / _is_openbao_ref +# _is_knoe_secret / _is_openbao_ref # --------------------------------------------------------------------------- class TestSecretDetection: - def test_prole_secret_valid(self): - val = f"{PROLE_SECRET_PREFIX}v1:nonce:ct{PROLE_SECRET_SUFFIX}" - assert _is_prole_secret(val) is True + def test_knoe_secret_valid(self): + val = f"{KNOE_SECRET_PREFIX}v1:nonce:ct{KNOE_SECRET_SUFFIX}" + assert _is_knoe_secret(val) is True - def test_prole_secret_none(self): - assert _is_prole_secret(None) is False + def test_knoe_secret_none(self): + assert _is_knoe_secret(None) is False - def test_prole_secret_empty(self): - assert _is_prole_secret("") is False + def test_knoe_secret_empty(self): + assert _is_knoe_secret("") is False - def test_prole_secret_missing_prefix(self): - assert _is_prole_secret(f"garbage{PROLE_SECRET_SUFFIX}") is False + def test_knoe_secret_missing_prefix(self): + assert _is_knoe_secret(f"garbage{KNOE_SECRET_SUFFIX}") is False - def test_prole_secret_missing_suffix(self): - assert _is_prole_secret(f"{PROLE_SECRET_PREFIX}stuff") is False + def test_knoe_secret_missing_suffix(self): + assert _is_knoe_secret(f"{KNOE_SECRET_PREFIX}stuff") is False def test_openbao_ref_valid(self): val = f"{OPENBAO_PREFIX}kv/path:key{OPENBAO_SUFFIX}" @@ -79,28 +79,28 @@ class TestSecretDetection: class TestEncryptionRoundTrip: def test_encrypt_decrypt(self): plaintext = "my-secret-password" - encrypted = _encrypt_prole_secret(plaintext) - assert _is_prole_secret(encrypted) - decrypted = _decrypt_prole_secret(encrypted) + encrypted = _encrypt_knoe_secret(plaintext) + assert _is_knoe_secret(encrypted) + decrypted = _decrypt_knoe_secret(encrypted) assert decrypted == plaintext def test_encrypt_none(self): - assert _encrypt_prole_secret(None) == "" + assert _encrypt_knoe_secret(None) == "" def test_encrypt_already_encrypted(self): - val = f"{PROLE_SECRET_PREFIX}v1:x:y{PROLE_SECRET_SUFFIX}" - assert _encrypt_prole_secret(val) == val + val = f"{KNOE_SECRET_PREFIX}v1:x:y{KNOE_SECRET_SUFFIX}" + assert _encrypt_knoe_secret(val) == val def test_decrypt_non_secret(self): - assert _decrypt_prole_secret("plaintext") == "plaintext" + assert _decrypt_knoe_secret("plaintext") == "plaintext" def test_decrypt_malformed(self): - val = f"{PROLE_SECRET_PREFIX}bad{PROLE_SECRET_SUFFIX}" - assert _decrypt_prole_secret(val) == val + val = f"{KNOE_SECRET_PREFIX}bad{KNOE_SECRET_SUFFIX}" + assert _decrypt_knoe_secret(val) == val def test_decrypt_wrong_version(self): - val = f"{PROLE_SECRET_PREFIX}v999:nonce:ct{PROLE_SECRET_SUFFIX}" - assert _decrypt_prole_secret(val) == val + val = f"{KNOE_SECRET_PREFIX}v999:nonce:ct{KNOE_SECRET_SUFFIX}" + assert _decrypt_knoe_secret(val) == val # --------------------------------------------------------------------------- @@ -113,8 +113,8 @@ class TestEncryptCfgSecret: assert _encrypt_cfg_secret("") == "" assert _encrypt_cfg_secret(None) == "" - def test_already_prole_secret(self): - val = f"{PROLE_SECRET_PREFIX}v1:x:y{PROLE_SECRET_SUFFIX}" + def test_already_knoe_secret(self): + val = f"{KNOE_SECRET_PREFIX}v1:x:y{KNOE_SECRET_SUFFIX}" assert _encrypt_cfg_secret(val) == val def test_already_openbao_ref(self): @@ -123,7 +123,7 @@ class TestEncryptCfgSecret: def test_encrypts_plaintext(self): result = _encrypt_cfg_secret("my-password") - assert _is_prole_secret(result) + assert _is_knoe_secret(result) # --------------------------------------------------------------------------- @@ -135,15 +135,15 @@ class TestResolveSecretValue: def test_plain_value(self): assert _resolve_secret_value("hello") == "hello" - def test_prole_secret(self): - encrypted = _encrypt_prole_secret("test123") + def test_knoe_secret(self): + encrypted = _encrypt_knoe_secret("test123") assert _resolve_secret_value(encrypted) == "test123" def test_openbao_ref_no_server(self): val = f"{OPENBAO_PREFIX}kv/path:key{OPENBAO_SUFFIX}" with mock.patch.dict(os.environ, {}, clear=False): os.environ.pop("OPENBAO_ROOT_TOKEN", None) - os.environ.pop("PROLE_SERVICE", None) + os.environ.pop("KNOE_SERVICE", None) os.environ.pop("PROLE_OPENBAO_URL", None) result = _resolve_secret_value(val) # Without a token/server, should return the original ref @@ -223,10 +223,10 @@ class TestCfgExpansion: cfg.add_section("Global") cfg.set("Global", "namespace", "my-ns") cfg.add_section("System Environment") - cfg.set("System Environment", "prole_home", "/opt/prole") + cfg.set("System Environment", "knoe_home", "/opt/knoe") variables = _collect_cfg_vars(cfg) assert variables["namespace"] == "my-ns" - assert variables["prole_home"] == "/opt/prole" + assert variables["knoe_home"] == "/opt/knoe" def test_collect_vars_no_sections(self): cfg = configparser.ConfigParser(interpolation=None) @@ -349,7 +349,7 @@ class TestWriteK3sKubeconfig: path = _write_k3s_kubeconfig("https://10.0.0.1:6443", "mytoken") assert path.exists() content = path.read_text() - assert "prole-k3s" in content + assert "knoe-k3s" in content assert "https://10.0.0.1:6443" in content assert "mytoken" in content # Cleanup diff --git a/tests/installer/test_config_helpers.py b/tests/installer/test_config_helpers.py index 7b577a3..da1ca34 100644 --- a/tests/installer/test_config_helpers.py +++ b/tests/installer/test_config_helpers.py @@ -160,7 +160,7 @@ def test_try_read_ansible_vault_value_file_not_found(tmp_path): def test_try_read_ansible_vault_value_plain_text(tmp_path): - vault = tmp_path / "prole.cfg" + vault = tmp_path / "knoe.cfg" vault.write_text("db_password: supersecret\n") result = _try_read_ansible_vault_value(vault, "db_password") assert result == "supersecret" @@ -168,7 +168,7 @@ def test_try_read_ansible_vault_value_plain_text(tmp_path): def test_try_read_ansible_vault_value_plain_text_vault_marker_skipped(tmp_path): """Plain value starting with $ANSIBLE_VAULT is treated as encrypted → skip.""" - vault = tmp_path / "prole.cfg" + vault = tmp_path / "knoe.cfg" vault.write_text("db_password: $ANSIBLE_VAULT;1.1;AES256\n") # No vault password file → returns "" with patch.dict(os.environ, {"ANSIBLE_VAULT_PASSWORD_FILE": ""}, clear=False), \ @@ -178,7 +178,7 @@ def test_try_read_ansible_vault_value_plain_text_vault_marker_skipped(tmp_path): def test_try_read_ansible_vault_value_no_password_file(tmp_path): - vault = tmp_path / "prole.cfg" + vault = tmp_path / "knoe.cfg" vault.write_text("db_password: $ANSIBLE_VAULT;1.1;AES256\n") with patch.dict(os.environ, {"ANSIBLE_VAULT_PASSWORD_FILE": ""}, clear=False), \ patch("knoe.config.shutil.which", return_value=None): @@ -187,7 +187,7 @@ def test_try_read_ansible_vault_value_no_password_file(tmp_path): def test_try_read_ansible_vault_value_with_vault_success(tmp_path): - vault = tmp_path / "prole.cfg" + vault = tmp_path / "knoe.cfg" vault.write_text("db_password: $ANSIBLE_VAULT;1.1;AES256\n") pw_file = tmp_path / ".vault_pass" pw_file.write_text("mypassword\n") @@ -204,7 +204,7 @@ def test_try_read_ansible_vault_value_with_vault_success(tmp_path): def test_try_read_ansible_vault_value_vault_fails_no_inline(tmp_path): - vault = tmp_path / "prole.cfg" + vault = tmp_path / "knoe.cfg" vault.write_text("db_password: $ANSIBLE_VAULT;1.1;AES256\n") pw_file = tmp_path / ".vault_pass" pw_file.write_text("mypassword\n") @@ -222,7 +222,7 @@ def test_try_read_ansible_vault_value_vault_fails_no_inline(tmp_path): def test_try_read_ansible_vault_value_uses_project_root_vault_pass(tmp_path): """Falls back to PROJECT_ROOT/.vault_pass if no env var set.""" - vault = tmp_path / "prole.cfg" + vault = tmp_path / "knoe.cfg" vault.write_text("mykey: plainvalue\n") with patch.dict(os.environ, {"ANSIBLE_VAULT_PASSWORD_FILE": ""}, clear=False): result = _try_read_ansible_vault_value(vault, "mykey") diff --git a/tests/installer/test_controller.py b/tests/installer/test_controller.py index 5f7e06e..30915a7 100644 --- a/tests/installer/test_controller.py +++ b/tests/installer/test_controller.py @@ -114,7 +114,7 @@ def test_run_script_basic(tmp_path): lines: list[str] = [] rc = ctrl.run_script( "hello.sh", - env={"PROLE_HOME": str(tmp_path)}, + env={"KNOE_HOME": str(tmp_path)}, on_line=lambda l: lines.append(l), ) assert rc == 0 @@ -126,7 +126,7 @@ def test_run_script_nonzero_exit(tmp_path): script = tmp_path / "etc" / "fail.sh" script.write_text("#!/bin/bash\nexit 42\n") ctrl = _make_controller(tmp_path) - rc = ctrl.run_script("fail.sh", env={"PROLE_HOME": str(tmp_path)}) + rc = ctrl.run_script("fail.sh", env={"KNOE_HOME": str(tmp_path)}) assert rc == 42 @@ -139,7 +139,7 @@ def test_run_script_with_args(tmp_path): rc = ctrl.run_script( "args.sh", args=["myvalue"], - env={"PROLE_HOME": str(tmp_path)}, + env={"KNOE_HOME": str(tmp_path)}, on_line=lambda l: lines.append(l), ) assert rc == 0 @@ -157,22 +157,22 @@ def test_run_script_copies_k8s_and_conf(tmp_path): (tmp_path / "conf" / "port-mapping.cfg").write_text("; test\n") script = tmp_path / "etc" / "synced.sh" script.write_text("#!/bin/bash\necho ok\n") - target = tmp_path / "prole_home_test" + target = tmp_path / "knoe_home_test" target.mkdir() ctrl = _make_controller(tmp_path) - rc = ctrl.run_script("synced.sh", env={"PROLE_HOME": str(target)}) + rc = ctrl.run_script("synced.sh", env={"KNOE_HOME": str(target)}) assert rc == 0 # k8s should have been synced assert (target / "k8s").exists() - # conf allowlist should have been synced (but NOT prole.cfg) + # conf allowlist should have been synced (but NOT knoe.cfg) assert (target / "conf" / "postgresql" / ".version").read_text() == "18\n" assert (target / "conf" / "database_versions.json").exists() assert (target / "conf" / "port-mapping.cfg").exists() - assert not (target / "conf" / "prole.cfg").exists() + assert not (target / "conf" / "knoe.cfg").exists() -def test_run_script_preserves_existing_prole_cfg_symlink_entrypoint(tmp_path: Path): - """Regression: run_script must never delete/overwrite curated $PROLE_HOME/conf/prole.cfg layouts.""" +def test_run_script_preserves_existing_knoe_cfg_symlink_entrypoint(tmp_path: Path): + """Regression: run_script must never delete/overwrite curated $KNOE_HOME/conf/knoe.cfg layouts.""" _scaffold_project(tmp_path) @@ -180,23 +180,23 @@ def test_run_script_preserves_existing_prole_cfg_symlink_entrypoint(tmp_path: Pa script = tmp_path / "etc" / "ok.sh" script.write_text("#!/bin/bash\necho ok\n") - # Ensure the source project has a prole.cfg file; destructive sync currently overwrites + # Ensure the source project has a knoe.cfg file; destructive sync currently overwrites # the curated symlink entrypoint. - (tmp_path / "conf" / "prole.cfg").write_text("SOURCE_ENTRY\n") + (tmp_path / "conf" / "knoe.cfg").write_text("SOURCE_ENTRY\n") - # Create a curated PROLE_HOME/conf layout with a symlink entrypoint. - prole_home = tmp_path / "prole_home_curated" - (prole_home / "conf" / "service").mkdir(parents=True, exist_ok=True) - service_base = prole_home / "conf" / "service" / "prole.cfg" + # Create a curated KNOE_HOME/conf layout with a symlink entrypoint. + knoe_home = tmp_path / "knoe_home_curated" + (knoe_home / "conf" / "service").mkdir(parents=True, exist_ok=True) + service_base = knoe_home / "conf" / "service" / "knoe.cfg" service_base.write_text("SERVICE_BASE\n") - entry = prole_home / "conf" / "prole.cfg" - entry.symlink_to(Path("service") / "prole.cfg") + entry = knoe_home / "conf" / "knoe.cfg" + entry.symlink_to(Path("service") / "knoe.cfg") # Ensure the destructive sync path triggers (source conf newer than target conf). (tmp_path / "conf" / "__touch__.txt").write_text("x\n") ctrl = _make_controller(tmp_path) - rc = ctrl.run_script("ok.sh", env={"PROLE_HOME": str(prole_home)}) + rc = ctrl.run_script("ok.sh", env={"KNOE_HOME": str(knoe_home)}) assert rc == 0 assert entry.exists() @@ -224,14 +224,14 @@ def test_run_script_copies_etc_lib_shell_for_etc_scripts(tmp_path): "echo ok\n" ) - target = tmp_path / "prole_home_lib" + target = tmp_path / "knoe_home_lib" target.mkdir() ctrl = _make_controller(tmp_path) lines: list[str] = [] rc = ctrl.run_script( "needs_lib.sh", - env={"PROLE_HOME": str(target)}, + env={"KNOE_HOME": str(target)}, on_line=lambda l: lines.append(l), ) assert rc == 0 @@ -245,21 +245,21 @@ def test_run_script_copies_db_version(tmp_path): (tmp_path / "knoe-db" / ".version").write_text("88\n") script = tmp_path / "etc" / "dbver.sh" script.write_text("#!/bin/bash\necho ok\n") - target = tmp_path / "prole_home_db" + target = tmp_path / "knoe_home_db" target.mkdir() ctrl = _make_controller(tmp_path) - rc = ctrl.run_script("dbver.sh", env={"PROLE_HOME": str(target)}) + rc = ctrl.run_script("dbver.sh", env={"KNOE_HOME": str(target)}) assert rc == 0 assert (target / "knoe-db" / ".version").read_text().strip() == "88" -def test_run_script_default_prole_home(tmp_path): - """Covers the PROLE_HOME fallback to ~/.prole when not in env.""" +def test_run_script_default_knoe_home(tmp_path): + """Covers the KNOE_HOME fallback to ~/.knoe when not in env.""" _scaffold_project(tmp_path) script = tmp_path / "etc" / "home.sh" script.write_text("#!/bin/bash\necho hometest\n") ctrl = _make_controller(tmp_path) - # Provide env without PROLE_HOME so it falls back to Path.home() / ".prole" + # Provide env without KNOE_HOME so it falls back to Path.home() / ".knoe" fake_home = tmp_path / "fakehome" fake_home.mkdir() with patch("knoe.core.controller.Path.home", return_value=fake_home): @@ -276,7 +276,7 @@ def test_run_script_stderr_to_stdout_false(tmp_path): stderr_lines: list[str] = [] rc = ctrl.run_script( "stderr.sh", - env={"PROLE_HOME": str(tmp_path)}, + env={"KNOE_HOME": str(tmp_path)}, stderr_to_stdout=False, on_stderr_line=lambda l: stderr_lines.append(l), ) @@ -293,7 +293,7 @@ def test_run_script_verbose_sets_env(tmp_path): lines: list[str] = [] rc = ctrl.run_script( "verbose.sh", - env={"PROLE_HOME": str(tmp_path)}, + env={"KNOE_HOME": str(tmp_path)}, on_line=lambda l: lines.append(l), ) assert rc == 0 @@ -306,5 +306,5 @@ def test_run_script_missing_source_script(tmp_path): # Don't create the script — run_script should still try to run it ctrl = _make_controller(tmp_path) # Should return non-zero (bash can't find the file) but not raise - rc = ctrl.run_script("nonexistent.sh", env={"PROLE_HOME": str(tmp_path)}) + rc = ctrl.run_script("nonexistent.sh", env={"KNOE_HOME": str(tmp_path)}) assert rc != 0 diff --git a/tests/installer/test_controller_run_script_expands_shell_vars.py b/tests/installer/test_controller_run_script_expands_shell_vars.py index 80e10c5..0109a78 100644 --- a/tests/installer/test_controller_run_script_expands_shell_vars.py +++ b/tests/installer/test_controller_run_script_expands_shell_vars.py @@ -4,9 +4,9 @@ from pathlib import Path def test_controller_run_script_expands_shell_vars(monkeypatch, tmp_path: Path): - """Regression: `run_script` must expand `$HOME`/`$PROLE_HOME` before mkdir/copy. + """Regression: `run_script` must expand `$HOME`/`$KNOE_HOME` before mkdir/copy. - Without this, setting `PROLE_HOME=$HOME/prole` can create a literal `$HOME` + Without this, setting `KNOE_HOME=$HOME/knoe` can create a literal `$HOME` directory in the current working directory. """ @@ -23,8 +23,8 @@ def test_controller_run_script_expands_shell_vars(monkeypatch, tmp_path: Path): from knoe.core.controller import KnoeController controller = KnoeController(project_root=proj) - rc = controller.run_script("dummy.sh", env={"PROLE_HOME": "$HOME/prole"}) + rc = controller.run_script("dummy.sh", env={"KNOE_HOME": "$HOME/knoe"}) assert rc == 0 - assert (home_dir / "prole" / "etc" / "dummy.sh").is_file() + assert (home_dir / "knoe" / "etc" / "dummy.sh").is_file() assert not (tmp_path / "$HOME").exists() diff --git a/tests/installer/test_core_classes.py b/tests/installer/test_core_classes.py index 5006e32..3834551 100644 --- a/tests/installer/test_core_classes.py +++ b/tests/installer/test_core_classes.py @@ -144,7 +144,7 @@ class TestMilestoneBase: assert env["NAMESPACE"] == "myns" assert env["DB_PASSWORD"] == "secret123" assert env["KNOE_DB_USER"] == "testuser" - assert env["PROLE_MODE"] == "k3d" + assert env["KNOE_MODE"] == "k3d" assert env["KRB5_REALM"] == "EXAMPLE.COM" assert env["KERBEROS_ENABLED"] == "True" assert env["AT_REST_ENCRYPTION_ENABLED"] == "true" @@ -156,7 +156,7 @@ class TestMilestoneBase: state = InstallerState(inputs={}, config_data={}) env = m._get_script_env(state) assert env["NAMESPACE"] == "default" - assert env["PROLE_MODE"] == "k3d" + assert env["KNOE_MODE"] == "k3d" assert env["KERBEROS_ENABLED"] == "False" def test_get_script_env_grafana_from_config(self): @@ -188,7 +188,7 @@ class TestMilestoneBase: config_data={}, ) env = m._get_script_env(state) - assert env["PROLE_MODE"] == "k3s" + assert env["KNOE_MODE"] == "k3s" assert env["PROLE_K3S_SERVER"] == "https://myserver:6443" assert env["PROLE_K3S_TOKEN"] == "mytoken" @@ -357,7 +357,7 @@ class TestKnoeController: c = KnoeController(tmp_path) installer = KnoeConsoleInstaller(c) - openbao_ref = "${OPENBAO:kv/prole/test/db#password}" + openbao_ref = "${OPENBAO:kv/knoe/test/db#password}" with ( mock.patch.object( @@ -571,15 +571,15 @@ class TestEnvSetupMilestone: m = EnvSetupMilestone() state = InstallerState( inputs={ - "env_setup.PROLE_HOME": "/opt/prole", - "env_setup.PROLE_CONF": "/opt/prole/conf", + "env_setup.KNOE_HOME": "/opt/knoe", + "env_setup.KNOE_CONF": "/opt/knoe/conf", "env_setup.NAMESPACE": "testns", }, config_data={}, ) msgs = [] m.execute(state, progress=lambda msg, p: msgs.append(msg)) - assert state.config_data["System Environment"]["PROLE_HOME"] == "/opt/prole" + assert state.config_data["System Environment"]["KNOE_HOME"] == "/opt/knoe" assert state.config_data["System Environment"]["NAMESPACE"] == "testns" assert "Environment setup complete" in msgs @@ -640,7 +640,7 @@ class TestDatabaseCreationMilestone: m = DatabaseCreationMilestone() state = InstallerState( inputs={ - "init_password.db_password": "${OPENBAO:kv/prole/ns/db#password}", + "init_password.db_password": "${OPENBAO:kv/knoe/ns/db#password}", "env_setup.DATABASE_NAMESPACE": "ns1", }, config_data={}, diff --git a/tests/installer/test_database_context_selection.py b/tests/installer/test_database_context_selection.py index 1fe1cfa..5ccf296 100644 --- a/tests/installer/test_database_context_selection.py +++ b/tests/installer/test_database_context_selection.py @@ -15,9 +15,9 @@ class _Var: class _DummyDbScreen(DatabaseScreenMixin): - def __init__(self, *, inputs: dict | None = None, prole_cfg_data: dict | None = None): + def __init__(self, *, inputs: dict | None = None, knoe_cfg_data: dict | None = None): self.inputs = inputs or {} - self.prole_cfg_data = prole_cfg_data or {} + self.knoe_cfg_data = knoe_cfg_data or {} self.selected_kubectx = _Var( (self.inputs.get("init_cluster.selected_kubectx") or "") ) @@ -35,7 +35,7 @@ class _DummyDbScreen(DatabaseScreenMixin): def test_db_kubectl_base_cmd_prefers_db_cluster_context_over_dev_context(): screen = _DummyDbScreen( - prole_cfg_data={ + knoe_cfg_data={ "Global": { "KUBECONTEXT": "gke_proj_us-west3_knoe-dev-0", "DB_CLUSTER_KUBECONTEXT": "gke_proj_us-west3_knoe-cnpg-0", @@ -50,7 +50,7 @@ def test_db_kubectl_base_cmd_prefers_db_cluster_context_over_dev_context(): def test_resolve_db_kube_context_derives_cnpg_context_when_only_app_context_exists(): screen = _DummyDbScreen( - prole_cfg_data={ + knoe_cfg_data={ "Global": { "KUBECONTEXT": "gke_proj_us-west3_knoe-dev-0", "DB_CLUSTER_NAME": "knoe-cnpg-0", @@ -64,7 +64,7 @@ def test_resolve_db_kube_context_derives_cnpg_context_when_only_app_context_exis def test_ensure_db_screen_context_keeps_explicit_user_override(): screen = _DummyDbScreen( inputs={"init_cluster.selected_kubectx": "gke_proj_us-west3_custom-ops"}, - prole_cfg_data={ + knoe_cfg_data={ "Global": { "KUBECONTEXT": "gke_proj_us-west3_knoe-dev-0", "DB_CLUSTER_KUBECONTEXT": "gke_proj_us-west3_knoe-cnpg-0", @@ -79,7 +79,7 @@ def test_ensure_db_screen_context_keeps_explicit_user_override(): def test_db_target_note_includes_context_and_namespace_confirmation(): screen = _DummyDbScreen( - prole_cfg_data={ + knoe_cfg_data={ "Global": { "DB_CLUSTER_KUBECONTEXT": "gke_proj_us-west3_knoe-cnpg-0", } diff --git a/tests/installer/test_db_build_registry_status_k3s.py b/tests/installer/test_db_build_registry_status_k3s.py index c1180cf..10d220d 100644 --- a/tests/installer/test_db_build_registry_status_k3s.py +++ b/tests/installer/test_db_build_registry_status_k3s.py @@ -29,8 +29,8 @@ class _ProcResult: class _DummyDbScreen(DatabaseScreenMixin): - def __init__(self, *, registry_url: str, prole_cfg_data: dict): - self.prole_cfg_data = prole_cfg_data + def __init__(self, *, registry_url: str, knoe_cfg_data: dict): + self.knoe_cfg_data = knoe_cfg_data self._registry_url = registry_url self.bg_canvas = _DummyCanvas() @@ -70,7 +70,7 @@ def test_db_build_registry_status_k3s_deployed_does_not_show_not_initialized(mon screen = _DummyDbScreen( registry_url="0.0.0.0:5000", - prole_cfg_data={"Global": {"DEPLOYMENT_MODE": "k3s"}}, + knoe_cfg_data={"Global": {"DEPLOYMENT_MODE": "k3s"}}, ) screen._ensure_db_build_registry_async() @@ -98,7 +98,7 @@ def test_db_build_registry_status_k3s_not_deployed_shows_init(monkeypatch): screen = _DummyDbScreen( registry_url="0.0.0.0:5000", - prole_cfg_data={"Global": {"DEPLOYMENT_MODE": "k3s"}}, + knoe_cfg_data={"Global": {"DEPLOYMENT_MODE": "k3s"}}, ) screen._ensure_db_build_registry_async() diff --git a/tests/installer/test_deploy_helpers.py b/tests/installer/test_deploy_helpers.py index 1a9f660..233fdc5 100644 --- a/tests/installer/test_deploy_helpers.py +++ b/tests/installer/test_deploy_helpers.py @@ -1,7 +1,7 @@ """ Unit tests for installer/deploy.py helpers. -Covers check_xcode_tools and build_prole_app_core error paths without +Covers check_xcode_tools and build_knoe_app_core error paths without requiring a real macOS Xcode build environment. """ from __future__ import annotations @@ -11,7 +11,7 @@ from pathlib import Path from unittest.mock import MagicMock, patch import pytest -from knoe.deploy import check_xcode_tools, build_prole_app_core +from knoe.deploy import check_xcode_tools, build_knoe_app_core # --------------------------------------------------------------------------- @@ -57,36 +57,36 @@ def test_check_xcode_tools_darwin_timeout(): # --------------------------------------------------------------------------- -# build_prole_app_core — error paths +# build_knoe_app_core — error paths # --------------------------------------------------------------------------- -def test_build_prole_app_core_not_darwin(tmp_path): +def test_build_knoe_app_core_not_darwin(tmp_path): with patch("knoe.deploy.platform.system", return_value="Linux"): with pytest.raises(Exception, match="macOS"): - build_prole_app_core(tmp_path) + build_knoe_app_core(tmp_path) -def test_build_prole_app_core_no_xcode(tmp_path): +def test_build_knoe_app_core_no_xcode(tmp_path): with patch("knoe.deploy.platform.system", return_value="Darwin"), \ patch("knoe.deploy.check_xcode_tools", return_value=False): with pytest.raises(Exception, match="[Xx]code"): - build_prole_app_core(tmp_path) + build_knoe_app_core(tmp_path) -def test_build_prole_app_core_no_build_script(tmp_path): - # xcode ok but prole-app/build.sh missing - prole_app = tmp_path / "prole-app" - prole_app.mkdir() +def test_build_knoe_app_core_no_build_script(tmp_path): + # xcode ok but knoe-app/build.sh missing + knoe_app = tmp_path / "knoe-app" + knoe_app.mkdir() with patch("knoe.deploy.platform.system", return_value="Darwin"), \ patch("knoe.deploy.check_xcode_tools", return_value=True): with pytest.raises(Exception, match="[Bb]uild script"): - build_prole_app_core(tmp_path) + build_knoe_app_core(tmp_path) -def test_build_prole_app_core_build_fails(tmp_path): - prole_app = tmp_path / "prole-app" - prole_app.mkdir() - build_sh = prole_app / "build.sh" +def test_build_knoe_app_core_build_fails(tmp_path): + knoe_app = tmp_path / "knoe-app" + knoe_app.mkdir() + build_sh = knoe_app / "build.sh" build_sh.write_text("#!/bin/bash\nexit 1\n") mock_result = MagicMock() mock_result.returncode = 1 @@ -96,13 +96,13 @@ def test_build_prole_app_core_build_fails(tmp_path): patch("knoe.deploy.check_xcode_tools", return_value=True), \ patch("knoe.deploy.subprocess.run", return_value=mock_result): with pytest.raises(Exception, match="[Bb]uild failed"): - build_prole_app_core(tmp_path) + build_knoe_app_core(tmp_path) -def test_build_prole_app_core_app_missing_after_build(tmp_path): - prole_app = tmp_path / "prole-app" - prole_app.mkdir() - build_sh = prole_app / "build.sh" +def test_build_knoe_app_core_app_missing_after_build(tmp_path): + knoe_app = tmp_path / "knoe-app" + knoe_app.mkdir() + build_sh = knoe_app / "build.sh" build_sh.write_text("#!/bin/bash\nexit 0\n") mock_result = MagicMock() mock_result.returncode = 0 @@ -111,22 +111,22 @@ def test_build_prole_app_core_app_missing_after_build(tmp_path): with patch("knoe.deploy.platform.system", return_value="Darwin"), \ patch("knoe.deploy.check_xcode_tools", return_value=True), \ patch("knoe.deploy.subprocess.run", return_value=mock_result): - # dist/Prole.app is not created → should raise + # dist/Knoe.app is not created → should raise with pytest.raises(Exception, match="[Pp]role.app"): - build_prole_app_core(tmp_path) + build_knoe_app_core(tmp_path) -def test_build_prole_app_core_success(tmp_path): - prole_app = tmp_path / "prole-app" - (prole_app / "dist").mkdir(parents=True) - app_path = prole_app / "dist" / "Prole.app" +def test_build_knoe_app_core_success(tmp_path): + knoe_app = tmp_path / "knoe-app" + (knoe_app / "dist").mkdir(parents=True) + app_path = knoe_app / "dist" / "Knoe.app" app_path.mkdir() - build_sh = prole_app / "build.sh" + build_sh = knoe_app / "build.sh" build_sh.write_text("#!/bin/bash\nexit 0\n") mock_result = MagicMock() mock_result.returncode = 0 with patch("knoe.deploy.platform.system", return_value="Darwin"), \ patch("knoe.deploy.check_xcode_tools", return_value=True), \ patch("knoe.deploy.subprocess.run", return_value=mock_result): - result = build_prole_app_core(tmp_path) + result = build_knoe_app_core(tmp_path) assert result == app_path diff --git a/tests/installer/test_deploy_screen_properties.py b/tests/installer/test_deploy_screen_properties.py index 796e08a..26b1e61 100644 --- a/tests/installer/test_deploy_screen_properties.py +++ b/tests/installer/test_deploy_screen_properties.py @@ -22,29 +22,29 @@ class _PropsApp(DeployScreenMixin): self.kerberos_kdc = _Var("10.0.0.3") -def test_generate_prole_properties_dev_writes_local_endpoints(tmp_path, monkeypatch): - (tmp_path / "prole-tools-app").mkdir(parents=True) +def test_generate_knoe_properties_dev_writes_local_endpoints(tmp_path, monkeypatch): + (tmp_path / "knoe-tools-app").mkdir(parents=True) monkeypatch.chdir(tmp_path) app = _PropsApp() - app.generate_prole_properties("Dev") + app.generate_knoe_properties("Dev") - content = (tmp_path / "prole-tools-app" / "prole.properties").read_text() + content = (tmp_path / "knoe-tools-app" / "knoe.properties").read_text() assert "pf.enabled=true" in content assert "svc.1.host=localhost" in content assert "svc.7.port=9402" in content -def test_generate_prole_properties_service_and_prod_skip_service_endpoints( +def test_generate_knoe_properties_service_and_prod_skip_service_endpoints( tmp_path, monkeypatch ): - (tmp_path / "prole-tools-app").mkdir(parents=True) + (tmp_path / "knoe-tools-app").mkdir(parents=True) monkeypatch.chdir(tmp_path) app = _PropsApp() for env in ("Service", "Prod"): - app.generate_prole_properties(env) - content = (tmp_path / "prole-tools-app" / "prole.properties").read_text() + app.generate_knoe_properties(env) + content = (tmp_path / "knoe-tools-app" / "knoe.properties").read_text() assert "pf.enabled=false" in content assert "svc.1.host=" not in content assert "Service/Prod endpoint mappings are intentionally not persisted here." in content @@ -82,13 +82,13 @@ class _RunDeploymentApp(DeployScreenMixin): } } - def generate_prole_properties(self, env: str): + def generate_knoe_properties(self, env: str): self.generated_env = env def update_deploy_step_status(self, *_args, **_kwargs): return None - def build_prole_app(self): + def build_knoe_app(self): return None def check_docker_running(self): diff --git a/tests/installer/test_deployment.py b/tests/installer/test_deployment.py index 53e44a8..2b65806 100644 --- a/tests/installer/test_deployment.py +++ b/tests/installer/test_deployment.py @@ -1,4 +1,4 @@ -"""Tests for prole/deployment.py – KnoeDeployment class.""" +"""Tests for knoe/deployment.py – KnoeDeployment class.""" from __future__ import annotations @@ -9,7 +9,7 @@ from pathlib import Path from unittest import mock from unittest.mock import MagicMock, patch, call -from prole.deployment import ( +from knoe.deployment import ( KnoeDeployment, _CFG_KEY_MAP, KUBECONFIG_FILENAME, @@ -29,14 +29,14 @@ def _make_controller(tmp_path): def _make_cfg_file(tmp_path, sections=None): - """Write a minimal prole.cfg and return its path.""" + """Write a minimal knoe.cfg and return its path.""" cfg = configparser.ConfigParser(interpolation=None) cfg.optionxform = str defaults = { "Global": {"NAMESPACE": "test-ns"}, "Initialize Cluster": {"ENVIRONMENT": "service"}, "Database Creation": {"DB_PASSWORD": "s3cret"}, - "System Environment": {"PROLE_CONF": str(tmp_path / "conf")}, + "System Environment": {"KNOE_CONF": str(tmp_path / "conf")}, "Optional Features": {"SUPABASE_ENABLED": "false"}, "Kerberos Authentication": {"ENABLED": "false"}, } @@ -48,7 +48,7 @@ def _make_cfg_file(tmp_path, sections=None): cfg.set(sec, k, v) conf_dir = tmp_path / "conf" conf_dir.mkdir(exist_ok=True) - cfg_path = conf_dir / "prole.cfg" + cfg_path = conf_dir / "knoe.cfg" with open(cfg_path, "w") as f: cfg.write(f) return cfg_path @@ -57,51 +57,51 @@ def _make_cfg_file(tmp_path, sections=None): def _make_deployment(tmp_path, sections=None): cfg_path = _make_cfg_file(tmp_path, sections) ctrl = _make_controller(tmp_path) - with mock.patch.dict(os.environ, {"PROLE_CONF": str(tmp_path / "conf")}): + with mock.patch.dict(os.environ, {"KNOE_CONF": str(tmp_path / "conf")}): dep = KnoeDeployment(ctrl, tmp_path) return dep, ctrl # --------------------------------------------------------------------------- -# Tests: __init__ and _load_prole_cfg +# Tests: __init__ and _load_knoe_cfg # --------------------------------------------------------------------------- class TestKnoeDeploymentInit: def test_init_loads_cfg(self, tmp_path): dep, _ = _make_deployment(tmp_path) - assert dep.prole_cfg_data["Global"]["NAMESPACE"] == "test-ns" - assert dep.prole_cfg_data["Initialize Cluster"]["ENVIRONMENT"] == "service" + assert dep.knoe_cfg_data["Global"]["NAMESPACE"] == "test-ns" + assert dep.knoe_cfg_data["Initialize Cluster"]["ENVIRONMENT"] == "service" def test_init_default_namespace(self, tmp_path): - """When prole.cfg has no namespace, default is set.""" + """When knoe.cfg has no namespace, default is set.""" cfg = configparser.ConfigParser(interpolation=None) cfg.optionxform = str cfg.add_section("Global") conf_dir = tmp_path / "conf" conf_dir.mkdir(exist_ok=True) - cfg_path = conf_dir / "prole.cfg" + cfg_path = conf_dir / "knoe.cfg" with open(cfg_path, "w") as f: cfg.write(f) ctrl = _make_controller(tmp_path) - with mock.patch.dict(os.environ, {"PROLE_CONF": str(conf_dir)}): + with mock.patch.dict(os.environ, {"KNOE_CONF": str(conf_dir)}): dep = KnoeDeployment(ctrl, tmp_path) - assert dep.prole_cfg_data["Global"]["NAMESPACE"] == "knoe-db" + assert dep.knoe_cfg_data["Global"]["NAMESPACE"] == "knoe-db" def test_init_no_cfg_file(self, tmp_path): - """When no prole.cfg exists, it still initialises.""" + """When no knoe.cfg exists, it still initialises.""" ctrl = _make_controller(tmp_path) - with mock.patch.dict(os.environ, {"PROLE_CONF": ""}, clear=False): + with mock.patch.dict(os.environ, {"KNOE_CONF": ""}, clear=False): dep = KnoeDeployment(ctrl, tmp_path) - assert dep.prole_cfg_data["Global"]["NAMESPACE"] == "knoe-db" + assert dep.knoe_cfg_data["Global"]["NAMESPACE"] == "knoe-db" def test_load_cfg_from_directory(self, tmp_path): - """PROLE_CONF pointing to a directory finds prole.cfg inside.""" + """KNOE_CONF pointing to a directory finds knoe.cfg inside.""" _make_cfg_file(tmp_path) ctrl = _make_controller(tmp_path) - with mock.patch.dict(os.environ, {"PROLE_CONF": str(tmp_path / "conf")}): + with mock.patch.dict(os.environ, {"KNOE_CONF": str(tmp_path / "conf")}): dep = KnoeDeployment(ctrl, tmp_path) - assert dep.cfg_path == tmp_path / "conf" / "prole.cfg" + assert dep.cfg_path == tmp_path / "conf" / "knoe.cfg" # --------------------------------------------------------------------------- @@ -142,40 +142,40 @@ class TestGetInput: class TestBuildDeployEnv: def test_basic_env(self, tmp_path): dep, _ = _make_deployment(tmp_path) - dep.prole_cfg_data["Deployment"] = {"KUBECONFIG_PATH": ""} + dep.knoe_cfg_data["Deployment"] = {"KUBECONFIG_PATH": ""} env = dep._build_deploy_env() - assert env["PROLE_HOME"] == str(tmp_path) - assert env["PROLE_SERVICE"] == str(tmp_path) + assert env["KNOE_HOME"] == str(tmp_path) + assert env["KNOE_SERVICE"] == str(tmp_path) assert env["NAMESPACE"] == "test-ns" - assert env["PROLE_MODE"] == "k3s" + assert env["KNOE_MODE"] == "k3s" def test_kubeconfig_set_when_exists(self, tmp_path): kc_path = tmp_path / "kube.cfg" kc_path.write_text("dummy") dep, _ = _make_deployment(tmp_path) - dep.prole_cfg_data["Deployment"] = {"KUBECONFIG_PATH": str(kc_path)} + dep.knoe_cfg_data["Deployment"] = {"KUBECONFIG_PATH": str(kc_path)} env = dep._build_deploy_env() assert env["KUBECONFIG"] == str(kc_path) def test_kubeconfig_not_set_when_missing(self, tmp_path): dep, _ = _make_deployment(tmp_path) - dep.prole_cfg_data["Deployment"] = {"KUBECONFIG_PATH": "/nonexistent/path"} + dep.knoe_cfg_data["Deployment"] = {"KUBECONFIG_PATH": "/nonexistent/path"} env = dep._build_deploy_env() # Should not have set KUBECONFIG to a non-existent file assert env.get("KUBECONFIG") != "/nonexistent/path" def test_db_password_in_env(self, tmp_path): dep, _ = _make_deployment(tmp_path) - dep.prole_cfg_data["Deployment"] = {"KUBECONFIG_PATH": ""} + dep.knoe_cfg_data["Deployment"] = {"KUBECONFIG_PATH": ""} env = dep._build_deploy_env() assert env.get("DB_PASSWORD") == "s3cret" assert env.get("OPENTOFU_ADMIN_PASSWORD") == "s3cret" - def test_prole_conf_in_env(self, tmp_path): + def test_knoe_conf_in_env(self, tmp_path): dep, _ = _make_deployment(tmp_path) - dep.prole_cfg_data["Deployment"] = {"KUBECONFIG_PATH": ""} + dep.knoe_cfg_data["Deployment"] = {"KUBECONFIG_PATH": ""} env = dep._build_deploy_env() - assert env.get("PROLE_CONF") == str(tmp_path / "conf") + assert env.get("KNOE_CONF") == str(tmp_path / "conf") # --------------------------------------------------------------------------- @@ -258,12 +258,12 @@ class TestFetchKubeconfig: class TestApply: def test_no_pipeline_dir(self, tmp_path): dep, _ = _make_deployment(tmp_path) - dep.prole_cfg_data["Deployment"] = {} + dep.knoe_cfg_data["Deployment"] = {} assert dep.apply() is False def test_pipeline_dir_nonexistent(self, tmp_path): dep, _ = _make_deployment(tmp_path) - dep.prole_cfg_data["Deployment"] = {"OPENTOFU_PIPELINE_DIR": "/nonexistent"} + dep.knoe_cfg_data["Deployment"] = {"OPENTOFU_PIPELINE_DIR": "/nonexistent"} assert dep.apply() is False @patch("subprocess.run") @@ -271,7 +271,7 @@ class TestApply: pipeline = tmp_path / "pipeline" pipeline.mkdir() dep, _ = _make_deployment(tmp_path) - dep.prole_cfg_data["Deployment"] = {"OPENTOFU_PIPELINE_DIR": str(pipeline)} + dep.knoe_cfg_data["Deployment"] = {"OPENTOFU_PIPELINE_DIR": str(pipeline)} mock_run.side_effect = subprocess.CalledProcessError(1, "tofu") assert dep.apply() is False @@ -280,7 +280,7 @@ class TestApply: pipeline = tmp_path / "pipeline" pipeline.mkdir() dep, _ = _make_deployment(tmp_path) - dep.prole_cfg_data["Deployment"] = {"OPENTOFU_PIPELINE_DIR": str(pipeline)} + dep.knoe_cfg_data["Deployment"] = {"OPENTOFU_PIPELINE_DIR": str(pipeline)} assert dep.apply() is False @patch.object(KnoeDeployment, "_run_post_apply_scripts", return_value=True) @@ -289,7 +289,7 @@ class TestApply: pipeline = tmp_path / "pipeline" pipeline.mkdir() dep, ctrl = _make_deployment(tmp_path) - dep.prole_cfg_data["Deployment"] = { + dep.knoe_cfg_data["Deployment"] = { "OPENTOFU_PIPELINE_DIR": str(pipeline), "KUBECONFIG_PATH": "", } @@ -308,19 +308,19 @@ class TestApply: class TestRunPostApplyScripts: def test_all_scripts_succeed(self, tmp_path): dep, ctrl = _make_deployment(tmp_path) - dep.prole_cfg_data["Deployment"] = {"KUBECONFIG_PATH": ""} + dep.knoe_cfg_data["Deployment"] = {"KUBECONFIG_PATH": ""} dep._run_script = MagicMock(return_value=0) dep._run_supabase_deploy = MagicMock(return_value=True) - with patch("prole.deployment.cnpg_initialize", return_value=None): + with patch("knoe.deployment.cnpg_initialize", return_value=None): assert dep._run_post_apply_scripts() is True assert dep._run_script.call_count == 4 def test_script_failure(self, tmp_path): dep, ctrl = _make_deployment(tmp_path) - dep.prole_cfg_data["Deployment"] = {"KUBECONFIG_PATH": ""} + dep.knoe_cfg_data["Deployment"] = {"KUBECONFIG_PATH": ""} dep._run_script = MagicMock(return_value=1) dep._run_supabase_deploy = MagicMock(return_value=True) - with patch("prole.deployment.cnpg_initialize", return_value=None): + with patch("knoe.deployment.cnpg_initialize", return_value=None): assert dep._run_post_apply_scripts() is False def test_kerberos_flag(self, tmp_path): @@ -330,10 +330,10 @@ class TestRunPostApplyScripts: "Kerberos Authentication": {"ENABLED": "true"}, }, ) - dep.prole_cfg_data["Deployment"] = {"KUBECONFIG_PATH": ""} + dep.knoe_cfg_data["Deployment"] = {"KUBECONFIG_PATH": ""} dep._run_script = MagicMock(return_value=0) dep._run_supabase_deploy = MagicMock(return_value=True) - with patch("prole.deployment.cnpg_initialize", return_value=None): + with patch("knoe.deployment.cnpg_initialize", return_value=None): dep._run_post_apply_scripts() first_call = dep._run_script.call_args_list[0] assert "init_common_services" in str(first_call) @@ -417,22 +417,22 @@ class TestRunSupabaseDeploy: class TestDuplicateK3dToK3s: @patch.object(KnoeDeployment, "_fetch_kubeconfig", return_value=None) @patch( - "prole.deployment._detect_ansible_topology", + "knoe.deployment._detect_ansible_topology", return_value={"k3s_server_url": "https://example.com:6443"}, ) def test_no_kubeconfig(self, mock_topology, mock_fetch, tmp_path): dep, _ = _make_deployment(tmp_path) assert dep.duplicate_k3d_to_k3s() is False - @patch("prole.deployment._detect_ansible_topology", return_value={}) + @patch("knoe.deployment._detect_ansible_topology", return_value={}) def test_no_server_url(self, mock_topology, tmp_path): dep, _ = _make_deployment(tmp_path) assert dep.duplicate_k3d_to_k3s() is False - @patch("prole.deployment._sync_opentofu_pipeline", side_effect=Exception("boom")) + @patch("knoe.deployment._sync_opentofu_pipeline", side_effect=Exception("boom")) @patch.object(KnoeDeployment, "_fetch_kubeconfig") @patch( - "prole.deployment._detect_ansible_topology", + "knoe.deployment._detect_ansible_topology", return_value={ "k3s_server_url": "https://example.com:6443", "k3s_token": "tok123", @@ -445,10 +445,10 @@ class TestDuplicateK3dToK3s: dep, _ = _make_deployment(tmp_path) assert dep.duplicate_k3d_to_k3s() is False - @patch("prole.deployment._sync_opentofu_pipeline") + @patch("knoe.deployment._sync_opentofu_pipeline") @patch.object(KnoeDeployment, "_fetch_kubeconfig") @patch( - "prole.deployment._detect_ansible_topology", + "knoe.deployment._detect_ansible_topology", return_value={ "k3s_server_url": "https://example.com:6443", "k3s_token": "tok123", @@ -465,7 +465,7 @@ class TestDuplicateK3dToK3s: mock_sync.return_value = pipeline_dir dep, _ = _make_deployment(tmp_path) assert dep.duplicate_k3d_to_k3s() is True - assert dep.prole_cfg_data["Deployment"]["OPENTOFU_PIPELINE_DIR"] == str( + assert dep.knoe_cfg_data["Deployment"]["OPENTOFU_PIPELINE_DIR"] == str( pipeline_dir ) - assert dep.prole_cfg_data["Deployment"]["KUBECONFIG_PATH"] == str(kc) + assert dep.knoe_cfg_data["Deployment"]["KUBECONFIG_PATH"] == str(kc) diff --git a/tests/installer/test_env_helpers.py b/tests/installer/test_env_helpers.py index c2aa6a9..4033134 100644 --- a/tests/installer/test_env_helpers.py +++ b/tests/installer/test_env_helpers.py @@ -28,11 +28,11 @@ from knoe.config import ( normalize_version, get_resource_path as cfg_get_resource_path, get_docker_build_platform_args as cfg_get_docker_args, - _is_prole_secret as cfg_is_prole_secret, + _is_knoe_secret as cfg_is_knoe_secret, _is_openbao_ref as cfg_is_openbao_ref, _encrypt_cfg_secret, _resolve_secret_value, - _update_prole_cfg_value, + _update_knoe_cfg_value, get_properties, get_config_value, setup_logging, @@ -58,8 +58,8 @@ from knoe.core.env import ( _find_kubeconfig_file, _format_ollama_host, _is_openbao_ref, - _is_prole_secret, - _k3d_prole_data_volume_args, + _is_knoe_secret, + _k3d_knoe_data_volume_args, _local_registry_enabled, _looks_like_k8s_bearer_token, _normalize_cluster_env, @@ -81,20 +81,20 @@ from knoe.core.env import ( ) -# ===== _is_prole_secret / _is_openbao_ref ===== +# ===== _is_knoe_secret / _is_openbao_ref ===== class TestSecretDetection: - def test_is_prole_secret_true(self): - assert _is_prole_secret("${PROLE_SECRET:abc}") is True + def test_is_knoe_secret_true(self): + assert _is_knoe_secret("${KNOE_SECRET:abc}") is True - def test_is_prole_secret_false(self): - assert _is_prole_secret("plain") is False - assert _is_prole_secret("") is False - assert _is_prole_secret(None) is False + def test_is_knoe_secret_false(self): + assert _is_knoe_secret("plain") is False + assert _is_knoe_secret("") is False + assert _is_knoe_secret(None) is False def test_is_openbao_ref_true(self): - assert _is_openbao_ref("${OPENBAO:kv/prole/ns/db#password}") is True + assert _is_openbao_ref("${OPENBAO:kv/knoe/ns/db#password}") is True def test_is_openbao_ref_false(self): assert _is_openbao_ref("plain") is False @@ -102,7 +102,7 @@ class TestSecretDetection: assert _is_openbao_ref(None) is False def test_cfg_variants(self): - assert cfg_is_prole_secret("${PROLE_SECRET:x}") is True + assert cfg_is_knoe_secret("${KNOE_SECRET:x}") is True assert cfg_is_openbao_ref("${OPENBAO:x}") is True @@ -161,19 +161,19 @@ class TestClusterEnvNormalization: ("dev", "dev"), ("k3d", "dev"), ("k3d-dev", "dev"), - ("prole-dev-cluster", "dev"), - ("k3d-prole-dev-cluster", "dev"), + ("knoe-dev-cluster", "dev"), + ("k3d-knoe-dev-cluster", "dev"), ("k3d-custom", "dev"), ("service", "service"), ("k3s", "service"), ("k3s-service", "service"), - ("prole-service-cluster", "service"), - ("prole-service-x", "service"), + ("knoe-service-cluster", "service"), + ("knoe-service-x", "service"), ("prod", "prod"), ("production", "prod"), ("k8s", "prod"), - ("prole-prod-cluster", "prod"), - ("prole-prod-x", "prod"), + ("knoe-prod-cluster", "prod"), + ("knoe-prod-x", "prod"), ("", ""), (None, ""), ("unknown", "unknown"), @@ -190,9 +190,9 @@ class TestClusterEnvNormalization: assert _cluster_env_radio_value(None) == "" def test_deployment_target_label(self): - assert _deployment_target_label("dev") == "prole-dev-cluster" - assert _deployment_target_label("k3s") == "prole-service-cluster" - assert _deployment_target_label("k8s") == "prole-prod-cluster" + assert _deployment_target_label("dev") == "knoe-dev-cluster" + assert _deployment_target_label("k3s") == "knoe-service-cluster" + assert _deployment_target_label("k8s") == "knoe-prod-cluster" assert _deployment_target_label(None) == "" def test_deployment_mode_from_env(self): @@ -218,8 +218,8 @@ class TestTokenHelpers: def test_normalize_k3s_token_openbao(self): assert _normalize_k3s_token("${OPENBAO:kv/x}") == "" - def test_normalize_k3s_token_prole_secret(self): - assert _normalize_k3s_token("${PROLE_SECRET:junk}") == "" + def test_normalize_k3s_token_knoe_secret(self): + assert _normalize_k3s_token("${KNOE_SECRET:junk}") == "" def test_looks_like_bearer_jwt(self): assert _looks_like_k8s_bearer_token("a.b.c") is True @@ -279,11 +279,11 @@ class TestOllamaHelpers: class TestOpenbaoPlaceholder: def test_with_key(self): r = _openbao_placeholder("myns", "db", "password") - assert r == "${OPENBAO:kv/prole/myns/db#password}" + assert r == "${OPENBAO:kv/knoe/myns/db#password}" def test_without_key(self): r = _openbao_placeholder("myns", "db") - assert r == "${OPENBAO:kv/prole/myns/db}" + assert r == "${OPENBAO:kv/knoe/myns/db}" def test_default_namespace(self): r = _openbao_placeholder("", "db", "pw") @@ -327,17 +327,17 @@ class TestExpandHelpers: def test_preserve_cfg_expr_for_persistence_keeps_home_token(self): value = _preserve_cfg_expr_for_persistence( - "${HOME}/dev/prole/data/staging", - "/Users/chrisfu/dev/prole/data/staging", + "${HOME}/dev/knoe/data/staging", + "/Users/chrisfu/dev/knoe/data/staging", ) - assert value == "${HOME}/dev/prole/data/staging" + assert value == "${HOME}/dev/knoe/data/staging" def test_preserve_cfg_expr_for_persistence_uses_expanded_without_tokens(self): value = _preserve_cfg_expr_for_persistence( - "/Users/chrisfu/dev/prole/data/staging", - "/Users/chrisfu/dev/prole/data/staging", + "/Users/chrisfu/dev/knoe/data/staging", + "/Users/chrisfu/dev/knoe/data/staging", ) - assert value == "/Users/chrisfu/dev/prole/data/staging" + assert value == "/Users/chrisfu/dev/knoe/data/staging" # ===== _collect_cfg_vars ===== @@ -348,9 +348,9 @@ class TestCollectCfgVars: cfg = configparser.ConfigParser(interpolation=None) cfg.optionxform = str cfg.add_section("Global") - cfg["Global"]["NS"] = "prole-test" + cfg["Global"]["NS"] = "knoe-test" result = env_collect_cfg_vars(cfg) - assert result["NS"] == "prole-test" + assert result["NS"] == "knoe-test" def test_cfg_collect(self): cfg = configparser.ConfigParser(interpolation=None) @@ -430,8 +430,8 @@ class TestParseInternalARecords: def test_basic(self, tmp_path): f = tmp_path / "dns.yml" f.write_text( - "prole_domain: example.com\n" - "prole_internal_a_records:\n" + "knoe_domain: example.com\n" + "knoe_internal_a_records:\n" " - fqdn: host1.example.com\n" " ipv4: 10.0.0.1\n" " - fqdn: host2.example.com\n" @@ -479,19 +479,19 @@ class TestDetectAnsibleK3sSettings: # Host vars are intentionally empty; the detection should still infer a # server host from the k3s_servers group. - (inventory_path / "host_vars" / "myrddin.prole.org.yml").write_text("\n") - (inventory_path / "host_vars" / "pi.prole.org.yml").write_text("\n") + (inventory_path / "host_vars" / "myrddin.knoe.org.yml").write_text("\n") + (inventory_path / "host_vars" / "pi.knoe.org.yml").write_text("\n") groups = { "k3s_hosts:children": ["k3s_servers", "k3s_agents"], - "k3s_servers": ["myrddin.prole.org"], - "k3s_agents": ["pi.prole.org"], + "k3s_servers": ["myrddin.knoe.org"], + "k3s_agents": ["pi.knoe.org"], } res = _detect_ansible_k3s_settings( - inventory_path=inventory_path, groups=groups, domain="prole.org", ip_map={} + inventory_path=inventory_path, groups=groups, domain="knoe.org", ip_map={} ) - assert res["server_host"] == "myrddin.prole.org" - assert res["server_url"] == "https://myrddin.prole.org:6443" + assert res["server_host"] == "myrddin.knoe.org" + assert res["server_url"] == "https://myrddin.knoe.org:6443" class TestDetectAnsibleStorageMounts: @@ -500,7 +500,7 @@ class TestDetectAnsibleStorageMounts: hv = inventory / "host_vars" hv.mkdir(parents=True) - (hv / "myrddin.prole.org.yml").write_text( + (hv / "myrddin.knoe.org.yml").write_text( """ iscsi_targets: - name: syno @@ -508,11 +508,11 @@ iscsi_targets: - name: d001 path: /synology/d001 k3s_service_node_labels: - - prole.org/node-role=db - - prole.org/storage=synology + - knoe.org/node-role=db + - knoe.org/storage=synology """.lstrip() ) - (hv / "pi.prole.org.yml").write_text( + (hv / "pi.knoe.org.yml").write_text( """ iscsi_targets: - name: syno @@ -523,14 +523,14 @@ iscsi_targets: ) mounts = _detect_ansible_storage_mounts(inventory) - assert mounts["d001"]["host"] == "myrddin.prole.org" + assert mounts["d001"]["host"] == "myrddin.knoe.org" assert mounts["d001"]["path"] == "/synology/d001" - assert mounts["d003"]["host"] == "pi.prole.org" + assert mounts["d003"]["host"] == "pi.knoe.org" assert mounts["d003"]["path"] == "/synology/d003" labels = _detect_ansible_node_labels(inventory) - assert labels["myrddin.prole.org"]["prole.org/node-role"] == "db" - assert labels["myrddin.prole.org"]["prole.org/storage"] == "synology" + assert labels["myrddin.knoe.org"]["knoe.org/node-role"] == "db" + assert labels["myrddin.knoe.org"]["knoe.org/storage"] == "synology" # ===== _resolve_host_ip ===== @@ -626,16 +626,16 @@ class TestBuildPortForwards: assert len(mappings) >= 8 -# ===== _k3d_prole_data_volume_args ===== +# ===== _k3d_knoe_data_volume_args ===== class TestK3dVolumeArgs: def test_empty(self): - assert _k3d_prole_data_volume_args("") == [] - assert _k3d_prole_data_volume_args(None) == [] + assert _k3d_knoe_data_volume_args("") == [] + assert _k3d_knoe_data_volume_args(None) == [] def test_valid(self, tmp_path): - result = _k3d_prole_data_volume_args(str(tmp_path / "data")) + result = _k3d_knoe_data_volume_args(str(tmp_path / "data")) assert result[0] == "--volume" assert "storage@all" in result[1] @@ -650,7 +650,7 @@ class TestFindKubeconfig: env = {"KUBECONFIG": str(kc)} assert _find_kubeconfig_file(env) == str(kc) - def test_prefers_project_root_prole_k3s_over_etc_secrets( + def test_prefers_project_root_knoe_k3s_over_etc_secrets( self, tmp_path, monkeypatch ): # If both exist, prefer the Ansible-fetched kubeconfig in project root. @@ -664,14 +664,14 @@ class TestFindKubeconfig: (fake_root / "etc" / "secrets").mkdir(parents=True, exist_ok=True) etc_kc = fake_root / "etc" / "secrets" / "k3s.kubeconfig" etc_kc.write_text("etc") - prole_kc = fake_root / "prole-k3s.kubeconfig" - prole_kc.write_text("root") + knoe_kc = fake_root / "knoe-k3s.kubeconfig" + knoe_kc.write_text("root") monkeypatch.setattr(env_mod, "PROJECT_ROOT", fake_root) # Must pass a non-empty mapping; `_find_kubeconfig_file({})` falls back # to `os.environ` because an empty dict is falsy. - assert _find_kubeconfig_file({"KUBECONFIG": ""}) == str(prole_kc) + assert _find_kubeconfig_file({"KUBECONFIG": ""}) == str(knoe_kc) def test_none_found(self): env = {"KUBECONFIG": "/nonexistent/path"} @@ -780,7 +780,7 @@ class TestLoadProperties: class TestWriteK3sKubeconfig: def test_basic(self, tmp_path): with mock.patch("knoe.config.PROJECT_ROOT", tmp_path), mock.patch.dict( - os.environ, {"PROLE_SERVICE": "", "PROLE_HOME": ""}, clear=False + os.environ, {"KNOE_SERVICE": "", "KNOE_HOME": ""}, clear=False ): result = _write_k3s_kubeconfig("https://server:6443", "mytoken") assert result.exists() @@ -790,7 +790,7 @@ class TestWriteK3sKubeconfig: def test_no_scheme(self, tmp_path): with mock.patch("knoe.config.PROJECT_ROOT", tmp_path), mock.patch.dict( - os.environ, {"PROLE_SERVICE": "", "PROLE_HOME": ""}, clear=False + os.environ, {"KNOE_SERVICE": "", "KNOE_HOME": ""}, clear=False ): result = _write_k3s_kubeconfig("server:6443", "tok") content = result.read_text() @@ -808,20 +808,20 @@ class TestMergeKubeconfig: standalone.write_text( "apiVersion: v1\nkind: Config\n" "clusters:\n- cluster:\n server: https://srv:6443\n" - " insecure-skip-tls-verify: true\n name: prole-k3s\n" - "contexts:\n- context:\n cluster: prole-k3s\n user: prole-k3s\n" - " name: prole-k3s\ncurrent-context: prole-k3s\n" - "users:\n- name: prole-k3s\n user:\n token: tok123\n" + " insecure-skip-tls-verify: true\n name: knoe-k3s\n" + "contexts:\n- context:\n cluster: knoe-k3s\n user: knoe-k3s\n" + " name: knoe-k3s\ncurrent-context: knoe-k3s\n" + "users:\n- name: knoe-k3s\n user:\n token: tok123\n" ) with mock.patch("knoe.config.Path.home", return_value=tmp_path): result = _merge_kubeconfig(str(standalone)) if result: merged = (kube_dir / "config").read_text() - assert "prole-k3s" in merged + assert "knoe-k3s" in merged assert "tok123" in merged def test_merge_adds_context_to_existing(self, tmp_path): - """Merge adds the prole-k3s context alongside an existing context.""" + """Merge adds the knoe-k3s context alongside an existing context.""" kube_dir = tmp_path / ".kube" kube_dir.mkdir() existing = kube_dir / "config" @@ -836,16 +836,16 @@ class TestMergeKubeconfig: standalone.write_text( "apiVersion: v1\nkind: Config\n" "clusters:\n- cluster:\n server: https://srv:6443\n" - " insecure-skip-tls-verify: true\n name: prole-k3s\n" - "contexts:\n- context:\n cluster: prole-k3s\n user: prole-k3s\n" - " name: prole-k3s\ncurrent-context: prole-k3s\n" - "users:\n- name: prole-k3s\n user:\n token: tok123\n" + " insecure-skip-tls-verify: true\n name: knoe-k3s\n" + "contexts:\n- context:\n cluster: knoe-k3s\n user: knoe-k3s\n" + " name: knoe-k3s\ncurrent-context: knoe-k3s\n" + "users:\n- name: knoe-k3s\n user:\n token: tok123\n" ) with mock.patch("knoe.config.Path.home", return_value=tmp_path): result = _merge_kubeconfig(str(standalone)) if result: merged = existing.read_text() - assert "prole-k3s" in merged + assert "knoe-k3s" in merged assert "other-ctx" in merged def test_merge_returns_false_when_kubectl_missing(self, tmp_path): @@ -901,52 +901,52 @@ class TestProperties: assert get_config_value("nonexistent_key_xyz", "fallback") == "fallback" -# ===== _update_prole_cfg_value ===== +# ===== _update_knoe_cfg_value ===== class TestUpdateKnoeCfgValue: def test_creates_section(self, tmp_path): - cfg_file = tmp_path / "conf" / "prole.cfg" + cfg_file = tmp_path / "conf" / "knoe.cfg" cfg_file.parent.mkdir(parents=True) cfg_file.write_text("[Global]\nFOO = bar\n") with mock.patch("knoe.config.PROJECT_ROOT", tmp_path): - _update_prole_cfg_value("NewSection", "KEY", "VALUE") + _update_knoe_cfg_value("NewSection", "KEY", "VALUE") content = cfg_file.read_text() assert "NewSection" in content assert "KEY" in content def test_missing_cfg(self, tmp_path): with mock.patch("knoe.config.PROJECT_ROOT", tmp_path): - _update_prole_cfg_value("Sec", "K", "V") # should not raise + _update_knoe_cfg_value("Sec", "K", "V") # should not raise - def test_writes_through_prole_conf_symlink(self, tmp_path): - conf_dir = tmp_path / "prole-conf" + def test_writes_through_knoe_conf_symlink(self, tmp_path): + conf_dir = tmp_path / "knoe-conf" dev_dir = conf_dir / "dev" svc_dir = conf_dir / "service" dev_dir.mkdir(parents=True) svc_dir.mkdir(parents=True) - dev_base = dev_dir / "prole.cfg" - svc_base = svc_dir / "prole.cfg" + dev_base = dev_dir / "knoe.cfg" + svc_base = svc_dir / "knoe.cfg" dev_base.write_text("[Global]\nFOO = base\n") svc_base.write_text("[Global]\nFOO = service\n") - entry = conf_dir / "prole.cfg" + entry = conf_dir / "knoe.cfg" os.symlink(str(dev_base), str(entry)) - with mock.patch.dict(os.environ, {"PROLE_CONF": str(conf_dir)}): - _update_prole_cfg_value("Global", "FOO", "updated") + with mock.patch.dict(os.environ, {"KNOE_CONF": str(conf_dir)}): + _update_knoe_cfg_value("Global", "FOO", "updated") assert "FOO = updated" in dev_base.read_text() assert svc_base.read_text() == "[Global]\nFOO = service\n" def test_service_mode_drops_placeholder_endpoint_value(self, tmp_path): - cfg_file = tmp_path / "conf" / "prole.cfg" + cfg_file = tmp_path / "conf" / "knoe.cfg" cfg_file.parent.mkdir(parents=True) cfg_file.write_text("[Global]\nSERVICE_HOSTNAME = old-host\n") with mock.patch("knoe.config.PROJECT_ROOT", tmp_path): - _update_prole_cfg_value( + _update_knoe_cfg_value( "Global", "SERVICE_HOSTNAME", "${SERVICE_HOSTNAME}", @@ -962,7 +962,7 @@ class TestPersistenceFilters: values = { "API_SERVICE_ENDPOINT": "http://localhost:8081", "SERVICE_HOSTNAME": "k3d.localhost", - "PROLE_K3S_SERVER": "https://myrddin.prole.org:6443", + "PROLE_K3S_SERVER": "https://myrddin.knoe.org:6443", "SERVICE_NAMESPACE": "knoe-system", } @@ -973,7 +973,7 @@ class TestPersistenceFilters: explicit_keys={"PROLE_K3S_SERVER"}, ) - assert filtered == {"PROLE_K3S_SERVER": "https://myrddin.prole.org:6443"} + assert filtered == {"PROLE_K3S_SERVER": "https://myrddin.knoe.org:6443"} def test_service_mode_keeps_explicit_service_namespace(self): filtered = _filter_cfg_values_for_persistence( @@ -1015,47 +1015,47 @@ class TestPlatformHelpers: assert isinstance(args, list) -# ===== _render_prole_cfg ===== +# ===== _render_knoe_cfg ===== class TestRenderKnoeCfg: def test_minimal(self): - from knoe.core.env import _render_prole_cfg + from knoe.core.env import _render_knoe_cfg - result = _render_prole_cfg( + result = _render_knoe_cfg( inputs={ - "env_setup.PROLE_HOME": "/opt/prole", + "env_setup.KNOE_HOME": "/opt/knoe", "env_setup.NAMESPACE": "test-ns", }, - globals_to_save={"PROLE_HOME": "/opt/prole", "NAMESPACE": "test-ns"}, + globals_to_save={"KNOE_HOME": "/opt/knoe", "NAMESPACE": "test-ns"}, sections={}, generated_at="2025-01-01 00:00:00", ) assert "[Global]" in result - assert "PROLE_HOME" in result + assert "KNOE_HOME" in result assert "test-ns" in result or "NAMESPACE" in result def test_with_sections(self): - from knoe.core.env import _render_prole_cfg + from knoe.core.env import _render_knoe_cfg - result = _render_prole_cfg( + result = _render_knoe_cfg( inputs={ - "env_setup.PROLE_HOME": "/opt/prole", - "env_setup.PROLE_CONF": "/opt/prole/conf", - "env_setup.PROLE_DATA": "/opt/prole/data", - "env_setup.PROLE_LOGS": "/opt/prole/logs", - "env_setup.PROLE_SERVICE": "/opt/prole/etc", + "env_setup.KNOE_HOME": "/opt/knoe", + "env_setup.KNOE_CONF": "/opt/knoe/conf", + "env_setup.PROLE_DATA": "/opt/knoe/data", + "env_setup.PROLE_LOGS": "/opt/knoe/logs", + "env_setup.KNOE_SERVICE": "/opt/knoe/etc", "env_setup.NAMESPACE": "myns", "init_password.db_namespace": "myns", - "init_password.db_username": "prole", + "init_password.db_username": "knoe", "init_cluster.cluster_env": "dev", "init_cluster.supabase_enabled": "false", "init_cluster.kerberos_enabled": "false", "init_cluster.at_rest_encryption_enabled": "false", }, - globals_to_save={"PROLE_HOME": "/opt/prole", "NAMESPACE": "myns"}, + globals_to_save={"KNOE_HOME": "/opt/knoe", "NAMESPACE": "myns"}, sections={ - "Database Creation": {"DB_USER": "prole", "NAMESPACE": "myns"}, + "Database Creation": {"DB_USER": "knoe", "NAMESPACE": "myns"}, "Docker Build": {}, "Kerberos Authentication": {"ENABLED": "false"}, }, @@ -1064,33 +1064,33 @@ class TestRenderKnoeCfg: assert "[Inputs]" in result def test_does_not_inject_placeholder_filesystem_paths(self): - """New policy: prole.cfg should not introduce `${...}` placeholders for filesystem paths.""" + """New policy: knoe.cfg should not introduce `${...}` placeholders for filesystem paths.""" - from knoe.core.env import _render_prole_cfg + from knoe.core.env import _render_knoe_cfg - result = _render_prole_cfg( + result = _render_knoe_cfg( inputs={ - # Simulate an operator/session where PROLE_HOME is known, but we + # Simulate an operator/session where KNOE_HOME is known, but we # do not want the renderer to normalize filesystem paths into # placeholders. - "env_setup.PROLE_HOME": "", - "env_setup.PROLE_CONF": "", + "env_setup.KNOE_HOME": "", + "env_setup.KNOE_CONF": "", "env_setup.PROLE_DATA": "", "env_setup.PROLE_LOGS": "", - "env_setup.PROLE_SERVICE": "", + "env_setup.KNOE_SERVICE": "", "env_setup.NAMESPACE": "test-ns", }, - globals_to_save={"PROLE_HOME": "/opt/prole", "NAMESPACE": "test-ns"}, + globals_to_save={"KNOE_HOME": "/opt/knoe", "NAMESPACE": "test-ns"}, sections={}, generated_at="2025-01-01 00:00:00", ) - # Must not emit placeholder filesystem paths like `${PROLE_HOME}`. - assert "${PROLE_HOME}" not in result - assert "${PROLE_CONF}" not in result + # Must not emit placeholder filesystem paths like `${KNOE_HOME}`. + assert "${KNOE_HOME}" not in result + assert "${KNOE_CONF}" not in result assert "${PROLE_DATA}" not in result assert "${PROLE_LOGS}" not in result - assert "${PROLE_SERVICE}" not in result + assert "${KNOE_SERVICE}" not in result # Must not inject derived filesystem keys that rely on placeholder expansion. assert "ANSIBLE_INFRASTRUCTURE" not in result @@ -1136,7 +1136,7 @@ class TestRegistryManifestProbe: monkeypatch.setattr(http.client, "HTTPConnection", _Conn) - assert _registry_image_ref_exists("myrddin.prole.org:5000/knoe-db:latest") is True + assert _registry_image_ref_exists("myrddin.knoe.org:5000/knoe-db:latest") is True assert requests and requests[0][0] == "HEAD" assert all(m != "GET" for m, _ in requests) @@ -1164,7 +1164,7 @@ class TestRegistryManifestProbe: return None monkeypatch.setattr(http.client, "HTTPConnection", _Conn) - assert _registry_image_ref_exists("myrddin.prole.org:5000/knoe-db:latest") is False + assert _registry_image_ref_exists("myrddin.knoe.org:5000/knoe-db:latest") is False def test_head_405_falls_back_to_get(self, monkeypatch): import http.client @@ -1196,5 +1196,5 @@ class TestRegistryManifestProbe: return None monkeypatch.setattr(http.client, "HTTPConnection", _Conn) - assert _registry_image_ref_exists("myrddin.prole.org:5000/knoe-db:latest") is True + assert _registry_image_ref_exists("myrddin.knoe.org:5000/knoe-db:latest") is True assert requests == ["HEAD", "GET"] diff --git a/tests/installer/test_environment_screen_expands_shell_vars.py b/tests/installer/test_environment_screen_expands_shell_vars.py index 939e61d..273f230 100644 --- a/tests/installer/test_environment_screen_expands_shell_vars.py +++ b/tests/installer/test_environment_screen_expands_shell_vars.py @@ -5,9 +5,9 @@ from pathlib import Path def test_environment_screen_expands_shell_vars_for_filesystem(monkeypatch, tmp_path: Path): - """Regression: `$HOME`/`$PROLE_HOME` must be expanded before mkdir/copy. + """Regression: `$HOME`/`$KNOE_HOME` must be expanded before mkdir/copy. - Without this, setting `PROLE_HOME=$HOME/prole` can create a literal `$HOME` + Without this, setting `KNOE_HOME=$HOME/knoe` can create a literal `$HOME` directory in the current working directory. """ @@ -33,15 +33,15 @@ def test_environment_screen_expands_shell_vars_for_filesystem(monkeypatch, tmp_p dummy = Dummy() values = { - "PROLE_HOME": "$HOME/prole", - "PROLE_CONF": "$PROLE_HOME/conf", - "PROLE_DATA": "$PROLE_HOME/data", - "PROLE_LOGS": "$PROLE_HOME/logs", - "PROLE_SERVICE": "$PROLE_HOME/etc", + "KNOE_HOME": "$HOME/knoe", + "KNOE_CONF": "$KNOE_HOME/conf", + "PROLE_DATA": "$KNOE_HOME/data", + "PROLE_LOGS": "$KNOE_HOME/logs", + "KNOE_SERVICE": "$KNOE_HOME/etc", } dummy._save_env_to_file(values) - expected_home = home_dir / "prole" + expected_home = home_dir / "knoe" assert expected_home.is_dir() assert (expected_home / "conf").is_dir() assert (expected_home / "data").is_dir() diff --git a/tests/installer/test_gitops_choice_screen.py b/tests/installer/test_gitops_choice_screen.py index 8956d24..82fff34 100644 --- a/tests/installer/test_gitops_choice_screen.py +++ b/tests/installer/test_gitops_choice_screen.py @@ -24,9 +24,9 @@ class _DummyGitOpsApp(ScreenBaseMixin, GitOpsScreenMixin): self.gitops_provider = tk.StringVar(master=root, value="gitea") self.gitops_enabled = tk.BooleanVar(master=root, value=False) self.argocd_enabled = tk.BooleanVar(master=root, value=False) - self.prole_cfg_data: dict = {} + self.knoe_cfg_data: dict = {} - def _save_prole_cfg(self): + def _save_knoe_cfg(self): pass @@ -74,18 +74,18 @@ def test_on_gitops_provider_change_syncs_boolean_vars(): app._on_gitops_provider_change() assert app.gitops_enabled.get() is True assert app.argocd_enabled.get() is False - assert app.prole_cfg_data["Optional Features"]["GITOPS_PROVIDER"] == "gitea" + assert app.knoe_cfg_data["Optional Features"]["GITOPS_PROVIDER"] == "gitea" app.gitops_provider.set("argocd") app._on_gitops_provider_change() assert app.gitops_enabled.get() is False assert app.argocd_enabled.get() is True - assert app.prole_cfg_data["Optional Features"]["ARGOCD_ENABLED"] == "True" + assert app.knoe_cfg_data["Optional Features"]["ARGOCD_ENABLED"] == "True" app.gitops_provider.set("none") app._on_gitops_provider_change() assert app.gitops_enabled.get() is False assert app.argocd_enabled.get() is False - assert app.prole_cfg_data["Optional Features"]["GITOPS_PROVIDER"] == "none" + assert app.knoe_cfg_data["Optional Features"]["GITOPS_PROVIDER"] == "none" finally: root.destroy() diff --git a/tests/installer/test_k3s_registry_hostport_resolution.py b/tests/installer/test_k3s_registry_hostport_resolution.py index 1447d7e..7982b75 100644 --- a/tests/installer/test_k3s_registry_hostport_resolution.py +++ b/tests/installer/test_k3s_registry_hostport_resolution.py @@ -11,8 +11,8 @@ from knoe.ui.screens.docker import DockerScreenMixin class _DummyDockerScreen(DockerScreenMixin): - def __init__(self, prole_cfg_data: dict): - self.prole_cfg_data = prole_cfg_data + def __init__(self, knoe_cfg_data: dict): + self.knoe_cfg_data = knoe_cfg_data @pytest.mark.parametrize( @@ -35,7 +35,7 @@ def test_k3s_registry_hostport_avoids_unusable_server_hosts_and_falls_back_to_ku apiVersion: v1 clusters: - cluster: - server: https://myrddin.prole.org:6443 + server: https://myrddin.knoe.org:6443 name: default contexts: [] current-context: "" @@ -57,7 +57,7 @@ users: [] } ) - assert screen._k3s_registry_hostport() == "myrddin.prole.org:5000" + assert screen._k3s_registry_hostport() == "myrddin.knoe.org:5000" def test_k3s_registry_hostport_prefers_explicit_env_host_port(monkeypatch): diff --git a/tests/installer/test_prole_conf.py b/tests/installer/test_knoe_conf.py similarity index 76% rename from tests/installer/test_prole_conf.py rename to tests/installer/test_knoe_conf.py index 39600ba..ad5559d 100644 --- a/tests/installer/test_prole_conf.py +++ b/tests/installer/test_knoe_conf.py @@ -3,7 +3,7 @@ from pathlib import Path import pytest -from knoe import prole_conf +from knoe import knoe_conf def _symlink_supported(tmp_path: Path) -> bool: @@ -25,7 +25,7 @@ def test_layered_cfg_files_order_and_merge(tmp_path: Path): env_dir = conf_dir / "dev" env_dir.mkdir(parents=True) - (env_dir / "prole.cfg").write_text( + (env_dir / "knoe.cfg").write_text( "[Global]\nNAMESPACE = base\nSERVICE_NAMESPACE = base-svc\n" ) (env_dir / "10-first.cfg").write_text("[Global]\nNAMESPACE = first\n") @@ -33,17 +33,17 @@ def test_layered_cfg_files_order_and_merge(tmp_path: Path): (env_dir / "gcp.cfg").write_text('project_id = "demo"\n') (env_dir / "prod.cfg").write_text("[Global]\nNAMESPACE = ignored\n") - entry = conf_dir / "prole.cfg" - os.symlink(str(env_dir / "prole.cfg"), str(entry)) + entry = conf_dir / "knoe.cfg" + os.symlink(str(env_dir / "knoe.cfg"), str(entry)) - files = prole_conf.layered_cfg_files(entry) + files = knoe_conf.layered_cfg_files(entry) assert files == [ - env_dir / "prole.cfg", + env_dir / "knoe.cfg", env_dir / "10-first.cfg", env_dir / "20-second.cfg", ] - cfg = prole_conf.load_layered_config(entry) + cfg = knoe_conf.load_layered_config(entry) assert cfg.get("Global", "NAMESPACE") == "second" assert cfg.get("Global", "SERVICE_NAMESPACE") == "base-svc" @@ -56,23 +56,23 @@ def test_activate_environment_updates_symlink_and_preserves_other_env(tmp_path: (conf_dir / "dev").mkdir(parents=True) (conf_dir / "service").mkdir(parents=True) - dev_base = conf_dir / "dev" / "prole.cfg" - svc_base = conf_dir / "service" / "prole.cfg" + dev_base = conf_dir / "dev" / "knoe.cfg" + svc_base = conf_dir / "service" / "knoe.cfg" dev_base.write_text("[Global]\nNAMESPACE = dev-ns\n") svc_base.write_text("[Global]\nNAMESPACE = service-ns\n") - prole_conf.activate_environment(conf_dir, "dev", create_base_if_missing=False) - entry = conf_dir / "prole.cfg" + knoe_conf.activate_environment(conf_dir, "dev", create_base_if_missing=False) + entry = conf_dir / "knoe.cfg" assert entry.is_symlink() assert entry.resolve() == dev_base - prole_conf.activate_environment(conf_dir, "service", create_base_if_missing=False) + knoe_conf.activate_environment(conf_dir, "service", create_base_if_missing=False) assert entry.is_symlink() assert entry.resolve() == svc_base # Ensure switching does not mutate other environments. assert dev_base.read_text() == "[Global]\nNAMESPACE = dev-ns\n" - cfg = prole_conf.load_layered_config(entry) + cfg = knoe_conf.load_layered_config(entry) assert cfg.get("Global", "NAMESPACE") == "service-ns" @@ -81,14 +81,14 @@ def test_test_environment_defaults_not_default_namespace(tmp_path: Path): pytest.skip("symlinks not supported") conf_dir = tmp_path / "conf" - prole_conf.activate_environment(conf_dir, "test") + knoe_conf.activate_environment(conf_dir, "test") - entry = conf_dir / "prole.cfg" - cfg = prole_conf.load_layered_config(entry) + entry = conf_dir / "knoe.cfg" + cfg = knoe_conf.load_layered_config(entry) ns = cfg.get("Global", "NAMESPACE", fallback="") assert ns assert ns != "default" - assert ns == "prole-test" + assert ns == "knoe-test" @pytest.mark.parametrize( @@ -112,22 +112,22 @@ def test_ensure_entrypoint_migrates_legacy_regular_file_based_on_mode( legacy_text = ( f"[Global]\nDEPLOYMENT_MODE = {mode}\nCLUSTER_ENV = {mode}-example\nNAMESPACE = ns\n" ) - entry = conf_dir / "prole.cfg" + entry = conf_dir / "knoe.cfg" entry.write_text(legacy_text, encoding="utf-8") - prole_conf.ensure_entrypoint(conf_dir) + knoe_conf.ensure_entrypoint(conf_dir) # Entry should now be a symlink to the inferred env base. assert entry.is_symlink() target = entry.resolve() - assert target == conf_dir / expected_env / "prole.cfg" + assert target == conf_dir / expected_env / "knoe.cfg" assert target.read_text(encoding="utf-8") == legacy_text # Legacy should be preserved as a backup. - backups = list(conf_dir.glob("prole.cfg.legacy.*")) + backups = list(conf_dir.glob("knoe.cfg.legacy.*")) assert backups, "expected legacy backup to be created" assert any(p.read_text(encoding="utf-8") == legacy_text for p in backups) # All env dirs should exist after bootstrap. - for env in prole_conf.ENVIRONMENTS: + for env in knoe_conf.ENVIRONMENTS: assert (conf_dir / env).is_dir() diff --git a/tests/installer/test_milestones.py b/tests/installer/test_milestones.py index c044b20..38e2c99 100644 --- a/tests/installer/test_milestones.py +++ b/tests/installer/test_milestones.py @@ -83,7 +83,7 @@ class TestMilestones(unittest.TestCase): def test_network_scan_milestone(self, mock_run_streaming_cmd, mock_get_resource): mock_binary = MagicMock() mock_binary.exists.return_value = True - mock_binary.__str__.return_value = "/tmp/prole-agent" + mock_binary.__str__.return_value = "/tmp/knoe-agent" mock_get_resource.return_value = mock_binary def _stream_output(cmd, cwd=None, on_stdout=None): @@ -104,14 +104,14 @@ class TestMilestones(unittest.TestCase): ) def test_env_setup_milestone(self): - self.state.inputs["env_setup.PROLE_HOME"] = "/custom/home" + self.state.inputs["env_setup.KNOE_HOME"] = "/custom/home" self.state.inputs["env_setup.NAMESPACE"] = "test-ns" milestone = EnvSetupMilestone() milestone.execute(self.state) self.assertEqual( - self.state.config_data.get("System Environment", {}).get("PROLE_HOME"), + self.state.config_data.get("System Environment", {}).get("KNOE_HOME"), "/custom/home", ) self.assertEqual( @@ -151,7 +151,7 @@ class TestMilestones(unittest.TestCase): # Mock k3d cluster list showing cluster exists and running mock_list_result = MagicMock() - mock_list_result.stdout = "prole-dev-cluster 1/1 0/2 running" + mock_list_result.stdout = "knoe-dev-cluster 1/1 0/2 running" mock_list_result.returncode = 0 # Mock docker image inspect (image not found locally) mock_inspect_result = MagicMock() diff --git a/tests/installer/test_milestones_extended.py b/tests/installer/test_milestones_extended.py index 14b6ff9..930e968 100644 --- a/tests/installer/test_milestones_extended.py +++ b/tests/installer/test_milestones_extended.py @@ -35,7 +35,7 @@ def _make_state(**inputs) -> InstallerState: state = InstallerState() state.inputs.update(inputs) state.controller = MagicMock(spec=KnoeController) - state.controller.project_root = Path("/tmp/fake-prole") + state.controller.project_root = Path("/tmp/fake-knoe") state.controller.get_knoe_db_version.return_value = "18-001" state.controller.run_script.return_value = 0 return state @@ -71,7 +71,7 @@ def test_database_creation_defaults(): state = _make_state() milestone = DatabaseCreationMilestone() with patch("knoe.core.milestones.inst_config._encrypt_cfg_secret", return_value="enc:xxx"), \ - patch("knoe.core.milestones.inst_config._is_prole_secret", return_value=False): + patch("knoe.core.milestones.inst_config._is_knoe_secret", return_value=False): milestone.execute(state) assert ( state.config_data.get("Database Creation", {}).get("DATABASE_NAMESPACE") @@ -89,7 +89,7 @@ def test_database_creation_with_provided_values(): }) milestone = DatabaseCreationMilestone() with patch("knoe.core.milestones.inst_config._encrypt_cfg_secret", return_value="enc:xxx"), \ - patch("knoe.core.milestones.inst_config._is_prole_secret", return_value=False): + patch("knoe.core.milestones.inst_config._is_knoe_secret", return_value=False): milestone.execute(state) db = state.config_data.get("Database Creation", {}) assert db["DB_USER"] == "alice" @@ -103,7 +103,7 @@ def test_database_creation_generates_password_when_missing(): }) milestone = DatabaseCreationMilestone() with patch("knoe.core.milestones.inst_config._encrypt_cfg_secret", return_value="enc:xxx"), \ - patch("knoe.core.milestones.inst_config._is_prole_secret", return_value=False): + patch("knoe.core.milestones.inst_config._is_knoe_secret", return_value=False): milestone.execute(state) # Password should have been generated and stored assert state.inputs.get("init_password.db_password") @@ -113,13 +113,13 @@ def test_database_creation_generates_password_when_missing(): def test_database_creation_resolves_secret_ref(): state = _make_state(**{ "init_password.db_username": "bob", - "init_password.db_password": "${openbao:kv/prole/db}", + "init_password.db_password": "${openbao:kv/knoe/db}", "init_password.generate_ssh_key": "False", }) milestone = DatabaseCreationMilestone() - with patch("knoe.core.milestones.inst_config._resolve_secret_value", return_value="${openbao:kv/prole/db}"), \ + with patch("knoe.core.milestones.inst_config._resolve_secret_value", return_value="${openbao:kv/knoe/db}"), \ patch("knoe.core.milestones.inst_config._encrypt_cfg_secret", return_value="enc:xxx"), \ - patch("knoe.core.milestones.inst_config._is_prole_secret", return_value=False): + patch("knoe.core.milestones.inst_config._is_knoe_secret", return_value=False): milestone.execute(state) # Unresolvable ref → new password generated pw = state.inputs.get("init_password.db_password", "") @@ -129,13 +129,13 @@ def test_database_creation_resolves_secret_ref(): def test_database_creation_resolves_secret_ref_success(): state = _make_state(**{ "init_password.db_username": "bob", - "init_password.db_password": "${openbao:kv/prole/db}", + "init_password.db_password": "${openbao:kv/knoe/db}", "init_password.generate_ssh_key": "False", }) milestone = DatabaseCreationMilestone() with patch("knoe.core.milestones.inst_config._resolve_secret_value", return_value="realpassword"), \ patch("knoe.core.milestones.inst_config._encrypt_cfg_secret", return_value="enc:xxx"), \ - patch("knoe.core.milestones.inst_config._is_prole_secret", return_value=False): + patch("knoe.core.milestones.inst_config._is_knoe_secret", return_value=False): milestone.execute(state) assert state.inputs["init_password.db_password"] == "realpassword" @@ -145,7 +145,7 @@ def test_database_creation_with_progress(): milestone = DatabaseCreationMilestone() progress = MagicMock() with patch("knoe.core.milestones.inst_config._encrypt_cfg_secret", return_value="enc:xxx"), \ - patch("knoe.core.milestones.inst_config._is_prole_secret", return_value=False): + patch("knoe.core.milestones.inst_config._is_knoe_secret", return_value=False): milestone.execute(state, progress=progress) progress.assert_called() @@ -157,7 +157,7 @@ def test_database_creation_uses_env_namespace_fallback(): }) milestone = DatabaseCreationMilestone() with patch("knoe.core.milestones.inst_config._encrypt_cfg_secret", return_value="enc:xxx"), \ - patch("knoe.core.milestones.inst_config._is_prole_secret", return_value=False): + patch("knoe.core.milestones.inst_config._is_knoe_secret", return_value=False): milestone.execute(state) assert state.config_data["Database Creation"]["DATABASE_NAMESPACE"] == "staging" @@ -190,7 +190,7 @@ def test_docker_build_non_dev_env_adds_registry(): state = _make_state(**{ "init_db_build.run_build": "True", "init_cluster.cluster_env": "prod", - "init_cluster.k3s_server_url": "https://myrddin.prole.org:6443", + "init_cluster.k3s_server_url": "https://myrddin.knoe.org:6443", # When init scripts are disabled, the DB build milestone is responsible # for pushing the image to the registry in non-dev envs. "init_scripts.run_scripts": "False", @@ -209,7 +209,7 @@ def test_docker_build_non_dev_env_skips_when_init_scripts_enabled(): state = _make_state(**{ "init_db_build.run_build": "True", "init_cluster.cluster_env": "prod", - "init_cluster.k3s_server_url": "https://myrddin.prole.org:6443", + "init_cluster.k3s_server_url": "https://myrddin.knoe.org:6443", "init_scripts.run_scripts": "True", }) milestone = DockerBuildMilestone() @@ -258,7 +258,7 @@ def test_gitops_disabled_default(): def test_gitops_enabled_success(): state = _make_state(**{"init_cluster.gitops_enabled": "True"}) milestone = GitOpsMilestone() - with patch.object(milestone, "_get_script_env", return_value={"PROLE_MODE": "k3d"}): + with patch.object(milestone, "_get_script_env", return_value={"KNOE_MODE": "k3d"}): milestone.execute(state) assert state.config_data["GitOps"]["STATUS"] == "Deployed" @@ -273,7 +273,7 @@ def test_gitops_gitlab_injects_oidc_env_and_provisioning_metadata(): } ) milestone = GitOpsMilestone() - with patch.object(milestone, "_get_script_env", return_value={"PROLE_MODE": "k8s"}): + with patch.object(milestone, "_get_script_env", return_value={"KNOE_MODE": "k8s"}): milestone.execute(state) _, kwargs = state.controller.run_script.call_args @@ -302,7 +302,7 @@ def test_gitops_gitlab_resolves_secretref_oidc_from_env_and_keeps_k8s_redirect() ) state.config_data.setdefault("Global", {})["GITLAB_DOMAIN"] = "git." milestone = GitOpsMilestone() - with patch.object(milestone, "_get_script_env", return_value={"PROLE_MODE": "k8s"}), \ + with patch.object(milestone, "_get_script_env", return_value={"KNOE_MODE": "k8s"}), \ patch.dict( "os.environ", { @@ -324,7 +324,7 @@ def test_gitops_enabled_with_progress(): state = _make_state(**{"init_cluster.gitops_enabled": "True"}) milestone = GitOpsMilestone() progress = MagicMock() - with patch.object(milestone, "_get_script_env", return_value={"PROLE_MODE": "k3d"}): + with patch.object(milestone, "_get_script_env", return_value={"KNOE_MODE": "k3d"}): milestone.execute(state, progress=progress) progress.assert_called() @@ -333,7 +333,7 @@ def test_gitops_enabled_failure_raises(): state = _make_state(**{"init_cluster.gitops_enabled": "True"}) state.controller.run_script.return_value = 1 milestone = GitOpsMilestone() - with patch.object(milestone, "_get_script_env", return_value={"PROLE_MODE": "k3d"}): + with patch.object(milestone, "_get_script_env", return_value={"KNOE_MODE": "k3d"}): with pytest.raises(Exception, match="[Gg]itea"): milestone.execute(state) assert state.config_data["GitOps"]["STATUS"] == "Attempted" @@ -343,9 +343,9 @@ def test_gitops_uses_cfg_path_when_exists(tmp_path): state = _make_state(**{"init_cluster.gitops_enabled": "True"}) state.controller.project_root = tmp_path (tmp_path / "conf").mkdir() - (tmp_path / "conf" / "prole.cfg").write_text("[General]\n") + (tmp_path / "conf" / "knoe.cfg").write_text("[General]\n") milestone = GitOpsMilestone() - with patch.object(milestone, "_get_script_env", return_value={"PROLE_MODE": ""}): + with patch.object(milestone, "_get_script_env", return_value={"KNOE_MODE": ""}): milestone.execute(state) _, kwargs = state.controller.run_script.call_args assert "-c" in kwargs.get("args", []) @@ -381,7 +381,7 @@ def test_kerberos_disabled_with_progress(): def test_kerberos_enabled_success(): state = _make_state(**{"kerberos_config.enabled": "True"}) milestone = KerberosMilestone() - with patch.object(milestone, "_get_script_env", return_value={"PROLE_MODE": "k3d"}): + with patch.object(milestone, "_get_script_env", return_value={"KNOE_MODE": "k3d"}): milestone.execute(state) assert state.config_data["Kerberos Authentication"]["STATUS"] == "Initialized" state.controller.run_script.assert_called_once() @@ -393,7 +393,7 @@ def test_kerberos_enabled_with_progress(): state = _make_state(**{"kerberos_config.enabled": "True"}) milestone = KerberosMilestone() progress = MagicMock() - with patch.object(milestone, "_get_script_env", return_value={"PROLE_MODE": ""}): + with patch.object(milestone, "_get_script_env", return_value={"KNOE_MODE": ""}): milestone.execute(state, progress=progress) progress.assert_called() @@ -402,7 +402,7 @@ def test_kerberos_enabled_failure_raises(): state = _make_state(**{"kerberos_config.enabled": "True"}) state.controller.run_script.return_value = 1 milestone = KerberosMilestone() - with patch.object(milestone, "_get_script_env", return_value={"PROLE_MODE": ""}): + with patch.object(milestone, "_get_script_env", return_value={"KNOE_MODE": ""}): with pytest.raises(Exception, match="[Kk]erberos"): milestone.execute(state) assert state.config_data["Kerberos Authentication"]["STATUS"] == "Attempted" @@ -411,7 +411,7 @@ def test_kerberos_enabled_failure_raises(): def test_kerberos_enabled_mode_in_args(): state = _make_state(**{"kerberos_config.enabled": "True"}) milestone = KerberosMilestone() - with patch.object(milestone, "_get_script_env", return_value={"PROLE_MODE": "k3d"}): + with patch.object(milestone, "_get_script_env", return_value={"KNOE_MODE": "k3d"}): milestone.execute(state) _, kwargs = state.controller.run_script.call_args assert "--mode" in kwargs.get("args", []) @@ -421,7 +421,7 @@ def test_kerberos_enabled_mode_in_args(): def test_kerberos_enabled_no_mode(): state = _make_state(**{"kerberos_config.enabled": "True"}) milestone = KerberosMilestone() - with patch.object(milestone, "_get_script_env", return_value={"PROLE_MODE": ""}): + with patch.object(milestone, "_get_script_env", return_value={"KNOE_MODE": ""}): milestone.execute(state) _, kwargs = state.controller.run_script.call_args assert "--mode" not in kwargs.get("args", []) diff --git a/tests/installer/test_monitoring_ops.py b/tests/installer/test_monitoring_ops.py index 8738014..10da6a9 100644 --- a/tests/installer/test_monitoring_ops.py +++ b/tests/installer/test_monitoring_ops.py @@ -50,7 +50,7 @@ def test_monitoring_update_recovers_stale_prometheus_pending_lock_and_upgrades_o monkeypatch.setattr(monitoring.time, "sleep", lambda _seconds: None) env = { - "PROLE_MODE": "k8s", + "KNOE_MODE": "k8s", "APP_CLUSTER_KUBECONTEXT": "ctx-app", "KUBECONTEXT": "ctx-app", } @@ -92,7 +92,7 @@ def test_monitoring_update_blocks_when_stale_pending_lock_has_no_deployed_revisi monkeypatch.setattr(monitoring.time, "sleep", lambda _seconds: None) env = { - "PROLE_MODE": "k8s", + "KNOE_MODE": "k8s", "APP_CLUSTER_KUBECONTEXT": "ctx-app", "KUBECONTEXT": "ctx-app", } @@ -129,7 +129,7 @@ def test_monitoring_update_skips_stale_lock_recovery_outside_app_context(monkeyp monkeypatch.setattr(monitoring, "_helm", fake_helm) env = { - "PROLE_MODE": "k8s", + "KNOE_MODE": "k8s", "APP_CLUSTER_KUBECONTEXT": "ctx-app", "KUBECONTEXT": "ctx-db", } diff --git a/tests/installer/test_namespace_propagation.py b/tests/installer/test_namespace_propagation.py index 4f8efb2..83288a1 100644 --- a/tests/installer/test_namespace_propagation.py +++ b/tests/installer/test_namespace_propagation.py @@ -39,7 +39,7 @@ class _DummyNamespaceApp(ConfigMixin): def _update_env_namespace(self, namespace: str): self.updated_namespace = namespace - def _save_prole_cfg(self): + def _save_knoe_cfg(self): self.save_calls += 1 diff --git a/tests/installer/test_prod_config.py b/tests/installer/test_prod_config.py index c9e72af..20d1191 100644 --- a/tests/installer/test_prod_config.py +++ b/tests/installer/test_prod_config.py @@ -35,7 +35,7 @@ def test_default_prod_config_uses_knoey_knoe_conventions(): assert cfg.routing.apiHost == "api.knoe.dev" assert cfg.routing.studioHost == "db.0.knoe.dev" assert cfg.routing.gitHost == "git.knoe.dev" - assert cfg.migration.sourceEnvironment == "prole.org" + assert cfg.migration.sourceEnvironment == "knoe.org" def test_validation_requires_project_and_enforces_ecosystem_and_positive_numbers(): diff --git a/tests/installer/test_push_docker_image_ca_fallback.py b/tests/installer/test_push_docker_image_ca_fallback.py index 1d2620c..7fb4a10 100644 --- a/tests/installer/test_push_docker_image_ca_fallback.py +++ b/tests/installer/test_push_docker_image_ca_fallback.py @@ -31,13 +31,13 @@ def test_push_docker_image_prefers_tls_verified_skopeo_when_ca_provided( monkeypatch.setattr(env.subprocess, "run", fake_run) - ok = env._push_docker_image("myrddin.prole.org:5000/knoe-db:18-118") + ok = env._push_docker_image("myrddin.knoe.org:5000/knoe-db:18-118") assert ok is True assert len(calls) == 2 def test_push_docker_image_auto_detects_repo_cert_for_myrddin(monkeypatch): - """Regression: when no env var is provided, prefer repo-shipped certs (Ansible prole_ssl role).""" + """Regression: when no env var is provided, prefer repo-shipped certs (Ansible knoe_ssl role).""" from knoe.core import env @@ -69,6 +69,6 @@ def test_push_docker_image_auto_detects_repo_cert_for_myrddin(monkeypatch): monkeypatch.setattr(env.subprocess, "run", fake_run) - ok = env._push_docker_image("myrddin.prole.org:5000/knoe-db:18-118") + ok = env._push_docker_image("myrddin.knoe.org:5000/knoe-db:18-118") assert ok is True assert len(calls) == 2 diff --git a/tests/installer/test_registry_k3s_selection.py b/tests/installer/test_registry_k3s_selection.py index a28acfe..711912d 100644 --- a/tests/installer/test_registry_k3s_selection.py +++ b/tests/installer/test_registry_k3s_selection.py @@ -9,7 +9,7 @@ from knoe.ui.screens.docker import DockerScreenMixin class _DummyDockerScreen(DockerScreenMixin): def __init__(self, tmp_path: Path): self._tmp_path = tmp_path - self.prole_cfg_data = { + self.knoe_cfg_data = { # Global deployment mode may remain k3d, while the UI selection is Service. "Global": {"DEPLOYMENT_MODE": "k3d"}, "Docker Build": {}, @@ -24,7 +24,7 @@ class _DummyDockerScreen(DockerScreenMixin): return "k3d" def _k3s_registry_hostport(self) -> str: - return "myrddin.prole.org:5000" + return "myrddin.knoe.org:5000" def _registry_namespace(self) -> str: return "knoe-system" @@ -39,7 +39,7 @@ class _DummyDockerScreen(DockerScreenMixin): except Exception: pass - def _save_prole_cfg(self): + def _save_knoe_cfg(self): return None def _registry_log_path(self) -> Path: @@ -61,6 +61,6 @@ def test_ensure_local_registry_available_prefers_selected_env_over_global_mode(m screen = _DummyDockerScreen(tmp_path) info = screen.ensure_local_registry_available() assert info == ( - "myrddin.prole.org:5000", + "myrddin.knoe.org:5000", "registry.knoe-system.svc.cluster.local:5000", ) diff --git a/tests/installer/test_services_init_scripts.py b/tests/installer/test_services_init_scripts.py index 672eb56..8f90f4e 100644 --- a/tests/installer/test_services_init_scripts.py +++ b/tests/installer/test_services_init_scripts.py @@ -81,7 +81,7 @@ def test_tk_init_scripts_runner_invokes_init_certmgr(tmp_path, monkeypatch): self.KUBECTL_STATUS_TAB: _Console(), } - self.db_username = _Var("prole") + self.db_username = _Var("knoe") self.db_password = _Var("pw") self.db_namespace = _Var("default") @@ -90,9 +90,9 @@ def test_tk_init_scripts_runner_invokes_init_certmgr(tmp_path, monkeypatch): self.kerberos_kdc = _Var("") self.kerberos_user = _Var("") self.kerberos_password = _Var("") - self.cluster_env = _Var("prole-service-cluster") + self.cluster_env = _Var("knoe-service-cluster") - self.prole_cfg_data = {"Initialization Scripts": {"STATUS": ""}} + self.knoe_cfg_data = {"Initialization Scripts": {"STATUS": ""}} self._scripts_success = False def safe_after(self, fn, delay: int = 0): @@ -106,7 +106,7 @@ def test_tk_init_scripts_runner_invokes_init_certmgr(tmp_path, monkeypatch): return "gke_db_ctx" return "gke_app_ctx" - def _resolve_prole_logs_dir(self): + def _resolve_knoe_logs_dir(self): return tmp_path def _get_service_namespace(self): @@ -127,7 +127,7 @@ def test_tk_init_scripts_runner_invokes_init_certmgr(tmp_path, monkeypatch): def _run_cmd_capture(self, _args): return 0, "" - def _save_prole_cfg(self): + def _save_knoe_cfg(self): return None def update_footer(self): @@ -145,7 +145,7 @@ def test_tk_init_scripts_runner_invokes_init_certmgr(tmp_path, monkeypatch): # CNPG is now Python-owned; shell script must never be dispatched assert "init_cloudnative_pg.sh" not in called_scripts assert "init_db_manager.sh" not in called_scripts - assert screen.prole_cfg_data["Initialization Scripts"]["STATUS"] == "Completed" + assert screen.knoe_cfg_data["Initialization Scripts"]["STATUS"] == "Completed" def test_tk_init_scripts_common_services_prefers_service_namespace( @@ -232,7 +232,7 @@ def test_tk_init_scripts_common_services_prefers_service_namespace( self.KUBECTL_STATUS_TAB: _Console(), } - self.db_username = _Var("prole") + self.db_username = _Var("knoe") self.db_password = _Var("pw") self.db_namespace = _Var("knoe-db") @@ -241,9 +241,9 @@ def test_tk_init_scripts_common_services_prefers_service_namespace( self.kerberos_kdc = _Var("") self.kerberos_user = _Var("") self.kerberos_password = _Var("") - self.cluster_env = _Var("prole-service-cluster") + self.cluster_env = _Var("knoe-service-cluster") - self.prole_cfg_data = {"Initialization Scripts": {"STATUS": ""}} + self.knoe_cfg_data = {"Initialization Scripts": {"STATUS": ""}} self._scripts_success = False def safe_after(self, fn, delay: int = 0): @@ -257,7 +257,7 @@ def test_tk_init_scripts_common_services_prefers_service_namespace( return "gke_db_ctx" return "gke_app_ctx" - def _resolve_prole_logs_dir(self): + def _resolve_knoe_logs_dir(self): return tmp_path def _get_service_namespace(self): @@ -278,7 +278,7 @@ def test_tk_init_scripts_common_services_prefers_service_namespace( def _run_cmd_capture(self, _args): return 0, "" - def _save_prole_cfg(self): + def _save_knoe_cfg(self): return None def update_footer(self): @@ -374,7 +374,7 @@ def test_tk_init_scripts_uses_fallback_database_namespace_for_secret_checks( self.KUBECTL_STATUS_TAB: _Console(), } - self.db_username = _Var("prole") + self.db_username = _Var("knoe") self.db_password = _Var("pw") # Reproducer: UI field is blank self.db_namespace = _Var("") @@ -384,9 +384,9 @@ def test_tk_init_scripts_uses_fallback_database_namespace_for_secret_checks( self.kerberos_kdc = _Var("") self.kerberos_user = _Var("") self.kerberos_password = _Var("") - self.cluster_env = _Var("prole-service-cluster") + self.cluster_env = _Var("knoe-service-cluster") - self.prole_cfg_data = { + self.knoe_cfg_data = { "Initialization Scripts": {"STATUS": ""}, "Global": {"DATABASE_NAMESPACE": "knoe-db"}, } @@ -398,7 +398,7 @@ def test_tk_init_scripts_uses_fallback_database_namespace_for_secret_checks( def _deployment_mode(self): return "k3s" - def _resolve_prole_logs_dir(self): + def _resolve_knoe_logs_dir(self): return tmp_path def _get_service_namespace(self): @@ -434,7 +434,7 @@ def test_tk_init_scripts_uses_fallback_database_namespace_for_secret_checks( return (0, "") if args[-1] == "knoe-db" else (1, "") return 0, "" - def _save_prole_cfg(self): + def _save_knoe_cfg(self): return None def update_footer(self): @@ -446,7 +446,7 @@ def test_tk_init_scripts_uses_fallback_database_namespace_for_secret_checks( screen = _DummyScreen() screen.run_init_scripts() - assert screen.prole_cfg_data["Initialization Scripts"]["STATUS"] == "Completed" + assert screen.knoe_cfg_data["Initialization Scripts"]["STATUS"] == "Completed" checked_ns = { args[-1] for args in secret_check_calls @@ -505,7 +505,7 @@ def test_tk_init_scripts_secret_checks_use_kubectl_base_cmd(tmp_path, monkeypatc monkeypatch.setattr(services.opentofu_ops, "update", lambda **_kw: None) monkeypatch.setattr(services.monitoring_ops, "initialize", lambda **_kw: None) - expected_prefix = ["kubectl", "--kubeconfig", "/tmp/prole-k3s.kubeconfig"] + expected_prefix = ["kubectl", "--kubeconfig", "/tmp/knoe-k3s.kubeconfig"] secret_check_calls: list[list[str]] = [] class _DummyScreen(ServicesScreenMixin): @@ -534,7 +534,7 @@ def test_tk_init_scripts_secret_checks_use_kubectl_base_cmd(tmp_path, monkeypatc self.KUBECTL_STATUS_TAB: _Console(), } - self.db_username = _Var("prole") + self.db_username = _Var("knoe") self.db_password = _Var("pw") self.db_namespace = _Var("knoe-db") @@ -543,9 +543,9 @@ def test_tk_init_scripts_secret_checks_use_kubectl_base_cmd(tmp_path, monkeypatc self.kerberos_kdc = _Var("") self.kerberos_user = _Var("") self.kerberos_password = _Var("") - self.cluster_env = _Var("prole-service-cluster") + self.cluster_env = _Var("knoe-service-cluster") - self.prole_cfg_data = {"Initialization Scripts": {"STATUS": ""}} + self.knoe_cfg_data = {"Initialization Scripts": {"STATUS": ""}} self._scripts_success = False def safe_after(self, fn, delay: int = 0): @@ -554,7 +554,7 @@ def test_tk_init_scripts_secret_checks_use_kubectl_base_cmd(tmp_path, monkeypatc def _deployment_mode(self): return "k3s" - def _resolve_prole_logs_dir(self): + def _resolve_knoe_logs_dir(self): return tmp_path def _get_service_namespace(self): @@ -589,7 +589,7 @@ def test_tk_init_scripts_secret_checks_use_kubectl_base_cmd(tmp_path, monkeypatc return 1, "" return 0, "" - def _save_prole_cfg(self): + def _save_knoe_cfg(self): return None def update_footer(self): @@ -601,7 +601,7 @@ def test_tk_init_scripts_secret_checks_use_kubectl_base_cmd(tmp_path, monkeypatc screen = _DummyScreen() screen.run_init_scripts() - assert screen.prole_cfg_data["Initialization Scripts"]["STATUS"] == "Completed" + assert screen.knoe_cfg_data["Initialization Scripts"]["STATUS"] == "Completed" secret_calls = [ args for args in secret_check_calls @@ -690,7 +690,7 @@ def test_tk_init_scripts_missing_critical_secret_check_does_not_block_next( self.KUBECTL_STATUS_TAB: _Console(), } - self.db_username = _Var("prole") + self.db_username = _Var("knoe") self.db_password = _Var("pw") self.db_namespace = _Var("knoe-db") @@ -699,9 +699,9 @@ def test_tk_init_scripts_missing_critical_secret_check_does_not_block_next( self.kerberos_kdc = _Var("") self.kerberos_user = _Var("") self.kerberos_password = _Var("") - self.cluster_env = _Var("prole-service-cluster") + self.cluster_env = _Var("knoe-service-cluster") - self.prole_cfg_data = {"Initialization Scripts": {"STATUS": ""}} + self.knoe_cfg_data = {"Initialization Scripts": {"STATUS": ""}} self._scripts_success = False def safe_after(self, fn, delay: int = 0): @@ -710,7 +710,7 @@ def test_tk_init_scripts_missing_critical_secret_check_does_not_block_next( def _deployment_mode(self): return "k3s" - def _resolve_prole_logs_dir(self): + def _resolve_knoe_logs_dir(self): return tmp_path def _get_service_namespace(self): @@ -735,7 +735,7 @@ def test_tk_init_scripts_missing_critical_secret_check_does_not_block_next( return 1, "Error from server (NotFound): secrets \"knoe-db-superuser\" not found" return 0, "" - def _save_prole_cfg(self): + def _save_knoe_cfg(self): return None def update_footer(self): @@ -748,7 +748,7 @@ def test_tk_init_scripts_missing_critical_secret_check_does_not_block_next( screen.run_init_scripts() assert screen._scripts_success is True - assert screen.prole_cfg_data["Initialization Scripts"]["STATUS"] == "Completed" + assert screen.knoe_cfg_data["Initialization Scripts"]["STATUS"] == "Completed" assert any( "Missing secrets" in entry for entry in screen.script_consoles["init_cloudnative_pg.sh"].buf ) @@ -842,7 +842,7 @@ def test_init_monitoring_grafana_password_capture_does_not_wipe_monitoring_data_ self.KUBECTL_STATUS_TAB: _Console(), } - self.db_username = _Var("prole") + self.db_username = _Var("knoe") self.db_password = _Var("pw") self.db_namespace = _Var("default") @@ -851,9 +851,9 @@ def test_init_monitoring_grafana_password_capture_does_not_wipe_monitoring_data_ self.kerberos_kdc = _Var("") self.kerberos_user = _Var("") self.kerberos_password = _Var("") - self.cluster_env = _Var("prole-service-cluster") + self.cluster_env = _Var("knoe-service-cluster") - self.prole_cfg_data = { + self.knoe_cfg_data = { "Initialization Scripts": {"STATUS": ""}, "Monitoring": {"EXISTING_MONITORING_KEY": "keep-me"}, } @@ -865,7 +865,7 @@ def test_init_monitoring_grafana_password_capture_does_not_wipe_monitoring_data_ def _deployment_mode(self): return "k3s" - def _resolve_prole_logs_dir(self): + def _resolve_knoe_logs_dir(self): return tmp_path def _get_service_namespace(self): @@ -886,7 +886,7 @@ def test_init_monitoring_grafana_password_capture_does_not_wipe_monitoring_data_ def _run_cmd_capture(self, _args): return 0, "" - def _save_prole_cfg(self): + def _save_knoe_cfg(self): return None def update_footer(self): @@ -898,7 +898,7 @@ def test_init_monitoring_grafana_password_capture_does_not_wipe_monitoring_data_ screen = _DummyScreen() screen.run_init_scripts() - mon = screen.prole_cfg_data["Monitoring"] + mon = screen.knoe_cfg_data["Monitoring"] assert mon["EXISTING_MONITORING_KEY"] == "keep-me" assert mon["GRAFANA_ADMIN_PASSWORD"] == "abc123" @@ -985,7 +985,7 @@ def test_tk_init_scripts_k8s_sets_artifact_registry_env_for_cnpg(tmp_path, monke self.KUBECTL_STATUS_TAB: _Console(), } - self.db_username = _Var("prole") + self.db_username = _Var("knoe") self.db_password = _Var("pw") self.db_namespace = _Var("knoe-db-0") @@ -994,14 +994,14 @@ def test_tk_init_scripts_k8s_sets_artifact_registry_env_for_cnpg(tmp_path, monke self.kerberos_kdc = _Var("") self.kerberos_user = _Var("") self.kerberos_password = _Var("") - self.cluster_env = _Var("prole-prod-cluster") + self.cluster_env = _Var("knoe-prod-cluster") - self.prole_cfg_data = { + self.knoe_cfg_data = { "Initialization Scripts": {"STATUS": ""}, "GCP": {"project_id": "plenary-truck-485623-p7"}, "Global": { "KUBECONTEXT": "gke_plenary-truck-485623-p7_us-west3_knoe-dev-0", - "SERVICE_NAMESPACE": "prole", + "SERVICE_NAMESPACE": "knoe", }, } self._scripts_success = False @@ -1017,7 +1017,7 @@ def test_tk_init_scripts_k8s_sets_artifact_registry_env_for_cnpg(tmp_path, monke return "gke_plenary-truck-485623-p7_us-west3_knoe-cnpg-0" return "gke_plenary-truck-485623-p7_us-west3_knoe-dev-0" - def _resolve_prole_logs_dir(self): + def _resolve_knoe_logs_dir(self): return tmp_path def _get_service_namespace(self): @@ -1038,7 +1038,7 @@ def test_tk_init_scripts_k8s_sets_artifact_registry_env_for_cnpg(tmp_path, monke def _run_cmd_capture(self, _args): return 0, "" - def _save_prole_cfg(self): + def _save_knoe_cfg(self): return None def update_footer(self): @@ -1047,7 +1047,7 @@ def test_tk_init_scripts_k8s_sets_artifact_registry_env_for_cnpg(tmp_path, monke def check_services_status_async(self): return None - def _load_gcp_cfg_into_prole_data(self): + def _load_gcp_cfg_into_knoe_data(self): return None screen = _DummyScreen() @@ -1057,5 +1057,5 @@ def test_tk_init_scripts_k8s_sets_artifact_registry_env_for_cnpg(tmp_path, monke assert captured_cnpg_env["GCP_REGION"] == "us-west3" assert ( captured_cnpg_env["ARTIFACT_REGISTRY"] - == "us-west3-docker.pkg.dev/plenary-truck-485623-p7/prole" + == "us-west3-docker.pkg.dev/plenary-truck-485623-p7/knoe" ) diff --git a/tests/installer/test_storage_ops.py b/tests/installer/test_storage_ops.py index cf6b985..df8c2d2 100644 --- a/tests/installer/test_storage_ops.py +++ b/tests/installer/test_storage_ops.py @@ -15,7 +15,7 @@ def test_build_cluster_storage_paths_prefers_distinct_roots(monkeypatch): spec = storage_ops.ClusterStorageSpec( namespace="knoe-db", cluster_name="cluster-a", - node_name="myrddin.prole.org", + node_name="myrddin.knoe.org", synology_roots=("/synology/d001", "/synology/d002"), ) @@ -36,7 +36,7 @@ def test_build_cluster_storage_paths_falls_back_to_same_root(monkeypatch): spec = storage_ops.ClusterStorageSpec( namespace="knoe-db", cluster_name="cluster-a", - node_name="myrddin.prole.org", + node_name="myrddin.knoe.org", synology_roots=("/synology/d001", "/synology/d002"), ) @@ -57,16 +57,16 @@ def test_build_pv_labels_include_cluster_scope(): assert labels["synology.storage/role"] == "data" assert labels["synology.storage/volume"] == "d001" - assert labels["prole.io/namespace"] == "knoe-db" - assert labels["prole.io/cluster"] == "cluster-a" - assert labels["prole.io/service"] == "knoe-db" + assert labels["knoe.io/namespace"] == "knoe-db" + assert labels["knoe.io/cluster"] == "cluster-a" + assert labels["knoe.io/service"] == "knoe-db" def test_provision_cluster_storage_fails_on_existing_name_mismatch(monkeypatch): spec = storage_ops.ClusterStorageSpec( namespace="knoe-db", cluster_name="cluster-a", - node_name="myrddin.prole.org", + node_name="myrddin.knoe.org", ) paths = storage_ops.ClusterStoragePaths( data_root="/synology/d001", @@ -103,7 +103,7 @@ def test_provision_cluster_storage_fails_on_existing_name_mismatch(monkeypatch): { "key": "kubernetes.io/hostname", "operator": "In", - "values": ["myrddin.prole.org"], + "values": ["myrddin.knoe.org"], } ] } @@ -123,7 +123,7 @@ def test_provision_cluster_storage_applies_and_returns_selectors(monkeypatch): spec = storage_ops.ClusterStorageSpec( namespace="knoe-db", cluster_name="cluster-a", - node_name="myrddin.prole.org", + node_name="myrddin.knoe.org", ) paths = storage_ops.ClusterStoragePaths( data_root="/synology/d001", @@ -150,8 +150,8 @@ def test_provision_cluster_storage_applies_and_returns_selectors(monkeypatch): assert len(applied) == 2 assert provisioned.data_pv_name == "synology-iscsi-knoe-db-cluster-a-data" assert provisioned.wal_pv_name == "synology-iscsi-knoe-db-cluster-a-wal" - assert provisioned.data_selector["prole.io/namespace"] == "knoe-db" - assert provisioned.data_selector["prole.io/cluster"] == "cluster-a" + assert provisioned.data_selector["knoe.io/namespace"] == "knoe-db" + assert provisioned.data_selector["knoe.io/cluster"] == "cluster-a" assert provisioned.wal_selector["synology.storage/role"] == "wal" @@ -159,7 +159,7 @@ def test_provision_cluster_storage_fails_on_path_overlap(monkeypatch): spec = storage_ops.ClusterStorageSpec( namespace="knoe-db", cluster_name="cluster-a", - node_name="myrddin.prole.org", + node_name="myrddin.knoe.org", ) paths = storage_ops.ClusterStoragePaths( data_root="/synology/d001", diff --git a/tests/ops/test_legacy_shell.py b/tests/ops/test_legacy_shell.py index fabfc5c..0cdaed0 100644 --- a/tests/ops/test_legacy_shell.py +++ b/tests/ops/test_legacy_shell.py @@ -14,7 +14,7 @@ def test_run_script_argument_assembly(tmp_path: Path): ctx = KnoeContext( project_root=tmp_path, - cfg_path=tmp_path / "conf" / "prole.cfg", + cfg_path=tmp_path / "conf" / "knoe.cfg", mode="m", namespace="ns", service_namespace="svcns", @@ -30,7 +30,7 @@ def test_run_script_argument_assembly(tmp_path: Path): assert cmd[2:] == ["status", "--foo", "bar"] assert kwargs["cwd"] == tmp_path assert kwargs["env"]["X"] == "1" - assert kwargs["env"]["PROLE_MODE"] == "m" + assert kwargs["env"]["KNOE_MODE"] == "m" assert kwargs["env"]["PROLE_NAMESPACE"] == "ns" - assert kwargs["env"]["PROLE_SERVICE_NAMESPACE"] == "svcns" - assert kwargs["env"]["PROLE_CFG"].endswith("conf/prole.cfg") + assert kwargs["env"]["KNOE_SERVICE_NAMESPACE"] == "svcns" + assert kwargs["env"]["PROLE_CFG"].endswith("conf/knoe.cfg") diff --git a/tests/shellspec/spec/lib/prole_helpers_spec.sh b/tests/shellspec/spec/lib/prole_helpers_spec.sh index 221e644..10a124c 100644 --- a/tests/shellspec/spec/lib/prole_helpers_spec.sh +++ b/tests/shellspec/spec/lib/prole_helpers_spec.sh @@ -1,56 +1,56 @@ #!/usr/bin/env bash Describe 'etc/lib/shell helpers' - Include etc/lib/shell/prole_env.sh - Include etc/lib/shell/prole_string.sh - Include etc/lib/shell/prole_secrets.sh - Include etc/lib/shell/prole_yaml.sh - Include etc/lib/shell/prole_guardrails.sh - Include etc/lib/shell/prole_cmd.sh + Include etc/lib/shell/knoe_env.sh + Include etc/lib/shell/knoe_string.sh + Include etc/lib/shell/knoe_secrets.sh + Include etc/lib/shell/knoe_yaml.sh + Include etc/lib/shell/knoe_guardrails.sh + Include etc/lib/shell/knoe_cmd.sh - Describe 'prole_first_nonempty' + Describe 'knoe_first_nonempty' It 'returns the first non-empty argument' - When call prole_first_nonempty '' 'a' 'b' + When call knoe_first_nonempty '' 'a' 'b' The status should be success The output should eq 'a' End It 'fails when all are empty' - When call prole_first_nonempty '' '' + When call knoe_first_nonempty '' '' The status should be failure End End - Describe 'prole_normalize_realm' + Describe 'knoe_normalize_realm' It 'trims and uppercases' - When call prole_normalize_realm ' prole.org ' + When call knoe_normalize_realm ' knoe.org ' The output should eq 'PROLE.ORG' End It 'returns empty for empty input' - When call prole_normalize_realm '' + When call knoe_normalize_realm '' The output should eq '' End End - Describe 'prole_secret_choose_value' + Describe 'knoe_secret_choose_value' It 'keeps literal current values' - When call prole_secret_choose_value 'literal' 'fetched' + When call knoe_secret_choose_value 'literal' 'fetched' The output should eq 'literal' End It 'prefers fetched when current is empty' - When call prole_secret_choose_value '' 'fetched' + When call knoe_secret_choose_value '' 'fetched' The output should eq 'fetched' End It 'prefers fetched when current is a secret ref' - When call prole_secret_choose_value '${OPENBAO:kv/prole/default/kerberos#password}' 'fetched' + When call knoe_secret_choose_value '${OPENBAO:kv/knoe/default/kerberos#password}' 'fetched' The output should eq 'fetched' End End - Describe 'prole_yaml_get_scalar' + Describe 'knoe_yaml_get_scalar' setup_yaml() { yml_file="$(mktemp)" cat >"$yml_file" <<'EOF' @@ -67,27 +67,27 @@ EOF AfterAll 'teardown_yaml' It 'extracts quoted scalars' - When call prole_yaml_get_scalar "$yml_file" samba_dns_server + When call knoe_yaml_get_scalar "$yml_file" samba_dns_server The output should eq '10.0.0.10' End It 'extracts unquoted scalars' - When call prole_yaml_get_scalar "$yml_file" samba_dns_admin_user + When call knoe_yaml_get_scalar "$yml_file" samba_dns_admin_user The output should eq 'administrator' End End - Describe 'prole_guard_nonempty' + Describe 'knoe_guard_nonempty' It 'returns 2 and emits an error for missing values' - When run prole_guard_nonempty 'KRB5_REALM' '' + When run knoe_guard_nonempty 'KRB5_REALM' '' The status should eq 2 The stderr should include 'ERROR: KRB5_REALM is required' End End - Describe 'prole_kubectl_exec_cmd' + Describe 'knoe_kubectl_exec_cmd' It 'assembles a deterministic, escaped command' - When call prole_kubectl_exec_cmd default pod-1 'echo hi' + When call knoe_kubectl_exec_cmd default pod-1 'echo hi' The output should eq 'kubectl -n default exec pod-1 -- sh -c echo\ hi' End End diff --git a/tests/silent_install_test.sh b/tests/silent_install_test.sh index 57b9bda..e23a757 100755 --- a/tests/silent_install_test.sh +++ b/tests/silent_install_test.sh @@ -22,29 +22,29 @@ CFG_PATH="${1:-}" if [[ -z "$CFG_PATH" ]]; then if [[ -n "${PROLE_TEST_CFG:-}" ]]; then if [[ "$PROLE_TEST_CFG" == "true" || "$PROLE_TEST_CFG" == "1" ]]; then - CFG_PATH="$ROOT_DIR/tests/fixtures/test-prole.cfg" + CFG_PATH="$ROOT_DIR/tests/fixtures/test-knoe.cfg" else CFG_PATH="$PROLE_TEST_CFG" fi - elif [[ -n "${PROLE_CONF:-}" && -f "$PROLE_CONF/prole.cfg" ]]; then - CFG_PATH="$PROLE_CONF/prole.cfg" - elif [[ -f "$ROOT_DIR/conf/prole.cfg" ]]; then - CFG_PATH="$ROOT_DIR/conf/prole.cfg" + elif [[ -n "${KNOE_CONF:-}" && -f "$KNOE_CONF/knoe.cfg" ]]; then + CFG_PATH="$KNOE_CONF/knoe.cfg" + elif [[ -f "$ROOT_DIR/conf/knoe.cfg" ]]; then + CFG_PATH="$ROOT_DIR/conf/knoe.cfg" else - echo "ERROR: prole.cfg not found. Pass a path or set PROLE_CONF." >&2 + echo "ERROR: knoe.cfg not found. Pass a path or set KNOE_CONF." >&2 exit 1 fi fi CFG_DIR="$(cd "$(dirname "$CFG_PATH")" && pwd)" -if [[ -z "${PROLE_CONF:-}" ]]; then - PROLE_CONF="$CFG_DIR" - export PROLE_CONF +if [[ -z "${KNOE_CONF:-}" ]]; then + KNOE_CONF="$CFG_DIR" + export KNOE_CONF fi TMP_CFG="" if [[ "${PROLE_CFG_INPLACE:-}" != "true" ]]; then - TMP_CFG="$(mktemp -t prole.cfg.XXXXXX)" + TMP_CFG="$(mktemp -t knoe.cfg.XXXXXX)" cp "$CFG_PATH" "$TMP_CFG" CFG_PATH="$TMP_CFG" trap '[[ -n "$TMP_CFG" ]] && rm -f "$TMP_CFG"' EXIT @@ -52,11 +52,11 @@ fi echo "==============================================" echo " SILENT INSTALL TEST" -echo " prole.cfg: $CFG_PATH" +echo " knoe.cfg: $CFG_PATH" echo "==============================================" echo "" -echo "1. Validating prole.cfg..." +echo "1. Validating knoe.cfg..." python3 - "$CFG_PATH" <<'PY' import configparser import os @@ -65,7 +65,7 @@ from pathlib import Path cfg_path = Path(sys.argv[1]).expanduser() if not cfg_path.exists(): - print(f"ERROR: prole.cfg not found at {cfg_path}", file=sys.stderr) + print(f"ERROR: knoe.cfg not found at {cfg_path}", file=sys.stderr) sys.exit(1) cfg = configparser.ConfigParser(interpolation=None) @@ -90,11 +90,11 @@ required_inputs = [ "disk_selection.removable_mount", "disk_selection.local_path", "env_setup.NAMESPACE", - "env_setup.PROLE_CONF", + "env_setup.KNOE_CONF", "env_setup.PROLE_DATA", - "env_setup.PROLE_HOME", + "env_setup.KNOE_HOME", "env_setup.PROLE_LOGS", - "env_setup.PROLE_SERVICE", + "env_setup.KNOE_SERVICE", "init_cluster.at_rest_encryption_enabled", "init_cluster.cluster_env", "init_cluster.kerberos_enabled", @@ -129,18 +129,18 @@ if missing_inputs: required_non_empty = { "Inputs": [ - "env_setup.PROLE_HOME", - "env_setup.PROLE_CONF", + "env_setup.KNOE_HOME", + "env_setup.KNOE_CONF", "env_setup.PROLE_DATA", "env_setup.PROLE_LOGS", - "env_setup.PROLE_SERVICE", + "env_setup.KNOE_SERVICE", "env_setup.NAMESPACE", "init_password.db_namespace", "init_password.db_username", "init_password.db_host_port", ], "Global": [ - "PROLE_HOME", + "KNOE_HOME", "KNOE_DB_USER", "CLUSTER_ENV", "NAMESPACE", @@ -149,7 +149,7 @@ required_non_empty = { def is_anchor(val: str) -> bool: val = val.strip() - return val.startswith("${OPENBAO:") or val.startswith("${PROLE_SECRET:") + return val.startswith("${OPENBAO:") or val.startswith("${KNOE_SECRET:") errors = [] warnings = [] @@ -185,17 +185,17 @@ if pw and pw_confirm and pw != pw_confirm: errors.append("Inputs.init_password.db_password does not match init_password.db_password_confirm") if errors: - print("ERROR: prole.cfg validation failed:", file=sys.stderr) + print("ERROR: knoe.cfg validation failed:", file=sys.stderr) for err in errors: print(f" - {err}", file=sys.stderr) sys.exit(1) if warnings: - print("WARN: prole.cfg contains anchored secrets:") + print("WARN: knoe.cfg contains anchored secrets:") for warn in warnings: print(f" - {warn}") -print("OK: prole.cfg validation") +print("OK: knoe.cfg validation") PY echo "" @@ -209,7 +209,7 @@ fi echo "" echo "3. Blessing sanitized gold config..." -python3 - "$CFG_PATH" "$PROLE_CONF/knoe-db/prole.cfg" <<'PY' +python3 - "$CFG_PATH" "$KNOE_CONF/knoe-db/knoe.cfg" <<'PY' import re import sys from pathlib import Path @@ -256,7 +256,7 @@ namespace = ( ).strip() or "default" def bao(leaf: str, key: str) -> str: - return f"${{OPENBAO:kv/prole/{namespace}/{leaf}#{key}}}" + return f"${{OPENBAO:kv/knoe/{namespace}/{leaf}#{key}}}" secret_map = { "init_password.db_password": bao("db", "password"), diff --git a/tests/test_all_prole_home_fixes.sh b/tests/test_all_prole_home_fixes.sh index 8c5acaf..136312e 100755 --- a/tests/test_all_prole_home_fixes.sh +++ b/tests/test_all_prole_home_fixes.sh @@ -1,7 +1,7 @@ #!/bin/bash echo "==============================================" -echo " Comprehensive .prole Directory Tests" +echo " Comprehensive .knoe Directory Tests" echo "==============================================" echo "" @@ -23,27 +23,27 @@ test_item() { } echo "DIRECTORY STRUCTURE" -test_item "Create .prole directory" python3 -c "from pathlib import Path; (Path.home() / '.prole').mkdir(exist_ok=True)" -test_item "Create build directory" python3 -c "from pathlib import Path; (Path.home() / '.prole' / 'build').mkdir(parents=True, exist_ok=True)" -test_item "Create scan directory" python3 -c "from pathlib import Path; (Path.home() / '.prole' / 'scan').mkdir(parents=True, exist_ok=True)" +test_item "Create .knoe directory" python3 -c "from pathlib import Path; (Path.home() / '.knoe').mkdir(exist_ok=True)" +test_item "Create build directory" python3 -c "from pathlib import Path; (Path.home() / '.knoe' / 'build').mkdir(parents=True, exist_ok=True)" +test_item "Create scan directory" python3 -c "from pathlib import Path; (Path.home() / '.knoe' / 'scan').mkdir(parents=True, exist_ok=True)" echo "" echo "DOCKER BUILD FIX" test_item "knoe-db directory exists" test -d knoe-db test_item "Dockerfile exists" test -f knoe-db/Dockerfile -test_item "Build directory creation" python3 -c "from pathlib import Path; d = Path.home() / '.prole' / 'build' / 'knoe-db'; d.mkdir(parents=True, exist_ok=True); assert d.exists()" -test_item "Build directory writable" python3 -c "from pathlib import Path; f = Path.home() / '.prole' / 'build' / 'test.txt'; f.write_text('test'); f.unlink()" +test_item "Build directory creation" python3 -c "from pathlib import Path; d = Path.home() / '.knoe' / 'build' / 'knoe-db'; d.mkdir(parents=True, exist_ok=True); assert d.exists()" +test_item "Build directory writable" python3 -c "from pathlib import Path; f = Path.home() / '.knoe' / 'build' / 'test.txt'; f.write_text('test'); f.unlink()" echo "" echo "NETWORK SCAN FIX" test_item "network-agent binary exists" test -x scan/network-agent -test_item "Scan directory creation" python3 -c "from pathlib import Path; d = Path.home() / '.prole' / 'scan'; d.mkdir(parents=True, exist_ok=True); assert d.exists()" -test_item "Scan directory writable" python3 -c "from pathlib import Path; f = Path.home() / '.prole' / 'scan' / 'test.txt'; f.write_text('test'); f.unlink()" +test_item "Scan directory creation" python3 -c "from pathlib import Path; d = Path.home() / '.knoe' / 'scan'; d.mkdir(parents=True, exist_ok=True); assert d.exists()" +test_item "Scan directory writable" python3 -c "from pathlib import Path; f = Path.home() / '.knoe' / 'scan' / 'test.txt'; f.write_text('test'); f.unlink()" echo "" echo "CODE VERIFICATION" -test_item "Build uses .prole/build" grep -q "prole_home / \"build\"" knoe/core/actions.py -test_item "Scan uses .prole/scan" grep -q "prole_home / \"scan\"" knoe/core/actions.py +test_item "Build uses .knoe/build" grep -q "knoe_home / \"build\"" knoe/core/actions.py +test_item "Scan uses .knoe/scan" grep -q "knoe_home / \"scan\"" knoe/core/actions.py test_item "Docker build uses copy_build_context_dir (core)" grep -q "copy_build_context_dir(source_dir, build_dir)" knoe/core/actions.py test_item "Docker build uses copy_build_context_dir (UI)" grep -q "copy_build_context_dir(source_dir, build_dir)" knoe/ui/screens/database.py test_item "Scan runs with cwd" grep -q "cwd=str(scan_dir)" knoe/core/actions.py @@ -60,9 +60,9 @@ echo "CLEANUP" python3 << 'PYTEST' from pathlib import Path import shutil -prole_home = Path.home() / ".prole" -if prole_home.exists(): - shutil.rmtree(prole_home) +knoe_home = Path.home() / ".knoe" +if knoe_home.exists(): + shutil.rmtree(knoe_home) print(" ✓ Cleaned up test directories") PYTEST @@ -76,12 +76,12 @@ if [ $TESTS_PASSED -eq $TESTS_TOTAL ]; then echo "✓✓✓ ALL PROLE HOME TESTS PASSED ✓✓✓" echo "" echo "FIXES IMPLEMENTED:" - echo " ✓ Docker build uses ~/.prole/build/knoe-db/" - echo " ✓ Network scan uses ~/.prole/scan/" + echo " ✓ Docker build uses ~/.knoe/build/knoe-db/" + echo " ✓ Network scan uses ~/.knoe/scan/" echo " ✓ Both work from read-only PyInstaller bundle" echo "" echo "DIRECTORY STRUCTURE:" - echo " ~/.prole/" + echo " ~/.knoe/" echo " ├── build/" echo " │ └── knoe-db/ (Docker build context)" echo " └── scan/ (Network scan working dir)" diff --git a/tests/test_build_system.sh b/tests/test_build_system.sh index f00f4ee..a64de34 100755 --- a/tests/test_build_system.sh +++ b/tests/test_build_system.sh @@ -1,7 +1,7 @@ #!/bin/bash set -e -echo "=== Prole Installer Build System Test ===" +echo "=== Knoe Installer Build System Test ===" echo "" echo "1. Testing Makefile..." @@ -9,7 +9,7 @@ make help > /dev/null && echo " ✓ Makefile works" echo "" echo "2. Testing icon file..." -test -f img/proleIcon.png && echo " ✓ Icon file exists" +test -f img/knoeIcon.png && echo " ✓ Icon file exists" echo "" echo "3. Testing Python modules..." @@ -28,8 +28,8 @@ test -f scripts/generate_spec.py && python3 scripts/generate_spec.py && echo " echo "" echo "6. Testing icon conversion..." make clean > /dev/null 2>&1 -make build/prole.icns > /dev/null 2>&1 && echo " ✓ Icon conversion works" -test -f build/prole.icns && echo " ✓ ICNS file created" +make build/knoe.icns > /dev/null 2>&1 && echo " ✓ Icon conversion works" +test -f build/knoe.icns && echo " ✓ ICNS file created" echo "" echo "=== All Tests Passed ===" diff --git a/tests/test_cluster_screen_observe_only.py b/tests/test_cluster_screen_observe_only.py index 1e8fc57..62b9a58 100644 --- a/tests/test_cluster_screen_observe_only.py +++ b/tests/test_cluster_screen_observe_only.py @@ -96,7 +96,7 @@ def test_service_namespace_infers_registry_namespace(monkeypatch): def __init__(self): self.service_namespace = _Var("") self.cluster_env = _Var("prod") - self.prole_cfg_data = {"Global": {}} + self.knoe_cfg_data = {"Global": {}} def _ensure_k3s_kubeconfig_merged(self): return None @@ -146,9 +146,9 @@ def test_service_namespace_rejects_context_like_value_and_falls_back(): class Dummy(ClusterScreenMixin): def __init__(self): - self.service_namespace = _Var("knoe.dev.prole.org") + self.service_namespace = _Var("knoe.dev.knoe.org") self.cluster_env = _Var("service") - self.prole_cfg_data = {"Global": {}} + self.knoe_cfg_data = {"Global": {}} def _infer_common_services_namespace(self) -> str: return "" diff --git a/tests/test_database_options.py b/tests/test_database_options.py index ffd1e1d..bac372b 100644 --- a/tests/test_database_options.py +++ b/tests/test_database_options.py @@ -42,7 +42,7 @@ def mock_installer(tmp_path): patches = [ patch("knoe.ui.screens.PROJECT_ROOT", tmp_path), patch("knoe.ui.screens.database_options.PROJECT_ROOT", tmp_path), - patch("knoe.ui.screens.database_options.resolve_prole_home", return_value=tmp_path), + patch("knoe.ui.screens.database_options.resolve_knoe_home", return_value=tmp_path), patch("knoe.ui.screens.database_options.get_resource_path", side_effect=lambda name: tmp_path / name), patch("knoe.core.controller.KnoeController.run_script"), patch.object(KnoeInstaller, "_load_database_versions"), diff --git a/tests/test_docker_build_fix.sh b/tests/test_docker_build_fix.sh index 93cf4ff..d2066fb 100755 --- a/tests/test_docker_build_fix.sh +++ b/tests/test_docker_build_fix.sh @@ -42,21 +42,21 @@ PYTEST if [ $? -ne 0 ]; then exit 1; fi # Test 4: Build directory creation -echo "4. Testing .prole/build directory creation..." +echo "4. Testing .knoe/build directory creation..." python3 << 'PYTEST' import sys from pathlib import Path import shutil -prole_home = Path.home() / ".prole" -build_dir = prole_home / "build" / "knoe-db-test" +knoe_home = Path.home() / ".knoe" +build_dir = knoe_home / "build" / "knoe-db-test" # Create and verify build_dir.mkdir(parents=True, exist_ok=True) if build_dir.exists(): print(f" ✓ Created: {build_dir}") # Cleanup - shutil.rmtree(prole_home / "build" / "knoe-db-test") + shutil.rmtree(knoe_home / "build" / "knoe-db-test") else: print(" ✗ Failed to create build directory") sys.exit(1) @@ -73,8 +73,8 @@ sys.path.insert(0, str(Path.cwd())) from knoe.core.env import get_resource_path from knoe.core.build_context import copy_build_context_dir -prole_home = Path.home() / ".prole" -build_dir = prole_home / "build" / "knoe-db-test" +knoe_home = Path.home() / ".knoe" +build_dir = knoe_home / "build" / "knoe-db-test" source_dir = get_resource_path("knoe-db") try: @@ -88,7 +88,7 @@ try: try: import shutil - shutil.rmtree(prole_home / "build" / "knoe-db-test") + shutil.rmtree(knoe_home / "build" / "knoe-db-test") except Exception: pass else: @@ -107,8 +107,8 @@ echo "========================================" echo "" echo "The Docker build will now work correctly:" echo " • From source: Uses PROJECT_ROOT/knoe-db" -echo " • From package: Copies to ~/.prole/build/knoe-db" +echo " • From package: Copies to ~/.knoe/build/knoe-db" echo "" -echo "Build directory: ~/.prole/build/knoe-db" +echo "Build directory: ~/.knoe/build/knoe-db" echo "Build command: docker build -t knoe-db:TAG ." echo "" diff --git a/tests/test_embedded_resources.sh b/tests/test_embedded_resources.sh index f760608..5b337fa 100755 --- a/tests/test_embedded_resources.sh +++ b/tests/test_embedded_resources.sh @@ -12,9 +12,9 @@ sys.path.insert(0, str(Path.cwd())) from install import get_resource_path images = [ - 'img/proleIcon.png', - 'img/proleLogo.png', - 'img/proleLogoSepia.png', + 'img/knoeIcon.png', + 'img/knoeLogo.png', + 'img/knoeLogoSepia.png', ] for img in images: @@ -36,11 +36,11 @@ else fi # Test 3: App bundle -echo "3. Testing Prole Tools.app bundle..." -if [ -d "prole-app/dist/Prole Tools.app" ]; then - echo " ✓ Prole Tools.app present" +echo "3. Testing Knoe Tools.app bundle..." +if [ -d "knoe-app/dist/Knoe Tools.app" ]; then + echo " ✓ Knoe Tools.app present" else - echo " ✗ Prole Tools.app missing" + echo " ✗ Knoe Tools.app missing" exit 1 fi @@ -56,7 +56,7 @@ fi # Test 5: Verify spec includes everything echo "5. Verifying spec includes all resources..." -grep -q "prole-app/dist/Prole Tools.app" installer.spec && \ +grep -q "knoe-app/dist/Knoe Tools.app" installer.spec && \ grep -q "scan/network-agent" installer.spec && \ grep -q "img" installer.spec if [ $? -eq 0 ]; then @@ -70,15 +70,15 @@ fi echo "6. Checking binary sizes..." SCAN_SIZE=$(ls -lh scan/network-agent | awk '{print $5}') echo " network-agent: $SCAN_SIZE (universal binary)" -APP_SIZE=$(du -sh "prole-app/dist/Prole Tools.app" | awk '{print $1}') -echo " Prole Tools.app: $APP_SIZE" +APP_SIZE=$(du -sh "knoe-app/dist/Knoe Tools.app" | awk '{print $1}') +echo " Knoe Tools.app: $APP_SIZE" echo "" echo "=== All Embedded Resource Tests Passed ===" echo "" echo "Resources ready for packaging:" -echo " ✓ Images (proleIcon.png, proleLogo.png, proleLogoSepia.png)" +echo " ✓ Images (knoeIcon.png, knoeLogo.png, knoeLogoSepia.png)" echo " ✓ Binary (scan/network-agent)" -echo " ✓ App bundle (prole-app/dist/Prole Tools.app)" +echo " ✓ App bundle (knoe-app/dist/Knoe Tools.app)" echo "" echo "Build with: make package" diff --git a/tests/test_init_authority.sh b/tests/test_init_authority.sh index 0bc3752..b4ac858 100644 --- a/tests/test_init_authority.sh +++ b/tests/test_init_authority.sh @@ -1,10 +1,10 @@ #!/usr/bin/env bash -# prole/tests/test_init_authority.sh +# knoe/tests/test_init_authority.sh # Validates the YAML generation of init_authority.sh SCRIPT_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) -PROLE_HOME=$(cd "$SCRIPT_DIR/../.." && pwd) -INIT_AUTHORITY="$PROLE_HOME/etc/init_authority.sh" +KNOE_HOME=$(cd "$SCRIPT_DIR/../.." && pwd) +INIT_AUTHORITY="$KNOE_HOME/etc/init_authority.sh" if [[ ! -f "$INIT_AUTHORITY" ]]; then echo "ERROR: $INIT_AUTHORITY not found" @@ -12,9 +12,9 @@ if [[ ! -f "$INIT_AUTHORITY" ]]; then fi # Mock environment -export PROLE_SERVICE="$PROLE_HOME/etc" +export KNOE_SERVICE="$KNOE_HOME/etc" export NAMESPACE="test-namespace" -export PROLE_HOME="$PROLE_HOME" +export KNOE_HOME="$KNOE_HOME" TMP_DIR=$(mktemp -d) trap 'rm -rf "$TMP_DIR"' EXIT @@ -26,7 +26,7 @@ mock_tool() { # LOG THE CALL echo "Mocked $1 called with \$@" >> "$TMP_DIR/mock_calls.log" case "\$1" in - *v1/kv/data/prole/test-namespace/admin) + *v1/kv/data/knoe/test-namespace/admin) echo '{"data":{"data":{"root_password":"REDACTED", "admin_public_key_b64":"LS0tLS1CRUdJTiBQVUJMSUMgS0VZLS0tLS0KTUlJQklqQU5CZ2txaGtpRzl3MEJBUUVGQUFPQ0FROEFNSUlCQ2dLQ0FRRUF6S3Z4CkNvS0tLS0tRU5EIFBVQkxJQyBLRVktLS0tLQo="}}}' ;; *) @@ -75,7 +75,7 @@ mock_tool kubectl export PATH="$TMP_DIR:/usr/bin:/bin" # We'll run a subshell where we override read_from_bao if possible, -# but init_authority.sh sources prole_cfg.sh and defines its own functions. +# but init_authority.sh sources knoe_cfg.sh and defines its own functions. # Instead, we will rely on the fact that it uses curl/jq which we mocked. echo "Running init_authority.sh start (mocked)..." diff --git a/tests/test_init_kerberos_ad_forwarder_readiness.py b/tests/test_init_kerberos_ad_forwarder_readiness.py index 7ee5fdc..637f3b1 100644 --- a/tests/test_init_kerberos_ad_forwarder_readiness.py +++ b/tests/test_init_kerberos_ad_forwarder_readiness.py @@ -24,9 +24,9 @@ def test_init_kerberos_waits_for_ad_forwarder_ready_and_endpoints(): def test_check_kerberos_cleanup_handles_missing_namespace(tmp_path): """Regression: cleanup path should not crash when PROLE_NAMESPACE is unset.""" - prole_conf = tmp_path / "conf" - prole_conf.mkdir() - (prole_conf / "prole.cfg").write_text("[Global]\nDEPLOYMENT_MODE = k3s\n", encoding="utf-8") + knoe_conf = tmp_path / "conf" + knoe_conf.mkdir() + (knoe_conf / "knoe.cfg").write_text("[Global]\nDEPLOYMENT_MODE = k3s\n", encoding="utf-8") home_dir = tmp_path / "home" home_dir.mkdir() @@ -35,8 +35,8 @@ def test_check_kerberos_cleanup_handles_missing_namespace(tmp_path): env.pop("PROLE_NAMESPACE", None) env.pop("NAMESPACE", None) env.pop("SERVICE_NAMESPACE", None) - env["PROLE_CONF"] = str(prole_conf) - env["PROLE_HOME"] = "" + env["KNOE_CONF"] = str(knoe_conf) + env["KNOE_HOME"] = "" env["HOME"] = str(home_dir) repo_root = Path(__file__).resolve().parents[1] diff --git a/tests/test_install_logic.py b/tests/test_install_logic.py index f660c4f..371a8d2 100644 --- a/tests/test_install_logic.py +++ b/tests/test_install_logic.py @@ -33,17 +33,17 @@ def installer(tmp_path): return ins -def test_resolve_prole_home_default(installer): +def test_resolve_knoe_home_default(installer): with patch.dict(os.environ, {}, clear=True): - # Path.home() might vary, so we just check it ends with .prole if no env var - home = installer.resolve_prole_home() - assert home.name == ".prole" + # Path.home() might vary, so we just check it ends with .knoe if no env var + home = installer.resolve_knoe_home() + assert home.name == ".knoe" -def test_resolve_prole_home_env(installer): - custom_home = "/tmp/custom_prole" - with patch.dict(os.environ, {"PROLE_HOME": custom_home}): - home = installer.resolve_prole_home() +def test_resolve_knoe_home_env(installer): + custom_home = "/tmp/custom_knoe" + with patch.dict(os.environ, {"KNOE_HOME": custom_home}): + home = installer.resolve_knoe_home() assert str(home) == custom_home @@ -52,14 +52,14 @@ def test_env_defaults(installer): installer, "_read_existing_env", return_value={} ): defaults = installer._env_defaults() - assert "PROLE_HOME" in defaults - assert defaults["PROLE_HOME"].endswith(".prole") - assert defaults["PROLE_CONF"].endswith(".prole/conf") + assert "KNOE_HOME" in defaults + assert defaults["KNOE_HOME"].endswith(".knoe") + assert defaults["KNOE_CONF"].endswith(".knoe/conf") def test_read_existing_env_no_file(installer, tmp_path): - # Ensure neither PROLE_HOME nor the default location has an env.sh for this test - with patch.dict(os.environ, {"PROLE_HOME": str(tmp_path)}): + # Ensure neither KNOE_HOME nor the default location has an env.sh for this test + with patch.dict(os.environ, {"KNOE_HOME": str(tmp_path)}): with patch("pathlib.Path.home", return_value=tmp_path / "fake_home"): env = installer._read_existing_env() assert env == {} @@ -69,7 +69,7 @@ def test_read_existing_env_with_file(installer, tmp_path): env_sh = tmp_path / "env.sh" env_sh.write_text('export VAR1="val1"\nVAR2=val2\n# comment\n') - with patch.dict(os.environ, {"PROLE_HOME": str(tmp_path)}): + with patch.dict(os.environ, {"KNOE_HOME": str(tmp_path)}): with patch("pathlib.Path.home", return_value=tmp_path / "fake_home"): env = installer._read_existing_env() assert env.get("VAR1") == "val1" diff --git a/tests/test_k3s_common_core_namespace_and_repair.py b/tests/test_k3s_common_core_namespace_and_repair.py index f39a614..93e315b 100644 --- a/tests/test_k3s_common_core_namespace_and_repair.py +++ b/tests/test_k3s_common_core_namespace_and_repair.py @@ -14,7 +14,7 @@ def test_silent_installer_service_namespace_defaults_to_knoe_system_for_k3s(tmp_ c = KnoeController(tmp_path) installer = KnoeConsoleInstaller(c) installer.inputs["init_cluster.cluster_env"] = "service" - installer.prole_cfg_data = {"Global": {}} + installer.knoe_cfg_data = {"Global": {}} assert installer._service_namespace() == "knoe-system" @@ -29,7 +29,7 @@ def test_repair_pipeline_has_k3s_dedupe_guard(): text = Path("etc/repair_pipeline.sh").read_text(encoding="utf-8") - # No hardcoded service namespace in scripts; should be driven by prole.cfg (SERVICE_NAMESPACE) + # No hardcoded service namespace in scripts; should be driven by knoe.cfg (SERVICE_NAMESPACE) assert "knoe-system" not in text # Wrapper should delegate to Python orchestration. @@ -41,11 +41,11 @@ def test_repair_pipeline_has_k3s_dedupe_guard(): # Dedupe logic is now in Python. py = Path("knoe/core/actions.py").read_text(encoding="utf-8") assert "Legacy namespace dedupe" in py - assert "prole-svc-kong" in py + assert "knoe-svc-kong" in py def test_no_knoe_system_literal_in_init_scripts(): - """Common service namespace must be driven by prole.cfg; init scripts must not hardcode knoe-system.""" + """Common service namespace must be driven by knoe.cfg; init scripts must not hardcode knoe-system.""" init_scripts = sorted(Path("etc").glob("init_*.sh")) assert init_scripts, "expected init_*.sh scripts under etc/" diff --git a/tests/test_navigation.py b/tests/test_navigation.py index 90a7c93..ec88dba 100644 --- a/tests/test_navigation.py +++ b/tests/test_navigation.py @@ -21,8 +21,8 @@ from install import KnoeInstaller @pytest.fixture def mock_installer(tmp_path): - test_cfg_src = Path(__file__).parent / "fixtures" / "test-prole.cfg" - cfg_path = tmp_path / "prole.cfg" + test_cfg_src = Path(__file__).parent / "fixtures" / "test-knoe.cfg" + cfg_path = tmp_path / "knoe.cfg" cfg_path.write_text(test_cfg_src.read_text()) with patch("install.tk.Tk"), patch("install.tk.Frame"), patch( "install.tk.Canvas" @@ -37,9 +37,9 @@ def mock_installer(tmp_path): ), patch.object( KnoeInstaller, "_save_env_to_file" ), patch.object( - KnoeInstaller, "_save_prole_cfg" + KnoeInstaller, "_save_knoe_cfg" ), patch.object( - KnoeInstaller, "_save_ansible_prole_vault" + KnoeInstaller, "_save_ansible_knoe_vault" ), patch.object( KnoeInstaller, "_after_env_saved" ), patch( @@ -125,7 +125,7 @@ def test_ollama_screen_removed_and_supabase_flows_to_deploy(mock_installer): assert all(pid != "ollama_config" for _, pid in mock_installer.nav_items) # Ensure Next from Supabase goes directly to Deployment. - mock_installer.prole_cfg_data.setdefault("Optional Features", {}) + mock_installer.knoe_cfg_data.setdefault("Optional Features", {}) supabase_idx = next(i for i, (pid, _) in enumerate(mock_installer.pages) if pid == "supabase_config") mock_installer.page_index = supabase_idx mock_installer.on_next() @@ -244,16 +244,16 @@ def test_all_pages_render(mock_installer): if hasattr(mock_installer.cluster_env, "get") and hasattr( mock_installer.cluster_env.get, "return_value" ): - mock_installer.cluster_env.get.return_value = "prole-service-cluster" + mock_installer.cluster_env.get.return_value = "knoe-service-cluster" else: - mock_installer.cluster_env.set("prole-service-cluster") + mock_installer.cluster_env.set("knoe-service-cluster") with patch.object(mock_installer, "_cluster_env_key", return_value="service"): mock_installer.show_page("init_cluster") if hasattr(mock_installer.cluster_env, "get") and hasattr( mock_installer.cluster_env.get, "return_value" ): - mock_installer.cluster_env.get.return_value = "prole-prod-cluster" + mock_installer.cluster_env.get.return_value = "knoe-prod-cluster" else: - mock_installer.cluster_env.set("prole-prod-cluster") + mock_installer.cluster_env.set("knoe-prod-cluster") with patch.object(mock_installer, "_cluster_env_key", return_value="prod"): mock_installer.show_page("init_cluster") diff --git a/tests/test_network_scan_fix.sh b/tests/test_network_scan_fix.sh index a98405e..5898963 100755 --- a/tests/test_network_scan_fix.sh +++ b/tests/test_network_scan_fix.sh @@ -9,8 +9,8 @@ echo "" echo "1. Testing scan directory creation..." python3 << 'PYTEST' from pathlib import Path -prole_home = Path.home() / ".prole" -scan_dir = prole_home / "scan" +knoe_home = Path.home() / ".knoe" +scan_dir = knoe_home / "scan" scan_dir.mkdir(parents=True, exist_ok=True) if scan_dir.exists() and scan_dir.is_dir(): print(" ✓ Scan directory created") @@ -24,7 +24,7 @@ if [ $? -ne 0 ]; then exit 1; fi echo "2. Testing scan directory is writable..." python3 << 'PYTEST' from pathlib import Path -scan_dir = Path.home() / ".prole" / "scan" +scan_dir = Path.home() / ".knoe" / "scan" test_file = scan_dir / "test.txt" try: test_file.write_text("test") @@ -65,7 +65,7 @@ cd "$PROLE_ROOT" # Test 5: Code uses scan directory echo "5. Testing code uses scan directory..." -if grep -rq "scan_dir = prole_home / \"scan\"" knoe/ && \ +if grep -rq "scan_dir = knoe_home / \"scan\"" knoe/ && \ grep -rq "cwd=str(scan_dir)" knoe/; then echo " ✓ Code properly uses scan directory" else @@ -74,7 +74,7 @@ else fi # Cleanup test directories -rm -rf ~/.prole/scan 2>/dev/null +rm -rf ~/.knoe/scan 2>/dev/null echo "" echo "========================================" @@ -83,8 +83,8 @@ echo "========================================" echo "" echo "Network scan will now work correctly:" echo " • From source: Uses writable cwd" -echo " • From package: Uses ~/.prole/scan" +echo " • From package: Uses ~/.knoe/scan" echo "" -echo "Scan directory: ~/.prole/scan" -echo "Purpose: Writable working directory for prole-agent" +echo "Scan directory: ~/.knoe/scan" +echo "Purpose: Writable working directory for knoe-agent" echo "" diff --git a/tests/test_reconcile_blocked_cluster_state.py b/tests/test_reconcile_blocked_cluster_state.py index 2db4d6b..721ad30 100644 --- a/tests/test_reconcile_blocked_cluster_state.py +++ b/tests/test_reconcile_blocked_cluster_state.py @@ -163,8 +163,8 @@ def test_repair_flow_classifies_blockers_attempts_reclaim_and_avoids_blind_healt # Missing downstream Kong resources. if cmd[:4] == ["kubectl", "-n", service_ns, "get"] and cmd[4:6] in ( - ["svc", "prole-svc-kong"], - ["deploy", "prole-svc-kong"], + ["svc", "knoe-svc-kong"], + ["deploy", "knoe-svc-kong"], ): return SimpleNamespace(returncode=1, stdout="", stderr="not found") @@ -196,7 +196,7 @@ def test_repair_flow_classifies_blockers_attempts_reclaim_and_avoids_blind_healt # Downstream missingness is present, but labeled as downstream. assert "Downstream missing resources" in msg - assert "prole-svc-kong" in msg + assert "knoe-svc-kong" in msg # Strict policy: never delete PVs. assert not any(c[:3] == ["kubectl", "delete", "pv"] for c in calls) diff --git a/tests/test_render_supabase_hostname.py b/tests/test_render_supabase_hostname.py index f4b0fbb..b3f6f06 100644 --- a/tests/test_render_supabase_hostname.py +++ b/tests/test_render_supabase_hostname.py @@ -10,7 +10,7 @@ _NOTES_TEMPLATE_PATH = REPO_ROOT / "supabase" / "helm" / "knoe-supabase" / "temp def _load_render_module(): - spec = importlib.util.spec_from_file_location("prole_render_supabase", _RENDER_PATH) + spec = importlib.util.spec_from_file_location("knoe_render_supabase", _RENDER_PATH) assert spec is not None and spec.loader is not None module = importlib.util.module_from_spec(spec) spec.loader.exec_module(module) @@ -34,12 +34,12 @@ def test_render_supabase_uses_supabase_hostname_for_public_urls(tmp_path: Path, monkeypatch.delenv("KNOE_DB_NAMESPACE", raising=False) monkeypatch.delenv("KNOE_DB_SERVICE", raising=False) - cfg_path = tmp_path / "prole.cfg" + cfg_path = tmp_path / "knoe.cfg" _write_cfg( cfg_path, """ [User] - supabase_hostname = db.prole.org + supabase_hostname = db.knoe.org [Inputs] init_password.db_password = test-password @@ -55,10 +55,10 @@ def test_render_supabase_uses_supabase_hostname_for_public_urls(tmp_path: Path, args = Namespace(output_dir=str(tmp_path / "gen"), manifests_dir=str(tmp_path / "k8s")) overlay, _meta = _build_overlay(cfg, args) - assert overlay["ingress"]["hosts"][0]["host"] == "db.prole.org" - assert overlay["environment"]["auth"]["API_EXTERNAL_URL"] == "https://db.prole.org" - assert overlay["environment"]["auth"]["GOTRUE_SITE_URL"] == "https://db.prole.org" - assert overlay["environment"]["studio"]["SUPABASE_PUBLIC_URL"] == "https://db.prole.org" + assert overlay["ingress"]["hosts"][0]["host"] == "db.knoe.org" + assert overlay["environment"]["auth"]["API_EXTERNAL_URL"] == "https://db.knoe.org" + assert overlay["environment"]["auth"]["GOTRUE_SITE_URL"] == "https://db.knoe.org" + assert overlay["environment"]["studio"]["SUPABASE_PUBLIC_URL"] == "https://db.knoe.org" def test_render_supabase_allows_scheme_in_supabase_hostname(tmp_path: Path, monkeypatch): @@ -67,12 +67,12 @@ def test_render_supabase_allows_scheme_in_supabase_hostname(tmp_path: Path, monk monkeypatch.delenv("KNOE_DB_NAMESPACE", raising=False) monkeypatch.delenv("KNOE_DB_SERVICE", raising=False) - cfg_path = tmp_path / "prole.cfg" + cfg_path = tmp_path / "knoe.cfg" _write_cfg( cfg_path, """ [User] - supabase_hostname = http://db.prole.org + supabase_hostname = http://db.knoe.org [Inputs] init_password.db_password = test-password @@ -88,9 +88,9 @@ def test_render_supabase_allows_scheme_in_supabase_hostname(tmp_path: Path, monk args = Namespace(output_dir=str(tmp_path / "gen"), manifests_dir=str(tmp_path / "k8s")) overlay, _meta = _build_overlay(cfg, args) - assert overlay["ingress"]["hosts"][0]["host"] == "db.prole.org" - assert overlay["environment"]["auth"]["API_EXTERNAL_URL"] == "http://db.prole.org" - assert overlay["environment"]["studio"]["SUPABASE_PUBLIC_URL"] == "http://db.prole.org" + assert overlay["ingress"]["hosts"][0]["host"] == "db.knoe.org" + assert overlay["environment"]["auth"]["API_EXTERNAL_URL"] == "http://db.knoe.org" + assert overlay["environment"]["studio"]["SUPABASE_PUBLIC_URL"] == "http://db.knoe.org" def test_render_supabase_splits_api_and_studio_hosts_for_k8s(tmp_path: Path, monkeypatch): @@ -99,7 +99,7 @@ def test_render_supabase_splits_api_and_studio_hosts_for_k8s(tmp_path: Path, mon monkeypatch.delenv("KNOE_DB_NAMESPACE", raising=False) monkeypatch.delenv("KNOE_DB_SERVICE", raising=False) - cfg_path = tmp_path / "prole.cfg" + cfg_path = tmp_path / "knoe.cfg" _write_cfg( cfg_path, """ @@ -139,7 +139,7 @@ def test_render_supabase_derives_env_indexed_api_host_for_k8s(tmp_path: Path, mo monkeypatch.delenv("KNOE_DB_NAMESPACE", raising=False) monkeypatch.delenv("KNOE_DB_SERVICE", raising=False) - cfg_path = tmp_path / "prole.cfg" + cfg_path = tmp_path / "knoe.cfg" _write_cfg( cfg_path, """ @@ -185,7 +185,7 @@ def test_render_supabase_rejects_duplicate_api_and_studio_host_claims(tmp_path: monkeypatch.delenv("KNOE_DB_NAMESPACE", raising=False) monkeypatch.delenv("KNOE_DB_SERVICE", raising=False) - cfg_path = tmp_path / "prole.cfg" + cfg_path = tmp_path / "knoe.cfg" _write_cfg( cfg_path, """ @@ -220,7 +220,7 @@ def test_render_supabase_allows_db_cluster_context_for_public_ingress(tmp_path: monkeypatch.delenv("KNOE_DB_SERVICE", raising=False) monkeypatch.setenv("KUBECONTEXT", "knoe-dev-cnpg-0") - cfg_path = tmp_path / "prole.cfg" + cfg_path = tmp_path / "knoe.cfg" _write_cfg( cfg_path, """ @@ -254,7 +254,7 @@ def test_render_supabase_rejects_traefik_class_in_k8s_without_opt_in(tmp_path: P monkeypatch.delenv("KNOE_DB_NAMESPACE", raising=False) monkeypatch.delenv("KNOE_DB_SERVICE", raising=False) - cfg_path = tmp_path / "prole.cfg" + cfg_path = tmp_path / "knoe.cfg" _write_cfg( cfg_path, """ diff --git a/tests/test_render_supabase_placement.py b/tests/test_render_supabase_placement.py index 88b65e8..a5e617d 100644 --- a/tests/test_render_supabase_placement.py +++ b/tests/test_render_supabase_placement.py @@ -9,7 +9,7 @@ from types import SimpleNamespace def _load_render_supabase_module(): repo_root = Path(__file__).resolve().parents[1] mod_path = repo_root / "supabase" / "helm" / "render_supabase.py" - spec = importlib.util.spec_from_file_location("prole_render_supabase", mod_path) + spec = importlib.util.spec_from_file_location("knoe_render_supabase", mod_path) assert spec is not None module = importlib.util.module_from_spec(spec) assert spec.loader is not None @@ -22,7 +22,7 @@ def _minimal_cfg() -> configparser.ConfigParser: cfg.read_string( """ [Global] -NAMESPACE = prole +NAMESPACE = knoe STORAGE_BACKEND = local """ ) @@ -32,11 +32,11 @@ STORAGE_BACKEND = local def test_supabase_overlay_pins_components_to_merlin_in_k3s_mode(monkeypatch, tmp_path): m = _load_render_supabase_module() cfg = _minimal_cfg() - args = SimpleNamespace(output_dir=str(tmp_path), config=str(tmp_path / "prole.cfg")) + args = SimpleNamespace(output_dir=str(tmp_path), config=str(tmp_path / "knoe.cfg")) monkeypatch.setenv("DB_PASSWORD", "test-db-password") - monkeypatch.setenv("PROLE_MODE", "k3s") - monkeypatch.setenv("SUPABASE_PRIMARY_NODE", "merlin.prole.org") + monkeypatch.setenv("KNOE_MODE", "k3s") + monkeypatch.setenv("SUPABASE_PRIMARY_NODE", "merlin.knoe.org") overlay, _meta = m._build_overlay(cfg, args) deployment = overlay["deployment"] @@ -56,17 +56,17 @@ def test_supabase_overlay_pins_components_to_merlin_in_k3s_mode(monkeypatch, tmp assert component in deployment assert ( deployment[component]["nodeSelector"]["kubernetes.io/hostname"] - == "merlin.prole.org" + == "merlin.knoe.org" ) def test_supabase_overlay_does_not_pin_components_outside_k3s(monkeypatch, tmp_path): m = _load_render_supabase_module() cfg = _minimal_cfg() - args = SimpleNamespace(output_dir=str(tmp_path), config=str(tmp_path / "prole.cfg")) + args = SimpleNamespace(output_dir=str(tmp_path), config=str(tmp_path / "knoe.cfg")) monkeypatch.setenv("DB_PASSWORD", "test-db-password") - monkeypatch.setenv("PROLE_MODE", "k3d") + monkeypatch.setenv("KNOE_MODE", "k3d") monkeypatch.delenv("SUPABASE_PRIMARY_NODE", raising=False) overlay, _meta = m._build_overlay(cfg, args) diff --git a/tests/test_repair_update_and_supabase_flags.py b/tests/test_repair_update_and_supabase_flags.py index 7a24049..f0f5dd6 100644 --- a/tests/test_repair_update_and_supabase_flags.py +++ b/tests/test_repair_update_and_supabase_flags.py @@ -11,7 +11,7 @@ from unittest.mock import MagicMock, patch import pytest # --------------------------------------------------------------------------- -# Tkinter / GUI stubs (must be installed before any prole import) +# Tkinter / GUI stubs (must be installed before any knoe import) # --------------------------------------------------------------------------- for _mod in ( "tkinter", @@ -34,7 +34,7 @@ _RENDER_PATH = REPO_ROOT / "supabase" / "helm" / "render_supabase.py" def _load_render_module(): - spec = importlib.util.spec_from_file_location("prole_render_supabase_flags", _RENDER_PATH) + spec = importlib.util.spec_from_file_location("knoe_render_supabase_flags", _RENDER_PATH) assert spec is not None and spec.loader is not None mod = importlib.util.module_from_spec(spec) spec.loader.exec_module(mod) @@ -51,7 +51,7 @@ def _write_cfg(path: Path, content: str) -> None: def _minimal_cfg(tmp_path: Path, extra: str = "") -> configparser.ConfigParser: - cfg_path = tmp_path / "prole.cfg" + cfg_path = tmp_path / "knoe.cfg" _write_cfg( cfg_path, f""" @@ -72,7 +72,7 @@ def _make_installer(tmp_path: Path): from knoe.core.actions import KnoeConsoleInstaller from knoe.core.controller import KnoeController - cfg_path = tmp_path / "prole.cfg" + cfg_path = tmp_path / "knoe.cfg" if not cfg_path.exists(): _write_cfg(cfg_path, "[Inputs]\n[Global]\n[Install]\nSTATUS = New\n") @@ -84,7 +84,7 @@ def _make_installer(tmp_path: Path): installer.controller = controller installer.cfg_path = cfg_path installer.inputs = {} - installer.prole_cfg_data = {"Inputs": {}, "Global": {}, "Install": {"STATUS": "New"}} + installer.knoe_cfg_data = {"Inputs": {}, "Global": {}, "Install": {"STATUS": "New"}} installer._log_file = None installer.verbose = False installer.dependencies = [] @@ -142,7 +142,7 @@ def test_main_update_flag_dispatches_to_run_update(tmp_path, monkeypatch): """install.py --update must run console update flow and exit with its status.""" import knoe.ui.screens as screens_mod - cfg_path = tmp_path / "prole.cfg" + cfg_path = tmp_path / "knoe.cfg" _write_cfg(cfg_path, "[Inputs]\n[Global]\n") installer = MagicMock() @@ -168,7 +168,7 @@ def test_main_rejects_repair_and_update_together(tmp_path, monkeypatch): """CLI must reject using --repair and --update together.""" import knoe.ui.screens as screens_mod - cfg_path = tmp_path / "prole.cfg" + cfg_path = tmp_path / "knoe.cfg" _write_cfg(cfg_path, "[Inputs]\n[Global]\n") monkeypatch.setattr( @@ -185,7 +185,7 @@ def test_main_rejects_delete_db_without_reset(tmp_path, monkeypatch): """CLI must require --reset when --delete-db is provided.""" import knoe.ui.screens as screens_mod - cfg_path = tmp_path / "prole.cfg" + cfg_path = tmp_path / "knoe.cfg" _write_cfg(cfg_path, "[Inputs]\n[Global]\n") monkeypatch.setattr( @@ -202,7 +202,7 @@ def test_main_delete_db_is_forwarded_to_console_installer(tmp_path, monkeypatch) """install.py --delete-db must be forwarded to KnoeConsoleInstaller in silent mode.""" import knoe.ui.screens as screens_mod - cfg_path = tmp_path / "prole.cfg" + cfg_path = tmp_path / "knoe.cfg" _write_cfg(cfg_path, "[Inputs]\n[Global]\n") installer = MagicMock() @@ -378,7 +378,7 @@ def test_render_supabase_studio_url_overrides_ingress_host(tmp_path, monkeypatch tmp_path, extra=( "init_cluster.supabase_studio_enabled = true\n" - "init_cluster.supabase_studio_url = studio.prole.org\n" + "init_cluster.supabase_studio_url = studio.knoe.org\n" ), ) args = Namespace(output_dir=str(tmp_path / "gen"), manifests_dir=str(tmp_path / "k8s")) @@ -386,7 +386,7 @@ def test_render_supabase_studio_url_overrides_ingress_host(tmp_path, monkeypatch assert overlay["deployment"]["studio"]["enabled"] is True studio_hosts = overlay.get("studioIngress", {}).get("hosts", []) - assert studio_hosts and studio_hosts[0]["host"] == "studio.prole.org" + assert studio_hosts and studio_hosts[0]["host"] == "studio.knoe.org" def test_render_supabase_studio_multi_url_creates_multiple_ingress_hosts(tmp_path, monkeypatch): @@ -400,7 +400,7 @@ def test_render_supabase_studio_multi_url_creates_multiple_ingress_hosts(tmp_pat tmp_path, extra=( "init_cluster.supabase_studio_enabled = true\n" - "init_cluster.supabase_studio_url = supabase.prole.org,db.prole.org\n" + "init_cluster.supabase_studio_url = supabase.knoe.org,db.knoe.org\n" ), ) args = Namespace(output_dir=str(tmp_path / "gen"), manifests_dir=str(tmp_path / "k8s")) @@ -409,11 +409,11 @@ def test_render_supabase_studio_multi_url_creates_multiple_ingress_hosts(tmp_pat assert overlay["deployment"]["studio"]["enabled"] is True studio_hosts = overlay.get("studioIngress", {}).get("hosts", []) host_names = [h["host"] for h in studio_hosts] - assert "supabase.prole.org" in host_names, f"Expected supabase.prole.org in {host_names}" - assert "db.prole.org" in host_names, f"Expected db.prole.org in {host_names}" + assert "supabase.knoe.org" in host_names, f"Expected supabase.knoe.org in {host_names}" + assert "db.knoe.org" in host_names, f"Expected db.knoe.org in {host_names}" assert len(host_names) == 2, f"Expected exactly 2 hosts, got {host_names}" # First entry is the primary (used for SUPABASE_PUBLIC_URL) - assert host_names[0] == "supabase.prole.org" + assert host_names[0] == "supabase.knoe.org" def test_render_supabase_studio_disabled_sets_enabled_false(tmp_path, monkeypatch): @@ -433,7 +433,7 @@ def test_render_supabase_studio_disabled_sets_enabled_false(tmp_path, monkeypatc def test_render_supabase_k8s_adds_gce_tls_annotations_for_api_and_studio(tmp_path, monkeypatch): """k8s/GKE overlay must attach explicit ManagedCertificate + FrontendConfig annotations.""" - monkeypatch.setenv("PROLE_MODE", "k8s") + monkeypatch.setenv("KNOE_MODE", "k8s") monkeypatch.setenv("SUPABASE_API_HOSTNAME", "api.0.knoe.dev") monkeypatch.setenv("SUPABASE_STUDIO_HOSTNAME", "db.0.knoe.dev") @@ -460,11 +460,11 @@ def test_render_supabase_render_writes_gke_public_ingress_tls_manifest(tmp_path, """render() must emit ManagedCertificate/FrontendConfig manifests for Supabase public ingresses in k8s mode.""" import subprocess as sp - monkeypatch.setenv("PROLE_MODE", "k8s") + monkeypatch.setenv("KNOE_MODE", "k8s") monkeypatch.setenv("SUPABASE_API_HOSTNAME", "api.0.knoe.dev") monkeypatch.setenv("SUPABASE_STUDIO_HOSTNAME", "db.0.knoe.dev") - cfg_path = tmp_path / "prole.cfg" + cfg_path = tmp_path / "knoe.cfg" _write_cfg( cfg_path, """ @@ -856,10 +856,10 @@ def test_gitlab_and_gitea_init_storage_node_defaults_are_config_driven(): gitlab_script = (REPO_ROOT / "etc" / "init_gitlab.sh").read_text(encoding="utf-8") gitea_script = (REPO_ROOT / "etc" / "init_gitea.sh").read_text(encoding="utf-8") - assert "GITLAB_STORAGE_NODE:-gandalf.prole.org" not in gitlab_script - assert "GITEA_NODE_SELECTOR:-gandalf.prole.org" not in gitea_script - assert "gandalf.prole.org" not in gitlab_script - assert "gandalf.prole.org" not in gitea_script + assert "GITLAB_STORAGE_NODE:-gandalf.knoe.org" not in gitlab_script + assert "GITEA_NODE_SELECTOR:-gandalf.knoe.org" not in gitea_script + assert "gandalf.knoe.org" not in gitlab_script + assert "gandalf.knoe.org" not in gitea_script assert 'NODE_SELECTOR_KEY="${GITLAB_NODE_SELECTOR_KEY:-${NODE_SELECTOR_KEY:-kubernetes.io/hostname}}"' in gitlab_script assert 'NODE_SELECTOR_KEY="${GITEA_NODE_SELECTOR_KEY:-${NODE_SELECTOR_KEY:-kubernetes.io/hostname}}"' in gitea_script @@ -873,9 +873,9 @@ def test_ui_screens_do_not_hardcode_physical_hosts(): encoding="utf-8" ) - assert "gandalf.prole.org" not in screens_init - assert "gandalf.prole.org" not in screens_base - assert "myrddin.prole.org" not in screens_base + assert "gandalf.knoe.org" not in screens_init + assert "gandalf.knoe.org" not in screens_base + assert "myrddin.knoe.org" not in screens_base def test_init_kong_allows_disabling_svc_ingress_tls_for_k8s_path(): diff --git a/tests/test_resource_paths.py b/tests/test_resource_paths.py index 24bf27d..2615699 100755 --- a/tests/test_resource_paths.py +++ b/tests/test_resource_paths.py @@ -16,11 +16,11 @@ def test_resource_path(): print() test_cases = [ - ("img/proleIcon.png", "App icon"), - ("img/proleLogoSepia.png", "Background logo (sepia)"), - ("img/proleLogo.png", "Main logo"), - ("img/proleLogoBlueprint.png", "Blueprint logo"), - ("img/proleIconblueprint.png", "Blueprint icon"), + ("img/knoeIcon.png", "App icon"), + ("img/knoeLogoSepia.png", "Background logo (sepia)"), + ("img/knoeLogo.png", "Main logo"), + ("img/knoeLogoBlueprint.png", "Blueprint logo"), + ("img/knoeIconblueprint.png", "Blueprint icon"), ] all_passed = True @@ -51,7 +51,7 @@ def test_pyinstaller_simulation(): sys._MEIPASS = str(test_meipass) try: - result = get_resource_path("img/proleIcon.png") + result = get_resource_path("img/knoeIcon.png") print(f" sys._MEIPASS: {sys._MEIPASS}") print(f" Resolved path: {result}") print(f" Exists: {result.exists()}") diff --git a/tests/test_service_layer_navigation.py b/tests/test_service_layer_navigation.py index eb64d34..e73dcfb 100644 --- a/tests/test_service_layer_navigation.py +++ b/tests/test_service_layer_navigation.py @@ -21,8 +21,8 @@ from install import KnoeInstaller @pytest.fixture def mock_installer(tmp_path): - test_cfg_src = Path(__file__).parent / "fixtures" / "test-prole.cfg" - cfg_path = tmp_path / "prole.cfg" + test_cfg_src = Path(__file__).parent / "fixtures" / "test-knoe.cfg" + cfg_path = tmp_path / "knoe.cfg" cfg_path.write_text(test_cfg_src.read_text()) with ExitStack() as stack: @@ -39,8 +39,8 @@ def mock_installer(tmp_path): stack.enter_context(patch("install.Path.exists", return_value=True)) stack.enter_context(patch("install.Path.mkdir")) stack.enter_context(patch.object(KnoeInstaller, "_save_env_to_file")) - stack.enter_context(patch.object(KnoeInstaller, "_save_prole_cfg")) - stack.enter_context(patch.object(KnoeInstaller, "_save_ansible_prole_vault")) + stack.enter_context(patch.object(KnoeInstaller, "_save_knoe_cfg")) + stack.enter_context(patch.object(KnoeInstaller, "_save_ansible_knoe_vault")) stack.enter_context(patch.object(KnoeInstaller, "_after_env_saved")) stack.enter_context(patch("threading.Thread")) @@ -59,11 +59,11 @@ def mock_installer(tmp_path): pass # Ensure deterministic gating for the Cluster Nodes screen (multi-node, non-k3d). try: - app.cluster_env.get.return_value = "prole-service-cluster" + app.cluster_env.get.return_value = "knoe-service-cluster" except Exception: pass app.ansible_topology = { - "domain": "prole.org", + "domain": "knoe.org", "hosts": {"merlin": "10.0.0.10", "myrddin": "10.0.0.11"}, "groups": {"k3s_hosts": ["merlin", "myrddin"]}, } diff --git a/tmp/check_and_cleanup.sh b/tmp/check_and_cleanup.sh index 77440ec..aa1e3b4 100644 --- a/tmp/check_and_cleanup.sh +++ b/tmp/check_and_cleanup.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -export KUBECONFIG=/Users/chrisfu/dev/prole/prole-k3s.kubeconfig +export KUBECONFIG=/Users/chrisfu/dev/knoe/knoe-k3s.kubeconfig echo "==> Deleting minio-create-buckets jobs (buckets already exist)..." kubectl -n gitea delete jobs -l app=minio-create-buckets --ignore-not-found 2>&1 diff --git a/tmp/check_and_fix_dirs.sh b/tmp/check_and_fix_dirs.sh index 39c9558..2f39699 100644 --- a/tmp/check_and_fix_dirs.sh +++ b/tmp/check_and_fix_dirs.sh @@ -1,12 +1,12 @@ #!/usr/bin/env bash set -euo pipefail -export KUBECONFIG=/Users/chrisfu/dev/prole/prole-k3s.kubeconfig +export KUBECONFIG=/Users/chrisfu/dev/knoe/knoe-k3s.kubeconfig echo "==> Verify dirs on gandalf..." kubectl -n gitlab run dircheck \ --image=alpine:latest --restart=Never --rm --attach \ --overrides='{ - "spec":{"nodeName":"gandalf.prole.org","tolerations":[{"operator":"Exists"}], + "spec":{"nodeName":"gandalf.knoe.org","tolerations":[{"operator":"Exists"}], "volumes":[{"name":"syn","hostPath":{"path":"/synology/d005","type":"Directory"}}], "containers":[{"name":"dircheck","image":"alpine:latest", "command":["sh","-c","ls -la /syn/gitlab/ 2>&1 || echo DIR_MISSING; mkdir -p /syn/gitlab/minio /syn/gitlab/gitaly && chmod 777 /syn/gitlab/minio /syn/gitlab/gitaly && echo CREATED && ls -la /syn/gitlab/"], diff --git a/tmp/check_buckets_and_pods.sh b/tmp/check_buckets_and_pods.sh index d236dad..cb7350f 100644 --- a/tmp/check_buckets_and_pods.sh +++ b/tmp/check_buckets_and_pods.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -export KUBECONFIG=/Users/chrisfu/dev/prole/prole-k3s.kubeconfig +export KUBECONFIG=/Users/chrisfu/dev/knoe/knoe-k3s.kubeconfig echo "==> minio-init pod status:" kubectl -n gitea get pod minio-init --no-headers 2>&1 @@ -20,4 +20,4 @@ echo "==> GitLab CR status:" kubectl -n gitea get gitlab gitlab -o jsonpath='{.status.phase}' 2>&1 && echo echo "==> Installer log tail:" -tail -5 /Users/chrisfu/dev/prole/logs/install_run8.log 2>&1 +tail -5 /Users/chrisfu/dev/knoe/logs/install_run8.log 2>&1 diff --git a/tmp/check_gitlab_status.sh b/tmp/check_gitlab_status.sh index bebcc22..dc48925 100644 --- a/tmp/check_gitlab_status.sh +++ b/tmp/check_gitlab_status.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -export KUBECONFIG=/Users/chrisfu/dev/prole/prole-k3s.kubeconfig +export KUBECONFIG=/Users/chrisfu/dev/knoe/knoe-k3s.kubeconfig echo "==> Gitaly PVC:" kubectl -n gitea get pvc repo-data-gitlab-gitaly-0 2>&1 diff --git a/tmp/check_jemalloc_exists.sh b/tmp/check_jemalloc_exists.sh index 8f32c68..adea1e6 100644 --- a/tmp/check_jemalloc_exists.sh +++ b/tmp/check_jemalloc_exists.sh @@ -1,8 +1,8 @@ #!/usr/bin/env bash set -euo pipefail -export KUBECONFIG=/Users/chrisfu/dev/prole/prole-k3s.kubeconfig +export KUBECONFIG=/Users/chrisfu/dev/knoe/knoe-k3s.kubeconfig -for node in gandalf.prole.org merlin.prole.org myrddin.prole.org pi.prole.org; do +for node in gandalf.knoe.org merlin.knoe.org myrddin.knoe.org pi.knoe.org; do safe="${node//./-}" echo -n "==> $node: " kubectl -n gitlab run "jv2-${safe}" \ diff --git a/tmp/check_readiness.sh b/tmp/check_readiness.sh index 2a6d02a..30e0622 100644 --- a/tmp/check_readiness.sh +++ b/tmp/check_readiness.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -export KUBECONFIG=/Users/chrisfu/dev/prole/prole-k3s.kubeconfig +export KUBECONFIG=/Users/chrisfu/dev/knoe/knoe-k3s.kubeconfig echo "==> Webservice puma latest log (kgqhl):" kubectl -n gitea logs gitlab-webservice-default-675ccb7b99-kgqhl \ diff --git a/tmp/check_registry.sh b/tmp/check_registry.sh index 6c7b701..0ec8a67 100644 --- a/tmp/check_registry.sh +++ b/tmp/check_registry.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -export KUBECONFIG=/Users/chrisfu/dev/prole/prole-k3s.kubeconfig +export KUBECONFIG=/Users/chrisfu/dev/knoe/knoe-k3s.kubeconfig echo "==> Registry crash log:" kubectl -n gitea logs gitlab-registry-75b586f9fd-455x2 --previous --tail=20 2>&1 \ @@ -15,4 +15,4 @@ kubectl -n gitea get jobs --no-headers 2>&1 | grep migrations || \ kubectl -n gitea get pods --no-headers | grep migrations echo "==> Installer run 9 tail:" -tail -8 /Users/chrisfu/dev/prole/logs/install_run9.log 2>&1 +tail -8 /Users/chrisfu/dev/knoe/logs/install_run9.log 2>&1 diff --git a/tmp/clean_and_restart_final.sh b/tmp/clean_and_restart_final.sh index 84ef4fb..5235114 100644 --- a/tmp/clean_and_restart_final.sh +++ b/tmp/clean_and_restart_final.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash set -euo pipefail -export KUBECONFIG=/Users/chrisfu/dev/prole/prole-k3s.kubeconfig -cd /Users/chrisfu/dev/prole +export KUBECONFIG=/Users/chrisfu/dev/knoe/knoe-k3s.kubeconfig +cd /Users/chrisfu/dev/knoe echo "==> Killing any running installer..." pkill -f "install.sh" 2>/dev/null || true @@ -16,19 +16,19 @@ done echo "==> Wiping synology gitlab dirs..." kubectl -n knoe-system run wipe-gitlab --image=alpine:latest --restart=Never --rm --attach \ - --overrides='{"spec":{"nodeName":"gandalf.prole.org","tolerations":[{"operator":"Exists"}],"volumes":[{"name":"s","hostPath":{"path":"/synology/d005","type":"Directory"}}],"containers":[{"name":"w","image":"alpine:latest","command":["sh","-c","rm -rf /s/gitlab && echo wiped"],"volumeMounts":[{"name":"s","mountPath":"/s"}]}]}}' 2>&1 || true + --overrides='{"spec":{"nodeName":"gandalf.knoe.org","tolerations":[{"operator":"Exists"}],"volumes":[{"name":"s","hostPath":{"path":"/synology/d005","type":"Directory"}}],"containers":[{"name":"w","image":"alpine:latest","command":["sh","-c","rm -rf /s/gitlab && echo wiped"],"volumeMounts":[{"name":"s","mountPath":"/s"}]}]}}' 2>&1 || true echo "==> Removing stale PID..." rm -f install.pid -echo "==> Verifying namespace fix in prole.cfg..." -grep "gitops.gitlab_namespace" conf/service/prole.cfg +echo "==> Verifying namespace fix in knoe.cfg..." +grep "gitops.gitlab_namespace" conf/service/knoe.cfg echo "==> Verifying init_gitlab.sh lint..." bash -n etc/init_gitlab.sh && echo " syntax OK" echo "==> Launching installer..." mkdir -p logs -nohup bash install.sh --silent -c conf/service/prole.cfg > logs/install_final4.log 2>&1 & +nohup bash install.sh --silent -c conf/service/knoe.cfg > logs/install_final4.log 2>&1 & disown echo "Installer started. Monitor: tail -f logs/install_final4.log" diff --git a/tmp/clean_and_run.sh b/tmp/clean_and_run.sh index 858f717..b9d4c74 100644 --- a/tmp/clean_and_run.sh +++ b/tmp/clean_and_run.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash set -euo pipefail -export KUBECONFIG=/Users/chrisfu/dev/prole/prole-k3s.kubeconfig -cd /Users/chrisfu/dev/prole +export KUBECONFIG=/Users/chrisfu/dev/knoe/knoe-k3s.kubeconfig +cd /Users/chrisfu/dev/knoe echo "==> Cleaning leftover gitea namespace..." && \ kubectl get namespace gitea -o json 2>/dev/null \ @@ -17,7 +17,7 @@ done echo "==> Wiping synology gitlab dirs for fresh start..." && \ kubectl -n knoe-system run gitlab-wipe --image=alpine:latest --restart=Never --rm --attach \ - --overrides='{"spec":{"nodeName":"gandalf.prole.org","tolerations":[{"operator":"Exists"}],"volumes":[{"name":"s","hostPath":{"path":"/synology/d005","type":"Directory"}}],"containers":[{"name":"w","image":"alpine:latest","command":["sh","-c","rm -rf /s/gitlab && echo wiped"],"volumeMounts":[{"name":"s","mountPath":"/s"}]}]}}' 2>&1 || true + --overrides='{"spec":{"nodeName":"gandalf.knoe.org","tolerations":[{"operator":"Exists"}],"volumes":[{"name":"s","hostPath":{"path":"/synology/d005","type":"Directory"}}],"containers":[{"name":"w","image":"alpine:latest","command":["sh","-c","rm -rf /s/gitlab && echo wiped"],"volumeMounts":[{"name":"s","mountPath":"/s"}]}]}}' 2>&1 || true echo "==> Cleaning leftover ClusterRoles from old installs..." && \ kubectl get clusterrole,clusterrolebinding -o name 2>/dev/null \ @@ -27,13 +27,13 @@ echo "==> jemalloc already built on all nodes (reusing)..." && \ ls /opt/gitlab-jemalloc/ 2>/dev/null || true echo "==> Removing stale PID lock..." && \ -rm -f /Users/chrisfu/dev/prole/install.pid +rm -f /Users/chrisfu/dev/knoe/install.pid echo "==> Cluster node status:" && \ kubectl get nodes echo "==> Launching install.sh pipeline (gitlab namespace, gandalf storage)..." && \ mkdir -p logs && \ -nohup bash install.sh --silent -c conf/service/prole.cfg \ +nohup bash install.sh --silent -c conf/service/knoe.cfg \ > logs/install_final.log 2>&1 & disown && \ echo "Installer started — tail logs/install_final.log to monitor" diff --git a/tmp/clean_slate.sh b/tmp/clean_slate.sh index a85d786..25ce253 100644 --- a/tmp/clean_slate.sh +++ b/tmp/clean_slate.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash set -euo pipefail -export KUBECONFIG=/Users/chrisfu/dev/prole/prole-k3s.kubeconfig +export KUBECONFIG=/Users/chrisfu/dev/knoe/knoe-k3s.kubeconfig echo "==> Deleting GitLab CR (lets operator clean up managed resources)..." kubectl -n gitlab delete gitlab gitlab --ignore-not-found --timeout=60s 2>&1 || true @@ -24,7 +24,7 @@ echo "==> Wiping synology data dirs on gandalf (fresh start)..." kubectl -n knoe-system run gitlab-wipe \ --image=alpine:latest --restart=Never --rm --attach \ --overrides='{ - "spec":{"nodeName":"gandalf.prole.org","tolerations":[{"operator":"Exists"}], + "spec":{"nodeName":"gandalf.knoe.org","tolerations":[{"operator":"Exists"}], "volumes":[{"name":"s","hostPath":{"path":"/synology/d005","type":"Directory"}}], "containers":[{"name":"gitlab-wipe","image":"alpine:latest", "command":["sh","-c","rm -rf /s/gitlab && echo wiped"], diff --git a/tmp/cleanup_and_restart.sh b/tmp/cleanup_and_restart.sh index 0a28119..e503ff8 100644 --- a/tmp/cleanup_and_restart.sh +++ b/tmp/cleanup_and_restart.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash set -euo pipefail -export KUBECONFIG=/Users/chrisfu/dev/prole/prole-k3s.kubeconfig +export KUBECONFIG=/Users/chrisfu/dev/knoe/knoe-k3s.kubeconfig echo "==> Removing finalizers + deleting gitea namespace..." for res in $(kubectl -n gitea get gitlabs.apps.gitlab.com --no-headers -o name 2>/dev/null || true); do @@ -20,15 +20,15 @@ done echo "==> Wiping synology gitlab dirs..." kubectl -n knoe-system run gitlab-wipe \ --image=alpine:latest --restart=Never --rm --attach \ - --overrides='{"spec":{"nodeName":"gandalf.prole.org","tolerations":[{"operator":"Exists"}],"volumes":[{"name":"s","hostPath":{"path":"/synology/d005","type":"Directory"}}],"containers":[{"name":"w","image":"alpine:latest","command":["sh","-c","rm -rf /s/gitlab && echo wiped"],"volumeMounts":[{"name":"s","mountPath":"/s"}]}]}}' 2>&1 || true + --overrides='{"spec":{"nodeName":"gandalf.knoe.org","tolerations":[{"operator":"Exists"}],"volumes":[{"name":"s","hostPath":{"path":"/synology/d005","type":"Directory"}}],"containers":[{"name":"w","image":"alpine:latest","command":["sh","-c","rm -rf /s/gitlab && echo wiped"],"volumeMounts":[{"name":"s","mountPath":"/s"}]}]}}' 2>&1 || true echo "==> Cleaning leftover ClusterRoles/Bindings from gitlab operator..." kubectl get clusterrole,clusterrolebinding -o name 2>/dev/null \ | grep -i gitlab | xargs kubectl delete --ignore-not-found 2>&1 || true -echo "==> Waiting for pi.prole.org to become Ready (up to 5min)..." +echo "==> Waiting for pi.knoe.org to become Ready (up to 5min)..." for i in $(seq 1 30); do - status=$(kubectl get node pi.prole.org --no-headers 2>/dev/null | awk '{print $2}') + status=$(kubectl get node pi.knoe.org --no-headers 2>/dev/null | awk '{print $2}') echo " [$i/30] pi status: $status" [[ "$status" == "Ready" ]] && break sleep 10 @@ -38,8 +38,8 @@ echo "==> Final node status:" kubectl get nodes echo "==> Clean-up done. Launching installer..." -cd /Users/chrisfu/dev/prole +cd /Users/chrisfu/dev/knoe mkdir -p logs -nohup bash install.sh --silent -c conf/service/prole.cfg \ +nohup bash install.sh --silent -c conf/service/knoe.cfg \ > logs/install_run6.log 2>&1 & echo "Installer PID $! — tail logs/install_run6.log to monitor" diff --git a/tmp/clear_old_pods.sh b/tmp/clear_old_pods.sh index f5789eb..e43234d 100644 --- a/tmp/clear_old_pods.sh +++ b/tmp/clear_old_pods.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -export KUBECONFIG=/Users/chrisfu/dev/prole/prole-k3s.kubeconfig +export KUBECONFIG=/Users/chrisfu/dev/knoe/knoe-k3s.kubeconfig for pod in gitlab-webservice-default-675ccb7b99-9tkdh \ gitlab-webservice-default-675ccb7b99-j684x \ gitlab-sidekiq-all-in-1-v2-679848bc8-mrz9b; do diff --git a/tmp/commit_msg.txt b/tmp/commit_msg.txt index b8c1eae..f9e88cb 100644 --- a/tmp/commit_msg.txt +++ b/tmp/commit_msg.txt @@ -14,19 +14,19 @@ feat: full GKE/prod deployment pipeline from UI to Artifact Registry - New 'GCP Storage' tab with workload->StorageClass mapping (CNPG->premium-rwo, Redis/Monitoring->standard-rwo, Garage->garage-hdd) and Fetch from Cluster - Provider readonly field styled correctly (no solid-black on macOS) -- Stale prole.cfg/conf/prole.cfg symlinks removed; all config I/O now - resolves env-specific paths via prole_conf.entrypoint_path() +- Stale knoe.cfg/conf/knoe.cfg symlinks removed; all config I/O now + resolves env-specific paths via knoe_conf.entrypoint_path() ## GKE Autopilot Compatibility (Common Services) -- Synology iSCSI StorageClass and static PVs guarded behind PROLE_MODE!=k8s +- Synology iSCSI StorageClass and static PVs guarded behind KNOE_MODE!=k8s in init_openbao.sh (GKE Autopilot forbids hostPath/iSCSI volumes) - In-cluster Docker registry (hostPath) skipped in k8s mode; GCP Artifact Registry used instead - Kong renamed knoe-svc-kong in k8s mode; all health-check kubectl calls in init_common_services.sh and status_common_services.sh updated accordingly -- DNS endpoints switched from *.prole.org to *.knoe.dev in k8s mode +- DNS endpoints switched from *.knoe.org to *.knoe.dev in k8s mode (api.knoe.dev, git.knoe.dev, svc.knoe.dev); ingress uses gce class -- New GKE-clean Kong manifests under deploy/opentofu/k8s/manifests/prole/: +- New GKE-clean Kong manifests under deploy/opentofu/k8s/manifests/knoe/: no k3s node affinity, explicit Autopilot resource requests/limits ## Garage S3 Store (GKE) @@ -46,11 +46,11 @@ feat: full GKE/prod deployment pipeline from UI to Artifact Registry ## KUBECONFIG / kubectl (k8s mode) - actions.py: new elif mode==k8s branch sets KUBECONFIG=~/.kube/config - and injects KUBECONTEXT from prole_cfg_data into script env + and injects KUBECONTEXT from knoe_cfg_data into script env - _build_kubectl_cmd falls back to Global.KUBECONTEXT when init_cluster.selected_kubectx is empty - _activate_selected_gke_cluster persists KUBECONFIG/KUBECONTEXT to - prole_cfg_data and saves prole.cfg immediately after get-credentials + knoe_cfg_data and saves knoe.cfg immediately after get-credentials ## Database Build Screen (GKE) - Registry display shows correct Artifact Registry URL @@ -62,12 +62,12 @@ feat: full GKE/prod deployment pipeline from UI to Artifact Registry keys normalised to lowercase so project_id lookup is always consistent ## Config / Namespace persistence -- prole_conf.py activate_environment: symlink creation removed; sets +- knoe_conf.py activate_environment: symlink creation removed; sets CLUSTER_ENV env-var so all subsequent calls resolve correct env directory - knoe/ui/screens/__init__.py: startup config load uses entrypoint_path() - instead of hardcoded conf/prole.cfg; seeds SERVICE_NAMESPACE=knoe-system + instead of hardcoded conf/knoe.cfg; seeds SERVICE_NAMESPACE=knoe-system for managed envs so Common Services never defaults to 'default' -- cfg.py _save_prole_cfg: saves to env-specific path via entrypoint_path() -- etc/prole_cfg.sh: removed all ln -snf symlink creation +- cfg.py _save_knoe_cfg: saves to env-specific path via entrypoint_path() +- etc/knoe_cfg.sh: removed all ln -snf symlink creation Co-authored-by: Junie diff --git a/tmp/create_buckets_dockerhub.sh b/tmp/create_buckets_dockerhub.sh index e95ecb8..cdd79c1 100644 --- a/tmp/create_buckets_dockerhub.sh +++ b/tmp/create_buckets_dockerhub.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash set -euo pipefail -export KUBECONFIG=/Users/chrisfu/dev/prole/prole-k3s.kubeconfig +export KUBECONFIG=/Users/chrisfu/dev/knoe/knoe-k3s.kubeconfig AK=$(kubectl -n gitea get secret gitlab-minio-secret -o jsonpath='{.data.accesskey}' | base64 -d) SK=$(kubectl -n gitea get secret gitlab-minio-secret -o jsonpath='{.data.secretkey}' | base64 -d) @@ -10,9 +10,9 @@ kubectl -n gitea logs gitlab-gitaly-0 --previous --tail=15 2>&1 | grep -v LD_PRE kubectl -n gitea logs gitlab-gitaly-0 --tail=15 2>&1 | grep -v LD_PRELOAD | head -15 || true echo "==> Removing stale installer PID and restarting installer..." -rm -f /Users/chrisfu/dev/prole/install.pid -cd /Users/chrisfu/dev/prole && mkdir -p logs -nohup bash install.sh --silent -c conf/service/prole.cfg > logs/install_run9.log 2>&1 & +rm -f /Users/chrisfu/dev/knoe/install.pid +cd /Users/chrisfu/dev/knoe && mkdir -p logs +nohup bash install.sh --silent -c conf/service/knoe.cfg > logs/install_run9.log 2>&1 & disown echo "Installer run 9 started" @@ -21,5 +21,5 @@ kubectl -n gitea delete pod minio-init --ignore-not-found 2>/dev/null || true kubectl -n gitea run minio-init \ --image=minio/mc:latest \ --restart=Never \ - --overrides="{\"spec\":{\"nodeName\":\"gandalf.prole.org\",\"tolerations\":[{\"operator\":\"Exists\"}],\"containers\":[{\"name\":\"minio-init\",\"image\":\"minio/mc:latest\",\"command\":[\"sh\",\"-c\",\"mc alias set gl http://gitlab-minio-svc.gitea.svc.cluster.local:9000 ${AK} ${SK} && for b in gitlab-registry-storage gitlab-lfs-storage gitlab-artifacts-storage gitlab-uploads-storage gitlab-packages-storage gitlab-dependency-proxy-storage gitlab-terraform-state gitlab-ci-secure-files; do mc mb --ignore-existing gl/\$b && echo created \$b; done && mc ls gl && echo BUCKETS_DONE\"]}]}}" 2>&1 + --overrides="{\"spec\":{\"nodeName\":\"gandalf.knoe.org\",\"tolerations\":[{\"operator\":\"Exists\"}],\"containers\":[{\"name\":\"minio-init\",\"image\":\"minio/mc:latest\",\"command\":[\"sh\",\"-c\",\"mc alias set gl http://gitlab-minio-svc.gitea.svc.cluster.local:9000 ${AK} ${SK} && for b in gitlab-registry-storage gitlab-lfs-storage gitlab-artifacts-storage gitlab-uploads-storage gitlab-packages-storage gitlab-dependency-proxy-storage gitlab-terraform-state gitlab-ci-secure-files; do mc mb --ignore-existing gl/\$b && echo created \$b; done && mc ls gl && echo BUCKETS_DONE\"]}]}}" 2>&1 echo "minio-init pod created. Check with: kubectl -n gitea logs minio-init -f" diff --git a/tmp/create_synology_dirs.sh b/tmp/create_synology_dirs.sh index fe092da..fed6411 100644 --- a/tmp/create_synology_dirs.sh +++ b/tmp/create_synology_dirs.sh @@ -1,15 +1,15 @@ #!/usr/bin/env bash set -euo pipefail -export KUBECONFIG=/Users/chrisfu/dev/prole/prole-k3s.kubeconfig +export KUBECONFIG=/Users/chrisfu/dev/knoe/knoe-k3s.kubeconfig -echo "==> Creating /synology/d005/gitlab/{minio,gitaly} on gandalf.prole.org..." +echo "==> Creating /synology/d005/gitlab/{minio,gitaly} on gandalf.knoe.org..." kubectl -n gitlab run synology-mkdir \ --image=alpine:latest \ --restart=Never \ --rm --attach \ --overrides='{ "spec":{ - "nodeName":"gandalf.prole.org", + "nodeName":"gandalf.knoe.org", "tolerations":[{"operator":"Exists"}], "volumes":[{"name":"synology","hostPath":{"path":"/synology/d005","type":"Directory"}}], "containers":[{ diff --git a/tmp/debug_minio.sh b/tmp/debug_minio.sh index d7f9a6f..a19a13f 100644 --- a/tmp/debug_minio.sh +++ b/tmp/debug_minio.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -export KUBECONFIG=/Users/chrisfu/dev/prole/prole-k3s.kubeconfig +export KUBECONFIG=/Users/chrisfu/dev/knoe/knoe-k3s.kubeconfig echo "==> Waiting for minio restart and capturing startup logs..." kubectl -n gitlab logs gitlab-minio-65b8ddcd4d-5xlgc -f --tail=30 2>&1 | \ @@ -9,7 +9,7 @@ echo "==> Export dir contents on gandalf:" kubectl -n gitlab run minio-inspect \ --image=alpine:latest --restart=Never --rm --attach \ --overrides='{ - "spec":{"nodeName":"gandalf.prole.org","tolerations":[{"operator":"Exists"}], + "spec":{"nodeName":"gandalf.knoe.org","tolerations":[{"operator":"Exists"}], "volumes":[{"name":"export","hostPath":{"path":"/synology/d005/gitlab/minio","type":"Directory"}}], "containers":[{"name":"minio-inspect","image":"alpine:latest", "command":["sh","-c","ls -laR /export/ 2>&1 | head -30 && du -sh /export/ 2>&1"], diff --git a/tmp/debug_registry.sh b/tmp/debug_registry.sh index d2ac68f..f623827 100644 --- a/tmp/debug_registry.sh +++ b/tmp/debug_registry.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -export KUBECONFIG=/Users/chrisfu/dev/prole/prole-k3s.kubeconfig +export KUBECONFIG=/Users/chrisfu/dev/knoe/knoe-k3s.kubeconfig REG=$(kubectl -n gitea get pod -l app=registry --no-headers -o name | head -1) echo "==> Registry pod: $REG" diff --git a/tmp/debug_registry_v2.sh b/tmp/debug_registry_v2.sh index 7f33d53..055dca5 100644 --- a/tmp/debug_registry_v2.sh +++ b/tmp/debug_registry_v2.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -export KUBECONFIG=/Users/chrisfu/dev/prole/prole-k3s.kubeconfig +export KUBECONFIG=/Users/chrisfu/dev/knoe/knoe-k3s.kubeconfig echo "==> Registry storage secret (raw):" kubectl -n gitea get secret gitlab-registry-storage -o jsonpath='{.data}' 2>&1 @@ -17,4 +17,4 @@ kubectl -n gitea get secret --no-headers | grep -i registry | head -10 echo "==> Minio export dir on gandalf:" kubectl -n gitea run minio-ls \ --image=alpine:latest --restart=Never --rm --attach \ - --overrides='{"spec":{"nodeName":"gandalf.prole.org","tolerations":[{"operator":"Exists"}],"volumes":[{"name":"e","hostPath":{"path":"/synology/d005/gitlab/minio","type":"Directory"}}],"containers":[{"name":"c","image":"alpine:latest","command":["sh","-c","ls -la /export/"],"volumeMounts":[{"name":"e","mountPath":"/export"}]}]}}' 2>&1 || true + --overrides='{"spec":{"nodeName":"gandalf.knoe.org","tolerations":[{"operator":"Exists"}],"volumes":[{"name":"e","hostPath":{"path":"/synology/d005/gitlab/minio","type":"Directory"}}],"containers":[{"name":"c","image":"alpine:latest","command":["sh","-c","ls -la /export/"],"volumeMounts":[{"name":"e","mountPath":"/export"}]}]}}' 2>&1 || true diff --git a/tmp/debug_registry_v3.sh b/tmp/debug_registry_v3.sh index b04c43a..e14bb68 100644 --- a/tmp/debug_registry_v3.sh +++ b/tmp/debug_registry_v3.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -export KUBECONFIG=/Users/chrisfu/dev/prole/prole-k3s.kubeconfig +export KUBECONFIG=/Users/chrisfu/dev/knoe/knoe-k3s.kubeconfig echo "==> Registry ConfigMaps:" kubectl -n gitea get cm --no-headers | grep -i registry @@ -23,5 +23,5 @@ echo "==> Try reading config.yml via debug container on minio node:" kubectl -n gitea run reg-debug \ --image=registry.gitlab.com/gitlab-org/build/cng/gitlab-container-registry:v4.38.0-gitlab \ --restart=Never --rm --attach \ - --overrides='{"spec":{"nodeName":"gandalf.prole.org","tolerations":[{"operator":"Exists"}],"containers":[{"name":"reg-debug","image":"alpine:latest","command":["sh","-c","echo done"]}]}}' \ + --overrides='{"spec":{"nodeName":"gandalf.knoe.org","tolerations":[{"operator":"Exists"}],"containers":[{"name":"reg-debug","image":"alpine:latest","command":["sh","-c","echo done"]}]}}' \ 2>&1 | head -5 || true diff --git a/tmp/diagnose_host_error.sh b/tmp/diagnose_host_error.sh index 60d5235..0f34fde 100644 --- a/tmp/diagnose_host_error.sh +++ b/tmp/diagnose_host_error.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -export KUBECONFIG=/Users/chrisfu/dev/prole/prole-k3s.kubeconfig +export KUBECONFIG=/Users/chrisfu/dev/knoe/knoe-k3s.kubeconfig POD="gitlab-webservice-default-675ccb7b99-gxgs8" echo "==> Configure init logs (look for host rendering):" diff --git a/tmp/do_commit.sh b/tmp/do_commit.sh index a8838af..878142a 100644 --- a/tmp/do_commit.sh +++ b/tmp/do_commit.sh @@ -1,13 +1,13 @@ #!/usr/bin/env bash set -e -cd /Users/chrisfu/dev/prole +cd /Users/chrisfu/dev/knoe git add \ conf/cnpg-placement/ecosystem-0-knoe-db.json \ conf/cnpg-placement/knoe-system-knoe-db.json \ - conf/dev/prole.cfg \ + conf/dev/knoe.cfg \ conf/port-mapping.cfg \ - conf/prod/prole.cfg \ + conf/prod/knoe.cfg \ deploy/gcp/gke/knoe-db-backup-gcs.yaml \ deploy/gcp/gke/knoe-db.yaml \ deploy/gcp/gke/namespace.yaml \ diff --git a/tmp/final_status.sh b/tmp/final_status.sh index 7dbd3fd..a0a500b 100644 --- a/tmp/final_status.sh +++ b/tmp/final_status.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -export KUBECONFIG=/Users/chrisfu/dev/prole/prole-k3s.kubeconfig +export KUBECONFIG=/Users/chrisfu/dev/knoe/knoe-k3s.kubeconfig echo "==> All GitLab pods:" kubectl -n gitea get pods --no-headers \ @@ -16,5 +16,5 @@ echo "==> GitLab CR phase:" kubectl -n gitea get gitlab gitlab -o jsonpath='{.status.phase}' 2>&1 && echo echo "==> Node memory (gandalf):" -kubectl describe node gandalf.prole.org 2>&1 \ +kubectl describe node gandalf.knoe.org 2>&1 \ | grep -A3 "Allocated resources" | tail -4 diff --git a/tmp/fix_allowed_hosts.sh b/tmp/fix_allowed_hosts.sh index c06fda7..7b3897c 100644 --- a/tmp/fix_allowed_hosts.sh +++ b/tmp/fix_allowed_hosts.sh @@ -1,12 +1,12 @@ #!/usr/bin/env bash set -euo pipefail -export KUBECONFIG=/Users/chrisfu/dev/prole/prole-k3s.kubeconfig +export KUBECONFIG=/Users/chrisfu/dev/knoe/knoe-k3s.kubeconfig echo "==> Patching CR: global.allowedHosts as flat string list..." kubectl -n gitea patch gitlab gitlab --type=merge -p '{ "spec":{"chart":{"values":{ "global":{ - "allowedHosts":["git.prole.org","prole.org"] + "allowedHosts":["git.knoe.org","knoe.org"] } }}}}' diff --git a/tmp/fix_gitaly_and_buckets.sh b/tmp/fix_gitaly_and_buckets.sh index 7c004b9..04cd6e7 100644 --- a/tmp/fix_gitaly_and_buckets.sh +++ b/tmp/fix_gitaly_and_buckets.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash set -euo pipefail -export KUBECONFIG=/Users/chrisfu/dev/prole/prole-k3s.kubeconfig +export KUBECONFIG=/Users/chrisfu/dev/knoe/knoe-k3s.kubeconfig echo "==> Clearing gitaly PV claimRef so Kubernetes can re-bind to gitea PVC..." kubectl patch pv gitlab-gitaly-synology --type=json \ @@ -26,7 +26,7 @@ kubectl -n gitea run minio-buckets \ --restart=Never --rm --attach \ --overrides="{ \"spec\":{ - \"nodeName\":\"gandalf.prole.org\", + \"nodeName\":\"gandalf.knoe.org\", \"tolerations\":[{\"operator\":\"Exists\"}], \"containers\":[{ \"name\":\"minio-buckets\", diff --git a/tmp/fix_gitaly_pv_and_exporter.sh b/tmp/fix_gitaly_pv_and_exporter.sh index 26e0812..0744d54 100644 --- a/tmp/fix_gitaly_pv_and_exporter.sh +++ b/tmp/fix_gitaly_pv_and_exporter.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash set -euo pipefail -export KUBECONFIG=/Users/chrisfu/dev/prole/prole-k3s.kubeconfig +export KUBECONFIG=/Users/chrisfu/dev/knoe/knoe-k3s.kubeconfig echo "==> PV claimRef detail (namespace check):" kubectl get pv gitlab-gitaly-synology \ diff --git a/tmp/fix_gitaly_v2.sh b/tmp/fix_gitaly_v2.sh index cb4d326..0c4707d 100644 --- a/tmp/fix_gitaly_v2.sh +++ b/tmp/fix_gitaly_v2.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash set -euo pipefail -export KUBECONFIG=/Users/chrisfu/dev/prole/prole-k3s.kubeconfig +export KUBECONFIG=/Users/chrisfu/dev/knoe/knoe-k3s.kubeconfig echo "==> PV status:" kubectl get pv gitlab-gitaly-synology \ diff --git a/tmp/fix_gitlab_sa.sh b/tmp/fix_gitlab_sa.sh index 5b8b726..1a0055a 100644 --- a/tmp/fix_gitlab_sa.sh +++ b/tmp/fix_gitlab_sa.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash set -euo pipefail -KUBECONFIG=/Users/chrisfu/dev/prole/prole-k3s.kubeconfig +KUBECONFIG=/Users/chrisfu/dev/knoe/knoe-k3s.kubeconfig export KUBECONFIG echo "==> Creating gitlab-app-nonroot ServiceAccount..." diff --git a/tmp/fix_hpa_and_spread.sh b/tmp/fix_hpa_and_spread.sh index 83ff2cb..a10fa04 100644 --- a/tmp/fix_hpa_and_spread.sh +++ b/tmp/fix_hpa_and_spread.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash set -euo pipefail -export KUBECONFIG=/Users/chrisfu/dev/prole/prole-k3s.kubeconfig +export KUBECONFIG=/Users/chrisfu/dev/knoe/knoe-k3s.kubeconfig echo "==> Patching HPAs to minReplicas=1..." for hpa in gitlab-webservice-default gitlab-gitlab-shell gitlab-kas gitlab-registry; do diff --git a/tmp/fix_liveness.sh b/tmp/fix_liveness.sh index 555835c..738e5b0 100644 --- a/tmp/fix_liveness.sh +++ b/tmp/fix_liveness.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash set -euo pipefail -export KUBECONFIG=/Users/chrisfu/dev/prole/prole-k3s.kubeconfig +export KUBECONFIG=/Users/chrisfu/dev/knoe/knoe-k3s.kubeconfig echo "==> Patching CR: increase liveness probe delays for slow RPi boot..." && \ kubectl -n gitea patch gitlab gitlab --type=merge -p '{ diff --git a/tmp/fix_memory.sh b/tmp/fix_memory.sh index a10e444..c77559e 100644 --- a/tmp/fix_memory.sh +++ b/tmp/fix_memory.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash set -euo pipefail -export KUBECONFIG=/Users/chrisfu/dev/prole/prole-k3s.kubeconfig +export KUBECONFIG=/Users/chrisfu/dev/knoe/knoe-k3s.kubeconfig echo "==> Patching CR: reduce memory requests and enforce replicaCount=1..." kubectl -n gitea patch gitlab gitlab --type=merge -p '{ diff --git a/tmp/fix_minio_creds.sh b/tmp/fix_minio_creds.sh index 78bc156..e5b9491 100644 --- a/tmp/fix_minio_creds.sh +++ b/tmp/fix_minio_creds.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash set -euo pipefail -export KUBECONFIG=/Users/chrisfu/dev/prole/prole-k3s.kubeconfig +export KUBECONFIG=/Users/chrisfu/dev/knoe/knoe-k3s.kubeconfig AK=$(kubectl -n gitlab get secret gitlab-minio-secret \ -o jsonpath='{.data.accesskey}' | base64 -d) diff --git a/tmp/fix_minio_job_and_wait.sh b/tmp/fix_minio_job_and_wait.sh index 8f12ded..d7510eb 100644 --- a/tmp/fix_minio_job_and_wait.sh +++ b/tmp/fix_minio_job_and_wait.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -export KUBECONFIG=/Users/chrisfu/dev/prole/prole-k3s.kubeconfig +export KUBECONFIG=/Users/chrisfu/dev/knoe/knoe-k3s.kubeconfig echo "==> minio-create-buckets actual image:" kubectl -n gitea get pod -l "app=minio-create-buckets" \ diff --git a/tmp/fix_minio_pv.sh b/tmp/fix_minio_pv.sh index 590943d..6cbe61b 100644 --- a/tmp/fix_minio_pv.sh +++ b/tmp/fix_minio_pv.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash set -euo pipefail -export KUBECONFIG=/Users/chrisfu/dev/prole/prole-k3s.kubeconfig +export KUBECONFIG=/Users/chrisfu/dev/knoe/knoe-k3s.kubeconfig kubectl patch pv gitlab-minio-synology \ -p '{"metadata":{"finalizers":[]}}' --type=merge 2>/dev/null || true @@ -26,7 +26,7 @@ spec: - matchExpressions: - key: kubernetes.io/hostname operator: In - values: [gandalf.prole.org] + values: [gandalf.knoe.org] EOF sleep 15 diff --git a/tmp/fix_minio_v2.sh b/tmp/fix_minio_v2.sh index bff0834..291d6d0 100644 --- a/tmp/fix_minio_v2.sh +++ b/tmp/fix_minio_v2.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash set -euo pipefail -export KUBECONFIG=/Users/chrisfu/dev/prole/prole-k3s.kubeconfig +export KUBECONFIG=/Users/chrisfu/dev/knoe/knoe-k3s.kubeconfig echo "==> Previous minio crash log:" kubectl -n gitlab logs gitlab-minio-65b8ddcd4d-5xlgc --previous 2>&1 | \ @@ -24,7 +24,7 @@ echo "==> Wiping stale minio export data and restarting pod..." kubectl -n gitlab run minio-wipe \ --image=alpine:latest --restart=Never --rm \ --overrides='{ - "spec":{"nodeName":"gandalf.prole.org","tolerations":[{"operator":"Exists"}], + "spec":{"nodeName":"gandalf.knoe.org","tolerations":[{"operator":"Exists"}], "volumes":[{"name":"e","hostPath":{"path":"/synology/d005/gitlab/minio","type":"Directory"}}], "containers":[{"name":"minio-wipe","image":"alpine:latest", "command":["sh","-c","rm -rf /e/.minio.sys /e/registry && echo wiped"], diff --git a/tmp/fix_node_spread.sh b/tmp/fix_node_spread.sh index 301c583..b2f8871 100644 --- a/tmp/fix_node_spread.sh +++ b/tmp/fix_node_spread.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash set -euo pipefail -export KUBECONFIG=/Users/chrisfu/dev/prole/prole-k3s.kubeconfig +export KUBECONFIG=/Users/chrisfu/dev/knoe/knoe-k3s.kubeconfig echo "==> Removing global.nodeSelector so pods spread across cluster..." kubectl -n gitea patch gitlab gitlab --type=json -p '[ diff --git a/tmp/fix_pv_and_buckets_v3.sh b/tmp/fix_pv_and_buckets_v3.sh index 86d037d..b1b452e 100644 --- a/tmp/fix_pv_and_buckets_v3.sh +++ b/tmp/fix_pv_and_buckets_v3.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash set -euo pipefail -export KUBECONFIG=/Users/chrisfu/dev/prole/prole-k3s.kubeconfig +export KUBECONFIG=/Users/chrisfu/dev/knoe/knoe-k3s.kubeconfig echo "==> Deleting old gitaly PV (still bound to deleted gitlab ns)..." kubectl delete pv gitlab-gitaly-synology --ignore-not-found @@ -26,7 +26,7 @@ spec: - matchExpressions: - key: kubernetes.io/hostname operator: In - values: [gandalf.prole.org] + values: [gandalf.knoe.org] PVYAML echo "==> Waiting 20s for gitaly PVC to bind..." @@ -42,7 +42,7 @@ kubectl -n gitea run minio-init \ --image=quay.io/minio/mc:RELEASE.2022-10-20T23-30-35Z \ --restart=Never \ --overrides="{ - \"spec\":{\"nodeName\":\"gandalf.prole.org\",\"tolerations\":[{\"operator\":\"Exists\"}], + \"spec\":{\"nodeName\":\"gandalf.knoe.org\",\"tolerations\":[{\"operator\":\"Exists\"}], \"containers\":[{\"name\":\"minio-init\", \"image\":\"quay.io/minio/mc:RELEASE.2022-10-20T23-30-35Z\", \"command\":[\"sh\",\"-c\", diff --git a/tmp/fix_pv_finalizer.sh b/tmp/fix_pv_finalizer.sh index a47f11c..96633f7 100644 --- a/tmp/fix_pv_finalizer.sh +++ b/tmp/fix_pv_finalizer.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash set -euo pipefail -export KUBECONFIG=/Users/chrisfu/dev/prole/prole-k3s.kubeconfig +export KUBECONFIG=/Users/chrisfu/dev/knoe/knoe-k3s.kubeconfig echo "==> Removing pv-protection finalizer from gitaly PV..." kubectl patch pv gitlab-gitaly-synology \ @@ -31,7 +31,7 @@ spec: - matchExpressions: - key: kubernetes.io/hostname operator: In - values: [gandalf.prole.org] + values: [gandalf.knoe.org] PVYAML echo "==> Waiting 20s for PVC to bind..." @@ -48,6 +48,6 @@ kubectl -n gitea delete pod minio-init --ignore-not-found 2>/dev/null || true kubectl -n gitea run minio-init \ --image=quay.io/minio/mc:RELEASE.2022-10-20T23-30-35Z \ --restart=Never \ - --overrides="{\"spec\":{\"nodeName\":\"gandalf.prole.org\",\"tolerations\":[{\"operator\":\"Exists\"}],\"containers\":[{\"name\":\"minio-init\",\"image\":\"quay.io/minio/mc:RELEASE.2022-10-20T23-30-35Z\",\"command\":[\"sh\",\"-c\",\"mc alias set gl http://gitlab-minio-svc.gitea.svc.cluster.local:9000 ${AK} ${SK} && for b in gitlab-registry-storage gitlab-lfs-storage gitlab-artifacts-storage gitlab-uploads-storage gitlab-packages-storage gitlab-dependency-proxy-storage gitlab-terraform-state gitlab-ci-secure-files; do mc mb --ignore-existing gl/\$b; done && mc ls gl && echo BUCKETS_DONE\"]}]}}" 2>&1 + --overrides="{\"spec\":{\"nodeName\":\"gandalf.knoe.org\",\"tolerations\":[{\"operator\":\"Exists\"}],\"containers\":[{\"name\":\"minio-init\",\"image\":\"quay.io/minio/mc:RELEASE.2022-10-20T23-30-35Z\",\"command\":[\"sh\",\"-c\",\"mc alias set gl http://gitlab-minio-svc.gitea.svc.cluster.local:9000 ${AK} ${SK} && for b in gitlab-registry-storage gitlab-lfs-storage gitlab-artifacts-storage gitlab-uploads-storage gitlab-packages-storage gitlab-dependency-proxy-storage gitlab-terraform-state gitlab-ci-secure-files; do mc mb --ignore-existing gl/\$b; done && mc ls gl && echo BUCKETS_DONE\"]}]}}" 2>&1 echo "==> minio-init pod created — check logs in ~2min with:" echo " kubectl -n gitea logs minio-init" diff --git a/tmp/fix_pvs.sh b/tmp/fix_pvs.sh index 3ebe349..958f8b3 100644 --- a/tmp/fix_pvs.sh +++ b/tmp/fix_pvs.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash set -euo pipefail -export KUBECONFIG=/Users/chrisfu/dev/prole/prole-k3s.kubeconfig +export KUBECONFIG=/Users/chrisfu/dev/knoe/knoe-k3s.kubeconfig KB="kubectl" echo "==> Deleting wrong PVs (wrong storageClass)..." @@ -30,7 +30,7 @@ spec: - matchExpressions: - key: kubernetes.io/hostname operator: In - values: [gandalf.prole.org] + values: [gandalf.knoe.org] --- apiVersion: v1 kind: PersistentVolume @@ -50,7 +50,7 @@ spec: - matchExpressions: - key: kubernetes.io/hostname operator: In - values: [gandalf.prole.org] + values: [gandalf.knoe.org] PVYAML echo "==> Waiting 15s for binding..." diff --git a/tmp/fix_registry_cr.sh b/tmp/fix_registry_cr.sh index 1c515cb..fba383a 100644 --- a/tmp/fix_registry_cr.sh +++ b/tmp/fix_registry_cr.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash set -euo pipefail -export KUBECONFIG=/Users/chrisfu/dev/prole/prole-k3s.kubeconfig +export KUBECONFIG=/Users/chrisfu/dev/knoe/knoe-k3s.kubeconfig echo "==> Patching CR: registry liveness probe + ARM64 configure fix..." kubectl -n gitlab patch gitlab gitlab --type=merge -p '{ diff --git a/tmp/fix_storage.sh b/tmp/fix_storage.sh index 33407e3..3afb278 100644 --- a/tmp/fix_storage.sh +++ b/tmp/fix_storage.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash set -euo pipefail -KUBECONFIG=/Users/chrisfu/dev/prole/prole-k3s.kubeconfig +KUBECONFIG=/Users/chrisfu/dev/knoe/knoe-k3s.kubeconfig export KUBECONFIG KB="kubectl" @@ -9,15 +9,15 @@ helm -n knoe-system uninstall redis 2>/dev/null || true $KB -n knoe-system delete pvc redis-data-redis-master-0 --ignore-not-found echo "==> Redeploying Redis without persistence..." -cd /Users/chrisfu/dev/prole -bash etc/init_redis.sh -c conf/service/prole.cfg start +cd /Users/chrisfu/dev/knoe +bash etc/init_redis.sh -c conf/service/knoe.cfg start echo "==> Redis deployed. Checking gitaly/minio PVC sizes..." $KB -n gitlab get pvc repo-data-gitlab-gitaly-0 gitlab-minio -o custom-columns='NAME:.metadata.name,SIZE:.spec.resources.requests.storage,SC:.spec.storageClassName' 2>&1 || true echo "==> Preparing synology dirs for gitaly and minio on gandalf..." $KB -n knoe-system run gitlab-dirprep --image=alpine --restart=Never \ - --overrides='{"spec":{"nodeName":"gandalf.prole.org"}}' \ + --overrides='{"spec":{"nodeName":"gandalf.knoe.org"}}' \ --command -- sh -c "mkdir -p /synology/d005/gitlab/gitaly /synology/d005/gitlab/minio && chmod 777 /synology/d005/gitlab/gitaly /synology/d005/gitlab/minio && echo done" \ --attach --rm 2>&1 || true @@ -45,7 +45,7 @@ spec: - matchExpressions: - key: kubernetes.io/hostname operator: In - values: [gandalf.prole.org] + values: [gandalf.knoe.org] --- apiVersion: v1 kind: PersistentVolume @@ -65,7 +65,7 @@ spec: - matchExpressions: - key: kubernetes.io/hostname operator: In - values: [gandalf.prole.org] + values: [gandalf.knoe.org] PVYAML echo "==> Deleting stuck PVCs so they rebind to new PVs..." diff --git a/tmp/force_delete_ns.sh b/tmp/force_delete_ns.sh index e544ace..07ea1f7 100644 --- a/tmp/force_delete_ns.sh +++ b/tmp/force_delete_ns.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash set -euo pipefail -export KUBECONFIG=/Users/chrisfu/dev/prole/prole-k3s.kubeconfig +export KUBECONFIG=/Users/chrisfu/dev/knoe/knoe-k3s.kubeconfig echo "==> Resources blocking termination:" kubectl -n gitlab get all --ignore-not-found 2>&1 | head -20 || true diff --git a/tmp/get_crash_log.sh b/tmp/get_crash_log.sh index 992c913..17a0cde 100644 --- a/tmp/get_crash_log.sh +++ b/tmp/get_crash_log.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -export KUBECONFIG=/Users/chrisfu/dev/prole/prole-k3s.kubeconfig +export KUBECONFIG=/Users/chrisfu/dev/knoe/knoe-k3s.kubeconfig echo "==> kgqhl previous crash log (webservice container):" && \ kubectl -n gitea logs gitlab-webservice-default-675ccb7b99-kgqhl \ diff --git a/tmp/get_gitaly_logs.sh b/tmp/get_gitaly_logs.sh index e77c688..59b3037 100644 --- a/tmp/get_gitaly_logs.sh +++ b/tmp/get_gitaly_logs.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -export KUBECONFIG=/Users/chrisfu/dev/prole/prole-k3s.kubeconfig +export KUBECONFIG=/Users/chrisfu/dev/knoe/knoe-k3s.kubeconfig echo "==> Waiting for gitaly to enter Running state..." for i in $(seq 1 20); do diff --git a/tmp/inject_minio_creds.sh b/tmp/inject_minio_creds.sh index 6b91523..b197f26 100644 --- a/tmp/inject_minio_creds.sh +++ b/tmp/inject_minio_creds.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash set -euo pipefail -export KUBECONFIG=/Users/chrisfu/dev/prole/prole-k3s.kubeconfig +export KUBECONFIG=/Users/chrisfu/dev/knoe/knoe-k3s.kubeconfig echo "==> Patching minio main container with MINIO_ROOT_USER/PASSWORD from secret..." kubectl -n gitlab patch deployment gitlab-minio --type=json -p '[ @@ -28,7 +28,7 @@ SK=$(kubectl -n gitlab get secret gitlab-minio-secret -o jsonpath='{.data.secret kubectl -n gitlab delete pod minio-cred-test --ignore-not-found 2>/dev/null || true kubectl -n gitlab run minio-cred-test \ --image=minio/mc:latest --restart=Never \ - --overrides="{\"spec\":{\"nodeName\":\"gandalf.prole.org\",\"tolerations\":[{\"operator\":\"Exists\"}],\"containers\":[{\"name\":\"t\",\"image\":\"minio/mc:latest\",\"command\":[\"sh\",\"-c\",\"mc alias set gl http://gitlab-minio-svc.gitlab.svc.cluster.local:9000 ${AK} ${SK} && mc ls gl && echo CREDS_OK\"]}]}}" + --overrides="{\"spec\":{\"nodeName\":\"gandalf.knoe.org\",\"tolerations\":[{\"operator\":\"Exists\"}],\"containers\":[{\"name\":\"t\",\"image\":\"minio/mc:latest\",\"command\":[\"sh\",\"-c\",\"mc alias set gl http://gitlab-minio-svc.gitlab.svc.cluster.local:9000 ${AK} ${SK} && mc ls gl && echo CREDS_OK\"]}]}}" sleep 40 kubectl -n gitlab logs minio-cred-test 2>&1 | tail -5 || true kubectl -n gitlab delete pod minio-cred-test --ignore-not-found 2>/dev/null || true diff --git a/tmp/junie_commit_msg.txt b/tmp/junie_commit_msg.txt index a26bf69..572b443 100644 --- a/tmp/junie_commit_msg.txt +++ b/tmp/junie_commit_msg.txt @@ -7,11 +7,11 @@ UI screens - cluster.py: re-trigger Artifact Registry check after GKE cluster selection so the light re-evaluates once region is available from KUBECONTEXT - cluster_nodes.py: fix TclError on Python 3.14 — pady=(2,0) tuple → pady=2 scalar - __init__.py: seed knoe-system namespace when saved value is "default", not only when empty -- services.py: replace hardcoded "Prole DB" log string with dynamic cnpg_cluster name +- services.py: replace hardcoded "Knoe DB" log string with dynamic cnpg_cluster name Core ops - cloudnative_pg.py: replace one-shot Barman plugin retry with 6-attempt loop; first cert-manager/x509 failure triggers rollout restart + 30 s CA propagation wait; subsequent failures back off up to 60 s per attempt -- cloudnative_pg.py: TLS CA CN now uses cluster_name instead of hardcoded "Prole CNPG CA" +- cloudnative_pg.py: TLS CA CN now uses cluster_name instead of hardcoded "Knoe CNPG CA" - registry.py, garage_store.py: refactored into per-mode modules (k3d/k3s/k8s registry and garage store, shared _garage_common) Deploy / config diff --git a/tmp/kill_and_restart.sh b/tmp/kill_and_restart.sh index 9ad5a59..083aef5 100644 --- a/tmp/kill_and_restart.sh +++ b/tmp/kill_and_restart.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -export KUBECONFIG=/Users/chrisfu/dev/prole/prole-k3s.kubeconfig -cd /Users/chrisfu/dev/prole +export KUBECONFIG=/Users/chrisfu/dev/knoe/knoe-k3s.kubeconfig +cd /Users/chrisfu/dev/knoe echo "==> Killing running installer processes..." && \ pkill -f "install.sh" 2>/dev/null || true && \ @@ -15,14 +15,14 @@ kubectl delete namespace gitea --ignore-not-found --timeout=30s 2>/dev/null || t kubectl delete pv gitlab-gitaly-synology gitlab-minio-synology --ignore-not-found 2>/dev/null || true echo "==> Removing stale PID lock..." && \ -rm -f /Users/chrisfu/dev/prole/install.pid +rm -f /Users/chrisfu/dev/knoe/install.pid echo "==> Verifying namespace config:" && \ grep -E "gitops\.(namespace|gitlab_namespace)|GITLAB_NAMESPACE" \ - /Users/chrisfu/dev/prole/conf/service/prole.cfg + /Users/chrisfu/dev/knoe/conf/service/knoe.cfg echo "==> Launching final install run (gitlab namespace)..." && \ mkdir -p logs && \ -nohup bash install.sh --silent -c conf/service/prole.cfg \ +nohup bash install.sh --silent -c conf/service/knoe.cfg \ > logs/install_final2.log 2>&1 & disown && \ echo "Installer started. Monitor: tail -f logs/install_final2.log" diff --git a/tmp/launch_final.sh b/tmp/launch_final.sh index 5b55ea5..4e7024f 100644 --- a/tmp/launch_final.sh +++ b/tmp/launch_final.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash -cd /Users/chrisfu/dev/prole +cd /Users/chrisfu/dev/knoe rm -f install.pid mkdir -p logs -nohup bash install.sh --silent -c conf/service/prole.cfg > logs/install_final2.log 2>&1 & +nohup bash install.sh --silent -c conf/service/knoe.cfg > logs/install_final2.log 2>&1 & disown echo "Installer launched. Tail: tail -f logs/install_final2.log" diff --git a/tmp/minio_buckets_final.sh b/tmp/minio_buckets_final.sh index ffff44c..0472dbf 100644 --- a/tmp/minio_buckets_final.sh +++ b/tmp/minio_buckets_final.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash set -euo pipefail -export KUBECONFIG=/Users/chrisfu/dev/prole/prole-k3s.kubeconfig +export KUBECONFIG=/Users/chrisfu/dev/knoe/knoe-k3s.kubeconfig MINIO_POD=$(kubectl -n gitlab get pod -l app=minio --no-headers -o name | head -1) echo "==> Minio pod: $MINIO_POD" @@ -27,5 +27,5 @@ chmod +x /tmp/mc-cmd.sh kubectl -n gitlab run minio-init \ --image=minio/mc:latest \ --restart=Never \ - --overrides="{\"spec\":{\"nodeName\":\"gandalf.prole.org\",\"tolerations\":[{\"operator\":\"Exists\"}],\"containers\":[{\"name\":\"minio-init\",\"image\":\"minio/mc:latest\",\"command\":[\"sh\",\"-c\",\"mc alias set gl http://gitlab-minio-svc.gitlab.svc.cluster.local:9000 ${AK} ${SK} && for b in registry gitlab-lfs-storage gitlab-artifacts-storage gitlab-uploads-storage gitlab-packages-storage gitlab-dependency-proxy-storage gitlab-terraform-state gitlab-ci-secure-files; do mc mb --ignore-existing gl/\\\$b && echo OK:\\\$b; done && mc ls gl && echo BUCKETS_DONE\"]}]}}" + --overrides="{\"spec\":{\"nodeName\":\"gandalf.knoe.org\",\"tolerations\":[{\"operator\":\"Exists\"}],\"containers\":[{\"name\":\"minio-init\",\"image\":\"minio/mc:latest\",\"command\":[\"sh\",\"-c\",\"mc alias set gl http://gitlab-minio-svc.gitlab.svc.cluster.local:9000 ${AK} ${SK} && for b in registry gitlab-lfs-storage gitlab-artifacts-storage gitlab-uploads-storage gitlab-packages-storage gitlab-dependency-proxy-storage gitlab-terraform-state gitlab-ci-secure-files; do mc mb --ignore-existing gl/\\\$b && echo OK:\\\$b; done && mc ls gl && echo BUCKETS_DONE\"]}]}}" echo "==> minio-init started — check with: kubectl -n gitlab logs minio-init" diff --git a/tmp/patch_deployment_probe.sh b/tmp/patch_deployment_probe.sh index 7ce16dc..8073b63 100644 --- a/tmp/patch_deployment_probe.sh +++ b/tmp/patch_deployment_probe.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash set -euo pipefail -export KUBECONFIG=/Users/chrisfu/dev/prole/prole-k3s.kubeconfig +export KUBECONFIG=/Users/chrisfu/dev/knoe/knoe-k3s.kubeconfig echo "==> CR stored liveness probe:" && \ kubectl -n gitea get gitlab gitlab \ diff --git a/tmp/patch_jemalloc.sh b/tmp/patch_jemalloc.sh index 10d81d9..86edd79 100644 --- a/tmp/patch_jemalloc.sh +++ b/tmp/patch_jemalloc.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash set -euo pipefail -export KUBECONFIG=/Users/chrisfu/dev/prole/prole-k3s.kubeconfig +export KUBECONFIG=/Users/chrisfu/dev/knoe/knoe-k3s.kubeconfig echo "==> Patching GitLab CR with LD_PRELOAD='' on all ARM64-affected components..." kubectl -n gitlab patch gitlab gitlab --type=merge -p '{ diff --git a/tmp/patch_jemalloc_hostpath.sh b/tmp/patch_jemalloc_hostpath.sh index d18d88c..9779fbf 100644 --- a/tmp/patch_jemalloc_hostpath.sh +++ b/tmp/patch_jemalloc_hostpath.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash set -euo pipefail -export KUBECONFIG=/Users/chrisfu/dev/prole/prole-k3s.kubeconfig +export KUBECONFIG=/Users/chrisfu/dev/knoe/knoe-k3s.kubeconfig JEMALLOC_PATH="/opt/gitlab-jemalloc/libjemalloc.so.2" JEMALLOC_MOUNT="/opt/gitlab-jemalloc" diff --git a/tmp/patch_jemalloc_v2.sh b/tmp/patch_jemalloc_v2.sh index 00a0ac8..639c80b 100644 --- a/tmp/patch_jemalloc_v2.sh +++ b/tmp/patch_jemalloc_v2.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash set -euo pipefail -export KUBECONFIG=/Users/chrisfu/dev/prole/prole-k3s.kubeconfig +export KUBECONFIG=/Users/chrisfu/dev/knoe/knoe-k3s.kubeconfig echo "==> Deleting failed migrations job so operator can recreate it..." kubectl -n gitlab delete job -l app=migrations --ignore-not-found diff --git a/tmp/patch_minio_arm64.sh b/tmp/patch_minio_arm64.sh index 8845611..5e141b7 100644 --- a/tmp/patch_minio_arm64.sh +++ b/tmp/patch_minio_arm64.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash set -euo pipefail -export KUBECONFIG=/Users/chrisfu/dev/prole/prole-k3s.kubeconfig +export KUBECONFIG=/Users/chrisfu/dev/knoe/knoe-k3s.kubeconfig echo "==> Patching GitLab CR with ARM64-compatible minio/mc images..." kubectl -n gitlab patch gitlab gitlab --type=merge -p '{ diff --git a/tmp/patch_minio_initcontainer.sh b/tmp/patch_minio_initcontainer.sh index c69777d..1964399 100644 --- a/tmp/patch_minio_initcontainer.sh +++ b/tmp/patch_minio_initcontainer.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash set -euo pipefail -export KUBECONFIG=/Users/chrisfu/dev/prole/prole-k3s.kubeconfig +export KUBECONFIG=/Users/chrisfu/dev/knoe/knoe-k3s.kubeconfig echo "==> Inspect current minio init container image..." kubectl -n gitlab get deployment gitlab-minio \ diff --git a/tmp/poll_gitlab_ns.sh b/tmp/poll_gitlab_ns.sh index 530bbd6..4fe0112 100644 --- a/tmp/poll_gitlab_ns.sh +++ b/tmp/poll_gitlab_ns.sh @@ -1,8 +1,8 @@ #!/usr/bin/env bash -export KUBECONFIG=/Users/chrisfu/dev/prole/prole-k3s.kubeconfig +export KUBECONFIG=/Users/chrisfu/dev/knoe/knoe-k3s.kubeconfig for i in $(seq 1 30); do - pct=$(grep -oE '\[([0-9]+)%\]' /Users/chrisfu/dev/prole/logs/install_final2.log 2>/dev/null | tail -1) + pct=$(grep -oE '\[([0-9]+)%\]' /Users/chrisfu/dev/knoe/logs/install_final2.log 2>/dev/null | tail -1) ns_gitlab=$(kubectl get ns gitlab --no-headers 2>/dev/null | awk '{print $1}') echo "[$(date -u '+%H:%M')] [$i/30] installer=$pct | gitlab ns=${ns_gitlab:-none}" if [[ -n "$ns_gitlab" ]]; then @@ -15,7 +15,7 @@ for i in $(seq 1 30); do # Also break if installer finished if ! ps aux | grep -q "install.sh"; then echo "==> Installer finished. Log tail:" - tail -5 /Users/chrisfu/dev/prole/logs/install_final2.log | cat + tail -5 /Users/chrisfu/dev/knoe/logs/install_final2.log | cat break fi sleep 60 diff --git a/tmp/poll_ready.sh b/tmp/poll_ready.sh index ad61513..71ee9c2 100644 --- a/tmp/poll_ready.sh +++ b/tmp/poll_ready.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -export KUBECONFIG=/Users/chrisfu/dev/prole/prole-k3s.kubeconfig +export KUBECONFIG=/Users/chrisfu/dev/knoe/knoe-k3s.kubeconfig for i in $(seq 1 20); do ws_ready=$(kubectl -n gitea get pods -l app=webservice \ diff --git a/tmp/prole-synology-path-bootstrap.yaml b/tmp/prole-synology-path-bootstrap.yaml index bc1d2da..64ff779 100644 --- a/tmp/prole-synology-path-bootstrap.yaml +++ b/tmp/prole-synology-path-bootstrap.yaml @@ -1,7 +1,7 @@ apiVersion: v1 kind: Pod metadata: - name: prole-synology-path-bootstrap + name: knoe-synology-path-bootstrap namespace: kube-system spec: restartPolicy: Never diff --git a/tmp/quick_status.sh b/tmp/quick_status.sh index ac8ad16..1c4ff85 100644 --- a/tmp/quick_status.sh +++ b/tmp/quick_status.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -export KUBECONFIG=/Users/chrisfu/dev/prole/prole-k3s.kubeconfig +export KUBECONFIG=/Users/chrisfu/dev/knoe/knoe-k3s.kubeconfig echo "==> Webservice puma latest (kgqhl):" && \ kubectl -n gitea logs gitlab-webservice-default-675ccb7b99-kgqhl -c webservice --tail=6 2>&1 | grep -v LD_PRELOAD | head -6 echo "==> Sidekiq latest:" && \ diff --git a/tmp/rebuild_ds_v2.sh b/tmp/rebuild_ds_v2.sh index f36db77..9b75f60 100644 --- a/tmp/rebuild_ds_v2.sh +++ b/tmp/rebuild_ds_v2.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash set -euo pipefail -export KUBECONFIG=/Users/chrisfu/dev/prole/prole-k3s.kubeconfig +export KUBECONFIG=/Users/chrisfu/dev/knoe/knoe-k3s.kubeconfig kubectl -n gitlab delete daemonset jemalloc-builder --ignore-not-found sleep 5 diff --git a/tmp/rebuild_jemalloc_glibc.sh b/tmp/rebuild_jemalloc_glibc.sh index 80c88af..98c73fd 100644 --- a/tmp/rebuild_jemalloc_glibc.sh +++ b/tmp/rebuild_jemalloc_glibc.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash set -euo pipefail -export KUBECONFIG=/Users/chrisfu/dev/prole/prole-k3s.kubeconfig +export KUBECONFIG=/Users/chrisfu/dev/knoe/knoe-k3s.kubeconfig echo "==> Deleting old musl-based DaemonSet and cleaning nodes..." kubectl -n gitlab delete daemonset jemalloc-builder --ignore-not-found diff --git a/tmp/reduce_pressure_and_wait.sh b/tmp/reduce_pressure_and_wait.sh index 988add2..5f16411 100644 --- a/tmp/reduce_pressure_and_wait.sh +++ b/tmp/reduce_pressure_and_wait.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -export KUBECONFIG=/Users/chrisfu/dev/prole/prole-k3s.kubeconfig +export KUBECONFIG=/Users/chrisfu/dev/knoe/knoe-k3s.kubeconfig echo "==> Deleting second webservice pod to reduce RAM pressure on gandalf..." && \ kubectl -n gitea delete pod gitlab-webservice-default-675ccb7b99-mmclp --force --grace-period=0 --ignore-not-found 2>&1 diff --git a/tmp/reset_gitlab_db.sh b/tmp/reset_gitlab_db.sh index 53c55f1..5db5eaf 100644 --- a/tmp/reset_gitlab_db.sh +++ b/tmp/reset_gitlab_db.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash set -euo pipefail -export KUBECONFIG=/Users/chrisfu/dev/prole/prole-k3s.kubeconfig +export KUBECONFIG=/Users/chrisfu/dev/knoe/knoe-k3s.kubeconfig echo "==> Finding CNPG primary pod..." PRIMARY=$(kubectl -n knoe-db get pods \ diff --git a/tmp/restart_gitlab_pods.sh b/tmp/restart_gitlab_pods.sh index 0dd0555..41df7f2 100644 --- a/tmp/restart_gitlab_pods.sh +++ b/tmp/restart_gitlab_pods.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash set -euo pipefail -export KUBECONFIG=/Users/chrisfu/dev/prole/prole-k3s.kubeconfig +export KUBECONFIG=/Users/chrisfu/dev/knoe/knoe-k3s.kubeconfig echo "==> Deleting failed jobs..." kubectl -n gitlab delete jobs --all --ignore-not-found diff --git a/tmp/run7.sh b/tmp/run7.sh index f7d26e4..b3105b9 100644 --- a/tmp/run7.sh +++ b/tmp/run7.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -cd /Users/chrisfu/dev/prole +cd /Users/chrisfu/dev/knoe mkdir -p logs -nohup bash install.sh --silent -c conf/service/prole.cfg > logs/install_run7.log 2>&1 & +nohup bash install.sh --silent -c conf/service/knoe.cfg > logs/install_run7.log 2>&1 & disown echo "started" diff --git a/tmp/run8.sh b/tmp/run8.sh index 5e5b532..34c1a19 100644 --- a/tmp/run8.sh +++ b/tmp/run8.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -export KUBECONFIG=/Users/chrisfu/dev/prole/prole-k3s.kubeconfig +export KUBECONFIG=/Users/chrisfu/dev/knoe/knoe-k3s.kubeconfig echo "==> CNPG cluster status:" kubectl -n knoe-db get cluster knoe-db -o jsonpath='{.status.phase}' 2>&1 && echo @@ -8,11 +8,11 @@ echo "==> CNPG pods:" kubectl -n knoe-db get pods --no-headers 2>&1 echo "==> Removing stale PID lock..." -rm -f /Users/chrisfu/dev/prole/install.pid +rm -f /Users/chrisfu/dev/knoe/install.pid echo "==> Launching installer run 8..." -cd /Users/chrisfu/dev/prole +cd /Users/chrisfu/dev/knoe mkdir -p logs -nohup bash install.sh --silent -c conf/service/prole.cfg > logs/install_run8.log 2>&1 & +nohup bash install.sh --silent -c conf/service/knoe.cfg > logs/install_run8.log 2>&1 & disown echo "Installer started, logging to logs/install_run8.log" diff --git a/tmp/run_install2.sh b/tmp/run_install2.sh index 9b08155..3068b23 100644 --- a/tmp/run_install2.sh +++ b/tmp/run_install2.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash set -euo pipefail -cd /Users/chrisfu/dev/prole +cd /Users/chrisfu/dev/knoe echo "[$(date)] Starting install run 2..." >> logs/install_run2.log -bash install.sh --silent -c conf/service/prole.cfg >> logs/install_run2.log 2>&1 +bash install.sh --silent -c conf/service/knoe.cfg >> logs/install_run2.log 2>&1 echo "[$(date)] Install run 2 complete." >> logs/install_run2.log diff --git a/tmp/sim_installer_ns.sh b/tmp/sim_installer_ns.sh index 67399ef..ff57f07 100644 --- a/tmp/sim_installer_ns.sh +++ b/tmp/sim_installer_ns.sh @@ -3,19 +3,19 @@ # when calling init_gitlab.sh — replicates the full env context. set -euo pipefail -CFG="/Users/chrisfu/dev/prole/conf/service/prole.cfg" -PROLE_HOME="/Users/chrisfu/dev/prole" +CFG="/Users/chrisfu/dev/knoe/conf/service/knoe.cfg" +KNOE_HOME="/Users/chrisfu/dev/knoe" echo "=== Simulating installer env context ===" # Replicate _get_script_env (milestone.py lines 81-87) # base_env = os.environ.copy() + updates -export PROLE_HOME="$PROLE_HOME" -export PROLE_SERVICE="$PROLE_HOME/etc" -export PROLE_CONF="$PROLE_HOME/conf/service" -export PROLE_DATA="$PROLE_HOME/knoe-db/data" -export PROLE_LOGS="$PROLE_HOME/logs" -export PROLE_MODE="k3s" +export KNOE_HOME="$KNOE_HOME" +export KNOE_SERVICE="$KNOE_HOME/etc" +export KNOE_CONF="$KNOE_HOME/conf/service" +export PROLE_DATA="$KNOE_HOME/knoe-db/data" +export PROLE_LOGS="$KNOE_HOME/logs" +export KNOE_MODE="k3s" export DEPLOYMENT_MODE="k3s" export NAMESPACE="knoe-db" # milestone.py line 86: init_password.db_namespace export PROLE_NAMESPACE="knoe-db" @@ -25,8 +25,8 @@ export CLUSTER_NAME="knoe-db" # Replicate milestones.py GitOpsMilestone.execute() lines 965-977 export GITLAB_NAMESPACE="gitlab" # line 971: env["GITLAB_NAMESPACE"] = ns (ns="gitlab") -export GITLAB_NODE_SELECTOR="gandalf.prole.org" # line 976 -export NODE_SELECTOR="gandalf.prole.org" # line 977 +export GITLAB_NODE_SELECTOR="gandalf.knoe.org" # line 976 +export NODE_SELECTOR="gandalf.knoe.org" # line 977 echo " Pre-call env: NAMESPACE='$NAMESPACE' GITLAB_NAMESPACE='$GITLAB_NAMESPACE'" echo "" @@ -34,7 +34,7 @@ echo "" # Now call init_gitlab.sh with same args milestones.py builds: # args = ["--mode", "k3s", "--namespace", ns, "-c", cfg_path] echo "=== Calling init_gitlab.sh --trace-namespace (exits after namespace resolution) ===" -OUTPUT=$(bash "$PROLE_HOME/etc/init_gitlab.sh" \ +OUTPUT=$(bash "$KNOE_HOME/etc/init_gitlab.sh" \ --mode k3s \ --namespace gitlab \ -c "$CFG" \ @@ -44,19 +44,19 @@ echo "$OUTPUT" | head -5 # Now test WITHOUT --namespace arg (worst-case: arg not passed) echo "" echo "=== Worst case: no --namespace arg (relies on env + default) ===" -OUTPUT2=$(bash "$PROLE_HOME/etc/init_gitlab.sh" \ +OUTPUT2=$(bash "$KNOE_HOME/etc/init_gitlab.sh" \ --mode k3s \ -c "$CFG" \ --trace-namespace 2>&1 || true) echo "$OUTPUT2" | head -5 -# Also verify what prole_cfg.sh does to NAMESPACE +# Also verify what knoe_cfg.sh does to NAMESPACE echo "" -echo "=== Check: does prole_cfg.sh overwrite NAMESPACE? ===" +echo "=== Check: does knoe_cfg.sh overwrite NAMESPACE? ===" ( export NAMESPACE="gitlab" - source "$PROLE_HOME/etc/prole_cfg.sh" 2>/dev/null || true - echo " NAMESPACE after sourcing prole_cfg.sh: '${NAMESPACE:-}'" + source "$KNOE_HOME/etc/knoe_cfg.sh" 2>/dev/null || true + echo " NAMESPACE after sourcing knoe_cfg.sh: '${NAMESPACE:-}'" echo " GITOPS_NAMESPACE: '${GITOPS_NAMESPACE:-}'" echo " GITLAB_NAMESPACE: '${GITLAB_NAMESPACE:-}'" ) diff --git a/tmp/sim_milestones_ns.py b/tmp/sim_milestones_ns.py index 75e26eb..53f88f8 100644 --- a/tmp/sim_milestones_ns.py +++ b/tmp/sim_milestones_ns.py @@ -1,11 +1,11 @@ #!/usr/bin/env python3 """Simulate exactly what GitOpsMilestone.execute() does for namespace resolution.""" import sys -sys.path.insert(0, "/Users/chrisfu/dev/prole") +sys.path.insert(0, "/Users/chrisfu/dev/knoe") import configparser -CFG = "/Users/chrisfu/dev/prole/conf/service/prole.cfg" +CFG = "/Users/chrisfu/dev/knoe/conf/service/knoe.cfg" # Load config the same way the installer does parser = configparser.ConfigParser(strict=False) diff --git a/tmp/status_check.sh b/tmp/status_check.sh index 4912156..7b2f91c 100644 --- a/tmp/status_check.sh +++ b/tmp/status_check.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -export KUBECONFIG=/Users/chrisfu/dev/prole/prole-k3s.kubeconfig +export KUBECONFIG=/Users/chrisfu/dev/knoe/knoe-k3s.kubeconfig echo "==> minio-init logs:" kubectl -n gitea logs minio-init 2>&1 | tail -15 || true @@ -11,4 +11,4 @@ echo "==> GitLab CR phase:" kubectl -n gitea get gitlab gitlab -o jsonpath='{.status.phase}' 2>&1 && echo echo "==> Installer run 9 tail:" -tail -10 /Users/chrisfu/dev/prole/logs/install_run9.log 2>&1 +tail -10 /Users/chrisfu/dev/knoe/logs/install_run9.log 2>&1 diff --git a/tmp/supabase-render-check-manifests/supabase-helm.yaml b/tmp/supabase-render-check-manifests/supabase-helm.yaml index 92d5091..1835f9c 100644 --- a/tmp/supabase-render-check-manifests/supabase-helm.yaml +++ b/tmp/supabase-render-check-manifests/supabase-helm.yaml @@ -1,132 +1,132 @@ --- -# Source: prole-supabase/templates/analytics/serviceaccount.yaml +# Source: knoe-supabase/templates/analytics/serviceaccount.yaml apiVersion: v1 kind: ServiceAccount metadata: name: supabase-analytics labels: - helm.sh/chart: prole-supabase-0.5.0-prole.1 + helm.sh/chart: knoe-supabase-0.5.0-knoe.1 app.kubernetes.io/name: supabase app.kubernetes.io/instance: supabase app.kubernetes.io/managed-by: Helm --- -# Source: prole-supabase/templates/auth/serviceaccount.yaml +# Source: knoe-supabase/templates/auth/serviceaccount.yaml apiVersion: v1 kind: ServiceAccount metadata: name: supabase-auth labels: - helm.sh/chart: prole-supabase-0.5.0-prole.1 + helm.sh/chart: knoe-supabase-0.5.0-knoe.1 app.kubernetes.io/name: supabase app.kubernetes.io/instance: supabase app.kubernetes.io/managed-by: Helm --- -# Source: prole-supabase/templates/functions/serviceaccount.yaml +# Source: knoe-supabase/templates/functions/serviceaccount.yaml apiVersion: v1 kind: ServiceAccount metadata: name: supabase-functions labels: - helm.sh/chart: prole-supabase-0.5.0-prole.1 + helm.sh/chart: knoe-supabase-0.5.0-knoe.1 app.kubernetes.io/name: supabase app.kubernetes.io/instance: supabase app.kubernetes.io/managed-by: Helm --- -# Source: prole-supabase/templates/imgproxy/serviceaccount.yaml +# Source: knoe-supabase/templates/imgproxy/serviceaccount.yaml apiVersion: v1 kind: ServiceAccount metadata: name: supabase-imgproxy labels: - helm.sh/chart: prole-supabase-0.5.0-prole.1 + helm.sh/chart: knoe-supabase-0.5.0-knoe.1 app.kubernetes.io/name: supabase app.kubernetes.io/instance: supabase app.kubernetes.io/managed-by: Helm --- -# Source: prole-supabase/templates/kong/serviceaccount.yaml +# Source: knoe-supabase/templates/kong/serviceaccount.yaml apiVersion: v1 kind: ServiceAccount metadata: name: supabase-kong labels: - helm.sh/chart: prole-supabase-0.5.0-prole.1 + helm.sh/chart: knoe-supabase-0.5.0-knoe.1 app.kubernetes.io/name: supabase app.kubernetes.io/instance: supabase app.kubernetes.io/managed-by: Helm --- -# Source: prole-supabase/templates/meta/serviceaccount.yaml +# Source: knoe-supabase/templates/meta/serviceaccount.yaml apiVersion: v1 kind: ServiceAccount metadata: name: supabase-meta labels: - helm.sh/chart: prole-supabase-0.5.0-prole.1 + helm.sh/chart: knoe-supabase-0.5.0-knoe.1 app.kubernetes.io/name: supabase app.kubernetes.io/instance: supabase app.kubernetes.io/managed-by: Helm --- -# Source: prole-supabase/templates/realtime/serviceaccount.yaml +# Source: knoe-supabase/templates/realtime/serviceaccount.yaml apiVersion: v1 kind: ServiceAccount metadata: name: supabase-realtime labels: - helm.sh/chart: prole-supabase-0.5.0-prole.1 + helm.sh/chart: knoe-supabase-0.5.0-knoe.1 app.kubernetes.io/name: supabase app.kubernetes.io/instance: supabase app.kubernetes.io/managed-by: Helm --- -# Source: prole-supabase/templates/rest/serviceaccount.yaml +# Source: knoe-supabase/templates/rest/serviceaccount.yaml apiVersion: v1 kind: ServiceAccount metadata: name: supabase-rest labels: - helm.sh/chart: prole-supabase-0.5.0-prole.1 + helm.sh/chart: knoe-supabase-0.5.0-knoe.1 app.kubernetes.io/name: supabase app.kubernetes.io/instance: supabase app.kubernetes.io/managed-by: Helm --- -# Source: prole-supabase/templates/storage/serviceaccount.yaml +# Source: knoe-supabase/templates/storage/serviceaccount.yaml apiVersion: v1 kind: ServiceAccount metadata: name: supabase-storage labels: - helm.sh/chart: prole-supabase-0.5.0-prole.1 + helm.sh/chart: knoe-supabase-0.5.0-knoe.1 app.kubernetes.io/name: supabase app.kubernetes.io/instance: supabase app.kubernetes.io/managed-by: Helm --- -# Source: prole-supabase/templates/studio/serviceaccount.yaml +# Source: knoe-supabase/templates/studio/serviceaccount.yaml apiVersion: v1 kind: ServiceAccount metadata: name: supabase-studio labels: - helm.sh/chart: prole-supabase-0.5.0-prole.1 + helm.sh/chart: knoe-supabase-0.5.0-knoe.1 app.kubernetes.io/name: supabase app.kubernetes.io/instance: supabase app.kubernetes.io/managed-by: Helm --- -# Source: prole-supabase/templates/vector/serviceaccount.yaml +# Source: knoe-supabase/templates/vector/serviceaccount.yaml apiVersion: v1 kind: ServiceAccount metadata: name: supabase-vector labels: - helm.sh/chart: prole-supabase-0.5.0-prole.1 + helm.sh/chart: knoe-supabase-0.5.0-knoe.1 app.kubernetes.io/name: supabase app.kubernetes.io/instance: supabase app.kubernetes.io/managed-by: Helm --- -# Source: prole-supabase/templates/secrets/analytics.yaml +# Source: knoe-supabase/templates/secrets/analytics.yaml apiVersion: v1 kind: Secret metadata: name: supabase-analytics labels: - helm.sh/chart: prole-supabase-0.5.0-prole.1 + helm.sh/chart: knoe-supabase-0.5.0-knoe.1 app.kubernetes.io/name: supabase app.kubernetes.io/instance: supabase app.kubernetes.io/managed-by: Helm @@ -135,13 +135,13 @@ data: privateAccessToken: eW91ci1zdXBlci1zZWNyZXQtYW5kLWxvbmctbG9nZmxhcmUta2V5LXByaXZhdGU= publicAccessToken: eW91ci1zdXBlci1zZWNyZXQtYW5kLWxvbmctbG9nZmxhcmUta2V5LXB1YmxpYw== --- -# Source: prole-supabase/templates/secrets/dashboard.yaml +# Source: knoe-supabase/templates/secrets/dashboard.yaml apiVersion: v1 kind: Secret metadata: name: supabase-dashboard labels: - helm.sh/chart: prole-supabase-0.5.0-prole.1 + helm.sh/chart: knoe-supabase-0.5.0-knoe.1 app.kubernetes.io/name: supabase app.kubernetes.io/instance: supabase app.kubernetes.io/managed-by: Helm @@ -151,13 +151,13 @@ data: password: dGhpc19wYXNzd29yZF9pc19pbnNlY3VyZV9hbmRfc2hvdWxkX2JlX3VwZGF0ZWQ= username: c3VwYWJhc2U= --- -# Source: prole-supabase/templates/secrets/db.yaml +# Source: knoe-supabase/templates/secrets/db.yaml apiVersion: v1 kind: Secret metadata: name: supabase-db labels: - helm.sh/chart: prole-supabase-0.5.0-prole.1 + helm.sh/chart: knoe-supabase-0.5.0-knoe.1 app.kubernetes.io/name: supabase app.kubernetes.io/instance: supabase app.kubernetes.io/managed-by: Helm @@ -167,13 +167,13 @@ data: password: ZnIzc3R5bDM= password_encoded: ZnIzc3R5bDM= --- -# Source: prole-supabase/templates/secrets/jwt.yaml +# Source: knoe-supabase/templates/secrets/jwt.yaml apiVersion: v1 kind: Secret metadata: name: supabase-jwt labels: - helm.sh/chart: prole-supabase-0.5.0-prole.1 + helm.sh/chart: knoe-supabase-0.5.0-knoe.1 app.kubernetes.io/name: supabase app.kubernetes.io/instance: supabase app.kubernetes.io/managed-by: Helm @@ -183,13 +183,13 @@ data: secret: OTRjZWI5N2I0MDg0MGJlMDE1NTA3ZGVhOTcxY2JjOGU1Zjg5Nzg1N2U4NGM3MDcxZmU1M2JjM2Q3NWM5Yzg5NA== serviceKey: ZXlKaGJHY2lPaUpJVXpJMU5pSXNJblI1Y0NJNklrcFhWQ0o5LmV5SnliMnhsSWpvaWMyVnlkbWxqWlY5eWIyeGxJaXdpYVhOeklqb2ljSEp2YkdVdGMzVndZV0poYzJVaUxDSnBZWFFpT2pFM056UTVPRFl6TXpjc0ltVjRjQ0k2TWpBNU1ETTBOak16TjMwLkFObzlYTXNRRFJUVXFIV1Fxdno2ZzZzMGVQR2xnallpYWVBUDdLSWNrUTA= --- -# Source: prole-supabase/templates/secrets/meta.yaml +# Source: knoe-supabase/templates/secrets/meta.yaml apiVersion: v1 kind: Secret metadata: name: supabase-meta labels: - helm.sh/chart: prole-supabase-0.5.0-prole.1 + helm.sh/chart: knoe-supabase-0.5.0-knoe.1 app.kubernetes.io/name: supabase app.kubernetes.io/instance: supabase app.kubernetes.io/managed-by: Helm @@ -197,13 +197,13 @@ type: Opaque data: cryptoKey: eW91ci1lbmNyeXB0aW9uLWtleS0zMi1jaGFycy1taW4= --- -# Source: prole-supabase/templates/secrets/minio.yaml +# Source: knoe-supabase/templates/secrets/minio.yaml apiVersion: v1 kind: Secret metadata: name: supabase-minio labels: - helm.sh/chart: prole-supabase-0.5.0-prole.1 + helm.sh/chart: knoe-supabase-0.5.0-knoe.1 app.kubernetes.io/name: supabase app.kubernetes.io/instance: supabase app.kubernetes.io/managed-by: Helm @@ -212,13 +212,13 @@ data: password: c2VjcmV0MTIzNA== user: c3VwYS1zdG9yYWdl --- -# Source: prole-supabase/templates/secrets/realtime.yaml +# Source: knoe-supabase/templates/secrets/realtime.yaml apiVersion: v1 kind: Secret metadata: name: supabase-realtime labels: - helm.sh/chart: prole-supabase-0.5.0-prole.1 + helm.sh/chart: knoe-supabase-0.5.0-knoe.1 app.kubernetes.io/name: supabase app.kubernetes.io/instance: supabase app.kubernetes.io/managed-by: Helm @@ -226,13 +226,13 @@ type: Opaque data: secretKeyBase: VXBOVm50bjNjRHhISnBxOTlZTWMxVDFBUWdRcGM4a2ZZVHVSZ0JpWWExNUJMcng4ZXRRb1h6M2dadjEvdTJvcQ== --- -# Source: prole-supabase/templates/secrets/s3.yaml +# Source: knoe-supabase/templates/secrets/s3.yaml apiVersion: v1 kind: Secret metadata: name: supabase-s3 labels: - helm.sh/chart: prole-supabase-0.5.0-prole.1 + helm.sh/chart: knoe-supabase-0.5.0-knoe.1 app.kubernetes.io/name: supabase app.kubernetes.io/instance: supabase app.kubernetes.io/managed-by: Helm @@ -241,13 +241,13 @@ data: accessKey: ZHVtbXk= keyId: ZHVtbXk= --- -# Source: prole-supabase/templates/secrets/smtp.yaml +# Source: knoe-supabase/templates/secrets/smtp.yaml apiVersion: v1 kind: Secret metadata: name: supabase-smtp labels: - helm.sh/chart: prole-supabase-0.5.0-prole.1 + helm.sh/chart: knoe-supabase-0.5.0-knoe.1 app.kubernetes.io/name: supabase app.kubernetes.io/instance: supabase app.kubernetes.io/managed-by: Helm @@ -256,13 +256,13 @@ data: password: ZmFrZV9tYWlsX3Bhc3N3b3Jk username: ZmFrZV9tYWlsX3VzZXI= --- -# Source: prole-supabase/templates/functions/functions.config.yaml +# Source: knoe-supabase/templates/functions/functions.config.yaml apiVersion: v1 kind: ConfigMap metadata: name: supabase-functions-main labels: - helm.sh/chart: prole-supabase-0.5.0-prole.1 + helm.sh/chart: knoe-supabase-0.5.0-knoe.1 app.kubernetes.io/name: supabase app.kubernetes.io/instance: supabase app.kubernetes.io/managed-by: Helm @@ -362,13 +362,13 @@ data: } }) --- -# Source: prole-supabase/templates/kong/config.yaml +# Source: knoe-supabase/templates/kong/config.yaml apiVersion: v1 kind: ConfigMap metadata: name: supabase-kong labels: - helm.sh/chart: prole-supabase-0.5.0-prole.1 + helm.sh/chart: knoe-supabase-0.5.0-knoe.1 app.kubernetes.io/name: supabase app.kubernetes.io/instance: supabase app.kubernetes.io/managed-by: Helm @@ -595,13 +595,13 @@ data: config: hide_credentials: true --- -# Source: prole-supabase/templates/vector/config.yaml +# Source: knoe-supabase/templates/vector/config.yaml apiVersion: v1 kind: ConfigMap metadata: name: supabase-vector-config labels: - helm.sh/chart: prole-supabase-0.5.0-prole.1 + helm.sh/chart: knoe-supabase-0.5.0-knoe.1 app.kubernetes.io/name: supabase app.kubernetes.io/instance: supabase app.kubernetes.io/managed-by: Helm @@ -614,7 +614,7 @@ data: sources: kubernetes_host: type: kubernetes_logs - extra_label_selector: app.kubernetes.io/instance=supabase,app.kubernetes.io/name!=prole-supabase-vector + extra_label_selector: app.kubernetes.io/instance=supabase,app.kubernetes.io/name!=knoe-supabase-vector transforms: project_logs: @@ -634,13 +634,13 @@ data: inputs: - project_logs route: - kong: '.appname == "prole-supabase-kong"' - auth: '.appname == "prole-supabase-auth"' - rest: '.appname == "prole-supabase-rest"' - realtime: '.appname == "prole-supabase-realtime"' - storage: '.appname == "prole-supabase-storage"' - functions: '.appname == "prole-supabase-functions"' - db: '.appname == "prole-supabase-db"' + kong: '.appname == "knoe-supabase-kong"' + auth: '.appname == "knoe-supabase-auth"' + rest: '.appname == "knoe-supabase-rest"' + realtime: '.appname == "knoe-supabase-realtime"' + storage: '.appname == "knoe-supabase-storage"' + functions: '.appname == "knoe-supabase-functions"' + db: '.appname == "knoe-supabase-db"' # Ignores non nginx errors since they are related with kong booting up kong_logs: type: remap @@ -864,13 +864,13 @@ data: x-api-key: ${LOGFLARE_PUBLIC_ACCESS_TOKEN?LOGFLARE_PUBLIC_ACCESS_TOKEN is required} uri: 'http://supabase-analytics:4000/api/logs?source_name=cloudflare.logs.prod' --- -# Source: prole-supabase/templates/persistence.yaml +# Source: knoe-supabase/templates/persistence.yaml apiVersion: v1 kind: PersistentVolumeClaim metadata: name: supabase-functions labels: - helm.sh/chart: prole-supabase-0.5.0-prole.1 + helm.sh/chart: knoe-supabase-0.5.0-knoe.1 app.kubernetes.io/name: supabase app.kubernetes.io/instance: supabase app.kubernetes.io/managed-by: Helm @@ -886,13 +886,13 @@ spec: requests: storage: "1Gi" --- -# Source: prole-supabase/templates/persistence.yaml +# Source: knoe-supabase/templates/persistence.yaml apiVersion: v1 kind: PersistentVolumeClaim metadata: name: supabase-imgproxy labels: - helm.sh/chart: prole-supabase-0.5.0-prole.1 + helm.sh/chart: knoe-supabase-0.5.0-knoe.1 app.kubernetes.io/name: supabase app.kubernetes.io/instance: supabase app.kubernetes.io/managed-by: Helm @@ -908,14 +908,14 @@ spec: requests: storage: "1Gi" --- -# Source: prole-supabase/templates/persistence.yaml +# Source: knoe-supabase/templates/persistence.yaml --- apiVersion: v1 kind: PersistentVolumeClaim metadata: name: supabase-snippets labels: - helm.sh/chart: prole-supabase-0.5.0-prole.1 + helm.sh/chart: knoe-supabase-0.5.0-knoe.1 app.kubernetes.io/name: supabase app.kubernetes.io/instance: supabase app.kubernetes.io/managed-by: Helm @@ -931,13 +931,13 @@ spec: requests: storage: "1Gi" --- -# Source: prole-supabase/templates/persistence.yaml +# Source: knoe-supabase/templates/persistence.yaml apiVersion: v1 kind: PersistentVolumeClaim metadata: name: supabase-storage labels: - helm.sh/chart: prole-supabase-0.5.0-prole.1 + helm.sh/chart: knoe-supabase-0.5.0-knoe.1 app.kubernetes.io/name: supabase app.kubernetes.io/instance: supabase app.kubernetes.io/managed-by: Helm @@ -953,13 +953,13 @@ spec: requests: storage: "1Gi" --- -# Source: prole-supabase/templates/persistence.yaml +# Source: knoe-supabase/templates/persistence.yaml apiVersion: v1 kind: PersistentVolumeClaim metadata: name: supabase-deno labels: - helm.sh/chart: prole-supabase-0.5.0-prole.1 + helm.sh/chart: knoe-supabase-0.5.0-knoe.1 app.kubernetes.io/name: supabase app.kubernetes.io/instance: supabase app.kubernetes.io/managed-by: Helm @@ -975,7 +975,7 @@ spec: requests: storage: "1Gi" --- -# Source: prole-supabase/templates/vector/serviceaccount.yaml +# Source: knoe-supabase/templates/vector/serviceaccount.yaml apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole metadata: @@ -990,7 +990,7 @@ rules: - supabase-* verbs: ["get"] --- -# Source: prole-supabase/templates/vector/serviceaccount.yaml +# Source: knoe-supabase/templates/vector/serviceaccount.yaml apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRoleBinding metadata: @@ -1004,13 +1004,13 @@ roleRef: name: supabase-reader apiGroup: rbac.authorization.k8s.io --- -# Source: prole-supabase/templates/analytics/service.yaml +# Source: knoe-supabase/templates/analytics/service.yaml apiVersion: v1 kind: Service metadata: name: supabase-analytics labels: - helm.sh/chart: prole-supabase-0.5.0-prole.1 + helm.sh/chart: knoe-supabase-0.5.0-knoe.1 app.kubernetes.io/name: supabase app.kubernetes.io/instance: supabase app.kubernetes.io/managed-by: Helm @@ -1022,16 +1022,16 @@ spec: protocol: TCP name: http selector: - app.kubernetes.io/name: prole-supabase-analytics + app.kubernetes.io/name: knoe-supabase-analytics app.kubernetes.io/instance: supabase --- -# Source: prole-supabase/templates/auth/service.yaml +# Source: knoe-supabase/templates/auth/service.yaml apiVersion: v1 kind: Service metadata: name: supabase-auth labels: - helm.sh/chart: prole-supabase-0.5.0-prole.1 + helm.sh/chart: knoe-supabase-0.5.0-knoe.1 app.kubernetes.io/name: supabase app.kubernetes.io/instance: supabase app.kubernetes.io/managed-by: Helm @@ -1043,16 +1043,16 @@ spec: protocol: TCP name: http selector: - app.kubernetes.io/name: prole-supabase-auth + app.kubernetes.io/name: knoe-supabase-auth app.kubernetes.io/instance: supabase --- -# Source: prole-supabase/templates/db/external-service.yaml +# Source: knoe-supabase/templates/db/external-service.yaml apiVersion: v1 kind: Service metadata: name: db labels: - helm.sh/chart: prole-supabase-0.5.0-prole.1 + helm.sh/chart: knoe-supabase-0.5.0-knoe.1 app.kubernetes.io/name: supabase app.kubernetes.io/instance: supabase app.kubernetes.io/managed-by: Helm @@ -1064,13 +1064,13 @@ spec: port: 5432 protocol: TCP --- -# Source: prole-supabase/templates/functions/service.yaml +# Source: knoe-supabase/templates/functions/service.yaml apiVersion: v1 kind: Service metadata: name: supabase-functions labels: - helm.sh/chart: prole-supabase-0.5.0-prole.1 + helm.sh/chart: knoe-supabase-0.5.0-knoe.1 app.kubernetes.io/name: supabase app.kubernetes.io/instance: supabase app.kubernetes.io/managed-by: Helm @@ -1082,16 +1082,16 @@ spec: protocol: TCP name: http selector: - app.kubernetes.io/name: prole-supabase-functions + app.kubernetes.io/name: knoe-supabase-functions app.kubernetes.io/instance: supabase --- -# Source: prole-supabase/templates/imgproxy/service.yaml +# Source: knoe-supabase/templates/imgproxy/service.yaml apiVersion: v1 kind: Service metadata: name: supabase-imgproxy labels: - helm.sh/chart: prole-supabase-0.5.0-prole.1 + helm.sh/chart: knoe-supabase-0.5.0-knoe.1 app.kubernetes.io/name: supabase app.kubernetes.io/instance: supabase app.kubernetes.io/managed-by: Helm @@ -1103,16 +1103,16 @@ spec: protocol: TCP name: http selector: - app.kubernetes.io/name: prole-supabase-imgproxy + app.kubernetes.io/name: knoe-supabase-imgproxy app.kubernetes.io/instance: supabase --- -# Source: prole-supabase/templates/kong/service.yaml +# Source: knoe-supabase/templates/kong/service.yaml apiVersion: v1 kind: Service metadata: name: supabase-kong labels: - helm.sh/chart: prole-supabase-0.5.0-prole.1 + helm.sh/chart: knoe-supabase-0.5.0-knoe.1 app.kubernetes.io/name: supabase app.kubernetes.io/instance: supabase app.kubernetes.io/managed-by: Helm @@ -1124,16 +1124,16 @@ spec: protocol: TCP name: http selector: - app.kubernetes.io/name: prole-supabase-kong + app.kubernetes.io/name: knoe-supabase-kong app.kubernetes.io/instance: supabase --- -# Source: prole-supabase/templates/meta/service.yaml +# Source: knoe-supabase/templates/meta/service.yaml apiVersion: v1 kind: Service metadata: name: supabase-meta labels: - helm.sh/chart: prole-supabase-0.5.0-prole.1 + helm.sh/chart: knoe-supabase-0.5.0-knoe.1 app.kubernetes.io/name: supabase app.kubernetes.io/instance: supabase app.kubernetes.io/managed-by: Helm @@ -1145,16 +1145,16 @@ spec: protocol: TCP name: http selector: - app.kubernetes.io/name: prole-supabase-meta + app.kubernetes.io/name: knoe-supabase-meta app.kubernetes.io/instance: supabase --- -# Source: prole-supabase/templates/realtime/service.yaml +# Source: knoe-supabase/templates/realtime/service.yaml apiVersion: v1 kind: Service metadata: name: supabase-realtime labels: - helm.sh/chart: prole-supabase-0.5.0-prole.1 + helm.sh/chart: knoe-supabase-0.5.0-knoe.1 app.kubernetes.io/name: supabase app.kubernetes.io/instance: supabase app.kubernetes.io/managed-by: Helm @@ -1166,16 +1166,16 @@ spec: protocol: TCP name: http selector: - app.kubernetes.io/name: prole-supabase-realtime + app.kubernetes.io/name: knoe-supabase-realtime app.kubernetes.io/instance: supabase --- -# Source: prole-supabase/templates/rest/service.yaml +# Source: knoe-supabase/templates/rest/service.yaml apiVersion: v1 kind: Service metadata: name: supabase-rest labels: - helm.sh/chart: prole-supabase-0.5.0-prole.1 + helm.sh/chart: knoe-supabase-0.5.0-knoe.1 app.kubernetes.io/name: supabase app.kubernetes.io/instance: supabase app.kubernetes.io/managed-by: Helm @@ -1187,16 +1187,16 @@ spec: protocol: TCP name: http selector: - app.kubernetes.io/name: prole-supabase-rest + app.kubernetes.io/name: knoe-supabase-rest app.kubernetes.io/instance: supabase --- -# Source: prole-supabase/templates/storage/service.yaml +# Source: knoe-supabase/templates/storage/service.yaml apiVersion: v1 kind: Service metadata: name: supabase-storage labels: - helm.sh/chart: prole-supabase-0.5.0-prole.1 + helm.sh/chart: knoe-supabase-0.5.0-knoe.1 app.kubernetes.io/name: supabase app.kubernetes.io/instance: supabase app.kubernetes.io/managed-by: Helm @@ -1208,16 +1208,16 @@ spec: protocol: TCP name: http selector: - app.kubernetes.io/name: prole-supabase-storage + app.kubernetes.io/name: knoe-supabase-storage app.kubernetes.io/instance: supabase --- -# Source: prole-supabase/templates/studio/service.yaml +# Source: knoe-supabase/templates/studio/service.yaml apiVersion: v1 kind: Service metadata: name: supabase-studio labels: - helm.sh/chart: prole-supabase-0.5.0-prole.1 + helm.sh/chart: knoe-supabase-0.5.0-knoe.1 app.kubernetes.io/name: supabase app.kubernetes.io/instance: supabase app.kubernetes.io/managed-by: Helm @@ -1229,16 +1229,16 @@ spec: protocol: TCP name: http selector: - app.kubernetes.io/name: prole-supabase-studio + app.kubernetes.io/name: knoe-supabase-studio app.kubernetes.io/instance: supabase --- -# Source: prole-supabase/templates/vector/service.yaml +# Source: knoe-supabase/templates/vector/service.yaml apiVersion: v1 kind: Service metadata: name: supabase-vector labels: - helm.sh/chart: prole-supabase-0.5.0-prole.1 + helm.sh/chart: knoe-supabase-0.5.0-knoe.1 app.kubernetes.io/name: supabase app.kubernetes.io/instance: supabase app.kubernetes.io/managed-by: Helm @@ -1250,28 +1250,28 @@ spec: protocol: TCP name: http selector: - app.kubernetes.io/name: prole-supabase-vector + app.kubernetes.io/name: knoe-supabase-vector app.kubernetes.io/instance: supabase --- -# Source: prole-supabase/templates/analytics/deployment.yaml +# Source: knoe-supabase/templates/analytics/deployment.yaml apiVersion: apps/v1 kind: Deployment metadata: name: supabase-analytics labels: - helm.sh/chart: prole-supabase-0.5.0-prole.1 + helm.sh/chart: knoe-supabase-0.5.0-knoe.1 app.kubernetes.io/name: supabase app.kubernetes.io/instance: supabase app.kubernetes.io/managed-by: Helm spec: selector: matchLabels: - app.kubernetes.io/name: prole-supabase-analytics + app.kubernetes.io/name: knoe-supabase-analytics app.kubernetes.io/instance: supabase template: metadata: labels: - app.kubernetes.io/name: prole-supabase-analytics + app.kubernetes.io/name: knoe-supabase-analytics app.kubernetes.io/instance: supabase spec: serviceAccountName: supabase-analytics @@ -1297,7 +1297,7 @@ spec: done - echo "Database is ready" containers: - - name: prole-supabase-analytics + - name: knoe-supabase-analytics securityContext: {} image: "supabase/logflare:1.31.2" @@ -1351,37 +1351,37 @@ spec: - containerPort: 4000 protocol: TCP nodeSelector: - kubernetes.io/hostname: gandalf.prole.org - prole.org/node-role: general + kubernetes.io/hostname: gandalf.knoe.org + knoe.org/node-role: general affinity: nodeAffinity: requiredDuringSchedulingIgnoredDuringExecution: nodeSelectorTerms: - matchExpressions: - - key: prole.org/node-role + - key: knoe.org/node-role operator: In values: - general --- -# Source: prole-supabase/templates/auth/deployment.yaml +# Source: knoe-supabase/templates/auth/deployment.yaml apiVersion: apps/v1 kind: Deployment metadata: name: supabase-auth labels: - helm.sh/chart: prole-supabase-0.5.0-prole.1 + helm.sh/chart: knoe-supabase-0.5.0-knoe.1 app.kubernetes.io/name: supabase app.kubernetes.io/instance: supabase app.kubernetes.io/managed-by: Helm spec: selector: matchLabels: - app.kubernetes.io/name: prole-supabase-auth + app.kubernetes.io/name: knoe-supabase-auth app.kubernetes.io/instance: supabase template: metadata: labels: - app.kubernetes.io/name: prole-supabase-auth + app.kubernetes.io/name: knoe-supabase-auth app.kubernetes.io/instance: supabase spec: serviceAccountName: supabase-auth @@ -1405,14 +1405,14 @@ spec: done - echo "Database is ready" containers: - - name: prole-supabase-auth + - name: knoe-supabase-auth securityContext: {} image: "supabase/gotrue:v2.186.0" imagePullPolicy: IfNotPresent env: - name: API_EXTERNAL_URL - value: "https://db.prole.org" + value: "https://db.knoe.org" - name: DB_DRIVER value: "postgres" - name: DB_USER @@ -1448,7 +1448,7 @@ spec: - name: GOTRUE_MAILER_URLPATHS_RECOVERY value: "/auth/v1/verify" - name: GOTRUE_SITE_URL - value: "https://db.prole.org" + value: "https://db.knoe.org" - name: GOTRUE_SMS_AUTOCONFIRM value: "false" - name: GOTRUE_SMTP_ADMIN_EMAIL @@ -1506,37 +1506,37 @@ spec: containerPort: 9999 protocol: TCP nodeSelector: - kubernetes.io/hostname: gandalf.prole.org - prole.org/node-role: general + kubernetes.io/hostname: gandalf.knoe.org + knoe.org/node-role: general affinity: nodeAffinity: requiredDuringSchedulingIgnoredDuringExecution: nodeSelectorTerms: - matchExpressions: - - key: prole.org/node-role + - key: knoe.org/node-role operator: In values: - general --- -# Source: prole-supabase/templates/functions/deployment.yaml +# Source: knoe-supabase/templates/functions/deployment.yaml apiVersion: apps/v1 kind: Deployment metadata: name: supabase-functions labels: - helm.sh/chart: prole-supabase-0.5.0-prole.1 + helm.sh/chart: knoe-supabase-0.5.0-knoe.1 app.kubernetes.io/name: supabase app.kubernetes.io/instance: supabase app.kubernetes.io/managed-by: Helm spec: selector: matchLabels: - app.kubernetes.io/name: prole-supabase-functions + app.kubernetes.io/name: knoe-supabase-functions app.kubernetes.io/instance: supabase template: metadata: labels: - app.kubernetes.io/name: prole-supabase-functions + app.kubernetes.io/name: knoe-supabase-functions app.kubernetes.io/instance: supabase spec: serviceAccountName: supabase-functions @@ -1547,7 +1547,7 @@ spec: - start - --main-service - /home/deno/functions/main - name: prole-supabase-functions + name: knoe-supabase-functions securityContext: {} image: "supabase/edge-runtime:v1.70.3" @@ -1619,44 +1619,44 @@ spec: configMap: name: supabase-functions-main nodeSelector: - kubernetes.io/hostname: gandalf.prole.org - prole.org/node-role: general + kubernetes.io/hostname: gandalf.knoe.org + knoe.org/node-role: general affinity: nodeAffinity: requiredDuringSchedulingIgnoredDuringExecution: nodeSelectorTerms: - matchExpressions: - - key: prole.org/node-role + - key: knoe.org/node-role operator: In values: - general --- -# Source: prole-supabase/templates/imgproxy/deployment.yaml +# Source: knoe-supabase/templates/imgproxy/deployment.yaml apiVersion: apps/v1 kind: Deployment metadata: name: supabase-imgproxy labels: - helm.sh/chart: prole-supabase-0.5.0-prole.1 + helm.sh/chart: knoe-supabase-0.5.0-knoe.1 app.kubernetes.io/name: supabase app.kubernetes.io/instance: supabase app.kubernetes.io/managed-by: Helm spec: selector: matchLabels: - app.kubernetes.io/name: prole-supabase-imgproxy + app.kubernetes.io/name: knoe-supabase-imgproxy app.kubernetes.io/instance: supabase template: metadata: labels: - app.kubernetes.io/name: prole-supabase-imgproxy + app.kubernetes.io/name: knoe-supabase-imgproxy app.kubernetes.io/instance: supabase spec: serviceAccountName: supabase-imgproxy securityContext: null containers: - - name: prole-supabase-imgproxy + - name: knoe-supabase-imgproxy securityContext: {} image: "darthsim/imgproxy:v3.30.1" @@ -1682,44 +1682,44 @@ spec: persistentVolumeClaim: claimName: supabase-imgproxy nodeSelector: - kubernetes.io/hostname: gandalf.prole.org - prole.org/node-role: general + kubernetes.io/hostname: gandalf.knoe.org + knoe.org/node-role: general affinity: nodeAffinity: requiredDuringSchedulingIgnoredDuringExecution: nodeSelectorTerms: - matchExpressions: - - key: prole.org/node-role + - key: knoe.org/node-role operator: In values: - general --- -# Source: prole-supabase/templates/kong/deployment.yaml +# Source: knoe-supabase/templates/kong/deployment.yaml apiVersion: apps/v1 kind: Deployment metadata: name: supabase-kong labels: - helm.sh/chart: prole-supabase-0.5.0-prole.1 + helm.sh/chart: knoe-supabase-0.5.0-knoe.1 app.kubernetes.io/name: supabase app.kubernetes.io/instance: supabase app.kubernetes.io/managed-by: Helm spec: selector: matchLabels: - app.kubernetes.io/name: prole-supabase-kong + app.kubernetes.io/name: knoe-supabase-kong app.kubernetes.io/instance: supabase template: metadata: labels: - app.kubernetes.io/name: prole-supabase-kong + app.kubernetes.io/name: knoe-supabase-kong app.kubernetes.io/instance: supabase spec: serviceAccountName: supabase-kong securityContext: null containers: - - name: prole-supabase-kong + - name: knoe-supabase-kong securityContext: {} image: "kong:2.8.1" @@ -1772,14 +1772,14 @@ spec: - mountPath: /scripts name: wrapper nodeSelector: - kubernetes.io/hostname: gandalf.prole.org - prole.org/node-role: general + kubernetes.io/hostname: gandalf.knoe.org + knoe.org/node-role: general affinity: nodeAffinity: requiredDuringSchedulingIgnoredDuringExecution: nodeSelectorTerms: - matchExpressions: - - key: prole.org/node-role + - key: knoe.org/node-role operator: In values: - general @@ -1799,32 +1799,32 @@ spec: - key: wrapper.sh path: wrapper.sh --- -# Source: prole-supabase/templates/meta/deployment.yaml +# Source: knoe-supabase/templates/meta/deployment.yaml apiVersion: apps/v1 kind: Deployment metadata: name: supabase-meta labels: - helm.sh/chart: prole-supabase-0.5.0-prole.1 + helm.sh/chart: knoe-supabase-0.5.0-knoe.1 app.kubernetes.io/name: supabase app.kubernetes.io/instance: supabase app.kubernetes.io/managed-by: Helm spec: selector: matchLabels: - app.kubernetes.io/name: prole-supabase-meta + app.kubernetes.io/name: knoe-supabase-meta app.kubernetes.io/instance: supabase template: metadata: labels: - app.kubernetes.io/name: prole-supabase-meta + app.kubernetes.io/name: knoe-supabase-meta app.kubernetes.io/instance: supabase spec: serviceAccountName: supabase-meta securityContext: null containers: - - name: prole-supabase-meta + - name: knoe-supabase-meta securityContext: {} image: "supabase/postgres-meta:v0.95.2" @@ -1874,37 +1874,37 @@ spec: containerPort: 8080 protocol: TCP nodeSelector: - kubernetes.io/hostname: gandalf.prole.org - prole.org/node-role: general + kubernetes.io/hostname: gandalf.knoe.org + knoe.org/node-role: general affinity: nodeAffinity: requiredDuringSchedulingIgnoredDuringExecution: nodeSelectorTerms: - matchExpressions: - - key: prole.org/node-role + - key: knoe.org/node-role operator: In values: - general --- -# Source: prole-supabase/templates/realtime/deployment.yaml +# Source: knoe-supabase/templates/realtime/deployment.yaml apiVersion: apps/v1 kind: Deployment metadata: name: supabase-realtime labels: - helm.sh/chart: prole-supabase-0.5.0-prole.1 + helm.sh/chart: knoe-supabase-0.5.0-knoe.1 app.kubernetes.io/name: supabase app.kubernetes.io/instance: supabase app.kubernetes.io/managed-by: Helm spec: selector: matchLabels: - app.kubernetes.io/name: prole-supabase-realtime + app.kubernetes.io/name: knoe-supabase-realtime app.kubernetes.io/instance: supabase template: metadata: labels: - app.kubernetes.io/name: prole-supabase-realtime + app.kubernetes.io/name: knoe-supabase-realtime app.kubernetes.io/instance: supabase spec: serviceAccountName: supabase-realtime @@ -1928,7 +1928,7 @@ spec: done - echo "Database is ready" containers: - - name: prole-supabase-realtime + - name: knoe-supabase-realtime securityContext: {} image: "supabase/realtime:v2.76.5" @@ -2001,37 +2001,37 @@ spec: containerPort: 4000 protocol: TCP nodeSelector: - kubernetes.io/hostname: gandalf.prole.org - prole.org/node-role: general + kubernetes.io/hostname: gandalf.knoe.org + knoe.org/node-role: general affinity: nodeAffinity: requiredDuringSchedulingIgnoredDuringExecution: nodeSelectorTerms: - matchExpressions: - - key: prole.org/node-role + - key: knoe.org/node-role operator: In values: - general --- -# Source: prole-supabase/templates/rest/deployment.yaml +# Source: knoe-supabase/templates/rest/deployment.yaml apiVersion: apps/v1 kind: Deployment metadata: name: supabase-rest labels: - helm.sh/chart: prole-supabase-0.5.0-prole.1 + helm.sh/chart: knoe-supabase-0.5.0-knoe.1 app.kubernetes.io/name: supabase app.kubernetes.io/instance: supabase app.kubernetes.io/managed-by: Helm spec: selector: matchLabels: - app.kubernetes.io/name: prole-supabase-rest + app.kubernetes.io/name: knoe-supabase-rest app.kubernetes.io/instance: supabase template: metadata: labels: - app.kubernetes.io/name: prole-supabase-rest + app.kubernetes.io/name: knoe-supabase-rest app.kubernetes.io/instance: supabase spec: serviceAccountName: supabase-rest @@ -2055,7 +2055,7 @@ spec: done - echo "Database is ready" containers: - - name: prole-supabase-rest + - name: knoe-supabase-rest securityContext: {} image: "postgrest/postgrest:v14.5" @@ -2111,37 +2111,37 @@ spec: containerPort: 3000 protocol: TCP nodeSelector: - kubernetes.io/hostname: gandalf.prole.org - prole.org/node-role: general + kubernetes.io/hostname: gandalf.knoe.org + knoe.org/node-role: general affinity: nodeAffinity: requiredDuringSchedulingIgnoredDuringExecution: nodeSelectorTerms: - matchExpressions: - - key: prole.org/node-role + - key: knoe.org/node-role operator: In values: - general --- -# Source: prole-supabase/templates/storage/deployment.yaml +# Source: knoe-supabase/templates/storage/deployment.yaml apiVersion: apps/v1 kind: Deployment metadata: name: supabase-storage labels: - helm.sh/chart: prole-supabase-0.5.0-prole.1 + helm.sh/chart: knoe-supabase-0.5.0-knoe.1 app.kubernetes.io/name: supabase app.kubernetes.io/instance: supabase app.kubernetes.io/managed-by: Helm spec: selector: matchLabels: - app.kubernetes.io/name: prole-supabase-storage + app.kubernetes.io/name: knoe-supabase-storage app.kubernetes.io/instance: supabase template: metadata: labels: - app.kubernetes.io/name: prole-supabase-storage + app.kubernetes.io/name: knoe-supabase-storage app.kubernetes.io/instance: supabase spec: restartPolicy: Always @@ -2166,7 +2166,7 @@ spec: done - echo "Database is ready" containers: - - name: prole-supabase-storage + - name: knoe-supabase-storage securityContext: {} image: "supabase/storage-api:v1.37.8" @@ -2266,14 +2266,14 @@ spec: - mountPath: /var/lib/storage name: storage-data nodeSelector: - kubernetes.io/hostname: gandalf.prole.org - prole.org/node-role: general + kubernetes.io/hostname: gandalf.knoe.org + knoe.org/node-role: general affinity: nodeAffinity: requiredDuringSchedulingIgnoredDuringExecution: nodeSelectorTerms: - matchExpressions: - - key: prole.org/node-role + - key: knoe.org/node-role operator: In values: - general @@ -2282,32 +2282,32 @@ spec: persistentVolumeClaim: claimName: supabase-storage --- -# Source: prole-supabase/templates/studio/deployment.yaml +# Source: knoe-supabase/templates/studio/deployment.yaml apiVersion: apps/v1 kind: Deployment metadata: name: supabase-studio labels: - helm.sh/chart: prole-supabase-0.5.0-prole.1 + helm.sh/chart: knoe-supabase-0.5.0-knoe.1 app.kubernetes.io/name: supabase app.kubernetes.io/instance: supabase app.kubernetes.io/managed-by: Helm spec: selector: matchLabels: - app.kubernetes.io/name: prole-supabase-studio + app.kubernetes.io/name: knoe-supabase-studio app.kubernetes.io/instance: supabase template: metadata: labels: - app.kubernetes.io/name: prole-supabase-studio + app.kubernetes.io/name: knoe-supabase-studio app.kubernetes.io/instance: supabase spec: serviceAccountName: supabase-studio securityContext: null containers: - - name: prole-supabase-studio + - name: knoe-supabase-studio securityContext: {} image: "supabase/studio:2026.02.16-sha-26c615c" @@ -2326,7 +2326,7 @@ spec: - name: STUDIO_PORT value: "3000" - name: SUPABASE_PUBLIC_URL - value: "https://db.prole.org" + value: "https://db.knoe.org" - name: SUPABASE_URL value: "http://supabase-kong:8000" - name: STUDIO_PG_META_URL @@ -2412,25 +2412,25 @@ spec: persistentVolumeClaim: claimName: supabase-snippets nodeSelector: - kubernetes.io/hostname: gandalf.prole.org - prole.org/node-role: general + kubernetes.io/hostname: gandalf.knoe.org + knoe.org/node-role: general affinity: nodeAffinity: requiredDuringSchedulingIgnoredDuringExecution: nodeSelectorTerms: - matchExpressions: - - key: prole.org/node-role + - key: knoe.org/node-role operator: In values: - general --- -# Source: prole-supabase/templates/vector/deployment.yaml +# Source: knoe-supabase/templates/vector/deployment.yaml apiVersion: apps/v1 kind: Deployment metadata: name: supabase-vector labels: - helm.sh/chart: prole-supabase-0.5.0-prole.1 + helm.sh/chart: knoe-supabase-0.5.0-knoe.1 app.kubernetes.io/name: supabase app.kubernetes.io/instance: supabase app.kubernetes.io/managed-by: Helm @@ -2438,14 +2438,14 @@ metadata: spec: selector: matchLabels: - app.kubernetes.io/name: prole-supabase-vector + app.kubernetes.io/name: knoe-supabase-vector app.kubernetes.io/instance: supabase template: metadata: annotations: checksum/config: 0d3b553cd78134b83738e4783fddfcacd6c1faf73c369a22dda1a797f4eb87c1 labels: - app.kubernetes.io/name: prole-supabase-vector + app.kubernetes.io/name: knoe-supabase-vector app.kubernetes.io/instance: supabase spec: serviceAccountName: supabase-vector @@ -2455,7 +2455,7 @@ spec: - args: - --config - /etc/vector/vector.yml - name: prole-supabase-vector + name: knoe-supabase-vector securityContext: {} image: "timberio/vector:0.53.0-alpine" @@ -2495,25 +2495,25 @@ spec: hostPath: path: /var/lib/docker/containers nodeSelector: - kubernetes.io/hostname: gandalf.prole.org - prole.org/node-role: general + kubernetes.io/hostname: gandalf.knoe.org + knoe.org/node-role: general affinity: nodeAffinity: requiredDuringSchedulingIgnoredDuringExecution: nodeSelectorTerms: - matchExpressions: - - key: prole.org/node-role + - key: knoe.org/node-role operator: In values: - general --- -# Source: prole-supabase/templates/kong/ingress.yaml +# Source: knoe-supabase/templates/kong/ingress.yaml apiVersion: networking.k8s.io/v1 kind: Ingress metadata: name: supabase-kong labels: - helm.sh/chart: prole-supabase-0.5.0-prole.1 + helm.sh/chart: knoe-supabase-0.5.0-knoe.1 app.kubernetes.io/name: supabase app.kubernetes.io/instance: supabase app.kubernetes.io/managed-by: Helm @@ -2522,7 +2522,7 @@ metadata: spec: ingressClassName: traefik rules: - - host: "db.prole.org" + - host: "db.knoe.org" http: paths: - path: / @@ -2533,13 +2533,13 @@ spec: port: number: 8000 --- -# Source: prole-supabase/templates/studio/ingress.yaml +# Source: knoe-supabase/templates/studio/ingress.yaml apiVersion: networking.k8s.io/v1 kind: Ingress metadata: name: supabase-studio labels: - helm.sh/chart: prole-supabase-0.5.0-prole.1 + helm.sh/chart: knoe-supabase-0.5.0-knoe.1 app.kubernetes.io/name: supabase app.kubernetes.io/instance: supabase app.kubernetes.io/managed-by: Helm @@ -2548,7 +2548,7 @@ metadata: spec: ingressClassName: traefik rules: - - host: "db.prole.org" + - host: "db.knoe.org" http: paths: - path: / @@ -2559,13 +2559,13 @@ spec: port: number: 3000 --- -# Source: prole-supabase/templates/test/analytics.yaml +# Source: knoe-supabase/templates/test/analytics.yaml apiVersion: batch/v1 kind: Job metadata: name: supabase-test-analytics labels: - helm.sh/chart: prole-supabase-0.5.0-prole.1 + helm.sh/chart: knoe-supabase-0.5.0-knoe.1 app.kubernetes.io/name: supabase app.kubernetes.io/instance: supabase app.kubernetes.io/managed-by: Helm @@ -2588,13 +2588,13 @@ spec: echo "Sevice supabase-analytics is healthy." restartPolicy: Never --- -# Source: prole-supabase/templates/test/auth.yaml +# Source: knoe-supabase/templates/test/auth.yaml apiVersion: batch/v1 kind: Job metadata: name: supabase-test-auth labels: - helm.sh/chart: prole-supabase-0.5.0-prole.1 + helm.sh/chart: knoe-supabase-0.5.0-knoe.1 app.kubernetes.io/name: supabase app.kubernetes.io/instance: supabase app.kubernetes.io/managed-by: Helm @@ -2617,13 +2617,13 @@ spec: echo "Sevice supabase-auth is healthy." restartPolicy: Never --- -# Source: prole-supabase/templates/test/imgproxy.yaml +# Source: knoe-supabase/templates/test/imgproxy.yaml apiVersion: batch/v1 kind: Job metadata: name: supabase-test-imgproxy labels: - helm.sh/chart: prole-supabase-0.5.0-prole.1 + helm.sh/chart: knoe-supabase-0.5.0-knoe.1 app.kubernetes.io/name: supabase app.kubernetes.io/instance: supabase app.kubernetes.io/managed-by: Helm @@ -2646,13 +2646,13 @@ spec: echo "Sevice supabase-imgproxy is healthy." restartPolicy: Never --- -# Source: prole-supabase/templates/test/kong.yaml +# Source: knoe-supabase/templates/test/kong.yaml apiVersion: batch/v1 kind: Job metadata: name: supabase-test-kong labels: - helm.sh/chart: prole-supabase-0.5.0-prole.1 + helm.sh/chart: knoe-supabase-0.5.0-knoe.1 app.kubernetes.io/name: supabase app.kubernetes.io/instance: supabase app.kubernetes.io/managed-by: Helm @@ -2689,13 +2689,13 @@ spec: echo "Successfully connected." restartPolicy: Never --- -# Source: prole-supabase/templates/test/meta.yaml +# Source: knoe-supabase/templates/test/meta.yaml apiVersion: batch/v1 kind: Job metadata: name: supabase-test-meta labels: - helm.sh/chart: prole-supabase-0.5.0-prole.1 + helm.sh/chart: knoe-supabase-0.5.0-knoe.1 app.kubernetes.io/name: supabase app.kubernetes.io/instance: supabase app.kubernetes.io/managed-by: Helm @@ -2718,13 +2718,13 @@ spec: echo "Sevice supabase-meta is healthy." restartPolicy: Never --- -# Source: prole-supabase/templates/test/realtime.yaml +# Source: knoe-supabase/templates/test/realtime.yaml apiVersion: batch/v1 kind: Job metadata: name: supabase-test-realtime labels: - helm.sh/chart: prole-supabase-0.5.0-prole.1 + helm.sh/chart: knoe-supabase-0.5.0-knoe.1 app.kubernetes.io/name: supabase app.kubernetes.io/instance: supabase app.kubernetes.io/managed-by: Helm @@ -2747,13 +2747,13 @@ spec: echo "Sevice supabase-realtime is healthy." restartPolicy: Never --- -# Source: prole-supabase/templates/test/rest.yaml +# Source: knoe-supabase/templates/test/rest.yaml apiVersion: batch/v1 kind: Job metadata: name: supabase-test-rest labels: - helm.sh/chart: prole-supabase-0.5.0-prole.1 + helm.sh/chart: knoe-supabase-0.5.0-knoe.1 app.kubernetes.io/name: supabase app.kubernetes.io/instance: supabase app.kubernetes.io/managed-by: Helm @@ -2776,13 +2776,13 @@ spec: echo "Sevice supabase-rest is healthy." restartPolicy: Never --- -# Source: prole-supabase/templates/test/storage.yaml +# Source: knoe-supabase/templates/test/storage.yaml apiVersion: batch/v1 kind: Job metadata: name: supabase-test-storage labels: - helm.sh/chart: prole-supabase-0.5.0-prole.1 + helm.sh/chart: knoe-supabase-0.5.0-knoe.1 app.kubernetes.io/name: supabase app.kubernetes.io/instance: supabase app.kubernetes.io/managed-by: Helm @@ -2805,13 +2805,13 @@ spec: echo "Sevice supabase-storage is healthy." restartPolicy: Never --- -# Source: prole-supabase/templates/test/studio.yaml +# Source: knoe-supabase/templates/test/studio.yaml apiVersion: batch/v1 kind: Job metadata: name: supabase-test-studio labels: - helm.sh/chart: prole-supabase-0.5.0-prole.1 + helm.sh/chart: knoe-supabase-0.5.0-knoe.1 app.kubernetes.io/name: supabase app.kubernetes.io/instance: supabase app.kubernetes.io/managed-by: Helm diff --git a/tmp/supabase-render-check/generated/values.generated.json b/tmp/supabase-render-check/generated/values.generated.json index 6987f41..67548ac 100644 --- a/tmp/supabase-render-check/generated/values.generated.json +++ b/tmp/supabase-render-check/generated/values.generated.json @@ -8,79 +8,79 @@ "functions": { "enabled": true, "nodeSelector": { - "kubernetes.io/hostname": "gandalf.prole.org" + "kubernetes.io/hostname": "gandalf.knoe.org" } }, "vector": { "enabled": true, "nodeSelector": { - "kubernetes.io/hostname": "gandalf.prole.org" + "kubernetes.io/hostname": "gandalf.knoe.org" } }, "kong": { "enabled": true, "nodeSelector": { - "kubernetes.io/hostname": "gandalf.prole.org" + "kubernetes.io/hostname": "gandalf.knoe.org" } }, "storage": { "enabled": true, "nodeSelector": { - "kubernetes.io/hostname": "gandalf.prole.org" + "kubernetes.io/hostname": "gandalf.knoe.org" } }, "minio": { "enabled": false, "nodeSelector": { - "kubernetes.io/hostname": "gandalf.prole.org" + "kubernetes.io/hostname": "gandalf.knoe.org" } }, "imgproxy": { "enabled": true, "nodeSelector": { - "kubernetes.io/hostname": "gandalf.prole.org" + "kubernetes.io/hostname": "gandalf.knoe.org" } }, "analytics": { "enabled": true, "fullnameOverride": "supabase-analytics", "nodeSelector": { - "kubernetes.io/hostname": "gandalf.prole.org" + "kubernetes.io/hostname": "gandalf.knoe.org" } }, "auth": { "enabled": true, "fullnameOverride": "supabase-auth", "nodeSelector": { - "kubernetes.io/hostname": "gandalf.prole.org" + "kubernetes.io/hostname": "gandalf.knoe.org" } }, "meta": { "enabled": true, "fullnameOverride": "supabase-meta", "nodeSelector": { - "kubernetes.io/hostname": "gandalf.prole.org" + "kubernetes.io/hostname": "gandalf.knoe.org" } }, "realtime": { "enabled": true, "fullnameOverride": "supabase-realtime", "nodeSelector": { - "kubernetes.io/hostname": "gandalf.prole.org" + "kubernetes.io/hostname": "gandalf.knoe.org" } }, "rest": { "enabled": true, "fullnameOverride": "supabase-rest", "nodeSelector": { - "kubernetes.io/hostname": "gandalf.prole.org" + "kubernetes.io/hostname": "gandalf.knoe.org" } }, "studio": { "enabled": true, "fullnameOverride": "supabase-studio", "nodeSelector": { - "kubernetes.io/hostname": "gandalf.prole.org" + "kubernetes.io/hostname": "gandalf.knoe.org" } } }, @@ -98,8 +98,8 @@ "DB_HOST": "knoe-db-rw.knoe-db.svc.cluster.local", "DB_PORT": "5432", "DB_SSL": "disable", - "API_EXTERNAL_URL": "https://db.prole.org", - "GOTRUE_SITE_URL": "https://db.prole.org" + "API_EXTERNAL_URL": "https://db.knoe.org", + "GOTRUE_SITE_URL": "https://db.knoe.org" }, "analytics": { "DB_HOST": "knoe-db-rw.knoe-db.svc.cluster.local", @@ -110,7 +110,7 @@ "DB_PORT": "5432" }, "studio": { - "SUPABASE_PUBLIC_URL": "https://db.prole.org" + "SUPABASE_PUBLIC_URL": "https://db.knoe.org" } }, "secret": { @@ -133,7 +133,7 @@ "className": "traefik", "hosts": [ { - "host": "db.prole.org", + "host": "db.knoe.org", "paths": [ { "path": "/", @@ -148,7 +148,7 @@ "className": "traefik", "hosts": [ { - "host": "db.prole.org", + "host": "db.knoe.org", "paths": [ { "path": "/", diff --git a/tmp/supabase-render-check/manifests/supabase-helm.yaml b/tmp/supabase-render-check/manifests/supabase-helm.yaml index bf54bcd..f4e70b8 100644 --- a/tmp/supabase-render-check/manifests/supabase-helm.yaml +++ b/tmp/supabase-render-check/manifests/supabase-helm.yaml @@ -1,149 +1,149 @@ --- -# Source: prole-supabase/templates/analytics/serviceaccount.yaml +# Source: knoe-supabase/templates/analytics/serviceaccount.yaml apiVersion: v1 kind: ServiceAccount metadata: name: supabase-analytics labels: - helm.sh/chart: prole-supabase-0.5.0-prole.1 + helm.sh/chart: knoe-supabase-0.5.0-knoe.1 app.kubernetes.io/name: supabase - app.kubernetes.io/instance: prole-supabase + app.kubernetes.io/instance: knoe-supabase app.kubernetes.io/managed-by: Helm --- -# Source: prole-supabase/templates/auth/serviceaccount.yaml +# Source: knoe-supabase/templates/auth/serviceaccount.yaml apiVersion: v1 kind: ServiceAccount metadata: name: supabase-auth labels: - helm.sh/chart: prole-supabase-0.5.0-prole.1 + helm.sh/chart: knoe-supabase-0.5.0-knoe.1 app.kubernetes.io/name: supabase - app.kubernetes.io/instance: prole-supabase + app.kubernetes.io/instance: knoe-supabase app.kubernetes.io/managed-by: Helm --- -# Source: prole-supabase/templates/functions/serviceaccount.yaml +# Source: knoe-supabase/templates/functions/serviceaccount.yaml apiVersion: v1 kind: ServiceAccount metadata: - name: prole-supabase-prole-supabase-functions + name: knoe-supabase-knoe-supabase-functions labels: - helm.sh/chart: prole-supabase-0.5.0-prole.1 + helm.sh/chart: knoe-supabase-0.5.0-knoe.1 app.kubernetes.io/name: supabase - app.kubernetes.io/instance: prole-supabase + app.kubernetes.io/instance: knoe-supabase app.kubernetes.io/managed-by: Helm --- -# Source: prole-supabase/templates/imgproxy/serviceaccount.yaml +# Source: knoe-supabase/templates/imgproxy/serviceaccount.yaml apiVersion: v1 kind: ServiceAccount metadata: - name: prole-supabase-prole-supabase-imgproxy + name: knoe-supabase-knoe-supabase-imgproxy labels: - helm.sh/chart: prole-supabase-0.5.0-prole.1 + helm.sh/chart: knoe-supabase-0.5.0-knoe.1 app.kubernetes.io/name: supabase - app.kubernetes.io/instance: prole-supabase + app.kubernetes.io/instance: knoe-supabase app.kubernetes.io/managed-by: Helm --- -# Source: prole-supabase/templates/kong/serviceaccount.yaml +# Source: knoe-supabase/templates/kong/serviceaccount.yaml apiVersion: v1 kind: ServiceAccount metadata: - name: prole-supabase-prole-supabase-kong + name: knoe-supabase-knoe-supabase-kong labels: - helm.sh/chart: prole-supabase-0.5.0-prole.1 + helm.sh/chart: knoe-supabase-0.5.0-knoe.1 app.kubernetes.io/name: supabase - app.kubernetes.io/instance: prole-supabase + app.kubernetes.io/instance: knoe-supabase app.kubernetes.io/managed-by: Helm --- -# Source: prole-supabase/templates/meta/serviceaccount.yaml +# Source: knoe-supabase/templates/meta/serviceaccount.yaml apiVersion: v1 kind: ServiceAccount metadata: name: supabase-meta labels: - helm.sh/chart: prole-supabase-0.5.0-prole.1 + helm.sh/chart: knoe-supabase-0.5.0-knoe.1 app.kubernetes.io/name: supabase - app.kubernetes.io/instance: prole-supabase + app.kubernetes.io/instance: knoe-supabase app.kubernetes.io/managed-by: Helm --- -# Source: prole-supabase/templates/realtime/serviceaccount.yaml +# Source: knoe-supabase/templates/realtime/serviceaccount.yaml apiVersion: v1 kind: ServiceAccount metadata: name: supabase-realtime labels: - helm.sh/chart: prole-supabase-0.5.0-prole.1 + helm.sh/chart: knoe-supabase-0.5.0-knoe.1 app.kubernetes.io/name: supabase - app.kubernetes.io/instance: prole-supabase + app.kubernetes.io/instance: knoe-supabase app.kubernetes.io/managed-by: Helm --- -# Source: prole-supabase/templates/rest/serviceaccount.yaml +# Source: knoe-supabase/templates/rest/serviceaccount.yaml apiVersion: v1 kind: ServiceAccount metadata: name: supabase-rest labels: - helm.sh/chart: prole-supabase-0.5.0-prole.1 + helm.sh/chart: knoe-supabase-0.5.0-knoe.1 app.kubernetes.io/name: supabase - app.kubernetes.io/instance: prole-supabase + app.kubernetes.io/instance: knoe-supabase app.kubernetes.io/managed-by: Helm --- -# Source: prole-supabase/templates/storage/serviceaccount.yaml +# Source: knoe-supabase/templates/storage/serviceaccount.yaml apiVersion: v1 kind: ServiceAccount metadata: - name: prole-supabase-prole-supabase-storage + name: knoe-supabase-knoe-supabase-storage labels: - helm.sh/chart: prole-supabase-0.5.0-prole.1 + helm.sh/chart: knoe-supabase-0.5.0-knoe.1 app.kubernetes.io/name: supabase - app.kubernetes.io/instance: prole-supabase + app.kubernetes.io/instance: knoe-supabase app.kubernetes.io/managed-by: Helm --- -# Source: prole-supabase/templates/studio/serviceaccount.yaml +# Source: knoe-supabase/templates/studio/serviceaccount.yaml apiVersion: v1 kind: ServiceAccount metadata: name: supabase-studio labels: - helm.sh/chart: prole-supabase-0.5.0-prole.1 + helm.sh/chart: knoe-supabase-0.5.0-knoe.1 app.kubernetes.io/name: supabase - app.kubernetes.io/instance: prole-supabase + app.kubernetes.io/instance: knoe-supabase app.kubernetes.io/managed-by: Helm --- -# Source: prole-supabase/templates/vector/serviceaccount.yaml +# Source: knoe-supabase/templates/vector/serviceaccount.yaml apiVersion: v1 kind: ServiceAccount metadata: - name: prole-supabase-prole-supabase-vector + name: knoe-supabase-knoe-supabase-vector labels: - helm.sh/chart: prole-supabase-0.5.0-prole.1 + helm.sh/chart: knoe-supabase-0.5.0-knoe.1 app.kubernetes.io/name: supabase - app.kubernetes.io/instance: prole-supabase + app.kubernetes.io/instance: knoe-supabase app.kubernetes.io/managed-by: Helm --- -# Source: prole-supabase/templates/secrets/analytics.yaml +# Source: knoe-supabase/templates/secrets/analytics.yaml apiVersion: v1 kind: Secret metadata: name: supabase-analytics labels: - helm.sh/chart: prole-supabase-0.5.0-prole.1 + helm.sh/chart: knoe-supabase-0.5.0-knoe.1 app.kubernetes.io/name: supabase - app.kubernetes.io/instance: prole-supabase + app.kubernetes.io/instance: knoe-supabase app.kubernetes.io/managed-by: Helm type: Opaque data: privateAccessToken: eW91ci1zdXBlci1zZWNyZXQtYW5kLWxvbmctbG9nZmxhcmUta2V5LXByaXZhdGU= publicAccessToken: eW91ci1zdXBlci1zZWNyZXQtYW5kLWxvbmctbG9nZmxhcmUta2V5LXB1YmxpYw== --- -# Source: prole-supabase/templates/secrets/dashboard.yaml +# Source: knoe-supabase/templates/secrets/dashboard.yaml apiVersion: v1 kind: Secret metadata: name: supabase-dashboard labels: - helm.sh/chart: prole-supabase-0.5.0-prole.1 + helm.sh/chart: knoe-supabase-0.5.0-knoe.1 app.kubernetes.io/name: supabase - app.kubernetes.io/instance: prole-supabase + app.kubernetes.io/instance: knoe-supabase app.kubernetes.io/managed-by: Helm type: Opaque data: @@ -151,15 +151,15 @@ data: password: dGhpc19wYXNzd29yZF9pc19pbnNlY3VyZV9hbmRfc2hvdWxkX2JlX3VwZGF0ZWQ= username: c3VwYWJhc2U= --- -# Source: prole-supabase/templates/secrets/db.yaml +# Source: knoe-supabase/templates/secrets/db.yaml apiVersion: v1 kind: Secret metadata: name: supabase-db labels: - helm.sh/chart: prole-supabase-0.5.0-prole.1 + helm.sh/chart: knoe-supabase-0.5.0-knoe.1 app.kubernetes.io/name: supabase - app.kubernetes.io/instance: prole-supabase + app.kubernetes.io/instance: knoe-supabase app.kubernetes.io/managed-by: Helm type: Opaque data: @@ -167,15 +167,15 @@ data: password: ZnIzc3R5bDM= password_encoded: ZnIzc3R5bDM= --- -# Source: prole-supabase/templates/secrets/jwt.yaml +# Source: knoe-supabase/templates/secrets/jwt.yaml apiVersion: v1 kind: Secret metadata: name: supabase-jwt labels: - helm.sh/chart: prole-supabase-0.5.0-prole.1 + helm.sh/chart: knoe-supabase-0.5.0-knoe.1 app.kubernetes.io/name: supabase - app.kubernetes.io/instance: prole-supabase + app.kubernetes.io/instance: knoe-supabase app.kubernetes.io/managed-by: Helm type: Opaque data: @@ -183,88 +183,88 @@ data: secret: MWM3YjU5Y2MxMzM3YzY1YmMyZWRjMmU1OGQzZmZiZTU4NGI5ZjllZjY2MzA1NzA1ZmNhNjMzNjgyOTU0Zjk2NQ== serviceKey: ZXlKaGJHY2lPaUpJVXpJMU5pSXNJblI1Y0NJNklrcFhWQ0o5LmV5SnliMnhsSWpvaWMyVnlkbWxqWlY5eWIyeGxJaXdpYVhOeklqb2ljSEp2YkdVdGMzVndZV0poYzJVaUxDSnBZWFFpT2pFM056UTVORGswT1RFc0ltVjRjQ0k2TWpBNU1ETXdPVFE1TVgwLjFfeE1oQkMwVnNGWnhUSlYyQUR1RGphZjA0UkZUQlpjWDVhaGRUUWRWMWM= --- -# Source: prole-supabase/templates/secrets/meta.yaml +# Source: knoe-supabase/templates/secrets/meta.yaml apiVersion: v1 kind: Secret metadata: name: supabase-meta labels: - helm.sh/chart: prole-supabase-0.5.0-prole.1 + helm.sh/chart: knoe-supabase-0.5.0-knoe.1 app.kubernetes.io/name: supabase - app.kubernetes.io/instance: prole-supabase + app.kubernetes.io/instance: knoe-supabase app.kubernetes.io/managed-by: Helm type: Opaque data: cryptoKey: eW91ci1lbmNyeXB0aW9uLWtleS0zMi1jaGFycy1taW4= --- -# Source: prole-supabase/templates/secrets/minio.yaml +# Source: knoe-supabase/templates/secrets/minio.yaml apiVersion: v1 kind: Secret metadata: name: supabase-minio labels: - helm.sh/chart: prole-supabase-0.5.0-prole.1 + helm.sh/chart: knoe-supabase-0.5.0-knoe.1 app.kubernetes.io/name: supabase - app.kubernetes.io/instance: prole-supabase + app.kubernetes.io/instance: knoe-supabase app.kubernetes.io/managed-by: Helm type: Opaque data: password: c2VjcmV0MTIzNA== user: c3VwYS1zdG9yYWdl --- -# Source: prole-supabase/templates/secrets/realtime.yaml +# Source: knoe-supabase/templates/secrets/realtime.yaml apiVersion: v1 kind: Secret metadata: name: supabase-realtime labels: - helm.sh/chart: prole-supabase-0.5.0-prole.1 + helm.sh/chart: knoe-supabase-0.5.0-knoe.1 app.kubernetes.io/name: supabase - app.kubernetes.io/instance: prole-supabase + app.kubernetes.io/instance: knoe-supabase app.kubernetes.io/managed-by: Helm type: Opaque data: secretKeyBase: VXBOVm50bjNjRHhISnBxOTlZTWMxVDFBUWdRcGM4a2ZZVHVSZ0JpWWExNUJMcng4ZXRRb1h6M2dadjEvdTJvcQ== --- -# Source: prole-supabase/templates/secrets/s3.yaml +# Source: knoe-supabase/templates/secrets/s3.yaml apiVersion: v1 kind: Secret metadata: name: supabase-s3 labels: - helm.sh/chart: prole-supabase-0.5.0-prole.1 + helm.sh/chart: knoe-supabase-0.5.0-knoe.1 app.kubernetes.io/name: supabase - app.kubernetes.io/instance: prole-supabase + app.kubernetes.io/instance: knoe-supabase app.kubernetes.io/managed-by: Helm type: Opaque data: accessKey: ZHVtbXktc2VjcmV0 keyId: ZHVtbXkta2V5 --- -# Source: prole-supabase/templates/secrets/smtp.yaml +# Source: knoe-supabase/templates/secrets/smtp.yaml apiVersion: v1 kind: Secret metadata: name: supabase-smtp labels: - helm.sh/chart: prole-supabase-0.5.0-prole.1 + helm.sh/chart: knoe-supabase-0.5.0-knoe.1 app.kubernetes.io/name: supabase - app.kubernetes.io/instance: prole-supabase + app.kubernetes.io/instance: knoe-supabase app.kubernetes.io/managed-by: Helm type: Opaque data: password: ZmFrZV9tYWlsX3Bhc3N3b3Jk username: ZmFrZV9tYWlsX3VzZXI= --- -# Source: prole-supabase/templates/functions/functions.config.yaml +# Source: knoe-supabase/templates/functions/functions.config.yaml apiVersion: v1 kind: ConfigMap metadata: - name: prole-supabase-prole-supabase-functions-main + name: knoe-supabase-knoe-supabase-functions-main labels: - helm.sh/chart: prole-supabase-0.5.0-prole.1 + helm.sh/chart: knoe-supabase-0.5.0-knoe.1 app.kubernetes.io/name: supabase - app.kubernetes.io/instance: prole-supabase + app.kubernetes.io/instance: knoe-supabase app.kubernetes.io/managed-by: Helm data: index.ts: | @@ -362,15 +362,15 @@ data: } }) --- -# Source: prole-supabase/templates/kong/config.yaml +# Source: knoe-supabase/templates/kong/config.yaml apiVersion: v1 kind: ConfigMap metadata: - name: prole-supabase-prole-supabase-kong + name: knoe-supabase-knoe-supabase-kong labels: - helm.sh/chart: prole-supabase-0.5.0-prole.1 + helm.sh/chart: knoe-supabase-0.5.0-knoe.1 app.kubernetes.io/name: supabase - app.kubernetes.io/instance: prole-supabase + app.kubernetes.io/instance: knoe-supabase app.kubernetes.io/managed-by: Helm data: wrapper.sh: | @@ -541,8 +541,8 @@ data: - admin - anon - name: storage-v1 - _comment: "Storage: /storage/v1/* -> http://prole-supabase-prole-supabase-storage:5000/*" - url: http://prole-supabase-prole-supabase-storage:5000/ + _comment: "Storage: /storage/v1/* -> http://knoe-supabase-knoe-supabase-storage:5000/*" + url: http://knoe-supabase-knoe-supabase-storage:5000/ routes: - name: storage-v1-all strip_path: true @@ -551,8 +551,8 @@ data: plugins: - name: cors - name: functions-v1 - _comment: 'Edge Functions: /functions/v1/* -> http://prole-supabase-prole-supabase-functions:9000/*' - url: http://prole-supabase-prole-supabase-functions:9000/ + _comment: 'Edge Functions: /functions/v1/* -> http://knoe-supabase-knoe-supabase-functions:9000/*' + url: http://knoe-supabase-knoe-supabase-functions:9000/ routes: - name: functions-v1-all strip_path: true @@ -595,15 +595,15 @@ data: config: hide_credentials: true --- -# Source: prole-supabase/templates/vector/config.yaml +# Source: knoe-supabase/templates/vector/config.yaml apiVersion: v1 kind: ConfigMap metadata: - name: prole-supabase-prole-supabase-vector-config + name: knoe-supabase-knoe-supabase-vector-config labels: - helm.sh/chart: prole-supabase-0.5.0-prole.1 + helm.sh/chart: knoe-supabase-0.5.0-knoe.1 app.kubernetes.io/name: supabase - app.kubernetes.io/instance: prole-supabase + app.kubernetes.io/instance: knoe-supabase app.kubernetes.io/managed-by: Helm data: vector.yml: | @@ -614,7 +614,7 @@ data: sources: kubernetes_host: type: kubernetes_logs - extra_label_selector: app.kubernetes.io/instance=prole-supabase,app.kubernetes.io/name!=prole-supabase-vector + extra_label_selector: app.kubernetes.io/instance=knoe-supabase,app.kubernetes.io/name!=knoe-supabase-vector transforms: project_logs: @@ -634,13 +634,13 @@ data: inputs: - project_logs route: - kong: '.appname == "prole-supabase-kong"' - auth: '.appname == "prole-supabase-auth"' - rest: '.appname == "prole-supabase-rest"' - realtime: '.appname == "prole-supabase-realtime"' - storage: '.appname == "prole-supabase-storage"' - functions: '.appname == "prole-supabase-functions"' - db: '.appname == "prole-supabase-db"' + kong: '.appname == "knoe-supabase-kong"' + auth: '.appname == "knoe-supabase-auth"' + rest: '.appname == "knoe-supabase-rest"' + realtime: '.appname == "knoe-supabase-realtime"' + storage: '.appname == "knoe-supabase-storage"' + functions: '.appname == "knoe-supabase-functions"' + db: '.appname == "knoe-supabase-db"' # Ignores non nginx errors since they are related with kong booting up kong_logs: type: remap @@ -864,15 +864,15 @@ data: x-api-key: ${LOGFLARE_PUBLIC_ACCESS_TOKEN?LOGFLARE_PUBLIC_ACCESS_TOKEN is required} uri: 'http://supabase-analytics:4000/api/logs?source_name=cloudflare.logs.prod' --- -# Source: prole-supabase/templates/persistence.yaml +# Source: knoe-supabase/templates/persistence.yaml apiVersion: v1 kind: PersistentVolumeClaim metadata: name: supabase-functions labels: - helm.sh/chart: prole-supabase-0.5.0-prole.1 + helm.sh/chart: knoe-supabase-0.5.0-knoe.1 app.kubernetes.io/name: supabase - app.kubernetes.io/instance: prole-supabase + app.kubernetes.io/instance: knoe-supabase app.kubernetes.io/managed-by: Helm synology.storage/pvc: "supabase-functions" spec: @@ -886,15 +886,15 @@ spec: requests: storage: "1Gi" --- -# Source: prole-supabase/templates/persistence.yaml +# Source: knoe-supabase/templates/persistence.yaml apiVersion: v1 kind: PersistentVolumeClaim metadata: name: supabase-imgproxy labels: - helm.sh/chart: prole-supabase-0.5.0-prole.1 + helm.sh/chart: knoe-supabase-0.5.0-knoe.1 app.kubernetes.io/name: supabase - app.kubernetes.io/instance: prole-supabase + app.kubernetes.io/instance: knoe-supabase app.kubernetes.io/managed-by: Helm synology.storage/pvc: "supabase-imgproxy" spec: @@ -908,16 +908,16 @@ spec: requests: storage: "1Gi" --- -# Source: prole-supabase/templates/persistence.yaml +# Source: knoe-supabase/templates/persistence.yaml --- apiVersion: v1 kind: PersistentVolumeClaim metadata: name: supabase-snippets labels: - helm.sh/chart: prole-supabase-0.5.0-prole.1 + helm.sh/chart: knoe-supabase-0.5.0-knoe.1 app.kubernetes.io/name: supabase - app.kubernetes.io/instance: prole-supabase + app.kubernetes.io/instance: knoe-supabase app.kubernetes.io/managed-by: Helm synology.storage/pvc: "supabase-snippets" spec: @@ -931,15 +931,15 @@ spec: requests: storage: "1Gi" --- -# Source: prole-supabase/templates/persistence.yaml +# Source: knoe-supabase/templates/persistence.yaml apiVersion: v1 kind: PersistentVolumeClaim metadata: name: supabase-storage labels: - helm.sh/chart: prole-supabase-0.5.0-prole.1 + helm.sh/chart: knoe-supabase-0.5.0-knoe.1 app.kubernetes.io/name: supabase - app.kubernetes.io/instance: prole-supabase + app.kubernetes.io/instance: knoe-supabase app.kubernetes.io/managed-by: Helm synology.storage/pvc: "supabase-storage" spec: @@ -953,15 +953,15 @@ spec: requests: storage: "1Gi" --- -# Source: prole-supabase/templates/persistence.yaml +# Source: knoe-supabase/templates/persistence.yaml apiVersion: v1 kind: PersistentVolumeClaim metadata: name: supabase-deno labels: - helm.sh/chart: prole-supabase-0.5.0-prole.1 + helm.sh/chart: knoe-supabase-0.5.0-knoe.1 app.kubernetes.io/name: supabase - app.kubernetes.io/instance: prole-supabase + app.kubernetes.io/instance: knoe-supabase app.kubernetes.io/managed-by: Helm synology.storage/pvc: "supabase-deno" spec: @@ -975,7 +975,7 @@ spec: requests: storage: "1Gi" --- -# Source: prole-supabase/templates/vector/serviceaccount.yaml +# Source: knoe-supabase/templates/vector/serviceaccount.yaml apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole metadata: @@ -990,29 +990,29 @@ rules: - supabase-* verbs: ["get"] --- -# Source: prole-supabase/templates/vector/serviceaccount.yaml +# Source: knoe-supabase/templates/vector/serviceaccount.yaml apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRoleBinding metadata: name: supabase-view subjects: - kind: ServiceAccount - name: prole-supabase-prole-supabase-vector + name: knoe-supabase-knoe-supabase-vector namespace: supabase roleRef: kind: ClusterRole name: supabase-reader apiGroup: rbac.authorization.k8s.io --- -# Source: prole-supabase/templates/analytics/service.yaml +# Source: knoe-supabase/templates/analytics/service.yaml apiVersion: v1 kind: Service metadata: name: supabase-analytics labels: - helm.sh/chart: prole-supabase-0.5.0-prole.1 + helm.sh/chart: knoe-supabase-0.5.0-knoe.1 app.kubernetes.io/name: supabase - app.kubernetes.io/instance: prole-supabase + app.kubernetes.io/instance: knoe-supabase app.kubernetes.io/managed-by: Helm spec: type: ClusterIP @@ -1022,18 +1022,18 @@ spec: protocol: TCP name: http selector: - app.kubernetes.io/name: prole-supabase-analytics - app.kubernetes.io/instance: prole-supabase + app.kubernetes.io/name: knoe-supabase-analytics + app.kubernetes.io/instance: knoe-supabase --- -# Source: prole-supabase/templates/auth/service.yaml +# Source: knoe-supabase/templates/auth/service.yaml apiVersion: v1 kind: Service metadata: name: supabase-auth labels: - helm.sh/chart: prole-supabase-0.5.0-prole.1 + helm.sh/chart: knoe-supabase-0.5.0-knoe.1 app.kubernetes.io/name: supabase - app.kubernetes.io/instance: prole-supabase + app.kubernetes.io/instance: knoe-supabase app.kubernetes.io/managed-by: Helm spec: type: ClusterIP @@ -1043,18 +1043,18 @@ spec: protocol: TCP name: http selector: - app.kubernetes.io/name: prole-supabase-auth - app.kubernetes.io/instance: prole-supabase + app.kubernetes.io/name: knoe-supabase-auth + app.kubernetes.io/instance: knoe-supabase --- -# Source: prole-supabase/templates/db/external-service.yaml +# Source: knoe-supabase/templates/db/external-service.yaml apiVersion: v1 kind: Service metadata: name: db labels: - helm.sh/chart: prole-supabase-0.5.0-prole.1 + helm.sh/chart: knoe-supabase-0.5.0-knoe.1 app.kubernetes.io/name: supabase - app.kubernetes.io/instance: prole-supabase + app.kubernetes.io/instance: knoe-supabase app.kubernetes.io/managed-by: Helm spec: type: ExternalName @@ -1064,15 +1064,15 @@ spec: port: 5432 protocol: TCP --- -# Source: prole-supabase/templates/functions/service.yaml +# Source: knoe-supabase/templates/functions/service.yaml apiVersion: v1 kind: Service metadata: - name: prole-supabase-prole-supabase-functions + name: knoe-supabase-knoe-supabase-functions labels: - helm.sh/chart: prole-supabase-0.5.0-prole.1 + helm.sh/chart: knoe-supabase-0.5.0-knoe.1 app.kubernetes.io/name: supabase - app.kubernetes.io/instance: prole-supabase + app.kubernetes.io/instance: knoe-supabase app.kubernetes.io/managed-by: Helm spec: type: ClusterIP @@ -1082,18 +1082,18 @@ spec: protocol: TCP name: http selector: - app.kubernetes.io/name: prole-supabase-functions - app.kubernetes.io/instance: prole-supabase + app.kubernetes.io/name: knoe-supabase-functions + app.kubernetes.io/instance: knoe-supabase --- -# Source: prole-supabase/templates/imgproxy/service.yaml +# Source: knoe-supabase/templates/imgproxy/service.yaml apiVersion: v1 kind: Service metadata: - name: prole-supabase-prole-supabase-imgproxy + name: knoe-supabase-knoe-supabase-imgproxy labels: - helm.sh/chart: prole-supabase-0.5.0-prole.1 + helm.sh/chart: knoe-supabase-0.5.0-knoe.1 app.kubernetes.io/name: supabase - app.kubernetes.io/instance: prole-supabase + app.kubernetes.io/instance: knoe-supabase app.kubernetes.io/managed-by: Helm spec: type: ClusterIP @@ -1103,18 +1103,18 @@ spec: protocol: TCP name: http selector: - app.kubernetes.io/name: prole-supabase-imgproxy - app.kubernetes.io/instance: prole-supabase + app.kubernetes.io/name: knoe-supabase-imgproxy + app.kubernetes.io/instance: knoe-supabase --- -# Source: prole-supabase/templates/kong/service.yaml +# Source: knoe-supabase/templates/kong/service.yaml apiVersion: v1 kind: Service metadata: - name: prole-supabase-prole-supabase-kong + name: knoe-supabase-knoe-supabase-kong labels: - helm.sh/chart: prole-supabase-0.5.0-prole.1 + helm.sh/chart: knoe-supabase-0.5.0-knoe.1 app.kubernetes.io/name: supabase - app.kubernetes.io/instance: prole-supabase + app.kubernetes.io/instance: knoe-supabase app.kubernetes.io/managed-by: Helm spec: type: ClusterIP @@ -1124,18 +1124,18 @@ spec: protocol: TCP name: http selector: - app.kubernetes.io/name: prole-supabase-kong - app.kubernetes.io/instance: prole-supabase + app.kubernetes.io/name: knoe-supabase-kong + app.kubernetes.io/instance: knoe-supabase --- -# Source: prole-supabase/templates/meta/service.yaml +# Source: knoe-supabase/templates/meta/service.yaml apiVersion: v1 kind: Service metadata: name: supabase-meta labels: - helm.sh/chart: prole-supabase-0.5.0-prole.1 + helm.sh/chart: knoe-supabase-0.5.0-knoe.1 app.kubernetes.io/name: supabase - app.kubernetes.io/instance: prole-supabase + app.kubernetes.io/instance: knoe-supabase app.kubernetes.io/managed-by: Helm spec: type: ClusterIP @@ -1145,18 +1145,18 @@ spec: protocol: TCP name: http selector: - app.kubernetes.io/name: prole-supabase-meta - app.kubernetes.io/instance: prole-supabase + app.kubernetes.io/name: knoe-supabase-meta + app.kubernetes.io/instance: knoe-supabase --- -# Source: prole-supabase/templates/realtime/service.yaml +# Source: knoe-supabase/templates/realtime/service.yaml apiVersion: v1 kind: Service metadata: name: supabase-realtime labels: - helm.sh/chart: prole-supabase-0.5.0-prole.1 + helm.sh/chart: knoe-supabase-0.5.0-knoe.1 app.kubernetes.io/name: supabase - app.kubernetes.io/instance: prole-supabase + app.kubernetes.io/instance: knoe-supabase app.kubernetes.io/managed-by: Helm spec: type: ClusterIP @@ -1166,18 +1166,18 @@ spec: protocol: TCP name: http selector: - app.kubernetes.io/name: prole-supabase-realtime - app.kubernetes.io/instance: prole-supabase + app.kubernetes.io/name: knoe-supabase-realtime + app.kubernetes.io/instance: knoe-supabase --- -# Source: prole-supabase/templates/rest/service.yaml +# Source: knoe-supabase/templates/rest/service.yaml apiVersion: v1 kind: Service metadata: name: supabase-rest labels: - helm.sh/chart: prole-supabase-0.5.0-prole.1 + helm.sh/chart: knoe-supabase-0.5.0-knoe.1 app.kubernetes.io/name: supabase - app.kubernetes.io/instance: prole-supabase + app.kubernetes.io/instance: knoe-supabase app.kubernetes.io/managed-by: Helm spec: type: ClusterIP @@ -1187,18 +1187,18 @@ spec: protocol: TCP name: http selector: - app.kubernetes.io/name: prole-supabase-rest - app.kubernetes.io/instance: prole-supabase + app.kubernetes.io/name: knoe-supabase-rest + app.kubernetes.io/instance: knoe-supabase --- -# Source: prole-supabase/templates/storage/service.yaml +# Source: knoe-supabase/templates/storage/service.yaml apiVersion: v1 kind: Service metadata: - name: prole-supabase-prole-supabase-storage + name: knoe-supabase-knoe-supabase-storage labels: - helm.sh/chart: prole-supabase-0.5.0-prole.1 + helm.sh/chart: knoe-supabase-0.5.0-knoe.1 app.kubernetes.io/name: supabase - app.kubernetes.io/instance: prole-supabase + app.kubernetes.io/instance: knoe-supabase app.kubernetes.io/managed-by: Helm spec: type: ClusterIP @@ -1208,18 +1208,18 @@ spec: protocol: TCP name: http selector: - app.kubernetes.io/name: prole-supabase-storage - app.kubernetes.io/instance: prole-supabase + app.kubernetes.io/name: knoe-supabase-storage + app.kubernetes.io/instance: knoe-supabase --- -# Source: prole-supabase/templates/studio/service.yaml +# Source: knoe-supabase/templates/studio/service.yaml apiVersion: v1 kind: Service metadata: name: supabase-studio labels: - helm.sh/chart: prole-supabase-0.5.0-prole.1 + helm.sh/chart: knoe-supabase-0.5.0-knoe.1 app.kubernetes.io/name: supabase - app.kubernetes.io/instance: prole-supabase + app.kubernetes.io/instance: knoe-supabase app.kubernetes.io/managed-by: Helm spec: type: ClusterIP @@ -1229,18 +1229,18 @@ spec: protocol: TCP name: http selector: - app.kubernetes.io/name: prole-supabase-studio - app.kubernetes.io/instance: prole-supabase + app.kubernetes.io/name: knoe-supabase-studio + app.kubernetes.io/instance: knoe-supabase --- -# Source: prole-supabase/templates/vector/service.yaml +# Source: knoe-supabase/templates/vector/service.yaml apiVersion: v1 kind: Service metadata: - name: prole-supabase-prole-supabase-vector + name: knoe-supabase-knoe-supabase-vector labels: - helm.sh/chart: prole-supabase-0.5.0-prole.1 + helm.sh/chart: knoe-supabase-0.5.0-knoe.1 app.kubernetes.io/name: supabase - app.kubernetes.io/instance: prole-supabase + app.kubernetes.io/instance: knoe-supabase app.kubernetes.io/managed-by: Helm spec: type: ClusterIP @@ -1250,29 +1250,29 @@ spec: protocol: TCP name: http selector: - app.kubernetes.io/name: prole-supabase-vector - app.kubernetes.io/instance: prole-supabase + app.kubernetes.io/name: knoe-supabase-vector + app.kubernetes.io/instance: knoe-supabase --- -# Source: prole-supabase/templates/analytics/deployment.yaml +# Source: knoe-supabase/templates/analytics/deployment.yaml apiVersion: apps/v1 kind: Deployment metadata: name: supabase-analytics labels: - helm.sh/chart: prole-supabase-0.5.0-prole.1 + helm.sh/chart: knoe-supabase-0.5.0-knoe.1 app.kubernetes.io/name: supabase - app.kubernetes.io/instance: prole-supabase + app.kubernetes.io/instance: knoe-supabase app.kubernetes.io/managed-by: Helm spec: selector: matchLabels: - app.kubernetes.io/name: prole-supabase-analytics - app.kubernetes.io/instance: prole-supabase + app.kubernetes.io/name: knoe-supabase-analytics + app.kubernetes.io/instance: knoe-supabase template: metadata: labels: - app.kubernetes.io/name: prole-supabase-analytics - app.kubernetes.io/instance: prole-supabase + app.kubernetes.io/name: knoe-supabase-analytics + app.kubernetes.io/instance: knoe-supabase spec: serviceAccountName: supabase-analytics securityContext: @@ -1297,7 +1297,7 @@ spec: done - echo "Database is ready" containers: - - name: prole-supabase-analytics + - name: knoe-supabase-analytics securityContext: {} image: "supabase/logflare:1.31.2" @@ -1351,38 +1351,38 @@ spec: - containerPort: 4000 protocol: TCP nodeSelector: - kubernetes.io/hostname: gandalf.prole.org - prole.org/node-role: general + kubernetes.io/hostname: gandalf.knoe.org + knoe.org/node-role: general affinity: nodeAffinity: requiredDuringSchedulingIgnoredDuringExecution: nodeSelectorTerms: - matchExpressions: - - key: prole.org/node-role + - key: knoe.org/node-role operator: In values: - general --- -# Source: prole-supabase/templates/auth/deployment.yaml +# Source: knoe-supabase/templates/auth/deployment.yaml apiVersion: apps/v1 kind: Deployment metadata: name: supabase-auth labels: - helm.sh/chart: prole-supabase-0.5.0-prole.1 + helm.sh/chart: knoe-supabase-0.5.0-knoe.1 app.kubernetes.io/name: supabase - app.kubernetes.io/instance: prole-supabase + app.kubernetes.io/instance: knoe-supabase app.kubernetes.io/managed-by: Helm spec: selector: matchLabels: - app.kubernetes.io/name: prole-supabase-auth - app.kubernetes.io/instance: prole-supabase + app.kubernetes.io/name: knoe-supabase-auth + app.kubernetes.io/instance: knoe-supabase template: metadata: labels: - app.kubernetes.io/name: prole-supabase-auth - app.kubernetes.io/instance: prole-supabase + app.kubernetes.io/name: knoe-supabase-auth + app.kubernetes.io/instance: knoe-supabase spec: serviceAccountName: supabase-auth securityContext: @@ -1405,14 +1405,14 @@ spec: done - echo "Database is ready" containers: - - name: prole-supabase-auth + - name: knoe-supabase-auth securityContext: {} image: "supabase/gotrue:v2.186.0" imagePullPolicy: IfNotPresent env: - name: API_EXTERNAL_URL - value: "https://db.prole.org" + value: "https://db.knoe.org" - name: DB_DRIVER value: "postgres" - name: DB_USER @@ -1448,7 +1448,7 @@ spec: - name: GOTRUE_MAILER_URLPATHS_RECOVERY value: "/auth/v1/verify" - name: GOTRUE_SITE_URL - value: "https://db.prole.org" + value: "https://db.knoe.org" - name: GOTRUE_SMS_AUTOCONFIRM value: "false" - name: GOTRUE_SMTP_ADMIN_EMAIL @@ -1506,40 +1506,40 @@ spec: containerPort: 9999 protocol: TCP nodeSelector: - kubernetes.io/hostname: gandalf.prole.org - prole.org/node-role: general + kubernetes.io/hostname: gandalf.knoe.org + knoe.org/node-role: general affinity: nodeAffinity: requiredDuringSchedulingIgnoredDuringExecution: nodeSelectorTerms: - matchExpressions: - - key: prole.org/node-role + - key: knoe.org/node-role operator: In values: - general --- -# Source: prole-supabase/templates/functions/deployment.yaml +# Source: knoe-supabase/templates/functions/deployment.yaml apiVersion: apps/v1 kind: Deployment metadata: - name: prole-supabase-prole-supabase-functions + name: knoe-supabase-knoe-supabase-functions labels: - helm.sh/chart: prole-supabase-0.5.0-prole.1 + helm.sh/chart: knoe-supabase-0.5.0-knoe.1 app.kubernetes.io/name: supabase - app.kubernetes.io/instance: prole-supabase + app.kubernetes.io/instance: knoe-supabase app.kubernetes.io/managed-by: Helm spec: selector: matchLabels: - app.kubernetes.io/name: prole-supabase-functions - app.kubernetes.io/instance: prole-supabase + app.kubernetes.io/name: knoe-supabase-functions + app.kubernetes.io/instance: knoe-supabase template: metadata: labels: - app.kubernetes.io/name: prole-supabase-functions - app.kubernetes.io/instance: prole-supabase + app.kubernetes.io/name: knoe-supabase-functions + app.kubernetes.io/instance: knoe-supabase spec: - serviceAccountName: prole-supabase-prole-supabase-functions + serviceAccountName: knoe-supabase-knoe-supabase-functions securityContext: null containers: @@ -1547,7 +1547,7 @@ spec: - start - --main-service - /home/deno/functions/main - name: prole-supabase-functions + name: knoe-supabase-functions securityContext: {} image: "supabase/edge-runtime:v1.70.3" @@ -1560,7 +1560,7 @@ spec: - name: VERIFY_JWT value: "false" - name: SUPABASE_URL - value: "http://prole-supabase-prole-supabase-kong:8000" + value: "http://knoe-supabase-knoe-supabase-kong:8000" - name: DB_HOSTNAME value: "db" @@ -1617,46 +1617,46 @@ spec: claimName: supabase-deno - name: functions-main configMap: - name: prole-supabase-prole-supabase-functions-main + name: knoe-supabase-knoe-supabase-functions-main nodeSelector: - kubernetes.io/hostname: gandalf.prole.org - prole.org/node-role: general + kubernetes.io/hostname: gandalf.knoe.org + knoe.org/node-role: general affinity: nodeAffinity: requiredDuringSchedulingIgnoredDuringExecution: nodeSelectorTerms: - matchExpressions: - - key: prole.org/node-role + - key: knoe.org/node-role operator: In values: - general --- -# Source: prole-supabase/templates/imgproxy/deployment.yaml +# Source: knoe-supabase/templates/imgproxy/deployment.yaml apiVersion: apps/v1 kind: Deployment metadata: - name: prole-supabase-prole-supabase-imgproxy + name: knoe-supabase-knoe-supabase-imgproxy labels: - helm.sh/chart: prole-supabase-0.5.0-prole.1 + helm.sh/chart: knoe-supabase-0.5.0-knoe.1 app.kubernetes.io/name: supabase - app.kubernetes.io/instance: prole-supabase + app.kubernetes.io/instance: knoe-supabase app.kubernetes.io/managed-by: Helm spec: selector: matchLabels: - app.kubernetes.io/name: prole-supabase-imgproxy - app.kubernetes.io/instance: prole-supabase + app.kubernetes.io/name: knoe-supabase-imgproxy + app.kubernetes.io/instance: knoe-supabase template: metadata: labels: - app.kubernetes.io/name: prole-supabase-imgproxy - app.kubernetes.io/instance: prole-supabase + app.kubernetes.io/name: knoe-supabase-imgproxy + app.kubernetes.io/instance: knoe-supabase spec: - serviceAccountName: prole-supabase-prole-supabase-imgproxy + serviceAccountName: knoe-supabase-knoe-supabase-imgproxy securityContext: null containers: - - name: prole-supabase-imgproxy + - name: knoe-supabase-imgproxy securityContext: {} image: "darthsim/imgproxy:v3.30.1" @@ -1682,44 +1682,44 @@ spec: persistentVolumeClaim: claimName: supabase-imgproxy nodeSelector: - kubernetes.io/hostname: gandalf.prole.org - prole.org/node-role: general + kubernetes.io/hostname: gandalf.knoe.org + knoe.org/node-role: general affinity: nodeAffinity: requiredDuringSchedulingIgnoredDuringExecution: nodeSelectorTerms: - matchExpressions: - - key: prole.org/node-role + - key: knoe.org/node-role operator: In values: - general --- -# Source: prole-supabase/templates/kong/deployment.yaml +# Source: knoe-supabase/templates/kong/deployment.yaml apiVersion: apps/v1 kind: Deployment metadata: - name: prole-supabase-prole-supabase-kong + name: knoe-supabase-knoe-supabase-kong labels: - helm.sh/chart: prole-supabase-0.5.0-prole.1 + helm.sh/chart: knoe-supabase-0.5.0-knoe.1 app.kubernetes.io/name: supabase - app.kubernetes.io/instance: prole-supabase + app.kubernetes.io/instance: knoe-supabase app.kubernetes.io/managed-by: Helm spec: selector: matchLabels: - app.kubernetes.io/name: prole-supabase-kong - app.kubernetes.io/instance: prole-supabase + app.kubernetes.io/name: knoe-supabase-kong + app.kubernetes.io/instance: knoe-supabase template: metadata: labels: - app.kubernetes.io/name: prole-supabase-kong - app.kubernetes.io/instance: prole-supabase + app.kubernetes.io/name: knoe-supabase-kong + app.kubernetes.io/instance: knoe-supabase spec: - serviceAccountName: prole-supabase-prole-supabase-kong + serviceAccountName: knoe-supabase-knoe-supabase-kong securityContext: null containers: - - name: prole-supabase-kong + - name: knoe-supabase-kong securityContext: {} image: "kong:2.8.1" @@ -1772,59 +1772,59 @@ spec: - mountPath: /scripts name: wrapper nodeSelector: - kubernetes.io/hostname: gandalf.prole.org - prole.org/node-role: general + kubernetes.io/hostname: gandalf.knoe.org + knoe.org/node-role: general affinity: nodeAffinity: requiredDuringSchedulingIgnoredDuringExecution: nodeSelectorTerms: - matchExpressions: - - key: prole.org/node-role + - key: knoe.org/node-role operator: In values: - general volumes: - name: config configMap: - name: prole-supabase-prole-supabase-kong + name: knoe-supabase-knoe-supabase-kong defaultMode: 0777 items: - key: template.yml path: template.yml - name: wrapper configMap: - name: prole-supabase-prole-supabase-kong + name: knoe-supabase-knoe-supabase-kong defaultMode: 0777 items: - key: wrapper.sh path: wrapper.sh --- -# Source: prole-supabase/templates/meta/deployment.yaml +# Source: knoe-supabase/templates/meta/deployment.yaml apiVersion: apps/v1 kind: Deployment metadata: name: supabase-meta labels: - helm.sh/chart: prole-supabase-0.5.0-prole.1 + helm.sh/chart: knoe-supabase-0.5.0-knoe.1 app.kubernetes.io/name: supabase - app.kubernetes.io/instance: prole-supabase + app.kubernetes.io/instance: knoe-supabase app.kubernetes.io/managed-by: Helm spec: selector: matchLabels: - app.kubernetes.io/name: prole-supabase-meta - app.kubernetes.io/instance: prole-supabase + app.kubernetes.io/name: knoe-supabase-meta + app.kubernetes.io/instance: knoe-supabase template: metadata: labels: - app.kubernetes.io/name: prole-supabase-meta - app.kubernetes.io/instance: prole-supabase + app.kubernetes.io/name: knoe-supabase-meta + app.kubernetes.io/instance: knoe-supabase spec: serviceAccountName: supabase-meta securityContext: null containers: - - name: prole-supabase-meta + - name: knoe-supabase-meta securityContext: {} image: "supabase/postgres-meta:v0.95.2" @@ -1874,38 +1874,38 @@ spec: containerPort: 8080 protocol: TCP nodeSelector: - kubernetes.io/hostname: gandalf.prole.org - prole.org/node-role: general + kubernetes.io/hostname: gandalf.knoe.org + knoe.org/node-role: general affinity: nodeAffinity: requiredDuringSchedulingIgnoredDuringExecution: nodeSelectorTerms: - matchExpressions: - - key: prole.org/node-role + - key: knoe.org/node-role operator: In values: - general --- -# Source: prole-supabase/templates/realtime/deployment.yaml +# Source: knoe-supabase/templates/realtime/deployment.yaml apiVersion: apps/v1 kind: Deployment metadata: name: supabase-realtime labels: - helm.sh/chart: prole-supabase-0.5.0-prole.1 + helm.sh/chart: knoe-supabase-0.5.0-knoe.1 app.kubernetes.io/name: supabase - app.kubernetes.io/instance: prole-supabase + app.kubernetes.io/instance: knoe-supabase app.kubernetes.io/managed-by: Helm spec: selector: matchLabels: - app.kubernetes.io/name: prole-supabase-realtime - app.kubernetes.io/instance: prole-supabase + app.kubernetes.io/name: knoe-supabase-realtime + app.kubernetes.io/instance: knoe-supabase template: metadata: labels: - app.kubernetes.io/name: prole-supabase-realtime - app.kubernetes.io/instance: prole-supabase + app.kubernetes.io/name: knoe-supabase-realtime + app.kubernetes.io/instance: knoe-supabase spec: serviceAccountName: supabase-realtime securityContext: @@ -1928,7 +1928,7 @@ spec: done - echo "Database is ready" containers: - - name: prole-supabase-realtime + - name: knoe-supabase-realtime securityContext: {} image: "supabase/realtime:v2.76.5" @@ -2001,38 +2001,38 @@ spec: containerPort: 4000 protocol: TCP nodeSelector: - kubernetes.io/hostname: gandalf.prole.org - prole.org/node-role: general + kubernetes.io/hostname: gandalf.knoe.org + knoe.org/node-role: general affinity: nodeAffinity: requiredDuringSchedulingIgnoredDuringExecution: nodeSelectorTerms: - matchExpressions: - - key: prole.org/node-role + - key: knoe.org/node-role operator: In values: - general --- -# Source: prole-supabase/templates/rest/deployment.yaml +# Source: knoe-supabase/templates/rest/deployment.yaml apiVersion: apps/v1 kind: Deployment metadata: name: supabase-rest labels: - helm.sh/chart: prole-supabase-0.5.0-prole.1 + helm.sh/chart: knoe-supabase-0.5.0-knoe.1 app.kubernetes.io/name: supabase - app.kubernetes.io/instance: prole-supabase + app.kubernetes.io/instance: knoe-supabase app.kubernetes.io/managed-by: Helm spec: selector: matchLabels: - app.kubernetes.io/name: prole-supabase-rest - app.kubernetes.io/instance: prole-supabase + app.kubernetes.io/name: knoe-supabase-rest + app.kubernetes.io/instance: knoe-supabase template: metadata: labels: - app.kubernetes.io/name: prole-supabase-rest - app.kubernetes.io/instance: prole-supabase + app.kubernetes.io/name: knoe-supabase-rest + app.kubernetes.io/instance: knoe-supabase spec: serviceAccountName: supabase-rest securityContext: @@ -2055,7 +2055,7 @@ spec: done - echo "Database is ready" containers: - - name: prole-supabase-rest + - name: knoe-supabase-rest securityContext: {} image: "postgrest/postgrest:v14.5" @@ -2111,41 +2111,41 @@ spec: containerPort: 3000 protocol: TCP nodeSelector: - kubernetes.io/hostname: gandalf.prole.org - prole.org/node-role: general + kubernetes.io/hostname: gandalf.knoe.org + knoe.org/node-role: general affinity: nodeAffinity: requiredDuringSchedulingIgnoredDuringExecution: nodeSelectorTerms: - matchExpressions: - - key: prole.org/node-role + - key: knoe.org/node-role operator: In values: - general --- -# Source: prole-supabase/templates/storage/deployment.yaml +# Source: knoe-supabase/templates/storage/deployment.yaml apiVersion: apps/v1 kind: Deployment metadata: - name: prole-supabase-prole-supabase-storage + name: knoe-supabase-knoe-supabase-storage labels: - helm.sh/chart: prole-supabase-0.5.0-prole.1 + helm.sh/chart: knoe-supabase-0.5.0-knoe.1 app.kubernetes.io/name: supabase - app.kubernetes.io/instance: prole-supabase + app.kubernetes.io/instance: knoe-supabase app.kubernetes.io/managed-by: Helm spec: selector: matchLabels: - app.kubernetes.io/name: prole-supabase-storage - app.kubernetes.io/instance: prole-supabase + app.kubernetes.io/name: knoe-supabase-storage + app.kubernetes.io/instance: knoe-supabase template: metadata: labels: - app.kubernetes.io/name: prole-supabase-storage - app.kubernetes.io/instance: prole-supabase + app.kubernetes.io/name: knoe-supabase-storage + app.kubernetes.io/instance: knoe-supabase spec: restartPolicy: Always - serviceAccountName: prole-supabase-prole-supabase-storage + serviceAccountName: knoe-supabase-knoe-supabase-storage securityContext: null initContainers: @@ -2166,7 +2166,7 @@ spec: done - echo "Database is ready" containers: - - name: prole-supabase-storage + - name: knoe-supabase-storage securityContext: {} image: "supabase/storage-api:v1.37.8" @@ -2247,7 +2247,7 @@ spec: name: supabase-s3 key: accessKey - name: IMGPROXY_URL - value: "http://prole-supabase-prole-supabase-imgproxy:5001" + value: "http://knoe-supabase-knoe-supabase-imgproxy:5001" - name: AWS_ACCESS_KEY_ID valueFrom: secretKeyRef: @@ -2266,14 +2266,14 @@ spec: - mountPath: /var/lib/storage name: storage-data nodeSelector: - kubernetes.io/hostname: gandalf.prole.org - prole.org/node-role: general + kubernetes.io/hostname: gandalf.knoe.org + knoe.org/node-role: general affinity: nodeAffinity: requiredDuringSchedulingIgnoredDuringExecution: nodeSelectorTerms: - matchExpressions: - - key: prole.org/node-role + - key: knoe.org/node-role operator: In values: - general @@ -2282,32 +2282,32 @@ spec: persistentVolumeClaim: claimName: supabase-storage --- -# Source: prole-supabase/templates/studio/deployment.yaml +# Source: knoe-supabase/templates/studio/deployment.yaml apiVersion: apps/v1 kind: Deployment metadata: name: supabase-studio labels: - helm.sh/chart: prole-supabase-0.5.0-prole.1 + helm.sh/chart: knoe-supabase-0.5.0-knoe.1 app.kubernetes.io/name: supabase - app.kubernetes.io/instance: prole-supabase + app.kubernetes.io/instance: knoe-supabase app.kubernetes.io/managed-by: Helm spec: selector: matchLabels: - app.kubernetes.io/name: prole-supabase-studio - app.kubernetes.io/instance: prole-supabase + app.kubernetes.io/name: knoe-supabase-studio + app.kubernetes.io/instance: knoe-supabase template: metadata: labels: - app.kubernetes.io/name: prole-supabase-studio - app.kubernetes.io/instance: prole-supabase + app.kubernetes.io/name: knoe-supabase-studio + app.kubernetes.io/instance: knoe-supabase spec: serviceAccountName: supabase-studio securityContext: null containers: - - name: prole-supabase-studio + - name: knoe-supabase-studio securityContext: {} image: "supabase/studio:2026.02.16-sha-26c615c" @@ -2326,9 +2326,9 @@ spec: - name: STUDIO_PORT value: "3000" - name: SUPABASE_PUBLIC_URL - value: "https://db.prole.org" + value: "https://db.knoe.org" - name: SUPABASE_URL - value: "http://prole-supabase-prole-supabase-kong:8000" + value: "http://knoe-supabase-knoe-supabase-kong:8000" - name: STUDIO_PG_META_URL value: "http://supabase-meta:8080" @@ -2412,50 +2412,50 @@ spec: persistentVolumeClaim: claimName: supabase-snippets nodeSelector: - kubernetes.io/hostname: gandalf.prole.org - prole.org/node-role: general + kubernetes.io/hostname: gandalf.knoe.org + knoe.org/node-role: general affinity: nodeAffinity: requiredDuringSchedulingIgnoredDuringExecution: nodeSelectorTerms: - matchExpressions: - - key: prole.org/node-role + - key: knoe.org/node-role operator: In values: - general --- -# Source: prole-supabase/templates/vector/deployment.yaml +# Source: knoe-supabase/templates/vector/deployment.yaml apiVersion: apps/v1 kind: Deployment metadata: - name: prole-supabase-prole-supabase-vector + name: knoe-supabase-knoe-supabase-vector labels: - helm.sh/chart: prole-supabase-0.5.0-prole.1 + helm.sh/chart: knoe-supabase-0.5.0-knoe.1 app.kubernetes.io/name: supabase - app.kubernetes.io/instance: prole-supabase + app.kubernetes.io/instance: knoe-supabase app.kubernetes.io/managed-by: Helm vector.dev/exclude: "true" spec: selector: matchLabels: - app.kubernetes.io/name: prole-supabase-vector - app.kubernetes.io/instance: prole-supabase + app.kubernetes.io/name: knoe-supabase-vector + app.kubernetes.io/instance: knoe-supabase template: metadata: annotations: checksum/config: 9d7838a09b41cdcff2d2026f14697ae515b282dd4571fee1a0d902876df712ca labels: - app.kubernetes.io/name: prole-supabase-vector - app.kubernetes.io/instance: prole-supabase + app.kubernetes.io/name: knoe-supabase-vector + app.kubernetes.io/instance: knoe-supabase spec: - serviceAccountName: prole-supabase-prole-supabase-vector + serviceAccountName: knoe-supabase-knoe-supabase-vector securityContext: null containers: - args: - --config - /etc/vector/vector.yml - name: prole-supabase-vector + name: knoe-supabase-vector securityContext: {} image: "timberio/vector:0.53.0-alpine" @@ -2486,7 +2486,7 @@ spec: volumes: - name: vector-config configMap: - name: prole-supabase-prole-supabase-vector-config + name: knoe-supabase-knoe-supabase-vector-config defaultMode: 0777 - name: varlog hostPath: @@ -2495,60 +2495,60 @@ spec: hostPath: path: /var/lib/docker/containers nodeSelector: - kubernetes.io/hostname: gandalf.prole.org - prole.org/node-role: general + kubernetes.io/hostname: gandalf.knoe.org + knoe.org/node-role: general affinity: nodeAffinity: requiredDuringSchedulingIgnoredDuringExecution: nodeSelectorTerms: - matchExpressions: - - key: prole.org/node-role + - key: knoe.org/node-role operator: In values: - general --- -# Source: prole-supabase/templates/kong/ingress.yaml +# Source: knoe-supabase/templates/kong/ingress.yaml apiVersion: networking.k8s.io/v1 kind: Ingress metadata: - name: prole-supabase-prole-supabase-kong + name: knoe-supabase-knoe-supabase-kong labels: - helm.sh/chart: prole-supabase-0.5.0-prole.1 + helm.sh/chart: knoe-supabase-0.5.0-knoe.1 app.kubernetes.io/name: supabase - app.kubernetes.io/instance: prole-supabase + app.kubernetes.io/instance: knoe-supabase app.kubernetes.io/managed-by: Helm annotations: nginx.ingress.kubernetes.io/rewrite-target: / spec: ingressClassName: traefik rules: - - host: "db.prole.org" + - host: "db.knoe.org" http: paths: - path: / pathType: Prefix backend: service: - name: prole-supabase-prole-supabase-kong + name: knoe-supabase-knoe-supabase-kong port: number: 8000 --- -# Source: prole-supabase/templates/studio/ingress.yaml +# Source: knoe-supabase/templates/studio/ingress.yaml apiVersion: networking.k8s.io/v1 kind: Ingress metadata: name: supabase-studio labels: - helm.sh/chart: prole-supabase-0.5.0-prole.1 + helm.sh/chart: knoe-supabase-0.5.0-knoe.1 app.kubernetes.io/name: supabase - app.kubernetes.io/instance: prole-supabase + app.kubernetes.io/instance: knoe-supabase app.kubernetes.io/managed-by: Helm annotations: nginx.ingress.kubernetes.io/rewrite-target: / spec: ingressClassName: traefik rules: - - host: "db.prole.org" + - host: "db.knoe.org" http: paths: - path: / @@ -2559,15 +2559,15 @@ spec: port: number: 3000 --- -# Source: prole-supabase/templates/test/analytics.yaml +# Source: knoe-supabase/templates/test/analytics.yaml apiVersion: batch/v1 kind: Job metadata: name: supabase-test-analytics labels: - helm.sh/chart: prole-supabase-0.5.0-prole.1 + helm.sh/chart: knoe-supabase-0.5.0-knoe.1 app.kubernetes.io/name: supabase - app.kubernetes.io/instance: prole-supabase + app.kubernetes.io/instance: knoe-supabase app.kubernetes.io/managed-by: Helm annotations: "helm.sh/hook": test @@ -2588,15 +2588,15 @@ spec: echo "Sevice supabase-analytics is healthy." restartPolicy: Never --- -# Source: prole-supabase/templates/test/auth.yaml +# Source: knoe-supabase/templates/test/auth.yaml apiVersion: batch/v1 kind: Job metadata: name: supabase-test-auth labels: - helm.sh/chart: prole-supabase-0.5.0-prole.1 + helm.sh/chart: knoe-supabase-0.5.0-knoe.1 app.kubernetes.io/name: supabase - app.kubernetes.io/instance: prole-supabase + app.kubernetes.io/instance: knoe-supabase app.kubernetes.io/managed-by: Helm annotations: "helm.sh/hook": test @@ -2617,15 +2617,15 @@ spec: echo "Sevice supabase-auth is healthy." restartPolicy: Never --- -# Source: prole-supabase/templates/test/imgproxy.yaml +# Source: knoe-supabase/templates/test/imgproxy.yaml apiVersion: batch/v1 kind: Job metadata: name: supabase-test-imgproxy labels: - helm.sh/chart: prole-supabase-0.5.0-prole.1 + helm.sh/chart: knoe-supabase-0.5.0-knoe.1 app.kubernetes.io/name: supabase - app.kubernetes.io/instance: prole-supabase + app.kubernetes.io/instance: knoe-supabase app.kubernetes.io/managed-by: Helm annotations: "helm.sh/hook": test @@ -2642,19 +2642,19 @@ spec: - -c - | curl -sfo /dev/null \ - http://prole-supabase-prole-supabase-imgproxy:5001/health - echo "Sevice prole-supabase-prole-supabase-imgproxy is healthy." + http://knoe-supabase-knoe-supabase-imgproxy:5001/health + echo "Sevice knoe-supabase-knoe-supabase-imgproxy is healthy." restartPolicy: Never --- -# Source: prole-supabase/templates/test/kong.yaml +# Source: knoe-supabase/templates/test/kong.yaml apiVersion: batch/v1 kind: Job metadata: name: supabase-test-kong labels: - helm.sh/chart: prole-supabase-0.5.0-prole.1 + helm.sh/chart: knoe-supabase-0.5.0-knoe.1 app.kubernetes.io/name: supabase - app.kubernetes.io/instance: prole-supabase + app.kubernetes.io/instance: knoe-supabase app.kubernetes.io/managed-by: Helm annotations: "helm.sh/hook": test @@ -2684,20 +2684,20 @@ spec: echo "Attempting to access dashboard with provided credentials..." curl -sL --fail \ -o /dev/null \ - "http://${DASHBOARD_USERNAME}:${DASHBOARD_PASSWORD}@prole-supabase-prole-supabase-kong:8000" \ + "http://${DASHBOARD_USERNAME}:${DASHBOARD_PASSWORD}@knoe-supabase-knoe-supabase-kong:8000" \ || ( echo -e "\e[0;31mFailed to get a valid response." && exit 1 ) echo "Successfully connected." restartPolicy: Never --- -# Source: prole-supabase/templates/test/meta.yaml +# Source: knoe-supabase/templates/test/meta.yaml apiVersion: batch/v1 kind: Job metadata: name: supabase-test-meta labels: - helm.sh/chart: prole-supabase-0.5.0-prole.1 + helm.sh/chart: knoe-supabase-0.5.0-knoe.1 app.kubernetes.io/name: supabase - app.kubernetes.io/instance: prole-supabase + app.kubernetes.io/instance: knoe-supabase app.kubernetes.io/managed-by: Helm annotations: "helm.sh/hook": test @@ -2718,15 +2718,15 @@ spec: echo "Sevice supabase-meta is healthy." restartPolicy: Never --- -# Source: prole-supabase/templates/test/realtime.yaml +# Source: knoe-supabase/templates/test/realtime.yaml apiVersion: batch/v1 kind: Job metadata: name: supabase-test-realtime labels: - helm.sh/chart: prole-supabase-0.5.0-prole.1 + helm.sh/chart: knoe-supabase-0.5.0-knoe.1 app.kubernetes.io/name: supabase - app.kubernetes.io/instance: prole-supabase + app.kubernetes.io/instance: knoe-supabase app.kubernetes.io/managed-by: Helm annotations: "helm.sh/hook": test @@ -2747,15 +2747,15 @@ spec: echo "Sevice supabase-realtime is healthy." restartPolicy: Never --- -# Source: prole-supabase/templates/test/rest.yaml +# Source: knoe-supabase/templates/test/rest.yaml apiVersion: batch/v1 kind: Job metadata: name: supabase-test-rest labels: - helm.sh/chart: prole-supabase-0.5.0-prole.1 + helm.sh/chart: knoe-supabase-0.5.0-knoe.1 app.kubernetes.io/name: supabase - app.kubernetes.io/instance: prole-supabase + app.kubernetes.io/instance: knoe-supabase app.kubernetes.io/managed-by: Helm annotations: "helm.sh/hook": test @@ -2776,15 +2776,15 @@ spec: echo "Sevice supabase-rest is healthy." restartPolicy: Never --- -# Source: prole-supabase/templates/test/storage.yaml +# Source: knoe-supabase/templates/test/storage.yaml apiVersion: batch/v1 kind: Job metadata: name: supabase-test-storage labels: - helm.sh/chart: prole-supabase-0.5.0-prole.1 + helm.sh/chart: knoe-supabase-0.5.0-knoe.1 app.kubernetes.io/name: supabase - app.kubernetes.io/instance: prole-supabase + app.kubernetes.io/instance: knoe-supabase app.kubernetes.io/managed-by: Helm annotations: "helm.sh/hook": test @@ -2801,19 +2801,19 @@ spec: - -c - | curl -sfo /dev/null \ - http://prole-supabase-prole-supabase-storage:5000/status - echo "Sevice prole-supabase-prole-supabase-storage is healthy." + http://knoe-supabase-knoe-supabase-storage:5000/status + echo "Sevice knoe-supabase-knoe-supabase-storage is healthy." restartPolicy: Never --- -# Source: prole-supabase/templates/test/studio.yaml +# Source: knoe-supabase/templates/test/studio.yaml apiVersion: batch/v1 kind: Job metadata: name: supabase-test-studio labels: - helm.sh/chart: prole-supabase-0.5.0-prole.1 + helm.sh/chart: knoe-supabase-0.5.0-knoe.1 app.kubernetes.io/name: supabase - app.kubernetes.io/instance: prole-supabase + app.kubernetes.io/instance: knoe-supabase app.kubernetes.io/managed-by: Helm annotations: "helm.sh/hook": test diff --git a/tmp/supabase-render-check/values.generated.json b/tmp/supabase-render-check/values.generated.json index 0eddeb3..ca6c106 100644 --- a/tmp/supabase-render-check/values.generated.json +++ b/tmp/supabase-render-check/values.generated.json @@ -9,84 +9,84 @@ "enabled": true, "fullnameOverride": "supabase-functions", "nodeSelector": { - "kubernetes.io/hostname": "gandalf.prole.org" + "kubernetes.io/hostname": "gandalf.knoe.org" } }, "vector": { "enabled": true, "fullnameOverride": "supabase-vector", "nodeSelector": { - "kubernetes.io/hostname": "gandalf.prole.org" + "kubernetes.io/hostname": "gandalf.knoe.org" } }, "kong": { "enabled": true, "fullnameOverride": "supabase-kong", "nodeSelector": { - "kubernetes.io/hostname": "gandalf.prole.org" + "kubernetes.io/hostname": "gandalf.knoe.org" } }, "storage": { "enabled": true, "fullnameOverride": "supabase-storage", "nodeSelector": { - "kubernetes.io/hostname": "gandalf.prole.org" + "kubernetes.io/hostname": "gandalf.knoe.org" } }, "minio": { "enabled": false, "fullnameOverride": "supabase-minio", "nodeSelector": { - "kubernetes.io/hostname": "gandalf.prole.org" + "kubernetes.io/hostname": "gandalf.knoe.org" } }, "imgproxy": { "enabled": true, "fullnameOverride": "supabase-imgproxy", "nodeSelector": { - "kubernetes.io/hostname": "gandalf.prole.org" + "kubernetes.io/hostname": "gandalf.knoe.org" } }, "analytics": { "enabled": true, "fullnameOverride": "supabase-analytics", "nodeSelector": { - "kubernetes.io/hostname": "gandalf.prole.org" + "kubernetes.io/hostname": "gandalf.knoe.org" } }, "auth": { "enabled": true, "fullnameOverride": "supabase-auth", "nodeSelector": { - "kubernetes.io/hostname": "gandalf.prole.org" + "kubernetes.io/hostname": "gandalf.knoe.org" } }, "meta": { "enabled": true, "fullnameOverride": "supabase-meta", "nodeSelector": { - "kubernetes.io/hostname": "gandalf.prole.org" + "kubernetes.io/hostname": "gandalf.knoe.org" } }, "realtime": { "enabled": true, "fullnameOverride": "supabase-realtime", "nodeSelector": { - "kubernetes.io/hostname": "gandalf.prole.org" + "kubernetes.io/hostname": "gandalf.knoe.org" } }, "rest": { "enabled": true, "fullnameOverride": "supabase-rest", "nodeSelector": { - "kubernetes.io/hostname": "gandalf.prole.org" + "kubernetes.io/hostname": "gandalf.knoe.org" } }, "studio": { "enabled": true, "fullnameOverride": "supabase-studio", "nodeSelector": { - "kubernetes.io/hostname": "gandalf.prole.org" + "kubernetes.io/hostname": "gandalf.knoe.org" } } }, @@ -104,8 +104,8 @@ "DB_HOST": "knoe-db-rw.knoe-db.svc.cluster.local", "DB_PORT": "5432", "DB_SSL": "disable", - "API_EXTERNAL_URL": "https://db.prole.org", - "GOTRUE_SITE_URL": "https://db.prole.org" + "API_EXTERNAL_URL": "https://db.knoe.org", + "GOTRUE_SITE_URL": "https://db.knoe.org" }, "analytics": { "DB_HOST": "knoe-db-rw.knoe-db.svc.cluster.local", @@ -116,7 +116,7 @@ "DB_PORT": "5432" }, "studio": { - "SUPABASE_PUBLIC_URL": "https://db.prole.org" + "SUPABASE_PUBLIC_URL": "https://db.knoe.org" } }, "secret": { @@ -139,7 +139,7 @@ "className": "traefik", "hosts": [ { - "host": "db.prole.org", + "host": "db.knoe.org", "paths": [ { "path": "/", @@ -154,7 +154,7 @@ "className": "traefik", "hosts": [ { - "host": "db.prole.org", + "host": "db.knoe.org", "paths": [ { "path": "/", diff --git a/tmp/trace_namespace.sh b/tmp/trace_namespace.sh index c96afe0..d4cb0a3 100644 --- a/tmp/trace_namespace.sh +++ b/tmp/trace_namespace.sh @@ -3,10 +3,10 @@ # Run directly (not via installer) to see the raw logic. set -euo pipefail -SCRIPT_DIR="/Users/chrisfu/dev/prole/etc" -CFG_PATH="/Users/chrisfu/dev/prole/conf/service/prole.cfg" +SCRIPT_DIR="/Users/chrisfu/dev/knoe/etc" +CFG_PATH="/Users/chrisfu/dev/knoe/conf/service/knoe.cfg" -source "$SCRIPT_DIR/prole_cfg.sh" +source "$SCRIPT_DIR/knoe_cfg.sh" echo "=======================================================" echo "TRACE: init_gitlab.sh namespace resolution" @@ -17,7 +17,7 @@ echo "--- Step 1: Environment variables before any assignment ---" echo " GITLAB_NAMESPACE='${GITLAB_NAMESPACE:-}'" echo " GITOPS_NAMESPACE='${GITOPS_NAMESPACE:-}'" echo " NAMESPACE='${NAMESPACE:-}'" -echo " PROLE_MODE='${PROLE_MODE:-}'" +echo " KNOE_MODE='${KNOE_MODE:-}'" echo "" echo "--- Step 2: init_gitlab.sh line 13 assignment ---" @@ -33,21 +33,21 @@ echo " After --namespace arg: NAMESPACE='$NAMESPACE'" echo "" echo "--- Step 4: cfg-based lookup ---" echo " CFG_PATH='$CFG_PATH'" -maybe_gitlab="$(_prole_cfg_extract_key "$CFG_PATH" "GITLAB_NAMESPACE")" -maybe_gitops="$(_prole_cfg_extract_key "$CFG_PATH" "GITOPS_NAMESPACE")" -echo " _prole_cfg_extract_key GITLAB_NAMESPACE => '$maybe_gitlab'" -echo " _prole_cfg_extract_key GITOPS_NAMESPACE => '$maybe_gitops'" +maybe_gitlab="$(_knoe_cfg_extract_key "$CFG_PATH" "GITLAB_NAMESPACE")" +maybe_gitops="$(_knoe_cfg_extract_key "$CFG_PATH" "GITOPS_NAMESPACE")" +echo " _knoe_cfg_extract_key GITLAB_NAMESPACE => '$maybe_gitlab'" +echo " _knoe_cfg_extract_key GITOPS_NAMESPACE => '$maybe_gitops'" echo "" -echo "--- Step 5: prole_cfg.sh env-based lookups ---" -echo " Checking if prole_cfg.sh sets any vars..." +echo "--- Step 5: knoe_cfg.sh env-based lookups ---" +echo " Checking if knoe_cfg.sh sets any vars..." set | grep -E "^(NAMESPACE|GITLAB|GITOPS)" | sort || true echo "" echo "--- Step 6: Final NAMESPACE after all logic ---" # Apply the new fixed logic if [[ -z "$NAMESPACE" || "$NAMESPACE" == "gitlab" ]] && [[ -n "$CFG_PATH" ]]; then - cfg_gitlab="$(_prole_cfg_extract_key "$CFG_PATH" "GITLAB_NAMESPACE")" + cfg_gitlab="$(_knoe_cfg_extract_key "$CFG_PATH" "GITLAB_NAMESPACE")" [[ -n "$cfg_gitlab" ]] && NAMESPACE="$cfg_gitlab" fi NAMESPACE="${NAMESPACE:-gitlab}" diff --git a/tmp/use_recreate.sh b/tmp/use_recreate.sh index af6fb96..d6bf2d6 100644 --- a/tmp/use_recreate.sh +++ b/tmp/use_recreate.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash set -euo pipefail -export KUBECONFIG=/Users/chrisfu/dev/prole/prole-k3s.kubeconfig +export KUBECONFIG=/Users/chrisfu/dev/knoe/knoe-k3s.kubeconfig echo "==> Switching webservice + sidekiq to Recreate strategy..." && \ kubectl -n gitea patch deployment gitlab-webservice-default \ diff --git a/tmp/verify_jemalloc.sh b/tmp/verify_jemalloc.sh index 12f869c..6c6b424 100644 --- a/tmp/verify_jemalloc.sh +++ b/tmp/verify_jemalloc.sh @@ -1,8 +1,8 @@ #!/usr/bin/env bash set -euo pipefail -export KUBECONFIG=/Users/chrisfu/dev/prole/prole-k3s.kubeconfig +export KUBECONFIG=/Users/chrisfu/dev/knoe/knoe-k3s.kubeconfig -NODES=(gandalf.prole.org merlin.prole.org myrddin.prole.org pi.prole.org) +NODES=(gandalf.knoe.org merlin.knoe.org myrddin.knoe.org pi.knoe.org) for node in "${NODES[@]}"; do safe="${node//./-}" diff --git a/tmp/wait_cnpg.sh b/tmp/wait_cnpg.sh index 7b4fe11..9ea5422 100644 --- a/tmp/wait_cnpg.sh +++ b/tmp/wait_cnpg.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -export KUBECONFIG=/Users/chrisfu/dev/prole/prole-k3s.kubeconfig +export KUBECONFIG=/Users/chrisfu/dev/knoe/knoe-k3s.kubeconfig for i in $(seq 1 20); do ready=$(kubectl -n knoe-db get pods --no-headers 2>/dev/null | grep -E "knoe-db-[0-9]" | grep -c "2/2.*Running" || echo 0) @@ -12,4 +12,4 @@ echo "==> Final CNPG pods:" kubectl -n knoe-db get pods --no-headers 2>&1 | grep -E "knoe-db-[0-9]" echo "==> Installer log tail:" -tail -12 /Users/chrisfu/dev/prole/logs/install_run8.log 2>&1 +tail -12 /Users/chrisfu/dev/knoe/logs/install_run8.log 2>&1 diff --git a/tmp/wait_op_and_run.sh b/tmp/wait_op_and_run.sh index 8074d4e..4d0e411 100644 --- a/tmp/wait_op_and_run.sh +++ b/tmp/wait_op_and_run.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -export KUBECONFIG=/Users/chrisfu/dev/prole/prole-k3s.kubeconfig +export KUBECONFIG=/Users/chrisfu/dev/knoe/knoe-k3s.kubeconfig echo "Waiting for operator to be ready..." for i in $(seq 1 20); do @@ -13,10 +13,10 @@ for i in $(seq 1 20); do sleep 15 done -cd /Users/chrisfu/dev/prole +cd /Users/chrisfu/dev/knoe rm -f install.pid mkdir -p logs -nohup bash install.sh --silent -c conf/service/prole.cfg \ +nohup bash install.sh --silent -c conf/service/knoe.cfg \ > logs/install_final3.log 2>&1 & disown echo "Installer started — tail logs/install_final3.log" diff --git a/tmp/watch_convergence.sh b/tmp/watch_convergence.sh index d64857a..c4bf23f 100644 --- a/tmp/watch_convergence.sh +++ b/tmp/watch_convergence.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -export KUBECONFIG=/Users/chrisfu/dev/prole/prole-k3s.kubeconfig +export KUBECONFIG=/Users/chrisfu/dev/knoe/knoe-k3s.kubeconfig echo "==> Force-restarting registry with fresh buckets..." kubectl -n gitea delete pod -l app=registry --ignore-not-found @@ -25,4 +25,4 @@ echo "==> Final GitLab CR phase:" kubectl -n gitea get gitlab gitlab -o jsonpath='{.status.phase}' && echo echo "==> Installer run 9 tail:" -tail -5 /Users/chrisfu/dev/prole/logs/install_run9.log 2>&1 +tail -5 /Users/chrisfu/dev/knoe/logs/install_run9.log 2>&1 diff --git a/tmp/watch_gitlab_step.sh b/tmp/watch_gitlab_step.sh index c6f6618..26122ef 100644 --- a/tmp/watch_gitlab_step.sh +++ b/tmp/watch_gitlab_step.sh @@ -1,11 +1,11 @@ #!/usr/bin/env bash -export KUBECONFIG=/Users/chrisfu/dev/prole/prole-k3s.kubeconfig +export KUBECONFIG=/Users/chrisfu/dev/knoe/knoe-k3s.kubeconfig for i in $(seq 1 20); do echo "--- [$i/20] $(date -u '+%H:%M:%S') ---" # Check installer progress - last=$(tail -3 /Users/chrisfu/dev/prole/logs/install_final2.log 2>/dev/null | cat | tr '\n' ' ') + last=$(tail -3 /Users/chrisfu/dev/knoe/logs/install_final2.log 2>/dev/null | cat | tr '\n' ' ') echo " log tail: $last" # Check for gitlab namespace appearance @@ -26,4 +26,4 @@ done echo "==> Installer log — gitlab namespace lines:" grep -i "namespace.*gitlab\|gitlab.*namespace\|ns=gitlab" \ - /Users/chrisfu/dev/prole/logs/install_final2.log 2>/dev/null | cat | head -10 + /Users/chrisfu/dev/knoe/logs/install_final2.log 2>/dev/null | cat | head -10 diff --git a/update.sh b/update.sh index deaa6fb..7f315a0 100755 --- a/update.sh +++ b/update.sh @@ -1,12 +1,12 @@ #!/usr/bin/env bash -# update.sh — Apply the vault master password to all prole resources. +# update.sh — Apply the vault master password to all knoe resources. # -# Reads vault_prole_db_master_password from: +# Reads vault_knoe_db_master_password from: # infrastructure/inventory/group_vars/all/vault_db_master.yml # # Applies the password to: # - k8s secrets: knoe-db-user, knoe-db-superuser (knoe-cnpg-0, knoe-db-0) -# - PostgreSQL users: prole, postgres (via CNPG primary pod) +# - PostgreSQL users: knoe, postgres (via CNPG primary pod) # - k8s secret: prometheus-grafana (knoe-dev-0, monitoring) # - Grafana CLI reset (via grafana pod exec) # - config password fields (conf/gke.cfg, conf/service/prod.cfg) @@ -43,7 +43,7 @@ SKIP_GRAFANA=false SKIP_CFG=false VAULT_PASS_FILE="${ROOT_DIR}/.vault_pass" VAULT_FILE="${ROOT_DIR}/infrastructure/inventory/group_vars/all/vault_db_master.yml" -VAULT_KEY="vault_prole_db_master_password" +VAULT_KEY="vault_knoe_db_master_password" # Cluster contexts — override via env or auto-detect from config files APP_CTX="${APP_CLUSTER_KUBECONTEXT:-}" @@ -252,7 +252,7 @@ update_db_secrets() { run kdb create secret generic knoe-db-user \ --namespace="$DB_NS" \ - --from-literal=username=prole \ + --from-literal=username=knoe \ --from-literal=password="$pw" \ --dry-run=client -o yaml | run kdb apply -f - >/dev/null @@ -311,10 +311,10 @@ update_postgres_password() { local pw_sql="${pw//\'/\'\'}" # Rotate all LOGIN roles that use the master password: - # prole — application user (k8s secret: knoe-db-user) + # knoe — application user (k8s secret: knoe-db-user) # postgres — superuser (k8s secret: knoe-db-superuser) # knoe — schema owner of PostGIS/extensions (created in postInitSQL, - # password initially copied from prole but NOT auto-synced) + # password initially copied from knoe but NOT auto-synced) # authenticator — Supabase JWT auth role (LOGIN, no independent secret yet) # # Roles that are NOLOGIN (no rotation needed): @@ -323,7 +323,7 @@ update_postgres_password() { # Managed roles (admin, guest LOGIN) have passwords controlled by CNPG secrets — # rotate separately if/when those secrets are created. local sql=" -ALTER USER prole WITH PASSWORD '${pw_sql}'; +ALTER USER knoe WITH PASSWORD '${pw_sql}'; ALTER USER postgres WITH PASSWORD '${pw_sql}'; DO \$\$ BEGIN IF EXISTS (SELECT FROM pg_roles WHERE rolname = 'knoe') THEN @@ -338,12 +338,12 @@ END \$\$; " if [[ "$DRY_RUN" == "true" ]]; then - echo " [DRY-RUN] Would exec psql ALTER USER prole/postgres/knoe/authenticator in ${primary_pod}" + echo " [DRY-RUN] Would exec psql ALTER USER knoe/postgres/knoe/authenticator in ${primary_pod}" else echo "$sql" | kdb exec -i "$primary_pod" -n "$DB_NS" -c postgres -- \ env PGPASSWORD="$pw" psql -U postgres -d postgres \ || warn "ALTER USER via pod exec failed — DB may need a pod restart to pick up new password." - log " [DONE] PostgreSQL users rotated (prole, postgres, knoe, authenticator)." + log " [DONE] PostgreSQL users rotated (knoe, postgres, knoe, authenticator)." fi } @@ -436,11 +436,11 @@ update_grafana() { } # --------------------------------------------------------------------------- -# Step 5: Update prole.cfg password fields +# Step 5: Update knoe.cfg password fields # --------------------------------------------------------------------------- update_cfg_files() { local pw="$1" - log "Updating password fields in prole.cfg files..." + log "Updating password fields in knoe.cfg files..." # Keys to update with the plaintext password (pre-1Password era) local password_keys=( @@ -547,7 +547,7 @@ verify() { # Main # --------------------------------------------------------------------------- main() { - log "=== prole update.sh — master password rotation ===" + log "=== knoe update.sh — master password rotation ===" [[ "$DRY_RUN" == "true" ]] && log "(DRY-RUN mode — no changes will be made)" [[ "$PROMPT_MODE" == "true" ]] && log "(PROMPT mode — will recreate vault file)"