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.
Files changed (543) hide show
  1. f2dev/__init__.py +1 -0
  2. f2dev/__main__.py +5 -0
  3. f2dev/_bundle/platform/.dockerignore +80 -0
  4. f2dev/_bundle/platform/.gitignore +82 -0
  5. f2dev/_bundle/platform/LICENSE +202 -0
  6. f2dev/_bundle/platform/charts/data_services_charts/argo_workflows/template_values.yaml +1731 -0
  7. f2dev/_bundle/platform/charts/data_services_charts/argo_workflows/workflow_templates/Chart.yaml +9 -0
  8. f2dev/_bundle/platform/charts/data_services_charts/argo_workflows/workflow_templates/files/block-airflow-deploy.yaml +60 -0
  9. f2dev/_bundle/platform/charts/data_services_charts/argo_workflows/workflow_templates/files/block-bi-sync.yaml +46 -0
  10. f2dev/_bundle/platform/charts/data_services_charts/argo_workflows/workflow_templates/files/block-checkout.yaml +49 -0
  11. f2dev/_bundle/platform/charts/data_services_charts/argo_workflows/workflow_templates/files/block-console-sync.yaml +41 -0
  12. f2dev/_bundle/platform/charts/data_services_charts/argo_workflows/workflow_templates/files/block-e2e-label.yaml +48 -0
  13. f2dev/_bundle/platform/charts/data_services_charts/argo_workflows/workflow_templates/files/block-e2e-run.yaml +43 -0
  14. f2dev/_bundle/platform/charts/data_services_charts/argo_workflows/workflow_templates/files/block-e2e-teardown.yaml +47 -0
  15. f2dev/_bundle/platform/charts/data_services_charts/argo_workflows/workflow_templates/files/block-governance.yaml +40 -0
  16. f2dev/_bundle/platform/charts/data_services_charts/argo_workflows/workflow_templates/files/block-lint.yaml +37 -0
  17. f2dev/_bundle/platform/charts/data_services_charts/argo_workflows/workflow_templates/files/block-notify.yaml +32 -0
  18. f2dev/_bundle/platform/charts/data_services_charts/argo_workflows/workflow_templates/files/block-quality.yaml +38 -0
  19. f2dev/_bundle/platform/charts/data_services_charts/argo_workflows/workflow_templates/files/block-refresh.yaml +36 -0
  20. f2dev/_bundle/platform/charts/data_services_charts/argo_workflows/workflow_templates/files/block-supersede.yaml +30 -0
  21. f2dev/_bundle/platform/charts/data_services_charts/argo_workflows/workflow_templates/files/block-tags.yaml +44 -0
  22. f2dev/_bundle/platform/charts/data_services_charts/argo_workflows/workflow_templates/files/pipeline-branch.yaml +138 -0
  23. f2dev/_bundle/platform/charts/data_services_charts/argo_workflows/workflow_templates/files/pipeline-main.yaml +150 -0
  24. f2dev/_bundle/platform/charts/data_services_charts/argo_workflows/workflow_templates/files/pipeline-pr.yaml +184 -0
  25. f2dev/_bundle/platform/charts/data_services_charts/argo_workflows/workflow_templates/templates/NOTES.txt +18 -0
  26. f2dev/_bundle/platform/charts/data_services_charts/argo_workflows/workflow_templates/templates/settings-configmap.yaml +14 -0
  27. f2dev/_bundle/platform/charts/data_services_charts/argo_workflows/workflow_templates/templates/workflowtemplates.yaml +31 -0
  28. f2dev/_bundle/platform/charts/data_services_charts/argo_workflows/workflow_templates/values.yaml +41 -0
  29. f2dev/_bundle/platform/charts/data_services_charts/cicd_workload_runner/github/template_github_values.yaml +436 -0
  30. f2dev/_bundle/platform/charts/data_services_charts/cicd_workload_runner/github/template_github_values_extra.yaml +49 -0
  31. f2dev/_bundle/platform/charts/data_services_charts/cicd_workload_runner/gitlab/template_gitlab_values.yaml +551 -0
  32. f2dev/_bundle/platform/charts/data_services_charts/cicd_workload_runner/gitlab/template_gitlab_values_extra.yaml +9 -0
  33. f2dev/_bundle/platform/charts/data_services_charts/data_analysis/lightdash/template_values.yaml +359 -0
  34. f2dev/_bundle/platform/charts/data_services_charts/data_analysis/metabase/template_values.yaml +384 -0
  35. f2dev/_bundle/platform/charts/data_services_charts/data_analysis/superset/template_values.yaml +1562 -0
  36. f2dev/_bundle/platform/charts/data_services_charts/data_analysis/template_values.yaml +269 -0
  37. f2dev/_bundle/platform/charts/data_services_charts/data_control_plane/.helmignore +15 -0
  38. f2dev/_bundle/platform/charts/data_services_charts/data_control_plane/Chart.yaml +20 -0
  39. f2dev/_bundle/platform/charts/data_services_charts/data_control_plane/template_values.yaml.j2 +175 -0
  40. f2dev/_bundle/platform/charts/data_services_charts/data_control_plane/templates/NOTES.txt +19 -0
  41. f2dev/_bundle/platform/charts/data_services_charts/data_control_plane/templates/_helpers.tpl +50 -0
  42. f2dev/_bundle/platform/charts/data_services_charts/data_control_plane/templates/cicd-rbac.yaml +30 -0
  43. f2dev/_bundle/platform/charts/data_services_charts/data_control_plane/templates/configmap.yaml +142 -0
  44. f2dev/_bundle/platform/charts/data_services_charts/data_control_plane/templates/extras.yaml +14 -0
  45. f2dev/_bundle/platform/charts/data_services_charts/data_control_plane/templates/ingress.yaml +69 -0
  46. f2dev/_bundle/platform/charts/data_services_charts/data_control_plane/templates/promtail-configmap.yaml +68 -0
  47. f2dev/_bundle/platform/charts/data_services_charts/data_control_plane/templates/secret.yaml +31 -0
  48. f2dev/_bundle/platform/charts/data_services_charts/data_control_plane/templates/service.yaml +15 -0
  49. f2dev/_bundle/platform/charts/data_services_charts/data_control_plane/templates/serviceaccount.yaml +12 -0
  50. f2dev/_bundle/platform/charts/data_services_charts/data_control_plane/templates/statefulset.yaml +276 -0
  51. f2dev/_bundle/platform/charts/data_services_charts/data_control_plane/templates/valkey.yaml +113 -0
  52. f2dev/_bundle/platform/charts/data_services_charts/data_control_plane/templates/warehouse-stats-cronjob.yaml +107 -0
  53. f2dev/_bundle/platform/charts/data_services_charts/data_control_plane/values.yaml +828 -0
  54. f2dev/_bundle/platform/charts/data_services_charts/data_dbt_server/template_values.yaml +385 -0
  55. f2dev/_bundle/platform/charts/data_services_charts/data_governance/template_dh_prerequisites_values.yaml +118 -0
  56. f2dev/_bundle/platform/charts/data_services_charts/data_governance/template_dh_values.yaml +1671 -0
  57. f2dev/_bundle/platform/charts/data_services_charts/data_governance/template_kafka_values.yaml +112 -0
  58. f2dev/_bundle/platform/charts/data_services_charts/data_governance/template_opensearch_values.yaml +662 -0
  59. f2dev/_bundle/platform/charts/data_services_charts/data_governance/template_values.yaml +738 -0
  60. f2dev/_bundle/platform/charts/data_services_charts/data_mcp_hub/hub/Chart.yaml +6 -0
  61. f2dev/_bundle/platform/charts/data_services_charts/data_mcp_hub/hub/files/argo-openapi.json +681 -0
  62. f2dev/_bundle/platform/charts/data_services_charts/data_mcp_hub/hub/templates/_helpers.tpl +17 -0
  63. f2dev/_bundle/platform/charts/data_services_charts/data_mcp_hub/hub/templates/argo-rbac.yaml +35 -0
  64. f2dev/_bundle/platform/charts/data_services_charts/data_mcp_hub/hub/templates/backends.yaml +327 -0
  65. f2dev/_bundle/platform/charts/data_services_charts/data_mcp_hub/hub/templates/gateway.yaml +150 -0
  66. f2dev/_bundle/platform/charts/data_services_charts/data_mcp_hub/hub/values.yaml +91 -0
  67. f2dev/_bundle/platform/charts/data_services_charts/data_mcp_hub/template_values.yaml +142 -0
  68. f2dev/_bundle/platform/charts/data_services_charts/data_modeling/template_values.yaml +1167 -0
  69. f2dev/_bundle/platform/charts/data_services_charts/data_modeling/template_values_extra.yaml +99 -0
  70. f2dev/_bundle/platform/charts/data_services_charts/data_orchestration/airflow-cleanup/Dockerfile +10 -0
  71. f2dev/_bundle/platform/charts/data_services_charts/data_orchestration/airflow-cleanup/build.sh +38 -0
  72. f2dev/_bundle/platform/charts/data_services_charts/data_orchestration/airflow-cleanup/cleanup.py +452 -0
  73. f2dev/_bundle/platform/charts/data_services_charts/data_orchestration/airflow-cleanup/requirements.txt +3 -0
  74. f2dev/_bundle/platform/charts/data_services_charts/data_orchestration/docs/keycloak-oidc-setup.md +106 -0
  75. f2dev/_bundle/platform/charts/data_services_charts/data_orchestration/template_values.yaml +5536 -0
  76. f2dev/_bundle/platform/charts/data_services_charts/data_orchestration/template_values_extra.yaml +379 -0
  77. f2dev/_bundle/platform/charts/data_services_charts/data_orchestration/webserver-config/configmap.yaml +459 -0
  78. f2dev/_bundle/platform/charts/data_services_charts/data_orchestration/webserver-config/fast2dev_auth.py +285 -0
  79. f2dev/_bundle/platform/charts/data_services_charts/data_orchestration/webserver-config/fast2dev_mcp_plugin.py +24 -0
  80. f2dev/_bundle/platform/charts/data_services_charts/data_orchestration/webserver-config/webserver_config.py +130 -0
  81. f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte-cleanup/Dockerfile +10 -0
  82. f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte-cleanup/build.sh +38 -0
  83. f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte-cleanup/cleanup.py +749 -0
  84. f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte-cleanup/k8s/configmap.yaml +24 -0
  85. f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte-cleanup/k8s/cronjob.yaml +137 -0
  86. f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte-cleanup/requirements.txt +3 -0
  87. f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/.helmignore +26 -0
  88. f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/Chart.lock +3 -0
  89. f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/Chart.yaml +15 -0
  90. f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/README.md +243 -0
  91. f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/NOTES.txt +31 -0
  92. f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/_helpers.tpl +245 -0
  93. f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/_images.tpl +17 -0
  94. f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/airbyte-auth-secret.yaml +35 -0
  95. f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/airbyte-bootloader/bootloader-secrets.yaml +19 -0
  96. f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/airbyte-bootloader/pod.yaml +126 -0
  97. f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/airbyte-connector-rollout-worker/deployment.yaml +171 -0
  98. f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/airbyte-cron/cron-secrets.yaml +19 -0
  99. f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/airbyte-cron/deployment.yaml +149 -0
  100. f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/airbyte-db.yaml +88 -0
  101. f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/airbyte-direct-job-runner/_helpers.tpl +111 -0
  102. f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/airbyte-direct-job-runner/deployment.yaml +169 -0
  103. f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/airbyte-direct-job-runner/hpa.yaml +23 -0
  104. f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/airbyte-direct-job-runner/pdb.yaml +17 -0
  105. f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/airbyte-direct-job-runner/service.yaml +25 -0
  106. f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/airbyte-direct-job-runner/serviceaccount.yaml +10 -0
  107. f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/airbyte-featureflag-server/deployment.yaml +161 -0
  108. f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/airbyte-featureflag-server/service.yaml +25 -0
  109. f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/airbyte-keycloak/service.yaml +62 -0
  110. f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/airbyte-keycloak/statefulset.yaml +182 -0
  111. f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/airbyte-manifest-server/_helpers.tpl +54 -0
  112. f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/airbyte-manifest-server/deployment.yaml +152 -0
  113. f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/airbyte-manifest-server/service.yaml +23 -0
  114. f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/airbyte-manifest-server/serviceaccount.yaml +10 -0
  115. f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/airbyte-metrics/deployment.yaml +124 -0
  116. f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/airbyte-server/deployment.yaml +227 -0
  117. f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/airbyte-server/service.yaml +29 -0
  118. f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/airbyte-stigg-sidecar/deployment.yaml +184 -0
  119. f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/airbyte-stigg-sidecar/service.yaml +21 -0
  120. f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/airbyte-temporal/configmap.yaml +55 -0
  121. f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/airbyte-temporal/deployment.yaml +220 -0
  122. f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/airbyte-temporal/service.yaml +21 -0
  123. f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/airbyte-temporal-ui/deployment.yaml +122 -0
  124. f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/airbyte-temporal-ui/service.yaml +23 -0
  125. f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/airbyte-webapp/deployment.yaml +146 -0
  126. f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/airbyte-webapp/ingress.yaml +63 -0
  127. f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/airbyte-webapp/service.yaml +32 -0
  128. f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/airbyte-worker/deployment.yaml +229 -0
  129. f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/airbyte-workload-api-server/deployment.yaml +191 -0
  130. f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/airbyte-workload-api-server/service.yaml +25 -0
  131. f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/airbyte-workload-launcher/deployment.yaml +232 -0
  132. f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/airbyte-workload-launcher/jobs-secrets.yaml +21 -0
  133. f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/config/_auth.tpl +944 -0
  134. f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/config/_aws.tpl +109 -0
  135. f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/config/_cluster.tpl +82 -0
  136. f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/config/_common.tpl +370 -0
  137. f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/config/_connector.tpl +58 -0
  138. f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/config/_connectorRollout.tpl +141 -0
  139. f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/config/_connectorRolloutWorker.tpl +56 -0
  140. f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/config/_cron.tpl +62 -0
  141. f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/config/_customerio.tpl +56 -0
  142. f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/config/_database.tpl +375 -0
  143. f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/config/_dataplaneGroups.tpl +38 -0
  144. f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/config/_directJobRunner.tpl +122 -0
  145. f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/config/_featureFlags.tpl +126 -0
  146. f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/config/_java.tpl +38 -0
  147. f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/config/_jobs.tpl +422 -0
  148. f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/config/_keycloak.tpl +542 -0
  149. f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/config/_logging.tpl +38 -0
  150. f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/config/_metrics.tpl +214 -0
  151. f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/config/_micronaut.tpl +43 -0
  152. f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/config/_minio.tpl +64 -0
  153. f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/config/_secretsManager.tpl +628 -0
  154. f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/config/_server.tpl +533 -0
  155. f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/config/_shopify.tpl +83 -0
  156. f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/config/_stigg.tpl +157 -0
  157. f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/config/_storage.tpl +468 -0
  158. f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/config/_temporal.tpl +943 -0
  159. f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/config/_topology.tpl +98 -0
  160. f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/config/_tracking.tpl +82 -0
  161. f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/config/_webapp.tpl +38 -0
  162. f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/config/_worker.tpl +366 -0
  163. f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/config/_workloadApiServer.tpl +62 -0
  164. f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/config/_workloadLauncher.tpl +395 -0
  165. f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/config/_workloads.tpl +770 -0
  166. f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/env-configmap.yaml +62 -0
  167. f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/gcs-log-creds-secret.yaml +19 -0
  168. f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/ingress.yaml +69 -0
  169. f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/minio.yaml +161 -0
  170. f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/secret.yaml +31 -0
  171. f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/serviceaccount.yaml +50 -0
  172. f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/telemetry-configmap.yaml +32 -0
  173. f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/tests/test-webapp.yaml +34 -0
  174. f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/values.yaml +3158 -0
  175. f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte-metrics-fast2dev-ddp/.helmignore +12 -0
  176. f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte-metrics-fast2dev-ddp/Chart.yaml +16 -0
  177. f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte-metrics-fast2dev-ddp/README.md +172 -0
  178. f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte-metrics-fast2dev-ddp/templates/_helpers.tpl +42 -0
  179. f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte-metrics-fast2dev-ddp/templates/deployment.yaml +105 -0
  180. f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte-metrics-fast2dev-ddp/templates/externalsecret.yaml +23 -0
  181. f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte-metrics-fast2dev-ddp/templates/pdb.yaml +15 -0
  182. f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte-metrics-fast2dev-ddp/templates/service.yaml +18 -0
  183. f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte-metrics-fast2dev-ddp/values.yaml +97 -0
  184. f2dev/_bundle/platform/charts/data_services_charts/data_replication/feature-flags-configmap.yaml +16 -0
  185. f2dev/_bundle/platform/charts/data_services_charts/data_replication/template_metrics_values.yaml +13 -0
  186. f2dev/_bundle/platform/charts/data_services_charts/data_replication/template_oauth2proxy_values.yaml +1200 -0
  187. f2dev/_bundle/platform/charts/data_services_charts/data_replication/template_values.yaml +3255 -0
  188. f2dev/_bundle/platform/charts/data_services_charts/data_streaming/seatunnel/Chart.yaml +7 -0
  189. f2dev/_bundle/platform/charts/data_services_charts/data_streaming/seatunnel/conf/hazelcast-client.yaml +27 -0
  190. f2dev/_bundle/platform/charts/data_services_charts/data_streaming/seatunnel/conf/hazelcast-master.yaml +38 -0
  191. f2dev/_bundle/platform/charts/data_services_charts/data_streaming/seatunnel/conf/hazelcast-worker.yaml +29 -0
  192. f2dev/_bundle/platform/charts/data_services_charts/data_streaming/seatunnel/conf/jvm_client_options +24 -0
  193. f2dev/_bundle/platform/charts/data_services_charts/data_streaming/seatunnel/conf/jvm_master_options +6 -0
  194. f2dev/_bundle/platform/charts/data_services_charts/data_streaming/seatunnel/conf/jvm_worker_options +6 -0
  195. f2dev/_bundle/platform/charts/data_services_charts/data_streaming/seatunnel/conf/log4j2.properties +109 -0
  196. f2dev/_bundle/platform/charts/data_services_charts/data_streaming/seatunnel/conf/seatunnel.yaml +36 -0
  197. f2dev/_bundle/platform/charts/data_services_charts/data_streaming/seatunnel/templates/_helpers.tpl +70 -0
  198. f2dev/_bundle/platform/charts/data_services_charts/data_streaming/seatunnel/templates/configmap.yaml +11 -0
  199. f2dev/_bundle/platform/charts/data_services_charts/data_streaming/seatunnel/templates/deployment-master.yaml +120 -0
  200. f2dev/_bundle/platform/charts/data_services_charts/data_streaming/seatunnel/templates/deployment-worker.yaml +118 -0
  201. f2dev/_bundle/platform/charts/data_services_charts/data_streaming/seatunnel/templates/rbac.yaml +32 -0
  202. f2dev/_bundle/platform/charts/data_services_charts/data_streaming/seatunnel/templates/services.yaml +33 -0
  203. f2dev/_bundle/platform/charts/data_services_charts/data_streaming/seatunnel/values.yaml +101 -0
  204. f2dev/_bundle/platform/charts/data_services_charts/data_streaming/template_oauth2proxy_values.yaml +196 -0
  205. f2dev/_bundle/platform/charts/data_services_charts/data_streaming/template_values.yaml +75 -0
  206. f2dev/_bundle/platform/charts/data_services_charts/object_storage_operator/template_values.yaml +506 -0
  207. f2dev/_bundle/platform/charts/infra_services_charts/cert_manager/csi_driver_values.yaml +193 -0
  208. f2dev/_bundle/platform/charts/infra_services_charts/cert_manager/template_pdns_webhook_values.yaml +91 -0
  209. f2dev/_bundle/platform/charts/infra_services_charts/cert_manager/template_values.yaml +1777 -0
  210. f2dev/_bundle/platform/charts/infra_services_charts/cert_manager/template_values_extra.yaml +253 -0
  211. f2dev/_bundle/platform/charts/infra_services_charts/cluster_cleaner/template_values.yaml +57 -0
  212. f2dev/_bundle/platform/charts/infra_services_charts/external_dns/template_values.yaml +476 -0
  213. f2dev/_bundle/platform/charts/infra_services_charts/external_dns/template_values_extra.yaml +131 -0
  214. f2dev/_bundle/platform/charts/infra_services_charts/idp_sso_manager/realm_template.json +4785 -0
  215. f2dev/_bundle/platform/charts/infra_services_charts/idp_sso_manager/template_values.yaml +657 -0
  216. f2dev/_bundle/platform/charts/infra_services_charts/pvc_autoscaller/template_values.yaml +36 -0
  217. f2dev/_bundle/platform/charts/infra_services_charts/pvc_autoscaller/template_values_extra.yaml +352 -0
  218. f2dev/_bundle/platform/charts/infra_services_charts/secret_manager/template_values.yaml +1218 -0
  219. f2dev/_bundle/platform/charts/infra_services_charts/secret_manager/template_values_extra.yaml +845 -0
  220. f2dev/_bundle/platform/charts/infra_services_charts/secret_manager_operator/template_values.yaml +561 -0
  221. f2dev/_bundle/platform/charts/infra_services_charts/secret_manager_operator/template_values_extra.yaml +23 -0
  222. f2dev/_bundle/platform/charts/infra_services_charts/services_logs/template_alloy_events_values.yaml +59 -0
  223. f2dev/_bundle/platform/charts/infra_services_charts/services_logs/template_alloy_values.yaml +185 -0
  224. f2dev/_bundle/platform/charts/infra_services_charts/services_logs/template_loki_values.yaml +108 -0
  225. f2dev/_bundle/platform/charts/infra_services_charts/services_metrics/template_values.yaml +1530 -0
  226. f2dev/_bundle/platform/charts/infra_services_charts/services_monitoring/dashboards/00-main/.gitkeep +0 -0
  227. f2dev/_bundle/platform/charts/infra_services_charts/services_monitoring/dashboards/00-main/f2d-main.json +2871 -0
  228. f2dev/_bundle/platform/charts/infra_services_charts/services_monitoring/dashboards/01-platform/.gitkeep +0 -0
  229. f2dev/_bundle/platform/charts/infra_services_charts/services_monitoring/dashboards/01-platform/f2d-k8s-cluster.json +1751 -0
  230. f2dev/_bundle/platform/charts/infra_services_charts/services_monitoring/dashboards/01-platform/f2d-microservices.json +1682 -0
  231. f2dev/_bundle/platform/charts/infra_services_charts/services_monitoring/dashboards/01-platform/f2d-pvc-storage.json +1320 -0
  232. f2dev/_bundle/platform/charts/infra_services_charts/services_monitoring/dashboards/01-platform/f2d-service.json +1193 -0
  233. f2dev/_bundle/platform/charts/infra_services_charts/services_monitoring/dashboards/02-infrastructure/.gitkeep +0 -0
  234. f2dev/_bundle/platform/charts/infra_services_charts/services_monitoring/dashboards/02-infrastructure/f2d-cert-manager.json +755 -0
  235. f2dev/_bundle/platform/charts/infra_services_charts/services_monitoring/dashboards/02-infrastructure/f2d-keycloak.json +746 -0
  236. f2dev/_bundle/platform/charts/infra_services_charts/services_monitoring/dashboards/02-infrastructure/f2d-object-storage.json +881 -0
  237. f2dev/_bundle/platform/charts/infra_services_charts/services_monitoring/dashboards/02-infrastructure/f2d-postgresql.json +1590 -0
  238. f2dev/_bundle/platform/charts/infra_services_charts/services_monitoring/dashboards/02-infrastructure/f2d-traefik.json +1375 -0
  239. f2dev/_bundle/platform/charts/infra_services_charts/services_monitoring/dashboards/03-data-services/.gitkeep +0 -0
  240. f2dev/_bundle/platform/charts/infra_services_charts/services_monitoring/dashboards/03-data-services/f2d-cicd-workflows-trends.json +1916 -0
  241. f2dev/_bundle/platform/charts/infra_services_charts/services_monitoring/dashboards/03-data-services/f2d-cicd-workflows.json +1330 -0
  242. f2dev/_bundle/platform/charts/infra_services_charts/services_monitoring/dashboards/03-data-services/f2d-data-analysis.json +631 -0
  243. f2dev/_bundle/platform/charts/infra_services_charts/services_monitoring/dashboards/03-data-services/f2d-data-freshness.json +1362 -0
  244. f2dev/_bundle/platform/charts/infra_services_charts/services_monitoring/dashboards/03-data-services/f2d-data-governance.json +1958 -0
  245. f2dev/_bundle/platform/charts/infra_services_charts/services_monitoring/dashboards/03-data-services/f2d-data-modeling.json +764 -0
  246. f2dev/_bundle/platform/charts/infra_services_charts/services_monitoring/dashboards/03-data-services/f2d-data-orchestration-trends.json +2352 -0
  247. f2dev/_bundle/platform/charts/infra_services_charts/services_monitoring/dashboards/03-data-services/f2d-data-orchestration.json +1506 -0
  248. f2dev/_bundle/platform/charts/infra_services_charts/services_monitoring/dashboards/03-data-services/f2d-data-quality.json +1549 -0
  249. f2dev/_bundle/platform/charts/infra_services_charts/services_monitoring/dashboards/03-data-services/f2d-data-replication-trends.json +2799 -0
  250. f2dev/_bundle/platform/charts/infra_services_charts/services_monitoring/dashboards/03-data-services/f2d-data-replication.json +2153 -0
  251. f2dev/_bundle/platform/charts/infra_services_charts/services_monitoring/dashboards/03-data-services/f2d-data-streaming-trends.json +1536 -0
  252. f2dev/_bundle/platform/charts/infra_services_charts/services_monitoring/dashboards/03-data-services/f2d-data-streaming.json +1209 -0
  253. f2dev/_bundle/platform/charts/infra_services_charts/services_monitoring/dashboards/04-data-warehouse/.gitkeep +0 -0
  254. f2dev/_bundle/platform/charts/infra_services_charts/services_monitoring/dashboards/04-data-warehouse-bigquery/.gitkeep +0 -0
  255. f2dev/_bundle/platform/charts/infra_services_charts/services_monitoring/dashboards/04-data-warehouse-bigquery/f2d-bigquery.json +990 -0
  256. f2dev/_bundle/platform/charts/infra_services_charts/services_monitoring/dashboards/05-logs/.gitkeep +0 -0
  257. f2dev/_bundle/platform/charts/infra_services_charts/services_monitoring/dashboards/05-logs/f2d-logs.json +630 -0
  258. f2dev/_bundle/platform/charts/infra_services_charts/services_monitoring/dashboards/folders.yaml +17 -0
  259. f2dev/_bundle/platform/charts/infra_services_charts/services_monitoring/dashboards/requirements.yaml +8 -0
  260. f2dev/_bundle/platform/charts/infra_services_charts/services_monitoring/template_alerts_cm.yaml +2031 -0
  261. f2dev/_bundle/platform/charts/infra_services_charts/services_monitoring/template_values.yaml +1315 -0
  262. f2dev/_bundle/platform/charts/infra_services_charts/stackgres_postgres_db/template_values.yaml +550 -0
  263. f2dev/_bundle/platform/charts/infra_services_charts/stackgres_postgres_db/template_values_extra.yaml +742 -0
  264. f2dev/_bundle/platform/charts/infra_services_charts/traefik_lb/template_values.yaml +1758 -0
  265. f2dev/_bundle/platform/cli/README.md +866 -0
  266. f2dev/_bundle/platform/cli/__init__.py +42 -0
  267. f2dev/_bundle/platform/cli/__main__.py +17 -0
  268. f2dev/_bundle/platform/cli/cert_providers.py +369 -0
  269. f2dev/_bundle/platform/cli/command_record.py +144 -0
  270. f2dev/_bundle/platform/cli/config/data_services_config.json +217 -0
  271. f2dev/_bundle/platform/cli/config/environment_profiles.yaml +183 -0
  272. f2dev/_bundle/platform/cli/config/images.json +129 -0
  273. f2dev/_bundle/platform/cli/config/infrastructure_services_config.json +141 -0
  274. f2dev/_bundle/platform/cli/config.py +252 -0
  275. f2dev/_bundle/platform/cli/deployment_configuration_aws_example.yaml +117 -0
  276. f2dev/_bundle/platform/cli/deployment_configuration_gcp_example.yaml +130 -0
  277. f2dev/_bundle/platform/cli/deployment_configuration_onprem_example.yaml +71 -0
  278. f2dev/_bundle/platform/cli/destroy.py +677 -0
  279. f2dev/_bundle/platform/cli/dns_check.py +27 -0
  280. f2dev/_bundle/platform/cli/dns_providers.py +405 -0
  281. f2dev/_bundle/platform/cli/exit_codes.py +32 -0
  282. f2dev/_bundle/platform/cli/fixers.py +56 -0
  283. f2dev/_bundle/platform/cli/generate_only.py +336 -0
  284. f2dev/_bundle/platform/cli/health_report.py +114 -0
  285. f2dev/_bundle/platform/cli/logging.py +206 -0
  286. f2dev/_bundle/platform/cli/main.py +5293 -0
  287. f2dev/_bundle/platform/cli/precheck.py +1523 -0
  288. f2dev/_bundle/platform/cli/prerequisites/README.md +208 -0
  289. f2dev/_bundle/platform/cli/prerequisites/install-prerequisites.bat +107 -0
  290. f2dev/_bundle/platform/cli/prerequisites/install-prerequisites.ps1 +343 -0
  291. f2dev/_bundle/platform/cli/prerequisites/install-prerequisites.sh +207 -0
  292. f2dev/_bundle/platform/cli/prerequisites/linux/install-linux.sh +775 -0
  293. f2dev/_bundle/platform/cli/prerequisites/macos/install-macos.sh +634 -0
  294. f2dev/_bundle/platform/cli/prerequisites/requirements.txt +41 -0
  295. f2dev/_bundle/platform/cli/prerequisites/verify-prerequisites.ps1 +150 -0
  296. f2dev/_bundle/platform/cli/prerequisites/verify-prerequisites.sh +418 -0
  297. f2dev/_bundle/platform/cli/prerequisites/versions.yaml +43 -0
  298. f2dev/_bundle/platform/cli/prerequisites/windows/install-windows.ps1 +1005 -0
  299. f2dev/_bundle/platform/cli/restore.py +179 -0
  300. f2dev/_bundle/platform/cli/service_gates.py +160 -0
  301. f2dev/_bundle/platform/cli/state.py +332 -0
  302. f2dev/_bundle/platform/cli/wizard.py +782 -0
  303. f2dev/_bundle/platform/cli.py +235 -0
  304. f2dev/_bundle/platform/deployers/__init__.py +4 -0
  305. f2dev/_bundle/platform/deployers/base_deployer.py +8 -0
  306. f2dev/_bundle/platform/deployers/clouds/__init__.py +0 -0
  307. f2dev/_bundle/platform/deployers/clouds/aws_cloud.py +619 -0
  308. f2dev/_bundle/platform/deployers/clouds/azure_cloud.py +0 -0
  309. f2dev/_bundle/platform/deployers/clouds/google_cloud.py +785 -0
  310. f2dev/_bundle/platform/deployers/clouds/terragrunt_progress.py +56 -0
  311. f2dev/_bundle/platform/deployers/services/data_services/1.0_cicd_workload_runner.py +644 -0
  312. f2dev/_bundle/platform/deployers/services/data_services/12.0_control_plane.py +321 -0
  313. f2dev/_bundle/platform/deployers/services/data_services/13.0_data_mcp_hub.py +362 -0
  314. f2dev/_bundle/platform/deployers/services/data_services/2.0_object_storage_operator.py +416 -0
  315. f2dev/_bundle/platform/deployers/services/data_services/2.5_services_logs.py +482 -0
  316. f2dev/_bundle/platform/deployers/services/data_services/3.0_data_cicd_workflows.py +361 -0
  317. f2dev/_bundle/platform/deployers/services/data_services/4.0_data_replication.py +534 -0
  318. f2dev/_bundle/platform/deployers/services/data_services/4.5_data_streaming.py +303 -0
  319. f2dev/_bundle/platform/deployers/services/data_services/5.0_data_orchestration.py +760 -0
  320. f2dev/_bundle/platform/deployers/services/data_services/6.0_data_modeling.py +753 -0
  321. f2dev/_bundle/platform/deployers/services/data_services/7.0_data_governance.py +795 -0
  322. f2dev/_bundle/platform/deployers/services/data_services/8.0_data_analysis.py +587 -0
  323. f2dev/_bundle/platform/deployers/services/infra_services/1.0_secret_operator.py +467 -0
  324. f2dev/_bundle/platform/deployers/services/infra_services/10.0_cluster_pvc_autoscaller.py +500 -0
  325. f2dev/_bundle/platform/deployers/services/infra_services/2.0_cert_manager.py +963 -0
  326. f2dev/_bundle/platform/deployers/services/infra_services/3.0_external_dns.py +823 -0
  327. f2dev/_bundle/platform/deployers/services/infra_services/4.0_traefik_lb.py +604 -0
  328. f2dev/_bundle/platform/deployers/services/infra_services/5.0_stackgres_postgresql.py +652 -0
  329. f2dev/_bundle/platform/deployers/services/infra_services/6.0_services_metrics.py +515 -0
  330. f2dev/_bundle/platform/deployers/services/infra_services/7.0_services_monitoring.py +787 -0
  331. f2dev/_bundle/platform/deployers/services/infra_services/8.0_cluster_cleaner.py +439 -0
  332. f2dev/_bundle/platform/deployers/services/infra_services/9.0_idp_sso_manager.py +790 -0
  333. f2dev/_bundle/platform/readme.md +47 -0
  334. f2dev/_bundle/platform/requirements.txt +14 -0
  335. f2dev/_bundle/platform/terraform/aws_cloud/templates/backend.tf_template +10 -0
  336. f2dev/_bundle/platform/terraform/aws_cloud/templates/defaults.yaml_template +11 -0
  337. f2dev/_bundle/platform/terraform/aws_cloud/templates/env.yaml_template +2 -0
  338. f2dev/_bundle/platform/terraform/aws_cloud/templates/root.hcl_advanced_template +134 -0
  339. f2dev/_bundle/platform/terraform/aws_cloud/templates/root.hcl_basic_template +134 -0
  340. f2dev/_bundle/platform/terraform/aws_cloud/templates/terragrunt.hcl_advanced_template +134 -0
  341. f2dev/_bundle/platform/terraform/aws_cloud/templates/terragrunt.hcl_basic_template +134 -0
  342. f2dev/_bundle/platform/terraform/aws_cloud/terragrunt/01-apps-vpc/terragrunt.hcl +26 -0
  343. f2dev/_bundle/platform/terraform/aws_cloud/terragrunt/02-create-dns-ns-record/terragrunt.hcl +16 -0
  344. f2dev/_bundle/platform/terraform/aws_cloud/terragrunt/03-eks-cluster/terragrunt.hcl +21 -0
  345. f2dev/_bundle/platform/terraform/aws_cloud/terragrunt/04-external_dns_sa/terragrunt.hcl +28 -0
  346. f2dev/_bundle/platform/terraform/aws_cloud/terragrunt/bi-platform/01-apps-vpc/terragrunt.hcl +25 -0
  347. f2dev/_bundle/platform/terraform/aws_cloud/terragrunt/bi-platform/02-eks-cluster/terragrunt.hcl +32 -0
  348. f2dev/_bundle/platform/terraform/aws_cloud/terragrunt/bi-platform/03-external-dns-irsa/terragrunt.hcl +34 -0
  349. f2dev/_bundle/platform/terraform/aws_cloud/terragrunt/bi-platform/04-cert-manager-irsa/terragrunt.hcl +34 -0
  350. f2dev/_bundle/platform/terraform/aws_cloud/terragrunt/bi-platform/05-create-dns-zone/terragrunt.hcl +22 -0
  351. f2dev/_bundle/platform/terraform/aws_cloud/terragrunt/bi-platform/06-create-dns-ns-record/terragrunt.hcl +44 -0
  352. f2dev/_bundle/platform/terraform/aws_cloud/terragrunt/bi-platform/empty.yaml +1 -0
  353. f2dev/_bundle/platform/terraform/aws_cloud/terragrunt/empty.yaml +1 -0
  354. f2dev/_bundle/platform/terraform/aws_cloud/terragrunt/env.hcl +2 -0
  355. f2dev/_bundle/platform/terraform/azure_cloud/README.md +3 -0
  356. f2dev/_bundle/platform/terraform/azure_cloud/templates/_keep_structure.txt +0 -0
  357. f2dev/_bundle/platform/terraform/google_cloud/README.md +20 -0
  358. f2dev/_bundle/platform/terraform/google_cloud/templates/backend.tf_template +7 -0
  359. f2dev/_bundle/platform/terraform/google_cloud/templates/defaults.yaml_template +12 -0
  360. f2dev/_bundle/platform/terraform/google_cloud/templates/env.yaml_template +2 -0
  361. f2dev/_bundle/platform/terraform/google_cloud/templates/root.hcl_advanced_template +114 -0
  362. f2dev/_bundle/platform/terraform/google_cloud/templates/root.hcl_basic_template +116 -0
  363. f2dev/_bundle/platform/terraform/google_cloud/terragrunt/.gitignore +3 -0
  364. f2dev/_bundle/platform/terraform/google_cloud/terragrunt/bi-platform/00-create-ou-folder/terragrunt.hcl +15 -0
  365. f2dev/_bundle/platform/terraform/google_cloud/terragrunt/bi-platform/01-create-project/terragrunt.hcl +30 -0
  366. f2dev/_bundle/platform/terraform/google_cloud/terragrunt/bi-platform/02-enable-apis/terragrunt.hcl +25 -0
  367. f2dev/_bundle/platform/terraform/google_cloud/terragrunt/bi-platform/03-0-apps-vpc/terragrunt.hcl +134 -0
  368. f2dev/_bundle/platform/terraform/google_cloud/terragrunt/bi-platform/04-external-ip-traefik/terragrunt.hcl +29 -0
  369. f2dev/_bundle/platform/terraform/google_cloud/terragrunt/bi-platform/05-create-dns-zone/terragrunt.hcl +25 -0
  370. f2dev/_bundle/platform/terraform/google_cloud/terragrunt/bi-platform/06-create-dns-ns-record/terragrunt.hcl +43 -0
  371. f2dev/_bundle/platform/terraform/google_cloud/terragrunt/bi-platform/07-gke-cluster/terragrunt.hcl +103 -0
  372. f2dev/_bundle/platform/terraform/google_cloud/terragrunt/bi-platform/08-dbt_deploy_sa/terragrunt.hcl +36 -0
  373. f2dev/_bundle/platform/terraform/google_cloud/terragrunt/bi-platform/09-dbt_sa/terragrunt.hcl +40 -0
  374. f2dev/_bundle/platform/terraform/google_cloud/terragrunt/bi-platform/10-cert_manager_sa/terragrunt.hcl +34 -0
  375. f2dev/_bundle/platform/terraform/google_cloud/terragrunt/bi-platform/11-external_dns_sa/terragrunt.hcl +30 -0
  376. f2dev/_bundle/platform/terraform/google_cloud/terragrunt/bi-platform/12-monitoring_sa/terragrunt.hcl +52 -0
  377. f2dev/_bundle/platform/terraform/google_cloud/terragrunt/bi-platform/13-data_replication_sa/terragrunt.hcl +35 -0
  378. f2dev/_bundle/platform/terraform/google_cloud/terragrunt/bi-platform/14-data_orchestration_sa/terragrunt.hcl +35 -0
  379. f2dev/_bundle/platform/terraform/google_cloud/terragrunt/bi-platform/15-bi_data_sa/terragrunt.hcl +43 -0
  380. f2dev/_bundle/platform/terraform/google_cloud/terragrunt/bi-platform/16-whitelist-external-ip-on-common/terragrunt.hcl +30 -0
  381. f2dev/_bundle/platform/terraform/google_cloud/terragrunt/bi-platform/17-kubeconfig/terragrunt.hcl +23 -0
  382. f2dev/_bundle/platform/terraform/google_cloud/terragrunt/bi-platform/18-data_streaming_sa/terragrunt.hcl +24 -0
  383. f2dev/_bundle/platform/terraform/google_cloud/terragrunt/empty.yaml +1 -0
  384. f2dev/_bundle/platform/utils/__init__.py +0 -0
  385. f2dev/_bundle/platform/utils/customer_data_platform_repository_operator.py +1098 -0
  386. f2dev/_bundle/platform/utils/customer_secret_manager_operations.py +1635 -0
  387. f2dev/_bundle/platform/utils/environment_profiles.py +58 -0
  388. f2dev/_bundle/platform/utils/helm_utils.py +215 -0
  389. f2dev/_bundle/platform/utils/infrastructure_deployment_operator.py +1532 -0
  390. f2dev/_bundle/platform/utils/keycloak_realm_reconcile.py +320 -0
  391. f2dev/_bundle/platform/utils/kubeconfig_fixer.py +265 -0
  392. f2dev/_bundle/platform/utils/raw_extras.py +34 -0
  393. f2dev/_bundle/platform/utils/readiness.py +330 -0
  394. f2dev/_bundle/platform/utils/secret_structure_upgrade.py +194 -0
  395. f2dev/_bundle/platform/utils/templates/control_plane_warehouse_stats_template/bigquery_usage/.gitignore +7 -0
  396. f2dev/_bundle/platform/utils/templates/control_plane_warehouse_stats_template/bigquery_usage/README.md +33 -0
  397. f2dev/_bundle/platform/utils/templates/control_plane_warehouse_stats_template/bigquery_usage/analyses/.gitkeep +0 -0
  398. f2dev/_bundle/platform/utils/templates/control_plane_warehouse_stats_template/bigquery_usage/dbt_project.yml +52 -0
  399. f2dev/_bundle/platform/utils/templates/control_plane_warehouse_stats_template/bigquery_usage/macros/.gitkeep +0 -0
  400. f2dev/_bundle/platform/utils/templates/control_plane_warehouse_stats_template/bigquery_usage/macros/fast2dev_bq_time_zones.sql +12 -0
  401. f2dev/_bundle/platform/utils/templates/control_plane_warehouse_stats_template/bigquery_usage/macros/fast2dev_monitoring_grain.sql +23 -0
  402. f2dev/_bundle/platform/utils/templates/control_plane_warehouse_stats_template/bigquery_usage/models/marts/fast2dev_bq_daily_spend.sql +19 -0
  403. f2dev/_bundle/platform/utils/templates/control_plane_warehouse_stats_template/bigquery_usage/models/marts/fast2dev_bq_daily_spend.yml +25 -0
  404. f2dev/_bundle/platform/utils/templates/control_plane_warehouse_stats_template/bigquery_usage/models/marts/fast2dev_bq_model_costs_daily.sql +16 -0
  405. f2dev/_bundle/platform/utils/templates/control_plane_warehouse_stats_template/bigquery_usage/models/marts/fast2dev_bq_model_costs_daily.yml +24 -0
  406. f2dev/_bundle/platform/utils/templates/control_plane_warehouse_stats_template/bigquery_usage/models/marts/fast2dev_bq_storage_by_dataset.sql +12 -0
  407. f2dev/_bundle/platform/utils/templates/control_plane_warehouse_stats_template/bigquery_usage/models/marts/fast2dev_bq_storage_by_dataset.yml +21 -0
  408. f2dev/_bundle/platform/utils/templates/control_plane_warehouse_stats_template/bigquery_usage/models/marts/fast2dev_bq_user_costs_daily.sql +14 -0
  409. f2dev/_bundle/platform/utils/templates/control_plane_warehouse_stats_template/bigquery_usage/models/marts/fast2dev_bq_user_costs_daily.yml +22 -0
  410. f2dev/_bundle/platform/utils/templates/control_plane_warehouse_stats_template/bigquery_usage/models/marts/fast2dev_bq_weekly_kpi.sql +52 -0
  411. f2dev/_bundle/platform/utils/templates/control_plane_warehouse_stats_template/bigquery_usage/models/marts/fast2dev_bq_weekly_kpi.yml +42 -0
  412. f2dev/_bundle/platform/utils/templates/control_plane_warehouse_stats_template/bigquery_usage/models/marts/fast2dev_bq_weekly_spend.sql +74 -0
  413. f2dev/_bundle/platform/utils/templates/control_plane_warehouse_stats_template/bigquery_usage/models/marts/fast2dev_bq_weekly_spend.yml +49 -0
  414. f2dev/_bundle/platform/utils/templates/control_plane_warehouse_stats_template/bigquery_usage/models/sources/billing_export.yml +9 -0
  415. f2dev/_bundle/platform/utils/templates/control_plane_warehouse_stats_template/bigquery_usage/models/staging/fast2dev_bq_billing_export.sql +9 -0
  416. f2dev/_bundle/platform/utils/templates/control_plane_warehouse_stats_template/bigquery_usage/models/staging/fast2dev_bq_billing_export.yml +4 -0
  417. f2dev/_bundle/platform/utils/templates/control_plane_warehouse_stats_template/bigquery_usage/packages.yml +5 -0
  418. f2dev/_bundle/platform/utils/templates/control_plane_warehouse_stats_template/bigquery_usage/profiles.yml +15 -0
  419. f2dev/_bundle/platform/utils/templates/control_plane_warehouse_stats_template/bigquery_usage/scripts/run_monitoring.py +201 -0
  420. f2dev/_bundle/platform/utils/templates/control_plane_warehouse_stats_template/bigquery_usage/seeds/.gitkeep +0 -0
  421. f2dev/_bundle/platform/utils/templates/control_plane_warehouse_stats_template/bigquery_usage/snapshots/.gitkeep +0 -0
  422. f2dev/_bundle/platform/utils/templates/control_plane_warehouse_stats_template/bigquery_usage/tests/.gitkeep +0 -0
  423. f2dev/_bundle/platform/utils/templates/dry_run/gcp_sa.json +12 -0
  424. f2dev/_bundle/platform/utils/templates/dry_run/kubeconfig.yaml +18 -0
  425. f2dev/_bundle/platform/utils/templates/git_repo_templates/data_orchestrator/repository_structure/README.MD +50 -0
  426. f2dev/_bundle/platform/utils/templates/git_repo_templates/data_orchestrator/repository_structure/dags/dbt/README.MD +47 -0
  427. f2dev/_bundle/platform/utils/templates/git_repo_templates/data_orchestrator/repository_structure/dags/fast2dev_healthcheck.py_template_airflow_3.x +158 -0
  428. f2dev/_bundle/platform/utils/templates/git_repo_templates/dbt_data_model/bitbucket/bitbucket-pipelines.yml_template +144 -0
  429. f2dev/_bundle/platform/utils/templates/git_repo_templates/dbt_data_model/gitea/.gitea/PR_VALIDATION.md +52 -0
  430. f2dev/_bundle/platform/utils/templates/git_repo_templates/dbt_data_model/gitea/.gitea/pull_request_template.md +48 -0
  431. f2dev/_bundle/platform/utils/templates/git_repo_templates/dbt_data_model/gitea/.gitea/workflows/argo-workflows.yml_template +143 -0
  432. f2dev/_bundle/platform/utils/templates/git_repo_templates/dbt_data_model/gitea/.gitea/workflows/pr-agent.yml +30 -0
  433. f2dev/_bundle/platform/utils/templates/git_repo_templates/dbt_data_model/gitea/.gitea/workflows/validate-pr-description.yml +38 -0
  434. f2dev/_bundle/platform/utils/templates/git_repo_templates/dbt_data_model/github/.github/PR_VALIDATION.md +52 -0
  435. f2dev/_bundle/platform/utils/templates/git_repo_templates/dbt_data_model/github/.github/pull_request_template.md +48 -0
  436. f2dev/_bundle/platform/utils/templates/git_repo_templates/dbt_data_model/github/.github/workflows/argo-workflows.yml_template +143 -0
  437. f2dev/_bundle/platform/utils/templates/git_repo_templates/dbt_data_model/github/.github/workflows/pr-agent.yml +37 -0
  438. f2dev/_bundle/platform/utils/templates/git_repo_templates/dbt_data_model/github/.github/workflows/validate-pr-description.yml +157 -0
  439. f2dev/_bundle/platform/utils/templates/git_repo_templates/dbt_data_model/gitlab/.gitlab/PR_VALIDATION.md +43 -0
  440. f2dev/_bundle/platform/utils/templates/git_repo_templates/dbt_data_model/gitlab/.gitlab/merge_request_templates/Default.md +48 -0
  441. f2dev/_bundle/platform/utils/templates/git_repo_templates/dbt_data_model/gitlab/.gitlab-ci.yml_template +181 -0
  442. f2dev/_bundle/platform/utils/templates/git_repo_templates/dbt_data_model/repository_structure/.gitignore +21 -0
  443. f2dev/_bundle/platform/utils/templates/git_repo_templates/dbt_data_model/repository_structure/.pr_agent.toml +82 -0
  444. f2dev/_bundle/platform/utils/templates/git_repo_templates/dbt_data_model/repository_structure/AGENTS.md +126 -0
  445. f2dev/_bundle/platform/utils/templates/git_repo_templates/dbt_data_model/repository_structure/README.MD +101 -0
  446. f2dev/_bundle/platform/utils/templates/git_repo_templates/infrastructure_deployment_files/DR.md +341 -0
  447. f2dev/_bundle/platform/utils/templates/git_repo_templates/infrastructure_deployment_files/README.md.j2 +81 -0
  448. f2dev/_bundle/platform/utils/templates/git_repo_templates/infrastructure_deployment_files/decrypt_files.py +331 -0
  449. f2dev/_bundle/platform/utils/templates/git_repo_templates/infrastructure_deployment_files/encrypt_files.py +321 -0
  450. f2dev/_bundle/platform/utils/templates/secret_structure_template/customer_vault_structure.json +502 -0
  451. f2dev/_bundle/platform/utils/vault_structure_sync.py +96 -0
  452. f2dev/_bundle/terraform-modules/README.md +12 -0
  453. f2dev/_bundle/terraform-modules/aws_cloud/README.md +7 -0
  454. f2dev/_bundle/terraform-modules/aws_cloud/eks/addons-roles.tf +298 -0
  455. f2dev/_bundle/terraform-modules/aws_cloud/eks/main.tf +313 -0
  456. f2dev/_bundle/terraform-modules/aws_cloud/eks/outputs.tf +3 -0
  457. f2dev/_bundle/terraform-modules/aws_cloud/eks/policies/lb-controller-policy.json +219 -0
  458. f2dev/_bundle/terraform-modules/aws_cloud/eks/provider.tf +36 -0
  459. f2dev/_bundle/terraform-modules/aws_cloud/eks/variables.tf +107 -0
  460. f2dev/_bundle/terraform-modules/aws_cloud/eks/versions.tf +10 -0
  461. f2dev/_bundle/terraform-modules/aws_cloud/gcp_aws_zone/main.tf +25 -0
  462. f2dev/_bundle/terraform-modules/aws_cloud/gcp_aws_zone/provider.tf +17 -0
  463. f2dev/_bundle/terraform-modules/aws_cloud/gcp_aws_zone/variables.tf +41 -0
  464. f2dev/_bundle/terraform-modules/aws_cloud/vpc/main.tf +34 -0
  465. f2dev/_bundle/terraform-modules/aws_cloud/vpc/outputs.tf +44 -0
  466. f2dev/_bundle/terraform-modules/aws_cloud/vpc/provider.tf +12 -0
  467. f2dev/_bundle/terraform-modules/aws_cloud/vpc/variables.tf +118 -0
  468. f2dev/_bundle/terraform-modules/aws_cloud/vpc/versions.tf +10 -0
  469. f2dev/_bundle/terraform-modules/azure_cloud/README.md +3 -0
  470. f2dev/_bundle/terraform-modules/google_cloud/README.md +17 -0
  471. f2dev/_bundle/terraform-modules/google_cloud/artifact-registry/main.tf +8 -0
  472. f2dev/_bundle/terraform-modules/google_cloud/artifact-registry/providers.tf +6 -0
  473. f2dev/_bundle/terraform-modules/google_cloud/artifact-registry/variables.tf +17 -0
  474. f2dev/_bundle/terraform-modules/google_cloud/artifact-registry/versions.tf +8 -0
  475. f2dev/_bundle/terraform-modules/google_cloud/cloud-dns/main.tf +24 -0
  476. f2dev/_bundle/terraform-modules/google_cloud/cloud-dns/outputs.tf +25 -0
  477. f2dev/_bundle/terraform-modules/google_cloud/cloud-dns/providers.tf +7 -0
  478. f2dev/_bundle/terraform-modules/google_cloud/cloud-dns/variables.tf +17 -0
  479. f2dev/_bundle/terraform-modules/google_cloud/cloud-dns/versions.tf +9 -0
  480. f2dev/_bundle/terraform-modules/google_cloud/cloud-dns-recordset/main.tf +38 -0
  481. f2dev/_bundle/terraform-modules/google_cloud/cloud-dns-recordset/variables.tf +73 -0
  482. f2dev/_bundle/terraform-modules/google_cloud/cloud-dns-recordset/versions.tf +39 -0
  483. f2dev/_bundle/terraform-modules/google_cloud/composer/main.tf +213 -0
  484. f2dev/_bundle/terraform-modules/google_cloud/composer/outputs.tf +31 -0
  485. f2dev/_bundle/terraform-modules/google_cloud/composer/provider.tf +4 -0
  486. f2dev/_bundle/terraform-modules/google_cloud/composer/variables.tf +192 -0
  487. f2dev/_bundle/terraform-modules/google_cloud/create-ou-folder/main.tf +29 -0
  488. f2dev/_bundle/terraform-modules/google_cloud/create-ou-folder/output.tf +4 -0
  489. f2dev/_bundle/terraform-modules/google_cloud/create-ou-folder/providers.tf +6 -0
  490. f2dev/_bundle/terraform-modules/google_cloud/create-ou-folder/variables.tf +40 -0
  491. f2dev/_bundle/terraform-modules/google_cloud/create-ou-folder/versions.tf +8 -0
  492. f2dev/_bundle/terraform-modules/google_cloud/create-project/main.tf +18 -0
  493. f2dev/_bundle/terraform-modules/google_cloud/create-project/output.tf +8 -0
  494. f2dev/_bundle/terraform-modules/google_cloud/create-project/providers.tf +6 -0
  495. f2dev/_bundle/terraform-modules/google_cloud/create-project/variables.tf +27 -0
  496. f2dev/_bundle/terraform-modules/google_cloud/create-project/versions.tf +9 -0
  497. f2dev/_bundle/terraform-modules/google_cloud/deploy_sa/README.md +188 -0
  498. f2dev/_bundle/terraform-modules/google_cloud/deploy_sa/main.tf +135 -0
  499. f2dev/_bundle/terraform-modules/google_cloud/deploy_sa/output.tf +16 -0
  500. f2dev/_bundle/terraform-modules/google_cloud/deploy_sa/providers.tf +6 -0
  501. f2dev/_bundle/terraform-modules/google_cloud/deploy_sa/variables.tf +54 -0
  502. f2dev/_bundle/terraform-modules/google_cloud/deploy_sa/versions.tf +17 -0
  503. f2dev/_bundle/terraform-modules/google_cloud/enable_apis/main.tf +14 -0
  504. f2dev/_bundle/terraform-modules/google_cloud/enable_apis/provider.tf +7 -0
  505. f2dev/_bundle/terraform-modules/google_cloud/enable_apis/variables.tf +13 -0
  506. f2dev/_bundle/terraform-modules/google_cloud/enable_apis/versions.tf +10 -0
  507. f2dev/_bundle/terraform-modules/google_cloud/external-ip/README.md +89 -0
  508. f2dev/_bundle/terraform-modules/google_cloud/external-ip/main.tf +17 -0
  509. f2dev/_bundle/terraform-modules/google_cloud/external-ip/outputs.tf +19 -0
  510. f2dev/_bundle/terraform-modules/google_cloud/external-ip/variables.tf +43 -0
  511. f2dev/_bundle/terraform-modules/google_cloud/fw-add/main.tf +24 -0
  512. f2dev/_bundle/terraform-modules/google_cloud/fw-add/providers.tf +6 -0
  513. f2dev/_bundle/terraform-modules/google_cloud/fw-add/variables.tf +37 -0
  514. f2dev/_bundle/terraform-modules/google_cloud/fw-add/versions.tf +9 -0
  515. f2dev/_bundle/terraform-modules/google_cloud/gke-cluster/README.md +10 -0
  516. f2dev/_bundle/terraform-modules/google_cloud/gke-cluster/main.tf +459 -0
  517. f2dev/_bundle/terraform-modules/google_cloud/gke-cluster/outputs.tf +44 -0
  518. f2dev/_bundle/terraform-modules/google_cloud/gke-cluster/provider.tf +19 -0
  519. f2dev/_bundle/terraform-modules/google_cloud/gke-cluster/variables.tf +354 -0
  520. f2dev/_bundle/terraform-modules/google_cloud/gke-cluster/versions.tf +22 -0
  521. f2dev/_bundle/terraform-modules/google_cloud/kubeconfig/README.md +40 -0
  522. f2dev/_bundle/terraform-modules/google_cloud/kubeconfig/main.tf +54 -0
  523. f2dev/_bundle/terraform-modules/google_cloud/kubeconfig/outputs.tf +10 -0
  524. f2dev/_bundle/terraform-modules/google_cloud/kubeconfig/variables.tf +24 -0
  525. f2dev/_bundle/terraform-modules/google_cloud/kubeconfig/versions.tf +10 -0
  526. f2dev/_bundle/terraform-modules/google_cloud/shared-vpc/README.md +47 -0
  527. f2dev/_bundle/terraform-modules/google_cloud/shared-vpc/main.tf +51 -0
  528. f2dev/_bundle/terraform-modules/google_cloud/shared-vpc/net-address/README.md +103 -0
  529. f2dev/_bundle/terraform-modules/google_cloud/shared-vpc/net-address/main.tf +71 -0
  530. f2dev/_bundle/terraform-modules/google_cloud/shared-vpc/net-address/outputs.tf +71 -0
  531. f2dev/_bundle/terraform-modules/google_cloud/shared-vpc/net-address/variables.tf +82 -0
  532. f2dev/_bundle/terraform-modules/google_cloud/shared-vpc/net-address/versions.tf +27 -0
  533. f2dev/_bundle/terraform-modules/google_cloud/shared-vpc/outputs.tf +35 -0
  534. f2dev/_bundle/terraform-modules/google_cloud/shared-vpc/provider.tf +4 -0
  535. f2dev/_bundle/terraform-modules/google_cloud/shared-vpc/variables.tf +237 -0
  536. f2dev/_bundle/terraform-modules/oracle_cloud/README.md +3 -0
  537. f2dev/launcher.py +153 -0
  538. fast2dev-1.0.0.dist-info/METADATA +201 -0
  539. fast2dev-1.0.0.dist-info/RECORD +543 -0
  540. fast2dev-1.0.0.dist-info/WHEEL +4 -0
  541. fast2dev-1.0.0.dist-info/entry_points.txt +2 -0
  542. fast2dev-1.0.0.dist-info/licenses/LICENSE +202 -0
  543. fast2dev-1.0.0.dist-info/licenses/NOTICE +6 -0
@@ -0,0 +1,845 @@
1
+ ## Fast2.Dev Deployment
2
+ # Helm deployment values for Service.
3
+ # Helm Chart name: {{ chart_name }}
4
+ # Helm Chart repo: {{ chart_repo }}
5
+ # Helm Chart version {{ chart_version }}
6
+ #
7
+ # vault-operator.yaml
8
+ {% raw %}
9
+ apiVersion: batch/v1
10
+ kind: CronJob
11
+ metadata:
12
+ name: vault-operator
13
+ namespace: vault
14
+ spec:
15
+ schedule: "*/5 * * * *"
16
+ successfulJobsHistoryLimit: 1
17
+ failedJobsHistoryLimit: 1
18
+ concurrencyPolicy: Forbid
19
+ jobTemplate:
20
+ spec:
21
+ template:
22
+ spec:
23
+ serviceAccountName: vault-operator
24
+ containers:
25
+ - name: vault-operator
26
+ image: docker.io/m7xlab/fast2dev-k8s-toolbox:v1.0.0
27
+ command: ["/bin/bash", "-c"]
28
+ args:
29
+ - |
30
+ # Function to check if pod is running and ready
31
+ check_pod_ready() {
32
+ kubectl get pod vault-0 -n vault -o jsonpath='{.status.containerStatuses[0].started}' | grep -q "true"
33
+ }
34
+
35
+ # Function to check if vault responds to status
36
+ check_vault_responding() {
37
+ STATUS_OUTPUT=$(kubectl exec -n vault vault-0 -- vault status -format=json 2>/dev/null)
38
+ if [ $? -eq 2 ]; then
39
+ # Exit code 2 means vault is responding but not initialized - this is okay
40
+ return 0
41
+ elif [ -n "$STATUS_OUTPUT" ]; then
42
+ # We got some output, vault is responding
43
+ return 0
44
+ else
45
+ # No output, vault is not responding
46
+ return 1
47
+ fi
48
+ }
49
+
50
+ echo "Waiting for vault-0 pod to exist and be ready..."
51
+ while ! check_pod_ready; do
52
+ echo "Pod not ready yet, waiting..."
53
+ sleep 5
54
+ done
55
+
56
+ echo "Pod is ready, checking Vault status..."
57
+ RETRY_COUNT=0
58
+ MAX_RETRIES=30 # 5 minutes with 10-second intervals
59
+ while ! check_vault_responding; do
60
+ RETRY_COUNT=$((RETRY_COUNT + 1))
61
+ if [ $RETRY_COUNT -ge $MAX_RETRIES ]; then
62
+ echo "Vault not responding after 5 minutes, exiting"
63
+ exit 1
64
+ fi
65
+ echo "Vault not responding yet, waiting... (Attempt $RETRY_COUNT/$MAX_RETRIES)"
66
+ sleep 10
67
+ done
68
+
69
+ echo "Vault is responding, checking initialization status..."
70
+ STATUS=$(kubectl exec -n vault vault-0 -- vault status -format=json)
71
+ INITIALIZED=$(echo $STATUS | jq -r '.initialized')
72
+ SEALED=$(echo $STATUS | jq -r '.sealed')
73
+
74
+ if [ "$INITIALIZED" = "false" ]; then
75
+ echo "Vault is not initialized. Initializing..."
76
+ INIT_RESPONSE=$(kubectl exec -n vault vault-0 -- vault operator init -key-shares=1 -key-threshold=1 -format=json)
77
+
78
+ # Store the unseal key and root token
79
+ UNSEAL_KEY=$(echo "$INIT_RESPONSE" | jq -r '.unseal_keys_b64[0]')
80
+ ROOT_TOKEN=$(echo "$INIT_RESPONSE" | jq -r '.root_token')
81
+
82
+ # Create Kubernetes secret
83
+ kubectl create secret generic vault-init \
84
+ --from-literal=unseal-key="$UNSEAL_KEY" \
85
+ --from-literal=root-token="$ROOT_TOKEN" \
86
+ -n vault
87
+
88
+ echo "Unsealing vault..."
89
+ kubectl exec -n vault vault-0 -- vault operator unseal "$UNSEAL_KEY"
90
+
91
+ # Configure Vault with auth methods and secrets engines
92
+ echo "Configuring Vault..."
93
+ kubectl exec -n vault vault-0 -- sh -c "
94
+ export VAULT_TOKEN='$ROOT_TOKEN'
95
+ vault auth enable kubernetes
96
+ vault write auth/kubernetes/config \
97
+ kubernetes_host='https://\$KUBERNETES_PORT_443_TCP_ADDR:443' \
98
+ kubernetes_ca_cert='\$(cat /var/run/secrets/kubernetes.io/serviceaccount/ca.crt)'
99
+
100
+ vault policy write app - <<EOF
101
+ path \"secret/data/*\" {
102
+ capabilities = [\"read\", \"list\"]
103
+ }
104
+ EOF
105
+
106
+ vault secrets enable -version=2 -path=secret kv
107
+ "
108
+ elif [ "$SEALED" = "true" ]; then
109
+ echo "Vault is sealed. Unsealing..."
110
+ UNSEAL_KEY=$(kubectl get secret vault-init -n vault -o jsonpath='{.data.unseal-key}' | base64 -d)
111
+ kubectl exec -n vault vault-0 -- vault operator unseal "$UNSEAL_KEY"
112
+ else
113
+ echo "Vault is initialized and unsealed"
114
+ fi
115
+ restartPolicy: OnFailure
116
+
117
+ ---
118
+ apiVersion: v1
119
+ kind: ServiceAccount
120
+ metadata:
121
+ name: vault-operator
122
+ namespace: vault
123
+
124
+ ---
125
+ apiVersion: rbac.authorization.k8s.io/v1
126
+ kind: Role
127
+ metadata:
128
+ name: vault-operator
129
+ namespace: vault
130
+ rules:
131
+ - apiGroups: [""]
132
+ resources: ["pods", "secrets"]
133
+ verbs: ["get", "list", "create", "update"]
134
+ - apiGroups: [""]
135
+ resources: ["pods/exec"]
136
+ verbs: ["create"]
137
+ - apiGroups: ["batch"]
138
+ resources: ["jobs", "cronjobs"]
139
+ verbs: ["get", "list", "create", "update", "delete", "watch"]
140
+
141
+ ---
142
+ apiVersion: rbac.authorization.k8s.io/v1
143
+ kind: RoleBinding
144
+ metadata:
145
+ name: vault-operator
146
+ namespace: vault
147
+ roleRef:
148
+ apiGroup: rbac.authorization.k8s.io
149
+ kind: Role
150
+ name: vault-operator
151
+ subjects:
152
+ - kind: ServiceAccount
153
+ name: vault-operator
154
+ namespace: vault
155
+
156
+ ---
157
+ apiVersion: v1
158
+ kind: ConfigMap
159
+ metadata:
160
+ name: vault-populator-policy
161
+ namespace: vault
162
+ data:
163
+ policy.hcl: |
164
+ # Enable managing the KV secrets engine
165
+ path "sys/mounts/*" {
166
+ capabilities = ["create", "read", "update", "delete", "list"]
167
+ }
168
+
169
+ # Enable managing secrets under the KV store
170
+ path "secret/*" {
171
+ capabilities = ["create", "read", "update", "delete", "list"]
172
+ }
173
+
174
+ ---
175
+ apiVersion: v1
176
+ kind: ServiceAccount
177
+ metadata:
178
+ name: vault-populator
179
+ namespace: vault
180
+
181
+ ---
182
+ apiVersion: rbac.authorization.k8s.io/v1
183
+ kind: Role
184
+ metadata:
185
+ name: vault-populator
186
+ namespace: vault
187
+ rules:
188
+ - apiGroups: [""]
189
+ resources: ["secrets"]
190
+ verbs: ["get", "list"]
191
+
192
+ ---
193
+ apiVersion: rbac.authorization.k8s.io/v1
194
+ kind: RoleBinding
195
+ metadata:
196
+ name: vault-populator
197
+ namespace: vault
198
+ roleRef:
199
+ apiGroup: rbac.authorization.k8s.io
200
+ kind: Role
201
+ name: vault-populator
202
+ subjects:
203
+ - kind: ServiceAccount
204
+ name: vault-populator
205
+ namespace: vault
206
+
207
+ ---
208
+ apiVersion: batch/v1
209
+ kind: Job
210
+ metadata:
211
+ name: vault-auth-config
212
+ namespace: vault
213
+ spec:
214
+ backoffLimit: 6
215
+ template:
216
+ spec:
217
+ serviceAccountName: vault-operator
218
+ containers:
219
+ - name: vault-auth-config
220
+ image: docker.io/m7xlab/fast2dev-k8s-toolbox:v1.0.0
221
+ command: ["/bin/bash", "-c"]
222
+ args:
223
+ - |
224
+ # Trigger the initialization cronjob.
225
+ kubectl create job --from=cronjob/vault-operator vault-operator-manual-trigger
226
+
227
+ # Wait for vault-0 pod to exist and be ready
228
+ until kubectl get pod vault-0 -n vault >/dev/null 2>&1; do
229
+ echo "Waiting for vault-0 pod to exist..."
230
+ sleep 5
231
+ done
232
+
233
+ # Wait for Vault to be unsealed
234
+ until kubectl exec -n vault vault-0 -- vault status >/dev/null 2>&1; do
235
+ echo "Waiting for Vault to be ready..."
236
+ sleep 5
237
+ done
238
+
239
+ # Get root token from secret
240
+ ROOT_TOKEN=$(kubectl get secret vault-init -n vault -o jsonpath='{.data.root-token}' | base64 -d)
241
+
242
+ # Enable kubernetes auth if not already enabled
243
+ if ! kubectl exec -n vault vault-0 -- sh -c "VAULT_TOKEN=$ROOT_TOKEN vault auth list" | grep -q kubernetes/; then
244
+ echo "Enabling Kubernetes auth..."
245
+ kubectl exec -n vault vault-0 -- sh -c "VAULT_TOKEN=$ROOT_TOKEN vault auth enable kubernetes"
246
+ fi
247
+
248
+ # Get service account token and CA cert
249
+ SA_JWT=$(kubectl exec -n vault vault-0 -- cat /var/run/secrets/kubernetes.io/serviceaccount/token)
250
+ SA_CA_CRT=$(kubectl exec -n vault vault-0 -- cat /var/run/secrets/kubernetes.io/serviceaccount/ca.crt | base64 -w0)
251
+
252
+ # Configure Kubernetes auth
253
+ kubectl exec -n vault vault-0 -- sh -c "VAULT_TOKEN=$ROOT_TOKEN vault write auth/kubernetes/config \
254
+ kubernetes_host='https://kubernetes.default.svc:443' \
255
+ kubernetes_ca_cert_base64='${SA_CA_CRT}' \
256
+ issuer='https://kubernetes.default.svc.cluster.local'"
257
+
258
+ # Create policy for populator with updated sys/mounts permissions
259
+ kubectl exec -n vault vault-0 -- sh -c "VAULT_TOKEN=$ROOT_TOKEN vault policy write vault-populator - <<EOF
260
+ # Enable reading mounts
261
+ path \"sys/mounts\" {
262
+ capabilities = [\"read\", \"list\"]
263
+ }
264
+
265
+ # Enable managing mounts
266
+ path \"sys/mounts/*\" {
267
+ capabilities = [\"create\", \"read\", \"update\", \"delete\", \"list\"]
268
+ }
269
+
270
+ # Enable managing secrets under the KV store
271
+ path \"secret/*\" {
272
+ capabilities = [\"create\", \"read\", \"update\", \"delete\", \"list\"]
273
+ }
274
+
275
+ # Enable managing secrets engine configuration
276
+ path \"sys/mounts/secret/tune\" {
277
+ capabilities = [\"create\", \"read\", \"update\", \"delete\", \"list\"]
278
+ }
279
+
280
+ # Allow checking capabilities
281
+ path \"sys/capabilities*\" {
282
+ capabilities = [\"create\", \"update\"]
283
+ }
284
+ EOF"
285
+
286
+ # Create Kubernetes auth role
287
+ kubectl exec -n vault vault-0 -- sh -c "VAULT_TOKEN=$ROOT_TOKEN vault write auth/kubernetes/role/vault-populator \
288
+ bound_service_account_names=vault-populator \
289
+ bound_service_account_namespaces=vault \
290
+ policies=vault-populator \
291
+ ttl=1h"
292
+
293
+ kubectl exec -n vault vault-0 -- sh -c "VAULT_TOKEN=$ROOT_TOKEN vault policy write control-plane-streaming - <<EOF
294
+ path \"secret/data/data-streaming/connections/*\" {
295
+ capabilities = [\"create\", \"read\", \"update\", \"delete\"]
296
+ }
297
+ path \"secret/metadata/data-streaming/connections/*\" {
298
+ capabilities = [\"read\", \"list\", \"delete\"]
299
+ }
300
+ EOF"
301
+
302
+ kubectl exec -n vault vault-0 -- sh -c "VAULT_TOKEN=$ROOT_TOKEN vault write auth/kubernetes/role/control-plane-streaming \
303
+ bound_service_account_names='*' \
304
+ bound_service_account_namespaces=data-control-plane \
305
+ policies=control-plane-streaming \
306
+ ttl=15m"
307
+ restartPolicy: OnFailure
308
+
309
+ ---
310
+ apiVersion: v1
311
+ kind: ServiceAccount
312
+ metadata:
313
+ name: vault-populator
314
+ namespace: vault
315
+
316
+ ---
317
+ apiVersion: rbac.authorization.k8s.io/v1
318
+ kind: Role
319
+ metadata:
320
+ name: vault-populator
321
+ namespace: vault
322
+ rules:
323
+ - apiGroups: [""]
324
+ resources: ["pods", "pods/exec"]
325
+ verbs: ["get", "list", "watch", "create"]
326
+ - apiGroups: [""]
327
+ resources: ["secrets"]
328
+ verbs: ["get", "list"]
329
+
330
+ ---
331
+ apiVersion: rbac.authorization.k8s.io/v1
332
+ kind: RoleBinding
333
+ metadata:
334
+ name: vault-populator
335
+ namespace: vault
336
+ roleRef:
337
+ apiGroup: rbac.authorization.k8s.io
338
+ kind: Role
339
+ name: vault-populator
340
+ subjects:
341
+ - kind: ServiceAccount
342
+ name: vault-populator
343
+ namespace: vault
344
+
345
+ ---
346
+ apiVersion: batch/v1
347
+ kind: Job
348
+ metadata:
349
+ name: vault-populator
350
+ namespace: vault
351
+ spec:
352
+ backoffLimit: 6
353
+ template:
354
+ spec:
355
+ serviceAccountName: vault-populator
356
+ initContainers:
357
+ - name: wait-for-auth
358
+ image: docker.io/m7xlab/fast2dev-k8s-toolbox:v1.0.0
359
+ command: ["/bin/bash", "-c"]
360
+ args:
361
+ - |
362
+ # Wait for vault-0 pod to exist and be ready
363
+ until kubectl get pod vault-0 -n vault >/dev/null 2>&1; do
364
+ echo "Waiting for vault-0 pod to exist..."
365
+ sleep 5
366
+ done
367
+
368
+ # Wait for Vault to be unsealed
369
+ until kubectl exec -n vault vault-0 -- vault status >/dev/null 2>&1; do
370
+ echo "Waiting for Vault to be ready..."
371
+ sleep 5
372
+ done
373
+
374
+ # Wait for auth role to be created
375
+ ROOT_TOKEN=$(kubectl get secret vault-init -n vault -o jsonpath='{.data.root-token}' | base64 -d)
376
+ until kubectl exec -n vault vault-0 -- sh -c "VAULT_TOKEN=$ROOT_TOKEN vault read auth/kubernetes/role/vault-populator" >/dev/null 2>&1; do
377
+ echo "Waiting for Vault auth role to be configured..."
378
+ sleep 5
379
+ done
380
+ containers:
381
+ - name: vault-populator
382
+ image: python:3.9-slim
383
+ command: ["/bin/bash", "-c"]
384
+ args:
385
+ - |
386
+ pip install hvac &&
387
+ python /app/populate_vault.py
388
+ env:
389
+ - name: VAULT_ADDR
390
+ value: "http://vault:8200"
391
+ - name: VAULT_ROLE
392
+ value: "vault-populator"
393
+ - name: VAULT_MOUNT_POINT
394
+ value: "secret"
395
+ - name: SECRETS_FILE
396
+ value: "/secrets/vault-secrets.json"
397
+ volumeMounts:
398
+ - name: app-code
399
+ mountPath: /app
400
+ - name: secrets
401
+ mountPath: /secrets
402
+ readOnly: true
403
+ volumes:
404
+ - name: app-code
405
+ configMap:
406
+ name: vault-populator-script
407
+ - name: secrets
408
+ secret:
409
+ secretName: vault-secrets
410
+ restartPolicy: Never
411
+
412
+ ---
413
+ # Store the Python script in a ConfigMap
414
+ apiVersion: v1
415
+ kind: ConfigMap
416
+ metadata:
417
+ name: vault-populator-script
418
+ namespace: vault
419
+ data:
420
+ populate_vault.py: |
421
+ #!/usr/bin/env python3
422
+ import hvac
423
+ import json
424
+ import os
425
+ import logging
426
+ import sys
427
+ from typing import Any
428
+ import time
429
+ from pathlib import Path
430
+
431
+ # Configure logging
432
+ logging.basicConfig(
433
+ level=logging.INFO,
434
+ format='%(asctime)s - %(name)s - %(levelname)s - %(message)s'
435
+ )
436
+ logger = logging.getLogger(__name__)
437
+
438
+ class VaultPopulator:
439
+ def __init__(self, vault_addr: str, mount_point: str = "secret"):
440
+ """
441
+ Initialize the VaultPopulator with connection details.
442
+
443
+ Args:
444
+ vault_addr: The address of the Vault server
445
+ mount_point: The mount point for the KV secrets engine (default: "secret")
446
+ """
447
+ self.vault_addr = vault_addr
448
+ self.mount_point = mount_point
449
+ self.client = None
450
+
451
+ def connect_with_k8s(self, role: str, jwt_path: str = '/var/run/secrets/kubernetes.io/serviceaccount/token') -> None:
452
+ """
453
+ Connect to Vault using Kubernetes authentication.
454
+
455
+ Args:
456
+ role: The Vault role to authenticate with
457
+ jwt_path: Path to the JWT token file
458
+ """
459
+ try:
460
+ # Read the JWT token
461
+ with open(jwt_path, 'r') as f:
462
+ jwt = f.read()
463
+
464
+ # Create Vault client
465
+ self.client = hvac.Client(url=self.vault_addr)
466
+
467
+ # Authenticate with Kubernetes
468
+ auth_response = self.client.auth.kubernetes.login(
469
+ role=role,
470
+ jwt=jwt
471
+ )
472
+
473
+ logger.info("Successfully authenticated to Vault using Kubernetes auth")
474
+
475
+ # Verify client is authenticated
476
+ if not self.client.is_authenticated():
477
+ raise Exception("Failed to authenticate with Vault")
478
+
479
+ except Exception as e:
480
+ logger.error(f"Failed to connect to Vault: {str(e)}")
481
+ raise
482
+
483
+ def ensure_kv_enabled(self) -> None:
484
+ """
485
+ Ensure the KV secrets engine is enabled at the specified mount point.
486
+ """
487
+ try:
488
+ # Check if KV is already enabled
489
+ mounts = self.client.sys.list_mounted_secrets_engines()
490
+ if f"{self.mount_point}/" not in mounts:
491
+ # Enable KV secrets engine version 2
492
+ self.client.sys.enable_secrets_engine(
493
+ backend_type='kv',
494
+ path=self.mount_point,
495
+ options={'version': '2'}
496
+ )
497
+ logger.info(f"Enabled KV secrets engine at {self.mount_point}")
498
+ else:
499
+ logger.info(f"KV secrets engine already enabled at {self.mount_point}")
500
+
501
+ except Exception as e:
502
+ logger.error(f"Failed to ensure KV secrets engine: {str(e)}")
503
+ raise
504
+
505
+ def create_folder_structure(self, structure: dict[str, Any], parent_path: str = "") -> None:
506
+ """
507
+ Create the folder structure in Vault based on the provided structure.
508
+
509
+ Args:
510
+ structure: Dictionary representing the folder structure
511
+ parent_path: Current path in the hierarchy
512
+ """
513
+ try:
514
+ for key, value in structure.items():
515
+ current_path = f"{parent_path}/{key}" if parent_path else key
516
+
517
+ if isinstance(value, dict):
518
+ # If all values in the dict are strings or None, it's a secrets directory
519
+ if all(isinstance(v, (str, type(None))) for v in value.values()):
520
+ # Store the secrets
521
+ secrets_path = current_path.lstrip('/')
522
+ self.store_secrets(secrets_path, value)
523
+ else:
524
+ # Recurse into the directory
525
+ self.create_folder_structure(value, current_path)
526
+
527
+ except Exception as e:
528
+ logger.error(f"Failed to create folder structure at {parent_path}: {str(e)}")
529
+ raise
530
+
531
+ def store_secrets(self, path: str, secrets: dict[str, str]) -> None:
532
+ """
533
+ Store secrets at the specified path.
534
+
535
+ Args:
536
+ path: Path where to store the secrets
537
+ secrets: Dictionary of secrets to store
538
+ """
539
+ try:
540
+ # Filter out None values and convert all values to strings
541
+ cleaned_secrets = {k: str(v if v is not None else "") for k, v in secrets.items()}
542
+
543
+ # Store secrets
544
+ self.client.secrets.kv.v2.create_or_update_secret(
545
+ path=path,
546
+ secret=cleaned_secrets,
547
+ mount_point=self.mount_point
548
+ )
549
+
550
+ logger.info(f"Stored secrets at {path}")
551
+
552
+ except Exception as e:
553
+ logger.error(f"Failed to store secrets at {path}: {str(e)}")
554
+ raise
555
+
556
+ def populate_from_file(self, file_path: str) -> None:
557
+ """
558
+ Populate Vault with secrets from a file.
559
+
560
+ Args:
561
+ file_path: Path to the JSON file containing secrets
562
+ """
563
+ try:
564
+ # Read the secrets file
565
+ with open(file_path, 'r') as f:
566
+ structure = json.load(f)
567
+
568
+ # Ensure KV is enabled
569
+ self.ensure_kv_enabled()
570
+
571
+ # Create structure and populate secrets
572
+ self.create_folder_structure(structure)
573
+
574
+ logger.info("Successfully populated Vault with secrets from file")
575
+
576
+ except Exception as e:
577
+ logger.error(f"Failed to populate Vault from file: {str(e)}")
578
+ raise
579
+
580
+ def main():
581
+ # Get configuration from environment
582
+ vault_addr = os.getenv('VAULT_ADDR', 'http://vault:8200')
583
+ vault_role = os.getenv('VAULT_ROLE', 'vault-populator')
584
+ secrets_file = os.getenv('SECRETS_FILE', '/secrets/vault-secrets.json')
585
+ mount_point = os.getenv('VAULT_MOUNT_POINT', 'secret')
586
+
587
+ # Maximum number of retries
588
+ max_retries = 5
589
+ retry_delay = 10 # seconds
590
+
591
+ for attempt in range(max_retries):
592
+ try:
593
+ # Initialize populator
594
+ populator = VaultPopulator(vault_addr, mount_point)
595
+
596
+ # Connect to Vault
597
+ populator.connect_with_k8s(vault_role)
598
+
599
+ # Populate secrets
600
+ populator.populate_from_file(secrets_file)
601
+
602
+ logger.info("Secret population completed successfully")
603
+ break
604
+
605
+ except Exception as e:
606
+ if attempt < max_retries - 1:
607
+ logger.warning(f"Attempt {attempt + 1} failed: {str(e)}. Retrying in {retry_delay} seconds...")
608
+ time.sleep(retry_delay)
609
+ else:
610
+ logger.error(f"Failed to populate secrets after {max_retries} attempts")
611
+ raise
612
+
613
+ if __name__ == "__main__":
614
+ main()
615
+
616
+ ---
617
+ # ---------------------------------------------------------------------------
618
+ # Vault OIDC (Keycloak) configuration — control-plane reverse-proxy shield
619
+ #
620
+ # Waits for Vault to be initialized/unsealed AND for Keycloak OIDC discovery
621
+ # to respond (Keycloak is usually deployed after Vault). Idempotent: safe to
622
+ # re-run. Reads non-secret + secret settings from Secret ``vault-oidc-config``
623
+ # (created by 1.0_secret_operator.py from the customer vault structure).
624
+ #
625
+ # Access model (effective AND):
626
+ # * bound_claims requires ``/Data Platform Services/Vault`` to log in
627
+ # * ``/Access Management/Administrators`` → vault-admin policy (full access)
628
+ # * Vault group alone → default policy only (no useful rights)
629
+ # ---------------------------------------------------------------------------
630
+ apiVersion: batch/v1
631
+ kind: Job
632
+ metadata:
633
+ name: vault-oidc-config
634
+ namespace: vault
635
+ labels:
636
+ app.kubernetes.io/name: vault-oidc-config
637
+ app.kubernetes.io/component: oidc
638
+ spec:
639
+ backoffLimit: 30
640
+ ttlSecondsAfterFinished: 86400
641
+ template:
642
+ metadata:
643
+ labels:
644
+ app: vault-oidc-config
645
+ spec:
646
+ serviceAccountName: vault-operator
647
+ restartPolicy: OnFailure
648
+ containers:
649
+ - name: vault-oidc-config
650
+ image: docker.io/m7xlab/fast2dev-k8s-toolbox:v1.0.0
651
+ command: ["/bin/bash", "-c"]
652
+ args:
653
+ - |
654
+ set -euo pipefail
655
+
656
+ echo "=== Vault OIDC configuration (Keycloak) ==="
657
+
658
+ # --- wait: vault-0 exists ---
659
+ until kubectl get pod vault-0 -n vault >/dev/null 2>&1; do
660
+ echo "Waiting for vault-0 pod..."
661
+ sleep 5
662
+ done
663
+
664
+ # --- wait: vault-init secret (root token) ---
665
+ until kubectl get secret vault-init -n vault >/dev/null 2>&1; do
666
+ echo "Waiting for vault-init secret (init/unseal job)..."
667
+ sleep 5
668
+ done
669
+
670
+ # --- wait: Vault unsealed ---
671
+ until kubectl exec -n vault vault-0 -- vault status >/dev/null 2>&1; do
672
+ echo "Waiting for Vault to be unsealed..."
673
+ sleep 5
674
+ done
675
+ echo "Vault is ready"
676
+
677
+ ROOT_TOKEN=$(kubectl get secret vault-init -n vault -o jsonpath='{.data.root-token}' | base64 -d)
678
+ if [ -z "$ROOT_TOKEN" ]; then
679
+ echo "ERROR: empty root token in vault-init"
680
+ exit 1
681
+ fi
682
+
683
+ : "${KEYCLOAK_URL:?KEYCLOAK_URL missing}"
684
+ : "${KEYCLOAK_REALM:?KEYCLOAK_REALM missing}"
685
+ : "${VAULT_OIDC_CLIENT_ID:?VAULT_OIDC_CLIENT_ID missing}"
686
+ : "${VAULT_OIDC_CLIENT_SECRET:?VAULT_OIDC_CLIENT_SECRET missing}"
687
+ : "${VAULT_OIDC_PUBLIC_BASE:?VAULT_OIDC_PUBLIC_BASE missing}"
688
+ : "${VAULT_OIDC_GROUP_VAULT:?VAULT_OIDC_GROUP_VAULT missing}"
689
+ : "${VAULT_OIDC_GROUP_ADMINS:?VAULT_OIDC_GROUP_ADMINS missing}"
690
+
691
+ DISCOVERY="${KEYCLOAK_URL}/realms/${KEYCLOAK_REALM}/.well-known/openid-configuration"
692
+ echo "Waiting for Keycloak OIDC discovery at ${DISCOVERY} ..."
693
+ # Discovery is fetched by Vault itself at config-write time; probe via vault pod.
694
+ until kubectl exec -n vault vault-0 -- wget -qO- --timeout=5 "$DISCOVERY" >/dev/null 2>&1; do
695
+ echo "Keycloak not reachable yet, retrying..."
696
+ sleep 10
697
+ done
698
+ echo "Keycloak OIDC discovery OK"
699
+
700
+ CALLBACK_PRIMARY="${VAULT_OIDC_PUBLIC_BASE}/ui/vault/auth/oidc/oidc/callback"
701
+ CALLBACK_LEGACY="${VAULT_OIDC_PUBLIC_BASE}/api/vault-proxy/ui/vault/auth/oidc/oidc/callback"
702
+
703
+ # Run configuration inside vault-0 (has vault CLI; no jq required).
704
+ kubectl exec -n vault vault-0 -- sh -c "
705
+ set -e
706
+ export VAULT_TOKEN='$ROOT_TOKEN'
707
+
708
+ echo 'Enabling oidc auth method (idempotent)...'
709
+ vault auth enable oidc 2>/dev/null || echo 'oidc already enabled'
710
+
711
+ echo 'Writing OIDC client config...'
712
+ vault write auth/oidc/config \\
713
+ oidc_discovery_url='${KEYCLOAK_URL}/realms/${KEYCLOAK_REALM}' \\
714
+ oidc_client_id='${VAULT_OIDC_CLIENT_ID}' \\
715
+ oidc_client_secret='${VAULT_OIDC_CLIENT_SECRET}' \\
716
+ default_role='vault-access'
717
+
718
+ echo 'Writing policies...'
719
+ vault policy write vault-admin - <<'POL'
720
+ path \"*\" {
721
+ capabilities = [\"create\", \"read\", \"update\", \"delete\", \"list\", \"sudo\"]
722
+ }
723
+ POL
724
+
725
+ vault policy write vault-access - <<'POL'
726
+ path \"auth/token/lookup-self\" { capabilities = [\"read\"] }
727
+ path \"auth/token/renew-self\" { capabilities = [\"update\"] }
728
+ path \"auth/token/revoke-self\" { capabilities = [\"update\"] }
729
+ path \"identity/entity/id/{{identity.entity.id}}\" { capabilities = [\"read\"] }
730
+ POL
731
+
732
+ echo 'Writing OIDC role (bound_claims gate = Vault group)...'
733
+ cat > /tmp/oidc-role.json <<EOF
734
+ {
735
+ \"bound_audiences\": \"${VAULT_OIDC_CLIENT_ID}\",
736
+ \"allowed_redirect_uris\": [
737
+ \"${CALLBACK_PRIMARY}\",
738
+ \"${CALLBACK_LEGACY}\",
739
+ \"http://localhost:8250/oidc/callback\"
740
+ ],
741
+ \"user_claim\": \"preferred_username\",
742
+ \"groups_claim\": \"groups\",
743
+ \"oidc_scopes\": \"openid,profile,email,groups\",
744
+ \"token_policies\": [\"default\"],
745
+ \"token_ttl\": \"1h\",
746
+ \"token_max_ttl\": \"12h\",
747
+ \"verbose_oidc_logging\": false,
748
+ \"bound_claims_type\": \"string\",
749
+ \"bound_claims\": {
750
+ \"groups\": \"${VAULT_OIDC_GROUP_VAULT}\"
751
+ }
752
+ }
753
+ EOF
754
+ vault write auth/oidc/role/vault-access @/tmp/oidc-role.json
755
+ rm -f /tmp/oidc-role.json
756
+
757
+ OIDC_ACCESSOR=\$(vault auth list -format=json | sed -n 's/.*\"oidc\/\":{[^}]*\"accessor\":\"\\([^\"]*\\)\".*/\\1/p')
758
+ if [ -z \"\$OIDC_ACCESSOR\" ]; then
759
+ OIDC_ACCESSOR=\$(vault auth list | awk '/^oidc/ {print \$3}')
760
+ fi
761
+ echo \"OIDC accessor=\$OIDC_ACCESSOR\"
762
+
763
+ # External groups — Vault group has no policies (gate only via bound_claims).
764
+ # Administrators → vault-admin. Net: useful access requires BOTH groups.
765
+ vault write identity/group name=vault-users type=external policies='' \\
766
+ metadata=source=keycloak \\
767
+ metadata=keycloak_group='${VAULT_OIDC_GROUP_VAULT}' \\
768
+ metadata=description='Gatekeeper; login bound_claims requires this group' 2>/dev/null || \\
769
+ vault write identity/group name=vault-users policies='' \\
770
+ metadata=source=keycloak \\
771
+ metadata=keycloak_group='${VAULT_OIDC_GROUP_VAULT}'
772
+
773
+ vault write identity/group name=vault-administrators type=external policies=vault-admin \\
774
+ metadata=source=keycloak \\
775
+ metadata=keycloak_group='${VAULT_OIDC_GROUP_ADMINS}' \\
776
+ metadata=description='Grants vault-admin after Vault-group gate' 2>/dev/null || \\
777
+ vault write identity/group name=vault-administrators policies=vault-admin \\
778
+ metadata=source=keycloak \\
779
+ metadata=keycloak_group='${VAULT_OIDC_GROUP_ADMINS}'
780
+
781
+ GID_USERS=\$(vault read -field=id identity/group/name/vault-users)
782
+ GID_ADMINS=\$(vault read -field=id identity/group/name/vault-administrators)
783
+
784
+ # Recreate aliases if missing / wrong name (best-effort).
785
+ vault write identity/group-alias \\
786
+ name='${VAULT_OIDC_GROUP_VAULT}' \\
787
+ mount_accessor=\$OIDC_ACCESSOR \\
788
+ canonical_id=\$GID_USERS 2>/dev/null || echo 'vault-users alias already exists'
789
+
790
+ vault write identity/group-alias \\
791
+ name='${VAULT_OIDC_GROUP_ADMINS}' \\
792
+ mount_accessor=\$OIDC_ACCESSOR \\
793
+ canonical_id=\$GID_ADMINS 2>/dev/null || echo 'vault-administrators alias already exists'
794
+
795
+ echo '=== OIDC configuration complete ==='
796
+ vault read auth/oidc/config >/dev/null && echo 'config: OK'
797
+ vault read auth/oidc/role/vault-access >/dev/null && echo 'role: OK'
798
+ "
799
+
800
+ echo "Done."
801
+ env:
802
+ - name: KEYCLOAK_URL
803
+ valueFrom:
804
+ secretKeyRef:
805
+ name: vault-oidc-config
806
+ key: keycloak-url
807
+ - name: KEYCLOAK_REALM
808
+ valueFrom:
809
+ secretKeyRef:
810
+ name: vault-oidc-config
811
+ key: keycloak-realm
812
+ - name: VAULT_OIDC_CLIENT_ID
813
+ valueFrom:
814
+ secretKeyRef:
815
+ name: vault-oidc-config
816
+ key: client-id
817
+ - name: VAULT_OIDC_CLIENT_SECRET
818
+ valueFrom:
819
+ secretKeyRef:
820
+ name: vault-oidc-config
821
+ key: client-secret
822
+ - name: VAULT_OIDC_PUBLIC_BASE
823
+ valueFrom:
824
+ secretKeyRef:
825
+ name: vault-oidc-config
826
+ key: public-base-url
827
+ - name: VAULT_OIDC_GROUP_VAULT
828
+ valueFrom:
829
+ secretKeyRef:
830
+ name: vault-oidc-config
831
+ key: group-vault
832
+ - name: VAULT_OIDC_GROUP_ADMINS
833
+ valueFrom:
834
+ secretKeyRef:
835
+ name: vault-oidc-config
836
+ key: group-admins
837
+ resources:
838
+ requests:
839
+ memory: "64Mi"
840
+ cpu: "50m"
841
+ limits:
842
+ memory: "256Mi"
843
+ cpu: "200m"
844
+
845
+ {%endraw%}