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,330 @@
|
|
|
1
|
+
"""Readiness checks the installer runs before it marks a service as deployed.
|
|
2
|
+
|
|
3
|
+
Two kinds of checks:
|
|
4
|
+
|
|
5
|
+
* gates -- things the next services need (Vault mount, DB users, CRDs, webhooks, issuers).
|
|
6
|
+
They are polled with a short timeout and raise ``GateError`` with the reason.
|
|
7
|
+
States that do not recover by waiting (CrashLoopBackOff after several restarts,
|
|
8
|
+
image pull errors, failed Jobs, ExternalSecrets that keep failing) raise early.
|
|
9
|
+
* eventual -- things that converge on their own and are only reported (certificates, DNS).
|
|
10
|
+
See ``cli/health_report.py``.
|
|
11
|
+
"""
|
|
12
|
+
from __future__ import annotations
|
|
13
|
+
|
|
14
|
+
import json
|
|
15
|
+
import subprocess
|
|
16
|
+
import time
|
|
17
|
+
from typing import Callable
|
|
18
|
+
|
|
19
|
+
from utils.helm_utils import generate_only
|
|
20
|
+
|
|
21
|
+
KUBECTL_TIMEOUT_S = 30
|
|
22
|
+
POLL_S = 5
|
|
23
|
+
|
|
24
|
+
# How long a bad state may persist before it is treated as final.
|
|
25
|
+
CRASHLOOP_RESTARTS = 4
|
|
26
|
+
IMAGE_PULL_GRACE_S = 300
|
|
27
|
+
CONFIG_ERROR_GRACE_S = 180
|
|
28
|
+
EXTERNAL_SECRET_GRACE_S = 180
|
|
29
|
+
|
|
30
|
+
BAD_WAIT_REASONS_IMAGE = {"ImagePullBackOff", "ErrImagePull", "InvalidImageName"}
|
|
31
|
+
BAD_WAIT_REASONS_CONFIG = {"CreateContainerConfigError", "CreateContainerError"}
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
class GateError(Exception):
|
|
35
|
+
"""A readiness gate failed; the message names what is wrong."""
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
# --------------------------------------------------------------------------- kubectl
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
def kubectl(args: list[str], kubeconfig: str | None, timeout: int = KUBECTL_TIMEOUT_S,
|
|
42
|
+
stdin: str | None = None) -> subprocess.CompletedProcess:
|
|
43
|
+
base = ["kubectl", "--kubeconfig", kubeconfig] if kubeconfig else ["kubectl"]
|
|
44
|
+
try:
|
|
45
|
+
return subprocess.run([*base, *args], capture_output=True, text=True, timeout=timeout, input=stdin)
|
|
46
|
+
except subprocess.TimeoutExpired:
|
|
47
|
+
return subprocess.CompletedProcess(args, 124, "", "kubectl timed out")
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
def get_json(args: list[str], kubeconfig: str | None) -> dict | None:
|
|
51
|
+
"""``kubectl get ... -o json``; None when the call fails (missing CRD, API hiccup)."""
|
|
52
|
+
res = kubectl([*args, "-o", "json"], kubeconfig)
|
|
53
|
+
if res.returncode != 0:
|
|
54
|
+
return None
|
|
55
|
+
try:
|
|
56
|
+
return json.loads(res.stdout)
|
|
57
|
+
except ValueError:
|
|
58
|
+
return None
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
def items(args: list[str], kubeconfig: str | None) -> list[dict]:
|
|
62
|
+
data = get_json(args, kubeconfig)
|
|
63
|
+
return (data or {}).get("items", [])
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
def condition(obj: dict, ctype: str) -> dict | None:
|
|
67
|
+
for cond in (obj.get("status") or {}).get("conditions") or []:
|
|
68
|
+
if cond.get("type") == ctype:
|
|
69
|
+
return cond
|
|
70
|
+
return None
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
def api_proxy_get(namespace: str, service: str, port: str | int, path: str,
|
|
74
|
+
kubeconfig: str | None) -> tuple[bool, str]:
|
|
75
|
+
"""GET a cluster Service through the API server proxy (no tools needed in the pod)."""
|
|
76
|
+
raw = f"/api/v1/namespaces/{namespace}/services/{service}:{port}/proxy/{path.lstrip('/')}"
|
|
77
|
+
res = kubectl(["get", "--raw", raw], kubeconfig)
|
|
78
|
+
return res.returncode == 0, (res.stdout if res.returncode == 0 else res.stderr).strip()
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
ERROR_MARKERS = ("ERROR", "FATAL", "Error:", "error:", "Exception:", "Traceback", "panic:", "fatal:")
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
def log_tail(namespace: str, pod: str, container: str | None, kubeconfig: str | None,
|
|
85
|
+
previous: bool = False, lines: int = 80) -> str:
|
|
86
|
+
"""The error lines of the last ``lines`` log lines, or the last 10 lines when none match."""
|
|
87
|
+
args = ["logs", pod, "-n", namespace, f"--tail={lines}"]
|
|
88
|
+
if container:
|
|
89
|
+
args += ["-c", container]
|
|
90
|
+
if previous:
|
|
91
|
+
args.append("--previous")
|
|
92
|
+
res = kubectl(args, kubeconfig)
|
|
93
|
+
text = (res.stdout or res.stderr).strip()
|
|
94
|
+
all_lines = text.splitlines()
|
|
95
|
+
errors = [ln for ln in all_lines if any(m in ln for m in ERROR_MARKERS) and not ln.lstrip().startswith("at ")]
|
|
96
|
+
return "\n".join((errors or all_lines)[-10:])
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
# --------------------------------------------------------------------------- polling
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
def wait_until(check: Callable[[], tuple[bool, str]], timeout_s: int, what: str,
|
|
103
|
+
log: Callable[[str], None] = print) -> str:
|
|
104
|
+
"""Poll ``check`` until it reports done. ``check`` may raise GateError to stop early."""
|
|
105
|
+
if generate_only():
|
|
106
|
+
return "skipped (generate-only)"
|
|
107
|
+
deadline = time.monotonic() + timeout_s
|
|
108
|
+
last = ""
|
|
109
|
+
announced = 0.0
|
|
110
|
+
while True:
|
|
111
|
+
done, detail = check()
|
|
112
|
+
if done:
|
|
113
|
+
return detail
|
|
114
|
+
if detail != last or time.monotonic() - announced > 60:
|
|
115
|
+
log(f" ⏳ {what}: {detail}")
|
|
116
|
+
announced = time.monotonic()
|
|
117
|
+
last = detail
|
|
118
|
+
if time.monotonic() >= deadline:
|
|
119
|
+
raise GateError(f"{what} not ready after {timeout_s}s: {detail}")
|
|
120
|
+
time.sleep(POLL_S)
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
# --------------------------------------------------------------------------- namespace checks
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
def _workload_status(namespace: str, kubeconfig: str | None) -> list[str]:
|
|
127
|
+
"""Names of Deployments/StatefulSets/DaemonSets that are not fully ready."""
|
|
128
|
+
pending = []
|
|
129
|
+
for kind in ("deployments", "statefulsets"):
|
|
130
|
+
for obj in items(["get", kind, "-n", namespace], kubeconfig):
|
|
131
|
+
want = (obj.get("spec") or {}).get("replicas", 1)
|
|
132
|
+
st = obj.get("status") or {}
|
|
133
|
+
ready = st.get("readyReplicas", 0) or 0
|
|
134
|
+
if want and ready < want:
|
|
135
|
+
pending.append(f"{kind[:-1]}/{obj['metadata']['name']} {ready}/{want}")
|
|
136
|
+
for obj in items(["get", "daemonsets", "-n", namespace], kubeconfig):
|
|
137
|
+
st = obj.get("status") or {}
|
|
138
|
+
want, ready = st.get("desiredNumberScheduled", 0), st.get("numberReady", 0)
|
|
139
|
+
if ready < want:
|
|
140
|
+
pending.append(f"daemonset/{obj['metadata']['name']} {ready}/{want}")
|
|
141
|
+
return pending
|
|
142
|
+
|
|
143
|
+
|
|
144
|
+
def _pod_failures(namespace: str, kubeconfig: str | None, now: float) -> list[str]:
|
|
145
|
+
"""Pods in a state that waiting will not fix, with their reason and log tail."""
|
|
146
|
+
failures = []
|
|
147
|
+
for pod in items(["get", "pods", "-n", namespace], kubeconfig):
|
|
148
|
+
name = pod["metadata"]["name"]
|
|
149
|
+
owners = [o.get("kind") for o in pod["metadata"].get("ownerReferences") or []]
|
|
150
|
+
if "Job" in owners:
|
|
151
|
+
continue # judged through the Job
|
|
152
|
+
statuses = (pod.get("status") or {}).get("containerStatuses") or []
|
|
153
|
+
statuses += (pod.get("status") or {}).get("initContainerStatuses") or []
|
|
154
|
+
for cs in statuses:
|
|
155
|
+
waiting = (cs.get("state") or {}).get("waiting") or {}
|
|
156
|
+
reason = waiting.get("reason", "")
|
|
157
|
+
restarts = cs.get("restartCount", 0)
|
|
158
|
+
started = pod["metadata"].get("creationTimestamp", "")
|
|
159
|
+
age = now - _ts(started) if started else 0
|
|
160
|
+
if reason == "CrashLoopBackOff" and restarts >= CRASHLOOP_RESTARTS:
|
|
161
|
+
tail = log_tail(namespace, name, cs["name"], kubeconfig, previous=True)
|
|
162
|
+
failures.append(f"pod {name} container {cs['name']} CrashLoopBackOff "
|
|
163
|
+
f"({restarts} restarts). Last log lines:\n{_indent(tail)}")
|
|
164
|
+
elif reason in BAD_WAIT_REASONS_IMAGE and age > IMAGE_PULL_GRACE_S:
|
|
165
|
+
failures.append(f"pod {name} container {cs['name']} {reason}: {waiting.get('message', '')}")
|
|
166
|
+
elif reason in BAD_WAIT_REASONS_CONFIG and age > CONFIG_ERROR_GRACE_S:
|
|
167
|
+
failures.append(f"pod {name} container {cs['name']} {reason}: {waiting.get('message', '')}")
|
|
168
|
+
return failures
|
|
169
|
+
|
|
170
|
+
|
|
171
|
+
def _job_failures(namespace: str, kubeconfig: str | None, since: float | None = None) -> list[str]:
|
|
172
|
+
"""Failed Jobs of this run. CronJob runs and Jobs created before ``since`` are ignored."""
|
|
173
|
+
failures = []
|
|
174
|
+
for job in items(["get", "jobs", "-n", namespace], kubeconfig):
|
|
175
|
+
owners = [o.get("kind") for o in job["metadata"].get("ownerReferences") or []]
|
|
176
|
+
if "CronJob" in owners:
|
|
177
|
+
continue
|
|
178
|
+
if since and _ts(job["metadata"].get("creationTimestamp", "")) < since - 60:
|
|
179
|
+
continue
|
|
180
|
+
cond = condition(job, "Failed")
|
|
181
|
+
if cond and cond.get("status") == "True":
|
|
182
|
+
name = job["metadata"]["name"]
|
|
183
|
+
pods = items(["get", "pods", "-n", namespace, "-l", f"job-name={name}"], kubeconfig)
|
|
184
|
+
tail = log_tail(namespace, pods[-1]["metadata"]["name"], None, kubeconfig) if pods else ""
|
|
185
|
+
failures.append(f"job {name} failed ({cond.get('reason', '')}: {cond.get('message', '')})."
|
|
186
|
+
+ (f" Last log lines:\n{_indent(tail)}" if tail else ""))
|
|
187
|
+
return failures
|
|
188
|
+
|
|
189
|
+
|
|
190
|
+
def _external_secret_status(namespace: str, kubeconfig: str | None, now: float) -> tuple[list[str], list[str]]:
|
|
191
|
+
"""(not yet synced, failing past the grace period)."""
|
|
192
|
+
waiting, failing = [], []
|
|
193
|
+
for es in items(["get", "externalsecrets.external-secrets.io", "-n", namespace], kubeconfig):
|
|
194
|
+
name = es["metadata"]["name"]
|
|
195
|
+
cond = condition(es, "Ready")
|
|
196
|
+
if cond and cond.get("status") == "True":
|
|
197
|
+
continue
|
|
198
|
+
msg = (cond or {}).get("message", "not synced yet")
|
|
199
|
+
since = _ts((cond or {}).get("lastTransitionTime") or es["metadata"].get("creationTimestamp", ""))
|
|
200
|
+
if cond and cond.get("reason") == "SecretSyncedError" and now - since > EXTERNAL_SECRET_GRACE_S:
|
|
201
|
+
failing.append(f"externalsecret {name}: {msg}")
|
|
202
|
+
else:
|
|
203
|
+
waiting.append(f"externalsecret {name}")
|
|
204
|
+
return waiting, failing
|
|
205
|
+
|
|
206
|
+
|
|
207
|
+
def wait_namespace_converged(namespace: str, kubeconfig: str | None, timeout_s: int = 1200,
|
|
208
|
+
log: Callable[[str], None] = print, since: float | None = None) -> None:
|
|
209
|
+
"""Every workload ready, every ExternalSecret synced, no failed Jobs or broken pods.
|
|
210
|
+
|
|
211
|
+
Pending pods (waiting for the cluster autoscaler) count as waiting, not failing; the
|
|
212
|
+
timeout is long enough for a node pool scale-up.
|
|
213
|
+
"""
|
|
214
|
+
def check() -> tuple[bool, str]:
|
|
215
|
+
now = time.time()
|
|
216
|
+
failures = _pod_failures(namespace, kubeconfig, now) + _job_failures(namespace, kubeconfig, since)
|
|
217
|
+
es_waiting, es_failing = _external_secret_status(namespace, kubeconfig, now)
|
|
218
|
+
failures += es_failing
|
|
219
|
+
if failures:
|
|
220
|
+
raise GateError(f"namespace {namespace}:\n - " + "\n - ".join(failures))
|
|
221
|
+
pending = _workload_status(namespace, kubeconfig) + es_waiting
|
|
222
|
+
return (not pending), ", ".join(pending) or "ready"
|
|
223
|
+
|
|
224
|
+
wait_until(check, timeout_s, f"namespace {namespace}", log)
|
|
225
|
+
|
|
226
|
+
|
|
227
|
+
# --------------------------------------------------------------------------- specific gates
|
|
228
|
+
|
|
229
|
+
|
|
230
|
+
def wait_job_complete(namespace: str, job: str, kubeconfig: str | None, timeout_s: int = 600,
|
|
231
|
+
log: Callable[[str], None] = print) -> None:
|
|
232
|
+
def check() -> tuple[bool, str]:
|
|
233
|
+
obj = get_json(["get", "job", job, "-n", namespace], kubeconfig)
|
|
234
|
+
if obj is None:
|
|
235
|
+
return False, "not created yet"
|
|
236
|
+
if (condition(obj, "Complete") or {}).get("status") == "True":
|
|
237
|
+
return True, "complete"
|
|
238
|
+
failures = [f for f in _job_failures(namespace, kubeconfig) if f.startswith(f"job {job} ")]
|
|
239
|
+
if failures:
|
|
240
|
+
raise GateError(failures[0])
|
|
241
|
+
return False, "running"
|
|
242
|
+
|
|
243
|
+
wait_until(check, timeout_s, f"job {namespace}/{job}", log)
|
|
244
|
+
|
|
245
|
+
|
|
246
|
+
def wait_condition(resource: str, kubeconfig: str | None, ctype: str = "Ready",
|
|
247
|
+
namespace: str | None = None, timeout_s: int = 300,
|
|
248
|
+
log: Callable[[str], None] = print) -> None:
|
|
249
|
+
"""``resource`` like ``clusterissuer/letsencrypt`` or ``clustersecretstore/vault-backend``."""
|
|
250
|
+
args = ["get", resource] + (["-n", namespace] if namespace else [])
|
|
251
|
+
|
|
252
|
+
def check() -> tuple[bool, str]:
|
|
253
|
+
obj = get_json(args, kubeconfig)
|
|
254
|
+
if obj is None:
|
|
255
|
+
return False, "not found yet"
|
|
256
|
+
cond = condition(obj, ctype)
|
|
257
|
+
if cond and cond.get("status") == "True":
|
|
258
|
+
return True, ctype
|
|
259
|
+
return False, (cond or {}).get("message") or f"{ctype} not reported yet"
|
|
260
|
+
|
|
261
|
+
wait_until(check, timeout_s, resource, log)
|
|
262
|
+
|
|
263
|
+
|
|
264
|
+
def wait_all_ready(kind: str, kubeconfig: str | None, namespace: str | None = None,
|
|
265
|
+
timeout_s: int = 300, log: Callable[[str], None] = print) -> None:
|
|
266
|
+
"""Every object of ``kind`` (cluster-wide when namespace is None) reports Ready=True."""
|
|
267
|
+
args = ["get", kind] + (["-n", namespace] if namespace else [])
|
|
268
|
+
|
|
269
|
+
def check() -> tuple[bool, str]:
|
|
270
|
+
objs = items(args, kubeconfig)
|
|
271
|
+
if not objs:
|
|
272
|
+
return False, f"no {kind} yet"
|
|
273
|
+
bad = [f"{o['metadata']['name']}: {(condition(o, 'Ready') or {}).get('message', 'not ready')}"
|
|
274
|
+
for o in objs if (condition(o, "Ready") or {}).get("status") != "True"]
|
|
275
|
+
return (not bad), "; ".join(bad) or "ready"
|
|
276
|
+
|
|
277
|
+
wait_until(check, timeout_s, f"all {kind}", log)
|
|
278
|
+
|
|
279
|
+
|
|
280
|
+
def wait_http_ok(namespace: str, service: str, port: str | int, path: str, kubeconfig: str | None,
|
|
281
|
+
timeout_s: int = 300, log: Callable[[str], None] = print) -> str:
|
|
282
|
+
def check() -> tuple[bool, str]:
|
|
283
|
+
ok, body = api_proxy_get(namespace, service, port, path, kubeconfig)
|
|
284
|
+
return ok, (body[:200] if body else "no response")
|
|
285
|
+
|
|
286
|
+
return wait_until(check, timeout_s, f"http {service}.{namespace}:{port}/{path.lstrip('/')}", log)
|
|
287
|
+
|
|
288
|
+
|
|
289
|
+
def wait_service_endpoints(namespace: str, service: str, kubeconfig: str | None,
|
|
290
|
+
timeout_s: int = 300, log: Callable[[str], None] = print) -> None:
|
|
291
|
+
def check() -> tuple[bool, str]:
|
|
292
|
+
obj = get_json(["get", "endpoints", service, "-n", namespace], kubeconfig)
|
|
293
|
+
addrs = [a for s in (obj or {}).get("subsets") or [] for a in s.get("addresses") or []]
|
|
294
|
+
return bool(addrs), f"{len(addrs)} ready endpoint(s)"
|
|
295
|
+
|
|
296
|
+
wait_until(check, timeout_s, f"endpoints {namespace}/{service}", log)
|
|
297
|
+
|
|
298
|
+
|
|
299
|
+
def wait_loadbalancer_ip(namespace: str, kubeconfig: str | None, timeout_s: int = 600,
|
|
300
|
+
log: Callable[[str], None] = print) -> str:
|
|
301
|
+
"""First LoadBalancer Service in ``namespace`` that has an ingress IP or hostname."""
|
|
302
|
+
def check() -> tuple[bool, str]:
|
|
303
|
+
svcs = [s for s in items(["get", "svc", "-n", namespace], kubeconfig)
|
|
304
|
+
if (s.get("spec") or {}).get("type") == "LoadBalancer"]
|
|
305
|
+
if not svcs:
|
|
306
|
+
return False, "no LoadBalancer service yet"
|
|
307
|
+
for s in svcs:
|
|
308
|
+
ing = ((s.get("status") or {}).get("loadBalancer") or {}).get("ingress") or []
|
|
309
|
+
if ing:
|
|
310
|
+
return True, ing[0].get("ip") or ing[0].get("hostname", "")
|
|
311
|
+
return False, "waiting for the cloud load balancer address"
|
|
312
|
+
|
|
313
|
+
return wait_until(check, timeout_s, f"load balancer in {namespace}", log)
|
|
314
|
+
|
|
315
|
+
|
|
316
|
+
# --------------------------------------------------------------------------- helpers
|
|
317
|
+
|
|
318
|
+
|
|
319
|
+
def _ts(value: str) -> float:
|
|
320
|
+
if not value:
|
|
321
|
+
return time.time()
|
|
322
|
+
from datetime import datetime
|
|
323
|
+
try:
|
|
324
|
+
return datetime.fromisoformat(value.replace("Z", "+00:00")).timestamp()
|
|
325
|
+
except ValueError:
|
|
326
|
+
return time.time()
|
|
327
|
+
|
|
328
|
+
|
|
329
|
+
def _indent(text: str) -> str:
|
|
330
|
+
return "\n".join(f" | {line[:300]}" for line in text.splitlines()[-10:])
|
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
"""Add secrets that newer templates define to an existing vault structure file.
|
|
2
|
+
|
|
3
|
+
Existing leaves are never changed. Missing leaves are generated the same way a fresh
|
|
4
|
+
install generates them. Leaves that only an install answer can fill (SMTP, warehouse
|
|
5
|
+
credentials, service account keys) take that answer when given and are stored as EMPTY
|
|
6
|
+
otherwise. Only counts and paths are reported, never values.
|
|
7
|
+
"""
|
|
8
|
+
from __future__ import annotations
|
|
9
|
+
|
|
10
|
+
import json
|
|
11
|
+
import logging
|
|
12
|
+
import os
|
|
13
|
+
from pathlib import Path
|
|
14
|
+
|
|
15
|
+
from utils.customer_secret_manager_operations import CustomerSecretManager
|
|
16
|
+
|
|
17
|
+
logger = logging.getLogger(__name__)
|
|
18
|
+
|
|
19
|
+
TEMPLATE_PATH = Path(__file__).resolve().parent / "templates/secret_structure_template/customer_vault_structure.json"
|
|
20
|
+
|
|
21
|
+
_CONFIG_KEYS = {
|
|
22
|
+
"user_email": ("user_email",),
|
|
23
|
+
"customer": ("customer",),
|
|
24
|
+
"domain_name": ("domain_name",),
|
|
25
|
+
"cloud_provider": ("cloud_provider",),
|
|
26
|
+
"project_id": ("gcp_project_id", "secrets_project_id", "project_id"),
|
|
27
|
+
"region": ("project_region",),
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
INSTALL_INPUTS = {
|
|
32
|
+
"smtp_host": "smtp_host",
|
|
33
|
+
"smtp_port": "smtp_port",
|
|
34
|
+
"smtp_username": "smtp_username",
|
|
35
|
+
"smtp_password": "smtp_password",
|
|
36
|
+
"git_provider_access_token": "git_provider_access_token",
|
|
37
|
+
"bigquery_project_id": "bigquery_project_id",
|
|
38
|
+
"bigquery_region": "bigquery_region",
|
|
39
|
+
"data_platform_gcp_sa_email": "data_platform_sa_json",
|
|
40
|
+
"data_platform_gcp_sa_secret": "data_platform_sa_json",
|
|
41
|
+
"data_analysis_gcp_sa_email": "data_analysis_sa_json",
|
|
42
|
+
"data_analysis_gcp_sa_secret": "data_analysis_sa_json",
|
|
43
|
+
"data_streaming_gcp_sa_email": "data_streaming_sa_json",
|
|
44
|
+
"data_streaming_gcp_sa_secret": "data_streaming_sa_json",
|
|
45
|
+
"redshift_host": "redshift_host",
|
|
46
|
+
"redshift_database": "redshift_database",
|
|
47
|
+
"redshift_user": "redshift_user",
|
|
48
|
+
"redshift_password": "redshift_password",
|
|
49
|
+
"snowflake_account": "snowflake_account",
|
|
50
|
+
"snowflake_user": "snowflake_user",
|
|
51
|
+
"snowflake_password": "snowflake_password",
|
|
52
|
+
"snowflake_warehouse": "snowflake_warehouse",
|
|
53
|
+
"snowflake_database": "snowflake_database",
|
|
54
|
+
"fabric_server": "fabric_server",
|
|
55
|
+
"fabric_database": "fabric_database",
|
|
56
|
+
"fabric_user": "fabric_user",
|
|
57
|
+
"fabric_password": "fabric_password",
|
|
58
|
+
"aws_access_key_id": "aws_access_key_id",
|
|
59
|
+
"aws_secret_access_key": "aws_secret_access_key",
|
|
60
|
+
"runner_registration_token": "runner_registration_token",
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
def _is_leaf_group(node) -> bool:
|
|
65
|
+
return isinstance(node, dict) and all(isinstance(v, str) or v is None for v in node.values())
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
def missing_template(template: dict, existing: dict) -> dict:
|
|
69
|
+
"""Return the part of ``template`` whose leaves are absent from ``existing``."""
|
|
70
|
+
pruned: dict = {}
|
|
71
|
+
for key, value in template.items():
|
|
72
|
+
current = existing.get(key) if isinstance(existing, dict) else None
|
|
73
|
+
if _is_leaf_group(value):
|
|
74
|
+
have = current if isinstance(current, dict) else {}
|
|
75
|
+
new = {k: v for k, v in value.items() if k not in have}
|
|
76
|
+
if new:
|
|
77
|
+
pruned[key] = new
|
|
78
|
+
elif isinstance(value, dict):
|
|
79
|
+
sub = missing_template(value, current if isinstance(current, dict) else {})
|
|
80
|
+
if sub:
|
|
81
|
+
pruned[key] = sub
|
|
82
|
+
return pruned
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
def _flatten(node: dict, path: str = "") -> dict[str, str]:
|
|
86
|
+
flat: dict[str, str] = {}
|
|
87
|
+
for key, value in node.items():
|
|
88
|
+
full = f"{path}/{key}" if path else key
|
|
89
|
+
if isinstance(value, dict):
|
|
90
|
+
flat.update(_flatten(value, full))
|
|
91
|
+
else:
|
|
92
|
+
flat[full] = value
|
|
93
|
+
return flat
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
def _load(path) -> dict:
|
|
97
|
+
with open(path) as f:
|
|
98
|
+
return json.load(f)
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
def _unflatten(flat: dict) -> dict:
|
|
102
|
+
tree: dict = {}
|
|
103
|
+
for path, value in flat.items():
|
|
104
|
+
*parents, key = path.split("/")
|
|
105
|
+
cursor = tree
|
|
106
|
+
for part in parents:
|
|
107
|
+
cursor = cursor.setdefault(part, {})
|
|
108
|
+
cursor[key] = value
|
|
109
|
+
return tree
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
def _empty_install_leaves(template: dict, existing: dict, answers: dict | None = None) -> dict:
|
|
113
|
+
"""Template leaves for install answers that ``existing`` still holds as EMPTY."""
|
|
114
|
+
have = _flatten(existing)
|
|
115
|
+
return {path: value for path, value in _flatten(template).items()
|
|
116
|
+
if value in INSTALL_INPUTS and have.get(path) == "EMPTY"
|
|
117
|
+
and (answers is None or answers.get(INSTALL_INPUTS[value]))}
|
|
118
|
+
|
|
119
|
+
|
|
120
|
+
def needed_install_inputs(structure_file: str | os.PathLike,
|
|
121
|
+
template_file: str | os.PathLike = TEMPLATE_PATH) -> list[str]:
|
|
122
|
+
"""Answer keys a fresh install would ask for to fill the leaves the upgrade adds."""
|
|
123
|
+
template, existing = _load(template_file), _load(structure_file)
|
|
124
|
+
leaves = _flatten(missing_template(template, existing)) | _empty_install_leaves(template, existing)
|
|
125
|
+
return sorted({INSTALL_INPUTS[v] for v in leaves.values() if v in INSTALL_INPUTS})
|
|
126
|
+
|
|
127
|
+
|
|
128
|
+
def empty_leaves(structure_file: str | os.PathLike, paths: list[str]) -> list[str]:
|
|
129
|
+
"""Those of ``paths`` whose value in ``structure_file`` is EMPTY."""
|
|
130
|
+
flat = _flatten(_load(structure_file))
|
|
131
|
+
return [p for p in paths if flat.get(p) in (None, "", "EMPTY")]
|
|
132
|
+
|
|
133
|
+
|
|
134
|
+
class _TemplateSecretFiller(CustomerSecretManager):
|
|
135
|
+
"""Generator for missing leaves; unknown install inputs resolve to None (stored as EMPTY)."""
|
|
136
|
+
|
|
137
|
+
def __new__(cls, *args, **kwargs):
|
|
138
|
+
return object.__new__(cls)
|
|
139
|
+
|
|
140
|
+
def __init__(self, config: dict, existing: dict):
|
|
141
|
+
self._initialized = True
|
|
142
|
+
self.logger = logger
|
|
143
|
+
self.dry_run = False
|
|
144
|
+
for attr, keys in _CONFIG_KEYS.items():
|
|
145
|
+
setattr(self, attr, next((config[k] for k in keys if config.get(k)), None))
|
|
146
|
+
self.default_git_user_email = f"{self.customer}@{self.domain_name}"
|
|
147
|
+
self.secrets_cache = _flatten(existing)
|
|
148
|
+
|
|
149
|
+
def apply_answers(self, answers: dict) -> None:
|
|
150
|
+
answers = {k: v for k, v in (answers or {}).items() if v not in (None, "")}
|
|
151
|
+
self.data_warehouse_platform = "bigquery" if any(k.endswith("_sa_json") for k in answers) else None
|
|
152
|
+
for key, value in answers.items():
|
|
153
|
+
setattr(self, key, value)
|
|
154
|
+
self._initialize_optional_parameters(answers)
|
|
155
|
+
|
|
156
|
+
def __getattr__(self, name):
|
|
157
|
+
if name.startswith("__"):
|
|
158
|
+
raise AttributeError(name)
|
|
159
|
+
return None
|
|
160
|
+
|
|
161
|
+
|
|
162
|
+
def add_missing_secrets(structure_file: str | os.PathLike, config: dict,
|
|
163
|
+
template_file: str | os.PathLike = TEMPLATE_PATH,
|
|
164
|
+
answers: dict | None = None) -> list[str]:
|
|
165
|
+
"""Merge missing template leaves into ``structure_file``. Returns the added leaf paths."""
|
|
166
|
+
with open(template_file) as f:
|
|
167
|
+
template = json.load(f)
|
|
168
|
+
with open(structure_file) as f:
|
|
169
|
+
existing = json.load(f)
|
|
170
|
+
|
|
171
|
+
leaves = _flatten(missing_template(template, existing)) | _empty_install_leaves(template, existing, answers or {})
|
|
172
|
+
pruned = _unflatten(leaves)
|
|
173
|
+
if not pruned:
|
|
174
|
+
return []
|
|
175
|
+
|
|
176
|
+
filler = _TemplateSecretFiller(config, existing)
|
|
177
|
+
filler.apply_answers(answers)
|
|
178
|
+
output = json.loads(json.dumps(existing))
|
|
179
|
+
|
|
180
|
+
def sink(path, secret_key, secret_value):
|
|
181
|
+
if secret_value == "None":
|
|
182
|
+
secret_value = None
|
|
183
|
+
return filler._collect_secret_for_file(output, path, secret_key, secret_value, existing=existing)
|
|
184
|
+
|
|
185
|
+
filler.parse_and_import_secrets(pruned, sink=sink)
|
|
186
|
+
|
|
187
|
+
fd = os.open(str(structure_file), os.O_WRONLY | os.O_CREAT | os.O_TRUNC, 0o600)
|
|
188
|
+
os.fchmod(fd, 0o600)
|
|
189
|
+
with os.fdopen(fd, "w") as f:
|
|
190
|
+
json.dump(output, f, indent=4)
|
|
191
|
+
|
|
192
|
+
added = sorted(_flatten(pruned))
|
|
193
|
+
logger.info("Added %d new secret entries from the template", len(added))
|
|
194
|
+
return added
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# bigquery_usage
|
|
2
|
+
|
|
3
|
+
BigQuery FinOps marts for the Fast2.Dev control plane `/stats` page, built on
|
|
4
|
+
[bqbooster/dbt_bigquery_monitoring](https://hub.getdbt.com/bqbooster/dbt_bigquery_monitoring/latest/).
|
|
5
|
+
|
|
6
|
+
Run it with `python scripts/run_monitoring.py [dbt command]` (default `build`). The script reads the
|
|
7
|
+
settings below from the environment, turns them into typed `--vars`, decodes the service account key and
|
|
8
|
+
runs `dbt deps` when packages are missing.
|
|
9
|
+
|
|
10
|
+
| Variable | Required | Meaning |
|
|
11
|
+
|---|---|---|
|
|
12
|
+
| `FAST2DEV_BQ_PROJECT` | yes | Project the jobs run in and the marts are written to |
|
|
13
|
+
| `FAST2DEV_BQ_REGION` | yes | BigQuery region, e.g. `europe-north1` |
|
|
14
|
+
| `FAST2DEV_BQ_DATASET` | no | Output dataset prefix, default `fast2dev_monitoring` |
|
|
15
|
+
| `FAST2DEV_DBT_SA_EMAIL` | yes | Service account to impersonate (dbt-sa) |
|
|
16
|
+
| `FAST2DEV_GCP_SA_SECRET_FILE` | no | Base64 key of the impersonating account, default `/fast2dev/secrets/bigquery/DBT_DEPLOY_GCP_SA_SECRET` |
|
|
17
|
+
| `FAST2DEV_REPORT_TIME_ZONE` / `_LABEL` | no | Customer time zone, reported next to Billing (Pacific) |
|
|
18
|
+
| `FAST2DEV_PER_BILLED_TB_PRICE` | no | On-demand price per TB billed, default 6.25 |
|
|
19
|
+
| `FAST2DEV_USE_FLAT_PRICING` | no | `true` for capacity (slot) pricing |
|
|
20
|
+
| `FAST2DEV_LOOKBACK_WINDOW_DAYS` | no | Default 30 |
|
|
21
|
+
| `FAST2DEV_BILLING_EXPORT_ENABLED` / `_PROJECT` / `_DATASET` / `_TABLE` | no | Cloud Billing detailed export; enables the spend marts |
|
|
22
|
+
| `FAST2DEV_BILLING_EXPORT_PROJECT_IDS` | no | Comma-separated projects taken from the billing export, default `FAST2DEV_BQ_PROJECT`. Applies to the marts and the package billing models (both read the `fast2dev_bq_billing_export` view) |
|
|
23
|
+
| `FAST2DEV_AUDIT_LOGS_ENABLED` / `_PROJECT` / `_DATASET` / `_TABLE` | no | BigQuery audit-log sink |
|
|
24
|
+
|
|
25
|
+
Marts (`<dataset>_bigquery_usage`):
|
|
26
|
+
|
|
27
|
+
| Model | Needs billing export |
|
|
28
|
+
|---|---|
|
|
29
|
+
| `fast2dev_bq_daily_spend`, `fast2dev_bq_weekly_spend`, `fast2dev_bq_weekly_kpi` | yes |
|
|
30
|
+
| `fast2dev_bq_model_costs_daily`, `fast2dev_bq_user_costs_daily`, `fast2dev_bq_storage_by_dataset` | no |
|
|
31
|
+
|
|
32
|
+
The impersonated account needs BigQuery Data Viewer on the billing export and audit-log datasets, and
|
|
33
|
+
BigQuery Resource Viewer (jobs and storage metadata) on the warehouse project.
|
|
File without changes
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
name: 'bigquery_usage'
|
|
2
|
+
version: '1.0.0'
|
|
3
|
+
|
|
4
|
+
profile: 'fast2dev_bigquery_usage'
|
|
5
|
+
|
|
6
|
+
dispatch:
|
|
7
|
+
- macro_namespace: dbt_bigquery_monitoring
|
|
8
|
+
search_order: ['bigquery_usage', 'dbt_bigquery_monitoring']
|
|
9
|
+
|
|
10
|
+
model-paths: ["models"]
|
|
11
|
+
analysis-paths: ["analyses"]
|
|
12
|
+
test-paths: ["tests"]
|
|
13
|
+
seed-paths: ["seeds"]
|
|
14
|
+
macro-paths: ["macros"]
|
|
15
|
+
snapshot-paths: ["snapshots"]
|
|
16
|
+
|
|
17
|
+
clean-targets:
|
|
18
|
+
- "target"
|
|
19
|
+
- "dbt_packages"
|
|
20
|
+
|
|
21
|
+
models:
|
|
22
|
+
bigquery_usage:
|
|
23
|
+
+schema: "bigquery_usage"
|
|
24
|
+
dbt_bigquery_monitoring:
|
|
25
|
+
+schema: "dbt_bigquery_monitoring"
|
|
26
|
+
+labels:
|
|
27
|
+
fast2dev_monitoring_grain: "fingerprint"
|
|
28
|
+
|
|
29
|
+
vars:
|
|
30
|
+
bq_region: 'us'
|
|
31
|
+
lookback_window_days: 30
|
|
32
|
+
use_flat_pricing: false
|
|
33
|
+
per_billed_tb_price: 6.25
|
|
34
|
+
report_time_zone: 'UTC'
|
|
35
|
+
report_time_zone_label: ''
|
|
36
|
+
enable_gcp_billing_export: false
|
|
37
|
+
billing_export_source_project: ''
|
|
38
|
+
billing_export_source_dataset: ''
|
|
39
|
+
billing_export_source_table: ''
|
|
40
|
+
billing_export_project_ids: []
|
|
41
|
+
gcp_billing_export_storage_project: ''
|
|
42
|
+
gcp_billing_export_dataset: ''
|
|
43
|
+
gcp_billing_export_table: ''
|
|
44
|
+
enable_gcp_bigquery_audit_logs: false
|
|
45
|
+
should_combine_audit_logs_and_information_schema: false
|
|
46
|
+
gcp_bigquery_audit_logs_storage_project: ''
|
|
47
|
+
gcp_bigquery_audit_logs_dataset: ''
|
|
48
|
+
gcp_bigquery_audit_logs_table: 'cloudaudit_googleapis_com_data_access'
|
|
49
|
+
|
|
50
|
+
query-comment:
|
|
51
|
+
comment: '{{ dbt_bigquery_monitoring.get_query_comment(node) }}'
|
|
52
|
+
job-label: true
|
|
File without changes
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
{#- Time zones every fast2dev_bq_* mart is reported in: Google billing time (Pacific)
|
|
2
|
+
plus the customer's report time zone (var report_time_zone). -#}
|
|
3
|
+
{% macro fast2dev_bq_time_zones() %}
|
|
4
|
+
{%- set tz = var('report_time_zone', 'UTC') -%}
|
|
5
|
+
{%- set label = var('report_time_zone_label', '') or tz -%}
|
|
6
|
+
unnest([
|
|
7
|
+
struct('America/Los_Angeles' as time_zone, 'Billing (Pacific)' as time_zone_label)
|
|
8
|
+
{%- if tz != 'America/Los_Angeles' %},
|
|
9
|
+
struct('{{ tz }}' as time_zone, '{{ label }}' as time_zone_label)
|
|
10
|
+
{%- endif %}
|
|
11
|
+
])
|
|
12
|
+
{% endmacro %}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
{#- Prints FAST2DEV_GRAIN=<state> for scripts/run_monitoring.py.
|
|
2
|
+
|
|
3
|
+
dbt_bigquery_monitoring 0.27.0 groups repeated queries by query fingerprint instead of
|
|
4
|
+
raw query text. Tables built before that keep the old grain until they are fully
|
|
5
|
+
refreshed. Tables built by this project carry the label
|
|
6
|
+
fast2dev_monitoring_grain=fingerprint; an existing table without it is "old". -#}
|
|
7
|
+
{% macro fast2dev_monitoring_grain() %}
|
|
8
|
+
{%- set rel = ref('dbt_bigquery_monitoring', 'jobs_costs_incremental') -%}
|
|
9
|
+
{%- set existing = adapter.get_relation(database=rel.database, schema=rel.schema, identifier=rel.identifier) -%}
|
|
10
|
+
{%- if existing is none -%}
|
|
11
|
+
{{ print('FAST2DEV_GRAIN=absent') }}
|
|
12
|
+
{%- else -%}
|
|
13
|
+
{%- set query -%}
|
|
14
|
+
select option_value
|
|
15
|
+
from `{{ rel.database }}`.`{{ rel.schema }}`.INFORMATION_SCHEMA.TABLE_OPTIONS
|
|
16
|
+
where table_name = '{{ rel.identifier }}' and option_name = 'labels'
|
|
17
|
+
{%- endset -%}
|
|
18
|
+
{%- set result = run_query(query) -%}
|
|
19
|
+
{%- set labels = result.columns[0].values()[0] if result and result.rows | length > 0 else '' -%}
|
|
20
|
+
{%- set current = 'fast2dev_monitoring_grain' in labels and 'fingerprint' in labels -%}
|
|
21
|
+
{{ print('FAST2DEV_GRAIN=' ~ ('current' if current else 'old')) }}
|
|
22
|
+
{%- endif -%}
|
|
23
|
+
{% endmacro %}
|