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,320 @@
|
|
|
1
|
+
"""Bring an existing Keycloak realm up to the rendered realm template.
|
|
2
|
+
|
|
3
|
+
Keycloak imports the realm only when it does not exist yet. On upgrade this adds what newer
|
|
4
|
+
templates define: missing clients, missing protocol mappers on existing clients, missing
|
|
5
|
+
groups and subgroups, missing group attributes, missing realm and client roles, and
|
|
6
|
+
missing group role mappings. Nothing is deleted and existing
|
|
7
|
+
values (client secrets, attribute values, user data) are never overwritten.
|
|
8
|
+
"""
|
|
9
|
+
from __future__ import annotations
|
|
10
|
+
|
|
11
|
+
import logging
|
|
12
|
+
import socket
|
|
13
|
+
import subprocess
|
|
14
|
+
import tempfile
|
|
15
|
+
import time
|
|
16
|
+
from contextlib import contextmanager
|
|
17
|
+
from urllib.parse import quote
|
|
18
|
+
|
|
19
|
+
import requests
|
|
20
|
+
|
|
21
|
+
logger = logging.getLogger(__name__)
|
|
22
|
+
|
|
23
|
+
TIMEOUT = 30
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
class KeycloakAdmin:
|
|
27
|
+
def __init__(self, base_url: str, realm: str, username: str, password: str, session=None):
|
|
28
|
+
self.base_url = base_url.rstrip("/")
|
|
29
|
+
self.realm = realm
|
|
30
|
+
self.session = session or requests.Session()
|
|
31
|
+
response = self.session.post(
|
|
32
|
+
f"{self.base_url}/realms/master/protocol/openid-connect/token",
|
|
33
|
+
data={"grant_type": "password", "client_id": "admin-cli",
|
|
34
|
+
"username": username, "password": password},
|
|
35
|
+
timeout=TIMEOUT,
|
|
36
|
+
)
|
|
37
|
+
response.raise_for_status()
|
|
38
|
+
self.session.headers["Authorization"] = f"Bearer {response.json()['access_token']}"
|
|
39
|
+
|
|
40
|
+
def _url(self, path: str) -> str:
|
|
41
|
+
return f"{self.base_url}/admin/realms/{quote(self.realm)}{path}"
|
|
42
|
+
|
|
43
|
+
def get(self, path: str, params=None):
|
|
44
|
+
response = self.session.get(self._url(path), params=params, timeout=TIMEOUT)
|
|
45
|
+
response.raise_for_status()
|
|
46
|
+
return response.json()
|
|
47
|
+
|
|
48
|
+
def post(self, path: str, body) -> str | None:
|
|
49
|
+
response = self.session.post(self._url(path), json=body, timeout=TIMEOUT)
|
|
50
|
+
response.raise_for_status()
|
|
51
|
+
location = response.headers.get("Location", "")
|
|
52
|
+
return location.rsplit("/", 1)[-1] if location else None
|
|
53
|
+
|
|
54
|
+
def put(self, path: str, body: dict) -> None:
|
|
55
|
+
response = self.session.put(self._url(path), json=body, timeout=TIMEOUT)
|
|
56
|
+
response.raise_for_status()
|
|
57
|
+
|
|
58
|
+
def clients(self) -> list[dict]:
|
|
59
|
+
return self.get("/clients")
|
|
60
|
+
|
|
61
|
+
def create_client(self, client: dict) -> None:
|
|
62
|
+
self.post("/clients", client)
|
|
63
|
+
|
|
64
|
+
def protocol_mappers(self, client_uuid: str) -> list[dict]:
|
|
65
|
+
return self.get(f"/clients/{client_uuid}/protocol-mappers/models")
|
|
66
|
+
|
|
67
|
+
def create_protocol_mapper(self, client_uuid: str, mapper: dict) -> None:
|
|
68
|
+
self.post(f"/clients/{client_uuid}/protocol-mappers/models", mapper)
|
|
69
|
+
|
|
70
|
+
def groups(self) -> list[dict]:
|
|
71
|
+
return self.get("/groups", params={"briefRepresentation": "false", "max": 1000})
|
|
72
|
+
|
|
73
|
+
def children(self, group_id: str) -> list[dict]:
|
|
74
|
+
return self.get(f"/groups/{group_id}/children", params={"briefRepresentation": "false", "max": 1000})
|
|
75
|
+
|
|
76
|
+
def group(self, group_id: str) -> dict:
|
|
77
|
+
return self.get(f"/groups/{group_id}")
|
|
78
|
+
|
|
79
|
+
def create_group(self, group: dict, parent_id: str | None) -> str | None:
|
|
80
|
+
path = f"/groups/{parent_id}/children" if parent_id else "/groups"
|
|
81
|
+
return self.post(path, group)
|
|
82
|
+
|
|
83
|
+
def update_group(self, group_id: str, group: dict) -> None:
|
|
84
|
+
self.put(f"/groups/{group_id}", group)
|
|
85
|
+
|
|
86
|
+
def realm_roles(self) -> list[dict]:
|
|
87
|
+
return self.get("/roles", params={"max": 1000})
|
|
88
|
+
|
|
89
|
+
def create_realm_role(self, role: dict) -> None:
|
|
90
|
+
self.post("/roles", role)
|
|
91
|
+
|
|
92
|
+
def client_roles(self, client_uuid: str) -> list[dict]:
|
|
93
|
+
return self.get(f"/clients/{client_uuid}/roles", params={"max": 1000})
|
|
94
|
+
|
|
95
|
+
def create_client_role(self, client_uuid: str, role: dict) -> None:
|
|
96
|
+
self.post(f"/clients/{client_uuid}/roles", role)
|
|
97
|
+
|
|
98
|
+
def add_realm_role_composites(self, name: str, roles: list[dict]) -> None:
|
|
99
|
+
self.post(f"/roles/{quote(name)}/composites", roles)
|
|
100
|
+
|
|
101
|
+
def add_client_role_composites(self, client_uuid: str, name: str, roles: list[dict]) -> None:
|
|
102
|
+
self.post(f"/clients/{client_uuid}/roles/{quote(name)}/composites", roles)
|
|
103
|
+
|
|
104
|
+
def group_role_mappings(self, group_id: str) -> dict:
|
|
105
|
+
return self.get(f"/groups/{group_id}/role-mappings")
|
|
106
|
+
|
|
107
|
+
def add_group_realm_roles(self, group_id: str, roles: list[dict]) -> None:
|
|
108
|
+
self.post(f"/groups/{group_id}/role-mappings/realm", roles)
|
|
109
|
+
|
|
110
|
+
def add_group_client_roles(self, group_id: str, client_uuid: str, roles: list[dict]) -> None:
|
|
111
|
+
self.post(f"/groups/{group_id}/role-mappings/clients/{client_uuid}", roles)
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
def _strip_ids(node):
|
|
115
|
+
if isinstance(node, dict):
|
|
116
|
+
return {k: _strip_ids(v) for k, v in node.items() if k != "id"}
|
|
117
|
+
if isinstance(node, list):
|
|
118
|
+
return [_strip_ids(v) for v in node]
|
|
119
|
+
return node
|
|
120
|
+
|
|
121
|
+
|
|
122
|
+
def _reconcile_clients(api, desired: list[dict], changes: list[str]) -> None:
|
|
123
|
+
existing = {c.get("clientId"): c for c in api.clients()}
|
|
124
|
+
for client in desired:
|
|
125
|
+
client_id = client.get("clientId")
|
|
126
|
+
if not client_id:
|
|
127
|
+
continue
|
|
128
|
+
current = existing.get(client_id)
|
|
129
|
+
if current is None:
|
|
130
|
+
api.create_client(_strip_ids(client))
|
|
131
|
+
changes.append(f"client {client_id}")
|
|
132
|
+
continue
|
|
133
|
+
have = {m.get("name") for m in api.protocol_mappers(current["id"])}
|
|
134
|
+
for mapper in client.get("protocolMappers") or []:
|
|
135
|
+
if mapper.get("name") and mapper["name"] not in have:
|
|
136
|
+
api.create_protocol_mapper(current["id"], _strip_ids(mapper))
|
|
137
|
+
changes.append(f"protocol mapper {client_id}/{mapper['name']}")
|
|
138
|
+
|
|
139
|
+
|
|
140
|
+
_ROLE_SKIP = {"id", "containerId", "composites"}
|
|
141
|
+
|
|
142
|
+
|
|
143
|
+
def _role_body(role: dict) -> dict:
|
|
144
|
+
return {k: v for k, v in role.items() if k not in _ROLE_SKIP}
|
|
145
|
+
|
|
146
|
+
|
|
147
|
+
class _Roles:
|
|
148
|
+
"""Lazy lookup of live realm and client roles, creating template roles that are missing."""
|
|
149
|
+
|
|
150
|
+
def __init__(self, api, realm: dict):
|
|
151
|
+
self.api = api
|
|
152
|
+
roles = realm.get("roles") or {}
|
|
153
|
+
self.template_realm = {r["name"]: r for r in roles.get("realm") or [] if r.get("name")}
|
|
154
|
+
self.template_client = {cid: {r["name"]: r for r in rs or [] if r.get("name")}
|
|
155
|
+
for cid, rs in (roles.get("client") or {}).items()}
|
|
156
|
+
self._realm = None
|
|
157
|
+
self._clients = None
|
|
158
|
+
self._client_roles: dict[str, dict] = {}
|
|
159
|
+
|
|
160
|
+
def client_uuid(self, client_id: str) -> str | None:
|
|
161
|
+
if self._clients is None:
|
|
162
|
+
self._clients = {c.get("clientId"): c.get("id") for c in self.api.clients()}
|
|
163
|
+
return self._clients.get(client_id)
|
|
164
|
+
|
|
165
|
+
def realm_role(self, name: str, changes: list[str]) -> dict | None:
|
|
166
|
+
if self._realm is None:
|
|
167
|
+
self._realm = {r["name"]: r for r in self.api.realm_roles()}
|
|
168
|
+
if name not in self._realm and name in self.template_realm:
|
|
169
|
+
self.api.create_realm_role(_role_body(self.template_realm[name]))
|
|
170
|
+
changes.append(f"realm role {name}")
|
|
171
|
+
self._realm = {r["name"]: r for r in self.api.realm_roles()}
|
|
172
|
+
children = self._composites(self.template_realm[name], changes)
|
|
173
|
+
if children:
|
|
174
|
+
self.api.add_realm_role_composites(name, children)
|
|
175
|
+
changes.append(f"realm role composites {name}")
|
|
176
|
+
return self._realm.get(name)
|
|
177
|
+
|
|
178
|
+
def client_role(self, client_id: str, name: str, changes: list[str]) -> dict | None:
|
|
179
|
+
uuid = self.client_uuid(client_id)
|
|
180
|
+
if not uuid:
|
|
181
|
+
return None
|
|
182
|
+
if client_id not in self._client_roles:
|
|
183
|
+
self._client_roles[client_id] = {r["name"]: r for r in self.api.client_roles(uuid)}
|
|
184
|
+
live = self._client_roles[client_id]
|
|
185
|
+
template = self.template_client.get(client_id, {})
|
|
186
|
+
if name not in live and name in template:
|
|
187
|
+
self.api.create_client_role(uuid, _role_body(template[name]))
|
|
188
|
+
changes.append(f"client role {client_id}/{name}")
|
|
189
|
+
live = self._client_roles[client_id] = {r["name"]: r for r in self.api.client_roles(uuid)}
|
|
190
|
+
children = self._composites(template[name], changes)
|
|
191
|
+
if children:
|
|
192
|
+
self.api.add_client_role_composites(uuid, name, children)
|
|
193
|
+
changes.append(f"client role composites {client_id}/{name}")
|
|
194
|
+
live = self._client_roles[client_id]
|
|
195
|
+
return live.get(name)
|
|
196
|
+
|
|
197
|
+
def _composites(self, role: dict, changes: list[str]) -> list[dict]:
|
|
198
|
+
composites = role.get("composites") or {}
|
|
199
|
+
found = [self.realm_role(n, changes) for n in composites.get("realm") or []]
|
|
200
|
+
for client_id, names in (composites.get("client") or {}).items():
|
|
201
|
+
found.extend(self.client_role(client_id, n, changes) for n in names or [])
|
|
202
|
+
return [r for r in found if r]
|
|
203
|
+
|
|
204
|
+
def ensure_all(self, changes: list[str]) -> None:
|
|
205
|
+
for name in self.template_realm:
|
|
206
|
+
self.realm_role(name, changes)
|
|
207
|
+
for client_id, roles in self.template_client.items():
|
|
208
|
+
for name in roles:
|
|
209
|
+
self.client_role(client_id, name, changes)
|
|
210
|
+
|
|
211
|
+
|
|
212
|
+
def _reconcile_group_roles(api, roles: _Roles, group: dict, group_id: str, path: str, changes) -> None:
|
|
213
|
+
realm_wanted = group.get("realmRoles") or []
|
|
214
|
+
client_wanted = {c: r for c, r in (group.get("clientRoles") or {}).items() if r}
|
|
215
|
+
if not realm_wanted and not client_wanted:
|
|
216
|
+
return
|
|
217
|
+
mappings = api.group_role_mappings(group_id) or {}
|
|
218
|
+
have_realm = {r.get("name") for r in mappings.get("realmMappings") or []}
|
|
219
|
+
add = [roles.realm_role(n, changes) for n in realm_wanted if n not in have_realm]
|
|
220
|
+
add = [r for r in add if r]
|
|
221
|
+
if add:
|
|
222
|
+
api.add_group_realm_roles(group_id, add)
|
|
223
|
+
changes.extend(f"group realm role {path}:{r['name']}" for r in add)
|
|
224
|
+
live_clients = mappings.get("clientMappings") or {}
|
|
225
|
+
for client_id, names in client_wanted.items():
|
|
226
|
+
have = {r.get("name") for r in (live_clients.get(client_id) or {}).get("mappings") or []}
|
|
227
|
+
add = [roles.client_role(client_id, n, changes) for n in names if n not in have]
|
|
228
|
+
add = [r for r in add if r]
|
|
229
|
+
if add:
|
|
230
|
+
api.add_group_client_roles(group_id, roles.client_uuid(client_id), add)
|
|
231
|
+
changes.extend(f"group client role {path}:{client_id}/{r['name']}" for r in add)
|
|
232
|
+
|
|
233
|
+
|
|
234
|
+
def _reconcile_groups(api, desired: list[dict], current: list[dict], parent_id, prefix, changes,
|
|
235
|
+
roles: _Roles) -> None:
|
|
236
|
+
by_name = {g.get("name"): g for g in current}
|
|
237
|
+
for group in desired:
|
|
238
|
+
name = group.get("name")
|
|
239
|
+
if not name:
|
|
240
|
+
continue
|
|
241
|
+
path = f"{prefix}/{name}"
|
|
242
|
+
found = by_name.get(name)
|
|
243
|
+
if found is None:
|
|
244
|
+
body = {k: v for k, v in _strip_ids(group).items()
|
|
245
|
+
if k not in ("subGroups", "realmRoles", "clientRoles")}
|
|
246
|
+
group_id = api.create_group(body, parent_id)
|
|
247
|
+
changes.append(f"group {path}")
|
|
248
|
+
if not group_id:
|
|
249
|
+
siblings = api.children(parent_id) if parent_id else api.groups()
|
|
250
|
+
group_id = next((g["id"] for g in siblings if g.get("name") == name), None)
|
|
251
|
+
children = []
|
|
252
|
+
else:
|
|
253
|
+
group_id = found["id"]
|
|
254
|
+
missing = {k: v for k, v in (group.get("attributes") or {}).items()
|
|
255
|
+
if k not in (found.get("attributes") or {})}
|
|
256
|
+
if missing:
|
|
257
|
+
full = api.group(group_id)
|
|
258
|
+
attributes = dict(full.get("attributes") or {})
|
|
259
|
+
for key, value in missing.items():
|
|
260
|
+
attributes.setdefault(key, value)
|
|
261
|
+
full["attributes"] = attributes
|
|
262
|
+
api.update_group(group_id, full)
|
|
263
|
+
changes.extend(f"group attribute {path}:{key}" for key in sorted(missing))
|
|
264
|
+
children = found.get("subGroups") or []
|
|
265
|
+
if group.get("subGroups") and not children and found.get("subGroupCount", 1):
|
|
266
|
+
children = api.children(group_id)
|
|
267
|
+
if group_id:
|
|
268
|
+
_reconcile_group_roles(api, roles, group, group_id, path, changes)
|
|
269
|
+
if group.get("subGroups") and group_id:
|
|
270
|
+
_reconcile_groups(api, group["subGroups"], children, group_id, path, changes, roles)
|
|
271
|
+
|
|
272
|
+
|
|
273
|
+
def reconcile_realm(api, realm: dict) -> list[str]:
|
|
274
|
+
"""Create what ``realm`` defines but the live realm lacks. Returns a list of changes."""
|
|
275
|
+
changes: list[str] = []
|
|
276
|
+
_reconcile_clients(api, realm.get("clients") or [], changes)
|
|
277
|
+
roles = _Roles(api, realm)
|
|
278
|
+
roles.ensure_all(changes)
|
|
279
|
+
_reconcile_groups(api, realm.get("groups") or [], api.groups(), None, "", changes, roles)
|
|
280
|
+
return changes
|
|
281
|
+
|
|
282
|
+
|
|
283
|
+
def _free_port() -> int:
|
|
284
|
+
with socket.socket() as sock:
|
|
285
|
+
sock.bind(("127.0.0.1", 0))
|
|
286
|
+
return sock.getsockname()[1]
|
|
287
|
+
|
|
288
|
+
|
|
289
|
+
@contextmanager
|
|
290
|
+
def port_forward(kubeconfig: str | None, namespace: str, target: str, remote_port: int,
|
|
291
|
+
popen=subprocess.Popen, ready_timeout: float = 20.0):
|
|
292
|
+
"""Forward a free local port to ``target`` in the cluster; yields the local base URL."""
|
|
293
|
+
local_port = _free_port()
|
|
294
|
+
cmd = ["kubectl", "port-forward", target, f"{local_port}:{remote_port}", "-n", namespace]
|
|
295
|
+
if kubeconfig:
|
|
296
|
+
cmd.extend(["--kubeconfig", kubeconfig])
|
|
297
|
+
errors = tempfile.TemporaryFile()
|
|
298
|
+
process = popen(cmd, stdout=subprocess.DEVNULL, stderr=errors)
|
|
299
|
+
try:
|
|
300
|
+
deadline = time.monotonic() + ready_timeout
|
|
301
|
+
while True:
|
|
302
|
+
if process.poll() is not None:
|
|
303
|
+
errors.seek(0)
|
|
304
|
+
detail = errors.read().decode(errors="replace").strip()
|
|
305
|
+
raise RuntimeError(f"kubectl port-forward to {namespace}/{target} exited: {detail}")
|
|
306
|
+
try:
|
|
307
|
+
with socket.create_connection(("127.0.0.1", local_port), timeout=1):
|
|
308
|
+
break
|
|
309
|
+
except OSError:
|
|
310
|
+
if time.monotonic() > deadline:
|
|
311
|
+
raise RuntimeError(f"kubectl port-forward to {namespace}/{target} not ready")
|
|
312
|
+
time.sleep(0.2)
|
|
313
|
+
yield f"http://127.0.0.1:{local_port}"
|
|
314
|
+
finally:
|
|
315
|
+
process.terminate()
|
|
316
|
+
try:
|
|
317
|
+
process.wait(timeout=5)
|
|
318
|
+
except subprocess.TimeoutExpired:
|
|
319
|
+
process.kill()
|
|
320
|
+
errors.close()
|
|
@@ -0,0 +1,265 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
"""
|
|
3
|
+
Kubeconfig Fixer Utility
|
|
4
|
+
|
|
5
|
+
This utility automatically detects and fixes the gke-gcloud-auth-plugin path
|
|
6
|
+
in kubeconfig files across different platforms (macOS, Linux, Windows WSL).
|
|
7
|
+
"""
|
|
8
|
+
|
|
9
|
+
import os
|
|
10
|
+
import sys
|
|
11
|
+
import json
|
|
12
|
+
import yaml
|
|
13
|
+
import subprocess
|
|
14
|
+
import platform
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
class KubeconfigFixer:
|
|
18
|
+
"""Utility to fix gke-gcloud-auth-plugin paths in kubeconfig files"""
|
|
19
|
+
|
|
20
|
+
def __init__(self):
|
|
21
|
+
self.platform = platform.system().lower()
|
|
22
|
+
self.architecture = platform.machine().lower()
|
|
23
|
+
|
|
24
|
+
def find_gke_auth_plugin(self) -> str | None:
|
|
25
|
+
"""
|
|
26
|
+
Find the gke-gcloud-auth-plugin executable across different platforms
|
|
27
|
+
Returns the full path to the plugin or None if not found
|
|
28
|
+
"""
|
|
29
|
+
# Common paths to check based on platform
|
|
30
|
+
potential_paths = self._get_potential_paths()
|
|
31
|
+
|
|
32
|
+
for path in potential_paths:
|
|
33
|
+
if self._is_valid_plugin_path(path):
|
|
34
|
+
return path
|
|
35
|
+
|
|
36
|
+
# Try to find using which/where command
|
|
37
|
+
return self._find_using_system_command()
|
|
38
|
+
|
|
39
|
+
def _get_potential_paths(self) -> list[str]:
|
|
40
|
+
"""Get potential paths based on platform and common installation methods"""
|
|
41
|
+
paths = []
|
|
42
|
+
|
|
43
|
+
if self.platform == "darwin": # macOS
|
|
44
|
+
# Homebrew paths
|
|
45
|
+
paths.extend([
|
|
46
|
+
"/opt/homebrew/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/bin/gke-gcloud-auth-plugin",
|
|
47
|
+
"/opt/homebrew/share/google-cloud-sdk/bin/gke-gcloud-auth-plugin",
|
|
48
|
+
"/usr/local/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/bin/gke-gcloud-auth-plugin",
|
|
49
|
+
"/opt/homebrew/bin/gke-gcloud-auth-plugin",
|
|
50
|
+
"/usr/local/bin/gke-gcloud-auth-plugin",
|
|
51
|
+
# Intel Mac paths
|
|
52
|
+
"/usr/local/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/bin/gke-gcloud-auth-plugin",
|
|
53
|
+
"/usr/local/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/bin/gke-gcloud-auth-plugin",
|
|
54
|
+
])
|
|
55
|
+
|
|
56
|
+
# Check for different Homebrew architectures
|
|
57
|
+
if self.architecture == "arm64": # Apple Silicon
|
|
58
|
+
paths.extend([
|
|
59
|
+
"/opt/homebrew/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/bin/gke-gcloud-auth-plugin",
|
|
60
|
+
])
|
|
61
|
+
else: # Intel
|
|
62
|
+
paths.extend([
|
|
63
|
+
"/usr/local/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/bin/gke-gcloud-auth-plugin",
|
|
64
|
+
])
|
|
65
|
+
|
|
66
|
+
elif self.platform == "linux":
|
|
67
|
+
# Linux paths (including WSL)
|
|
68
|
+
paths.extend([
|
|
69
|
+
"/usr/bin/gke-gcloud-auth-plugin",
|
|
70
|
+
"/usr/local/bin/gke-gcloud-auth-plugin",
|
|
71
|
+
"/snap/bin/gke-gcloud-auth-plugin",
|
|
72
|
+
"/opt/google-cloud-sdk/bin/gke-gcloud-auth-plugin",
|
|
73
|
+
"/usr/lib/google-cloud-sdk/bin/gke-gcloud-auth-plugin",
|
|
74
|
+
# WSL specific paths
|
|
75
|
+
"/mnt/c/Program Files (x86)/Google/Cloud SDK/google-cloud-sdk/bin/gke-gcloud-auth-plugin",
|
|
76
|
+
"/mnt/c/Program Files/Google/Cloud SDK/google-cloud-sdk/bin/gke-gcloud-auth-plugin",
|
|
77
|
+
])
|
|
78
|
+
|
|
79
|
+
elif self.platform == "windows":
|
|
80
|
+
# Windows paths
|
|
81
|
+
paths.extend([
|
|
82
|
+
"C:\\Program Files (x86)\\Google\\Cloud SDK\\google-cloud-sdk\\bin\\gke-gcloud-auth-plugin.exe",
|
|
83
|
+
"C:\\Program Files\\Google\\Cloud SDK\\google-cloud-sdk\\bin\\gke-gcloud-auth-plugin.exe",
|
|
84
|
+
"C:\\Users\\{username}\\AppData\\Local\\Google\\Cloud SDK\\google-cloud-sdk\\bin\\gke-gcloud-auth-plugin.exe",
|
|
85
|
+
])
|
|
86
|
+
|
|
87
|
+
# Add PATH-based search
|
|
88
|
+
paths.extend([
|
|
89
|
+
"gke-gcloud-auth-plugin", # In PATH
|
|
90
|
+
"./gke-gcloud-auth-plugin", # Current directory
|
|
91
|
+
])
|
|
92
|
+
|
|
93
|
+
return paths
|
|
94
|
+
|
|
95
|
+
def _is_valid_plugin_path(self, path: str) -> bool:
|
|
96
|
+
"""Check if the path is a valid gke-gcloud-auth-plugin executable"""
|
|
97
|
+
try:
|
|
98
|
+
# Check if file exists and is executable
|
|
99
|
+
if not os.path.exists(path):
|
|
100
|
+
return False
|
|
101
|
+
|
|
102
|
+
# Check if it's executable
|
|
103
|
+
if not os.access(path, os.X_OK):
|
|
104
|
+
return False
|
|
105
|
+
|
|
106
|
+
# Try to run the plugin with --help to verify it's the right tool
|
|
107
|
+
try:
|
|
108
|
+
result = subprocess.run(
|
|
109
|
+
[path, "--help"],
|
|
110
|
+
capture_output=True,
|
|
111
|
+
text=True,
|
|
112
|
+
timeout=10
|
|
113
|
+
)
|
|
114
|
+
# If it runs and shows help (exit code 0 or 2), it's likely the right plugin
|
|
115
|
+
# Check for either the plugin name or "Usage of" in stdout or stderr
|
|
116
|
+
combined_output = result.stdout + result.stderr
|
|
117
|
+
return result.returncode in [0, 2] and ("gke-gcloud-auth-plugin" in combined_output or "Usage of" in combined_output)
|
|
118
|
+
except (subprocess.TimeoutExpired, subprocess.CalledProcessError, FileNotFoundError):
|
|
119
|
+
# If it fails, it might still be the right plugin but with different args
|
|
120
|
+
# Check if the file name matches
|
|
121
|
+
return "gke-gcloud-auth-plugin" in os.path.basename(path)
|
|
122
|
+
|
|
123
|
+
except Exception:
|
|
124
|
+
return False
|
|
125
|
+
|
|
126
|
+
def _find_using_system_command(self) -> str | None:
|
|
127
|
+
"""Try to find the plugin using system commands (which/where)"""
|
|
128
|
+
try:
|
|
129
|
+
if self.platform == "windows":
|
|
130
|
+
# Use where command on Windows
|
|
131
|
+
result = subprocess.run(
|
|
132
|
+
["where", "gke-gcloud-auth-plugin"],
|
|
133
|
+
capture_output=True,
|
|
134
|
+
text=True,
|
|
135
|
+
timeout=10
|
|
136
|
+
)
|
|
137
|
+
else:
|
|
138
|
+
# Use which command on Unix-like systems
|
|
139
|
+
result = subprocess.run(
|
|
140
|
+
["which", "gke-gcloud-auth-plugin"],
|
|
141
|
+
capture_output=True,
|
|
142
|
+
text=True,
|
|
143
|
+
timeout=10
|
|
144
|
+
)
|
|
145
|
+
|
|
146
|
+
if result.returncode == 0:
|
|
147
|
+
path = result.stdout.strip().split('\n')[0]
|
|
148
|
+
if self._is_valid_plugin_path(path):
|
|
149
|
+
return path
|
|
150
|
+
|
|
151
|
+
except (subprocess.TimeoutExpired, subprocess.CalledProcessError, FileNotFoundError):
|
|
152
|
+
pass
|
|
153
|
+
|
|
154
|
+
return None
|
|
155
|
+
|
|
156
|
+
def fix_kubeconfig(self, kubeconfig_path: str) -> bool:
|
|
157
|
+
"""
|
|
158
|
+
Fix the gke-gcloud-auth-plugin path in a kubeconfig file
|
|
159
|
+
|
|
160
|
+
Args:
|
|
161
|
+
kubeconfig_path: Path to the kubeconfig file
|
|
162
|
+
|
|
163
|
+
Returns:
|
|
164
|
+
bool: True if successful, False otherwise
|
|
165
|
+
"""
|
|
166
|
+
try:
|
|
167
|
+
# Find the correct plugin path
|
|
168
|
+
plugin_path = self.find_gke_auth_plugin()
|
|
169
|
+
|
|
170
|
+
if not plugin_path:
|
|
171
|
+
print("❌ Could not find gke-gcloud-auth-plugin")
|
|
172
|
+
return False
|
|
173
|
+
|
|
174
|
+
print(f"✅ Found gke-gcloud-auth-plugin at: {plugin_path}")
|
|
175
|
+
|
|
176
|
+
# Read the kubeconfig file (try YAML first, then JSON)
|
|
177
|
+
with open(kubeconfig_path, 'r') as f:
|
|
178
|
+
content = f.read()
|
|
179
|
+
|
|
180
|
+
try:
|
|
181
|
+
# Try YAML first
|
|
182
|
+
kubeconfig = yaml.safe_load(content)
|
|
183
|
+
except yaml.YAMLError:
|
|
184
|
+
try:
|
|
185
|
+
# Fall back to JSON
|
|
186
|
+
kubeconfig = json.loads(content)
|
|
187
|
+
except json.JSONDecodeError:
|
|
188
|
+
print("❌ Could not parse kubeconfig file as YAML or JSON")
|
|
189
|
+
return False
|
|
190
|
+
|
|
191
|
+
# Check if we need to fix the command
|
|
192
|
+
if 'users' in kubeconfig and len(kubeconfig['users']) > 0:
|
|
193
|
+
user = kubeconfig['users'][0]
|
|
194
|
+
if 'user' in user and 'exec' in user['user']:
|
|
195
|
+
exec_config = user['user']['exec']
|
|
196
|
+
if exec_config.get('command') == 'gke-gcloud-auth-plugin':
|
|
197
|
+
# Update the command with the full path
|
|
198
|
+
exec_config['command'] = plugin_path
|
|
199
|
+
print(f"✅ Updated kubeconfig with plugin path: {plugin_path}")
|
|
200
|
+
|
|
201
|
+
# Write the updated kubeconfig back (try YAML first, then JSON)
|
|
202
|
+
with open(kubeconfig_path, 'w') as f:
|
|
203
|
+
try:
|
|
204
|
+
# Try to write as YAML
|
|
205
|
+
yaml.dump(kubeconfig, f, default_flow_style=False, sort_keys=False)
|
|
206
|
+
except Exception:
|
|
207
|
+
# Fall back to JSON
|
|
208
|
+
json.dump(kubeconfig, f, indent=2)
|
|
209
|
+
|
|
210
|
+
return True
|
|
211
|
+
else:
|
|
212
|
+
print(f"ℹ️ Kubeconfig already has custom command: {exec_config.get('command')}")
|
|
213
|
+
return True
|
|
214
|
+
else:
|
|
215
|
+
print("ℹ️ No exec configuration found in kubeconfig")
|
|
216
|
+
return True
|
|
217
|
+
else:
|
|
218
|
+
print("ℹ️ No users configuration found in kubeconfig")
|
|
219
|
+
return True
|
|
220
|
+
|
|
221
|
+
except Exception as e:
|
|
222
|
+
print(f"❌ Error fixing kubeconfig: {str(e)}")
|
|
223
|
+
return False
|
|
224
|
+
|
|
225
|
+
def test_plugin(self, plugin_path: str) -> bool:
|
|
226
|
+
"""Test if the plugin works correctly"""
|
|
227
|
+
try:
|
|
228
|
+
result = subprocess.run(
|
|
229
|
+
[plugin_path, "--help"],
|
|
230
|
+
capture_output=True,
|
|
231
|
+
text=True,
|
|
232
|
+
timeout=10
|
|
233
|
+
)
|
|
234
|
+
return result.returncode == 0
|
|
235
|
+
except Exception:
|
|
236
|
+
return False
|
|
237
|
+
|
|
238
|
+
|
|
239
|
+
def main():
|
|
240
|
+
"""Main function for command line usage"""
|
|
241
|
+
if len(sys.argv) != 2:
|
|
242
|
+
print("Usage: python kubeconfig_fixer.py <kubeconfig_path>")
|
|
243
|
+
sys.exit(1)
|
|
244
|
+
|
|
245
|
+
kubeconfig_path = sys.argv[1]
|
|
246
|
+
|
|
247
|
+
if not os.path.exists(kubeconfig_path):
|
|
248
|
+
print(f"❌ Kubeconfig file not found: {kubeconfig_path}")
|
|
249
|
+
sys.exit(1)
|
|
250
|
+
|
|
251
|
+
fixer = KubeconfigFixer()
|
|
252
|
+
|
|
253
|
+
print(f"🔧 Fixing kubeconfig: {kubeconfig_path}")
|
|
254
|
+
print(f"🖥️ Platform: {fixer.platform} ({fixer.architecture})")
|
|
255
|
+
|
|
256
|
+
if fixer.fix_kubeconfig(kubeconfig_path):
|
|
257
|
+
print("✅ Kubeconfig fixed successfully")
|
|
258
|
+
sys.exit(0)
|
|
259
|
+
else:
|
|
260
|
+
print("❌ Failed to fix kubeconfig")
|
|
261
|
+
sys.exit(1)
|
|
262
|
+
|
|
263
|
+
|
|
264
|
+
if __name__ == "__main__":
|
|
265
|
+
main()
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"""Helpers for the ``kube-core/raw`` "extras" helm releases.
|
|
2
|
+
|
|
3
|
+
Several deployers render provider-specific manifests (ExternalSecrets,
|
|
4
|
+
ClusterIssuers, ...) into a values file and install them with the
|
|
5
|
+
generic ``kube-core/raw`` chart. Some providers need no extra objects
|
|
6
|
+
(e.g. Google Cloud DNS via Workload Identity), so the template renders
|
|
7
|
+
``manifests: []``. kube-core/raw cannot install an empty list (it fails
|
|
8
|
+
with ``.data.manifests: expected string``), so callers skip the release.
|
|
9
|
+
"""
|
|
10
|
+
|
|
11
|
+
from __future__ import annotations
|
|
12
|
+
|
|
13
|
+
import logging
|
|
14
|
+
|
|
15
|
+
import yaml
|
|
16
|
+
|
|
17
|
+
logger = logging.getLogger(__name__)
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
def raw_values_have_manifests(values_path: str) -> bool:
|
|
21
|
+
"""True if the rendered kube-core/raw values file has any manifest."""
|
|
22
|
+
try:
|
|
23
|
+
with open(values_path, encoding="utf-8") as fh:
|
|
24
|
+
data = yaml.safe_load(fh) or {}
|
|
25
|
+
except FileNotFoundError:
|
|
26
|
+
return False
|
|
27
|
+
manifests = data.get("manifests") if isinstance(data, dict) else None
|
|
28
|
+
has = bool(manifests)
|
|
29
|
+
if not has:
|
|
30
|
+
logger.info(
|
|
31
|
+
"No extra manifests rendered in %s; skipping kube-core/raw release.",
|
|
32
|
+
values_path,
|
|
33
|
+
)
|
|
34
|
+
return has
|