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,787 @@
|
|
|
1
|
+
import subprocess
|
|
2
|
+
import os
|
|
3
|
+
from datetime import datetime
|
|
4
|
+
import base64
|
|
5
|
+
import json
|
|
6
|
+
import requests
|
|
7
|
+
import logging
|
|
8
|
+
import sys
|
|
9
|
+
import argparse
|
|
10
|
+
from pathlib import Path
|
|
11
|
+
from jinja2 import Environment, FileSystemLoader, TemplateNotFound # type: ignore
|
|
12
|
+
from cli.state import vault_structure_path
|
|
13
|
+
from utils.helm_utils import add_or_keep_helm_repo
|
|
14
|
+
from utils.environment_profiles import ENVIRONMENTS, resolve_environment, service_size
|
|
15
|
+
|
|
16
|
+
# Configure logging
|
|
17
|
+
logging.basicConfig(
|
|
18
|
+
level=logging.INFO,
|
|
19
|
+
format='%(asctime)s - %(name)s - %(levelname)s - %(message)s',
|
|
20
|
+
handlers=[
|
|
21
|
+
logging.StreamHandler(sys.stdout)
|
|
22
|
+
]
|
|
23
|
+
)
|
|
24
|
+
logger = logging.getLogger('services_monitoring_deployer')
|
|
25
|
+
|
|
26
|
+
class PlatformMonitoring:
|
|
27
|
+
def __init__(self, chart_version, customer, metadata_collector, cloud_provider, domain_name,
|
|
28
|
+
project_id=None, cluster_name=None, kube_config_path=None, namespace="monitoring", dry_run=False, platform_environment=None,
|
|
29
|
+
user_email=None, platform_features=None,
|
|
30
|
+
# Drives the chart's local-CA volume mount and OAuth TLS
|
|
31
|
+
# client paths (see services_monitoring/template_values.yaml
|
|
32
|
+
# around lines 535 and 794). Previously the chart used
|
|
33
|
+
# ``cloud_provider == "self-managed"`` as a proxy, which
|
|
34
|
+
# forced local-CA mounting even when the user picked a
|
|
35
|
+
# real cert provider. The CLI passes this from
|
|
36
|
+
# ``state.config['secrets_cert_provider']``.
|
|
37
|
+
cert_provider=None):
|
|
38
|
+
self.deployment_environment = "infrastructure"
|
|
39
|
+
self.namespace = namespace
|
|
40
|
+
self.user_email = user_email
|
|
41
|
+
self.platform_features = {'cloud_provider': cloud_provider, **(platform_features or {})}
|
|
42
|
+
self.customer = customer
|
|
43
|
+
self.domain_name = domain_name
|
|
44
|
+
self.cloud_provider = cloud_provider
|
|
45
|
+
self.metadata_collector = metadata_collector
|
|
46
|
+
self.dry_run = dry_run
|
|
47
|
+
self.platform_environment = resolve_environment(platform_environment, cloud_provider)
|
|
48
|
+
self.size = service_size("services_monitoring", self.platform_environment)
|
|
49
|
+
# See kwarg docstring. Fallback only kicks in when the deployer
|
|
50
|
+
# is invoked directly (dev_test_*) without going through the
|
|
51
|
+
# CLI; the CLI passes the wizard-collected value explicitly.
|
|
52
|
+
self.cert_provider = cert_provider or "selfsigned"
|
|
53
|
+
if not cert_provider:
|
|
54
|
+
logger.warning(
|
|
55
|
+
"ServicesMonitoring: no cert_provider supplied; "
|
|
56
|
+
"defaulting to 'selfsigned'. Pass --cert-provider "
|
|
57
|
+
"<slug> (CLI) to override."
|
|
58
|
+
)
|
|
59
|
+
#For local development
|
|
60
|
+
|
|
61
|
+
self.secret_file = str(vault_structure_path(customer))
|
|
62
|
+
if not os.path.exists(self.secret_file):
|
|
63
|
+
raise FileNotFoundError(f"Secret file not found: {self.secret_file}")
|
|
64
|
+
|
|
65
|
+
# Service specific
|
|
66
|
+
self.chart_version = chart_version
|
|
67
|
+
self.deployment_name = "monitoring"
|
|
68
|
+
self.chart_repo_name = "grafana-community"
|
|
69
|
+
self.chart_name = "grafana-community/grafana"
|
|
70
|
+
self.chart_repo = "https://grafana-community.github.io/helm-charts"
|
|
71
|
+
self.values_path = "charts/infra_services_charts/services_monitoring/values.yaml"
|
|
72
|
+
self.render_template_values_path = "charts/infra_services_charts/services_monitoring/template_values.yaml"
|
|
73
|
+
self.dashboards_dir = "charts/infra_services_charts/services_monitoring/dashboards"
|
|
74
|
+
self.alert_render_template_values_path = "charts/infra_services_charts/services_monitoring/template_alerts_cm.yaml"
|
|
75
|
+
self.alert_values_path = "charts/infra_services_charts/services_monitoring/alerts_cm.yaml"
|
|
76
|
+
self.customer_root_domain = f"{self.customer}.{self.domain_name}"
|
|
77
|
+
self.ingress_host = f"monitoring.{self.customer_root_domain}"
|
|
78
|
+
self.oauth_auth_url = f"https://login.{self.customer_root_domain}/realms/{self.customer}/protocol/openid-connect/auth"
|
|
79
|
+
self.oauth_token_url = f"https://login.{self.customer_root_domain}/realms/{self.customer}/protocol/openid-connect/token"
|
|
80
|
+
self.oauth_api_url = f"https://login.{self.customer_root_domain}/realms/{self.customer}/protocol/openid-connect/userinfo"
|
|
81
|
+
self.oauth_signout_redirect_url = f"https://login.{self.customer_root_domain}/realms/{self.customer}/protocol/openid-connect/logout?post_logout_redirect_uri=https%3A%2F%2F{self.customer_root_domain}%2Flogin"
|
|
82
|
+
self.monitoring_agent_email = f"no-reply@{self.customer_root_domain}"
|
|
83
|
+
|
|
84
|
+
# Cloud Provider Specific
|
|
85
|
+
try:
|
|
86
|
+
if self.cloud_provider == "gcp":
|
|
87
|
+
if project_id and project_id.strip():
|
|
88
|
+
self.project_id = project_id
|
|
89
|
+
logger.info(f"Using provided project_id: {self.project_id}")
|
|
90
|
+
else:
|
|
91
|
+
self.project_id = f"fast2dev-{customer}"
|
|
92
|
+
logger.warning(f"No project_id provided, using default: {self.project_id}")
|
|
93
|
+
self.cluster_name = cluster_name if cluster_name else f"fast2dev-{customer}-platform"
|
|
94
|
+
self.monitoring_k8s_sa = f"monitoring-k8s-sa@{self.project_id}.iam.gserviceaccount.com"
|
|
95
|
+
logger.info(f"Configured for GCP with project ID: {self.project_id}")
|
|
96
|
+
elif self.cloud_provider == "aws": # Leave for future clouds. Not supported yet
|
|
97
|
+
self.project_id = None
|
|
98
|
+
self.monitoring_k8s_sa = None
|
|
99
|
+
self.cluster_name = cluster_name if cluster_name else f"fast2dev-{customer}-platform"
|
|
100
|
+
logger.info(f"Configured for AWS with cluster: {self.cluster_name}")
|
|
101
|
+
elif self.cloud_provider == "azure": # Leave for future clouds. Not supported yet
|
|
102
|
+
self.project_id = None
|
|
103
|
+
self.monitoring_k8s_sa = None
|
|
104
|
+
self.cluster_name = cluster_name if cluster_name else f"fast2dev-{customer}-platform"
|
|
105
|
+
logger.info(f"Configured for Azure with cluster: {self.cluster_name}")
|
|
106
|
+
elif self.cloud_provider == "self-managed":
|
|
107
|
+
self.project_id = None
|
|
108
|
+
self.monitoring_k8s_sa = None
|
|
109
|
+
self.cluster_name = cluster_name if cluster_name else f"fast2dev-{customer}-platform"
|
|
110
|
+
logger.info(f"Configured for self-managed with cluster: {self.cluster_name}")
|
|
111
|
+
else:
|
|
112
|
+
raise ValueError(f"Unsupported cloud provider: {self.cloud_provider}")
|
|
113
|
+
except Exception as e:
|
|
114
|
+
logger.error(f"Error during cloud provider configuration: {str(e)}")
|
|
115
|
+
raise
|
|
116
|
+
|
|
117
|
+
# Set kubeconfig path after cluster_name is properly initialized
|
|
118
|
+
self.kube_config = kube_config_path if kube_config_path else f'/tmp/{self.cluster_name}-kubeconfig.yaml'
|
|
119
|
+
logger.info(f"Using kubeconfig: {self.kube_config}")
|
|
120
|
+
|
|
121
|
+
# Check if kubeconfig exists
|
|
122
|
+
if not os.path.exists(self.kube_config):
|
|
123
|
+
logger.warning(f"Kubeconfig file not found at {self.kube_config}. Deployment may fail.")
|
|
124
|
+
|
|
125
|
+
# MetadataCollection
|
|
126
|
+
self.app_name = self.chart_name.split('/')[1]
|
|
127
|
+
|
|
128
|
+
# Validate template paths
|
|
129
|
+
self._validate_template_paths()
|
|
130
|
+
|
|
131
|
+
def _validate_template_paths(self):
|
|
132
|
+
"""Validate that all required template files exist"""
|
|
133
|
+
required_paths = [
|
|
134
|
+
self.render_template_values_path,
|
|
135
|
+
self.alert_render_template_values_path
|
|
136
|
+
]
|
|
137
|
+
for path in required_paths:
|
|
138
|
+
template_path = Path(path)
|
|
139
|
+
if not template_path.exists():
|
|
140
|
+
logger.error(f"Template file not found: {template_path}")
|
|
141
|
+
raise FileNotFoundError(f"Template file not found: {template_path}")
|
|
142
|
+
logger.debug(f"Template file validated: {template_path}")
|
|
143
|
+
|
|
144
|
+
def deploy_service(self, chart_repo_name, chart_repo, deployment_name, chart_name, chart_version, namespace, values_path):
|
|
145
|
+
"""Deploy a Helm chart service"""
|
|
146
|
+
logger.info(f"Deploying {deployment_name} in namespace {namespace}")
|
|
147
|
+
|
|
148
|
+
# Check if values file exists
|
|
149
|
+
if not os.path.exists(values_path):
|
|
150
|
+
logger.error(f"Values file not found: {values_path}")
|
|
151
|
+
raise FileNotFoundError(f"Values file not found: {values_path}")
|
|
152
|
+
|
|
153
|
+
try:
|
|
154
|
+
# Properly add and update the Helm repo
|
|
155
|
+
add_or_keep_helm_repo(chart_repo_name, chart_repo)
|
|
156
|
+
self.execute_command(["helm", "repo", "update", chart_repo_name])
|
|
157
|
+
|
|
158
|
+
# Formulate the Helm upgrade command properly as a list
|
|
159
|
+
helm_command = [
|
|
160
|
+
"helm", "upgrade", "-i", deployment_name, chart_name,
|
|
161
|
+
"--version", chart_version,
|
|
162
|
+
"--namespace", namespace,
|
|
163
|
+
"--create-namespace",
|
|
164
|
+
"--values", values_path,
|
|
165
|
+
"--kubeconfig", self.kube_config
|
|
166
|
+
]
|
|
167
|
+
self.execute_command(helm_command)
|
|
168
|
+
logger.info(f"Successfully deployed {deployment_name} in namespace {namespace}")
|
|
169
|
+
except Exception as e:
|
|
170
|
+
logger.error(f"Failed to deploy {deployment_name}: {str(e)}")
|
|
171
|
+
raise
|
|
172
|
+
|
|
173
|
+
def get_deployed_app_version(self, deployment_name, namespace):
|
|
174
|
+
"""Get the deployed application version from Helm"""
|
|
175
|
+
logger.info(f"Getting deployed version for {deployment_name} in namespace {namespace}")
|
|
176
|
+
try:
|
|
177
|
+
command = ["helm", "ls", "--deployed", "-f", deployment_name, "-n", namespace, "--kubeconfig", self.kube_config, "--output", "json"]
|
|
178
|
+
result = self.execute_command(command)
|
|
179
|
+
if result:
|
|
180
|
+
# Parse JSON output
|
|
181
|
+
deployments = json.loads(result)
|
|
182
|
+
if deployments and isinstance(deployments, list) and len(deployments) > 0:
|
|
183
|
+
app_version = deployments[0].get('app_version', "Unknown")
|
|
184
|
+
logger.info(f"Found app version: {app_version}")
|
|
185
|
+
return app_version
|
|
186
|
+
else:
|
|
187
|
+
logger.warning(f"No deployments found for {deployment_name}")
|
|
188
|
+
return "No deployed version found"
|
|
189
|
+
except json.JSONDecodeError as e:
|
|
190
|
+
logger.error(f"Failed to parse Helm output as JSON: {str(e)}")
|
|
191
|
+
return "Error parsing version"
|
|
192
|
+
except Exception as e:
|
|
193
|
+
logger.error(f"Error getting deployed version: {str(e)}")
|
|
194
|
+
return "Error getting version"
|
|
195
|
+
|
|
196
|
+
def deploy_config_maps(self):
|
|
197
|
+
"""Deploy ConfigMaps for dashboards and alerts"""
|
|
198
|
+
logger.info("Deploying ConfigMaps")
|
|
199
|
+
try:
|
|
200
|
+
# Create namespace if it doesn't exist
|
|
201
|
+
kubectl_ns_command = f"kubectl create namespace {self.namespace} --save-config --dry-run=client -o=yaml | kubectl --kubeconfig={self.kube_config} apply -f -"
|
|
202
|
+
self.execute_kubectl(kubectl_ns_command)
|
|
203
|
+
|
|
204
|
+
self.filter_alert_rules()
|
|
205
|
+
kubectl_command = [
|
|
206
|
+
"kubectl", "apply", "-f",
|
|
207
|
+
self.alert_values_path,
|
|
208
|
+
"--namespace", self.namespace,
|
|
209
|
+
"--kubeconfig", self.kube_config
|
|
210
|
+
]
|
|
211
|
+
self.execute_command(kubectl_command)
|
|
212
|
+
self.deploy_dashboards()
|
|
213
|
+
logger.info("Successfully deployed ConfigMaps")
|
|
214
|
+
except Exception as e:
|
|
215
|
+
logger.error(f"Failed to deploy ConfigMaps: {str(e)}")
|
|
216
|
+
raise
|
|
217
|
+
|
|
218
|
+
def execute_kubectl(self, command):
|
|
219
|
+
"""Execute a kubectl command with proper error handling"""
|
|
220
|
+
# Dry-run mode: show command without executing
|
|
221
|
+
if self.dry_run:
|
|
222
|
+
logger.info(f"[DRY-RUN] Would execute: {command}")
|
|
223
|
+
print(f"[DRY-RUN] Would execute: {command}")
|
|
224
|
+
return "" # Return mock success
|
|
225
|
+
|
|
226
|
+
logger.debug(f"Executing kubectl command: {command}")
|
|
227
|
+
try:
|
|
228
|
+
result = subprocess.run(command, shell=True, check=True, capture_output=True, text=True)
|
|
229
|
+
logger.debug(f"Command output: {result.stdout}")
|
|
230
|
+
return result.stdout
|
|
231
|
+
except subprocess.CalledProcessError as e:
|
|
232
|
+
logger.error(f"Kubectl command failed: {command}")
|
|
233
|
+
logger.error(f"Status code: {e.returncode}")
|
|
234
|
+
logger.error(f"Output: {e.stdout}")
|
|
235
|
+
logger.error(f"Error: {e.stderr}")
|
|
236
|
+
raise Exception(f"Kubectl execution failed: {e.stderr}")
|
|
237
|
+
|
|
238
|
+
def execute_command(self, command):
|
|
239
|
+
"""Execute a shell command with proper error handling"""
|
|
240
|
+
cmd_str = ' '.join(command) if isinstance(command, list) else command
|
|
241
|
+
|
|
242
|
+
# Dry-run mode: show command without executing
|
|
243
|
+
if self.dry_run:
|
|
244
|
+
logger.info(f"[DRY-RUN] Would execute: {cmd_str}")
|
|
245
|
+
print(f"[DRY-RUN] Would execute: {cmd_str}")
|
|
246
|
+
return "" # Return mock success
|
|
247
|
+
|
|
248
|
+
logger.debug(f"Executing command: {cmd_str}")
|
|
249
|
+
|
|
250
|
+
try:
|
|
251
|
+
result = subprocess.run(command, check=True, capture_output=True, text=True)
|
|
252
|
+
logger.debug(f"Command output: {result.stdout}")
|
|
253
|
+
return result.stdout
|
|
254
|
+
except subprocess.CalledProcessError as e:
|
|
255
|
+
logger.error(f"Command failed: {cmd_str}")
|
|
256
|
+
logger.error(f"Status code: {e.returncode}")
|
|
257
|
+
logger.error(f"Output: {e.stdout}")
|
|
258
|
+
logger.error(f"Error: {e.stderr}")
|
|
259
|
+
raise Exception(f"Execution failed for command {cmd_str}: {e.stderr}")
|
|
260
|
+
except Exception as e:
|
|
261
|
+
logger.error(f"Unexpected error executing command {cmd_str}: {str(e)}")
|
|
262
|
+
raise
|
|
263
|
+
|
|
264
|
+
CONTROL_PLANE_NAMESPACE = "data-control-plane"
|
|
265
|
+
CONTROL_PLANE_GRAFANA_SECRET = "fast2dev-control-plane-grafana"
|
|
266
|
+
CONTROL_PLANE_SERVICE_ACCOUNT = "fast2dev-control-plane"
|
|
267
|
+
|
|
268
|
+
def _kubectl_quiet(self, args, input_text=None):
|
|
269
|
+
"""Run kubectl without logging its output (used for secrets)."""
|
|
270
|
+
cmd = ["kubectl"] + ([f"--kubeconfig={self.kube_config}"] if getattr(self, "kube_config", None) else []) + args
|
|
271
|
+
return subprocess.run(cmd, input=input_text, capture_output=True, text=True)
|
|
272
|
+
|
|
273
|
+
def ensure_control_plane_grafana_token(self):
|
|
274
|
+
"""Give the control plane a read-only Grafana token for the landing page alert tile.
|
|
275
|
+
|
|
276
|
+
Creates a Viewer service account in Grafana, issues a token and stores it in the
|
|
277
|
+
control-plane namespace as a Secret. An existing token that still works is kept.
|
|
278
|
+
"""
|
|
279
|
+
if self.dry_run:
|
|
280
|
+
logger.info("[DRY-RUN] Would ensure the control-plane Grafana token")
|
|
281
|
+
return
|
|
282
|
+
res = self._kubectl_quiet(["get", "secret", "root-secrets-monitoring", "-n", self.namespace, "-o", "json"])
|
|
283
|
+
if res.returncode != 0:
|
|
284
|
+
logger.warning("Grafana admin secret not found; skipping control-plane Grafana token")
|
|
285
|
+
return
|
|
286
|
+
data = json.loads(res.stdout).get("data", {})
|
|
287
|
+
admin = (base64.b64decode(data.get("adminUser", "")).decode(), base64.b64decode(data.get("adminPassword", "")).decode())
|
|
288
|
+
base = f"https://{self.ingress_host}"
|
|
289
|
+
|
|
290
|
+
current = self._kubectl_quiet(["get", "secret", self.CONTROL_PLANE_GRAFANA_SECRET, "-n", self.CONTROL_PLANE_NAMESPACE,
|
|
291
|
+
"-o", "jsonpath={.data.GRAFANA_API_TOKEN}"])
|
|
292
|
+
if current.returncode == 0 and current.stdout:
|
|
293
|
+
token = base64.b64decode(current.stdout).decode()
|
|
294
|
+
if requests.get(f"{base}/api/user", headers={"Authorization": f"Bearer {token}"}, timeout=15).status_code == 200:
|
|
295
|
+
logger.info("Control-plane Grafana token is valid; keeping it")
|
|
296
|
+
return
|
|
297
|
+
|
|
298
|
+
found = requests.get(f"{base}/api/serviceaccounts/search", params={"query": self.CONTROL_PLANE_SERVICE_ACCOUNT},
|
|
299
|
+
auth=admin, timeout=15)
|
|
300
|
+
found.raise_for_status()
|
|
301
|
+
accounts = [a for a in found.json().get("serviceAccounts", []) if a.get("name") == self.CONTROL_PLANE_SERVICE_ACCOUNT]
|
|
302
|
+
if accounts:
|
|
303
|
+
sa_id = accounts[0]["id"]
|
|
304
|
+
else:
|
|
305
|
+
created = requests.post(f"{base}/api/serviceaccounts", auth=admin, timeout=15,
|
|
306
|
+
json={"name": self.CONTROL_PLANE_SERVICE_ACCOUNT, "role": "Viewer", "isDisabled": False})
|
|
307
|
+
created.raise_for_status()
|
|
308
|
+
sa_id = created.json()["id"]
|
|
309
|
+
issued = requests.post(f"{base}/api/serviceaccounts/{sa_id}/tokens", auth=admin, timeout=15,
|
|
310
|
+
json={"name": f"control-plane-{datetime.now().strftime('%Y%m%d%H%M%S')}"})
|
|
311
|
+
issued.raise_for_status()
|
|
312
|
+
manifest = {
|
|
313
|
+
"apiVersion": "v1", "kind": "Secret", "type": "Opaque",
|
|
314
|
+
"metadata": {"name": self.CONTROL_PLANE_GRAFANA_SECRET, "namespace": self.CONTROL_PLANE_NAMESPACE},
|
|
315
|
+
"stringData": {"GRAFANA_API_TOKEN": issued.json()["key"]},
|
|
316
|
+
}
|
|
317
|
+
self._kubectl_quiet(["create", "namespace", self.CONTROL_PLANE_NAMESPACE])
|
|
318
|
+
applied = self._kubectl_quiet(["apply", "-f", "-"], input_text=json.dumps(manifest))
|
|
319
|
+
if applied.returncode != 0:
|
|
320
|
+
raise Exception("Could not store the control-plane Grafana token")
|
|
321
|
+
logger.info("Stored a new control-plane Grafana token")
|
|
322
|
+
|
|
323
|
+
def render_values_file(self, oauth_client_id, oauth_client_secret):
|
|
324
|
+
"""Render the values file from template"""
|
|
325
|
+
logger.info("Rendering values file from template")
|
|
326
|
+
try:
|
|
327
|
+
context = {
|
|
328
|
+
'chart_name': self.chart_name,
|
|
329
|
+
'chart_repo': self.chart_repo,
|
|
330
|
+
'chart_version': self.chart_version,
|
|
331
|
+
'customer': self.customer,
|
|
332
|
+
'ingress_host': self.ingress_host,
|
|
333
|
+
'cloud_provider': self.cloud_provider,
|
|
334
|
+
'cert_provider': self.cert_provider,
|
|
335
|
+
'monitoring_k8s_sa': self.monitoring_k8s_sa,
|
|
336
|
+
'oauth_client_id': oauth_client_id,
|
|
337
|
+
'oauth_client_secret': oauth_client_secret,
|
|
338
|
+
'oauth_auth_url': self.oauth_auth_url,
|
|
339
|
+
'oauth_token_url': self.oauth_token_url,
|
|
340
|
+
'oauth_api_url': self.oauth_api_url,
|
|
341
|
+
'oauth_signout_redirect_url': f"{self.oauth_signout_redirect_url}&client_id={oauth_client_id}",
|
|
342
|
+
'monitoring_agent_email': self.monitoring_agent_email,
|
|
343
|
+
'alert_email': self.user_email or self.monitoring_agent_email
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
# Ensure output directory exists
|
|
347
|
+
output_dir = os.path.dirname(self.values_path)
|
|
348
|
+
if not os.path.exists(output_dir):
|
|
349
|
+
logger.info(f"Creating output directory: {output_dir}")
|
|
350
|
+
os.makedirs(output_dir, exist_ok=True)
|
|
351
|
+
|
|
352
|
+
self.render_template(self.render_template_values_path, self.values_path, context)
|
|
353
|
+
logger.info(f"Successfully rendered values file to {self.values_path}")
|
|
354
|
+
except Exception as e:
|
|
355
|
+
logger.error(f"Failed to render values file: {str(e)}")
|
|
356
|
+
raise
|
|
357
|
+
|
|
358
|
+
LEGACY_DASHBOARD_CONFIGMAPS = [
|
|
359
|
+
"grafana-dashboards-bi-platform", "grafana-dashboards-k8s-microservices", "grafana-dashboards-k8s-nodes",
|
|
360
|
+
"grafana-dashboards-k8s-cluster", "grafana-dashboards-k8s-storage", "bi-gcp-infra-overview", "bi-platform-alerts",
|
|
361
|
+
]
|
|
362
|
+
|
|
363
|
+
def feature_enabled(self, requires):
|
|
364
|
+
"""True when every key of ``requires`` matches the deployment's features.
|
|
365
|
+
|
|
366
|
+
Values may be a scalar or a list of allowed values. Unknown features
|
|
367
|
+
(not passed by the CLI) are treated as enabled so nothing is hidden by
|
|
368
|
+
accident on direct deployer runs.
|
|
369
|
+
"""
|
|
370
|
+
for key, wanted in (requires or {}).items():
|
|
371
|
+
actual = self.platform_features.get(key)
|
|
372
|
+
if actual is None:
|
|
373
|
+
continue
|
|
374
|
+
allowed = wanted if isinstance(wanted, list) else [wanted]
|
|
375
|
+
if actual not in allowed:
|
|
376
|
+
return False
|
|
377
|
+
return True
|
|
378
|
+
|
|
379
|
+
@staticmethod
|
|
380
|
+
def _parse_requires(text):
|
|
381
|
+
"""``streaming=true,bi=superset`` -> {"streaming": True, "bi": "superset"}."""
|
|
382
|
+
out = {}
|
|
383
|
+
for part in filter(None, (text or "").split(",")):
|
|
384
|
+
key, _, value = part.partition("=")
|
|
385
|
+
out[key.strip()] = {"true": True, "false": False}.get(value.strip(), value.strip())
|
|
386
|
+
return out
|
|
387
|
+
|
|
388
|
+
def filter_dashboard(self, dashboard):
|
|
389
|
+
"""Drop panels whose ``fast2dev_requires`` does not match (Grafana compacts the grid)."""
|
|
390
|
+
kept = []
|
|
391
|
+
for panel in dashboard.get("panels", []):
|
|
392
|
+
requires = panel.pop("fast2dev_requires", None)
|
|
393
|
+
if requires and not self.feature_enabled(requires):
|
|
394
|
+
continue
|
|
395
|
+
kept.append(panel)
|
|
396
|
+
dashboard["panels"] = kept
|
|
397
|
+
return dashboard
|
|
398
|
+
|
|
399
|
+
def filter_alert_rules(self):
|
|
400
|
+
"""Remove alert rules whose ``requires`` label does not match this deployment.
|
|
401
|
+
|
|
402
|
+
Removed rules are added to ``deleteRules`` so a feature switched off later
|
|
403
|
+
also loses its alerts in Grafana.
|
|
404
|
+
"""
|
|
405
|
+
import yaml
|
|
406
|
+
with open(self.alert_values_path) as f:
|
|
407
|
+
configmap = yaml.safe_load(f)
|
|
408
|
+
for key, text in configmap.get("data", {}).items():
|
|
409
|
+
doc = yaml.safe_load(text)
|
|
410
|
+
deletes = {d["uid"] for d in doc.get("deleteRules") or []}
|
|
411
|
+
for group in doc.get("groups", []):
|
|
412
|
+
kept = []
|
|
413
|
+
for rule in group.get("rules", []):
|
|
414
|
+
if self.feature_enabled(self._parse_requires(rule.get("labels", {}).get("requires"))):
|
|
415
|
+
kept.append(rule)
|
|
416
|
+
else:
|
|
417
|
+
deletes.add(rule["uid"])
|
|
418
|
+
logger.info(f"Skipping alert rule {rule['uid']}: not part of this deployment")
|
|
419
|
+
group["rules"] = kept
|
|
420
|
+
doc["groups"] = [g for g in doc.get("groups", []) if g["rules"]]
|
|
421
|
+
doc["deleteRules"] = [{"orgId": 1, "uid": uid} for uid in sorted(deletes)]
|
|
422
|
+
configmap["data"][key] = yaml.safe_dump(doc, sort_keys=False, allow_unicode=True, width=1000)
|
|
423
|
+
with open(self.alert_values_path, "w") as f:
|
|
424
|
+
yaml.safe_dump(configmap, f, sort_keys=False, allow_unicode=True, width=1000)
|
|
425
|
+
|
|
426
|
+
def build_dashboard_configmaps(self):
|
|
427
|
+
"""One ConfigMap per dashboard JSON under dashboards/<folder>/, loaded by the Grafana sidecar.
|
|
428
|
+
|
|
429
|
+
dashboards/folders.yaml maps each folder directory to its Grafana folder title.
|
|
430
|
+
Folders listed with a ``cloud_provider`` are only deployed on that provider.
|
|
431
|
+
"""
|
|
432
|
+
import yaml
|
|
433
|
+
root = Path(self.dashboards_dir)
|
|
434
|
+
folders_file = root / "folders.yaml"
|
|
435
|
+
if not folders_file.exists():
|
|
436
|
+
return []
|
|
437
|
+
folders = yaml.safe_load(folders_file.read_text()) or {}
|
|
438
|
+
requirements_file = root / "requirements.yaml"
|
|
439
|
+
requirements = yaml.safe_load(requirements_file.read_text()) if requirements_file.exists() else {}
|
|
440
|
+
manifests = []
|
|
441
|
+
for folder_dir, meta in folders.items():
|
|
442
|
+
if meta.get("cloud_provider") and meta["cloud_provider"] != self.cloud_provider:
|
|
443
|
+
continue
|
|
444
|
+
if not self.feature_enabled(meta.get("requires")):
|
|
445
|
+
logger.info(f"Skipping dashboard folder {folder_dir}: not part of this deployment")
|
|
446
|
+
continue
|
|
447
|
+
for dashboard in sorted((root / folder_dir).glob("*.json")):
|
|
448
|
+
data = json.loads(dashboard.read_text())
|
|
449
|
+
uid = data.get("uid") or dashboard.stem
|
|
450
|
+
if not self.feature_enabled((requirements or {}).get(uid)):
|
|
451
|
+
logger.info(f"Skipping dashboard {uid}: not part of this deployment")
|
|
452
|
+
continue
|
|
453
|
+
manifests.append({
|
|
454
|
+
"apiVersion": "v1",
|
|
455
|
+
"kind": "ConfigMap",
|
|
456
|
+
"metadata": {
|
|
457
|
+
"name": f"grafana-dashboard-{uid}".lower()[:63],
|
|
458
|
+
"namespace": self.namespace,
|
|
459
|
+
"labels": {"grafana_dashboard": "1", "app.kubernetes.io/part-of": "fast2dev-observability"},
|
|
460
|
+
"annotations": {"grafana_folder": meta["title"]},
|
|
461
|
+
},
|
|
462
|
+
"data": {dashboard.name: json.dumps(self.filter_dashboard(data), indent=2)},
|
|
463
|
+
})
|
|
464
|
+
return manifests
|
|
465
|
+
|
|
466
|
+
def deploy_dashboards(self):
|
|
467
|
+
"""Apply repo dashboards, prune removed ones and drop the legacy dashboard ConfigMaps."""
|
|
468
|
+
manifests = self.build_dashboard_configmaps()
|
|
469
|
+
self.execute_command(["kubectl", "delete", "configmap", *self.LEGACY_DASHBOARD_CONFIGMAPS,
|
|
470
|
+
"-n", self.namespace, "--ignore-not-found", "--kubeconfig", self.kube_config])
|
|
471
|
+
wanted = {m["metadata"]["name"] for m in manifests}
|
|
472
|
+
existing = self.execute_command(["kubectl", "get", "configmap", "-n", self.namespace,
|
|
473
|
+
"-l", "app.kubernetes.io/part-of=fast2dev-observability,grafana_dashboard=1",
|
|
474
|
+
"-o", "jsonpath={.items[*].metadata.name}", "--kubeconfig", self.kube_config])
|
|
475
|
+
stale = [name for name in (existing or "").split() if name not in wanted]
|
|
476
|
+
if stale:
|
|
477
|
+
self.execute_command(["kubectl", "delete", "configmap", *stale, "-n", self.namespace,
|
|
478
|
+
"--kubeconfig", self.kube_config])
|
|
479
|
+
if not manifests:
|
|
480
|
+
return
|
|
481
|
+
manifest_path = f"/tmp/{self.customer}-grafana-dashboards.json"
|
|
482
|
+
with open(manifest_path, "w") as f:
|
|
483
|
+
json.dump({"apiVersion": "v1", "kind": "List", "items": manifests}, f)
|
|
484
|
+
self.execute_command(["kubectl", "apply", "--server-side", "--force-conflicts", "-f", manifest_path,
|
|
485
|
+
"--kubeconfig", self.kube_config])
|
|
486
|
+
os.remove(manifest_path)
|
|
487
|
+
logger.info(f"Deployed {len(manifests)} dashboards, pruned {len(stale)}")
|
|
488
|
+
|
|
489
|
+
def render_cm_files(self):
|
|
490
|
+
"""Render ConfigMap files from templates"""
|
|
491
|
+
logger.info("Rendering ConfigMap files")
|
|
492
|
+
try:
|
|
493
|
+
context = {
|
|
494
|
+
'project_id': self.project_id
|
|
495
|
+
}
|
|
496
|
+
|
|
497
|
+
# Ensure output directories exist
|
|
498
|
+
for path in [self.alert_values_path]:
|
|
499
|
+
output_dir = os.path.dirname(path)
|
|
500
|
+
if not os.path.exists(output_dir):
|
|
501
|
+
logger.info(f"Creating output directory: {output_dir}")
|
|
502
|
+
os.makedirs(output_dir, exist_ok=True)
|
|
503
|
+
|
|
504
|
+
self.render_template(self.alert_render_template_values_path, self.alert_values_path, context)
|
|
505
|
+
logger.info("Successfully rendered ConfigMap files")
|
|
506
|
+
except Exception as e:
|
|
507
|
+
logger.error(f"Failed to render ConfigMap files: {str(e)}")
|
|
508
|
+
raise
|
|
509
|
+
|
|
510
|
+
def render_template(self, template_path, output_path, context):
|
|
511
|
+
"""Render a Jinja2 template to a file"""
|
|
512
|
+
try:
|
|
513
|
+
logger.debug(f"Rendering template {template_path} to {output_path}")
|
|
514
|
+
env = Environment(loader=FileSystemLoader(os.path.dirname(template_path)))
|
|
515
|
+
template = env.get_template(os.path.basename(template_path))
|
|
516
|
+
output = template.render({**context, 'size': self.size, 'platform_environment': self.platform_environment})
|
|
517
|
+
|
|
518
|
+
with open(output_path, 'w') as f:
|
|
519
|
+
f.write(output)
|
|
520
|
+
logger.debug("Template rendered successfully")
|
|
521
|
+
except TemplateNotFound:
|
|
522
|
+
logger.error(f"Template not found: {template_path}")
|
|
523
|
+
raise FileNotFoundError(f"Template not found: {template_path}")
|
|
524
|
+
except Exception as e:
|
|
525
|
+
logger.error(f"Error rendering template {template_path}: {str(e)}")
|
|
526
|
+
raise
|
|
527
|
+
|
|
528
|
+
def get_secret_from_vault(self, secret_name, secret_path):
|
|
529
|
+
"""Retrieve the secret from the local vault JSON file."""
|
|
530
|
+
logger.info(f"Getting secret {secret_name} from local vault")
|
|
531
|
+
try:
|
|
532
|
+
with open(self.secret_file, 'r') as f:
|
|
533
|
+
vault_data = json.load(f)
|
|
534
|
+
|
|
535
|
+
# Navigate through the JSON structure based on the secret path
|
|
536
|
+
current = vault_data
|
|
537
|
+
for part in secret_path.strip('/').split('/'):
|
|
538
|
+
if part not in current:
|
|
539
|
+
raise KeyError(f"Path {secret_path} not found in vault structure")
|
|
540
|
+
current = current[part]
|
|
541
|
+
|
|
542
|
+
if secret_name not in current:
|
|
543
|
+
raise KeyError(f"Secret {secret_name} not found at path {secret_path}")
|
|
544
|
+
|
|
545
|
+
return current[secret_name]
|
|
546
|
+
except Exception as e:
|
|
547
|
+
logger.error(f"Failed to get secret from local vault: {str(e)}")
|
|
548
|
+
raise
|
|
549
|
+
|
|
550
|
+
def run(self):
|
|
551
|
+
"""Main execution method"""
|
|
552
|
+
logger.info(f"Starting Platform Monitoring deployment for customer: {self.customer}")
|
|
553
|
+
try:
|
|
554
|
+
# Get secrets from vault
|
|
555
|
+
# Get OAuth secrets
|
|
556
|
+
oauth_client_id = self.get_secret_from_vault(
|
|
557
|
+
secret_name="CLIENT_ID",
|
|
558
|
+
secret_path="/data-platform-monitoring/sso-clients-secrets/",
|
|
559
|
+
)
|
|
560
|
+
oauth_client_secret = self.get_secret_from_vault(
|
|
561
|
+
secret_name="CLIENT_SECRET",
|
|
562
|
+
secret_path="/data-platform-monitoring/sso-clients-secrets/",
|
|
563
|
+
)
|
|
564
|
+
|
|
565
|
+
self.render_values_file(
|
|
566
|
+
oauth_client_id=oauth_client_id,
|
|
567
|
+
oauth_client_secret=oauth_client_secret
|
|
568
|
+
)
|
|
569
|
+
|
|
570
|
+
self.render_cm_files()
|
|
571
|
+
self.deploy_config_maps()
|
|
572
|
+
|
|
573
|
+
# Deploy service
|
|
574
|
+
logger.info("Deploying monitoring service")
|
|
575
|
+
self.deploy_service(
|
|
576
|
+
chart_repo_name=self.chart_repo_name,
|
|
577
|
+
chart_repo=self.chart_repo,
|
|
578
|
+
deployment_name=self.deployment_name,
|
|
579
|
+
chart_name=self.chart_name,
|
|
580
|
+
chart_version=self.chart_version,
|
|
581
|
+
namespace=self.namespace,
|
|
582
|
+
values_path=self.values_path
|
|
583
|
+
)
|
|
584
|
+
|
|
585
|
+
try:
|
|
586
|
+
self.ensure_control_plane_grafana_token()
|
|
587
|
+
except Exception as exc:
|
|
588
|
+
logger.warning(f"Control-plane Grafana token not set: {exc}")
|
|
589
|
+
|
|
590
|
+
# Metadata Collection
|
|
591
|
+
app_version = self.get_deployed_app_version(self.deployment_name, self.namespace)
|
|
592
|
+
deployment_record = {
|
|
593
|
+
"customer": self.customer,
|
|
594
|
+
"customer_main_domain": f"{self.customer}.{self.domain_name}",
|
|
595
|
+
"deployment_environment": self.deployment_environment,
|
|
596
|
+
"deployment_name": self.deployment_name,
|
|
597
|
+
"chart_name": self.chart_name,
|
|
598
|
+
"chart_version": self.chart_version,
|
|
599
|
+
"app_name": self.app_name,
|
|
600
|
+
"app_version": app_version,
|
|
601
|
+
"deploy_date": datetime.now().strftime("%Y-%m-%d")
|
|
602
|
+
}
|
|
603
|
+
|
|
604
|
+
logger.info("Adding deployment record to metadata collector")
|
|
605
|
+
self.metadata_collector.add_deployment_record(deployment_record)
|
|
606
|
+
logger.info("Platform Monitoring deployment completed successfully")
|
|
607
|
+
return "Platform Monitoring deployed successfully"
|
|
608
|
+
|
|
609
|
+
except Exception as e:
|
|
610
|
+
logger.error(f"Deployment failed: {str(e)}")
|
|
611
|
+
raise
|
|
612
|
+
|
|
613
|
+
@classmethod
|
|
614
|
+
def from_cli_args(cls, args):
|
|
615
|
+
"""Create a PlatformMonitoring instance from CLI arguments"""
|
|
616
|
+
logger.info("Creating PlatformMonitoring instance from CLI arguments")
|
|
617
|
+
return cls(
|
|
618
|
+
chart_version=args.chart_version,
|
|
619
|
+
customer=args.customer,
|
|
620
|
+
metadata_collector=args.metadata_collector,
|
|
621
|
+
cloud_provider=args.cloud_provider,
|
|
622
|
+
domain_name=args.domain_name,
|
|
623
|
+
project_id=args.project_id,
|
|
624
|
+
cluster_name=args.cluster_name,
|
|
625
|
+
kube_config_path=args.kube_config_path,
|
|
626
|
+
platform_environment=getattr(args, 'environment', None),
|
|
627
|
+
user_email=getattr(args, 'user_email', None),
|
|
628
|
+
platform_features=getattr(args, 'platform_features', None),
|
|
629
|
+
namespace=args.namespace
|
|
630
|
+
)
|
|
631
|
+
|
|
632
|
+
if __name__ == "__main__":
|
|
633
|
+
# Configure file logging if running as main script
|
|
634
|
+
log_file = "services_monitoring_deployment.log"
|
|
635
|
+
file_handler = logging.FileHandler(log_file)
|
|
636
|
+
file_handler.setFormatter(logging.Formatter('%(asctime)s - %(name)s - %(levelname)s - %(message)s'))
|
|
637
|
+
logger.addHandler(file_handler)
|
|
638
|
+
logger.info(f"Starting Platform Monitoring deployment script, logging to {log_file}")
|
|
639
|
+
|
|
640
|
+
parser = argparse.ArgumentParser(
|
|
641
|
+
description="Platform Monitoring Deployment Tool",
|
|
642
|
+
formatter_class=argparse.RawDescriptionHelpFormatter
|
|
643
|
+
)
|
|
644
|
+
|
|
645
|
+
# Required core arguments
|
|
646
|
+
required_args = parser.add_argument_group('required core arguments')
|
|
647
|
+
required_args.add_argument(
|
|
648
|
+
'--customer',
|
|
649
|
+
required=True,
|
|
650
|
+
help='Customer tenant name (lowercase letters, numbers, and hyphens only)'
|
|
651
|
+
)
|
|
652
|
+
required_args.add_argument(
|
|
653
|
+
'--chart_version',
|
|
654
|
+
required=True,
|
|
655
|
+
help='Chart version for Grafana'
|
|
656
|
+
)
|
|
657
|
+
required_args.add_argument(
|
|
658
|
+
'--cloud_provider',
|
|
659
|
+
required=True,
|
|
660
|
+
choices=['gcp', 'aws', 'azure', 'self-managed'],
|
|
661
|
+
help='Cloud provider where the cluster is running'
|
|
662
|
+
)
|
|
663
|
+
required_args.add_argument(
|
|
664
|
+
'--domain_name',
|
|
665
|
+
required=True,
|
|
666
|
+
help='Domain name for the customer'
|
|
667
|
+
)
|
|
668
|
+
|
|
669
|
+
# Optional arguments
|
|
670
|
+
optional_args = parser.add_argument_group('optional arguments')
|
|
671
|
+
optional_args.add_argument(
|
|
672
|
+
'--project_id',
|
|
673
|
+
help='Cloud provider project ID (default: fast2dev-{customer})'
|
|
674
|
+
)
|
|
675
|
+
optional_args.add_argument(
|
|
676
|
+
'--cluster_name',
|
|
677
|
+
help='Kubernetes cluster name (default: fast2dev-{customer}-platform)'
|
|
678
|
+
)
|
|
679
|
+
optional_args.add_argument(
|
|
680
|
+
'--kube_config_path',
|
|
681
|
+
help='Path to kubeconfig file (default: /tmp/{cluster_name}-kubeconfig.yaml)'
|
|
682
|
+
)
|
|
683
|
+
optional_args.add_argument(
|
|
684
|
+
'--namespace',
|
|
685
|
+
default='monitoring',
|
|
686
|
+
help='Kubernetes namespace for deployment (default: monitoring)'
|
|
687
|
+
)
|
|
688
|
+
optional_args.add_argument(
|
|
689
|
+
'--metadata_file',
|
|
690
|
+
default='deployment_metadata.json',
|
|
691
|
+
help='Path to metadata file (default: deployment_metadata.json)'
|
|
692
|
+
)
|
|
693
|
+
optional_args.add_argument(
|
|
694
|
+
'--skip_metadata',
|
|
695
|
+
action='store_true',
|
|
696
|
+
help='Skip metadata collection (for CLI usage)'
|
|
697
|
+
)
|
|
698
|
+
optional_args.add_argument(
|
|
699
|
+
'--debug',
|
|
700
|
+
action='store_true',
|
|
701
|
+
help='Enable debug logging'
|
|
702
|
+
)
|
|
703
|
+
|
|
704
|
+
# Parse arguments
|
|
705
|
+
parser.add_argument('--environment', choices=ENVIRONMENTS, default=None, help='Platform environment used for sizing (production or development)')
|
|
706
|
+
args = parser.parse_args()
|
|
707
|
+
|
|
708
|
+
# Set debug level if requested
|
|
709
|
+
if args.debug:
|
|
710
|
+
logger.setLevel(logging.DEBUG)
|
|
711
|
+
logger.debug("Debug logging enabled")
|
|
712
|
+
|
|
713
|
+
try:
|
|
714
|
+
logger.info(f"Deploying Platform Monitoring for customer: {args.customer}")
|
|
715
|
+
logger.info(f"Cloud provider: {args.cloud_provider}")
|
|
716
|
+
|
|
717
|
+
# Create a simple metadata collector for CLI usage
|
|
718
|
+
class SimpleMetadataCollector:
|
|
719
|
+
def __init__(self, metadata_file):
|
|
720
|
+
self.metadata_file = metadata_file
|
|
721
|
+
self.deployment_records = []
|
|
722
|
+
if os.path.exists(metadata_file):
|
|
723
|
+
try:
|
|
724
|
+
with open(metadata_file, 'r') as f:
|
|
725
|
+
self.deployment_records = json.load(f)
|
|
726
|
+
logger.info(f"Loaded {len(self.deployment_records)} existing deployment records")
|
|
727
|
+
except json.JSONDecodeError:
|
|
728
|
+
logger.warning(f"Could not parse {metadata_file}, starting with empty records")
|
|
729
|
+
self.deployment_records = []
|
|
730
|
+
else:
|
|
731
|
+
logger.info(f"Metadata file {metadata_file} not found, will create new file")
|
|
732
|
+
|
|
733
|
+
def add_deployment_record(self, record):
|
|
734
|
+
self.deployment_records.append(record)
|
|
735
|
+
try:
|
|
736
|
+
# Ensure directory exists
|
|
737
|
+
os.makedirs(os.path.dirname(os.path.abspath(self.metadata_file)), exist_ok=True)
|
|
738
|
+
with open(self.metadata_file, 'w') as f:
|
|
739
|
+
json.dump(self.deployment_records, f, indent=2)
|
|
740
|
+
logger.info(f"Deployment record added to {self.metadata_file}")
|
|
741
|
+
except Exception as e:
|
|
742
|
+
logger.error(f"Failed to write metadata to {self.metadata_file}: {str(e)}")
|
|
743
|
+
|
|
744
|
+
# Use the appropriate metadata collector
|
|
745
|
+
if args.skip_metadata:
|
|
746
|
+
logger.info("Metadata collection is disabled")
|
|
747
|
+
class DummyMetadataCollector:
|
|
748
|
+
def add_deployment_record(self, record):
|
|
749
|
+
logger.info("Metadata collection skipped")
|
|
750
|
+
metadata_collector = DummyMetadataCollector()
|
|
751
|
+
else:
|
|
752
|
+
logger.info(f"Using metadata file: {args.metadata_file}")
|
|
753
|
+
metadata_collector = SimpleMetadataCollector(args.metadata_file)
|
|
754
|
+
|
|
755
|
+
# Add metadata collector to args for from_cli_args method
|
|
756
|
+
args.metadata_collector = metadata_collector
|
|
757
|
+
|
|
758
|
+
# Create manager instance using the CLI factory method
|
|
759
|
+
logger.info("Creating PlatformMonitoring instance")
|
|
760
|
+
manager = PlatformMonitoring.from_cli_args(args)
|
|
761
|
+
|
|
762
|
+
# Run the deployment
|
|
763
|
+
logger.info("Starting deployment process")
|
|
764
|
+
result = manager.run()
|
|
765
|
+
|
|
766
|
+
logger.info("Execution Result: " + str(result))
|
|
767
|
+
print("Execution Result:")
|
|
768
|
+
print(result)
|
|
769
|
+
|
|
770
|
+
except FileNotFoundError as e:
|
|
771
|
+
logger.error(f"File not found error: {str(e)}")
|
|
772
|
+
print(f"File not found error: {str(e)}")
|
|
773
|
+
sys.exit(1)
|
|
774
|
+
except ValueError as e:
|
|
775
|
+
logger.error(f"Invalid value error: {str(e)}")
|
|
776
|
+
print(f"Invalid value error: {str(e)}")
|
|
777
|
+
sys.exit(1)
|
|
778
|
+
except subprocess.CalledProcessError as e:
|
|
779
|
+
logger.error(f"Command execution failed: {str(e)}")
|
|
780
|
+
print(f"Command execution failed: {str(e)}")
|
|
781
|
+
sys.exit(1)
|
|
782
|
+
except Exception as e:
|
|
783
|
+
logger.error(f"An unexpected error occurred: {str(e)}", exc_info=True)
|
|
784
|
+
print(f"An unexpected error occurred: {str(e)}")
|
|
785
|
+
sys.exit(1)
|
|
786
|
+
finally:
|
|
787
|
+
logger.info("Platform Monitoring deployment script completed")
|