fast2dev 1.0.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- f2dev/__init__.py +1 -0
- f2dev/__main__.py +5 -0
- f2dev/_bundle/platform/.dockerignore +80 -0
- f2dev/_bundle/platform/.gitignore +82 -0
- f2dev/_bundle/platform/LICENSE +202 -0
- f2dev/_bundle/platform/charts/data_services_charts/argo_workflows/template_values.yaml +1731 -0
- f2dev/_bundle/platform/charts/data_services_charts/argo_workflows/workflow_templates/Chart.yaml +9 -0
- f2dev/_bundle/platform/charts/data_services_charts/argo_workflows/workflow_templates/files/block-airflow-deploy.yaml +60 -0
- f2dev/_bundle/platform/charts/data_services_charts/argo_workflows/workflow_templates/files/block-bi-sync.yaml +46 -0
- f2dev/_bundle/platform/charts/data_services_charts/argo_workflows/workflow_templates/files/block-checkout.yaml +49 -0
- f2dev/_bundle/platform/charts/data_services_charts/argo_workflows/workflow_templates/files/block-console-sync.yaml +41 -0
- f2dev/_bundle/platform/charts/data_services_charts/argo_workflows/workflow_templates/files/block-e2e-label.yaml +48 -0
- f2dev/_bundle/platform/charts/data_services_charts/argo_workflows/workflow_templates/files/block-e2e-run.yaml +43 -0
- f2dev/_bundle/platform/charts/data_services_charts/argo_workflows/workflow_templates/files/block-e2e-teardown.yaml +47 -0
- f2dev/_bundle/platform/charts/data_services_charts/argo_workflows/workflow_templates/files/block-governance.yaml +40 -0
- f2dev/_bundle/platform/charts/data_services_charts/argo_workflows/workflow_templates/files/block-lint.yaml +37 -0
- f2dev/_bundle/platform/charts/data_services_charts/argo_workflows/workflow_templates/files/block-notify.yaml +32 -0
- f2dev/_bundle/platform/charts/data_services_charts/argo_workflows/workflow_templates/files/block-quality.yaml +38 -0
- f2dev/_bundle/platform/charts/data_services_charts/argo_workflows/workflow_templates/files/block-refresh.yaml +36 -0
- f2dev/_bundle/platform/charts/data_services_charts/argo_workflows/workflow_templates/files/block-supersede.yaml +30 -0
- f2dev/_bundle/platform/charts/data_services_charts/argo_workflows/workflow_templates/files/block-tags.yaml +44 -0
- f2dev/_bundle/platform/charts/data_services_charts/argo_workflows/workflow_templates/files/pipeline-branch.yaml +138 -0
- f2dev/_bundle/platform/charts/data_services_charts/argo_workflows/workflow_templates/files/pipeline-main.yaml +150 -0
- f2dev/_bundle/platform/charts/data_services_charts/argo_workflows/workflow_templates/files/pipeline-pr.yaml +184 -0
- f2dev/_bundle/platform/charts/data_services_charts/argo_workflows/workflow_templates/templates/NOTES.txt +18 -0
- f2dev/_bundle/platform/charts/data_services_charts/argo_workflows/workflow_templates/templates/settings-configmap.yaml +14 -0
- f2dev/_bundle/platform/charts/data_services_charts/argo_workflows/workflow_templates/templates/workflowtemplates.yaml +31 -0
- f2dev/_bundle/platform/charts/data_services_charts/argo_workflows/workflow_templates/values.yaml +41 -0
- f2dev/_bundle/platform/charts/data_services_charts/cicd_workload_runner/github/template_github_values.yaml +436 -0
- f2dev/_bundle/platform/charts/data_services_charts/cicd_workload_runner/github/template_github_values_extra.yaml +49 -0
- f2dev/_bundle/platform/charts/data_services_charts/cicd_workload_runner/gitlab/template_gitlab_values.yaml +551 -0
- f2dev/_bundle/platform/charts/data_services_charts/cicd_workload_runner/gitlab/template_gitlab_values_extra.yaml +9 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_analysis/lightdash/template_values.yaml +359 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_analysis/metabase/template_values.yaml +384 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_analysis/superset/template_values.yaml +1562 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_analysis/template_values.yaml +269 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_control_plane/.helmignore +15 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_control_plane/Chart.yaml +20 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_control_plane/template_values.yaml.j2 +175 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_control_plane/templates/NOTES.txt +19 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_control_plane/templates/_helpers.tpl +50 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_control_plane/templates/cicd-rbac.yaml +30 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_control_plane/templates/configmap.yaml +142 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_control_plane/templates/extras.yaml +14 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_control_plane/templates/ingress.yaml +69 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_control_plane/templates/promtail-configmap.yaml +68 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_control_plane/templates/secret.yaml +31 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_control_plane/templates/service.yaml +15 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_control_plane/templates/serviceaccount.yaml +12 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_control_plane/templates/statefulset.yaml +276 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_control_plane/templates/valkey.yaml +113 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_control_plane/templates/warehouse-stats-cronjob.yaml +107 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_control_plane/values.yaml +828 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_dbt_server/template_values.yaml +385 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_governance/template_dh_prerequisites_values.yaml +118 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_governance/template_dh_values.yaml +1671 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_governance/template_kafka_values.yaml +112 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_governance/template_opensearch_values.yaml +662 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_governance/template_values.yaml +738 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_mcp_hub/hub/Chart.yaml +6 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_mcp_hub/hub/files/argo-openapi.json +681 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_mcp_hub/hub/templates/_helpers.tpl +17 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_mcp_hub/hub/templates/argo-rbac.yaml +35 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_mcp_hub/hub/templates/backends.yaml +327 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_mcp_hub/hub/templates/gateway.yaml +150 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_mcp_hub/hub/values.yaml +91 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_mcp_hub/template_values.yaml +142 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_modeling/template_values.yaml +1167 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_modeling/template_values_extra.yaml +99 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_orchestration/airflow-cleanup/Dockerfile +10 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_orchestration/airflow-cleanup/build.sh +38 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_orchestration/airflow-cleanup/cleanup.py +452 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_orchestration/airflow-cleanup/requirements.txt +3 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_orchestration/docs/keycloak-oidc-setup.md +106 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_orchestration/template_values.yaml +5536 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_orchestration/template_values_extra.yaml +379 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_orchestration/webserver-config/configmap.yaml +459 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_orchestration/webserver-config/fast2dev_auth.py +285 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_orchestration/webserver-config/fast2dev_mcp_plugin.py +24 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_orchestration/webserver-config/webserver_config.py +130 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte-cleanup/Dockerfile +10 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte-cleanup/build.sh +38 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte-cleanup/cleanup.py +749 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte-cleanup/k8s/configmap.yaml +24 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte-cleanup/k8s/cronjob.yaml +137 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte-cleanup/requirements.txt +3 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/.helmignore +26 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/Chart.lock +3 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/Chart.yaml +15 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/README.md +243 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/NOTES.txt +31 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/_helpers.tpl +245 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/_images.tpl +17 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/airbyte-auth-secret.yaml +35 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/airbyte-bootloader/bootloader-secrets.yaml +19 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/airbyte-bootloader/pod.yaml +126 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/airbyte-connector-rollout-worker/deployment.yaml +171 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/airbyte-cron/cron-secrets.yaml +19 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/airbyte-cron/deployment.yaml +149 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/airbyte-db.yaml +88 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/airbyte-direct-job-runner/_helpers.tpl +111 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/airbyte-direct-job-runner/deployment.yaml +169 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/airbyte-direct-job-runner/hpa.yaml +23 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/airbyte-direct-job-runner/pdb.yaml +17 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/airbyte-direct-job-runner/service.yaml +25 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/airbyte-direct-job-runner/serviceaccount.yaml +10 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/airbyte-featureflag-server/deployment.yaml +161 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/airbyte-featureflag-server/service.yaml +25 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/airbyte-keycloak/service.yaml +62 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/airbyte-keycloak/statefulset.yaml +182 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/airbyte-manifest-server/_helpers.tpl +54 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/airbyte-manifest-server/deployment.yaml +152 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/airbyte-manifest-server/service.yaml +23 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/airbyte-manifest-server/serviceaccount.yaml +10 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/airbyte-metrics/deployment.yaml +124 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/airbyte-server/deployment.yaml +227 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/airbyte-server/service.yaml +29 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/airbyte-stigg-sidecar/deployment.yaml +184 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/airbyte-stigg-sidecar/service.yaml +21 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/airbyte-temporal/configmap.yaml +55 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/airbyte-temporal/deployment.yaml +220 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/airbyte-temporal/service.yaml +21 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/airbyte-temporal-ui/deployment.yaml +122 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/airbyte-temporal-ui/service.yaml +23 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/airbyte-webapp/deployment.yaml +146 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/airbyte-webapp/ingress.yaml +63 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/airbyte-webapp/service.yaml +32 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/airbyte-worker/deployment.yaml +229 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/airbyte-workload-api-server/deployment.yaml +191 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/airbyte-workload-api-server/service.yaml +25 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/airbyte-workload-launcher/deployment.yaml +232 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/airbyte-workload-launcher/jobs-secrets.yaml +21 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/config/_auth.tpl +944 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/config/_aws.tpl +109 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/config/_cluster.tpl +82 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/config/_common.tpl +370 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/config/_connector.tpl +58 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/config/_connectorRollout.tpl +141 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/config/_connectorRolloutWorker.tpl +56 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/config/_cron.tpl +62 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/config/_customerio.tpl +56 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/config/_database.tpl +375 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/config/_dataplaneGroups.tpl +38 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/config/_directJobRunner.tpl +122 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/config/_featureFlags.tpl +126 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/config/_java.tpl +38 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/config/_jobs.tpl +422 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/config/_keycloak.tpl +542 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/config/_logging.tpl +38 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/config/_metrics.tpl +214 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/config/_micronaut.tpl +43 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/config/_minio.tpl +64 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/config/_secretsManager.tpl +628 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/config/_server.tpl +533 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/config/_shopify.tpl +83 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/config/_stigg.tpl +157 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/config/_storage.tpl +468 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/config/_temporal.tpl +943 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/config/_topology.tpl +98 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/config/_tracking.tpl +82 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/config/_webapp.tpl +38 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/config/_worker.tpl +366 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/config/_workloadApiServer.tpl +62 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/config/_workloadLauncher.tpl +395 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/config/_workloads.tpl +770 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/env-configmap.yaml +62 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/gcs-log-creds-secret.yaml +19 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/ingress.yaml +69 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/minio.yaml +161 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/secret.yaml +31 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/serviceaccount.yaml +50 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/telemetry-configmap.yaml +32 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/tests/test-webapp.yaml +34 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/values.yaml +3158 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte-metrics-fast2dev-ddp/.helmignore +12 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte-metrics-fast2dev-ddp/Chart.yaml +16 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte-metrics-fast2dev-ddp/README.md +172 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte-metrics-fast2dev-ddp/templates/_helpers.tpl +42 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte-metrics-fast2dev-ddp/templates/deployment.yaml +105 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte-metrics-fast2dev-ddp/templates/externalsecret.yaml +23 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte-metrics-fast2dev-ddp/templates/pdb.yaml +15 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte-metrics-fast2dev-ddp/templates/service.yaml +18 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte-metrics-fast2dev-ddp/values.yaml +97 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/feature-flags-configmap.yaml +16 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/template_metrics_values.yaml +13 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/template_oauth2proxy_values.yaml +1200 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/template_values.yaml +3255 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_streaming/seatunnel/Chart.yaml +7 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_streaming/seatunnel/conf/hazelcast-client.yaml +27 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_streaming/seatunnel/conf/hazelcast-master.yaml +38 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_streaming/seatunnel/conf/hazelcast-worker.yaml +29 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_streaming/seatunnel/conf/jvm_client_options +24 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_streaming/seatunnel/conf/jvm_master_options +6 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_streaming/seatunnel/conf/jvm_worker_options +6 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_streaming/seatunnel/conf/log4j2.properties +109 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_streaming/seatunnel/conf/seatunnel.yaml +36 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_streaming/seatunnel/templates/_helpers.tpl +70 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_streaming/seatunnel/templates/configmap.yaml +11 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_streaming/seatunnel/templates/deployment-master.yaml +120 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_streaming/seatunnel/templates/deployment-worker.yaml +118 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_streaming/seatunnel/templates/rbac.yaml +32 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_streaming/seatunnel/templates/services.yaml +33 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_streaming/seatunnel/values.yaml +101 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_streaming/template_oauth2proxy_values.yaml +196 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_streaming/template_values.yaml +75 -0
- f2dev/_bundle/platform/charts/data_services_charts/object_storage_operator/template_values.yaml +506 -0
- f2dev/_bundle/platform/charts/infra_services_charts/cert_manager/csi_driver_values.yaml +193 -0
- f2dev/_bundle/platform/charts/infra_services_charts/cert_manager/template_pdns_webhook_values.yaml +91 -0
- f2dev/_bundle/platform/charts/infra_services_charts/cert_manager/template_values.yaml +1777 -0
- f2dev/_bundle/platform/charts/infra_services_charts/cert_manager/template_values_extra.yaml +253 -0
- f2dev/_bundle/platform/charts/infra_services_charts/cluster_cleaner/template_values.yaml +57 -0
- f2dev/_bundle/platform/charts/infra_services_charts/external_dns/template_values.yaml +476 -0
- f2dev/_bundle/platform/charts/infra_services_charts/external_dns/template_values_extra.yaml +131 -0
- f2dev/_bundle/platform/charts/infra_services_charts/idp_sso_manager/realm_template.json +4785 -0
- f2dev/_bundle/platform/charts/infra_services_charts/idp_sso_manager/template_values.yaml +657 -0
- f2dev/_bundle/platform/charts/infra_services_charts/pvc_autoscaller/template_values.yaml +36 -0
- f2dev/_bundle/platform/charts/infra_services_charts/pvc_autoscaller/template_values_extra.yaml +352 -0
- f2dev/_bundle/platform/charts/infra_services_charts/secret_manager/template_values.yaml +1218 -0
- f2dev/_bundle/platform/charts/infra_services_charts/secret_manager/template_values_extra.yaml +845 -0
- f2dev/_bundle/platform/charts/infra_services_charts/secret_manager_operator/template_values.yaml +561 -0
- f2dev/_bundle/platform/charts/infra_services_charts/secret_manager_operator/template_values_extra.yaml +23 -0
- f2dev/_bundle/platform/charts/infra_services_charts/services_logs/template_alloy_events_values.yaml +59 -0
- f2dev/_bundle/platform/charts/infra_services_charts/services_logs/template_alloy_values.yaml +185 -0
- f2dev/_bundle/platform/charts/infra_services_charts/services_logs/template_loki_values.yaml +108 -0
- f2dev/_bundle/platform/charts/infra_services_charts/services_metrics/template_values.yaml +1530 -0
- f2dev/_bundle/platform/charts/infra_services_charts/services_monitoring/dashboards/00-main/.gitkeep +0 -0
- f2dev/_bundle/platform/charts/infra_services_charts/services_monitoring/dashboards/00-main/f2d-main.json +2871 -0
- f2dev/_bundle/platform/charts/infra_services_charts/services_monitoring/dashboards/01-platform/.gitkeep +0 -0
- f2dev/_bundle/platform/charts/infra_services_charts/services_monitoring/dashboards/01-platform/f2d-k8s-cluster.json +1751 -0
- f2dev/_bundle/platform/charts/infra_services_charts/services_monitoring/dashboards/01-platform/f2d-microservices.json +1682 -0
- f2dev/_bundle/platform/charts/infra_services_charts/services_monitoring/dashboards/01-platform/f2d-pvc-storage.json +1320 -0
- f2dev/_bundle/platform/charts/infra_services_charts/services_monitoring/dashboards/01-platform/f2d-service.json +1193 -0
- f2dev/_bundle/platform/charts/infra_services_charts/services_monitoring/dashboards/02-infrastructure/.gitkeep +0 -0
- f2dev/_bundle/platform/charts/infra_services_charts/services_monitoring/dashboards/02-infrastructure/f2d-cert-manager.json +755 -0
- f2dev/_bundle/platform/charts/infra_services_charts/services_monitoring/dashboards/02-infrastructure/f2d-keycloak.json +746 -0
- f2dev/_bundle/platform/charts/infra_services_charts/services_monitoring/dashboards/02-infrastructure/f2d-object-storage.json +881 -0
- f2dev/_bundle/platform/charts/infra_services_charts/services_monitoring/dashboards/02-infrastructure/f2d-postgresql.json +1590 -0
- f2dev/_bundle/platform/charts/infra_services_charts/services_monitoring/dashboards/02-infrastructure/f2d-traefik.json +1375 -0
- f2dev/_bundle/platform/charts/infra_services_charts/services_monitoring/dashboards/03-data-services/.gitkeep +0 -0
- f2dev/_bundle/platform/charts/infra_services_charts/services_monitoring/dashboards/03-data-services/f2d-cicd-workflows-trends.json +1916 -0
- f2dev/_bundle/platform/charts/infra_services_charts/services_monitoring/dashboards/03-data-services/f2d-cicd-workflows.json +1330 -0
- f2dev/_bundle/platform/charts/infra_services_charts/services_monitoring/dashboards/03-data-services/f2d-data-analysis.json +631 -0
- f2dev/_bundle/platform/charts/infra_services_charts/services_monitoring/dashboards/03-data-services/f2d-data-freshness.json +1362 -0
- f2dev/_bundle/platform/charts/infra_services_charts/services_monitoring/dashboards/03-data-services/f2d-data-governance.json +1958 -0
- f2dev/_bundle/platform/charts/infra_services_charts/services_monitoring/dashboards/03-data-services/f2d-data-modeling.json +764 -0
- f2dev/_bundle/platform/charts/infra_services_charts/services_monitoring/dashboards/03-data-services/f2d-data-orchestration-trends.json +2352 -0
- f2dev/_bundle/platform/charts/infra_services_charts/services_monitoring/dashboards/03-data-services/f2d-data-orchestration.json +1506 -0
- f2dev/_bundle/platform/charts/infra_services_charts/services_monitoring/dashboards/03-data-services/f2d-data-quality.json +1549 -0
- f2dev/_bundle/platform/charts/infra_services_charts/services_monitoring/dashboards/03-data-services/f2d-data-replication-trends.json +2799 -0
- f2dev/_bundle/platform/charts/infra_services_charts/services_monitoring/dashboards/03-data-services/f2d-data-replication.json +2153 -0
- f2dev/_bundle/platform/charts/infra_services_charts/services_monitoring/dashboards/03-data-services/f2d-data-streaming-trends.json +1536 -0
- f2dev/_bundle/platform/charts/infra_services_charts/services_monitoring/dashboards/03-data-services/f2d-data-streaming.json +1209 -0
- f2dev/_bundle/platform/charts/infra_services_charts/services_monitoring/dashboards/04-data-warehouse/.gitkeep +0 -0
- f2dev/_bundle/platform/charts/infra_services_charts/services_monitoring/dashboards/04-data-warehouse-bigquery/.gitkeep +0 -0
- f2dev/_bundle/platform/charts/infra_services_charts/services_monitoring/dashboards/04-data-warehouse-bigquery/f2d-bigquery.json +990 -0
- f2dev/_bundle/platform/charts/infra_services_charts/services_monitoring/dashboards/05-logs/.gitkeep +0 -0
- f2dev/_bundle/platform/charts/infra_services_charts/services_monitoring/dashboards/05-logs/f2d-logs.json +630 -0
- f2dev/_bundle/platform/charts/infra_services_charts/services_monitoring/dashboards/folders.yaml +17 -0
- f2dev/_bundle/platform/charts/infra_services_charts/services_monitoring/dashboards/requirements.yaml +8 -0
- f2dev/_bundle/platform/charts/infra_services_charts/services_monitoring/template_alerts_cm.yaml +2031 -0
- f2dev/_bundle/platform/charts/infra_services_charts/services_monitoring/template_values.yaml +1315 -0
- f2dev/_bundle/platform/charts/infra_services_charts/stackgres_postgres_db/template_values.yaml +550 -0
- f2dev/_bundle/platform/charts/infra_services_charts/stackgres_postgres_db/template_values_extra.yaml +742 -0
- f2dev/_bundle/platform/charts/infra_services_charts/traefik_lb/template_values.yaml +1758 -0
- f2dev/_bundle/platform/cli/README.md +866 -0
- f2dev/_bundle/platform/cli/__init__.py +42 -0
- f2dev/_bundle/platform/cli/__main__.py +17 -0
- f2dev/_bundle/platform/cli/cert_providers.py +369 -0
- f2dev/_bundle/platform/cli/command_record.py +144 -0
- f2dev/_bundle/platform/cli/config/data_services_config.json +217 -0
- f2dev/_bundle/platform/cli/config/environment_profiles.yaml +183 -0
- f2dev/_bundle/platform/cli/config/images.json +129 -0
- f2dev/_bundle/platform/cli/config/infrastructure_services_config.json +141 -0
- f2dev/_bundle/platform/cli/config.py +252 -0
- f2dev/_bundle/platform/cli/deployment_configuration_aws_example.yaml +117 -0
- f2dev/_bundle/platform/cli/deployment_configuration_gcp_example.yaml +130 -0
- f2dev/_bundle/platform/cli/deployment_configuration_onprem_example.yaml +71 -0
- f2dev/_bundle/platform/cli/destroy.py +677 -0
- f2dev/_bundle/platform/cli/dns_check.py +27 -0
- f2dev/_bundle/platform/cli/dns_providers.py +405 -0
- f2dev/_bundle/platform/cli/exit_codes.py +32 -0
- f2dev/_bundle/platform/cli/fixers.py +56 -0
- f2dev/_bundle/platform/cli/generate_only.py +336 -0
- f2dev/_bundle/platform/cli/health_report.py +114 -0
- f2dev/_bundle/platform/cli/logging.py +206 -0
- f2dev/_bundle/platform/cli/main.py +5293 -0
- f2dev/_bundle/platform/cli/precheck.py +1523 -0
- f2dev/_bundle/platform/cli/prerequisites/README.md +208 -0
- f2dev/_bundle/platform/cli/prerequisites/install-prerequisites.bat +107 -0
- f2dev/_bundle/platform/cli/prerequisites/install-prerequisites.ps1 +343 -0
- f2dev/_bundle/platform/cli/prerequisites/install-prerequisites.sh +207 -0
- f2dev/_bundle/platform/cli/prerequisites/linux/install-linux.sh +775 -0
- f2dev/_bundle/platform/cli/prerequisites/macos/install-macos.sh +634 -0
- f2dev/_bundle/platform/cli/prerequisites/requirements.txt +41 -0
- f2dev/_bundle/platform/cli/prerequisites/verify-prerequisites.ps1 +150 -0
- f2dev/_bundle/platform/cli/prerequisites/verify-prerequisites.sh +418 -0
- f2dev/_bundle/platform/cli/prerequisites/versions.yaml +43 -0
- f2dev/_bundle/platform/cli/prerequisites/windows/install-windows.ps1 +1005 -0
- f2dev/_bundle/platform/cli/restore.py +179 -0
- f2dev/_bundle/platform/cli/service_gates.py +160 -0
- f2dev/_bundle/platform/cli/state.py +332 -0
- f2dev/_bundle/platform/cli/wizard.py +782 -0
- f2dev/_bundle/platform/cli.py +235 -0
- f2dev/_bundle/platform/deployers/__init__.py +4 -0
- f2dev/_bundle/platform/deployers/base_deployer.py +8 -0
- f2dev/_bundle/platform/deployers/clouds/__init__.py +0 -0
- f2dev/_bundle/platform/deployers/clouds/aws_cloud.py +619 -0
- f2dev/_bundle/platform/deployers/clouds/azure_cloud.py +0 -0
- f2dev/_bundle/platform/deployers/clouds/google_cloud.py +785 -0
- f2dev/_bundle/platform/deployers/clouds/terragrunt_progress.py +56 -0
- f2dev/_bundle/platform/deployers/services/data_services/1.0_cicd_workload_runner.py +644 -0
- f2dev/_bundle/platform/deployers/services/data_services/12.0_control_plane.py +321 -0
- f2dev/_bundle/platform/deployers/services/data_services/13.0_data_mcp_hub.py +362 -0
- f2dev/_bundle/platform/deployers/services/data_services/2.0_object_storage_operator.py +416 -0
- f2dev/_bundle/platform/deployers/services/data_services/2.5_services_logs.py +482 -0
- f2dev/_bundle/platform/deployers/services/data_services/3.0_data_cicd_workflows.py +361 -0
- f2dev/_bundle/platform/deployers/services/data_services/4.0_data_replication.py +534 -0
- f2dev/_bundle/platform/deployers/services/data_services/4.5_data_streaming.py +303 -0
- f2dev/_bundle/platform/deployers/services/data_services/5.0_data_orchestration.py +760 -0
- f2dev/_bundle/platform/deployers/services/data_services/6.0_data_modeling.py +753 -0
- f2dev/_bundle/platform/deployers/services/data_services/7.0_data_governance.py +795 -0
- f2dev/_bundle/platform/deployers/services/data_services/8.0_data_analysis.py +587 -0
- f2dev/_bundle/platform/deployers/services/infra_services/1.0_secret_operator.py +467 -0
- f2dev/_bundle/platform/deployers/services/infra_services/10.0_cluster_pvc_autoscaller.py +500 -0
- f2dev/_bundle/platform/deployers/services/infra_services/2.0_cert_manager.py +963 -0
- f2dev/_bundle/platform/deployers/services/infra_services/3.0_external_dns.py +823 -0
- f2dev/_bundle/platform/deployers/services/infra_services/4.0_traefik_lb.py +604 -0
- f2dev/_bundle/platform/deployers/services/infra_services/5.0_stackgres_postgresql.py +652 -0
- f2dev/_bundle/platform/deployers/services/infra_services/6.0_services_metrics.py +515 -0
- f2dev/_bundle/platform/deployers/services/infra_services/7.0_services_monitoring.py +787 -0
- f2dev/_bundle/platform/deployers/services/infra_services/8.0_cluster_cleaner.py +439 -0
- f2dev/_bundle/platform/deployers/services/infra_services/9.0_idp_sso_manager.py +790 -0
- f2dev/_bundle/platform/readme.md +47 -0
- f2dev/_bundle/platform/requirements.txt +14 -0
- f2dev/_bundle/platform/terraform/aws_cloud/templates/backend.tf_template +10 -0
- f2dev/_bundle/platform/terraform/aws_cloud/templates/defaults.yaml_template +11 -0
- f2dev/_bundle/platform/terraform/aws_cloud/templates/env.yaml_template +2 -0
- f2dev/_bundle/platform/terraform/aws_cloud/templates/root.hcl_advanced_template +134 -0
- f2dev/_bundle/platform/terraform/aws_cloud/templates/root.hcl_basic_template +134 -0
- f2dev/_bundle/platform/terraform/aws_cloud/templates/terragrunt.hcl_advanced_template +134 -0
- f2dev/_bundle/platform/terraform/aws_cloud/templates/terragrunt.hcl_basic_template +134 -0
- f2dev/_bundle/platform/terraform/aws_cloud/terragrunt/01-apps-vpc/terragrunt.hcl +26 -0
- f2dev/_bundle/platform/terraform/aws_cloud/terragrunt/02-create-dns-ns-record/terragrunt.hcl +16 -0
- f2dev/_bundle/platform/terraform/aws_cloud/terragrunt/03-eks-cluster/terragrunt.hcl +21 -0
- f2dev/_bundle/platform/terraform/aws_cloud/terragrunt/04-external_dns_sa/terragrunt.hcl +28 -0
- f2dev/_bundle/platform/terraform/aws_cloud/terragrunt/bi-platform/01-apps-vpc/terragrunt.hcl +25 -0
- f2dev/_bundle/platform/terraform/aws_cloud/terragrunt/bi-platform/02-eks-cluster/terragrunt.hcl +32 -0
- f2dev/_bundle/platform/terraform/aws_cloud/terragrunt/bi-platform/03-external-dns-irsa/terragrunt.hcl +34 -0
- f2dev/_bundle/platform/terraform/aws_cloud/terragrunt/bi-platform/04-cert-manager-irsa/terragrunt.hcl +34 -0
- f2dev/_bundle/platform/terraform/aws_cloud/terragrunt/bi-platform/05-create-dns-zone/terragrunt.hcl +22 -0
- f2dev/_bundle/platform/terraform/aws_cloud/terragrunt/bi-platform/06-create-dns-ns-record/terragrunt.hcl +44 -0
- f2dev/_bundle/platform/terraform/aws_cloud/terragrunt/bi-platform/empty.yaml +1 -0
- f2dev/_bundle/platform/terraform/aws_cloud/terragrunt/empty.yaml +1 -0
- f2dev/_bundle/platform/terraform/aws_cloud/terragrunt/env.hcl +2 -0
- f2dev/_bundle/platform/terraform/azure_cloud/README.md +3 -0
- f2dev/_bundle/platform/terraform/azure_cloud/templates/_keep_structure.txt +0 -0
- f2dev/_bundle/platform/terraform/google_cloud/README.md +20 -0
- f2dev/_bundle/platform/terraform/google_cloud/templates/backend.tf_template +7 -0
- f2dev/_bundle/platform/terraform/google_cloud/templates/defaults.yaml_template +12 -0
- f2dev/_bundle/platform/terraform/google_cloud/templates/env.yaml_template +2 -0
- f2dev/_bundle/platform/terraform/google_cloud/templates/root.hcl_advanced_template +114 -0
- f2dev/_bundle/platform/terraform/google_cloud/templates/root.hcl_basic_template +116 -0
- f2dev/_bundle/platform/terraform/google_cloud/terragrunt/.gitignore +3 -0
- f2dev/_bundle/platform/terraform/google_cloud/terragrunt/bi-platform/00-create-ou-folder/terragrunt.hcl +15 -0
- f2dev/_bundle/platform/terraform/google_cloud/terragrunt/bi-platform/01-create-project/terragrunt.hcl +30 -0
- f2dev/_bundle/platform/terraform/google_cloud/terragrunt/bi-platform/02-enable-apis/terragrunt.hcl +25 -0
- f2dev/_bundle/platform/terraform/google_cloud/terragrunt/bi-platform/03-0-apps-vpc/terragrunt.hcl +134 -0
- f2dev/_bundle/platform/terraform/google_cloud/terragrunt/bi-platform/04-external-ip-traefik/terragrunt.hcl +29 -0
- f2dev/_bundle/platform/terraform/google_cloud/terragrunt/bi-platform/05-create-dns-zone/terragrunt.hcl +25 -0
- f2dev/_bundle/platform/terraform/google_cloud/terragrunt/bi-platform/06-create-dns-ns-record/terragrunt.hcl +43 -0
- f2dev/_bundle/platform/terraform/google_cloud/terragrunt/bi-platform/07-gke-cluster/terragrunt.hcl +103 -0
- f2dev/_bundle/platform/terraform/google_cloud/terragrunt/bi-platform/08-dbt_deploy_sa/terragrunt.hcl +36 -0
- f2dev/_bundle/platform/terraform/google_cloud/terragrunt/bi-platform/09-dbt_sa/terragrunt.hcl +40 -0
- f2dev/_bundle/platform/terraform/google_cloud/terragrunt/bi-platform/10-cert_manager_sa/terragrunt.hcl +34 -0
- f2dev/_bundle/platform/terraform/google_cloud/terragrunt/bi-platform/11-external_dns_sa/terragrunt.hcl +30 -0
- f2dev/_bundle/platform/terraform/google_cloud/terragrunt/bi-platform/12-monitoring_sa/terragrunt.hcl +52 -0
- f2dev/_bundle/platform/terraform/google_cloud/terragrunt/bi-platform/13-data_replication_sa/terragrunt.hcl +35 -0
- f2dev/_bundle/platform/terraform/google_cloud/terragrunt/bi-platform/14-data_orchestration_sa/terragrunt.hcl +35 -0
- f2dev/_bundle/platform/terraform/google_cloud/terragrunt/bi-platform/15-bi_data_sa/terragrunt.hcl +43 -0
- f2dev/_bundle/platform/terraform/google_cloud/terragrunt/bi-platform/16-whitelist-external-ip-on-common/terragrunt.hcl +30 -0
- f2dev/_bundle/platform/terraform/google_cloud/terragrunt/bi-platform/17-kubeconfig/terragrunt.hcl +23 -0
- f2dev/_bundle/platform/terraform/google_cloud/terragrunt/bi-platform/18-data_streaming_sa/terragrunt.hcl +24 -0
- f2dev/_bundle/platform/terraform/google_cloud/terragrunt/empty.yaml +1 -0
- f2dev/_bundle/platform/utils/__init__.py +0 -0
- f2dev/_bundle/platform/utils/customer_data_platform_repository_operator.py +1098 -0
- f2dev/_bundle/platform/utils/customer_secret_manager_operations.py +1635 -0
- f2dev/_bundle/platform/utils/environment_profiles.py +58 -0
- f2dev/_bundle/platform/utils/helm_utils.py +215 -0
- f2dev/_bundle/platform/utils/infrastructure_deployment_operator.py +1532 -0
- f2dev/_bundle/platform/utils/keycloak_realm_reconcile.py +320 -0
- f2dev/_bundle/platform/utils/kubeconfig_fixer.py +265 -0
- f2dev/_bundle/platform/utils/raw_extras.py +34 -0
- f2dev/_bundle/platform/utils/readiness.py +330 -0
- f2dev/_bundle/platform/utils/secret_structure_upgrade.py +194 -0
- f2dev/_bundle/platform/utils/templates/control_plane_warehouse_stats_template/bigquery_usage/.gitignore +7 -0
- f2dev/_bundle/platform/utils/templates/control_plane_warehouse_stats_template/bigquery_usage/README.md +33 -0
- f2dev/_bundle/platform/utils/templates/control_plane_warehouse_stats_template/bigquery_usage/analyses/.gitkeep +0 -0
- f2dev/_bundle/platform/utils/templates/control_plane_warehouse_stats_template/bigquery_usage/dbt_project.yml +52 -0
- f2dev/_bundle/platform/utils/templates/control_plane_warehouse_stats_template/bigquery_usage/macros/.gitkeep +0 -0
- f2dev/_bundle/platform/utils/templates/control_plane_warehouse_stats_template/bigquery_usage/macros/fast2dev_bq_time_zones.sql +12 -0
- f2dev/_bundle/platform/utils/templates/control_plane_warehouse_stats_template/bigquery_usage/macros/fast2dev_monitoring_grain.sql +23 -0
- f2dev/_bundle/platform/utils/templates/control_plane_warehouse_stats_template/bigquery_usage/models/marts/fast2dev_bq_daily_spend.sql +19 -0
- f2dev/_bundle/platform/utils/templates/control_plane_warehouse_stats_template/bigquery_usage/models/marts/fast2dev_bq_daily_spend.yml +25 -0
- f2dev/_bundle/platform/utils/templates/control_plane_warehouse_stats_template/bigquery_usage/models/marts/fast2dev_bq_model_costs_daily.sql +16 -0
- f2dev/_bundle/platform/utils/templates/control_plane_warehouse_stats_template/bigquery_usage/models/marts/fast2dev_bq_model_costs_daily.yml +24 -0
- f2dev/_bundle/platform/utils/templates/control_plane_warehouse_stats_template/bigquery_usage/models/marts/fast2dev_bq_storage_by_dataset.sql +12 -0
- f2dev/_bundle/platform/utils/templates/control_plane_warehouse_stats_template/bigquery_usage/models/marts/fast2dev_bq_storage_by_dataset.yml +21 -0
- f2dev/_bundle/platform/utils/templates/control_plane_warehouse_stats_template/bigquery_usage/models/marts/fast2dev_bq_user_costs_daily.sql +14 -0
- f2dev/_bundle/platform/utils/templates/control_plane_warehouse_stats_template/bigquery_usage/models/marts/fast2dev_bq_user_costs_daily.yml +22 -0
- f2dev/_bundle/platform/utils/templates/control_plane_warehouse_stats_template/bigquery_usage/models/marts/fast2dev_bq_weekly_kpi.sql +52 -0
- f2dev/_bundle/platform/utils/templates/control_plane_warehouse_stats_template/bigquery_usage/models/marts/fast2dev_bq_weekly_kpi.yml +42 -0
- f2dev/_bundle/platform/utils/templates/control_plane_warehouse_stats_template/bigquery_usage/models/marts/fast2dev_bq_weekly_spend.sql +74 -0
- f2dev/_bundle/platform/utils/templates/control_plane_warehouse_stats_template/bigquery_usage/models/marts/fast2dev_bq_weekly_spend.yml +49 -0
- f2dev/_bundle/platform/utils/templates/control_plane_warehouse_stats_template/bigquery_usage/models/sources/billing_export.yml +9 -0
- f2dev/_bundle/platform/utils/templates/control_plane_warehouse_stats_template/bigquery_usage/models/staging/fast2dev_bq_billing_export.sql +9 -0
- f2dev/_bundle/platform/utils/templates/control_plane_warehouse_stats_template/bigquery_usage/models/staging/fast2dev_bq_billing_export.yml +4 -0
- f2dev/_bundle/platform/utils/templates/control_plane_warehouse_stats_template/bigquery_usage/packages.yml +5 -0
- f2dev/_bundle/platform/utils/templates/control_plane_warehouse_stats_template/bigquery_usage/profiles.yml +15 -0
- f2dev/_bundle/platform/utils/templates/control_plane_warehouse_stats_template/bigquery_usage/scripts/run_monitoring.py +201 -0
- f2dev/_bundle/platform/utils/templates/control_plane_warehouse_stats_template/bigquery_usage/seeds/.gitkeep +0 -0
- f2dev/_bundle/platform/utils/templates/control_plane_warehouse_stats_template/bigquery_usage/snapshots/.gitkeep +0 -0
- f2dev/_bundle/platform/utils/templates/control_plane_warehouse_stats_template/bigquery_usage/tests/.gitkeep +0 -0
- f2dev/_bundle/platform/utils/templates/dry_run/gcp_sa.json +12 -0
- f2dev/_bundle/platform/utils/templates/dry_run/kubeconfig.yaml +18 -0
- f2dev/_bundle/platform/utils/templates/git_repo_templates/data_orchestrator/repository_structure/README.MD +50 -0
- f2dev/_bundle/platform/utils/templates/git_repo_templates/data_orchestrator/repository_structure/dags/dbt/README.MD +47 -0
- f2dev/_bundle/platform/utils/templates/git_repo_templates/data_orchestrator/repository_structure/dags/fast2dev_healthcheck.py_template_airflow_3.x +158 -0
- f2dev/_bundle/platform/utils/templates/git_repo_templates/dbt_data_model/bitbucket/bitbucket-pipelines.yml_template +144 -0
- f2dev/_bundle/platform/utils/templates/git_repo_templates/dbt_data_model/gitea/.gitea/PR_VALIDATION.md +52 -0
- f2dev/_bundle/platform/utils/templates/git_repo_templates/dbt_data_model/gitea/.gitea/pull_request_template.md +48 -0
- f2dev/_bundle/platform/utils/templates/git_repo_templates/dbt_data_model/gitea/.gitea/workflows/argo-workflows.yml_template +143 -0
- f2dev/_bundle/platform/utils/templates/git_repo_templates/dbt_data_model/gitea/.gitea/workflows/pr-agent.yml +30 -0
- f2dev/_bundle/platform/utils/templates/git_repo_templates/dbt_data_model/gitea/.gitea/workflows/validate-pr-description.yml +38 -0
- f2dev/_bundle/platform/utils/templates/git_repo_templates/dbt_data_model/github/.github/PR_VALIDATION.md +52 -0
- f2dev/_bundle/platform/utils/templates/git_repo_templates/dbt_data_model/github/.github/pull_request_template.md +48 -0
- f2dev/_bundle/platform/utils/templates/git_repo_templates/dbt_data_model/github/.github/workflows/argo-workflows.yml_template +143 -0
- f2dev/_bundle/platform/utils/templates/git_repo_templates/dbt_data_model/github/.github/workflows/pr-agent.yml +37 -0
- f2dev/_bundle/platform/utils/templates/git_repo_templates/dbt_data_model/github/.github/workflows/validate-pr-description.yml +157 -0
- f2dev/_bundle/platform/utils/templates/git_repo_templates/dbt_data_model/gitlab/.gitlab/PR_VALIDATION.md +43 -0
- f2dev/_bundle/platform/utils/templates/git_repo_templates/dbt_data_model/gitlab/.gitlab/merge_request_templates/Default.md +48 -0
- f2dev/_bundle/platform/utils/templates/git_repo_templates/dbt_data_model/gitlab/.gitlab-ci.yml_template +181 -0
- f2dev/_bundle/platform/utils/templates/git_repo_templates/dbt_data_model/repository_structure/.gitignore +21 -0
- f2dev/_bundle/platform/utils/templates/git_repo_templates/dbt_data_model/repository_structure/.pr_agent.toml +82 -0
- f2dev/_bundle/platform/utils/templates/git_repo_templates/dbt_data_model/repository_structure/AGENTS.md +126 -0
- f2dev/_bundle/platform/utils/templates/git_repo_templates/dbt_data_model/repository_structure/README.MD +101 -0
- f2dev/_bundle/platform/utils/templates/git_repo_templates/infrastructure_deployment_files/DR.md +341 -0
- f2dev/_bundle/platform/utils/templates/git_repo_templates/infrastructure_deployment_files/README.md.j2 +81 -0
- f2dev/_bundle/platform/utils/templates/git_repo_templates/infrastructure_deployment_files/decrypt_files.py +331 -0
- f2dev/_bundle/platform/utils/templates/git_repo_templates/infrastructure_deployment_files/encrypt_files.py +321 -0
- f2dev/_bundle/platform/utils/templates/secret_structure_template/customer_vault_structure.json +502 -0
- f2dev/_bundle/platform/utils/vault_structure_sync.py +96 -0
- f2dev/_bundle/terraform-modules/README.md +12 -0
- f2dev/_bundle/terraform-modules/aws_cloud/README.md +7 -0
- f2dev/_bundle/terraform-modules/aws_cloud/eks/addons-roles.tf +298 -0
- f2dev/_bundle/terraform-modules/aws_cloud/eks/main.tf +313 -0
- f2dev/_bundle/terraform-modules/aws_cloud/eks/outputs.tf +3 -0
- f2dev/_bundle/terraform-modules/aws_cloud/eks/policies/lb-controller-policy.json +219 -0
- f2dev/_bundle/terraform-modules/aws_cloud/eks/provider.tf +36 -0
- f2dev/_bundle/terraform-modules/aws_cloud/eks/variables.tf +107 -0
- f2dev/_bundle/terraform-modules/aws_cloud/eks/versions.tf +10 -0
- f2dev/_bundle/terraform-modules/aws_cloud/gcp_aws_zone/main.tf +25 -0
- f2dev/_bundle/terraform-modules/aws_cloud/gcp_aws_zone/provider.tf +17 -0
- f2dev/_bundle/terraform-modules/aws_cloud/gcp_aws_zone/variables.tf +41 -0
- f2dev/_bundle/terraform-modules/aws_cloud/vpc/main.tf +34 -0
- f2dev/_bundle/terraform-modules/aws_cloud/vpc/outputs.tf +44 -0
- f2dev/_bundle/terraform-modules/aws_cloud/vpc/provider.tf +12 -0
- f2dev/_bundle/terraform-modules/aws_cloud/vpc/variables.tf +118 -0
- f2dev/_bundle/terraform-modules/aws_cloud/vpc/versions.tf +10 -0
- f2dev/_bundle/terraform-modules/azure_cloud/README.md +3 -0
- f2dev/_bundle/terraform-modules/google_cloud/README.md +17 -0
- f2dev/_bundle/terraform-modules/google_cloud/artifact-registry/main.tf +8 -0
- f2dev/_bundle/terraform-modules/google_cloud/artifact-registry/providers.tf +6 -0
- f2dev/_bundle/terraform-modules/google_cloud/artifact-registry/variables.tf +17 -0
- f2dev/_bundle/terraform-modules/google_cloud/artifact-registry/versions.tf +8 -0
- f2dev/_bundle/terraform-modules/google_cloud/cloud-dns/main.tf +24 -0
- f2dev/_bundle/terraform-modules/google_cloud/cloud-dns/outputs.tf +25 -0
- f2dev/_bundle/terraform-modules/google_cloud/cloud-dns/providers.tf +7 -0
- f2dev/_bundle/terraform-modules/google_cloud/cloud-dns/variables.tf +17 -0
- f2dev/_bundle/terraform-modules/google_cloud/cloud-dns/versions.tf +9 -0
- f2dev/_bundle/terraform-modules/google_cloud/cloud-dns-recordset/main.tf +38 -0
- f2dev/_bundle/terraform-modules/google_cloud/cloud-dns-recordset/variables.tf +73 -0
- f2dev/_bundle/terraform-modules/google_cloud/cloud-dns-recordset/versions.tf +39 -0
- f2dev/_bundle/terraform-modules/google_cloud/composer/main.tf +213 -0
- f2dev/_bundle/terraform-modules/google_cloud/composer/outputs.tf +31 -0
- f2dev/_bundle/terraform-modules/google_cloud/composer/provider.tf +4 -0
- f2dev/_bundle/terraform-modules/google_cloud/composer/variables.tf +192 -0
- f2dev/_bundle/terraform-modules/google_cloud/create-ou-folder/main.tf +29 -0
- f2dev/_bundle/terraform-modules/google_cloud/create-ou-folder/output.tf +4 -0
- f2dev/_bundle/terraform-modules/google_cloud/create-ou-folder/providers.tf +6 -0
- f2dev/_bundle/terraform-modules/google_cloud/create-ou-folder/variables.tf +40 -0
- f2dev/_bundle/terraform-modules/google_cloud/create-ou-folder/versions.tf +8 -0
- f2dev/_bundle/terraform-modules/google_cloud/create-project/main.tf +18 -0
- f2dev/_bundle/terraform-modules/google_cloud/create-project/output.tf +8 -0
- f2dev/_bundle/terraform-modules/google_cloud/create-project/providers.tf +6 -0
- f2dev/_bundle/terraform-modules/google_cloud/create-project/variables.tf +27 -0
- f2dev/_bundle/terraform-modules/google_cloud/create-project/versions.tf +9 -0
- f2dev/_bundle/terraform-modules/google_cloud/deploy_sa/README.md +188 -0
- f2dev/_bundle/terraform-modules/google_cloud/deploy_sa/main.tf +135 -0
- f2dev/_bundle/terraform-modules/google_cloud/deploy_sa/output.tf +16 -0
- f2dev/_bundle/terraform-modules/google_cloud/deploy_sa/providers.tf +6 -0
- f2dev/_bundle/terraform-modules/google_cloud/deploy_sa/variables.tf +54 -0
- f2dev/_bundle/terraform-modules/google_cloud/deploy_sa/versions.tf +17 -0
- f2dev/_bundle/terraform-modules/google_cloud/enable_apis/main.tf +14 -0
- f2dev/_bundle/terraform-modules/google_cloud/enable_apis/provider.tf +7 -0
- f2dev/_bundle/terraform-modules/google_cloud/enable_apis/variables.tf +13 -0
- f2dev/_bundle/terraform-modules/google_cloud/enable_apis/versions.tf +10 -0
- f2dev/_bundle/terraform-modules/google_cloud/external-ip/README.md +89 -0
- f2dev/_bundle/terraform-modules/google_cloud/external-ip/main.tf +17 -0
- f2dev/_bundle/terraform-modules/google_cloud/external-ip/outputs.tf +19 -0
- f2dev/_bundle/terraform-modules/google_cloud/external-ip/variables.tf +43 -0
- f2dev/_bundle/terraform-modules/google_cloud/fw-add/main.tf +24 -0
- f2dev/_bundle/terraform-modules/google_cloud/fw-add/providers.tf +6 -0
- f2dev/_bundle/terraform-modules/google_cloud/fw-add/variables.tf +37 -0
- f2dev/_bundle/terraform-modules/google_cloud/fw-add/versions.tf +9 -0
- f2dev/_bundle/terraform-modules/google_cloud/gke-cluster/README.md +10 -0
- f2dev/_bundle/terraform-modules/google_cloud/gke-cluster/main.tf +459 -0
- f2dev/_bundle/terraform-modules/google_cloud/gke-cluster/outputs.tf +44 -0
- f2dev/_bundle/terraform-modules/google_cloud/gke-cluster/provider.tf +19 -0
- f2dev/_bundle/terraform-modules/google_cloud/gke-cluster/variables.tf +354 -0
- f2dev/_bundle/terraform-modules/google_cloud/gke-cluster/versions.tf +22 -0
- f2dev/_bundle/terraform-modules/google_cloud/kubeconfig/README.md +40 -0
- f2dev/_bundle/terraform-modules/google_cloud/kubeconfig/main.tf +54 -0
- f2dev/_bundle/terraform-modules/google_cloud/kubeconfig/outputs.tf +10 -0
- f2dev/_bundle/terraform-modules/google_cloud/kubeconfig/variables.tf +24 -0
- f2dev/_bundle/terraform-modules/google_cloud/kubeconfig/versions.tf +10 -0
- f2dev/_bundle/terraform-modules/google_cloud/shared-vpc/README.md +47 -0
- f2dev/_bundle/terraform-modules/google_cloud/shared-vpc/main.tf +51 -0
- f2dev/_bundle/terraform-modules/google_cloud/shared-vpc/net-address/README.md +103 -0
- f2dev/_bundle/terraform-modules/google_cloud/shared-vpc/net-address/main.tf +71 -0
- f2dev/_bundle/terraform-modules/google_cloud/shared-vpc/net-address/outputs.tf +71 -0
- f2dev/_bundle/terraform-modules/google_cloud/shared-vpc/net-address/variables.tf +82 -0
- f2dev/_bundle/terraform-modules/google_cloud/shared-vpc/net-address/versions.tf +27 -0
- f2dev/_bundle/terraform-modules/google_cloud/shared-vpc/outputs.tf +35 -0
- f2dev/_bundle/terraform-modules/google_cloud/shared-vpc/provider.tf +4 -0
- f2dev/_bundle/terraform-modules/google_cloud/shared-vpc/variables.tf +237 -0
- f2dev/_bundle/terraform-modules/oracle_cloud/README.md +3 -0
- f2dev/launcher.py +153 -0
- fast2dev-1.0.0.dist-info/METADATA +201 -0
- fast2dev-1.0.0.dist-info/RECORD +543 -0
- fast2dev-1.0.0.dist-info/WHEEL +4 -0
- fast2dev-1.0.0.dist-info/entry_points.txt +2 -0
- fast2dev-1.0.0.dist-info/licenses/LICENSE +202 -0
- fast2dev-1.0.0.dist-info/licenses/NOTICE +6 -0
|
@@ -0,0 +1,782 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Interactive prompts + input validation.
|
|
3
|
+
|
|
4
|
+
This module owns everything that asks the user a question during the
|
|
5
|
+
deployment wizard:
|
|
6
|
+
|
|
7
|
+
- :func:`validate_customer_name_strict` ā tenant-name regex
|
|
8
|
+
- :func:`questionary_validate_customer_name` ā questionary adapter
|
|
9
|
+
- :func:`safe_input` / :func:`safe_select` / :func:`safe_input_long_credential`
|
|
10
|
+
ā fall back to ``click.prompt`` when ``questionary`` is unavailable
|
|
11
|
+
- :func:`validate_and_normalize_repo_url` ā repo URL cleanup
|
|
12
|
+
- :func:`collect_basic_config` ā the main interactive setup routine
|
|
13
|
+
"""
|
|
14
|
+
|
|
15
|
+
from __future__ import annotations
|
|
16
|
+
|
|
17
|
+
import re
|
|
18
|
+
import sys
|
|
19
|
+
from urllib.parse import urlparse
|
|
20
|
+
|
|
21
|
+
import click
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
# ---------------------------------------------------------------------------
|
|
25
|
+
# Customer-name validation
|
|
26
|
+
# ---------------------------------------------------------------------------
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
def validate_customer_name_strict(customer_name: str) -> None:
|
|
30
|
+
"""Validate that customer name contains only lowercase letters and dashes.
|
|
31
|
+
|
|
32
|
+
Requirements:
|
|
33
|
+
- Only 'a'..'z' and '-'
|
|
34
|
+
- Must start and end with a letter (no leading/trailing '-')
|
|
35
|
+
- No consecutive dashes (i.e. segments separated by single '-')
|
|
36
|
+
|
|
37
|
+
Raises ``click.UsageError`` on invalid input.
|
|
38
|
+
"""
|
|
39
|
+
if not customer_name:
|
|
40
|
+
raise click.UsageError("Customer name cannot be empty")
|
|
41
|
+
if not re.match(r"^[a-z0-9-]+$", customer_name):
|
|
42
|
+
raise click.UsageError(
|
|
43
|
+
"Customer name must contain only lowercase letters, digits, and '-'"
|
|
44
|
+
)
|
|
45
|
+
if customer_name.startswith("-") or customer_name.endswith("-"):
|
|
46
|
+
raise click.UsageError("Customer name cannot start or end with '-'")
|
|
47
|
+
if "--" in customer_name:
|
|
48
|
+
raise click.UsageError("Customer name cannot contain consecutive '--'")
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
def questionary_validate_customer_name(text: str):
|
|
52
|
+
"""Adapter so questionary can call our strict validator.
|
|
53
|
+
|
|
54
|
+
Returns True on valid input; returns an error message string on
|
|
55
|
+
invalid input (questionary's validator contract).
|
|
56
|
+
"""
|
|
57
|
+
try:
|
|
58
|
+
validate_customer_name_strict(text)
|
|
59
|
+
return True
|
|
60
|
+
except click.UsageError as exc:
|
|
61
|
+
return str(exc)
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
# ---------------------------------------------------------------------------
|
|
65
|
+
# Safe input helpers (fall back to click if questionary is missing)
|
|
66
|
+
# ---------------------------------------------------------------------------
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
def _get_questionary():
|
|
70
|
+
"""Lazy import of questionary. May be None if the package is unavailable."""
|
|
71
|
+
try:
|
|
72
|
+
import questionary
|
|
73
|
+
return questionary
|
|
74
|
+
except ImportError:
|
|
75
|
+
return None
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
def customer_main_domain(customer: str, domain_name: str) -> str:
|
|
79
|
+
"""``f"{customer}.{domain_name}"`` ā the zone we manage + cert we issue."""
|
|
80
|
+
return f"{customer}.{domain_name}"
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
def masked_input(prompt: str) -> str:
|
|
84
|
+
"""Read a secret from a TTY, echoing one ``*`` per typed character.
|
|
85
|
+
|
|
86
|
+
Falls back to :func:`getpass.getpass` when stdin is not a TTY (CI,
|
|
87
|
+
piped input) so no characters leak to logs.
|
|
88
|
+
"""
|
|
89
|
+
if not sys.stdin.isatty():
|
|
90
|
+
import getpass
|
|
91
|
+
return getpass.getpass(prompt)
|
|
92
|
+
|
|
93
|
+
sys.stdout.write(prompt)
|
|
94
|
+
sys.stdout.flush()
|
|
95
|
+
fd = sys.stdin.fileno()
|
|
96
|
+
import termios, tty
|
|
97
|
+
old = termios.tcgetattr(fd)
|
|
98
|
+
try:
|
|
99
|
+
tty.setcbreak(fd)
|
|
100
|
+
chars: list[str] = []
|
|
101
|
+
while True:
|
|
102
|
+
ch = sys.stdin.read(1)
|
|
103
|
+
if ch in ("\n", "\r"):
|
|
104
|
+
sys.stdout.write("\n")
|
|
105
|
+
sys.stdout.flush()
|
|
106
|
+
return "".join(chars)
|
|
107
|
+
if ch in ("\x7f", "\x08"):
|
|
108
|
+
if chars:
|
|
109
|
+
chars.pop()
|
|
110
|
+
sys.stdout.write("\b \b")
|
|
111
|
+
sys.stdout.flush()
|
|
112
|
+
continue
|
|
113
|
+
if ch == "\x03":
|
|
114
|
+
raise KeyboardInterrupt
|
|
115
|
+
if ch == "\x04":
|
|
116
|
+
if chars:
|
|
117
|
+
sys.stdout.write("\n")
|
|
118
|
+
return "".join(chars)
|
|
119
|
+
raise EOFError
|
|
120
|
+
if ch.isprintable():
|
|
121
|
+
chars.append(ch)
|
|
122
|
+
sys.stdout.write("*")
|
|
123
|
+
sys.stdout.flush()
|
|
124
|
+
finally:
|
|
125
|
+
termios.tcsetattr(fd, termios.TCSADRAIN, old)
|
|
126
|
+
|
|
127
|
+
|
|
128
|
+
class MissingAnswer(click.ClickException):
|
|
129
|
+
"""A non-interactive run reached a question that has no answer in the config file."""
|
|
130
|
+
|
|
131
|
+
|
|
132
|
+
_NON_INTERACTIVE = False
|
|
133
|
+
|
|
134
|
+
|
|
135
|
+
def set_non_interactive(enabled: bool = True) -> None:
|
|
136
|
+
"""In non-interactive mode every question takes its default; nothing waits for a terminal."""
|
|
137
|
+
global _NON_INTERACTIVE
|
|
138
|
+
_NON_INTERACTIVE = enabled
|
|
139
|
+
|
|
140
|
+
|
|
141
|
+
def is_non_interactive() -> bool:
|
|
142
|
+
return _NON_INTERACTIVE
|
|
143
|
+
|
|
144
|
+
|
|
145
|
+
def _auto(question: str, answer, secret: bool = False):
|
|
146
|
+
shown = "<hidden>" if secret and answer else (answer if answer not in ("", None) else "<empty>")
|
|
147
|
+
click.echo(f"š¤ {question.strip()} -> {shown}")
|
|
148
|
+
return answer
|
|
149
|
+
|
|
150
|
+
|
|
151
|
+
def prompt_text(question: str, default: str = "", *, choices: list | None = None, required: bool = False) -> str:
|
|
152
|
+
"""click.prompt that answers with its default in non-interactive mode."""
|
|
153
|
+
if _NON_INTERACTIVE:
|
|
154
|
+
if required and not default:
|
|
155
|
+
raise MissingAnswer(f"Non-interactive run needs an answer for: {question.strip()} (set it in the config file)")
|
|
156
|
+
return _auto(question, default or "")
|
|
157
|
+
if choices:
|
|
158
|
+
return click.prompt(question, default=default, type=click.Choice(choices), show_choices=False)
|
|
159
|
+
return click.prompt(question, default=default or "", show_default=bool(default))
|
|
160
|
+
|
|
161
|
+
|
|
162
|
+
def masked_text(question: str) -> str:
|
|
163
|
+
"""Hidden input; empty in non-interactive mode so the caller falls back to its default."""
|
|
164
|
+
if _NON_INTERACTIVE:
|
|
165
|
+
return _auto(question, "", secret=True)
|
|
166
|
+
return masked_input(question)
|
|
167
|
+
|
|
168
|
+
|
|
169
|
+
def safe_input(prompt: str, default: str = "", validate=None, required: bool = False) -> str:
|
|
170
|
+
"""Prompt for a string; echoes typed characters, Enter submits.
|
|
171
|
+
|
|
172
|
+
``validate`` accepted for API compatibility but ignored ā downstream
|
|
173
|
+
deployers validate inputs anyway. click.prompt doesn't crash on
|
|
174
|
+
prompt_toolkit redraw the way questionary.text does in this stack.
|
|
175
|
+
"""
|
|
176
|
+
if _NON_INTERACTIVE:
|
|
177
|
+
return prompt_text(prompt, default, required=required)
|
|
178
|
+
try:
|
|
179
|
+
value = click.prompt(prompt, default=default or "", show_default=bool(default))
|
|
180
|
+
except (EOFError, KeyboardInterrupt):
|
|
181
|
+
value = default or ""
|
|
182
|
+
return value
|
|
183
|
+
|
|
184
|
+
|
|
185
|
+
def safe_select(prompt: str, choices: list, default: str | None = None) -> str:
|
|
186
|
+
"""Prompt for one of ``choices``. Uses questionary if available, else click.
|
|
187
|
+
|
|
188
|
+
In non-interactive mode returns ``default`` (or the first choice).
|
|
189
|
+
"""
|
|
190
|
+
if _NON_INTERACTIVE:
|
|
191
|
+
return _auto(prompt, default if default is not None else choices[0])
|
|
192
|
+
questionary = _get_questionary()
|
|
193
|
+
if questionary is not None:
|
|
194
|
+
result = questionary.select(prompt, choices=choices).ask()
|
|
195
|
+
return str(result) if result is not None else ""
|
|
196
|
+
return click.prompt(prompt, type=click.Choice(choices), show_choices=False)
|
|
197
|
+
|
|
198
|
+
|
|
199
|
+
def safe_input_long_credential(prompt: str, default: str = "") -> str:
|
|
200
|
+
"""Prompt for a long credential; hidden while typing with * per char."""
|
|
201
|
+
if _NON_INTERACTIVE:
|
|
202
|
+
return _auto(prompt, default, secret=True)
|
|
203
|
+
try:
|
|
204
|
+
value = masked_input(prompt)
|
|
205
|
+
except (EOFError, KeyboardInterrupt):
|
|
206
|
+
return default
|
|
207
|
+
return value if value else default
|
|
208
|
+
|
|
209
|
+
|
|
210
|
+
# ---------------------------------------------------------------------------
|
|
211
|
+
# Repo URL normalization
|
|
212
|
+
# ---------------------------------------------------------------------------
|
|
213
|
+
|
|
214
|
+
|
|
215
|
+
def validate_and_normalize_repo_url(repo_url: str, access_method: str) -> str:
|
|
216
|
+
"""Strip credentials and normalize ``repo_url`` for the chosen access method.
|
|
217
|
+
|
|
218
|
+
- For ``access_token`` / ``ssh_keys`` access the URL must be HTTPS or
|
|
219
|
+
SSH, and credentials (if any) are removed.
|
|
220
|
+
- For ``deploy_keys`` access the URL must be SSH and ``git@`` form.
|
|
221
|
+
|
|
222
|
+
Returns the normalized URL.
|
|
223
|
+
"""
|
|
224
|
+
if not repo_url:
|
|
225
|
+
return repo_url
|
|
226
|
+
url = repo_url.strip()
|
|
227
|
+
if "://" not in url and "@" not in url:
|
|
228
|
+
# Bare host/path like "github.com/org/repo" ā assume HTTPS
|
|
229
|
+
return f"https://{url}"
|
|
230
|
+
if access_method in ("access_token", "ssh_keys"):
|
|
231
|
+
# Strip any embedded user:pass@
|
|
232
|
+
parsed = urlparse(url)
|
|
233
|
+
if parsed.scheme and parsed.netloc and "@" in parsed.netloc:
|
|
234
|
+
host = parsed.netloc.split("@", 1)[1]
|
|
235
|
+
url = f"{parsed.scheme}://{host}{parsed.path}"
|
|
236
|
+
return url
|
|
237
|
+
|
|
238
|
+
|
|
239
|
+
# ---------------------------------------------------------------------------
|
|
240
|
+
# Interactive basic-config collection
|
|
241
|
+
# ---------------------------------------------------------------------------
|
|
242
|
+
|
|
243
|
+
|
|
244
|
+
PLATFORM_ENVIRONMENT_CHOICES = {
|
|
245
|
+
"Production (high availability, full resources)": "production",
|
|
246
|
+
"Development (single instances, reduced resources)": "development",
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
|
|
250
|
+
def collect_platform_environment(use_simple_input: bool = False) -> str:
|
|
251
|
+
"""Ask which environment this data platform is deployed as.
|
|
252
|
+
|
|
253
|
+
The answer selects the sizing profile of every service
|
|
254
|
+
(``cli/config/environment_profiles.yaml``).
|
|
255
|
+
"""
|
|
256
|
+
labels = list(PLATFORM_ENVIRONMENT_CHOICES)
|
|
257
|
+
question = "Select the environment of this data platform"
|
|
258
|
+
if use_simple_input or _NON_INTERACTIVE:
|
|
259
|
+
chosen = safe_select(question, labels)
|
|
260
|
+
else:
|
|
261
|
+
import questionary
|
|
262
|
+
chosen = questionary.select(f"{question}:", choices=labels).ask()
|
|
263
|
+
if chosen is None:
|
|
264
|
+
raise click.Abort()
|
|
265
|
+
return PLATFORM_ENVIRONMENT_CHOICES[chosen]
|
|
266
|
+
|
|
267
|
+
|
|
268
|
+
def collect_basic_config(use_simple_input: bool = False) -> dict:
|
|
269
|
+
"""Collect the basic configuration needed across all phases.
|
|
270
|
+
|
|
271
|
+
Asks for: customer tenant name, admin email, cloud provider,
|
|
272
|
+
project region, domain name, platform environment. Uses :func:`safe_input` /
|
|
273
|
+
:func:`safe_select` when ``use_simple_input=True`` (better for
|
|
274
|
+
pasting), otherwise falls through to the questionary-driven
|
|
275
|
+
single-key-at-a-time UI.
|
|
276
|
+
|
|
277
|
+
Returns the populated config dict. Raises ``click.Abort`` on EOF /
|
|
278
|
+
KeyboardInterrupt.
|
|
279
|
+
"""
|
|
280
|
+
config: dict = {}
|
|
281
|
+
|
|
282
|
+
click.echo("\nš Basic Configuration (needed for all phases)")
|
|
283
|
+
|
|
284
|
+
if use_simple_input:
|
|
285
|
+
config["customer"] = safe_input(
|
|
286
|
+
"Enter customer tenant name (lowercase letters and '-' only, "
|
|
287
|
+
"e.g., customer-department)",
|
|
288
|
+
validate=lambda text: validate_customer_name_strict(text) or True,
|
|
289
|
+
)
|
|
290
|
+
config["user_email"] = safe_input(
|
|
291
|
+
"Enter admin email",
|
|
292
|
+
validate=lambda text: "@" in text and len(text) <= 64,
|
|
293
|
+
)
|
|
294
|
+
config["cloud_provider"] = safe_select(
|
|
295
|
+
"Select cloud provider",
|
|
296
|
+
["gcp", "aws", "azure", "self-managed"],
|
|
297
|
+
)
|
|
298
|
+
if config["cloud_provider"] == "self-managed":
|
|
299
|
+
config["project_region"] = safe_input(
|
|
300
|
+
"Enter deployment region/location (e.g., datacenter, office)",
|
|
301
|
+
default="self-managed",
|
|
302
|
+
)
|
|
303
|
+
else:
|
|
304
|
+
config["project_region"] = safe_input(
|
|
305
|
+
"Enter project region",
|
|
306
|
+
default="us-central1",
|
|
307
|
+
)
|
|
308
|
+
config["domain_name"] = safe_input(
|
|
309
|
+
"Enter domain name (e.g., fast2.dev)",
|
|
310
|
+
validate=lambda text: len(text) > 0,
|
|
311
|
+
)
|
|
312
|
+
else:
|
|
313
|
+
# Precheck guarantees questionary is installed at this point.
|
|
314
|
+
import questionary
|
|
315
|
+
config["customer"] = questionary.text(
|
|
316
|
+
"Enter customer tenant name (lowercase letters and '-' only, "
|
|
317
|
+
"e.g., customer-department):",
|
|
318
|
+
validate=questionary_validate_customer_name,
|
|
319
|
+
).ask()
|
|
320
|
+
config["user_email"] = questionary.text(
|
|
321
|
+
"Enter admin email:",
|
|
322
|
+
validate=lambda text: "@" in text and len(text) <= 64,
|
|
323
|
+
).ask()
|
|
324
|
+
config["cloud_provider"] = questionary.select(
|
|
325
|
+
"Select cloud provider:",
|
|
326
|
+
choices=["gcp", "aws", "azure", "self-managed"],
|
|
327
|
+
).ask()
|
|
328
|
+
if config["cloud_provider"] == "self-managed":
|
|
329
|
+
config["project_region"] = questionary.text(
|
|
330
|
+
"Enter deployment region/location (e.g., datacenter, office):",
|
|
331
|
+
default="on-premises",
|
|
332
|
+
).ask()
|
|
333
|
+
else:
|
|
334
|
+
config["project_region"] = questionary.text(
|
|
335
|
+
"Enter project region:",
|
|
336
|
+
default="us-central1",
|
|
337
|
+
).ask()
|
|
338
|
+
config["domain_name"] = questionary.text(
|
|
339
|
+
"Enter domain name (e.g., fast2.dev):",
|
|
340
|
+
validate=lambda text: len(text) > 0,
|
|
341
|
+
).ask()
|
|
342
|
+
|
|
343
|
+
config["platform_environment"] = collect_platform_environment(use_simple_input)
|
|
344
|
+
|
|
345
|
+
return config
|
|
346
|
+
|
|
347
|
+
|
|
348
|
+
# ---------------------------------------------------------------------------
|
|
349
|
+
# External DNS provider selection
|
|
350
|
+
# ---------------------------------------------------------------------------
|
|
351
|
+
|
|
352
|
+
|
|
353
|
+
def collect_dns_config(
|
|
354
|
+
cloud_provider: str,
|
|
355
|
+
customer: str,
|
|
356
|
+
domain_name: str,
|
|
357
|
+
use_simple_input: bool = False,
|
|
358
|
+
) -> dict | None:
|
|
359
|
+
"""Ask the user where DNS records are managed.
|
|
360
|
+
|
|
361
|
+
Behavior depends on the chosen cloud:
|
|
362
|
+
|
|
363
|
+
- **GCP/AWS/Azure**: show the native cloud default, offer alternatives.
|
|
364
|
+
- **On-prem**: ask "is your K8s cluster ready for CoreDNS + TSIG?"
|
|
365
|
+
first; if yes, default to CoreDNS; otherwise default to PowerDNS.
|
|
366
|
+
- **Unknown cloud**: treat as on-prem.
|
|
367
|
+
|
|
368
|
+
All collected credentials are stored in the returned dict under the
|
|
369
|
+
``secrets_dns_*`` keys so the secret-publishing step (Phase 2) can
|
|
370
|
+
project them into Vault. **No plaintext credentials are ever
|
|
371
|
+
written to Helm values.**
|
|
372
|
+
|
|
373
|
+
Returns
|
|
374
|
+
-------
|
|
375
|
+
dict
|
|
376
|
+
Keys::
|
|
377
|
+
|
|
378
|
+
secrets_dns_provider: str # the chosen DnsProvider.slug
|
|
379
|
+
secrets_dns_zone: str # the zone (usually = domain_name)
|
|
380
|
+
secrets_dns_policy: str # "upsert-only" (default) or "sync"
|
|
381
|
+
secrets_dns_extra_args: list[str] # e.g. ["--cloudflare-proxied"]
|
|
382
|
+
secrets_dns_extra_args_present: bool # whether the user actually wanted them
|
|
383
|
+
# and one secrets_dns_<input_key> per DnsProviderInput declared by the
|
|
384
|
+
# chosen provider (e.g. secrets_dns_api_token for Cloudflare).
|
|
385
|
+
"""
|
|
386
|
+
import re
|
|
387
|
+
from cli.dns_providers import (
|
|
388
|
+
DnsProvider,
|
|
389
|
+
DnsProviderInput,
|
|
390
|
+
defaults_for_cloud,
|
|
391
|
+
)
|
|
392
|
+
|
|
393
|
+
default_provider, alternatives = defaults_for_cloud(cloud_provider)
|
|
394
|
+
|
|
395
|
+
# 1) pick the provider
|
|
396
|
+
if cloud_provider == "self-managed":
|
|
397
|
+
# Explain WHY we are asking. external-dns needs a DNS provider
|
|
398
|
+
# to manage records. On-prem default = CoreDNS with rfc2136+TSIG
|
|
399
|
+
# (works if the user already runs CoreDNS in-cluster with the
|
|
400
|
+
# rfc2136 plugin + a TSIG key ā no external dependency). If they
|
|
401
|
+
# don't have that set up, pick another provider (PowerDNS,
|
|
402
|
+
# Cloudflare, etc.).
|
|
403
|
+
click.echo()
|
|
404
|
+
click.echo("š” external-dns provider selection")
|
|
405
|
+
click.echo(" external-dns will manage DNS records for your")
|
|
406
|
+
click.echo(" services (e.g. *.fast2.dev). It needs to talk to")
|
|
407
|
+
click.echo(" a DNS provider. On-prem default = CoreDNS with")
|
|
408
|
+
click.echo(" rfc2136+TSIG; if you don't have that set up,")
|
|
409
|
+
click.echo(" pick another provider from the list below.")
|
|
410
|
+
click.echo()
|
|
411
|
+
ready = _confirm_yes(
|
|
412
|
+
"Is your K8s cluster ready for CoreDNS with the rfc2136 plugin + TSIG?",
|
|
413
|
+
default=True,
|
|
414
|
+
simple_input=use_simple_input,
|
|
415
|
+
)
|
|
416
|
+
if ready:
|
|
417
|
+
chosen = default_provider
|
|
418
|
+
else:
|
|
419
|
+
chosen = _pick_from_list(
|
|
420
|
+
"Pick a DNS provider (in priority order):",
|
|
421
|
+
alternatives,
|
|
422
|
+
simple_input=use_simple_input,
|
|
423
|
+
show_back=True, # ā Go back returns "<BACK>"
|
|
424
|
+
)
|
|
425
|
+
if chosen == "<BACK>":
|
|
426
|
+
return None # caller re-prompts the previous step
|
|
427
|
+
else:
|
|
428
|
+
click.echo()
|
|
429
|
+
click.echo("š” external-dns provider selection")
|
|
430
|
+
click.echo(" external-dns will manage DNS records for your")
|
|
431
|
+
click.echo(f" services on {cloud_provider.upper()}. Default:")
|
|
432
|
+
click.echo(f" {default_provider.display_name}.")
|
|
433
|
+
click.echo(" Say 'No' to pick another.")
|
|
434
|
+
click.echo()
|
|
435
|
+
chosen = _confirm_provider(
|
|
436
|
+
f"Use {default_provider.display_name} for DNS records?",
|
|
437
|
+
default_provider,
|
|
438
|
+
alternatives,
|
|
439
|
+
simple_input=use_simple_input,
|
|
440
|
+
show_back=True,
|
|
441
|
+
)
|
|
442
|
+
if chosen == "<BACK>":
|
|
443
|
+
return None
|
|
444
|
+
|
|
445
|
+
# 2) collect provider-specific inputs (credentials, etc.)
|
|
446
|
+
click.echo(f"\nš” Configuring {chosen.display_name} ({chosen.slug}) ...")
|
|
447
|
+
config: dict = {"secrets_dns_provider": chosen.slug}
|
|
448
|
+
|
|
449
|
+
for inp in chosen.required_inputs:
|
|
450
|
+
try:
|
|
451
|
+
if inp.mask:
|
|
452
|
+
value = masked_text(inp.prompt)
|
|
453
|
+
if not value:
|
|
454
|
+
value = inp.default or ""
|
|
455
|
+
else:
|
|
456
|
+
value = prompt_text(inp.prompt, default=inp.default or "")
|
|
457
|
+
except (EOFError, KeyboardInterrupt):
|
|
458
|
+
value = ""
|
|
459
|
+
if value is None or value == "":
|
|
460
|
+
value = inp.default or ""
|
|
461
|
+
config[f"secrets_dns_{inp.key}"] = value
|
|
462
|
+
if inp.help_hint:
|
|
463
|
+
click.echo(f" š” {inp.help_hint}")
|
|
464
|
+
|
|
465
|
+
config["secrets_dns_zone"] = prompt_text(
|
|
466
|
+
"Authoritative zone (e.g. mycompany.com):",
|
|
467
|
+
default=customer_main_domain(customer, domain_name),
|
|
468
|
+
)
|
|
469
|
+
default_policy = chosen.default_policy
|
|
470
|
+
policy_choices = ["upsert-only", "sync"]
|
|
471
|
+
config["secrets_dns_policy"] = prompt_text(
|
|
472
|
+
"Policy (upsert-only or sync):",
|
|
473
|
+
default=default_policy,
|
|
474
|
+
choices=policy_choices,
|
|
475
|
+
)
|
|
476
|
+
|
|
477
|
+
# 4) cloudflare-proxied is a special case ā ask only if Cloudflare
|
|
478
|
+
config["secrets_dns_extra_args_present"] = False
|
|
479
|
+
config["secrets_dns_extra_args"] = []
|
|
480
|
+
if chosen.slug == "cloudflare":
|
|
481
|
+
proxied = _confirm_yes(
|
|
482
|
+
"Enable Cloudflare proxy (orange cloud) for new records?",
|
|
483
|
+
default=False,
|
|
484
|
+
simple_input=use_simple_input,
|
|
485
|
+
)
|
|
486
|
+
if proxied:
|
|
487
|
+
config["secrets_dns_extra_args"] = ["--cloudflare-proxied"]
|
|
488
|
+
config["secrets_dns_extra_args_present"] = True
|
|
489
|
+
|
|
490
|
+
return config
|
|
491
|
+
|
|
492
|
+
|
|
493
|
+
def _confirm_yes(question: str, *, default: bool, simple_input: bool) -> bool:
|
|
494
|
+
"""Ask a yes/no question; return the answer.
|
|
495
|
+
|
|
496
|
+
click.confirm echoes the typed character and requires Enter, so the
|
|
497
|
+
user sees what they typed. Used everywhere for consistent UX.
|
|
498
|
+
"""
|
|
499
|
+
if _NON_INTERACTIVE:
|
|
500
|
+
return _auto(question, default)
|
|
501
|
+
return click.confirm(question, default=default)
|
|
502
|
+
|
|
503
|
+
|
|
504
|
+
def _pick_from_list(
|
|
505
|
+
question: str,
|
|
506
|
+
providers,
|
|
507
|
+
*,
|
|
508
|
+
simple_input: bool,
|
|
509
|
+
show_back: bool = False,
|
|
510
|
+
):
|
|
511
|
+
"""Pick one provider from a list, by display name.
|
|
512
|
+
|
|
513
|
+
Returns the DnsProvider instance, or the sentinel string
|
|
514
|
+
``"<BACK>"`` when the user picks "ā Go back" (only when
|
|
515
|
+
``show_back=True``). On EOF/cancel, defaults to the first
|
|
516
|
+
provider.
|
|
517
|
+
"""
|
|
518
|
+
BACK_SENTINEL = "<BACK>"
|
|
519
|
+
labels = [p.display_name for p in providers]
|
|
520
|
+
if show_back:
|
|
521
|
+
labels = ["ā Go back"] + labels
|
|
522
|
+
if _NON_INTERACTIVE:
|
|
523
|
+
return providers[0]
|
|
524
|
+
if not simple_input:
|
|
525
|
+
import questionary
|
|
526
|
+
chosen_label = questionary.select(question, choices=labels).ask()
|
|
527
|
+
else:
|
|
528
|
+
chosen_label = safe_select(question, labels)
|
|
529
|
+
if not chosen_label:
|
|
530
|
+
# EOF / cancel ā default to the first provider.
|
|
531
|
+
return providers[0]
|
|
532
|
+
if show_back and chosen_label == "ā Go back":
|
|
533
|
+
return BACK_SENTINEL
|
|
534
|
+
for p in providers:
|
|
535
|
+
if p.display_name == chosen_label:
|
|
536
|
+
return p
|
|
537
|
+
return providers[0]
|
|
538
|
+
|
|
539
|
+
|
|
540
|
+
def _confirm_provider(
|
|
541
|
+
question: str,
|
|
542
|
+
default_provider,
|
|
543
|
+
alternatives,
|
|
544
|
+
*,
|
|
545
|
+
simple_input: bool,
|
|
546
|
+
show_back: bool = False,
|
|
547
|
+
):
|
|
548
|
+
"""Show the default with [Y/n]; if user declines, show alternatives.
|
|
549
|
+
|
|
550
|
+
Returns the chosen provider instance, or the sentinel string
|
|
551
|
+
``"<BACK>"`` if ``show_back=True`` and the user picks "ā Go back"
|
|
552
|
+
from the alternatives list.
|
|
553
|
+
"""
|
|
554
|
+
if _confirm_yes(f"{question}", default=True, simple_input=simple_input):
|
|
555
|
+
return default_provider
|
|
556
|
+
return _pick_from_list(
|
|
557
|
+
"Pick an alternative DNS provider:",
|
|
558
|
+
alternatives,
|
|
559
|
+
simple_input=simple_input,
|
|
560
|
+
show_back=show_back,
|
|
561
|
+
)
|
|
562
|
+
|
|
563
|
+
|
|
564
|
+
|
|
565
|
+
# ---------------------------------------------------------------------------
|
|
566
|
+
# Cert-manager issuer selection
|
|
567
|
+
# ---------------------------------------------------------------------------
|
|
568
|
+
|
|
569
|
+
|
|
570
|
+
def collect_cert_manager_config(
|
|
571
|
+
cloud_provider: str,
|
|
572
|
+
customer: str,
|
|
573
|
+
domain_name: str,
|
|
574
|
+
dns_provider: str | None = None,
|
|
575
|
+
state_config: dict | None = None,
|
|
576
|
+
use_simple_input: bool = False,
|
|
577
|
+
) -> dict | None:
|
|
578
|
+
"""Ask the user which cert-manager issuer to configure.
|
|
579
|
+
|
|
580
|
+
Behavior depends on the chosen cloud and the previously-picked
|
|
581
|
+
DNS provider:
|
|
582
|
+
|
|
583
|
+
- **GCP/AWS/Azure (cloud-native)**: cert-manager uses the same
|
|
584
|
+
DNS provider as external-dns (GCP ā Cloud DNS, AWS ā Route53,
|
|
585
|
+
Azure ā Azure DNS). User is NOT prompted to pick again. Mixing
|
|
586
|
+
ACME-via-Cloudflare with a Cloud DNS-managed domain would write
|
|
587
|
+
TXT records to the wrong provider and the cert hangs.
|
|
588
|
+
- **Self-managed**: user picks DNS provider first (external-dns);
|
|
589
|
+
cert-manager is locked to the same provider. PowerDNS ā ACME
|
|
590
|
+
via cert-manager-webhook-pdns. Cloudflare ā Cloudflare DNS-01.
|
|
591
|
+
No mixing allowed.
|
|
592
|
+
|
|
593
|
+
Per-cloud on-prem default: Let's Encrypt + Cloudflare DNS-01
|
|
594
|
+
(fast2.dev is on Cloudflare). Alternatives include PowerDNS for
|
|
595
|
+
clusters where PowerDNS is authoritative.
|
|
596
|
+
|
|
597
|
+
The collected credentials land in ``state.config['secrets_cert_*']``
|
|
598
|
+
and are published to Vault by the Phase 2 secret-publishing step.
|
|
599
|
+
"""
|
|
600
|
+
import re
|
|
601
|
+
from cli.cert_providers import (
|
|
602
|
+
CertProviderInput,
|
|
603
|
+
defaults_for_cloud,
|
|
604
|
+
ALL_PROVIDERS,
|
|
605
|
+
)
|
|
606
|
+
|
|
607
|
+
# Map DNS provider slug ā cert-manager slug (forces sync).
|
|
608
|
+
# If the user picked PowerDNS for external-dns, cert-manager MUST
|
|
609
|
+
# also use PowerDNS ā otherwise ACME TXT records go to the wrong
|
|
610
|
+
# authoritative DNS and the cert hangs forever.
|
|
611
|
+
DNS_TO_CERT_SLUG = {
|
|
612
|
+
"pdns": "letsencrypt-pdns",
|
|
613
|
+
"cloudflare": "letsencrypt-cloudflare",
|
|
614
|
+
"aws": "letsencrypt-route53",
|
|
615
|
+
"azure": "letsencrypt-azure",
|
|
616
|
+
"google": "letsencrypt-google",
|
|
617
|
+
"coredns": "letsencrypt-http01", # CoreDNS has no DNS-01 plugin;
|
|
618
|
+
# fall back to HTTP-01 challenge
|
|
619
|
+
"none": "selfsigned",
|
|
620
|
+
}
|
|
621
|
+
|
|
622
|
+
# Forced sync: if external-dns picked a DNS provider, lock the
|
|
623
|
+
# cert-manager choice to the matching issuer. Skip the picker.
|
|
624
|
+
if dns_provider and dns_provider in DNS_TO_CERT_SLUG:
|
|
625
|
+
forced_slug = DNS_TO_CERT_SLUG[dns_provider]
|
|
626
|
+
chosen = next((p for p in ALL_PROVIDERS if p.slug == forced_slug), None)
|
|
627
|
+
if chosen is None:
|
|
628
|
+
# Fallback if the slug isn't in the catalog (e.g. a provider
|
|
629
|
+
# that exists for DNS but not for cert-manager).
|
|
630
|
+
chosen = defaults_for_cloud(cloud_provider)[0]
|
|
631
|
+
click.echo()
|
|
632
|
+
click.echo("š cert-manager issuer selection")
|
|
633
|
+
click.echo(f" Synced with external-dns choice ({dns_provider}):")
|
|
634
|
+
click.echo(f" {chosen.display_name}")
|
|
635
|
+
click.echo(" ACME TXT records must go to the same authoritative DNS.")
|
|
636
|
+
else:
|
|
637
|
+
default_provider, alternatives = defaults_for_cloud(cloud_provider)
|
|
638
|
+
|
|
639
|
+
# 1) pick the provider
|
|
640
|
+
if default_provider.slug == "selfsigned":
|
|
641
|
+
# Explain what cert-manager is doing before we ask. The user
|
|
642
|
+
# will see this whether they say Yes or No.
|
|
643
|
+
click.echo()
|
|
644
|
+
click.echo("š cert-manager issuer selection")
|
|
645
|
+
click.echo(" cert-manager issues certificates for the services")
|
|
646
|
+
click.echo(" you deploy (Traefik, Argo, etc.). A ClusterIssuer")
|
|
647
|
+
click.echo(" is the source-of-truth. Two main paths:")
|
|
648
|
+
click.echo(" - Self-signed: no external CA, works for dev/POC.")
|
|
649
|
+
click.echo(" - Let's Encrypt + Cloudflare DNS-01: public CA,")
|
|
650
|
+
click.echo(" requires a Cloudflare API token with Edit zone DNS.")
|
|
651
|
+
click.echo()
|
|
652
|
+
# The on-prem path is unambiguous ā no cloud default to ask about.
|
|
653
|
+
chosen = default_provider
|
|
654
|
+
else:
|
|
655
|
+
click.echo()
|
|
656
|
+
click.echo("š cert-manager issuer selection")
|
|
657
|
+
click.echo(" cert-manager will issue certificates via:")
|
|
658
|
+
click.echo(f" {default_provider.display_name}")
|
|
659
|
+
click.echo(" (production pick when your domain is in the cloud).")
|
|
660
|
+
click.echo(" Say 'No' to pick another issuer.")
|
|
661
|
+
click.echo()
|
|
662
|
+
chosen = _confirm_provider(
|
|
663
|
+
f"Use {default_provider.display_name} for cert-manager?",
|
|
664
|
+
default_provider,
|
|
665
|
+
alternatives,
|
|
666
|
+
simple_input=use_simple_input,
|
|
667
|
+
show_back=True,
|
|
668
|
+
)
|
|
669
|
+
if chosen == "<BACK>":
|
|
670
|
+
return None
|
|
671
|
+
|
|
672
|
+
# 2) collect provider-specific inputs
|
|
673
|
+
# When the cert provider was forced by an external-dns choice, the
|
|
674
|
+
# DNS credentials (api_url, api_key, api_token, etc.) were already
|
|
675
|
+
# collected in `collect_dns_config` and stored under
|
|
676
|
+
# ``secrets_dns_*``. Re-asking would be a UX bug ā silently reuse
|
|
677
|
+
# those values under the cert-manager's ``secrets_cert_*`` keys.
|
|
678
|
+
# Only the cert-specific fields (currently just ``email``) are
|
|
679
|
+
# collected here.
|
|
680
|
+
state_config = state_config or {}
|
|
681
|
+
if dns_provider and dns_provider in DNS_TO_CERT_SLUG:
|
|
682
|
+
click.echo(f"\nš Configuring {chosen.display_name} ({chosen.slug}) ...")
|
|
683
|
+
click.echo(
|
|
684
|
+
f" Reusing credentials from external-dns "
|
|
685
|
+
f"({dns_provider}). Only the cert-specific fields are asked below."
|
|
686
|
+
)
|
|
687
|
+
config: dict = {"secrets_cert_provider": chosen.slug}
|
|
688
|
+
# Carry over the DNS-collected credentials first.
|
|
689
|
+
for inp in chosen.required_inputs:
|
|
690
|
+
dns_key = f"secrets_dns_{inp.key}"
|
|
691
|
+
if dns_key in state_config and state_config[dns_key]:
|
|
692
|
+
config[f"secrets_cert_{inp.key}"] = state_config[dns_key]
|
|
693
|
+
# Then ask for anything still missing (typically just ``email``).
|
|
694
|
+
for inp in chosen.required_inputs:
|
|
695
|
+
if f"secrets_cert_{inp.key}" in config:
|
|
696
|
+
continue # already carried over from DNS step
|
|
697
|
+
try:
|
|
698
|
+
if inp.mask:
|
|
699
|
+
value = masked_text(inp.prompt)
|
|
700
|
+
if not value:
|
|
701
|
+
value = inp.default or ""
|
|
702
|
+
else:
|
|
703
|
+
value = prompt_text(inp.prompt, default=inp.default or "")
|
|
704
|
+
except (EOFError, KeyboardInterrupt):
|
|
705
|
+
value = inp.default or ""
|
|
706
|
+
if value is None or value == "":
|
|
707
|
+
value = inp.default or ""
|
|
708
|
+
config[f"secrets_cert_{inp.key}"] = value
|
|
709
|
+
if inp.help_hint:
|
|
710
|
+
click.echo(f" š” {inp.help_hint}")
|
|
711
|
+
else:
|
|
712
|
+
click.echo(f"\nš Configuring {chosen.display_name} ({chosen.slug}) ...")
|
|
713
|
+
config: dict = {"secrets_cert_provider": chosen.slug}
|
|
714
|
+
|
|
715
|
+
for inp in chosen.required_inputs:
|
|
716
|
+
try:
|
|
717
|
+
if inp.mask:
|
|
718
|
+
value = masked_text(inp.prompt)
|
|
719
|
+
if not value:
|
|
720
|
+
value = inp.default or ""
|
|
721
|
+
else:
|
|
722
|
+
value = prompt_text(inp.prompt, default=inp.default or "")
|
|
723
|
+
except (EOFError, KeyboardInterrupt):
|
|
724
|
+
value = inp.default or ""
|
|
725
|
+
if value is None or value == "":
|
|
726
|
+
value = inp.default or ""
|
|
727
|
+
config[f"secrets_cert_{inp.key}"] = value
|
|
728
|
+
if inp.help_hint:
|
|
729
|
+
click.echo(f" š” {inp.help_hint}")
|
|
730
|
+
|
|
731
|
+
# 3) provider-agnostic ā staging vs production
|
|
732
|
+
if chosen.slug.startswith("letsencrypt"):
|
|
733
|
+
# The cert domain is the DNS provider's authoritative zone, NOT
|
|
734
|
+
# the root domain. PowerDNS often manages a delegated child
|
|
735
|
+
# zone (e.g. data.fast2.dev) ā issuing a cert for the root
|
|
736
|
+
# fast2.dev would point ACME TXT records at the wrong zone.
|
|
737
|
+
# Fall back to the root domain only when no DNS zone is set.
|
|
738
|
+
cert_domain = customer_main_domain(customer, domain_name)
|
|
739
|
+
|
|
740
|
+
# Explain staging. The staging server issues fake certs that
|
|
741
|
+
# don't work in browsers, but it has no rate limits. Use it to
|
|
742
|
+
# test the wiring without burning through the production rate
|
|
743
|
+
# limit. ALWAYS say No for production.
|
|
744
|
+
click.echo()
|
|
745
|
+
click.echo(" š” STAGING = Let's Encrypt fake-test server")
|
|
746
|
+
click.echo(" (no rate limits; certs not trusted by browsers).")
|
|
747
|
+
click.echo(" PRODUCTION = real public CA (rate-limited).")
|
|
748
|
+
click.echo()
|
|
749
|
+
config["secrets_cert_staging"] = (
|
|
750
|
+
"true" if _confirm_yes(
|
|
751
|
+
"Use Let's Encrypt STAGING server (for testing)?",
|
|
752
|
+
default=False,
|
|
753
|
+
simple_input=use_simple_input,
|
|
754
|
+
) else "false"
|
|
755
|
+
)
|
|
756
|
+
|
|
757
|
+
# 3b) Wildcard vs single-name. Wildcard needs DNS-01 challenge,
|
|
758
|
+
# which all the Let's Encrypt providers in this catalog support.
|
|
759
|
+
# For self-signed we skip this (it doesn't make sense).
|
|
760
|
+
click.echo()
|
|
761
|
+
click.echo(" š” Wildcard cert (e.g. *." + cert_domain + ") covers")
|
|
762
|
+
click.echo(" ALL subdomains with one cert. Single-name only")
|
|
763
|
+
click.echo(" covers the bare domain. Most prod deployments use")
|
|
764
|
+
click.echo(" wildcards so every service gets HTTPS automatically.")
|
|
765
|
+
click.echo()
|
|
766
|
+
config["secrets_cert_wildcard"] = (
|
|
767
|
+
"true" if _confirm_yes(
|
|
768
|
+
f"Issue a WILDCARD cert (e.g. *.{cert_domain})?",
|
|
769
|
+
default=True,
|
|
770
|
+
simple_input=use_simple_input,
|
|
771
|
+
) else "false"
|
|
772
|
+
)
|
|
773
|
+
|
|
774
|
+
# 3c) Compute the SAN list (dnsNames). Wildcard takes the
|
|
775
|
+
# *.<domain> form; non-wildcard takes the bare domain. The
|
|
776
|
+
# user can add more later by editing the rendered Certificate.
|
|
777
|
+
if config["secrets_cert_wildcard"] == "true":
|
|
778
|
+
config["secrets_cert_san"] = [f"*.{cert_domain}", cert_domain]
|
|
779
|
+
else:
|
|
780
|
+
config["secrets_cert_san"] = [cert_domain]
|
|
781
|
+
|
|
782
|
+
return config
|