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,963 @@
|
|
|
1
|
+
import subprocess
|
|
2
|
+
import os
|
|
3
|
+
from datetime import datetime
|
|
4
|
+
import json
|
|
5
|
+
import sys
|
|
6
|
+
import argparse
|
|
7
|
+
import logging
|
|
8
|
+
from pathlib import Path
|
|
9
|
+
from jinja2 import Environment, FileSystemLoader, TemplateNotFound # type: ignore
|
|
10
|
+
from cli.state import vault_structure_path
|
|
11
|
+
from utils.helm_utils import add_or_keep_helm_repo, wait_for_pods_ready
|
|
12
|
+
from utils.environment_profiles import ENVIRONMENTS, resolve_environment, service_size
|
|
13
|
+
|
|
14
|
+
# Configure logging
|
|
15
|
+
logging.basicConfig(
|
|
16
|
+
level=logging.INFO,
|
|
17
|
+
format='%(asctime)s - %(name)s - %(levelname)s - %(message)s',
|
|
18
|
+
handlers=[
|
|
19
|
+
logging.StreamHandler(sys.stdout)
|
|
20
|
+
]
|
|
21
|
+
)
|
|
22
|
+
logger = logging.getLogger('cert_manager_deployer')
|
|
23
|
+
|
|
24
|
+
class CertManager:
|
|
25
|
+
def __init__(self, chart_version, customer, metadata_collector, user_email, cloud_provider, domain_name,
|
|
26
|
+
project_id=None, aws_region=None, cluster_name=None, kube_config_path=None, namespace="cert-manager", dry_run=False, platform_environment=None,
|
|
27
|
+
cert_provider=None, cert_email=None, cert_staging=False,
|
|
28
|
+
pdns_webhook_chart_version="1.0.0",
|
|
29
|
+
raw_chart_name="cert-manager-extras",
|
|
30
|
+
raw_chart_repo="https://kube-core.github.io/helm-charts",
|
|
31
|
+
state=None):
|
|
32
|
+
self.deployment_environment = "infrastructure"
|
|
33
|
+
self.namespace = namespace
|
|
34
|
+
self.customer = customer
|
|
35
|
+
self.domain_name = domain_name
|
|
36
|
+
self.cloud_provider = cloud_provider
|
|
37
|
+
self.user_email = user_email
|
|
38
|
+
self.metadata_collector = metadata_collector
|
|
39
|
+
self.dry_run = dry_run
|
|
40
|
+
self.platform_environment = resolve_environment(platform_environment, cloud_provider)
|
|
41
|
+
self.size = service_size("cert_manager", self.platform_environment)
|
|
42
|
+
self.state = state
|
|
43
|
+
# Cert-manager issuer config (non-secret knobs) — read by the
|
|
44
|
+
# chart's template_values.yaml via these fields. Actual creds
|
|
45
|
+
# live in ``state.config['secrets_cert_*']`` and are read by
|
|
46
|
+
# the template directly (no in-deployer copies).
|
|
47
|
+
#
|
|
48
|
+
# Prefer the explicit ``cert_provider`` kwarg (CLI flag); fall
|
|
49
|
+
# back to ``state.config['secrets_cert_provider']`` collected
|
|
50
|
+
# by the wizard. We no longer default to ``"selfsigned"`` —
|
|
51
|
+
# silently picking self-signed when the user actually chose a
|
|
52
|
+
# real cert provider in the wizard is the bug we're fixing.
|
|
53
|
+
if cert_provider:
|
|
54
|
+
self.cert_provider = cert_provider
|
|
55
|
+
elif state is not None and state.config.get("secrets_cert_provider"):
|
|
56
|
+
self.cert_provider = state.config["secrets_cert_provider"]
|
|
57
|
+
else:
|
|
58
|
+
raise ValueError(
|
|
59
|
+
"CertManager: no cert_provider supplied. Pass --cert-provider "
|
|
60
|
+
"<slug> or run the wizard (which collects "
|
|
61
|
+
"secrets_cert_provider) before deploying."
|
|
62
|
+
)
|
|
63
|
+
answers = state.config if state is not None else {}
|
|
64
|
+
self.cert_email = cert_email or answers.get("secrets_cert_email") or user_email
|
|
65
|
+
self.cert_staging = bool(cert_staging) or str(answers.get("secrets_cert_staging", "")).lower() == "true"
|
|
66
|
+
|
|
67
|
+
self.secret_file = str(vault_structure_path(customer))
|
|
68
|
+
if not os.path.exists(self.secret_file):
|
|
69
|
+
raise FileNotFoundError(f"Secret file not found: {self.secret_file}")
|
|
70
|
+
|
|
71
|
+
# Service specific
|
|
72
|
+
self.chart_version = chart_version
|
|
73
|
+
self.deployment_name = "cert-manager"
|
|
74
|
+
self.chart_repo_name = "jetstack"
|
|
75
|
+
self.chart_name = "jetstack/cert-manager"
|
|
76
|
+
self.chart_repo = "https://charts.jetstack.io"
|
|
77
|
+
self.values_path = "charts/infra_services_charts/cert_manager/values.yaml"
|
|
78
|
+
self.render_template_values_path = "charts/infra_services_charts/cert_manager/template_values.yaml"
|
|
79
|
+
# Extras (ClusterIssuer, Certificate, ExternalSecret) are
|
|
80
|
+
# installed via the generic helm chart kube-core/raw. We render
|
|
81
|
+
# a values file containing `manifests:` (a list of K8s resources)
|
|
82
|
+
# and install the chart with `helm upgrade -i --create-namespace`.
|
|
83
|
+
self.raw_chart_name = raw_chart_name
|
|
84
|
+
self.raw_chart_repo = raw_chart_repo
|
|
85
|
+
self.raw_release_name = "cert-manager-extras"
|
|
86
|
+
self.raw_values_path = "charts/infra_services_charts/cert_manager/values_extra.yaml"
|
|
87
|
+
self.raw_render_template_values_path = "charts/infra_services_charts/cert_manager/template_values_extra.yaml"
|
|
88
|
+
|
|
89
|
+
# Cloud Provider Specific
|
|
90
|
+
try:
|
|
91
|
+
if self.cloud_provider == "gcp":
|
|
92
|
+
if project_id and project_id.strip():
|
|
93
|
+
self.project_id = project_id
|
|
94
|
+
logger.info(f"Using provided project_id: {self.project_id}")
|
|
95
|
+
else:
|
|
96
|
+
self.project_id = f"fast2dev-{customer}"
|
|
97
|
+
logger.warning(f"No project_id provided, using default: {self.project_id}")
|
|
98
|
+
self.cluster_name = cluster_name if cluster_name else f"fast2dev-{customer}-platform"
|
|
99
|
+
self.service_account_name = f"cert-manager-k8s-sa@{self.project_id}.iam.gserviceaccount.com"
|
|
100
|
+
self.aws_region = None
|
|
101
|
+
logger.info(f"Configured for GCP with project ID: {self.project_id}")
|
|
102
|
+
elif self.cloud_provider == "aws": # Leave for future clouds. Not supported yet
|
|
103
|
+
self.service_account_name = None
|
|
104
|
+
self.project_id = None
|
|
105
|
+
self.aws_region = aws_region
|
|
106
|
+
self.cluster_name = cluster_name if cluster_name else f"fast2dev-{customer}-platform"
|
|
107
|
+
logger.info(f"Configured for AWS with cluster: {self.cluster_name}")
|
|
108
|
+
elif self.cloud_provider == "azure": # Leave for future clouds. Not supported yet
|
|
109
|
+
self.service_account_name = None
|
|
110
|
+
self.project_id = None
|
|
111
|
+
self.cluster_name = cluster_name if cluster_name else f"fast2dev-{customer}-platform"
|
|
112
|
+
self.aws_region = None
|
|
113
|
+
logger.info(f"Configured for Azure with cluster: {self.cluster_name}")
|
|
114
|
+
elif self.cloud_provider == "self-managed":
|
|
115
|
+
self.aws_region = None
|
|
116
|
+
self.service_account_name = None
|
|
117
|
+
self.project_id = None
|
|
118
|
+
self.cluster_name = cluster_name if cluster_name else f"fast2dev-{customer}-platform"
|
|
119
|
+
self.csi_driver_deployment_name = "cert-manager-csi-driver"
|
|
120
|
+
self.csi_driver_chart_name = "jetstack/cert-manager-csi-driver"
|
|
121
|
+
self.csi_driver_values_path = "charts/infra_services_charts/cert_manager/csi_driver_values.yaml"
|
|
122
|
+
self.csi_driver_chart_version = "v0.10.2"
|
|
123
|
+
self.pdns_webhook_deployment_name = "cert-manager-webhook-pdns"
|
|
124
|
+
self.pdns_webhook_chart_name = "zachomedia/cert-manager-webhook-pdns"
|
|
125
|
+
self.pdns_webhook_chart_repo_name = "zachomedia"
|
|
126
|
+
self.pdns_webhook_chart_repo = "https://zachomedia.github.io/cert-manager-webhook-pdns"
|
|
127
|
+
self.pdns_webhook_render_template_values_path = "charts/infra_services_charts/cert_manager/template_pdns_webhook_values.yaml"
|
|
128
|
+
self.pdns_webhook_values_path = "charts/infra_services_charts/cert_manager/pdns_webhook_values.yaml"
|
|
129
|
+
self.pdns_webhook_chart_version = pdns_webhook_chart_version
|
|
130
|
+
logger.info(f"Configured for self-managed with cluster: {self.cluster_name}")
|
|
131
|
+
else:
|
|
132
|
+
raise ValueError(f"Unsupported cloud provider: {self.cloud_provider}")
|
|
133
|
+
except Exception as e:
|
|
134
|
+
logger.error(f"Error during cloud provider configuration: {str(e)}")
|
|
135
|
+
raise
|
|
136
|
+
|
|
137
|
+
# Set kubeconfig path after cluster_name is properly initialized
|
|
138
|
+
self.kube_config = kube_config_path if kube_config_path else f'/tmp/{self.cluster_name}-kubeconfig.yaml'
|
|
139
|
+
logger.info(f"Using kubeconfig: {self.kube_config}")
|
|
140
|
+
|
|
141
|
+
# Check if kubeconfig exists
|
|
142
|
+
if not os.path.exists(self.kube_config):
|
|
143
|
+
logger.warning(f"Kubeconfig file not found at {self.kube_config}. Deployment may fail.")
|
|
144
|
+
|
|
145
|
+
# MetadataCollection
|
|
146
|
+
self.app_name = self.chart_name.split('/')[1]
|
|
147
|
+
|
|
148
|
+
# Validate template paths
|
|
149
|
+
self._validate_template_paths()
|
|
150
|
+
|
|
151
|
+
def _validate_template_paths(self):
|
|
152
|
+
"""Validate that all required template files exist"""
|
|
153
|
+
required_paths = [
|
|
154
|
+
self.render_template_values_path,
|
|
155
|
+
self.raw_render_template_values_path,
|
|
156
|
+
]
|
|
157
|
+
# pdns webhook is only configured for self-managed clusters.
|
|
158
|
+
pdns_tpl = getattr(self, "pdns_webhook_render_template_values_path", None)
|
|
159
|
+
if pdns_tpl:
|
|
160
|
+
required_paths.append(pdns_tpl)
|
|
161
|
+
for path in required_paths:
|
|
162
|
+
template_path = Path(path)
|
|
163
|
+
if not template_path.exists():
|
|
164
|
+
logger.error(f"Template file not found: {template_path}")
|
|
165
|
+
raise FileNotFoundError(f"Template file not found: {template_path}")
|
|
166
|
+
logger.debug(f"Template file validated: {template_path}")
|
|
167
|
+
|
|
168
|
+
def deploy_service(self, chart_repo_name, chart_repo, deployment_name, chart_name, chart_version, namespace, values_path):
|
|
169
|
+
"""Install CRDs, helm chart, wait for CRDs, then kube-core/raw extras."""
|
|
170
|
+
logger.info(f"Deploying {deployment_name} in namespace {namespace}")
|
|
171
|
+
|
|
172
|
+
if not os.path.exists(values_path):
|
|
173
|
+
logger.error(f"Values file not found: {values_path}")
|
|
174
|
+
raise FileNotFoundError(f"Values file not found: {values_path}")
|
|
175
|
+
|
|
176
|
+
try:
|
|
177
|
+
add_or_keep_helm_repo(chart_repo_name, chart_repo)
|
|
178
|
+
self.execute_command(["helm", "repo", "update", chart_repo_name])
|
|
179
|
+
|
|
180
|
+
helm_command = [
|
|
181
|
+
"helm", "upgrade", "-i", deployment_name, chart_name,
|
|
182
|
+
"--version", chart_version,
|
|
183
|
+
"--namespace", namespace,
|
|
184
|
+
"--create-namespace",
|
|
185
|
+
"--wait",
|
|
186
|
+
"--values", values_path,
|
|
187
|
+
"--kubeconfig", self.kube_config
|
|
188
|
+
]
|
|
189
|
+
self.execute_command(helm_command)
|
|
190
|
+
logger.info(f"Successfully deployed {deployment_name} in namespace {namespace}")
|
|
191
|
+
|
|
192
|
+
self._wait_for_cert_manager_crds()
|
|
193
|
+
self._install_raw_extras(namespace=namespace)
|
|
194
|
+
except Exception as e:
|
|
195
|
+
logger.error(f"Failed to deploy {deployment_name}: {str(e)}")
|
|
196
|
+
raise
|
|
197
|
+
|
|
198
|
+
# ------------------------------------------------------------------
|
|
199
|
+
# Phase 2 inline: publish cert secrets to Vault
|
|
200
|
+
# ------------------------------------------------------------------
|
|
201
|
+
|
|
202
|
+
|
|
203
|
+
|
|
204
|
+
|
|
205
|
+
def get_deployed_app_version(self, deployment_name, namespace):
|
|
206
|
+
"""Get the deployed application version from Helm"""
|
|
207
|
+
logger.info(f"Getting deployed version for {deployment_name} in namespace {namespace}")
|
|
208
|
+
try:
|
|
209
|
+
command = ["helm", "ls", "--deployed", "-f", deployment_name, "-n", namespace, "--kubeconfig", self.kube_config, "--output", "json"]
|
|
210
|
+
result = self.execute_command(command)
|
|
211
|
+
if result:
|
|
212
|
+
# Parse JSON output
|
|
213
|
+
deployments = json.loads(result)
|
|
214
|
+
if deployments and isinstance(deployments, list) and len(deployments) > 0:
|
|
215
|
+
app_version = deployments[0].get('app_version', "Unknown")
|
|
216
|
+
logger.info(f"Found app version: {app_version}")
|
|
217
|
+
return app_version
|
|
218
|
+
else:
|
|
219
|
+
logger.warning(f"No deployments found for {deployment_name}")
|
|
220
|
+
return "No deployed version found"
|
|
221
|
+
except json.JSONDecodeError as e:
|
|
222
|
+
logger.error(f"Failed to parse Helm output as JSON: {str(e)}")
|
|
223
|
+
return "Error parsing version"
|
|
224
|
+
except Exception as e:
|
|
225
|
+
logger.error(f"Error getting deployed version: {str(e)}")
|
|
226
|
+
return "Error getting version"
|
|
227
|
+
|
|
228
|
+
# ------------------------------------------------------------------
|
|
229
|
+
# Vault publishing (Phase 2 inline)
|
|
230
|
+
# ------------------------------------------------------------------
|
|
231
|
+
|
|
232
|
+
def _publish_cert_secrets_to_vault(self) -> None:
|
|
233
|
+
"""Push cert-manager secrets into Vault so the ExternalSecret
|
|
234
|
+
rendered by ``_install_raw_extras`` can read them.
|
|
235
|
+
|
|
236
|
+
Source of truth: ``state.config['secrets_cert_*']`` (collected
|
|
237
|
+
by the wizard in Phase 4). Only keys required by the chosen
|
|
238
|
+
cert provider are pushed — the catalog at
|
|
239
|
+
``cli.cert_providers.ALL_PROVIDERS`` maps provider slug →
|
|
240
|
+
required inputs.
|
|
241
|
+
"""
|
|
242
|
+
if not self.state:
|
|
243
|
+
logger.warning(
|
|
244
|
+
"CertManager: no state attached, skipping Vault publish."
|
|
245
|
+
)
|
|
246
|
+
return
|
|
247
|
+
|
|
248
|
+
# Lazy import — avoid pulling CustomerSecretManager at module
|
|
249
|
+
# load time (heavy dependency chain).
|
|
250
|
+
from utils.customer_secret_manager_operations import (
|
|
251
|
+
CustomerSecretManager,
|
|
252
|
+
)
|
|
253
|
+
|
|
254
|
+
# Find the chosen provider in the catalog.
|
|
255
|
+
# Use the deployer's already-resolved cert_provider (set in
|
|
256
|
+
# __init__ with explicit error if missing). Falling back to
|
|
257
|
+
# ``"selfsigned"`` here would re-introduce the bug we just
|
|
258
|
+
# removed at __init__.
|
|
259
|
+
provider_slug = self.cert_provider
|
|
260
|
+
try:
|
|
261
|
+
from cli.cert_providers import ALL_PROVIDERS
|
|
262
|
+
provider = next(
|
|
263
|
+
p for p in ALL_PROVIDERS if p.slug == provider_slug
|
|
264
|
+
)
|
|
265
|
+
except (ImportError, StopIteration):
|
|
266
|
+
logger.warning(
|
|
267
|
+
f"CertManager: provider '{provider_slug}' not found in "
|
|
268
|
+
f"catalog, skipping Vault publish."
|
|
269
|
+
)
|
|
270
|
+
return
|
|
271
|
+
|
|
272
|
+
# Collect every secret_cert_* key required by the provider.
|
|
273
|
+
secrets_to_publish: dict[str, str] = {}
|
|
274
|
+
for inp in provider.required_inputs:
|
|
275
|
+
value = self.state.config.get(f"secrets_cert_{inp.key}")
|
|
276
|
+
if value:
|
|
277
|
+
secrets_to_publish[inp.key] = str(value)
|
|
278
|
+
|
|
279
|
+
if not secrets_to_publish:
|
|
280
|
+
logger.info(
|
|
281
|
+
"CertManager: no cert secrets to publish (self-signed "
|
|
282
|
+
"or empty provider config)."
|
|
283
|
+
)
|
|
284
|
+
return
|
|
285
|
+
|
|
286
|
+
# publish_extra_secrets is a staticmethod — no need to
|
|
287
|
+
# instantiate CustomerSecretManager (which would run a heavy
|
|
288
|
+
# init chain that needs repo URLs, git tokens, etc.).
|
|
289
|
+
ok = CustomerSecretManager.publish_extra_secrets(
|
|
290
|
+
service_name="cert-manager",
|
|
291
|
+
secrets=secrets_to_publish,
|
|
292
|
+
kube_config_path=self.kube_config,
|
|
293
|
+
customer=self.customer,
|
|
294
|
+
)
|
|
295
|
+
if not ok:
|
|
296
|
+
raise RuntimeError(
|
|
297
|
+
"CertManager: failed to publish cert secrets to Vault"
|
|
298
|
+
)
|
|
299
|
+
logger.info(
|
|
300
|
+
f"CertManager: published {len(secrets_to_publish)} keys to "
|
|
301
|
+
f"Vault under cert-manager/"
|
|
302
|
+
)
|
|
303
|
+
|
|
304
|
+
def _wait_for_cert_manager_crds(self) -> None:
|
|
305
|
+
"""Block until CRDs are Established AND the webhook is Ready."""
|
|
306
|
+
if self.dry_run:
|
|
307
|
+
return
|
|
308
|
+
|
|
309
|
+
crds = [
|
|
310
|
+
"clusterissuers.cert-manager.io",
|
|
311
|
+
"certificaterequests.cert-manager.io",
|
|
312
|
+
]
|
|
313
|
+
for crd in crds:
|
|
314
|
+
cmd = [
|
|
315
|
+
"kubectl", "wait", "--for=condition=Established",
|
|
316
|
+
f"crd/{crd}",
|
|
317
|
+
f"--kubeconfig={self.kube_config}",
|
|
318
|
+
"--timeout=120s",
|
|
319
|
+
]
|
|
320
|
+
try:
|
|
321
|
+
self.execute_command(cmd)
|
|
322
|
+
logger.info(f"CRD ready: {crd}")
|
|
323
|
+
except Exception as exc:
|
|
324
|
+
logger.warning(f"CRD wait failed for {crd}: {exc}")
|
|
325
|
+
|
|
326
|
+
# Webhook must be Ready before we submit ClusterIssuer/Certificate
|
|
327
|
+
# — the apiserver validates those via the webhook service and
|
|
328
|
+
# the TLS handshake fails if the webhook serving cert is not yet
|
|
329
|
+
# written by the controller.
|
|
330
|
+
try:
|
|
331
|
+
wait_for_pods_ready(
|
|
332
|
+
label_selector="app.kubernetes.io/name=cert-manager,app.kubernetes.io/component=webhook",
|
|
333
|
+
namespace="cert-manager",
|
|
334
|
+
kubeconfig=self.kube_config,
|
|
335
|
+
timeout_seconds=180,
|
|
336
|
+
)
|
|
337
|
+
logger.info("cert-manager webhook Ready")
|
|
338
|
+
except Exception as exc:
|
|
339
|
+
logger.warning(f"cert-manager webhook wait failed: {exc}")
|
|
340
|
+
|
|
341
|
+
def _install_raw_extras(self, namespace: str) -> None:
|
|
342
|
+
"""Render the extras (ClusterIssuer + Certificate +
|
|
343
|
+
ExternalSecret) as a list of K8s resources and install them
|
|
344
|
+
via the generic ``kube-core/raw`` helm chart.
|
|
345
|
+
|
|
346
|
+
The chart's template iterates over ``Values.manifests`` and
|
|
347
|
+
applies each one as a K8s resource — same effect as the
|
|
348
|
+
previous ``kubectl apply -f values_extra.yaml``, but entirely
|
|
349
|
+
via ``helm upgrade -i --create-namespace``. No kubectl calls.
|
|
350
|
+
"""
|
|
351
|
+
# Render the Jinja template to the values file
|
|
352
|
+
self.render_template(
|
|
353
|
+
self.raw_render_template_values_path,
|
|
354
|
+
self.raw_values_path,
|
|
355
|
+
context={
|
|
356
|
+
"raw_release_name": self.raw_release_name,
|
|
357
|
+
"raw_chart_name": self.raw_chart_name,
|
|
358
|
+
"raw_chart_repo": self.raw_chart_repo,
|
|
359
|
+
"raw_chart_version": self.chart_version,
|
|
360
|
+
"raw_namespace": namespace,
|
|
361
|
+
"state": self.state,
|
|
362
|
+
"deployment_mode": self.state.config.get("deployment_mode", "auto"),
|
|
363
|
+
"cert_provider": self.cert_provider,
|
|
364
|
+
"cert_email": self.cert_email,
|
|
365
|
+
"cert_staging": "true" if self.cert_staging else "false",
|
|
366
|
+
"customer": self.customer,
|
|
367
|
+
"customer_main_domain": (
|
|
368
|
+
self.state.config.get("customer_main_domain")
|
|
369
|
+
if self.state else None
|
|
370
|
+
) or f"{self.customer}.{self.domain_name}",
|
|
371
|
+
"domain_name": self.domain_name,
|
|
372
|
+
"project_id": getattr(self, "project_id", None),
|
|
373
|
+
"user_email": self.user_email,
|
|
374
|
+
"secrets_cert_staging": "true" if self.cert_staging else "false",
|
|
375
|
+
"secrets_cert_email": self.cert_email,
|
|
376
|
+
"secrets_cert_region": (
|
|
377
|
+
self.state.config.get("secrets_cert_region")
|
|
378
|
+
if self.state else None
|
|
379
|
+
),
|
|
380
|
+
"secrets_cert_api_url": (
|
|
381
|
+
self.state.config.get("secrets_cert_api_url")
|
|
382
|
+
if self.state else None
|
|
383
|
+
),
|
|
384
|
+
"pdns_webhook_group_name": (
|
|
385
|
+
self.state.config.get("pdns_webhook_group_name")
|
|
386
|
+
if self.state else None
|
|
387
|
+
),
|
|
388
|
+
},
|
|
389
|
+
)
|
|
390
|
+
|
|
391
|
+
# Pre-install: clean up any orphan ExternalSecret from older
|
|
392
|
+
# kubectl-apply-based deploys. See the matching helper in
|
|
393
|
+
# ExternalDNS for the rationale (helm 3-way merge conflicts
|
|
394
|
+
# on server-side-defaulted fields like conversionStrategy).
|
|
395
|
+
self._delete_orphan_externalsecret(
|
|
396
|
+
namespace=namespace,
|
|
397
|
+
name="hashicorp-cloudflare-api-token",
|
|
398
|
+
)
|
|
399
|
+
|
|
400
|
+
# Install via helm (NOT kubectl). The kube-core/raw chart
|
|
401
|
+
# takes the values file and applies the listed manifests.
|
|
402
|
+
from utils.raw_extras import raw_values_have_manifests
|
|
403
|
+
if not raw_values_have_manifests(self.raw_values_path):
|
|
404
|
+
return
|
|
405
|
+
|
|
406
|
+
self.execute_command([
|
|
407
|
+
"helm", "repo", "add", "kube-core", self.raw_chart_repo,
|
|
408
|
+
])
|
|
409
|
+
self.execute_command([
|
|
410
|
+
"helm", "repo", "update", "kube-core",
|
|
411
|
+
])
|
|
412
|
+
self.execute_command([
|
|
413
|
+
"helm", "upgrade", "-i", self.raw_release_name,
|
|
414
|
+
"kube-core/raw",
|
|
415
|
+
"--namespace", namespace,
|
|
416
|
+
"--create-namespace",
|
|
417
|
+
"--wait",
|
|
418
|
+
"--take-ownership", # adopt pre-existing manifests on
|
|
419
|
+
# subsequent runs (when this run
|
|
420
|
+
# already owns them)
|
|
421
|
+
"--values", self.raw_values_path,
|
|
422
|
+
"--kubeconfig", self.kube_config,
|
|
423
|
+
])
|
|
424
|
+
logger.info(f"Installed extras for {namespace} via kube-core/raw helm release {self.raw_release_name}")
|
|
425
|
+
|
|
426
|
+
def _install_pdns_webhook(self, namespace: str) -> None:
|
|
427
|
+
logger.info(
|
|
428
|
+
f"Installing cert-manager-webhook-pdns in {namespace}"
|
|
429
|
+
)
|
|
430
|
+
self.execute_command([
|
|
431
|
+
"helm", "repo", "add",
|
|
432
|
+
self.pdns_webhook_chart_repo_name,
|
|
433
|
+
self.pdns_webhook_chart_repo,
|
|
434
|
+
])
|
|
435
|
+
self.execute_command([
|
|
436
|
+
"helm", "repo", "update",
|
|
437
|
+
self.pdns_webhook_chart_repo_name,
|
|
438
|
+
])
|
|
439
|
+
values_path = getattr(self, "pdns_webhook_values_path", None)
|
|
440
|
+
if values_path and os.path.exists(values_path):
|
|
441
|
+
helm_cmd = [
|
|
442
|
+
"helm", "upgrade", "-i",
|
|
443
|
+
self.pdns_webhook_deployment_name,
|
|
444
|
+
self.pdns_webhook_chart_name,
|
|
445
|
+
"--version", self.pdns_webhook_chart_version,
|
|
446
|
+
"--namespace", namespace,
|
|
447
|
+
"--wait",
|
|
448
|
+
"--values", values_path,
|
|
449
|
+
"--kubeconfig", self.kube_config,
|
|
450
|
+
]
|
|
451
|
+
else:
|
|
452
|
+
helm_cmd = [
|
|
453
|
+
"helm", "upgrade", "-i",
|
|
454
|
+
self.pdns_webhook_deployment_name,
|
|
455
|
+
self.pdns_webhook_chart_name,
|
|
456
|
+
"--version", self.pdns_webhook_chart_version,
|
|
457
|
+
"--namespace", namespace,
|
|
458
|
+
"--wait",
|
|
459
|
+
"--kubeconfig", self.kube_config,
|
|
460
|
+
]
|
|
461
|
+
self.execute_command(helm_cmd)
|
|
462
|
+
logger.info(
|
|
463
|
+
f"cert-manager-webhook-pdns installed as "
|
|
464
|
+
f"{self.pdns_webhook_deployment_name} in {namespace}"
|
|
465
|
+
)
|
|
466
|
+
|
|
467
|
+
def _delete_orphan_externalsecret(self, namespace: str, name: str) -> None:
|
|
468
|
+
"""Delete an ExternalSecret that lacks helm ownership labels.
|
|
469
|
+
|
|
470
|
+
Only acts on resources that are NOT yet owned by the helm
|
|
471
|
+
release that would otherwise adopt them. See the matching
|
|
472
|
+
helper in ExternalDNS for the full rationale.
|
|
473
|
+
"""
|
|
474
|
+
import json as _json
|
|
475
|
+
import subprocess as _sp
|
|
476
|
+
|
|
477
|
+
def _run(cmd):
|
|
478
|
+
proc = _sp.run(cmd, capture_output=True, text=True)
|
|
479
|
+
return proc.returncode, proc.stdout, proc.stderr
|
|
480
|
+
|
|
481
|
+
rc, out, _ = _run([
|
|
482
|
+
"kubectl", "get", "externalsecret", name,
|
|
483
|
+
"-n", namespace,
|
|
484
|
+
"-o", "json",
|
|
485
|
+
"--kubeconfig", self.kube_config,
|
|
486
|
+
])
|
|
487
|
+
if rc != 0:
|
|
488
|
+
logger.debug(
|
|
489
|
+
f"_delete_orphan_externalsecret: {namespace}/{name} "
|
|
490
|
+
f"not found, skipping cleanup"
|
|
491
|
+
)
|
|
492
|
+
return
|
|
493
|
+
|
|
494
|
+
try:
|
|
495
|
+
es = _json.loads(out)
|
|
496
|
+
except _json.JSONDecodeError:
|
|
497
|
+
logger.warning(
|
|
498
|
+
f"_delete_orphan_externalsecret: could not parse "
|
|
499
|
+
f"{namespace}/{name} JSON, skipping"
|
|
500
|
+
)
|
|
501
|
+
return
|
|
502
|
+
|
|
503
|
+
labels = es.get("metadata", {}).get("labels", {}) or {}
|
|
504
|
+
annotations = es.get("metadata", {}).get("annotations", {}) or {}
|
|
505
|
+
|
|
506
|
+
managed_by_helm = labels.get("app.kubernetes.io/managed-by") == "Helm"
|
|
507
|
+
owned_by_us = (
|
|
508
|
+
annotations.get("meta.helm.sh/release-name") == self.raw_release_name
|
|
509
|
+
)
|
|
510
|
+
|
|
511
|
+
if managed_by_helm and owned_by_us:
|
|
512
|
+
logger.debug(
|
|
513
|
+
f"_delete_orphan_externalsecret: {namespace}/{name} "
|
|
514
|
+
f"already owned by {self.raw_release_name}, skipping"
|
|
515
|
+
)
|
|
516
|
+
return
|
|
517
|
+
|
|
518
|
+
target_name = (
|
|
519
|
+
es.get("spec", {}).get("target", {}).get("name")
|
|
520
|
+
)
|
|
521
|
+
logger.info(
|
|
522
|
+
f"_delete_orphan_externalsecret: deleting orphan "
|
|
523
|
+
f"{namespace}/{name} (managed_by_helm={managed_by_helm}, "
|
|
524
|
+
f"owned_by_us={owned_by_us})"
|
|
525
|
+
)
|
|
526
|
+
|
|
527
|
+
_run([
|
|
528
|
+
"kubectl", "delete", "externalsecret", name,
|
|
529
|
+
"-n", namespace,
|
|
530
|
+
"--kubeconfig", self.kube_config,
|
|
531
|
+
"--ignore-not-found",
|
|
532
|
+
])
|
|
533
|
+
|
|
534
|
+
if target_name:
|
|
535
|
+
_run([
|
|
536
|
+
"kubectl", "delete", "secret", target_name,
|
|
537
|
+
"-n", namespace,
|
|
538
|
+
"--kubeconfig", self.kube_config,
|
|
539
|
+
"--ignore-not-found",
|
|
540
|
+
])
|
|
541
|
+
|
|
542
|
+
_run([
|
|
543
|
+
"helm", "uninstall", self.raw_release_name,
|
|
544
|
+
"-n", namespace,
|
|
545
|
+
"--kubeconfig", self.kube_config,
|
|
546
|
+
"--ignore-not-found",
|
|
547
|
+
])
|
|
548
|
+
|
|
549
|
+
def execute_command(self, command):
|
|
550
|
+
"""Execute a shell command with proper error handling"""
|
|
551
|
+
cmd_str = ' '.join(command) if isinstance(command, list) else command
|
|
552
|
+
|
|
553
|
+
# Dry-run mode: show command without executing
|
|
554
|
+
if self.dry_run:
|
|
555
|
+
logger.info(f"[DRY-RUN] Would execute: {cmd_str}")
|
|
556
|
+
print(f"[DRY-RUN] Would execute: {cmd_str}")
|
|
557
|
+
return "" # Return mock success
|
|
558
|
+
|
|
559
|
+
logger.debug(f"Executing command: {cmd_str}")
|
|
560
|
+
|
|
561
|
+
try:
|
|
562
|
+
result = subprocess.run(command, check=True, capture_output=True, text=True)
|
|
563
|
+
logger.debug(f"Command output: {result.stdout}")
|
|
564
|
+
return result.stdout
|
|
565
|
+
except subprocess.CalledProcessError as e:
|
|
566
|
+
logger.error(f"Command failed: {cmd_str}")
|
|
567
|
+
logger.error(f"Status code: {e.returncode}")
|
|
568
|
+
logger.error(f"Output: {e.stdout}")
|
|
569
|
+
logger.error(f"Error: {e.stderr}")
|
|
570
|
+
raise Exception(f"Execution failed for command {cmd_str}: {e.stderr}")
|
|
571
|
+
except Exception as e:
|
|
572
|
+
logger.error(f"Unexpected error executing command {cmd_str}: {str(e)}")
|
|
573
|
+
raise
|
|
574
|
+
|
|
575
|
+
def render_values_file(self):
|
|
576
|
+
"""Render the values file from template"""
|
|
577
|
+
logger.info("Rendering values file from template")
|
|
578
|
+
try:
|
|
579
|
+
context = {
|
|
580
|
+
'chart_name': self.chart_name,
|
|
581
|
+
'chart_repo': self.chart_repo,
|
|
582
|
+
'chart_version': self.chart_version,
|
|
583
|
+
'cert_manager_k8s_sa': self.service_account_name,
|
|
584
|
+
'cloud_provider': self.cloud_provider,
|
|
585
|
+
# NOTE: cert_provider / cert_email / cert_staging are
|
|
586
|
+
# consumed by the traefik_lb chart (which mounts the
|
|
587
|
+
# wildcard Certificate), NOT by the cert-manager chart
|
|
588
|
+
# itself. The cert-manager chart's template_values.yaml
|
|
589
|
+
# is a stock jetstack/cert-manager chart values file
|
|
590
|
+
# and doesn't reference any of these fields. They are
|
|
591
|
+
# therefore intentionally omitted from this context.
|
|
592
|
+
# Secrets (secrets_cert_*) live in state.config and are
|
|
593
|
+
# read directly by the kube-core/raw extras template
|
|
594
|
+
# (template_values_extra.yaml) when it renders the
|
|
595
|
+
# ExternalSecret.
|
|
596
|
+
}
|
|
597
|
+
|
|
598
|
+
# Ensure output directory exists
|
|
599
|
+
output_dir = os.path.dirname(self.values_path)
|
|
600
|
+
if not os.path.exists(output_dir):
|
|
601
|
+
logger.info(f"Creating output directory: {output_dir}")
|
|
602
|
+
os.makedirs(output_dir, exist_ok=True)
|
|
603
|
+
|
|
604
|
+
self.render_template(self.render_template_values_path, self.values_path, context)
|
|
605
|
+
logger.info(f"Successfully rendered values file to {self.values_path}")
|
|
606
|
+
except Exception as e:
|
|
607
|
+
logger.error(f"Failed to render values file: {str(e)}")
|
|
608
|
+
raise
|
|
609
|
+
|
|
610
|
+
def render_pdns_webhook_values_file(self):
|
|
611
|
+
"""Render the cert-manager-webhook-pdns values file from template.
|
|
612
|
+
|
|
613
|
+
Mirrors ``render_values_file()`` for the main cert-manager chart.
|
|
614
|
+
Only called when ``cert_provider == "letsencrypt-pdns"``; the
|
|
615
|
+
webhook chart's values come from this render. Same Jinja2
|
|
616
|
+
template → values flow as the rest of the deployer.
|
|
617
|
+
"""
|
|
618
|
+
logger.info("Rendering pdns webhook values file from template")
|
|
619
|
+
try:
|
|
620
|
+
context = {
|
|
621
|
+
'chart_name': self.pdns_webhook_chart_name,
|
|
622
|
+
'chart_repo': self.pdns_webhook_chart_repo,
|
|
623
|
+
'chart_version': self.pdns_webhook_chart_version,
|
|
624
|
+
'pdns_webhook_chart_version': self.pdns_webhook_chart_version,
|
|
625
|
+
'customer_main_domain': (
|
|
626
|
+
self.state.config.get('customer_main_domain')
|
|
627
|
+
if self.state else None
|
|
628
|
+
) or f"{self.customer}.{self.domain_name}",
|
|
629
|
+
# Allow CLI override of the webhook group name. Falls
|
|
630
|
+
# back to the templated default
|
|
631
|
+
# "pdns.acme.<customer_main_domain>".
|
|
632
|
+
'pdns_webhook_group_name': (
|
|
633
|
+
self.state.config.get('pdns_webhook_group_name')
|
|
634
|
+
if self.state else None
|
|
635
|
+
),
|
|
636
|
+
}
|
|
637
|
+
|
|
638
|
+
output_dir = os.path.dirname(self.pdns_webhook_values_path)
|
|
639
|
+
if not os.path.exists(output_dir):
|
|
640
|
+
logger.info(f"Creating output directory: {output_dir}")
|
|
641
|
+
os.makedirs(output_dir, exist_ok=True)
|
|
642
|
+
|
|
643
|
+
self.render_template(
|
|
644
|
+
self.pdns_webhook_render_template_values_path,
|
|
645
|
+
self.pdns_webhook_values_path,
|
|
646
|
+
context,
|
|
647
|
+
)
|
|
648
|
+
logger.info(
|
|
649
|
+
f"Successfully rendered pdns webhook values file to "
|
|
650
|
+
f"{self.pdns_webhook_values_path}"
|
|
651
|
+
)
|
|
652
|
+
except Exception as e:
|
|
653
|
+
logger.error(f"Failed to render pdns webhook values file: {str(e)}")
|
|
654
|
+
raise
|
|
655
|
+
|
|
656
|
+
def render_template(self, template_path, output_path, context):
|
|
657
|
+
"""Render a Jinja2 template to a file"""
|
|
658
|
+
try:
|
|
659
|
+
logger.debug(f"Rendering template {template_path} to {output_path}")
|
|
660
|
+
source = Path(template_path).read_text()
|
|
661
|
+
source = self._escape_helm_template_syntax(source)
|
|
662
|
+
env = Environment(loader=FileSystemLoader(os.path.dirname(template_path)))
|
|
663
|
+
template = env.from_string(source)
|
|
664
|
+
output = template.render({**context, 'size': self.size, 'platform_environment': self.platform_environment})
|
|
665
|
+
|
|
666
|
+
with open(output_path, 'w') as f:
|
|
667
|
+
f.write(output)
|
|
668
|
+
logger.debug("Template rendered successfully")
|
|
669
|
+
except TemplateNotFound:
|
|
670
|
+
logger.error(f"Template not found: {template_path}")
|
|
671
|
+
raise FileNotFoundError(f"Template not found: {template_path}")
|
|
672
|
+
except Exception as e:
|
|
673
|
+
logger.error(f"Error rendering template {template_path}: {str(e)}")
|
|
674
|
+
raise
|
|
675
|
+
|
|
676
|
+
@staticmethod
|
|
677
|
+
def _escape_helm_template_syntax(source: str) -> str:
|
|
678
|
+
"""Escape helm template syntax so Jinja2 does not parse it.
|
|
679
|
+
|
|
680
|
+
The stock jetstack/cert-manager ``template_values.yaml``
|
|
681
|
+
contains helm expressions like ``{{ .Chart.Name }}`` in
|
|
682
|
+
comment lines. Jinja2 treats ``{{ }}`` as a variable block
|
|
683
|
+
and bails on the leading ``.``. This pre-processor wraps
|
|
684
|
+
helm-style expressions in ``{% raw %}...{% endraw %}`` so
|
|
685
|
+
the Jinja2 parser leaves them untouched. Plain Jinja2
|
|
686
|
+
expressions (variables like ``{{ chart_name }}``) are
|
|
687
|
+
evaluated normally. The user's template file is not
|
|
688
|
+
modified — only the in-memory string we pass to Jinja2.
|
|
689
|
+
"""
|
|
690
|
+
import re
|
|
691
|
+
pattern = re.compile(
|
|
692
|
+
r"\{\{[^}]*(?:\.([A-Z][A-Za-z0-9.]*)|template\s+\"[^\"]+\"\s+\.)[^}]*\}\}"
|
|
693
|
+
)
|
|
694
|
+
def _wrap(match: "re.Match[str]") -> str:
|
|
695
|
+
return "{% raw %}" + match.group(0) + "{% endraw %}"
|
|
696
|
+
return pattern.sub(_wrap, source)
|
|
697
|
+
|
|
698
|
+
def run(self):
|
|
699
|
+
"""Main execution method"""
|
|
700
|
+
logger.info(f"Starting Cert Manager deployment for customer: {self.customer}")
|
|
701
|
+
try:
|
|
702
|
+
# 1. Publish cert-manager secrets into Vault (so the
|
|
703
|
+
# ExternalSecret rendered by kube-core/raw can read
|
|
704
|
+
# them). We use state.config (collected by the wizard)
|
|
705
|
+
# as the source of truth — only the keys actually
|
|
706
|
+
# required by the chosen cert provider are pushed.
|
|
707
|
+
self._publish_cert_secrets_to_vault()
|
|
708
|
+
|
|
709
|
+
#
|
|
710
|
+
# Render values file for the jetstack/cert-manager chart.
|
|
711
|
+
# (Extras — ClusterIssuer / Certificate / ExternalSecret —
|
|
712
|
+
# are rendered + installed via the kube-core/raw helm chart
|
|
713
|
+
# inside deploy_service() → _install_raw_extras().)
|
|
714
|
+
self.render_values_file()
|
|
715
|
+
|
|
716
|
+
# Deploy cert-manager (helm chart + kube-core/raw extras).
|
|
717
|
+
logger.info("Deploying cert-manager service")
|
|
718
|
+
self.deploy_service(
|
|
719
|
+
chart_repo_name=self.chart_repo_name,
|
|
720
|
+
chart_repo=self.chart_repo,
|
|
721
|
+
deployment_name=self.deployment_name,
|
|
722
|
+
chart_name=self.chart_name,
|
|
723
|
+
chart_version=self.chart_version,
|
|
724
|
+
namespace=self.namespace,
|
|
725
|
+
values_path=self.values_path
|
|
726
|
+
)
|
|
727
|
+
|
|
728
|
+
if self.cloud_provider == "self-managed" and (
|
|
729
|
+
self.state is None
|
|
730
|
+
or self.state.config.get("secrets_dns_provider") == "coredns"
|
|
731
|
+
):
|
|
732
|
+
logger.info("Deploying cert-manager csi driver")
|
|
733
|
+
self.deploy_service(
|
|
734
|
+
chart_repo_name=self.chart_repo_name,
|
|
735
|
+
chart_repo=self.chart_repo,
|
|
736
|
+
deployment_name=self.csi_driver_deployment_name,
|
|
737
|
+
chart_name=self.csi_driver_chart_name,
|
|
738
|
+
chart_version=self.csi_driver_chart_version,
|
|
739
|
+
namespace=self.namespace,
|
|
740
|
+
values_path=self.csi_driver_values_path
|
|
741
|
+
)
|
|
742
|
+
|
|
743
|
+
# 3. PowerDNS webhook — only when the chosen cert provider
|
|
744
|
+
# is PowerDNS. The webhook chart exposes the
|
|
745
|
+
# ``solverName: pdns`` solver config used by the LE
|
|
746
|
+
# ClusterIssuer rendered in traefik_lb. Install it
|
|
747
|
+
# AFTER cert-manager is up so the webhook can register
|
|
748
|
+
# itself with cert-manager's API.
|
|
749
|
+
if self.cert_provider == "letsencrypt-pdns":
|
|
750
|
+
logger.info("Deploying cert-manager-webhook-pdns")
|
|
751
|
+
self.render_pdns_webhook_values_file()
|
|
752
|
+
self._install_pdns_webhook(namespace=self.namespace)
|
|
753
|
+
|
|
754
|
+
# Metadata Collection
|
|
755
|
+
app_version = self.get_deployed_app_version(self.deployment_name, self.namespace)
|
|
756
|
+
deployment_record = {
|
|
757
|
+
"customer": self.customer,
|
|
758
|
+
"customer_main_domain": f"{self.customer}.{self.domain_name}",
|
|
759
|
+
"deployment_environment": self.deployment_environment,
|
|
760
|
+
"deployment_name": self.deployment_name,
|
|
761
|
+
"chart_name": self.chart_name,
|
|
762
|
+
"chart_version": self.chart_version,
|
|
763
|
+
"app_name": self.app_name,
|
|
764
|
+
"app_version": app_version,
|
|
765
|
+
"deploy_date": datetime.now().strftime("%Y-%m-%d")
|
|
766
|
+
}
|
|
767
|
+
|
|
768
|
+
logger.info("Adding deployment record to metadata collector")
|
|
769
|
+
self.metadata_collector.add_deployment_record(deployment_record)
|
|
770
|
+
logger.info("Cert Manager deployment completed successfully")
|
|
771
|
+
return "Cert Manager and Cluster Issuer deployed successfully"
|
|
772
|
+
|
|
773
|
+
except Exception as e:
|
|
774
|
+
logger.error(f"Deployment failed: {str(e)}")
|
|
775
|
+
raise
|
|
776
|
+
|
|
777
|
+
@classmethod
|
|
778
|
+
def from_cli_args(cls, args):
|
|
779
|
+
"""Create a CertManager instance from CLI arguments"""
|
|
780
|
+
logger.info("Creating CertManager instance from CLI arguments")
|
|
781
|
+
return cls(
|
|
782
|
+
chart_version=args.chart_version,
|
|
783
|
+
customer=args.customer,
|
|
784
|
+
domain_name=args.domain_name,
|
|
785
|
+
metadata_collector=args.metadata_collector,
|
|
786
|
+
user_email=args.user_email,
|
|
787
|
+
cloud_provider=args.cloud_provider,
|
|
788
|
+
project_id=args.project_id,
|
|
789
|
+
aws_region=args.aws_region,
|
|
790
|
+
cluster_name=args.cluster_name,
|
|
791
|
+
kube_config_path=args.kube_config_path,
|
|
792
|
+
platform_environment=getattr(args, 'environment', None),
|
|
793
|
+
namespace=args.namespace,
|
|
794
|
+
cert_provider=getattr(args, "cert_provider", None),
|
|
795
|
+
cert_email=getattr(args, "cert_email", None),
|
|
796
|
+
cert_staging=getattr(args, "cert_staging", False),
|
|
797
|
+
)
|
|
798
|
+
|
|
799
|
+
if __name__ == "__main__":
|
|
800
|
+
# Configure file logging if running as main script
|
|
801
|
+
log_file = "cert_manager_deployment.log"
|
|
802
|
+
file_handler = logging.FileHandler(log_file)
|
|
803
|
+
file_handler.setFormatter(logging.Formatter('%(asctime)s - %(name)s - %(levelname)s - %(message)s'))
|
|
804
|
+
logger.addHandler(file_handler)
|
|
805
|
+
logger.info(f"Starting Cert Manager deployment script, logging to {log_file}")
|
|
806
|
+
|
|
807
|
+
parser = argparse.ArgumentParser(
|
|
808
|
+
description="Cert Manager Deployment Tool",
|
|
809
|
+
formatter_class=argparse.RawDescriptionHelpFormatter
|
|
810
|
+
)
|
|
811
|
+
|
|
812
|
+
# Required core arguments
|
|
813
|
+
required_args = parser.add_argument_group('required core arguments')
|
|
814
|
+
required_args.add_argument(
|
|
815
|
+
'--customer',
|
|
816
|
+
required=True,
|
|
817
|
+
help='Customer tenant name (lowercase letters, numbers, and hyphens only)'
|
|
818
|
+
)
|
|
819
|
+
required_args.add_argument(
|
|
820
|
+
'--chart_version',
|
|
821
|
+
required=True,
|
|
822
|
+
help='Chart version for cert-manager'
|
|
823
|
+
)
|
|
824
|
+
required_args.add_argument(
|
|
825
|
+
'--user_email',
|
|
826
|
+
required=True,
|
|
827
|
+
help='Email address for Let\'s Encrypt registration'
|
|
828
|
+
)
|
|
829
|
+
required_args.add_argument(
|
|
830
|
+
'--cloud_provider',
|
|
831
|
+
required=True,
|
|
832
|
+
choices=['gcp', 'aws', 'azure', 'self-managed'],
|
|
833
|
+
help='Cloud provider where the cluster is running'
|
|
834
|
+
)
|
|
835
|
+
required_args.add_argument(
|
|
836
|
+
'--domain_name',
|
|
837
|
+
required=True,
|
|
838
|
+
help='Domain name for the customer'
|
|
839
|
+
)
|
|
840
|
+
|
|
841
|
+
# Optional arguments
|
|
842
|
+
optional_args = parser.add_argument_group('optional arguments')
|
|
843
|
+
optional_args.add_argument(
|
|
844
|
+
'--project_id',
|
|
845
|
+
help='Cloud provider project ID (default: fast2dev-{customer} for GCP)'
|
|
846
|
+
)
|
|
847
|
+
optional_args.add_argument(
|
|
848
|
+
'--aws_region',
|
|
849
|
+
help='AWS region (required for AWS cloud provider)'
|
|
850
|
+
)
|
|
851
|
+
optional_args.add_argument(
|
|
852
|
+
'--cluster_name',
|
|
853
|
+
help='Kubernetes cluster name (default: fast2dev-{customer}-platform)'
|
|
854
|
+
)
|
|
855
|
+
optional_args.add_argument(
|
|
856
|
+
'--kube_config_path',
|
|
857
|
+
help='Path to kubeconfig file (default: /tmp/{cluster_name}-kubeconfig.yaml)'
|
|
858
|
+
)
|
|
859
|
+
optional_args.add_argument(
|
|
860
|
+
'--namespace',
|
|
861
|
+
default='cert-manager',
|
|
862
|
+
help='Kubernetes namespace for deployment (default: cert-manager)'
|
|
863
|
+
)
|
|
864
|
+
optional_args.add_argument(
|
|
865
|
+
'--metadata_file',
|
|
866
|
+
default='deployment_metadata.json',
|
|
867
|
+
help='Path to metadata file (default: deployment_metadata.json)'
|
|
868
|
+
)
|
|
869
|
+
optional_args.add_argument(
|
|
870
|
+
'--skip_metadata',
|
|
871
|
+
action='store_true',
|
|
872
|
+
help='Skip metadata collection (for CLI usage)'
|
|
873
|
+
)
|
|
874
|
+
optional_args.add_argument(
|
|
875
|
+
'--debug',
|
|
876
|
+
action='store_true',
|
|
877
|
+
help='Enable debug logging'
|
|
878
|
+
)
|
|
879
|
+
|
|
880
|
+
# Parse arguments
|
|
881
|
+
parser.add_argument('--environment', choices=ENVIRONMENTS, default=None, help='Platform environment used for sizing (production or development)')
|
|
882
|
+
args = parser.parse_args()
|
|
883
|
+
|
|
884
|
+
# Set debug level if requested
|
|
885
|
+
if args.debug:
|
|
886
|
+
logger.setLevel(logging.DEBUG)
|
|
887
|
+
logger.debug("Debug logging enabled")
|
|
888
|
+
|
|
889
|
+
try:
|
|
890
|
+
logger.info(f"Deploying Cert Manager for customer: {args.customer}")
|
|
891
|
+
logger.info(f"Cloud provider: {args.cloud_provider}")
|
|
892
|
+
|
|
893
|
+
# Create a simple metadata collector for CLI usage
|
|
894
|
+
class SimpleMetadataCollector:
|
|
895
|
+
def __init__(self, metadata_file):
|
|
896
|
+
self.metadata_file = metadata_file
|
|
897
|
+
self.deployment_records = []
|
|
898
|
+
if os.path.exists(metadata_file):
|
|
899
|
+
try:
|
|
900
|
+
with open(metadata_file, 'r') as f:
|
|
901
|
+
self.deployment_records = json.load(f)
|
|
902
|
+
logger.info(f"Loaded {len(self.deployment_records)} existing deployment records")
|
|
903
|
+
except json.JSONDecodeError:
|
|
904
|
+
logger.warning(f"Could not parse {metadata_file}, starting with empty records")
|
|
905
|
+
self.deployment_records = []
|
|
906
|
+
else:
|
|
907
|
+
logger.info(f"Metadata file {metadata_file} not found, will create new file")
|
|
908
|
+
|
|
909
|
+
def add_deployment_record(self, record):
|
|
910
|
+
self.deployment_records.append(record)
|
|
911
|
+
try:
|
|
912
|
+
# Ensure directory exists
|
|
913
|
+
os.makedirs(os.path.dirname(os.path.abspath(self.metadata_file)), exist_ok=True)
|
|
914
|
+
with open(self.metadata_file, 'w') as f:
|
|
915
|
+
json.dump(self.deployment_records, f, indent=2)
|
|
916
|
+
logger.info(f"Deployment record added to {self.metadata_file}")
|
|
917
|
+
except Exception as e:
|
|
918
|
+
logger.error(f"Failed to write metadata to {self.metadata_file}: {str(e)}")
|
|
919
|
+
|
|
920
|
+
# Use the appropriate metadata collector
|
|
921
|
+
if args.skip_metadata:
|
|
922
|
+
logger.info("Metadata collection is disabled")
|
|
923
|
+
class DummyMetadataCollector:
|
|
924
|
+
def add_deployment_record(self, record):
|
|
925
|
+
logger.info("Metadata collection skipped")
|
|
926
|
+
metadata_collector = DummyMetadataCollector()
|
|
927
|
+
else:
|
|
928
|
+
logger.info(f"Using metadata file: {args.metadata_file}")
|
|
929
|
+
metadata_collector = SimpleMetadataCollector(args.metadata_file)
|
|
930
|
+
|
|
931
|
+
# Add metadata collector to args for from_cli_args method
|
|
932
|
+
args.metadata_collector = metadata_collector
|
|
933
|
+
|
|
934
|
+
# Create manager instance using the CLI factory method
|
|
935
|
+
logger.info("Creating CertManager instance")
|
|
936
|
+
manager = CertManager.from_cli_args(args)
|
|
937
|
+
|
|
938
|
+
# Run the deployment
|
|
939
|
+
logger.info("Starting deployment process")
|
|
940
|
+
result = manager.run()
|
|
941
|
+
|
|
942
|
+
logger.info("Execution Result: " + result)
|
|
943
|
+
print("Execution Result:")
|
|
944
|
+
print(result)
|
|
945
|
+
|
|
946
|
+
except FileNotFoundError as e:
|
|
947
|
+
logger.error(f"File not found error: {str(e)}")
|
|
948
|
+
print(f"File not found error: {str(e)}")
|
|
949
|
+
sys.exit(1)
|
|
950
|
+
except ValueError as e:
|
|
951
|
+
logger.error(f"Invalid value error: {str(e)}")
|
|
952
|
+
print(f"Invalid value error: {str(e)}")
|
|
953
|
+
sys.exit(1)
|
|
954
|
+
except subprocess.CalledProcessError as e:
|
|
955
|
+
logger.error(f"Command execution failed: {str(e)}")
|
|
956
|
+
print(f"Command execution failed: {str(e)}")
|
|
957
|
+
sys.exit(1)
|
|
958
|
+
except Exception as e:
|
|
959
|
+
logger.error(f"An unexpected error occurred: {str(e)}", exc_info=True)
|
|
960
|
+
print(f"An unexpected error occurred: {str(e)}")
|
|
961
|
+
sys.exit(1)
|
|
962
|
+
finally:
|
|
963
|
+
logger.info("Cert Manager deployment script completed")
|